paper_name
stringlengths
11
170
text
stringlengths
8.07k
307k
summary
stringlengths
152
6.16k
paper_id
stringlengths
43
43
Property Controllable Variational Autoencoder via Invertible Mutual Dependence
1 INTRODUCTION . Important progress has been made towards learning the underlying low-dimensional representation and generative process of complex high dimensional data such as images ( Pu et al. , 2016 ) , natural languages ( Bowman et al. , 2016 ) , chemical molecules ( Kadurin et al. , 2017 ; Guo et al. , 2019 ) and geo-spatial data ( Zhao , 2020 ) via deep generative models . In recent years , a surge of research has developed new ways to further enhance the disentanglement and independence of the latent dimensions , creating models with better robustness , improved interpretability , and greater generalizability with inductive bias ( see Figures 1 ( a ) and 1 ( b ) ) ( Kingma et al. , 2014 ; Kulkarni et al. , 2015 ; Creswell et al. , 2017 ) or without any bias ( Higgins et al. , 2017 ; Chen et al. , 2018 ; Kumar et al. , 2018 ) . Although it is generally assumed that the complex data is generated from the latent representations , their latent dimensions are typically not associated with physical meaning and hence can not reflect real data generation mechanisms such as the relationships between structural and functional characteristics . A critical problem that remains unsolved is how to best identify and enforce the correspondence between the learned latent dimensions and key aspects of the data , such as the bio-physical properties of a molecule . Knowing such properties is crucial for many applications that depend on being able to interpret and control the data generation process with the desired properties . In an effort to achieve this , several researchers ( Klys et al. , 2018 ; Locatello et al. , 2019b ) have suggested methods that enforce a subset of latent dimensions correspond to targeted categorical properties , as shown in Figure 1 ( c ) . Though the initial results have been encouraging , critical challenges remain unsolved such as : ( 1 ) Difficulty in handling continuous-valued properties . The control imposed on data generation limits existing techniques to categorical ( typically binary ) properties , to enable tractable model inference and sufficient coverage of the data . However , continuous-valued properties ( e.g. , the scale and light level of images ) are also common in real world data , while their model inference usually can be easily intractable . Also , many cases require to generate data ∗Corresponding author : liang.zhao @ emory.edu with properties of which the values are unseen during training process . This can not be achieved by conventional techniques such as conditional models without making strong assumption on the model distributions . ( 2 ) Difficulty in efficiently enhancing mutual independence among latent variables relevant and irrelevant to the properties . This problem requires to ensure that each property is only correlated to its corresponding latent variable ( s ) and independent of all the others . Directly enforcing such mutual independence inherently between all pairs of latent variables incurs quadratic number of optimization efforts . Hence an efficient way is imperative . ( 3 ) Difficulty in capturing and controlling correlated properties . It is feasible that several independent latent variables can capture multiple independent properties . But when the properties are correlated , they can not be “ one-on-one ” mapped to corresponding independent latent variables anymore . However , correlated properties are commonly found in formatting a real world data . To solve the above challenges , we propose a new model , Property-controllable VAE ( PCVAE ) , where a new Bayesian model is proposed to inductively bias the latent representation using explicit data properties via novel group-wise and property-wise disentanglement terms . Each data property is seamlessly linked to the corresponding latent variable by innovatively enforcing an invertible mutual dependence between them , as shown in Figure 1 ( d ) . Hence , when generating data , the corresponding latent variables are manipulated to simultaneously control multiple desired properties without influencing the others . We have also further extended our model to handle inter-correlated properties . Our key contributions are summarized as follows : • A new Bayesian model that inductively biases the latent representation using explicit real data properties is proposed . A variational inference strategy and inference model have been customized to ensure effective Bayesian inference . • Group-wise and property-wise disentanglement terms are proposed to enhance the mutual independence among property , relevant and irrelevant latent variables . • The invertible mutual dependence between property-latent variable pair is achieved by enforcing an invertibility constraint over a residual-based decoder . • The quantitative and qualitative evaluation performed for this study revealed our PCVAE outperforms existing methods by up to 28 % in capturing and 65 % in manipulating the desired properties . 2 RELATED WORKS . Disentanglement Representation Learning . An important relevant area of research is disentangled representation learning ( Alemi et al. , 2017 ; Chen et al. , 2018 ; Higgins et al. , 2017 ; Kim & Mnih , 2018 ) , which structures the latent space by minimizing the mutual information between all pairs of latent variables . The goal here is to learn representations that separate out the underlying explanatory factors that are responsible for variations in the data , as these have been shown to be relatively resilient with respect to the complex variants involved ( Bengio et al. , 2013 ; Ma et al. , 2019 ; Guo et al. , 2020 ) , and thus can be used to enhance generalizability as well as improve robustness against adversarial attack . As noted by Locatello et al . ( 2019a ) , it is impossible for disentangled representation learning to capture the desired properties without supervision and inductive biases . Learning latent representations via supervision . This ensures that the latent variables capture the desired properties though supervision , generally by directly defining properties as latent variables in the model ( Locatello et al. , 2019b ) . Unfortunately , apart from providing an explicit variable for the labelled property , this yields no other easily interpretable structures , such as discovering latent variables that are correlated to the properties , as the model proposed in the current study does . This is also an issue with other methods of structuring latent space that have been explored , such as batching data according to labels ( Kulkarni et al. , 2015 ; Zhang et al. , 2020 ) or using a discriminator network in a non-generative model ( Lample et al. , 2017 ) . Some researchers addressed this problem by introducing the architecture bias through a two-way factored autoencoder and realize the supervision based on a pair-wise contrastive loss ( Gyawali et al. , 2019 ) . Other researchers addressed this problem by linking latent variables with observed labels through adversarial learning ( Creswell et al. , 2017 ; Edwards & Storkey , 2015 ; Ganin et al. , 2016 ; Mathieu et al. , 2016 ) . The most relevant work for our purpose is CSVAE ( Klys et al. , 2018 ) , where a subset of latent variables are correlated with binary properties via an adversarial learning . All the above works can not handle multiple continuous-valued properties due to their strict assumptions on the distribution of properties . Data manipulation and generation . Here , trained machine learning models are utilized to manipulate and generate data in a controllable way with the desired properties , which is especially useful for applications in the image domain . Several works have specifically considered transferring attributes in images , which is the same goal as that in the CASVE . These earlier works ( Zhou et al. , 2017 ; Xiao et al. , 2017 ; 2018 ) all transfer attributes from a source image onto a target image . These models can only perform categorical attribute transformation between images ( e.g. , “ splice the beard style of image A onto image B ” ) , but only through interpolation between existing images . Once trained , our proposed model can generate an objects with any value of a certain property ( either observed or unobserved during training ) that can be encoded in the subset of latent variables . 3 PROPERTY CONTROLLABLE VAE . 3.1 PROBLEM FORMULATION . Suppose we are given a dataset D where each data instance is ( x , y ) with x ∈ Rn and y = { yk ∈ R } Kk=1 to represent K properties of interest of x . For example , if x is a molecule , then we may have properties of interest , such as cLogP and cLogS . We assume that the data ( x , y ) are generated by some random process from continuous latent random variables ( z , w ) . Each variable in w controls one of the properties of interest in y , while the variables in z control all the other aspects of x . Our goal is to learn such a generative model involving ( x , y ) and ( z , w ) , where the subset of variables ( i.e. , z ) are disentangled from subset w , and the variables inside w are disentangled from each other . Once this model has been learned , then we can expect different elements of variables in w to control different properties of interest , which is a highly desirable goal for many data generation downstream tasks . For example , we may want to decrease the value of a specific property ( e.g. , protein energy ) by changing the value of the corresponding element in w. It is also possible to directly set a desired property value ( e.g. , the mass of a molecule ) and then generate the corresponding x with this target value ( i.e. , a molecule with the target mass value ) . 3.2 OVERALL OBJECTIVE . In this section , we first introduce the Bayesian variational inference of PCVAE . Then we introduce the group-wise and property-wise disentanglement terms as part of the overall objective . Following this , an invertibility constraint is introduced to enforce mutual dependence between each propertylatent variable pair . At last , PCVAE is extended to capture and control multiple correlated properties . 3.2.1 BAYESIAN VARIATIONAL INFERENCE OF PCVAE . The goal in Section 3.1 requires us to not only model the dependence between x and ( w , z ) for latent representation learning and data generation , but also model the dependence between y and w for property manipulation . We propose to achieve this by maximizing a form of variational lower bound on the joint log likelihood p ( x , y ) of our model . Given an approximate posterior q ( z , w∣x , y ) , we can use the Jensen ’ s equality to obtain the variational lower bound of p ( x , y ) as : log p ( x , y ) = logEq ( z , w∣x , y ) [ p ( x , y , w , z ) /q ( z , w∣x , y ) ] ≥ Eq ( z , w∣x , y ) [ log p ( x , y , w , z ) /q ( z , w∣x , y ) ] . ( 1 ) The joint likelihood log p ( x , y , w , z ) can be decomposed as log p ( x , y∣z , w ) + log p ( z , w ) . We have two assumptions : ( 1 ) w only encodes the information from y , namely , x and y are conditionally independent given w ( i.e. , x ⊥ y∣w ) ; ( 2 ) z is independent from w and y , namely z ⊥ w and z ⊥ y , which is equal to y ⊥ z∣w ( see derivation in Appendix A.3 ) . First , based on the two assumptions , we can get x ⊥ y∣ ( z , w ) ( see derivation in Appendix A.4 ) . Thus , we have log p ( x , y∣z , w ) = log p ( x∣z , w ) + log p ( y∣z , w ) . Then , based on the assumption y ⊥ z∣w , we can have log p ( y∣z , w ) = log p ( y∣w ) . Then we get log p ( x , y∣z , w ) = log p ( x∣z , w ) + log p ( y∣w ) . To explicitly represent the dependence between x and ( z , w ) as well as the dependence between y and w , we can parameterize the joint log-likelihood as log pθ , γ ( x , y , w , z ) with θ and γ as : log pθ , γ ( x , y , w , z ) = log pθ ( x∣z , w ) + log p ( z , w ) + log pγ ( y∣w ) . ( 2 ) Given the condition that a parameterized qφ ( z , w∣x , y ) = qφ ( z , w∣x ) = qφ ( z∣x ) qφ ( w∣x ) ( since the information on y is included in x ) , by taking Eq . 2 into the above variational lower bound term in Eq . 1 , we obtain the negative part as an upper bound on − log pθ , γ ( x , y ) ( as shown in the right sub-figure of Figure 1 ( d ) ) : L1 = − Eqφ ( z , w∣x ) [ log pθ ( x∣z , w ) ] − Eqφ ( w∣x ) [ log pγ ( y∣w ) ] +DKL ( qφ ( z , w∣x ) ∣∣p ( z , w ) ) ( 3 ) This gives us the proposed Bayesian variational inference of PCVAE . The detailed derivation of Eq . 3 can be found in Appendix A.1 . As there are K properties of interest in y which are assigned and disentangled by the latent variables in w , the second term in Eq . 3 can be detailed as ∑Kk Eqφ ( w∣x ) [ log pγ ( yk∣wk ) ] .
To encourage disentanglement in the latent space of a variational autoencoder (VAE), the authors propose to learn two sets of latent z and w: the dimensions of w are independent of each other and each dimension w_i maps to a known ground truth generating factor y_i. Latent z captures all the other factors. The well studied Total Correlation regularisation is used to enforce the independence of z and w, and the same is used to enforce the independence of the dimensions of w. Each dimension is learned to predict a corresponding ground truth factor. The key difference from the previous approach is the use of invertible and Lipschitz smooth mapping to learn monotonic mappings from w to y.
SP:71d80c38253a4fd86d8e076b2dee8d0c47da4911
OPAL: Offline Primitive Discovery for Accelerating Offline Reinforcement Learning
1 INTRODUCTION . Reinforcement Learning ( RL ) systems have achieved impressive performance in a variety of online settings such as games ( Silver et al. , 2016 ; Tesauro , 1995 ; Brown & Sandholm , 2019 ) and robotics ( Levine et al. , 2016 ; Dasari et al. , 2019 ; Peters et al. , 2010 ; Parmas et al. , 2019 ; Pinto & Gupta , 2016 ; Nachum et al. , 2019a ) , where the agent can act in the environment and sample as many transitions and rewards as needed . However , in many practical applications the agent ’ s ability to continuously act in the environment may be severely limited due to practical concerns ( DulacArnold et al. , 2019 ) . For example , a robot learning through trial and error in the real world requires costly human supervision , safety checks , and resets ( Atkeson et al. , 2015 ) , rendering many standard online RL algorithms inapplicable ( Matsushima et al. , 2020 ) . However , in such settings we might instead have access to large amounts of previously logged data , which could be logged from a baseline hand-engineered policy or even from other related tasks . For example , in self-driving applications , one may have access to large amounts of human driving behavior ; in robotic applications , one might have data of either humans or robots performing similar tasks . While these offline datasets are often undirected ( generic human driving data on various routes in various cities may not be directly relevant to navigation of a specific route within a specific city ) and unlabelled ( generic human driving data is often not labelled with the human ’ s intended route or destination ) , this data is still useful in that it can inform the algorithm about what is possible to do in the real world , without the need for active exploration . In this paper , we study how , in this offline setting , an effective strategy to leveraging unlabeled and undirected past data is to utilize unsupervised learning to extract potentially useful and temporally extended primitive skills to learn what types of behaviors are possible . For example , consider a dataset of an agent performing undirected navigation in a maze environment ( Figure 1 ) . While the dataset does not provide demonstrations of exclusively one specific point-to-point navigation task , ∗Work done during an internship at Google Brain it nevertheless presents clear indications of which temporally extended behaviors are useful and natural in this environment ( e.g. , moving forward , left , right , and backward ) , and our unsupervised learning objective aims to distill these behaviors into temporally extended primitives . Once these locomotive primitive behaviors are extracted , we can use them as a compact constrained temporallyextended action space for learning a task policy with offline RL , which only needs to focus on task relevant navigation , thereby making task learning easier . For example , once a specific point-to-point navigation is commanded , the agent can leverage the learned primitives for locomotion and only focus on the task of navigation , as opposed to learning locomotion and navigation from scratch . We refer to our proposed unsupervised learning method as Offline Primitives for Accelerating offline reinforcement Learning ( OPAL ) , and apply this basic paradigm to offline RL , where the agent is given a single offline dataset to use for both the initial unsupervised learning phase and then a subsequent task-directed offline policy optimization phase . Despite the fact that no additional data is used , we find that our proposed unsupervised learning technique can dramatically improve offline policy optimization compared to performing offline policy optimization on the raw dataset directly . To the best of our knowledge , ours is the first work to theoretically justify and experimentally verify the benefits of primitive learning in offline RL settings , showing that hierarchies can provide temporal abstraction that allows us to reduce the effect of compounding errors issue in offline RL . These theoretical and empirical results are notably in contrast to previous related work in online hierarchical RL ( Nachum et al. , 2019b ) , which found that improved exploration is the main benefit afforded by hierarchically learned primitives . We instead show significant benefits in the offline RL setting , where exploration is irrelevant . Beyond offline RL , and although this isn ’ t the main focus of the work , we also show the applicability of our method for accelerating RL by incorporating OPAL as a preprocessing step to standard online RL , few-shot imitation learning , and multi-task transfer learning . In all settings , we demonstrate that the use of OPAL can improve the speed and quality of downstream task learning . 2 RELATED WORK . Offline RL . Offline RL presents the problem of learning a policy from a fixed prior dataset of transitions and rewards . Recent works in offline RL ( Kumar et al. , 2019 ; Levine et al. , 2020 ; Wu et al. , 2019 ; Ghasemipour et al. , 2020 ; Jaques et al. , 2019 ; Fujimoto et al. , 2018 ) constrain the policy to be close to the data distribution to avoid the use of out-of-distribution actions ( Kumar et al. , 2019 ; Levine et al. , 2020 ) . To constrain the policy , some methods use distributional penalties , as measured by KL divergence ( Levine et al. , 2020 ; Jaques et al. , 2019 ) , MMD ( Kumar et al. , 2019 ) , or Wasserstein distance ( Wu et al. , 2019 ) . Other methods first sample actions from the behavior policy and then either clip the maximum deviation from those actions ( Fujimoto et al. , 2018 ) or just use those actions ( Ghasemipour et al. , 2020 ) during the value backup to stay within the support of the offline data . In contrast to these works , OPAL uses an offline dataset for unsupervised learning of a continuous space of primitives . The use of these primitives for downstream tasks implicitly constrains a learned primitive-directing policy to stay close to the offline data distribution . As we demonstrate in our experiments , the use of OPAL in conjunction with an off-the-shelf offline RL algorithm in this way can yield significant improvement compared to applying offline RL to the dataset directly . Online skill discovery . There are a number of recent works ( Eysenbach et al. , 2018 ; Nachum et al. , 2018a ; Sharma et al. , 2019 ) which use unsupervised objectives to discover skills and use the discovered skills for planning ( Sharma et al. , 2019 ) , few-shot imitation learning , or online RL ( Eysenbach et al. , 2018 ; Nachum et al. , 2018a ) . However , these works focus on online settings and assume access to the environment . In contrast , OPAL focuses on settings where a large dataset of diverse behaviors is provided but access to the environment is restricted . It leverages these static offline datasets to discover primitive skills with better state coverage and avoids the exploration issue of learning primitives from scratch . Hierarchical policy learning . Hierarchical policy learning involves learning a hierarchy of policies where a low-level policy acts as primitive skills and a high-level policy directs the low-level policy to solve a task . While some works ( Bacon et al. , 2017 ; Stolle & Precup , 2002 ; Peng et al. , 2019 ) learn a discrete set of lower-level policies , each behaving as a primitive skill , other works ( Vezhnevets et al. , 2017 ; Nachum et al. , 2018b ; 2019a ; Hausman et al. , 2018 ) learn a continuous space of primitive skills representing the lower-level policy . These methods have mostly been applied in online settings . However , there have been some recent variants of the above works ( Lynch et al. , 2020 ; Shankar & Gupta , 2020 ; Krishnan et al. , 2017 ; Merel et al. , 2018 ) which extract skills from a prior dataset and using it for either performing tasks directly ( Lynch et al. , 2020 ) or learning downstream tasks ( Shankar & Gupta , 2020 ; Krishnan et al. , 2017 ; Merel et al. , 2018 ) with online RL . While OPAL is related to these works , we mainly focus on leveraging the learned primitives for asymptotically improving the performance of offline RL ; i.e. , both the primitive learning and the downstream task must be solved using a single static dataset . Furthermore , we provide performance bounds for OPAL and enumerate the specific properties an offline dataset should possess to guarantee improved downstream task learning , while such theoretical guarantees are largely absent from existing work . 3 PRELIMINARIES . We consider the standard Markov decision process ( MDP ) setting ( Puterman , 1994 ) , specified by a tupleM = ( S , A , P , µ , r , γ ) where S represents the state space , A represents the action space , P ( s′|s , a ) represents the transition probability , µ ( s ) represents the initial state distribution , r ( s , a ) ∈ ( −Rmax , Rmax ) represents the reward function , and γ ∈ ( 0 , 1 ) represents the discount factor . A policy π in this MDP corresponds to a function S → ∆ ( A ) , where ∆ ( A ) is the simplex over A . It induces a discounted future state distribution dπ , defined by dπ ( s ) = ( 1 − γ ) ∑∞t=0 γtP ( st = s|π ) , where P ( st = s|π ) is the probability of reaching the state s at time t by running π on M. For a positive integer k , we use dπk ( s ) = ( 1 − γk ) ∑∞ t=0 γ tkP ( stk = s|π ) to denote the everyk-step state distribution of π . The return of policy π in MDP M is defined as JRL ( π , M ) = 1 1−γEs∼dπ , a∼π ( a|s ) [ r ( s , a ) ] . We represent the reward- and discount-agnostic environment as a tuple E = ( S , A , P , µ ) . We aim to use a large , unlabeled , and undirected experience dataset D : = { τ ri : = ( st , at ) c−1t=0 } Ni=1 associated with E to extract primitives and improve offline RL for downstream task learning . To account for the fact that the dataset D may be generated by a mixture of diverse policies starting at diverse initial states , we assume D is generated by first sampling a behavior policy π ∼ Π along with an initial state s ∼ κ , where Π , κ represent some ( unknown ) distributions over policies and states , respectively , and then running π on E for c time steps starting at s0 = s. We define the probability of a sub-trajectory τ : = ( s0 , a0 , . . . , sc−1 , ac−1 ) in D under a policy π as π ( τ ) = κ ( s0 ) ∏c−1 t=1 P ( st|st−1 , at−1 ) ∏c−1 t=0 π ( at|st ) , and the conditional probability as π ( τ |s ) = 1 [ s = s0 ] ∏c−1 t=1 P ( st|st−1 , at−1 ) ∏c−1 t=0 π ( at|st ) . In this work , we will show how to apply unsupervised learning techniques to D to extract a continuous space of primitives πθ ( a|s , z ) , where z ∈ Z , the latent space inferred by unsupervised learning . We intend to use the learned πθ ( a|s , z ) to asymptotically improve the performance of offline RL for downstream task learning . For offline RL , we assume the existence of a dataset Dr : = { τ ri : = ( st , at , rt ) c−1t=0 } Ni=1 , corresponding to the same sub-trajectories in D labelled with MDP rewards . Additionally , we can use the extracted primitives for other applications such as few-shot imitation learning , online RL , and online multi-task transfer learning . We review the additional assumptions for these applications in Appendix A .
In the RL setting, this paper tackles the case where an agent may have access to large amounts of offline experience data. The objective of the work is to find an effective way to leverage this data for finding temporally extended primitive behaviors. The paper provides results that show how performing offline primitive learning can be leveraged for improving few-shot imitation learning as well as exploration and transfer on a variety of benchmark domains.
SP:b2e0fd72f2a599a9cb288618decfcd709d712f38
Federated Learning of a Mixture of Global and Local Models
1 INTRODUCTION . With the proliferation of mobile phones , wearable devices , tablets , and smart home devices comes an increase in the volume of data captured and stored on them . This data contains a wealth of potentially useful information to the owners of these devices , and more so if appropriate machine learning models could be trained on the heterogeneous data stored across the network of such devices . The traditional approach involves moving the relevant data to a data center where centralized machine learning techniques can be efficiently applied ( Dean et al. , 2012 ; Reddi et al. , 2016 ) . However , this approach is not without issues . First , many device users are increasingly sensitive to privacy concerns and prefer their data to never leave their devices . Second , moving data from their place of origin to a centralized location is very inefficient in terms of energy and time . 1.1 FEDERATED LEARNING . Federated learning ( FL ) ( McMahan et al. , 2016 ; Konečný et al. , 2016b ; a ; McMahan et al. , 2017 ) has emerged as an interdisciplinary field focused on addressing these issues by training machine learning models directly on edge devices . The currently prevalent paradigm ( Li et al. , 2019 ; Kairouz et al. , 2019 ) casts supervised FL as an empirical risk minimization problem of the form min x∈Rd 1 n n∑ i=1 fi ( x ) , ( 1 ) where n is the number of devices participating in training , x ∈ Rd encodes the d parameters of a global model ( e.g. , weights of a neural network ) and fi ( x ) : = Eξ∼Di [ f ( x , ξ ) ] represents the aggregate loss of model x on the local data represented by distribution Di stored on device i . One of the defining characteristics of FL is that the data distributions Di may possess very different properties across the devices . Hence , any potential FL method is explicitly required to be able to work under the heterogeneous data setting . The most popular method for solving ( 1 ) in the context of FL is the FedAvg algorithm ( McMahan et al. , 2016 ) . In its most simple form , when one does not employ partial participation , model compression , or stochastic approximation , FedAvg reduces to Local Gradient Descent ( LGD ) ( Khaled et al. , 2019 ; 2020 ) , which is an extension of GD performing more than a single gradient step on each device before aggregation . FedAvg has been shown to work well empirically , particularly for non-convex problems , but comes with poor convergence guarantees compared to the non-local counterparts when data are heterogeneous . Some issues with current approaches to FL The first motivation for our research comes from the appreciation that data heterogeneity does not merely present challenges to the design of new provably efficient training methods for solving ( 1 ) , but also inevitably raises questions about the utility of such a global solution to individual users . Indeed , a global model trained across all the data from all devices might be so removed from the typical data and usage patterns experienced by an individual user as to render it virtually useless . This issue has been observed before , and various approaches have been proposed to address it . For instance , the MOCHA ( Smith et al. , 2017 ) framework uses a multi-task learning approach to allow for personalization . Next , ( Khodak et al. , 2019 ) propose a generic online algorithm for gradientbased parameter-transfer meta-learning and demonstrate improved practical performance over FedAvg ( McMahan et al. , 2017 ) . Approaches based on variational inference ( Corinzia & Buhmann , 2019 ) , cyclic patterns in practical FL data sampling ( Eichner et al. , 2019 ) transfer learning ( Zhao et al. , 2018 ) and explicit model mixing ( Peterson et al. , 2019 ) have been proposed . The second motivation for our work is the realization that even very simple variants of FedAvg , such as LGD , which should be easier to analyze , fail to provide theoretical improvements in communication complexity over their non-local cousins , in this case , GD ( Khaled et al. , 2019 ; 2020 ) .1 This observation is at odds with the practical success of local methods in FL . This leads us to ask the question : if LGD does not theoretically improve upon GD as a solver for the traditional global problem ( 1 ) , perhaps LGD should not be seen as a method for solving ( 1 ) at all . In such a case , what problem does LGD solve ? A good answer to this question would shed light on the workings of LGD , and by analogy , on the role local steps play in more elaborate FL methods such as local SGD ( Stich , 2020 ; Khaled et al. , 2020 ) and FedAvg . 2 CONTRIBUTIONS . In our work we argue that the two motivations mentioned in the introduction point in the same direction , i.e. , we show that a single solution can be devised addressing both problems at the same time . Our main contributions are : New formulation of FL which seeks an implicit mixture of global and local models . We propose a new optimization formulation of FL . Instead of learning a single global model by solving ( 1 ) , we propose to learn a mixture of the global model and the purely local models which can be trained by each device i using its data Di only . Our formulation ( see Sec . 3 ) lifts the problem from Rd to Rnd , allowing each device i to learn a personalized model xi ∈ Rd . These personalized models are encouraged to not depart too much from their mean by the inclusion of a quadratic penalty ψ multiplied by a parameter λ ≥ 0 . Admittedly , the idea of softly-enforced similarity of the local models was already introduced in the domain of the multi-task relationship learning ( Zhang & Yeung , 2010 ; Liu et al. , 2017 ; Wang et al. , 2018 ) and distributed optimization ( Lan et al. , 2018 ; Gorbunov et al. , 2019 ; Zhang et al. , 2015 ) . The mixture objective we propose ( see ( 2 ) ) is a special case of their setup , which justifies our approach from the modeling perspective . Note that Zhang et al . ( 2015 ) ; Liu et al . ( 2017 ) ; Wang et al . ( 2018 ) provide efficient algorithms to solve the mixture objective already . However , none of the mentioned papers consider the FL application , nor they shed a light on the communication complexity of LGD algorithms , which we do in our work . Theoretical properties of the new formulation . We study the properties of the optimal solution of our formulation , thus developing an algorithmic-free theory . When the penalty parameter is set to zero , then obviously , each device is allowed to train their own model without any dependence on the data stored on other devices . Such purely local models are rarely useful . We prove that the optimal 1After our paper was completed , a lower bound on the performance of local SGD was presented that is worse than the known minibatch SGD guarantee ( Woodworth et al. , 2020a ) , confirming that the local methods do not outperform their non-local counterparts in the heterogeneous setup . Similarly , the benefit of local methods in the non-heterogeneous scenario was questioned in ( Woodworth et al. , 2020b ) . local models converge to the traditional global model characterized by ( 1 ) at the rate O ( 1/λ ) . We also show that the total loss evaluated at the local models is never higher than the total loss evaluated at the global model ( see Thm . 3.1 ) . Moreover , we prove an insightful structural result for the optimal local models : the optimal model learned by device i arises by subtracting the gradient of the loss function stored on that device evaluated at the same point ( i.e. , a local model ) from the average of the optimal local models ( see Thm . 3.2 ) . As a byproduct , this theoretical result sheds new light on the key update step in the model agnostic meta-learning ( MAML ) method ( Finn et al. , 2017 ) , which has a similar but subtly different structure.2 The subtle difference is that the MAML update obtains the local model by subtracting the gradient evaluated at the global model . While MAML was originally proposed as a heuristic , we provide rigorous theoretical guarantees . Loopless LGD : non-uniform SGD applied to our formulation . We then propose a randomized gradient-based method—Loopless Local Gradient Descent ( L2GD ) —for solving our new formulation ( Algorithm 1 ) . This method is , in fact , a non-standard application of SGD to our problem , and can be seen as an instance of SGD with non-uniform sampling applied to the problem of minimizing the sum of two convex functions ( Zhao & Zhang , 2015 ; Gower et al. , 2019 ) : the average loss , and the penalty . When the loss function is selected by the randomness in our SGD method , the stochastic gradient step can be interpreted as the execution of a single local GD step on each device . Since we set the probability of the loss being sampled to be high , this step is typically repeated multiple times , resulting in multiple local GD steps . In contrast to standard LGD , the number of local steps is not fixed , but random , and follows a geometric distribution . This mechanism is similar in spirit to how the recently proposed loopless variants of SVRG ( Hofmann et al. , 2015 ; Kovalev et al. , 2020 ) work in comparison with the original SVRG ( Johnson & Zhang , 2013a ; Xiao & Zhang , 2014 ) . Once the penalty is sampled by our method , the resultant SGD step can be interpreted as the execution of an aggregation step . In contrast with standard aggregation , which performs full averaging of the local models , our method merely takes a step towards averaging . However , the step is relatively large . Convergence theory . By adapting the general theory from ( Gower et al. , 2019 ) to our setting , we obtain theoretical convergence guarantees assuming that each fi is L-smooth and µ-strongly convex ( see Thm . 4.2 ) . Interestingly , by optimizing the probability of sampling the penalty ( we get p ? = λλ+L ) , which is an indirect way of fixing the expected number of local steps to 1+ L λ , we prove an 2λλ+L L µ log 1 ε bound on the expected number of communication rounds ( see Cor . 4.3 ) . We believe that this is remarkable in several ways . By choosing λ small , we tilt our goal towards pure local models : the number of communication rounds is tending to 0 as λ→ 0 . If λ→∞ , the solution our formulation converges to is the optimal global model , and L2GD obtains the communication bound O ( L µ log 1 ε ) , which matches the efficiency of GD . What problem do local methods solve ? Noting that L2GD is a ( mildly nonstandard ) version of LGD,3 which is a key method most local methods for FL are based on , and noting that , as we show , L2GD solves our new formulation of FL , we offer a new and surprising interpretation of the role of local steps in FL . In particular , the role of local steps in gradient type methods , such as GD , is not to reduce communication complexity , as is generally believed . Indeed , there is no theoretical result supporting this claim in the key heterogeneous data regime . Instead , their role is to steer the method towards finding a mixture of the traditional global and the purely local models . Given that the stepsize is fixed , the more local steps are taken , the more we bias the method towards the purely local models . Our new optimization formulation of FL formalizes this as it defines the problem that local methods , in this case L2GD , solve . There is an added benefit here : the more we want our formulation to be biased towards purely local models ( i.e. , the smaller the penalty parameter λ is ) , the more local steps does L2GD take , and the better the total communication complexity of L2GD becomes . Hence , despite a lot of research on this topic , our paper provides the first proof that a local method ( e.g. , L2GD ) can be better than its non-local counterpart ( e.g. , GD ) in terms of total communication complexity in the heterogeneous data setting . We are able to do this by noting that local methods should better be seen as methods for solving the new FL formulation proposed here . Generalizations : partial participation , local SGD and variance reduction . We further generalize and improve our method by allowing for ( i ) stochastic partial participation of devices in each communication round , ( ii ) subsampling on each device which means we can perform local SGD steps 2The connection of FL and multi-task meta learning is discussed in ( Kairouz et al. , 2019 ) , for example . 3To be specific , L2GD is equivalent to Overlap LGD ( Wang et al. , 2020 ) with random local loop size . instead of local GD steps , and ( iii ) total variance reduction mechanism to tackle the variance coming from three sources : locality of the updates induced by non-uniform sampling ( already present in L2GD ) , partial participation and local subsampling . Due to its level of generality , this method , which we call L2SGD++ , is presented in the Appendix only , alongside the associated complexity results . In the main body of this paper , we instead present a simplified version thereof , which we call L2SGD+ ( Algorithm 3 ) . The convergence theory for it is presented in Thm . 5.1 and Cor . 5.2 . Heterogeneous data . All our methods and convergence results allow for fully heterogeneous data and do not depend on any assumptions on data similarity across the devices . Superior empirical performance . We show through ample numerical experiments that our theoretical predictions can be observed in practice .
of the paper: The paper proposes a new formulation for the federated learning problem, in which each agent has its local model, and a penalty term is added to the objective function to control the deviation of these local models from their average. Next, the authors develop a randomized algorithm to tackle this problem and characterize its convergence under several assumptions, such as smoothness and strong convexity. They also discuss variants of their algorithm, which uses variance reduction techniques or considers users' partial participation.
SP:f2ba6d73cecdf611e6f58c93fb88e9f3dbe3bb24
Neuron Activation Analysis for Multi-Joint Robot Reinforcement Learning
1 INTRODUCTION . Convolutional Neural Networks ( CNN ) are well known to demonstrate a strong general feature extraction capability in lower network layers . In these networks feature kernels can not only be visualized , pre-trained general feature extractors can also be reused for efficient network learning . Recent examples propose efficient reusability experimentally for Reinforcement Learning neural networks as well : Networks are pre-trained on similar tasks and continued learning for the goal application . Reusing ( sub ) networks that can be re-assembled for an application never seen before can reduce network training time drastically . A better understanding of uniform or inhomogeneous network structures also improves the evaluation of network performance as well unveils opportunities for the interpretability of networks which is crucial for the application of machine learning algorithms e.g . in industrial scenarios . Finally , methodologies and metrics estimating network intrinsic and inter correlations in artificial neural networks may also enhance the understanding of biological learning . Eickenberg et al . ( 2017 ) could recently demonstrate that layers serving as feature extractors in CNNs could actually be found in the Human Visual Cortex by correlating artificial networks to biological recordings . Successful experiments to re-use end-to-end learned networks for similar tasks leave open whether such networks also self-organize feature extractors or in a dynamical domain motion primitives . Here , we analyze neuron activation in networks in order to investigate activation distribution and mapping between different networks trained on similar robot reaching tasks . In this paper we consider a standard vertical space robot manipulator with variable number of revolute joints as the test setup for target reaching end-to-end Reinforcement Learning ( RL ) experiments . We introduce metrics applied to evaluate individual neuron activation over time and compare activity within individual networks all-to-all ( every neuron is correlated to any other neurons in the network ) and layer wise ( only correlations between networks on the same layer are inspected ) . These metrics are utilized to set up a pruning procedure to maximize the information density in learned neural networks and reduce redundancy as well as unused network nodes . Exploiting these optimization procedure we learn various neural networks with variable dimensions on robot manipulators with two to four joints , representing two to four Degrees of Freedom ( DOF ) . in order to analyze similarities between network activation patterns . As a result we demonstrate experimentally that the introduced pruning process reduces the network size efficiently keeping performance loss in bounds and hereby builds a valid basis for network analysis . We show that the networks trained and iteratively pruned on the robot manipulators form distinct neuron activation . Analyzing neuron activation correlations between different networks of various sizes , mappings between neurons trained on different manipulators can be found . A layer wise interpretation reveals that networks trained for same tasks build similar structures , but we can also discover partially similar structures between networks trained on 3 and 4 joint manipulators . 2 RELATED WORK . The apability of feature extraction in CNNs , alongside with a variety of analysis and visualization tools , serves as a motivation for this work on training , analysis and pruning for networks trained with RL . Analysis methods for CNNs reach from regional based methods , e.g . image occlusion Zeiler & Fergus ( 2014 ) , that aim to expose the region of an image most relevant for classification , to feature based methods , e.g . deconvolution Zeiler & Fergus ( 2014 ) or guided backpropagation Selvaraju et al . ( 2017 ) . Methods combining the described techniques are for example introduced as Grad-CAM in Springenberg et al . ( 2014 ) . These networks demonstrate class discrimination for features of deeper network layers ( Zeiler & Fergus ( 2014 ) ) as a basis to apply such general feature extractors to different applications after pre-training . Pre-trained networks such as ResNet He et al . ( 2016 ) , which has been trained on the ImageNet1 data set , speed up training drastically by initializing CNNs applied for similar tasks . Kopuklu2019 demonstrated that even reusing individual layers in the same network can lead to a performance increase . Recent advances pushed RL agents to reach super human performance in playing Atari video games Bellemare et al . ( 2013 ) Mnih et al . ( 2015 ) , Chess Silver et al . ( 2017 ) and Go Silver et al . ( 2016 ) . These results were extended to cope with continuous action spaces in e.g . Lillicrap et al . ( 2015 ) and demonstrated great performance on highly dynamic multi-actuated locomotion learning tasks such as demonstrated in the NIPS 2017 Learning to Run challenge Kidziński et al . ( 2018 ) . Vuong et al . ( 2019 ) and Eramo et al . ( 2020 ) demonstrate experimentally that knowledge learned by a neural network can be reused for other tasks in order to speed up training and hereby translate modularity concepts from CNNs to RL frameworks . Hierarchical Reinforcement Learning incorporates these ideas , utilizing the concept of subtask solving into neural networks e.g . in Andreas et al . ( 2016 ) for question answering . A successful example of transfer learning to build up a general knowledge base could be demonstrated with RL in Atari games in Parisotto et al . ( 2016 ) . Gaier & Ha ( 2019 ) emphasizes the importance of neural architectures that can perform well even without weight learning . With a main motivation to improve learning efficiency and reduce computational requirements , network pruning is introduced for various network architectures . Early work in LeCun et al . ( 1990 ) utilizes second derivative information as a heuristic to decrease network size , recent work in Livne & Cohen ( 2020 ) introduces network pruning for Deep Reinforcement Learning based on redundancy detection in an iterative process . Li et al . ( 2018 ) 3 EXPERIMENTAL SETUP . In this paper we focus on a robot manipulator with operation limited to a vertical plane . A neural network is trained with end-to-end Reinforcement Learning in order to reach predefined locations in 2D space without prior knowledge of neither robot dynamics nor the environment . Hereby , end-toend refers to a mapping from sensory feedback in terms actual joint positions in cartesian space and the desired goal location to output actions as joint position commands . We apply Deep q-learning , as proposed in Mnih et al . ( 2015 ) , to predict q-values , an action is selected by means to the softmax exploration policy and Gradient descent of the networks weights is handled by the Adam Solver Kingma & Ba ( 2014 ) . For performance reasons our experiments are executed within a simplified simulation environment as shown conceptually in Figure 1 ( right ) , but exemplary behaviors have been successfully trans- ferred to a realistic robotic simulation ( Figure 1 left ) . We simulate robots with 2 to 4 DOF that are implemented as revolute joints restricted to vertical space motions and actuated with PID position controllers . For all experiments , the neural networks originally consist of 6 fully connected hidden layers with ReLU activation functions , but may be reduced in the pruning process we introduce . The network input vector x encodes actual robot joint angles θ̂i as their sine and cosine contribution for every control step t ( control cycle time of 50ms ) as well as the desired goal position in cartesian coordinates [ x∗ , y∗ ] as x ( t ) = [ sin ( θ̂ ( t ) 1 ) cos ( θ̂ ( t ) 1 ) ... sin ( θ̂ ( t ) n ) cos ( θ̂ ( t ) n ) x∗ y∗ ] T . ( 1 ) The output layer contains 3n neurons as the action of every individual joint i is quantized into the three change of motion states { 1 , −1 , 0 } as forward , backward and no motion for each joint with joint angle changes of±0.05rad . The goal state of an agent is a randomly instantiated 2D location to be reached with the robot finger tip in max . 60 control steps , each representing 50ms . The distance between the goal position p∗ and the tip p̂ is mapped into [ 0 , 1 ] and squared to serve as the reward function r ( ti ) : = ( 1 |p̂ ( ti ) −p∗|L2+1 ) 2 . All network results that are presented passed a validation test consisting of 300 test episodes . This test also serves as the pruning baseline : The probability of a type two error for reaching the final reward threshold r̄ = 0.9 with an accuracy ρ̄ = 0.9 lies bellow significance α = 0.05 on the test data . 4 NEURON ACTIVATION ANALYSIS . We first analyze individual neuron activation inside multiple neural networks trained on the introduced target reaching robotic manipulator . This initial analysis servers as a baseline for pruning and projection evaluation , therefore we study only 3 joint robotic manipulators in depth before we investigate a comparison of different kinematic structures . We define a distance metric between neurons that is based on the neuron activation history in scope of every episode in order to account for the dynamics in motion trajectory learning . All neuron activation values over the course of an episode are collected in a vector z ( E ) ni for every neuron ni of the network in Episode E. Utilizing the linearity of applied ReLU activation functions we normalize this activation in range [ 0 , 1 ] in reference to the maximum value attained . For a set of sample episodes E , representing a set of potential robot actions , we define the distance of neurons ni and nj as d ( ni , nj ) : = 1 |E| ∑ E∈E ∣∣∣∣∣z ( E ) niZni − z ( E ) nj Znj ∣∣∣∣∣ L2 , ( 2 ) with z ( E ) ni ∈ RT≥0 denoting the vector containing activation series of neuron ni in episode E and Zni ∈ R > 0 the maximum activation of ni in all episodes E . For a layer wise analysis Equation 2 is adapted accordingly , only considering distances to neurons that belong to the same layer . The upper triangular matrix of a distance matrix D holds all values d ( ni , nj ) with i ? = j . The density distribution of neuron distances can be approximated by collecting all values in the upper triangular matrices of D. Additionally , hierarchical clustering as described in Hastie et al . ( 2009 ) is applied to individual network layers in order to reveal neuron groups that show similar activation behavior . We form groups that minimize the mean cluster distance D ( Cl ) of contained neurons as D ( Cl ) : = 1 |Cl| ( |Cl| − 1 ) ∑ nil∈Cl ∑ njl∈Cl\ { nil } d ( nil , njl ) . ( 3 ) for neuron cluster C of layer l. We conduct an experiment with a set of M = 20 networks ( 48 neurons per hidden layer ) , for the three joint manipulation task . A reference set of untrained networks with identical structure is initialized by Xavier initialization Glorot & Bengio ( 2010 ) . Neuron distances are averaged from a set ofm = 500 sample episodes . The distance distribution in randomized networks forms a bell-shaped distribution globally as well as layer wise ( Figure 2 , top ) . However , the all-to-all distribution of trained networks primarily indicate a lower standard deviation and mean compared to random networks , with a slight distortion at high distances . Layer-wise analysis reveals that these higher distance scores occur increasingly on network layers closer to the output , in particular in the second half of layers . In contrast , lower layers demonstrate close to normal distributions . Clustering reveals a variety in distances for all layers in untrained randomly initialized networks ( Figure 2 bottom ) which is kept on the first layer only in trained networks . In particular on the middle layers clusters with low distances emerge during training . The intrinsic network analysis depicts successful training that visibly changes the neuron activation characteristics which highly depends on the location inside the network .
The paper presents a technique to compare networks trained to solve similar tasks trained in different context. The considered task is reaching with a robotic planar arm; the considered context is varied varying the robot degrees of freedom. The goal of the paper is to find correlations across neural activity patterns across networks trained to solve the same task in different contexts.
SP:df2c981f4cfc3734e8f42c4e84368e90d931529b
Adaptive Personalized Federated Learning
1 INTRODUCTION . With the massive amount of data generated by the proliferation of mobile devices and the internet of things ( IoT ) , coupled with concerns over sharing private information , collaborative machine learning and the use of federated optimization ( FO ) is often crucial for the deployment of large-scale machine learning ( McMahan et al. , 2017 ; Kairouz et al. , 2019 ; Li et al. , 2020b ) . In FO , the ultimate goal is to learn a global model that achieves uniformly good performance over almost all participating clients without sharing raw data . To achieve this goal , most of the existing methods pursue the following procedure to learn a global model : ( i ) a subset of clients participating in the training is chosen at each round and receive the current copy of the global model ; ( ii ) each chosen client updates the local version of the global model using its own local data , ( iii ) the server aggregates over the obtained local models to update the global model , and this process continues until convergence ( McMahan et al. , 2017 ; Mohri et al. , 2019 ; Karimireddy et al. , 2019 ; Pillutla et al. , 2019 ) . Most notably , FedAvg by McMahan et al . ( 2017 ) uses averaging as its aggregation method over local models . Due to inherent diversity among local data shards and highly non-IID distribution of the data across clients , FedAvg is hugely sensitive to its hyperparameters , and as a result , does not benefit from a favorable convergence guarantee ( Li et al. , 2020c ) . In Karimireddy et al . ( 2019 ) , authors argue that if these hyperparameters are not carefully tuned , it will result in the divergence of FedAvg , as local models may drift significantly from each other . Therefore , in the presence of statistical data heterogeneity , the global model might not generalize well on the local data of each client individually ( Jiang et al. , 2019 ) . This is even more crucial in fairness-critical systems such as medical diagnosis ( Li & Wang , 2019 ) , where poor performance on local clients could result in damaging consequences . This problem is exacerbated even further as the diversity among local data of different clients is growing . To better illustrate this fact , we ran a simple experiment on MNIST dataset where each client ’ s local training data is sampled from a subset of classes to simulate heterogeneity . Obviously , when each client has samples from less number of classes of training data , the heterogeneity among them will be high and if each of them has samples from all classes , the distribution of their local training data becomes almost identical , and thus heterogeneity will be low . The results of this experiment are depicted in Figure 1 , where the generalization and training losses of the global models of the FedAvg ( McMahan et al. , 2017 ) and SCAFFOLD ( Karimireddy et al. , 2019 ) on local data diverge when the diversity among different clients ’ data increases . This observation illustrates that solely optimizing for the global model ’ s accuracy leads to a poor generalization of local clients . To embrace statistical heterogeneity and mitigate the effect of negative transfer , it is necessary to integrate the personalization into learning instead of finding a single consensus predictor . This pluralistic solution for FO has recently resulted in significant research in personalized learning schemes ( Eichner et al. , 2019 ; Smith et al. , 2017 ; Dinh et al. , 2020 ; Mansour et al. , 2020 ; Fallah et al. , 2020 ; Li et al. , 2020a ) . To balance the trade-off between the benefit from collaboration with other users and the disadvantage from the statistical heterogeneity among different users ’ domains , in this paper , we propose an adaptive personalized federated learning ( APFL ) algorithm which aims to learn a personalized model for each device that is a mixture of optimal local and global models . We theoretically analyze the generalization ability of the personalized model on local distributions , with dependency on mixing parameter , the divergence between local and global distributions , as well as the number of local and global training data . To learn the personalized model , we propose a communication efficient optimization algorithm that adaptively learns the model by leveraging the relatedness between local and global models as learning proceeds . As it is shown in Figure 1 , by progressively increasing the diversity , the personalized model found by the proposed algorithm demonstrates a better generalization compared to the global models learned by FedAvg and SCAFFOLD . We supplement our theoretical findings with extensive corroborating experimental results that demonstrate the superiority of the proposed personalization schema over the global and localized models of commonly used federated learning algorithms . 2 PERSONALIZED FEDERATED LEARNING . In this section , we propose a personalization approach for federated learning and analyze its statistical properties . Following the statistical learning theory , in a federated learning setting each client has access to its own data distributionDi on domain Ξ : = X×Y , whereX ∈ Rd is the input domain and Y is the label domain . For any hypothesis h ∈ H the loss function is defined as ` : H×Ξ→ R+ . The true risk at local distribution is denoted by LDi ( h ) = E ( x , y ) ∼Di [ ` ( h ( x ) , y ) ] . We use L̂Di ( h ) to denote the empirical risk of h on distribution Di . We use D̄ = ( 1/n ) ∑n i=1Di to denote the average distribution over all clients . 2.1 PERSONALIZED MODEL . In a standard federated learning scenario , where the goal is to learn a global model for all devices cooperatively , the learned global model obtained by minimizing the joint empirical distribution D̄ , i.e. , minh∈H L̂D̄ ( h ) by proper weighting . However , as alluded to before , a single consensus predictor may not perfectly generalize on local distributions when the heterogeneity among local data shards is high ( i.e. , the global and local optimal models drift significantly ) . Meanwhile , from the local user perspective , the key incentive to participate in “ federated ” learning is the desire to seek a reduction in the local generalization error with the help of other users ’ data . In this case , the ideal situation would be that the user can utilize the information from the global model to compensate for the small number of local training data while minimizing the negative transfer induced by heterogeneity among distributions . This motivates us to mix the global model and local model with a controllable weight as a joint prediction model , namely , the personalized model . Here we formally introduce our proposed adaptive personalized learning schema , where the goal is to find the optimal combination of the global and the local models , in order to achieve a better client-specific model . In this setting , global server still tries to train the global model by minimizing the empirical risk on the aggregated domain D̄ , i.e. , h̄∗ = arg minh∈H L̂D̄ ( h ) , while each user trains a local model while partially incorporating the global model , with some mixing weight αi , i.e. , ĥ∗loc , i = arg minh∈H L̂Di ( αih + ( 1 − αi ) h̄∗ ) . Finally , the personalized model for ith client is a convex combination of h̄∗ and ĥ∗loc , i : hαi = αiĥ ∗ loc , i + ( 1− αi ) h̄∗ , ( 1 ) It is worth mentioning that , hαi is not necessarily the minimizer of empirical risk L̂Di ( · ) , because we optimize ĥ∗loc , i with partially incorporating the global model . Example 1 . Let us illustrate a simple situation where mixed model does not necessarily coincide with local ERM model . To this end , consider a setting where the hypothesis class H is the set of all vectors in R2 , lying in ` 2 unit ball : H = { h ∈ R2 : ‖h‖2 ≤ 1 } . Assume the local empirical minimizer is known to be [ 1 , 0 ] > , and h̄∗ = [ −1 , 0 ] > , and α is set to be 0.5 . Now , if we wish to find a ĥ ∗ loc , i , such that hαi = α ∗ ĥ ∗ loc , i + ( 1 − α ) ∗ h̄ ∗ coincides with local empirical minimizer , we have to solve : 0.5∗h+0.5∗ [ −1 , 0 ] > = [ 1 , 0 ] > , subject to ‖h‖2 ≤ 1 . This equation has no feasible solution , implying that it is not necessarily true that hαi coincides with local empirical minimizer . In fact , in most cases , as we will show in the convergence of the proposed algorithm , hαi will incur a residual risk if evaluated on the training set drawn from Di . 2.2 GENERALIZATION GUARANTEES . We now characterize the generalization of the mixed model . We present the learning bounds for classification and regression tasks . For classification , we consider a binary classification task , with squared hinge loss ` ( h ( x ) , y ) = ( max { 0 , 1− yh ( x ) } ) 2 . In the regression task , we consider the MSE loss ` ( h ( x ) , y ) = ( h ( x ) − y ) 2 . Even though we present learning bounds under these two loss functions , our analysis can be generalized to any convex smooth loss . Before formally presenting the generalization bound , we introduce the following quantity to measure the empirical complexity of a hypothesis classH over a training set S. Definition 1 . Let S be a fixed set of samples and consider a hypothesis class H. The worst case disagreement between a pair of models measured by absolute loss is quantified by : λH ( S ) = suph , h′∈H 1 |S| ∑ ( x , y ) ∈S |h ( x ) − h′ ( x ) | . The empirical discrepancy characterizes the complexity of hypothesis class over some finite set . The similar concepts are also employed in the related multiple source PAC learning or domain adaption ( Kifer et al. , 2004 ; Mansour et al. , 2009 ; Ben-David et al. , 2010 ; Konstantinov et al. , 2020 ; Zhang et al. , 2020 ) . We now state the main result on the generalization of the proposed personalization schema . The proof of the theorem is provided in Appendix D. Theorem 1 . Let hypothesis classH be compact closed set with finite VC dimension d. Assume loss function ` is Lipschitz continuous with constant G , and bounded in [ 0 , B ] . Then with probability at least 1−δ , there exists a constantC , such that the risk of the mixed model hαi = αiĥ∗loc , i+ ( 1−αi ) h̄∗ on the ith local distribution Di is bounded by : LDi ( hαi ) ≤ 2α2i LDi ( h∗i ) + 2C √ d+ log ( 1/δ ) mi +GλH ( Si ) + 2 ( 1− αi ) 2 ( L̂D̄ ( h̄∗ ) +B‖D̄ − Di‖1 + C √ d+ log ( 1/δ ) m ) , ( 2 ) wheremi , i = 1 , 2 , . . . , n is the number of training data at ith user , m = m1 + . . .+mn is the total number of all data , Si to be the local training set drawn from Di , ‖D̄ − Di‖1 = ∫ Ξ |P ( x , y ) ∼D̄ − P ( x , y ) ∼Di |dxdy , is the difference between distributions D̄ and Di , and h∗i = arg minh∈H LDi ( h ) . Remark 1 . We note that a very analogous work to ours is Mansour et al . ( 2020 ) , where a generalization bound is provided for mixing global and local models . However , their bound does not depend on αi , and hence we can not see how it impacts the generalization ability . In Theorem 1 , by omitting constant terms , we observe that the generalization risk of hαi on Di mainly depends on three key quantities : i ) m : the number of global data drawn from D̄ , ii ) divergence between distributions D̄ andDi , and iii ) mi : the amount of local data drawn fromDi . Usually , the first quantity m , the amount of global data is fairly large compared to individual users , so global model usually has a better generalization . The second quantity characterizes the data heterogeneity between the average distribution and ith local distribution . If this divergence is too high , then the global model may hurt the local generalization . For the third quantity , as amount of local data mi is often small , the generalization performance of local model can be poor . Optimal mixing parameter . We can also find the optimal mixing parameter α∗i that minimizes generalization bound in Theorem 1 . Notice that the RHS of ( 2 ) is quadratic in αi , so it admits a minimum value at α∗i = ( L̂D̄ ( h̄∗ ) +B‖D̄ − Di‖1 + C √ d+log ( 1/δ ) m ) ( L̂D̄ ( h̄∗ ) +B‖D̄ − Di‖1 + C √ d+log ( 1/δ ) m ) + ( LDi ( h∗i ) + 2C √ d+log ( 1/δ ) mi +GλH ( Si ) ) . The optimal mixture parameter is strictly bounded in [ 0 , 1 ] , which matches our intuition . If the divergence term is large , then the value becomes close to 1 , which implies if local distribution drifts too much from average distribution , it is preferable to take more local models . If mi is small , this value will be negligible , indicating that we need to mix more of the global model into the personalized model . Conversely , if mi is large , then this term will be again roughly 1 , which means taking the majority of local model will give the desired generalization performance .
This paper studies the personalization aspect of the federated learning problem. The authors propose a new framework in which they replace the common global model in the original federated learning formulation with a convex combination of the global model and a local model. They later introduce an adaptive optimization algorithm for their formulation and provide generalization bounds as well as convergence guarantees for both strongly-convex and nonconvex settings. Finally, numerical experiments and comparison with other methods in the literature are provided to support the theoretical results.
SP:bdb67d79c8c71ff8761649620a110bd8ff2353fe
Topology-Aware Segmentation Using Discrete Morse Theory
1 INTRODUCTION . Segmenting objects while preserving their global structure is a challenging yet important problem . Various methods have been proposed to encourage neural networks to preserve fine details of objects ( Long et al. , 2015 ; He et al. , 2017 ; Chen et al. , 2014 ; 2018 ; 2017 ) . Despite their high per-pixel accuracy , most of them are still prone to structural errors , such as missing small object instances , breaking thin connections , and leaving holes in membranes . These structural errors can significantly damage downstream analysis . For example , in the segmentation of biomedical structures such as membranes and vessels , small pixel errors at a junction will induce significant structure error , leading to catastrophic functional mistakes . See Fig . 1 for an illustration . Topology is a very global characterization that needs a lot of observations to learn . Any training set is insufficient in teaching the network to correctly reason about topology , especially near challenging spots , e.g. , blurred membrane locations or weak vessel connections . A neural network tends to learn from the clean-cut cases and converge quickly . Meanwhile , topologically-challenging locations remain mis-classified , causing structural/topological errors . We note that this issue can not be alleviated even with more annotated ( yet still unbalanced ) images . We propose a novel approach that identifies critical topological structures during training and teaches a neural network to learn from these structures . Our method can produce segmentations with correct topology , i.e. , having the same Betti number ( i.e. , number of connected components and handles/tunnels ) as the ground truth . Underlying our method is the classic Morse theory ( Milnor , 1963 ) , which captures singularities of the gradient vector field of the likelihood function . Intuitively speaking , we treat the likelihood as a terrain function and Morse theory helps us capture terrain structures such as ridges and valleys . See Fig . 1 for an illustration . These structures , composed of 1D and 2D manifold pieces , reveal the topological information captured by the ( potentially noisy ) likelihood function . We consider these Morse structures as topologically critical ; they encompass all potential skeletons of the object . We propose a new loss that identifies these structures and enforce higher penalty along them . This way , we effectively address the sampling bias issue and ensure that the networks predict correctly near these topologically difficult locations . Since the Morse structures are identified based ∗Email : Xiaoling Hu ( xiaolhu @ cs.stonybrook.edu ) . on the ( potentially noisy ) likelihood function , they can be both false negatives ( a structure can be a true structure but was missed in the segmentation ) and false positives ( a hallucination of the model and should be removed ) . Our loss ensures that both kinds of structural mistakes are corrected . Several technical challenges need to be addressed . First , classical Morse theory was defined for smooth functions on continuous domains . Computing the Morse structures can be expensive and numerically unstable . Furthermore , the entire set of Morse structures may include an excessive amount of structures , a large portion of which can be noisy , irrelevant ones . To address these challenges , we use the discrete version of Morse theory by Forman ( 1998 ; 2002 ) . For efficiency purposes , we also use an approximation algorithm to compute 2D Morse structures with almost linear time . The idea is to compute zero dimensional Morse structures of the dual image , which boils down to a minimum spanning tree computation . Finally , we use the theory of persistent homology ( Edelsbrunner et al. , 2000 ; Edelsbrunner & Harer , 2010 ) to prune spurious Morse structures that are not relevant . Our discrete-Morse-theory based loss , called the DMT-loss , can be evaluated efficiently and can effectively train the neural network to achieve high performance in both topological accuracy and per-pixel accuracy . Our method outperforms state-of-the-art methods in multiple topology-relevant metrics ( e.g. , ARI and VOI ) on various 2D and 3D benchmarks . It has superior performance in the Betti number error , which is an exact measurement of the topological fidelity of the segmentation . Related work . Closely related to our method are recent works on persistent-homology-based losses ( Hu et al. , 2019 ; Clough et al. , 2019 ) . These methods identify a set of critical points of the likelihood function , e.g. , saddles and extrema , as topologically critical locations for the neural network to memorize . However , only identifying a sparse set of critical points at every epoch is inefficient in terms of training . Instead , our method identifies a much bigger set of critical locations at each epoch , i.e. , 1D or 2D Morse skeletons ( curves and patches ) . This is beneficial in both training efficiency and model performance . Extending the critical location sets from points to 1D curves and 2D patches makes it much more efficient in training . Compared with TopoLoss ( Hu et al. , 2019 ) , we observe a 3-time speedup in practice . Furthermore , by focusing on more critical locations early , our method is more likely to escape poor local minima of the loss landscape . Thus it achieves better topological accuracy than TopoLoss . The shorter training time may also contribute to better stability of the SGD algorithm , and thus better test accuracy ( Hardt et al. , 2016 ) . Another topology-aware loss ( Mosinska et al. , 2018 ) uses pretrained filters to detect broken connections . However , this method can not be generalized to unobserved geometry and higher dimensional topology ( loops and voids ) . We also refer to other existing work on topological features and their applications ( Adams et al. , 2017 ; Reininghaus et al. , 2015 ; Kusano et al. , 2016 ; Carriere et al. , 2017 ; Ni et al. , 2017 ; Wu et al. , 2017 ) . Deep neural networks have also been proposed to learn from topological features directly extracted from data ( Hofer et al. , 2017 ; Carrière et al. , 2019 ) . Persistent-homology-inspired objective functions have been proposed for graphics ( Poulenard et al. , 2018 ) machine learning ( Chen et al. , 2019 ; Hofer et al. , 2019 ) . Discrete Morse theory has been used to identify skeleton structures from images ; e.g. , ( Delgado-Friedrichs et al. , 2015 ; Robins et al. , 2011 ; Wang et al. , 2015 ) . The resulting 1D Morse structure has been used to enhance neural network architecture : e.g. , in ( Dey et al. , 2019 ) it is used to both pre- and post-process images , while in ( Banerjee et al. , 2020 ) , the 1D Morse skeleton is used as a topological prior ( part of input ) for an encoder-decoder deep network for semantic segmentation of microscopic neuroanatomical data . Our work , in contrast , uses Morse structures ( beyond 1D ) of the output to strengthen the global structural signal more explicitly in an end-to-end training of a network . Many methods have leveraged the power of deep neural networks ( Ronneberger et al. , 2015 ; Long et al. , 2015 ; Badrinarayanan et al. , 2017 ; Ding et al. , 2019 ; Kervadec et al. , 2019 ; Karimi & Salcudean , 2019 ; Mosinska et al. , 2018 ) for fine-scale structure segmentation . One may also enforce connectivity constraints when postprocessing the likelihood map ( Han et al. , 2003 ; Le Guyader & Vese , 2008 ; Sundaramoorthi & Yezzi , 2007 ; Ségonne , 2008 ; Wu et al. , 2017 ; Gao et al. , 2013 ; Vicente et al. , 2008 ; Nowozin & Lampert , 2009 ; Zeng et al. , 2008 ; Chen et al. , 2011 ; Andres et al. , 2011 ; Stuhmer et al. , 2013 ; Oswald et al. , 2014 ; Estrada et al. , 2014 ) . However , when the deep neural network itself is topology-agnostic , the likelihood map may be fundamentally flawed and can not be salvaged topologically . Specific to neuron image segmentation , some methods ( Funke et al. , 2017 ; Turaga et al. , 2009 ; Januszewski et al. , 2018 ; Uzunbas et al. , 2016 ; Ye et al. , 2019 ) directly find neuron regions instead of their boundary/membranes . These methods can not be generalized to other types of data such as satellite images , retinal images , vessel images , etc . 2 METHOD . We propose a novel loss to train a topology-aware network end-to-end . It uses global structures captured by discrete Morse theory ( DMT ) to discover critical topological structures . In particular , through the language of 1- and 2-stable manifolds , DMT helps identify 1D skeletons or 2D sheets ( separating 3D regions ) that may be critical for structural accuracy . These Morse structures are used to define a DMT-loss that is essentially the cross-entropy loss constrained to these topologically critical structures . As the training continues , the neural network learns to better predict around these critical structures , and eventually achieves better topological accuracy . Please refer to Fig . 2 for an overview of our method . 2.1 MORSE THEORY . Morse theory ( Milnor , 1963 ) identifies topologically critical structures from a likelihood map ( Fig . 3 ( a ) ) . In particular , it views the likelihood as a terrain function ( Fig . 3 ( b ) ) and extracts its landscape features such as mountain ridges and their high-dimensional counterparts . The broken connection in the likelihood map corresponds to a local dip in the mountain ridge of the terrain in Fig . 3 ( b ) and Fig . 3 ( c ) . The bottom of this dip is captured by a so-called saddle point ( S in Fig . 3 ( c ) ) of the likelihood map . The mountain ridge connected to this bottom point captures the main part of missing pixels . Such “ mountain ridges ” can be captured by the so-called stable manifold w.r.t . the saddle point using the language of Morse theory . By finding the saddle points and the stable manifold of the saddle points on the likelihood map , we can ensure the model learns to “ correctly ” handle pixels near these structures . We note that an analogous scenario can also happen with such 1D signals ( such as blood vessels ) as well as 2D signals ( such as membranes of cells ) in 3D images – they can also be captured by saddles ( of different indices ) and their stable manifolds . In this paper , we focus on the application of segmenting 2D and 3D images . Specifically , suppose we have a smooth function f : Rd → R to model the likelihood ( density ) map . Given any point x ∈ Rd , the negative gradient −∇f ( x ) = − [ ∂f∂x1 , ∂f ∂x2 , . . . , ∂f∂xd ] T indicates the steepest descending direction of f . A point x = ( x1 , x2 , . . . , xk ) is critical if the function gradient at this point vanishes ( i.e. , ∇f ( x ) = 0 ) . For a well-behaved function ( more formally , called Morse function ) defined on Rd , a critical point could be a minimum , a maximum , or d− 1 types of saddle points . See Fig . 3 ( c ) for an example . For d = 2 , there is only one saddle point type . For d = 3 , there are two saddle point types , referred to as index-1 and index-2 saddles . Formally , when taking the eigen-values of the Hessian matrix at a critical point , its index is equal to the number of negative eigenvalues . Intuitively , imagine we put a drop of water on the graph of f ( i.e , the terrain in Fig . 3 ( b ) ) at the lift of x onto this terrain , then −∇f ( x ) indicates the direction along which the water will flow down . If we track the trajectory of this water drop as it flows down , this gives rise to a so-called integral line ( a flow line ) . Such flow lines can only start and end at critical points1 , where the gradient vanishes . The stable manifold S ( p ) of a critical point p is defined as the collection of points whose flow line ends at p. For a 2D function f : R2 → R , for a saddle q , its stable manifold S ( q ) starts from local maxima ( mountain peaks in the terrain ) and ends at q , tracing out the mountain ridges separating different valleys ( Fig . 3 ( c ) ) . The stable manifold S ( p ) of a minimum p , on the other hand , corresponds to the entire valley around this minimum p. See the valley point V and its corresponding stable field in Fig . 3 ( c ) . For a 3D function f : R3 → R , the stable manifold w.r.t . an index-2 saddle connects mountain peaks to saddles , tracing 1D mountain ridges as in the case of a 2D function . The stable manifold w.r.t . an index-1 saddle q consists of flow lines starting at index-2 saddles and ending at q . Their union , called the 2-stable manifold of f , consists of a collection of 2-manifold pieces . These stable manifolds indicate important topological structures ( graph-like or sheet-like ) based on the likelihood of the current neural network . Using these structures , we will propose a novel loss ( Sec . 2.3 ) to improve the topological awareness of the model . In practice , for images , we will leverage the discrete version of Morse theory for both numerical stability and easier simplification . Discrete Morse theory . Due to space limitations , we briefly explain discrete Morse theory , leaving technical details to Appendix A.2.1 . We view a d-dimensional image , d = 2 or 3 , as a d-dimensional cubical complex , meaning it consists of 0- , 1- , 2- and 3-dimensional cells corresponding to vertices ( pixels/voxels ) , edges , squares , and cubes as its building blocks . Discrete Morse theory ( DMT ) , originally introduced in ( Forman , 1998 ; 2002 ) , is a combinatorial version of Morse theory for general cell complexes . In this setting , the analog of a gradient vector is a pair of adjacent cells , called discrete gradient vectors . The analog of an integral line ( flow line ) is a sequence of such cell-pairs ( discrete gradient vectors ) , forming a so-called V-path . Critical points correspond to critical cells which do not participate in any discrete gradient vectors . A minimum , an index-1 saddle , an index-2 saddle and a maximum for a 3D domain intuitively correspond to a critical vertex , a critical edge , a critical square and a critical cube respectively . A 1-stable manifold in 2D will correspond to a V-path , i.e. , a sequence of cells , connecting a critical square ( a maximum ) and a critical edge ( a saddle ) . See Fig . 3 ( c ) for an illustration . In 3D , it will be a V-path connecting a critical cube and a critical square . 1More precisely , flow lines only tend to critical points in the limit and never reach them .
The paper focus on the segmentation of images in which the correct topology of the segmentation an important role plays. The key idea of the paper is the use of Discrete Morse Theory to identify those areas of the segmentation/likelihood map that are important for ensuring the correct topology of the segmentation. This is achieved by modulating the normal binary cross entropy loss function so that areas of Morse structures are focused on during the learning.
SP:8c67767eb8c691157f0807c4c8393749b78bdf47
Decoupling Representation Learning from Reinforcement Learning
In an effort to overcome limitations of reward-driven feature learning in deep reinforcement learning ( RL ) from images , we propose decoupling representation learning from policy learning . To this end , we introduce a new unsupervised learning ( UL ) task , called Augmented Temporal Contrast ( ATC ) , which trains a convolutional encoder to associate pairs of observations separated by a short time difference , under image augmentations and using a contrastive loss . In online RL experiments , we show that training the encoder exclusively using ATC matches or outperforms end-to-end RL in most environments . Additionally , we benchmark several leading UL algorithms by pre-training encoders on expert demonstrations and using them , with weights frozen , in RL agents ; we find that agents using ATC-trained encoders outperform all others . We also train multi-task encoders on data from multiple environments and show generalization to different downstream RL tasks . Finally , we ablate components of ATC , and introduce a new data augmentation to enable replay of ( compressed ) latent images from pre-trained encoders when RL requires augmentation . Our experiments span visually diverse RL benchmarks in DeepMind Control , DeepMind Lab , and Atari , and our complete code is available at hiddenurl . 1 INTRODUCTION . Ever since the first fully-learned approach succeeded at playing Atari games from screen images ( Mnih et al. , 2015 ) , standard practice in deep reinforcement learning ( RL ) has been to learn visual features and a control policy jointly , end-to-end . Several such deep RL algorithms have matured ( Hessel et al. , 2018 ; Schulman et al. , 2017 ; Mnih et al. , 2016 ; Haarnoja et al. , 2018 ) and have been successfully applied to domains ranging from real-world ( Levine et al. , 2016 ; Kalashnikov et al. , 2018 ) and simulated robotics ( Lee et al. , 2019 ; Laskin et al. , 2020a ; Hafner et al. , 2020 ) to sophisticated video games ( Berner et al. , 2019 ; Jaderberg et al. , 2019 ) , and even high-fidelity driving simulators ( Dosovitskiy et al. , 2017 ) . While the simplicity of end-to-end methods is appealing , relying on the reward function to learn visual features can be severely limiting . For example , it leaves features difficult to acquire under sparse rewards , and it can narrow their utility to a single task . Although our intent is broader than to focus on either sparse-reward or multi-task settings , they arise naturally in our studies . We investigate how to learn visual representations which are agnostic to rewards , without degrading the control policy . A number of recent works have significantly improved RL performance by introducing auxiliary losses , which are unsupervised tasks that provide feature-learning signal to the convolution neural network ( CNN ) encoder , additionally to the RL loss ( Jaderberg et al. , 2017 ; van den Oord et al. , 2018 ; Laskin et al. , 2020b ; Guo et al. , 2020 ; Schwarzer et al. , 2020 ) . Meanwhile , in the field of computer vision , recent efforts in unsupervised and self-supervised learning ( Chen et al. , 2020 ; Grill et al. , 2020 ; He et al. , 2019 ) have demonstrated that powerful feature extractors can be learned without labels , as evidenced by their usefulness for downstream tasks such as ImageNet classification . Together , these advances suggest that visual features for RL could possibly be learned entirely without rewards , which would grant greater flexibility to improve overall learning performance . To our knowledge , however , no single unsupervised learning ( UL ) task has been shown adequate for this purpose in general vision-based environments . In this paper , we demonstrate the first decoupling of representation learning from reinforcement learning that performs as well as or better than end-to-end RL . We update the encoder weights using only UL and train a control policy independently , on the ( compressed ) latent images . This capability stands in contrast to previous state-of-the-art methods , which have trained the UL and RL objectives jointly , or Laskin et al . ( 2020b ) , which observed diminished performance with decoupled encoders . Our main enabling contribution is a new unsupervised task tailored to reinforcement learning , which we call Augmented Temporal Contrast ( ATC ) . ATC requires a model to associate observations from nearby time steps within the same trajectory ( Anand et al. , 2019 ) . Observations are encoded via a convolutional neural network ( shared with the RL agent ) into a small latent space , where the InfoNCE loss is applied ( van den Oord et al. , 2018 ) . Within each randomly sampled training batch , the positive observation , ot+k , for every anchor , ot , serves as negative for all other anchors . For regularization , observations undergo stochastic data augmentation ( Laskin et al. , 2020b ) prior to encoding , namely random shift ( Kostrikov et al. , 2020 ) , and a momentum encoder ( He et al. , 2020 ; Laskin et al. , 2020b ) is used to process the positives . A learned predictor layer further processes the anchor code ( Grill et al. , 2020 ; Chen et al. , 2020 ) prior to contrasting . In summary , our algorithm is a novel combination of elements that enables generic learning of the structure of observations and transitions in MDPs without requiring rewards or actions as input . We include extensive experimental studies establishing the effectiveness of our algorithm in a visually diverse range of common RL environments : DeepMind Control Suite ( DMControl ; Tassa et al . 2018 ) , DeepMind Lab ( DMLab ; Beattie et al . 2016 ) , and Atari ( Bellemare et al. , 2013 ) . Our experiments span discrete and continuous control , 2D and 3D visuals , and both on-policy and off policy RL algorithms . Complete code for all of our experiments is available at hiddenurl . Our empirical contributions are summarized as follows : Online RL with UL : We find that the convolutional encoder trained solely with the unsupervised ATC objective can fully replace the end-to-end RL encoder without degrading policy performance . ATC achieves nearly equal or greater performance in all DMControl and DMLab environments tested and in 5 of the 8 Atari games tested . In the other 3 Atari games , using ATC as an auxiliary loss or for weight initialization still brings improvements over end-to-end RL . Encoder Pre-Training Benchmarks : We pre-train the convolutional encoder to convergence on expert demonstrations , and evaluate it by training an RL agent using the encoder with weights frozen . We find that ATC matches or outperforms all prior UL algorithms as tested across all domains , demonstrating that ATC is a state-of-the-art UL algorithm for RL . Multi-Task Encoders : An encoder is trained on demonstrations from multiple environments , and is evaluated , with weights frozen , in separate downstream RL agents . A single encoder trained on four DMControl environments generalizes successfully , performing equal or better than end-to-end RL in four held-out environments . Similar attempts to generalize across eight diverse Atari games result in mixed performance , confirming some limited feature sharing among games . Ablations and Encoder Analysis : Components of ATC are ablated , showing their individual effects . Additionally , data augmentation is shown to be necessary in DMControl during RL even when using a frozen encoder . We introduce a new augmentation , subpixel random shift , which matches performance while augmenting the latent images , unlocking computation and memory benefits . 2 RELATED WORK . Several recent works have used unsupervised/self-supervised representation learning methods to improve performance in RL . The UNREAL agent ( Jaderberg et al. , 2017 ) introduced unsupervised auxiliary tasks to deep RL , including the Pixel Control task , a Q-learning method requiring predictions of screen changes in discrete control environments , which has become a standard in DMLab ( Hessel et al. , 2019 ) . CPC ( van den Oord et al. , 2018 ) applied contrastive losses over multiple time steps as an auxiliary task for the convolutional and recurrent layers of RL agents , and it has been extended with future action-conditioning ( Guo et al. , 2018 ) . Recently , PBL ( Guo et al. , 2020 ) surpassed these methods with an auxiliary loss of forward and backward predictions in the recurrent latent space using partial agent histories . Where the trend is of increasing sophistication in auxiliary recurrent architectures , our algorithm is markedly simpler , requiring only observations , and yet it proves sufficient in partially observed settings ( POMDPs ) . ST-DIM ( Anand et al. , 2019 ) introduced various temporal , contrastive losses , including ones that operate on “ local ” features from an intermediate layer within the encoder , without data augmentation . CURL ( Laskin et al. , 2020b ) introduced an augmented , contrastive auxiliary task similar to ours , including a momentum encoder but without temporal contrast . Mazoure et al . ( 2020 ) provided extensive analysis pertaining to InfoNCE losses on functions of successive time steps in MDPs , including local features in their auxiliary loss ( DRIML ) similar to ST-DIM , and finally conducted experiments using global temporal contrast of augmented observations in the Procgen ( Cobbe et al. , 2019 ) environment . Most recently , MPR ( Schwarzer et al. , 2020 ) combined data augmentation with multi-step , convolutional forward modeling and a similarity loss to improve DQN agents in the Atari 100k benchmark . Hafner et al . ( 2019 ; 2020 ) ; Lee et al . ( 2019 ) proposed to leverage world-modeling in a latent-space for continuous control . A small number of model-free methods have attempted to decouple encoder training from the RL loss as ablations , but have met reduced performance relative to end-to-end RL ( Laskin et al. , 2020b ; Lee et al. , 2020 ) . None have previously been shown effective in as diverse a collection of RL environments as ours ( Bellemare et al. , 2013 ; Tassa et al. , 2018 ; Beattie et al. , 2016 ) . Finn et al . ( 2016 ) ; Ha & Schmidhuber ( 2018 ) are example works which pretrained encoder features in advance using image reconstruction losses such as the VAE ( Kingma & Welling , 2013 ) . Devin et al . ( 2018 ) ; Kipf et al . ( 2019 ) pretrained object-centric representations , the latter learning a forward model by way of contrastive losses ; Yan et al . ( 2020 ) introduced a similar technique to learn encoders supporting manipulation of deformable objects by traditional control methods . MERLIN ( Wayne et al. , 2018 ) trained a convolutional encoder and sophisticated memory module online , detached from the RL agent , which learned read-only accesses to memory . It used reconstruction and one-step latent-prediction losses and achieved high performance in DMLab-like environments with extreme partial observability . Our loss function may benefit those settings , as it outperforms similar reconstruction losses in our experiments . Decoupling unsupervised pretraining from downstream tasks is common in computer vision ( Hénaff et al. , 2019 ; He et al. , 2019 ; Chen et al. , 2020 ) and has favorable properties of providing task agnostic features which can be used for training smaller taskspecific networks , yielding significant gains in computational efficiency over end-to-end methods . 3 AUGMENTED TEMPORAL CONTRAST . Our unsupervised learning task , Augmented Temporal Contrast ( ATC ) , requires a model to associate an observation , ot , with one from a specified , near-future time step , ot+k . Within each training batch , we apply stochastic data augmentation to the observations ( Laskin et al. , 2020b ) , namely random shift ( Kostrikov et al. , 2020 ) , which is simple to implement and provides highly effective regularization in most cases . The augmented observations are encoded into a small latent space where a contrastive loss is applied . This task encourages the learned encoder to extract meaningful elements of the structure of the MDP from observations . Our architecture for ATC consists of four learned components - ( i ) a convolutional encoder , fθ , which processes the anchor observation , ot , into the latent image zt = fθ ( AUG ( ot ) ) , ( ii ) a linear global compressor , gφ to produce a small latent code vector ct = gφ ( zt ) , ( iii ) a residual predictor MLP , hψ , which acts as an implicit forward model to advance the code pt = hψ ( ct ) + ct , and ( iv ) a contrastive transformation matrix , W . To process the positive observation , ot+k into the target code c̄t+k = gφ̄ ( fθ̄ ( AUG ( ot+k ) ) , we use a momentum encoder ( He et al. , 2019 ) parameterized as a slowly moving average of the weights from the learned encoder and compressor layer : θ̄ ← ( 1− τ ) θ̄ + τθ ; φ̄← ( 1− τ ) φ̄+ τφ . ( 1 ) The complete architecture is shown in Figure 1 . The convolutional encoder , fθ , alone is shared with the RL agent . We employ the InfoNCE loss ( Gutmann & Hyvärinen , 2010 ; van den Oord et al. , 2018 ) using logits computed bilinearly , as l = ptWc̄t+k . In our implementation , every anchor in the training batch utilizes the positives corresponding to all other anchors as its negative examples . Denoting an observation indexed from dataset O as oi , and its positive as oi+ , the logits can be written as li , j+ = piWc̄j+ ; our loss function in practice is : LATC = −EO [ log exp li , i+∑ oj∈O exp li , j+ ] . ( 2 )
This paper presents a new unsupervised learning method for learning latent representations for visual RL control domains. The method, Augmented Temporal Contrast (ATC), can be used alone to learn a representation to be combined with an RL algorithm, or as an auxiliary task in an end-to-end system. ATC matches or outperforms comparable end-to-end systems in several environments. The paper provides an extensive experimental study to support its claims.
SP:9c3d7291bb936e41d94e0357e2085cb1621d4f3a
TopoTER: Unsupervised Learning of Topology Transformation Equivariant Representations
1 INTRODUCTION . Graphs provide a natural and efficient representation for non-Euclidean data , such as brain networks , social networks , citation networks , and 3D point clouds . Graph Convolutional Neural Networks ( GCNNs ) ( Bronstein et al. , 2017 ) have been proposed to generalize the CNNs to learn representations from non-Euclidean data , which has made significant advances in various applications such as node classification ( Kipf & Welling , 2017 ; Veličković et al. , 2018 ; Xu et al. , 2019a ) and graph classification ( Xu et al. , 2019b ) . However , most existing GCNNs are trained in a supervised fashion , requiring a large amount of labeled data for network training . This limits the applications of the GCNNs since it is often costly to collect adequately labeled data , especially on large-scale graphs . Hence , this motivates the proposed research to learn graph feature representations in an unsupervised fashion , which enables the discovery of intrinsic graph structures and thus adapts to various downstream tasks . Auto-Encoders ( AEs ) and Generative Adversarial Networks ( GANs ) are two most representative unsupervised learning methods . Based on the AEs and GANs , many approaches have sought to learn transformation equivariant representations ( TERs ) to further improve the quality of unsupervised representation learning . It assumes that the learned representations equivarying to transformations are able to encode the intrinsic structures of data such that the transformations can be reconstructed from the representations before and after transformations ( Qi et al. , 2019b ) . Learning TERs traces back to Hinton ’ s seminal work on learning transformation capsules ( Hinton et al. , 2011 ) , and embodies a variety of methods developed for Euclidean data ( Kivinen & Williams , 2011 ; Sohn & Lee , 2012 ; Schmidt & Roth , 2012 ; Skibbe , 2013 ; Lenc & Vedaldi , 2015 ; Gens & Domingos , 2014 ; Dieleman et al. , 2015 ; 2016 ; Zhang et al. , 2019 ; Qi et al. , 2019a ) . Further , Gao et al . ( 2020 ) extend transformation equivariant representation learning to non-Euclidean domain , which formalizes Graph Transformation Equivariant Representation ( GraphTER ) learning by auto-encoding nodewise transformations in an unsupervised fashion . Nevertheless , only transformations on node features are explored , while the underlying graph may vary implicitly . The graph topology has not been fully explored yet , which however is crucial in unsupervised graph representation learning . To this end , we propose the Topology Transformation Equivariant Representation ( TopoTER ) learning to infer unsupervised graph feature representations by estimating topology transformations . In- stead of transforming node features as in the GraphTER , the proposed TopoTER studies the transformation equivariant representation learning by transforming the graph topology , i.e. , adding or removing edges to perturb the graph structure . Then the same input signals are attached to the resultant graph topologies , resulting in different graph representations . This provides an insight into how the same input signals associated with different graph topologies would lead to equivariant representations enabling the fusion of node feature and graph topology in GCNNs . Formally , we propose the TopoTER from an information-theoretic perspective , aiming to maximize the mutual information between topology transformations and feature representations with respect to the original and transformed graphs . We derive that maximizing such mutual information can be relaxed to the cross entropy minimization between the applied topology transformations and the estimation from the learned representations of graph data under the topological transformations . Specifically , given an input graph and its associated node features , we first sample a subset of node pairs from the graph and flip the edge connectivity between each pair at a perturbation rate , leading to a transformed graph with attached node features . Then , we design a graph-convolutional auto-encoder architecture , where the encoder learns the node-wise representations over the original and transformed graphs respectively , and the decoder predicts the topology transformations of edge connectivity from both representations by minimizing the cross entropy between the applied and estimated transformations . Experimental results demonstrate that the proposed TopoTER model outperforms the state-of-the-art unsupervised models , and even achieves comparable results to the ( semi- ) supervised approaches in node classification and graph classification tasks at times . Our main contributions are summarized as follows . • We propose the Topology Transformation Equivariant Representation ( TopoTER ) learning to in- fer expressive node feature representations in an unsupervised fashion , which can characterize the intrinsic structures of graphs and the associated features by exploring the graph transformations of connectivity topology . • We formulate the TopoTER from an information-theoretic perspective , by maximizing the mutual information between feature representations and topology transformations , which can be relaxed to the cross entropy minimization between the applied transformations and the prediction in an end-to-end graph-convolutional auto-encoder architecture . • Experiments demonstrate that the proposed TopoTER model outperforms the state-of-the-art un- supervised methods in both node classification and graph classification . 2 RELATED WORK . Graph Auto-Encoders . Graph Auto-Encoders ( GAEs ) are the most representative unsupervised methods . GAEs encode graph data into feature space via an encoder and reconstruct the input graph data from the encoded feature representations via a decoder . GAEs are often used to learn network embeddings and graph generative distributions ( Wu et al. , 2020 ) . For network embedding learning , GAEs learn the feature representations of each node by reconstructing graph structural information , such as the graph adjacency matrix ( Kipf & Welling , 2016 ) and the positive pointwise mutual information ( PPMI ) matrix ( Cao et al. , 2016 ; Wang et al. , 2016 ) . For graph generation , some methods generate nodes and edges of a graph alternately ( You et al. , 2018 ) , while other methods output an entire graph ( Simonovsky & Komodakis , 2018 ; Ma et al. , 2018 ; De Cao & Kipf , 2018 ) . Graph Contrastive Learning . An important paradigm called contrastive learning aims to train an encoder to be contrastive between the representations of positive samples and negative samples . Recent contrastive learning frameworks can be divided into two categories ( Liu et al. , 2020 ) : context-instance contrast and context-context contrast . Context-instance contrast focuses on modeling the relationships between the local feature of a sample and its global context representation . Deep InfoMax ( DIM ) ( Hjelm et al. , 2018 ) first proposes to maximize the mutual information between a local patch and its global context through a contrastive learning task . Deep Graph InfoMax ( DGI ) ( Velickovic et al. , 2019 ) proposes to learn node-level feature representation by extending DIM to graph-structured data , while InfoGraph ( Sun et al. , 2020a ) aims to use mutual information maximization for unsupervised representation learning on entire graphs . Peng et al . ( 2020 ) propose a Graphical Mutual Information ( GMI ) approach to maximize the mutual information of both features and edges between inputs and outputs . In contrast to context-instance methods , contextcontext contrast studies the relationships between the global representations of different samples . M3S ( Sun et al. , 2020b ) adopts a self-supervised pre-training paradigm as in DeepCluster ( Caron et al. , 2018 ) for better semi-supervised prediction in GCNNs . Graph Contrastive Coding ( GCC ) ( Qiu et al. , 2020 ) designs the pre-training task as subgraph instance discrimination in and across networks to empower graph neural networks to learn the intrinsic structural representations . Transformation Equivariant Representation Learning . Many approaches have sought to learn transformation equivariant representations . Learning transformation equivariant representations has been advocated in Hinton ’ s seminal work on learning transformation capsules . Following this , a variety of approaches have been proposed to learn transformation equivariant representations ( Gens & Domingos , 2014 ; Dieleman et al. , 2015 ; 2016 ; Cohen & Welling , 2016 ; Lenssen et al. , 2018 ) . To generalize to generic transformations , Zhang et al . ( 2019 ) propose to learn unsupervised feature representations via Auto-Encoding Transformations ( AET ) by estimating transformations from the learned feature representations of both the original and transformed images , while Qi et al . ( 2019a ) extend AET from an information-theoretic perspective by maximizing the lower bound of mutual information between transformations and representations . Wang et al . ( 2020 ) extend the AET to Generative Adversarial Networks ( GANs ) for unsupervised image synthesis and representation learning . Gao et al . ( 2020 ) introduce the GraphTER model that extends AET to graph-structured data , which is formalized by auto-encoding node-wise transformations in an unsupervised manner . de Haan et al . ( 2020 ) propose Gauge Equivariant Mesh CNNs which generalize GCNNs to apply anisotropic gauge equivariant kernels . Fuchs et al . ( 2020 ) introduce a self-attention mechanism specifically for 3D point cloud data , which adheres to equivariance constraints , improving robustness to nuisance transformations . 3 METHOD . 3.1 PRELIMINARY . We consider an undirected graph G = { V , E , A } composed of a node set V of cardinality |V| = N , an edge set E connecting nodes of cardinality |E| = M . A is a real symmetric N × N matrix that encodes the graph structure , where ai , j = 1 if there exists an edge ( i , j ) between nodes i and j , and ai , j = 0 otherwise . Graph signal refers to data that reside on the nodes of a graph G , denoted by X ∈ RN×C with the i-th row representing the C-dimensional graph signal on the i-th node of V . 3.2 TOPOLOGY TRANSFORMATION . We define the topology transformation t as adding or removing edges from the original edge set E in graph G. This can be done by sampling , i.i.d. , a switch parameter σi , j as in ( Velickovic et al. , 2019 ) , which determines whether to modify edge ( i , j ) in the adjacency matrix . Assuming a Bernoulli distribution B ( p ) , where p denotes the probability of each edge being modified , we draw a random matrix Σ = { σi , j } N×N from B ( p ) , i.e. , Σ ∼ B ( p ) . We then acquire the perturbed adjacency matrix as à = A⊕ Σ , ( 1 ) where ⊕ is the exclusive OR ( XOR ) operation . This strategy produces a transformed graph through the topology transformation t , i.e. , à = t ( A ) . Here , the edge perturbation probability of p = 0 corresponds to a non-transformed adjacency matrix , which is a special case of an identity transformation to A . The transformed adjacency matrix à can also be written as the sum of the original adjacency matrix A and a topology perturbation matrix ∆A : à = A + ∆A , ( 2 ) where ∆A = { δai , j } N×N encodes the perturbation of edges , with δai , j ∈ { −1 , 0 , 1 } . As shown in Fig . 1 , when δai , j = 0 , the edge between node i and node j keeps unchanged ( i.e. , black solid lines ) ; when δai , j = −1 or 1 , it means removing ( i.e. , orange dotted lines ) or adding ( i.e. , blue solid lines ) the edge between node i and node j , respectively .
This paper develops a framework for unsupervised learning of graphs. The goal is to build graph representation using an encoder that is useful for downstream tasks such as graph classification. The representation is computed with an encoder $E$ applied to a graph data $(X,A)$, containing vertex data $X$ and adjacency matrix $A$. Given a graph $(X,A)$ and a perturbed version of its adjacency matrix $(X,\tilde{A)}$, the decoder $D$ is tasked with minimizing the conditional entropy, $h(\Delta A \vert H,\tilde{H})$, of the perturbation $\Delta A = A-\tilde{A}$ when given the two representations $H=E(X,A)$ and $\tilde{H}=E(X,\tilde{A})$.
SP:9a92f7adeccc0f66836e3ddfb6bd5af67bdf77e4
gradSim: Differentiable simulation for system identification and visuomotor control
1 INTRODUCTION . Accurately predicting the dynamics and physical characteristics of objects from image sequences is a long-standing challenge in computer vision . This end-to-end reasoning task requires a fundamental understanding of both the underlying scene dynamics and the imaging process . Imagine watching a short video of a basketball bouncing off the ground and ask : “ Can we infer the mass and elasticity of the ball , predict its trajectory , and make informed decisions , e.g. , how to pass and shoot ? ” These seemingly simple questions are extremely challenging to answer even for modern computer vision models . The underlying physical attributes of objects and the system dynamics need to be modeled and estimated , all while accounting for the loss of information during 3D to 2D image formation . Depending on the assumptions on the scene structre and dynamics , three types of solutions exist : black , grey , or white box . Black box methods ( Watters et al. , 2017 ; Xu et al. , 2019b ; Janner et al. , 2019 ; Chang et al. , 2016 ) model the state of a dynamical system ( such as the basketball ’ s trajectory in time ) as a learned embedding of its states or observations . These methods require few prior assumptions about the system itself , but lack interpretability due to entangled variational factors ( Chen et al. , 2016 ) or due to the ambiguities in unsupervised learning ( Greydanus et al. , 2019 ; Cranmer et al. , 2020b ) . Recently , grey box methods ( Mehta et al. , 2020 ) leveraged partial knowledge about the system dynamics to improve performance . In contrast , white box methods ( Degrave et al. , 2016 ; Liang et al. , 2019 ; Hu et al. , 2020 ; Qiao et al. , 2020 ) impose prior knowledge by employing explicit dynamics models , reducing the space of learnable parameters and improving system interpretability . ∗Equal contribution Most notably in our context , all of these approaches require precise 3D labels – which are laborintensive to gather , and infeasible to generate for many systems such as deformable solids or cloth . We eliminate the dependence of white box dynamics methods on 3D supervision by coupling explicit ( and differentiable ) models of scene dynamics with image formation ( rendering ) 1 . Explicitly modeling the end-to-end dynamics and image formation underlying video observations is challenging , even with access to the full system state . This problem has been treated in the vision , graphics , and physics communities ( Pharr et al. , 2016 ; Macklin et al. , 2014 ) , leading to the development of robust forward simulation models and algorithms . These simulators are not readily usable for solving inverse problems , due in part to their non-differentiability . As such , applications of black-box forward processes often require surrogate gradient estimators such as finite differences or REINFORCE ( Williams , 1992 ) to enable any learning . Likelihood-free inference for black-box forward simulators ( Ramos et al. , 2019 ; Cranmer et al. , 2020a ; Kulkarni et al. , 2015 ; Yildirim et al. , 2017 ; 2015 ; 2020 ; Wu et al. , 2017b ) has led to some improvements here , but remains limited in terms of data efficiency and scalability to high dimensional parameter spaces . Recent progress in differentiable simulation further improves the learning dynamics , however we still lack a method for end-to-end differentiation through the entire simulation process ( i.e. , from video pixels to physical attributes ) , a prerequisite for effective learning from video frames alone . We present∇Sim , a versatile end-to-end differentiable simulator that adopts a holistic , unified view of differentiable dynamics and image formation ( cf . Fig . 1,2 ) . Existing differentiable physics engines only model time-varying dynamics and require supervision in state space ( usually 3D tracking ) . We additionally model a differentiable image formation process , thus only requiring target information specified in image space . This enables us to backpropagate ( Griewank & Walther , 2003 ) training signals from video pixels all the way to the underlying physical and dynamical attributes of a scene . Our main contributions are : • ∇Sim , a differentiable simulator that demonstrates the ability to backprop from video pixels to the underlying physical attributes ( cf . Fig . 2 ) . • We demonstrate recovering many physical properties exclusively from video observations , including friction , elasticity , deformable material parameters , and visuomotor controls ( sans 3D supervision ) • A PyTorch framework facilitating interoperability with existing machine learning modules . We evaluate ∇Sim ’ s effectiveness on parameter identification tasks for rigid , deformable and thinshell bodies , and demonstrate performance that is competitive , or in some cases superior , to current physics-only differentiable simulators . Additionally , we demonstrate the effectiveness of the gradients provided by ∇Sim on challenging visuomotor control tasks involving deformable solids and cloth . 2 RELATED WORK . Differentiable physics simulators have seen significant attention and activity , with efforts centered around embedding physics structure into autodifferentiation frameworks . This has enabled differentiation through contact and friction models ( Toussaint et al. , 2018 ; de Avila Belbute-Peres et al. , 1Dynamics refers to the laws governing the motion and deformation of objects over time . Rendering refers to the interaction of these scene elements – including their material properties – with scene lighting to form image sequences as observed by a virtual camera . Simulation refers to a unified treatment of these two processes . 2018 ; Song & Boularias , 2020b ; a ; Degrave et al. , 2016 ; Wu et al. , 2017a ; Research , 2020 ( accessed May 15 , 2020 ) , latent state models ( Guen & Thome , 2020 ; Schenck & Fox , 2018 ; Jaques et al. , 2020 ; Heiden et al. , 2019 ) , volumetric soft bodies ( Hu et al. , 2019 ; 2018 ; Liang et al. , 2019 ; Hu et al. , 2020 ) , as well as particle dynamics ( Schenck & Fox , 2018 ; Li et al. , 2019 ; 2020 ; Hu et al. , 2020 ) . In contrast , ∇Sim addresses a superset of simulation scenarios , by coupling the physics simulator with a differentiable rendering pipeline . It also supports tetrahedral FEM-based hyperelasticity models to simulate deformable solids and thin-shells . Recent work on physics-based deep learning injects structure in the latent space of the dynamics using Lagrangian and Hamiltonian operators ( Greydanus et al. , 2019 ; Chen et al. , 2020 ; Toth et al. , 2020 ; Sanchez-Gonzalez et al. , 2019 ; Cranmer et al. , 2020b ; Zhong et al. , 2020 ) , by explicitly conserving physical quantities , or with ground truth supervision ( Asenov et al. , 2019 ; Wu et al. , 2016 ; Xu et al. , 2019b ) . Sensor readings have been used to predicting the effects of forces applied to an object in models of learned ( Fragkiadaki et al. , 2016 ; Byravan & Fox , 2017 ) and intuitive physics ( Ehsani et al. , 2020 ; Mottaghi et al. , 2015 ; 2016 ; Gupta et al. , 2010 ; Ehrhardt et al. , 2018 ; Yu et al. , 2015 ; Battaglia et al. , 2013 ; Mann et al. , 1997 ; Innamorati et al. , 2019 ; Standley et al. , 2017 ) . This also includes approaches that learn to model multi-object interactions ( Watters et al. , 2017 ; Xu et al. , 2019b ; Janner et al. , 2019 ; Ehrhardt et al. , 2017 ; Chang et al. , 2016 ; Agrawal et al. , 2016 ) . In many cases , intuitive physics approaches are limited in their prediction horizon and treatment of complex scenes , as they do not sufficiently accurately model the 3D geometry nor the object properties . System identification based on parameterized physics models ( Salzmann & Urtasun , 2011 ; Brubaker et al. , 2010 ; Kozlowski , 1998 ; Wensing et al. , 2018 ; Brubaker et al. , 2009 ; Bhat et al. , 2003 ; 2002 ; Liu et al. , 2005 ; Grzeszczuk et al. , 1998 ; Sutanto et al. , 2020 ; Wang et al. , 2020 ; 2018a ) and inverse simulation ( Murray-Smith , 2000 ) are closely related areas . There is a rich literature on neural image synthesis , but we focus on methods that model the 3D scene structure , including voxels ( Henzler et al. , 2019 ; Paschalidou et al. , 2019 ; Smith et al. , 2018b ; Nguyen-Phuoc et al. , 2018 ) , meshes ( Smith et al. , 2020 ; Wang et al. , 2018b ; Groueix et al. , 2018 ; Alhaija et al. , 2018 ) , and implicit shapes ( Xu et al. , 2019a ; Chen & Zhang , 2019 ; Michalkiewicz et al. , 2019 ; Niemeyer et al. , 2020 ; Park et al. , 2019 ; Mescheder et al. , 2019 ) . Generative models condition the rendering process on samples of the 3D geometry ( Liao et al. , 2019 ) . Latent factors determining 3D structure have also been learned in generative models ( Chen et al. , 2016 ; Eslami et al. , 2018 ) . Additionally , implicit neural representations that leverage differentiable rendering have been proposed ( Mildenhall et al. , 2020 ; 2019 ) for realistic view synthesis . Many of these representations have become easy to manipulate through software frameworks like Kaolin ( Jatavallabhula et al. , 2019 ) , Open3D ( Zhou et al. , 2018 ) , and PyTorch3D ( Ravi et al. , 2020 ) . Differentiable rendering allows for image gradients to be computed w.r.t . the scene geometry , camera , and lighting inputs . Variants based on the rasterization paradigm ( NMR ( Kato et al. , 2018 ) , OpenDR ( Loper & Black , 2014 ) , SoftRas ( Liu et al. , 2019 ) ) blur the edges of scene triangles prior to image projection to remove discontinuities in the rendering signal . DIB-R ( Chen et al. , 2019 ) applies this idea to background pixels and proposes an interpolation-based rasterizer for foreground pixels . More sophisticated differentiable renderers can treat physics-based light transport processes ( Li et al. , 2018 ; Nimier-David et al. , 2019 ) by ray tracing , and more readily support higher-order effects such as shadows , secondary light bounces , and global illumination . 3 ∇Sim : A UNIFIED DIFFERENTIABLE SIMULATION ENGINE Typically , physics estimation and rendering have been treated as disjoint , mutually exclusive tasks . In this work , we take on a unified view of simulation in general , to compose physics estimation and rendering . Formally , simulation is a function Sim : RP × [ 0 , 1 ] 7→ RH × RW ; Sim ( p , t ) = I . Here p ∈ RP is a vector representing the simulation state and parameters ( objects , their physical properties , their geometries , etc . ) , t denotes the time of simulation ( conveniently reparameterized to be in the interval [ 0 , 1 ] ) . Given initial conditions p0 , the simulation function produces an image I of height H and width W at each timestep t. If this function Sim were differentiable , then the gradient of Sim ( p , t ) with respect to the simulation parameters p provides the change in the output of the simulation from I to I + ∇Sim ( p , t ) δp due to an infinitesimal perturbation of p by δp . This construct enables a gradient-based optimizer to estimate physical parameters from video , by defining a loss function over the image space L ( I , . ) , and descending this loss landscape along a direction parallel to −∇Sim ( . ) . To realise this , we turn to the paradigms of computational graphs and differentiable programming . ∇Sim comprises two main components : a differentiable physics engine that computes the physical states of the scene at each time instant , and a differentiable renderer that renders the scene to a 2D image . Contrary to existing differentiable physics ( Toussaint et al. , 2018 ; de Avila Belbute-Peres et al. , 2018 ; Song & Boularias , 2020b ; a ; Degrave et al. , 2016 ; Wu et al. , 2017a ; Research , 2020 ( accessed May 15 , 2020 ; Hu et al. , 2020 ; Qiao et al. , 2020 ) or differentiable rendering ( Loper & Black , 2014 ; Kato et al. , 2018 ; Liu et al. , 2019 ; Chen et al. , 2019 ) approaches , we adopt a holistic view and construct a computational graph spanning them both .
This paper presents a framework for performing both differentiable physics simulations and differentiable rendering. This fully differentiable simulation and rendering pipeline is then employed to perform system identification tasks, directly from video frames, being able to match or outperform both visual-based and state-based baselines. Moreover, the potential of this framework to be applied for visuomotor control is also demonstrated.
SP:ce42fb1c2d8241aeb60250b7a0229411a2dcfa81
Proximal Gradient Descent-Ascent: Variable Convergence under KŁ Geometry
1 INTRODUCTION . Minimax optimization is a classical optimization framework that has been widely applied in various modern machine learning applications , including game theory Ferreira et al . ( 2012 ) , generative adversarial networks ( GANs ) Goodfellow et al . ( 2014 ) , adversarial training Sinha et al . ( 2017 ) , reinforcement learning Qiu et al . ( 2020 ) , imitation learning Ho and Ermon ( 2016 ) ; Song et al . ( 2018 ) , etc . A typical minimax optimization problem is shown below , where f is a differentiable function . min x∈X max y∈Y f ( x , y ) . A popular algorithm for solving the above minimax problem is gradient descent-ascent ( GDA ) , which performs a gradient descent update on the variable x and a gradient ascent update on the variable y alternatively in each iteration . Under the alternation between descent and ascent updates , it is much desired that GDA generates sequences of variables that converge to a certain optimal point , i.e. , the minimax players obtain convergent optimal policies . In the existing literature , many studies have established the convergence of GDA-type algorithms under various global geometries of the objective function , e.g. , convex-concave geometry ( f is convex in x and concave in y ) Nedić and Ozdaglar ( 2009 ) , bi-linear geometry Neumann ( 1928 ) ; Robinson ( 1951 ) and Polyak-Łojasiewicz ( PŁ ) geometry Nouiehed et al . ( 2019 ) ; Yang et al . ( 2020 ) . Some other work studied GDA under stronger global geometric conditions of f such as convex-strongly-concave geometry Du and Hu ( 2019 ) and strongly-convex-strongly-concave geometry Mokhtari et al . ( 2020 ) ; Zhang and Wang ( 2020 ) , under which GDA is shown to generate convergent variable sequences . However , these special global function geometries do not hold for modern machine learning problems that usually have complex models and nonconvex geometry . Recently , many studies characterized the convergence of GDA in nonconvex minimax optimization , where the objective function is nonconvex in x . Specifically , Lin et al . ( 2020 ) ; Nouiehed et al . ( 2019 ) ; Xu et al . ( 2020b ) ; Boţ and Böhm ( 2020 ) studied the convergence of GDA in the nonconvex-concave setting and Lin et al . ( 2020 ) ; Xu et al . ( 2020b ) studied the nonconvex-strongly-concave setting . In these general nonconvex settings , it has been shown that GDA converges to a certain stationary point at a sublinear rate , i.e. , ‖G ( xt ) ‖ ≤ t−α for some α > 0 , where G ( xt ) corresponds to a certain notion of gradient . Although such a gradient convergence result implies the stability of the algorithm , namely , limt→∞ ‖xt+1 − xt‖ = 0 , it does not guarantee the convergence of the variable sequences { xt } t , { yt } t generated by GDA . So far , the variable convergence of GDA has not been established for nonconvex problems , but only under ( strongly ) convex function geometries that are mentioned previously Du and Hu ( 2019 ) ; Mokhtari et al . ( 2020 ) ; Zhang and Wang ( 2020 ) . Therefore , we want to ask the following fundamental question : • Q1 : Does GDA have guaranteed variable convergence in nonconvex minimax optimization ? If so , where do they converge to ? In fact , proving the variable convergence of GDA in the nonconvex setting is highly nontrivial due to the following reasons : 1 ) the algorithm alternates between a minimization step and a maximization step ; 2 ) It is well understood that strong global function geometry leads to the convergence of GDA . However , in general nonconvex setting , the objective functions typically do not have an amenable global geometry . Instead , they may satisfy different types of local geometries around the critical points . Hence , it is natural and much desired to exploit the local geometries of functions in analyzing the convergence of GDA . The Kurdyka-Łojasiewicz ( KŁ ) geometry provides a broad characterization of such local geometries for nonconvex functions . The Kurdyka-Łojasiewicz ( KŁ ) geometry ( see Section 2 for details ) Bolte et al . ( 2007 ; 2014 ) parameterizes a broad spectrum of the local nonconvex geometries and has been shown to hold for a broad class of practical functions . Moreover , it also generalizes other global geometries such as strong convexity and PŁ geometry . In the existing literature , the KŁ geometry has been exploited extensively to analyze the convergence rate of various gradient-based algorithms in nonconvex optimization , e.g. , gradient descent Attouch and Bolte ( 2009 ) ; Li et al . ( 2017 ) and its accelerated version Zhou et al . ( 2020 ) as well as the distributed version Zhou et al . ( 2016a ) . Hence , we are highly motivated to study the convergence rate of variable convergence of GDA in nonconvex minimax optimization under the KŁ geometry . In particular , we want to address the following question : • Q2 : How does the local function geometry captured by the KŁ parameter affects the variable convergence rate of GDA ? In this paper , we provide comprehensive answers to these questions . We develop a new analysis framework to study the variable convergence of GDA in nonconvex-strongly-concave minimax optimization under the KŁ geometry . We also characterize the convergence rates of GDA in the full spectrum of the parameterization of the KŁ geometry . 1.1 OUR CONTRIBUTIONS . We consider the following regularized nonconvex-strongly-concave minimax optimization problem min x∈Rm max y∈Y f ( x , y ) + g ( x ) − h ( y ) , ( P ) where f is a differentiable and nonconvex-strongly-concave function , g is a general nonconvex regularizer and h is a convex regularizer . Both g and h can be possibly nonsmooth . To solve the above regularized minimax problem , we study a proximal-GDA algorithm that leverages the forward-backward splitting update Lions and Mercier ( 1979 ) ; Attouch et al . ( 2013 ) . We study the variable convergence property of proximal-GDA in solving the minimax problem ( P ) . Specifically , we show that proximal-GDA admits a novel Lyapunov function H ( x , y ) ( see Proposition 2 ) , which is monotonically decreasing along the trajectory of proximal GDA , i.e. , H ( xt+1 , yt+1 ) < H ( xt , yt ) . Based on the monotonicity of this Lyapunov function , we show that every limit point of the variable sequences generated by proximal-GDA is a critical point of the objective function . Moreover , by exploiting the ubiquitous KŁ geometry of the Lyapunov function , we prove that the entire variable sequence of proximal-GDA has a unique limit point , or equivalently speaking , it converges to a certain critical point x∗ , i.e. , xt → x∗ , yt → y∗ ( x∗ ) ( see the definition of y∗ in Section 2 ) . To the best of our knowledge , this is the first variable convergence result of GDA-type algorithms in nonconvex minimax optimization . Furthermore , we characterize the asymptotic convergence rates of both the variable sequences and the function values of proximal-GDA in different parameterization regimes of the KŁ geometry . Depending on the value of the KŁ parameter θ , we show that proximal-GDA achieves different types of convergence rates ranging from sublinear convergence up to finite-step convergence , as we summarize in Table 1 below . 1.2 RELATED WORK . Deterministic GDA algorithms : Yang et al . ( 2020 ) studied an alternating gradient descent-ascent ( AGDA ) algorithm in which the gradient ascent step uses the current variable xt+1 instead of xt . Boţ and Böhm ( 2020 ) extended the AGDA algorithm to an alternating proximal-GDA ( APGDA ) algorithm for a regularized minimax optimization . Xu et al . ( 2020b ) studied an alternating gradient projection algorithm which applies ` 2 regularizer to the local objective function of GDA followed by projection onto the constraint sets . Daskalakis and Panageas ( 2018 ) ; Mokhtari et al . ( 2020 ) ; Zhang and Wang ( 2020 ) analyzed optimistic gradient descent-ascent ( OGDA ) which applies negative momentum to accelerate GDA . Mokhtari et al . ( 2020 ) also studied an extra-gradient algorithm which applies two-step GDA in each iteration . Nouiehed et al . ( 2019 ) studied multi-step GDA where multiple gradient ascent steps are performed , and they also studied the momentum-accelerated version . Cherukuri et al . ( 2017 ) ; Daskalakis and Panageas ( 2018 ) ; Jin et al . ( 2020 ) studied GDA in continuous time dynamics using differential equations . Adolphs et al . ( 2019 ) analyzed a second-order variant of the GDA algorithm . Stochastic GDA algorithms : Lin et al . ( 2020 ) ; Yang et al . ( 2020 ) ; Boţ and Böhm ( 2020 ) analyzed stochastic GDA , stochastic AGDA and stochastic APGDA , which are direct extensions of GDA , AGDA and APGDA to the stochastic setting respectively . Variance reduction techniques have been applied to stochastic minimax optimization , including SVRG-based Du and Hu ( 2019 ) ; Yang et al . ( 2020 ) , SPIDER-based Xu et al . ( 2020a ) , STORM Qiu et al . ( 2020 ) and its gradient free version Huang et al . ( 2020 ) . Xie et al . ( 2020 ) studied the complexity lower bound of first-order stochastic algorithms for finite-sum minimax problem . KŁ geometry : The KŁ geometry was defined in Bolte et al . ( 2007 ) . The KŁ geometry has been exploited to study the convergence of various first-order algorithms for solving minimization problems , including gradient descent Attouch and Bolte ( 2009 ) , alternating gradient descent Bolte et al . ( 2014 ) , distributed gradient descent Zhou et al . ( 2016a ; 2018a ) , accelerated gradient descent Li et al . ( 2017 ) . It has also been exploited to study the convergence of second-order algorithms such as Newton ’ s method Noll and Rondepierre ( 2013 ) ; Frankel et al . ( 2015 ) and cubic regularization method Zhou et al . ( 2018b ) . 2 PROBLEM FORMULATION AND KŁ GEOMETRY . In this section , we introduce the problem formulation , technical assumptions and the KurdykaŁojasiewicz ( KŁ ) geometry . We consider the following regularized minimax optimization problem . min x∈Rm max y∈Y f ( x , y ) + g ( x ) − h ( y ) , ( P ) where f : Rm × Rn → R is a differentiable and nonconvex-strongly-concave loss function , Y ⊂ Rn is a compact and convex set , and g , h are the regularizers that are possibly non-smooth . In particular , define Φ ( x ) : = maxy∈Y f ( x , y ) − h ( y ) , and then the problem ( P ) is equivalent to the minimization problem minx∈Rm Φ ( x ) + g ( x ) . Throughout the paper , we adopt the following standard assumptions on the problem ( P ) . Assumption 1 . The objective function of the problem ( P ) satisfies : 1 . Function f ( · , · ) is L-smooth and function f ( x , · ) is µ-strongly concave ; 2 . Function ( Φ + g ) ( x ) is bounded below , i.e. , infx∈Rm ( Φ + g ) ( x ) > −∞ ; 3 . For any α ∈ R , the sub-level set { x : ( Φ + g ) ( x ) ≤ α } is compact ; 4 . Function h is proper and convex , and function g is proper and lower semi-continuous . To elaborate , item 1 considers the class of nonconvex-strongly-concave functions f that has been widely studied in the existing literature Lin et al . ( 2020 ) ; Jin et al . ( 2020 ) ; Xu et al . ( 2020b ; a ) ; Lu et al . ( 2020 ) . Items 2 and 3 guarantee that the minimax problem ( P ) has at least one solution , and the variable sequences generated by the proximal-GDA algorithm ( See Algorithm 1 ) are bounded . Item 4 requires the regularizer h to be convex ( possibly non-smooth ) , which includes many normbased popular regularizers such as ` p ( p ≥ 1 ) , elastic net , nuclear norm , spectral norm , etc . On the other hand , the other regularizer g can be nonconvex but lower semi-continuous , which includes all the aforementioned convex regularizers , ` p ( 0 ≤ p < 1 ) , Schatten-p norm , rank , etc . Hence , our formulation of the problem ( P ) covers a rich class of nonconvex objective functions and regularizers and is more general than the existing nonconvex minimax formulation in Lin et al . ( 2020 ) , which does not consider any regularizer . Remark 1 . We note that the strong concavity of f ( x , · ) in item 1 can be relaxed to concavity , provided that the regularizer h ( y ) is µ-strongly convex . In this case , we can add −µ2 ‖y‖ 2 to both f ( x , y ) and h ( y ) such that Assumption 1 still holds . For simplicity , we will omit the discussion on this case . By strong concavity of f ( x , · ) , it is clear that the mapping y∗ ( x ) : = arg maxy∈Y f ( x , y ) − h ( y ) is uniquely defined for every x ∈ Rm . In particular , if x∗ is the desired minimizer of Φ ( x ) , then ( x∗ , y∗ ( x∗ ) ) is the desired solution of the minimax problem ( P ) . Next , we present some important properties regarding the function Φ ( x ) and the mapping y∗ ( x ) . The following proposition from Boţ and Böhm ( 2020 ) generalizes the Lemma 4.3 of Lin et al . ( 2020 ) to the regularized setting . The proof can be found in Appendix A . Throughout , we denote κ = L/µ as the condition number and denote∇1f ( x , y ) , ∇2f ( x , y ) as the gradients with respect to the first and the second input argument , respectively . For example , with this notation , ∇1f ( x , y∗ ( x ) ) denotes the gradient of f ( x , y∗ ( x ) ) with respect to only the first input argument x , and the x in the second input argument y∗ ( x ) is treated as a constant . Proposition 1 ( Lipschitz continuity of y∗ ( x ) and∇Φ ( x ) ) . Let Assumption 1 hold . Then , the mapping y∗ ( x ) and the function Φ ( x ) satisfy 1 . Mapping y∗ ( x ) is κ-Lipschitz continuous ; 2 . Function Φ ( x ) is L ( 1 + κ ) -smooth with∇Φ ( x ) = ∇1f ( x , y∗ ( x ) ) . As an intuitive explanation of Proposition 1 , since the function f ( x , y ) − h ( y ) is L-smooth with respect to x , both the maximizer y∗ ( x ) and the corresponding maximum function value Φ ( x ) should not change substantially with regard to a small change of x . Recall that the minimax problem ( P ) is equivalent to the standard minimization problem minx∈Rm Φ ( x ) + g ( x ) , which , according to item 2 of Proposition 1 , includes a smooth nonconvex function Φ ( x ) and a lower semi-continuous regularizer g ( x ) . Hence , we can define the optimization goal of the minimax problem ( P ) as finding a critical point x∗ of the nonconvex function Φ ( x ) + g ( x ) that satisfies the necessary optimality condition 0 ∈ ∂ ( Φ + g ) ( x∗ ) for minimizing nonconvex functions . Here , ∂ denotes the notion of subdifferential as we elaborate below . Definition 1 . ( Subdifferential and critical point , Rockafellar and Wets ( 2009 ) ) The Frechét subdifferential ∂̂h of function h at x ∈ domh is the set of u ∈ Rd defined as ∂̂h ( x ) : = { u : lim inf z 6=x , z→x h ( z ) − h ( x ) − uᵀ ( z − x ) ‖z − x‖ ≥ 0 } , and the limiting subdifferential ∂h at x ∈ domh is the graphical closure of ∂̂h defined as : ∂h ( x ) : = { u : ∃xk → x , h ( xk ) → h ( x ) , uk ∈ ∂̂h ( xk ) , uk → u } . The set of critical points of h is defined as crith : = { x : 0 ∈ ∂h ( x ) } . Throughout , we refer to the limiting subdifferential as subdifferential . We note that subdifferential is a generalization of gradient ( when h is differentiable ) and subgradient ( when h is convex ) to the nonconvex setting . In particular , any local minimizer of h must be a critical point . Next , we introduce the Kurdyka-Łojasiewicz ( KŁ ) geometry of a function h. Throughout , the point-to-set distance is denoted as distΩ ( x ) : = infu∈Ω ‖x− u‖ . Definition 2 ( KŁ geometry , Bolte et al . ( 2014 ) ) . A proper and lower semi-continuous function h is said to have the KŁ geometry if for every compact set Ω ⊂ domh on which h takes a constant value hΩ ∈ R , there exist ε , λ > 0 such that for all x̄ ∈ Ω and all x ∈ { z ∈ Rm : distΩ ( z ) < ε , hΩ < h ( z ) < hΩ + λ } , the following condition holds : ϕ′ ( h ( x ) − hΩ ) · dist∂h ( x ) ( 0 ) ≥ 1 , ( 1 ) where ϕ′ is the derivative of function ϕ : [ 0 , λ ) → R+ , which takes the form ϕ ( t ) = cθ t θ for certain universal constant c > 0 and KŁ parameter θ ∈ ( 0 , 1 ] . The KŁ geometry characterizes the local geometry of a nonconvex function around the set of critical points . To explain , consider the case where h is a differentiable function so that ∂h ( x ) = ∇h ( x ) . Then , the KŁ inequality in eq . ( 1 ) becomes h ( x ) − hΩ ≤ O ( ‖∇h ( x ) ‖ 1 1−θ ) , which generalizes the Polyak-Łojasiewicz ( PL ) condition h ( x ) − hΩ ≤ O ( ‖∇h ( x ) ‖2 ) Łojasiewicz ( 1963 ) ; Karimi et al . ( 2016 ) ( i.e. , KŁ parameter θ = 12 ) . Moreover , the KŁ geometry has been shown to hold for a large class of functions including sub-analytic functions , logarithm and exponential functions and semi-algebraic functions . These function classes cover most of the nonconvex objective functions encountered in practical machine learning applications Zhou et al . ( 2016b ) ; Yue et al . ( 2018 ) ; Zhou and Liang ( 2017 ) ; Zhou et al . ( 2018b ) . The KŁ geometry has been exploited extensively to analyze the convergence of various first-order algorithms , e.g. , gradient descent Attouch and Bolte ( 2009 ) ; Li et al . ( 2017 ) , alternating minimization Bolte et al . ( 2014 ) and distributed gradient methods Zhou et al . ( 2016a ) . It has also been exploited to study the convergence of second-order algorithms such cubic regularization Zhou et al . ( 2018b ) . In these works , it has been shown that the variable sequences generated by these algorithms converge to a desired critical point in nonconvex optimization , and the convergence rates critically depend on the parameterization θ of the KŁ geometry . In the subsequent sections , we provide a comprehensive understanding of the convergence and convergence rate of proximal-GDA under the KŁ geometry .
In this paper, the authors analyze the convergence of a proximal gradient descent ascent (GDA) method when applied to non-convex strongly concave functions. To establish convergence results, the authors show that proximal-GDA admits a novel Lyapunov function that monotonically decreases at every iteration. Along with KL-parametrized local geometry, the Lyapunov function was used to establish the convergence of decision variables to a critical point. Moreover, the rate of convergence of the algorithm was computed for various ranges of KL-parameter.
SP:f958cd0237ec397729161f29cab903af40716fd3
Learning advanced mathematical computations from examples
1 Introduction . Scientists solve problems of mathematics by applying rules and computational methods to the data at hand . These rules are derived from theory , they are taught in schools or implemented in software libraries , and guarantee that a correct solution will be found . Over time , mathematicians have developed a rich set of computational tools that can be applied to many problems , and have been said to be “ unreasonably effective ” ( Wigner , 1960 ) . Deep learning , on the other hand , learns from examples and solves problems by improving a random initial solution , without relying on domain-related theory and computational rules . Deep networks have proven to be extremely efficient for a large number of tasks , but struggle on relatively simple , rule-driven arithmetic problems ( Saxton et al. , 2019 ; Trask et al. , 2018 ; Zaremba and Sutskever , 2014 ) . Yet , recent studies show that deep learning models can learn complex rules from examples . In natural language processing , models learn to output grammatically correct sentences without prior knowledge of grammar and syntax ( Radford et al. , 2019 ) , or to automatically map one language into another ( Bahdanau et al. , 2014 ; Sutskever et al. , 2014 ) . In mathematics , deep learning models have been trained to perform logical inference ( Evans et al. , 2018 ) , SAT solving ( Selsam et al. , 2018 ) or basic arithmetic ( Kaiser and Sutskever , 2015 ) . Lample and Charton ( 2020 ) showed that transformers can be trained from generated data to perform symbol manipulation tasks , such as function integration and finding formal solutions of ordinary differential equations . In this paper , we investigate the use of deep learning models for complex mathematical tasks involving both symbolic and numerical computations . We show that models can predict the qualitative and quantitative properties of mathematical objects , without built-in mathematical knowledge . We consider three advanced problems of mathematics : the local stability and controllability of differential systems , and the existence and behavior at infinity of solutions of partial differential equations . All three problems have been widely researched and have many applications outside of pure mathematics . They have known solutions that rely on advanced symbolic and computational techniques , from formal differentiation , Fourier transform , algebraic full-rank conditions , to function evaluation , matrix inversion , and computation of complex eigenvalues . We find that neural networks can solve these problems with a very high accuracy , by simply looking at instances of problems and their solutions , while being totally unaware of the underlying theory . In one of the quantitative problems ∗ Equal contribution , names in alphabetic order . where several solutions are possible ( predicting control feedback matrix ) , neural networks are even able to predict different solutions that those generated with the mathematical algorithms we used for training . After reviewing prior applications of deep learning to related areas we introduce the three problems we consider , describe how we generate datasets , and detail how we train our models . Finally , we present our experiments and discuss their results . 2 Related work . Applications of neural networks to differential equations have mainly focused on two themes : numerical approximation and formal resolution . Whereas most differential systems and partial differential equations can not be solved explicitly , their solutions can be approximated numerically , and neural networks have been used for this purpose ( Lagaris et al. , 1998 ; 2000 ; Lee and Kang , 1990 ; Rudd , 2013 ; Sirignano and Spiliopoulos , 2018 ) . This approach relies on the universal approximation theorem , that states that any continuous function can be approximated by a neural network with one hidden layer over a wide range of activation functions ( Cybenko , 1989 ; Hornik et al. , 1990 ; Hornik , 1991 ; Petersen and Voigtlaender , 2018 ; Pinkus , 1999 ) . This has proven to be especially efficient for high dimensional problems . For formal resolution , Lample and Charton ( 2020 ) proposed several approaches to generate arbitrarily large datasets of functions with their integrals , and ordinary differential equations with their solutions . They found that a transformer model ( Vaswani et al. , 2017 ) trained on millions of examples could outperform state-of-the-art symbolic frameworks such as Mathematica or MATLAB ( Wolfram-Research , 2019 ; MathWorks , 2019 ) on a particular subset of equations . Their model was used to guess solutions , while verification ( arguably a simpler task ) was left to a symbolic framework ( Meurer et al. , 2017 ) . Arabshahi et al . ( 2018a ; b ) proposed to use neural networks to verify the solutions of differential equations , and found that Tree-LSTMs ( Tai et al. , 2015 ) were better than sequential LSTMs ( Hochreiter and Schmidhuber , 1997 ) at generalizing beyond the training distribution . Other approaches investigated the capacity of neural networks to perform arithmetic operations ( Kaiser and Sutskever , 2015 ; Saxton et al. , 2019 ; Trask et al. , 2018 ) or to run short computer programs ( Zaremba and Sutskever , 2014 ) . More recently , Saxton et al . ( 2019 ) found that neural networks were good at solving arithmetic problems or at performing operations such as differentiation or polynomial expansion , but struggled on tasks like prime number decomposition or on primality tests that require a significant number of steps to compute . Unlike the questions considered here , most of those problems can be solved by simple algorithmic computations . 3 Differential systems and their stability . A differential system of degree n is a system of n equations of n variables x1 ( t ) , ... , xn ( t ) , dxi ( t ) dt = fi ( x1 ( t ) , x2 ( t ) , ... , xn ( t ) ) , for i = 1 ... n or , in vector form , with x ∈ Rn and f : Rn → Rn , dx ( t ) dt = f ( x ( t ) ) Many problems can be set as differential systems . Special cases include n-th order ordinary differential equations ( letting x1 = y , x2 = y′ , ... xn = y ( n−1 ) ) , systems of coupled differential equations , and some particular partial differential equations ( separable equations or equations with characteristics ) . Differential systems are one of the most studied areas of mathematical sciences . They are found in physics , mechanics , chemistry , biology , and economics as well as in pure mathematics . Most differential systems have no explicit solution . Therefore , mathematicians have studied the properties of their solutions , and first and foremost their stability , a notion of paramount importance in many engineering applications . 3.1 Local stability . Let xe ∈ Rn be an equilibrium point , that is , f ( xe ) = 0 . If all solutions x ( t ) converge to xe when their initial positions x ( 0 ) at t = 0 are close enough , the equilibrium is said to be locally stable ( see Appendix B for a proper mathematical definition ) . This problem is well known , if f is differentiable in xe , an answer is provided by the Spectral Mapping Theorem ( SMT ) ( Coron , 2007 , Theorem 10.10 ) : Theorem 3.1 . Let J ( f ) ( xe ) be the Jacobian matrix of f in xe ( the matrix of its partial derivatives relative to its variables ) . Let λ be the largest real part of its eigenvalues . If λ is positive , xe is an unstable equilibrium . If λ is negative , then xe is a locally stable equilibrium . Predicting the stability of a given system at a point xe is our first problem . We will also predict λ , which represents the speed of convergence when negative , in a second experiment . Therefore , to apply the SMT , we need to : 1. differentiate each function with respect to each variable , obtain the formal Jacobian J ( x ) f ( x ) = ( cos ( x2 ) − 1− sin ( x1 ) x21 − √ 1 + x2 ) , J ( x ) = ( − cos ( x1 ) − sin ( x2 ) 2x1 − ( 2 √ 1 + x2 ) −1 ) 2. evaluate J ( xe ) , the Jacobian in xe ( a real or complex matrix ) xe = ( 0.1 , ... 0.1 ) ∈ Rn , J ( xe ) = ( − cos ( 0.1 ) − sin ( 0.1 ) 0.2 − ( 2 √ 1 + 0.1 ) −1 ) , 3. calculate the eigenvalues λi , i = 1 ... n of J ( xe ) λ1 = −1.031 , λ2 = −0.441 4. compute λ = −max ( Real ( λi ) ) and return the stability ( resp . λ the speed of convergence ) λ = 0.441 > 0→ locally stable with decay rate 0.441 3.2 Control theory . One of the lessons of the spectral mapping theorem is that instability is very common . In fact , unstable systems are plenty in nature ( Lagrange points , epidemics , satellite orbits , etc . ) , and the idea of trying to control them through external variables comes naturally . This is the controllability problem . It has a lot of practical applications , including space launch and the landing on the moon , the US Navy automated pilot , or recently autonomous cars ( Bernhard et al. , 2017 ; Minorsky , 1930 ; Funke et al. , 2016 ) . Formally , we are given a system dx dt = f ( x ( t ) , u ( t ) ) , ( 1 ) where x ∈ Rn is the state of the system . We want to find a function u ( t ) ∈ Rp , the control action , such that , beginning from a position x0 at t = 0 , we can reach a position x1 at t = T ( see Appendix B ) . The first rigorous mathematical analysis of this problem was given by Maxwell ( 1868 ) , but a turning point was reached in 1963 , when Kalman gave a precise condition for a linear system ( Kalman et al. , 1963 ) , later adapted to nonlinear system : Theorem 3.2 ( Kalman condition ) . Let A = ∂xf ( xe , ue ) and B = ∂uf ( xe , ue ) , if Span { AiBu : u ∈ Rm , i ∈ { 0 , ... , n− 1 } } = Rn , ( 2 ) then the system is locally controllable around x = xe , u = ue . When this condition holds , a solution to the control problem that makes the system locally stable in xe is u ( t ) = ue +K ( x ( t ) − xe ) ( c.f . Coron ( 2007 ) ; Kleinman ( 1970 ) ; Lukes ( 1968 ) and appendix B.4 for key steps of the proof ) , where K is the m×n control feedback matrix : K = −Btr ( e−AT [ ∫ T 0 e−AtBBtre−A trtdt ] e−A trT ) −1 . ( 3 ) In the non-autonomous case , where f = f ( x , u , t ) ( and A and B ) depends on t , ( 2 ) can be replaced by : Span { Diu : u ∈ Rm , i ∈ { 0 , ... , 2n− 1 } = Rn } , ( 4 ) where D0 ( t ) = B ( t ) and Di+1 ( t ) = D′i ( t ) − A ( t ) Di ( t ) . All these theorems make use of advanced mathematical results , such as the Cayley-Hamilton theorem , or LaSalle invariance principle . Learning them by predicting controllability and computing the control feedback matrix K is our second problem . To measure whether the system is controllable at a point xe , we need to : 1. differentiate the system with respect to its internal variables , obtain A ( x , u ) 2. differentiate the system with respect to its control variables , obtain B ( x , u ) 3. evaluate A and B in ( xe , ue ) 4. calculate the controllability matrix C with ( 2 ) ( resp . ( 4 ) if non-autonomous ) 5. calculate the rank d of C , if d = n , the system is controllable 6 . ( optionally ) if d = n , compute the control feedback matrix K with ( 3 ) In : f ( x , u ) = ( sin ( x21 ) + log ( 1 + x2 ) + atan ( ux1 ) 1+x2 x2 − ex1x2 ) , xe = [ 0.1 ] ue = 1 , Out : n− d = 0 System is controllable K = ( −22.8 44.0 ) A step by step derivation of this example is given in Section A of the appendix .
This paper shows that transformer models can be used to accurately learn advanced mathematical computations from millions of examples. The problems are drawn from the fields of differential equations and control theory. The selected problems are ones that are solvable using known algorithms; however, these algorithms involve a sequence of advanced mathematical operations (e.g., differentiation, calculating the rank of a matrix, calculating the eigenvalues of a matrix, etc), for which no known simple shortcuts exist. For the experiments in this paper, for each problem a large number (50 million) of training examples are randomly generated, and are then used to train a transformer model. Across these problems, the paper shows that the neural network is able to solve these problems at high accuracy (96-99.7% accuracy).
SP:79b19c6490c2ea5cab56666927520888191a83a7
Neural Random Projection: From the Initial Task To the Input Similarity Problem
1 INTRODUCTION . Evaluating object similarity is an important area in machine learning literature . It is used in various applications such as search query matching , image similarity search , recommender systems , clustering , classification . In practice , the quality of similarity evaluation methods depends on the data representation . For a long time neural networks show successful results in many tasks and one such task is obtaining good representations . Many of these methods can be considered in terms of domain and task . The first case is when we have only unlabeled dataset . Then we can use autoencoders ( Bank et al. , 2020 ) or self-supervised approaches ( Chen et al. , 2020 ; Devlin et al. , 2018 ; Doersch et al. , 2015 ; Dosovitskiy et al. , 2014 ; Gidaris et al. , 2018 ; Noroozi & Favaro , 2016 ; Noroozi et al. , 2017 ; Oord et al. , 2018 ; Peters et al. , 2018 ) , which require formulation of a pretext task , which in most cases depends on the data type . These methods can be called explicit because they directly solve the problem of representation learning . Moreover , these models can be used for transfer knowledge when we have labeled data only in the target domain . The second case is where we have labeled data in the source and target domains . Then we can apply a multi-task learning approach ( Ruder , 2017 ) or fine-tune the models ( Simonyan & Zisserman , 2014 ; He et al. , 2016 ) trained on a large dataset like ImageNet . Finally , there is the domain adaptation approach ( Wang & Deng , 2018 ) where we have a single task but different source and target domains with labeled data in the target domain ( Hu et al. , 2015 ) or with unlabeled data ( Li et al. , 2016 ; Yan et al. , 2017 ; Zellinger et al. , 2017 ) . In our study the target task is to measure similarity between objects and to define hidden classes based on it . We are interested in studying the issue of implicit learning of representations . Can the neural networks store information about subcategories if we don ’ t explicitly train them to do this ? More formally , we have the same source and target domains but different tasks and we don ’ t have labeled data in the target domain . That makes our case different from the cases of transfer learning . A solution to this problem could be useful in many practical cases . For example , we could train a model to classify whether messages are spam or not and then group spam campaigns or kind of attacks ( phishing , spoofing , etc . ) based on similarity measuring by trained neural network . Similar cases could be in the medicine ( classifying patients into healthy/sick and grouping them by the disease ) or in financial ( credit scoring ) area . The benefits are that we do not depend on the data type and , more importantly , we use only one model for different tasks without fine-tuning , which significantly reduces time for developing and supporting of several models . Similar study was done in ( Hanawa et al. , 2020 ) , where authors proposed evaluation criteria for instance-based explanation of decisions made by neural network and tested several metrics for measuring input similarity . In particular , they proposed the Identical subclass test which checks whether two objects considered similar are from the same subclass . According to the results of their experiments , the most qualitative approach is the approach presented in ( Charpiat et al. , 2019 ) , which proposed to measure similarity between objects using the gradients of a neural network . In experiments , the authors applied their approach to the analysis of the self-denoising phenomenon . Despite the fact that this method has theoretical guaranties and does not require to modify the model to use it , in practice , especially in real-time tasks , using gradients tends to increase the computation time and size of vector representation . This approach will be described in more detail in Section 2 . To avoid these problems , we propose a method that only uses outputs from the last hidden layer of a neural network and does not use a backward step to vectorize the input . In our research , we found that a correlation of neurons and insufficient width of the last hidden layer influence on the quality of representations obtained in implicit way . To solve these issues , we propose several modifications . First , we show that the weight matrix should be orthogonal . Second , we modify Batch-Normalization ( Ioffe & Szegedy , 2015 ) to obtain the necessary mathematical properties , and use it with dropout ( Srivastava et al. , 2014 ) to reduce the correlation caused by nonlinear activation functions . Using orthogonal weight matrices allows us to consider the neural network in terms of Random Projection method and evaluate the lower bound of the width of the last hidden layer . Our approach will be discussed in detail in Section 3 . Finally , in Section 4 we perform experiments on MNIST dataset and physical examination dataset ( Maxwell et al. , 2017 ) . We used these datasets to show that our approach can be applied for any type of data and combined with different architectures of neural networks . In both experiments , we split a set of labels into two disjoint subsets to train a neural network for binary classification problem , and then use this model to measure the similarity between input data and define hidden classes . We also cluster the inputs to evaluate how well objects from the same class are grouped together . Our experimental results show that the proposed approach achieves competitive results on the input similarity task while reducing both computation time and the size of the input representation . 2 RELATED WORKS . Using a trained neural network to measure similarity of inputs is a new research topic . In ( Charpiat et al. , 2019 ) the authors introduce the notion of object similarity from the neural network perspective . The main idea is as follows : how much would parameter variation that changed the output for x impact the output for x′ ? In principle , if the objects x and x′ are similar , then changing parameters should affect the outputs in a similar way . The following is a formal description for one- and multidimensional cases of the output value of a neural network . One-dimensional case Let fθ ( x ) ∈ R be a parametric function , in particular a neural network , x , x′ be input objects , θ ∈ Rnθ - model parameters , nθ - number of parameters . The authors proposed the following metric : ρθ ( x , x ′ ) = ∇θfθ ( x′ ) ∇θfθ ( x ) ||∇θfθ ( x′ ) || ||∇θfθ ( x ) || ( 1 ) In this way , the object similarity is defined as the cosine similarity between the gradients computed at these points . Multi-dimensional case Let fθ ( x ) ∈ Rd , d > 1 . In this case , the authors obtained the following metric : ρθ , d ( x , x ′ ) = 1 d Tr ( Kθ ( x , x ′ ) ) , ( 2 ) where Kθ ( x , x′ ) = K −1/2 x′ , x′Kx , x′K −1/2 x , x , and Kx′ , x = ∂fθ∂θ ∣∣∣ x′ ∂fθ ∂θ T ∣∣∣ x is calculated using the Jaco- bian matrix ∂fθ∂θ ∣∣∣ x . Summary Unlike using third-party models for vectorization , such as VGG , this approach allows us to use any pre-trained neural network to calculate the similarity of input data . To achieve this , authors use gradients of neural network as illustrated in equation 1 and equation 2 . This gradientbased solution takes into account all activations , which does not require the selection of a hidden layer for vectorization . However , it has a number of drawbacks . First of all , fast computation of gradients require additional computational resources . Second , the size of objects representation is nθ for one-dimensional output and nθ ∗d for multi-dimensional case . This means that increasing model complexity increases representation size and , as a result , can lead to large memory consumption . Motivation of this research is to develop an approach that reduces the size of the representation and uses only the forward pass of a trained neural network to work . In the next section , we will discuss the proposed approach in detail . 3 PROPOSED METHOD . In this paper , we suggest using outputs from the last hidden layer of a trained neural network to encode inputs . This representation has several advantages . First , the output of the last layer is usually low-dimensional , which allows us to get a smaller vector dimension . Second , and more importantly , on the last hidden layer the semantics of the original problem is taken into account to the greatest extent . For example , for a classification problem , data is theoretically linearly separable on the last hidden layer . Informally , this allows us to measure similarities within each class , which reduces false cases in terms of the original problem . This is extremely important for clustering spam campaigns , because this representation reduces the probability to group spam and legitimate messages together . However , as already mentioned in the section 1 , a neural network that is trained to solve a simple problem does not retain the quality of representaions needed to solve a more complex one . Due to this fact , it ’ s impossible to apply this representation as is . We have identified the main causes of this : a strong correlation of neurons and an insufficient size of the last hidden layer . Our goal is to avoid these in order to make the proposed vectorization reasonable . In practice , last hidden layers are usually fully connected . For this reason , we consider only this type of the last layer . In 3.1 , we show how to reduce correlation between neurons , and in 3.2 we offer an estimate of the lower bound of the size of the last hidden layer and prove that the proposed representation can be used for the input similarity problem . We introduce the following notation : 1. l ∈ { 0 , 1 , . . . , L } - layer number , where l = 0 - input layer ( source space ) , l = L - output layer , other - hidden layers . 2 . Nl - number of units in layer l 3. hl ∈ RNl - pre-activation vector 4 . Φ ( hl ) = ( φ ( hl,1 ) , . . . , φ ( hl , Nl ) ) - activation vector 5 . Wl ∈ RNl−1×Nl , bl ∈ RNl - weight matrix and bias vector 3.1 NEURON CORRELATION . The benefits of decorrelated representations have been studied in ( LeCun et al. , 2012 ) from an optimization viewpoint and in ( Cogswell et al. , 2015 ) for reducing overfitting . We consider the decorrelated representations from information perspective . Basically , correlation of neurons means that neurons provide similar information . Therefore , we gain less information from observing two neurons at once . This phenomenon may occur due to the fact that the neural network does not retain more information than is necessary to solve a particular task . Thus , only important features are highlighted . The example in Fig . 1A illustrates that the output values of two neurons are linearly dependent , which entails that many objects in this space are indistinguishable . On the contrary ( Fig . 1B ) , decorrelation of neurons provides more information and , as a result , the ability to distinguish most objects . In the following paragraphs , we identify the main causes of the correlation of neurons and suggest ways to prevent it . We decided to consider the correlations before and after activation of neurons separately . Reducing correlation of neurons before activation Statement 1 explains the main reason for the correlation that occurs before activation . Statement 1 . Suppose that for some layer l the following conditions are satisfied : 1 . E [ Φ ( hl ) ] = 0 2 . E [ Φ ( hl ) TΦ ( hl ) ] = σ2l I - covariance matrix as we required E [ Φ ( hl ) ] = 0 Then , in order for correlation not to occur on the layer l + 1 , it is necessary that the weight matrix Wl+1 be orthogonal , that is , satisfy the conditionW Tl+1Wl+1 = I The statement 1 shows that the first correlation factor on a fully connected layer is a non-orthogonal weight matrix , given that , if the input neurons do not correlate . See Appendix A.1 for proof of the statement 1 . During training , the network does not try to maintain this property , solving the problem at hand . Later in this paper , we will add regularization to penalize the loss function if the weights are not orthogonal . The corollary follows from the statement 1 , which gives the second condition for preventing correlation . This corollary states that the dimension of the layer l + 1 should be no greater than on the layer l. Otherwise , this leads to a correlation and does not increase information . See Appendix A.1 for proof this corollary . Corollary 1 . Suppose that the conditions of statement 1 are satisfied , then if the dimension Nl+1 > Nl , then there is certainly a pair of neurons hl+1 , i , hl+1 , j ; i 6= j : Cov ( hl+1 , i , hl+1 , j ) 6= 0 It should be noted that there are also the studies addressing orthogonal weight matrices ( Huang et al. , 2017 ; Jia et al. , 2019 ; Xie et al. , 2017 ) . However all of these works consider this topic from optimization perspective . In particular , in ( Cho & Lee , 2017 ) was proposed an approach for optimization of loss on the Stiefel manifold Vp ( Rn ) = { W ∈ Rn×p|W TW = I } to ensure orthonormality of weight matrices throughout training . To achieve this , they applied the orthogonality regularization ( 3 ) to require the Gram matrix of the weight matrix to be close to identity matrix . In our study we also use regularization ( 3 ) to ensure orthonormality of weight matrices . 1 2 L∑ l=1 λl ∣∣∣∣W Tl Wl − I∣∣∣∣2F , ( 3 ) Providing the necessary moments of neurons after activation In the statement 1 , we relied on the zero expected value and the same variance of units in the layer . But the nonlinear activation function does not guarantee the preservation of these properties . Due to this fact , we can not reason in the same way for the following layers . Therefore , we propose using an activation normalization approach similar to Batch-Normalization : φ̂ ( hl , i ) = γl φ ( hl , i ) − µφ ( hl , i ) √ σ2φ ( hl , i ) + , ( 4 ) where γl is a trainable scale parameter , µφ ( hl , i ) , σ 2 φ ( hl , i ) - parameters that are evaluated , as inIoffe & Szegedy ( 2015 ) . The difference compared to the standard Batch-Normalization is that the γl is the same for all neurons and we removed the βl , i parameters . This leads to an expected value of zero and the same variance γ2l of each unit in the layer . Reducing correlation of neurons after activation It should be noted that an activation function can also impact the formation of redundant features ( Ayinde et al. , 2019 ) . In particular , in this work we use tanh ( x ) ∈ ( −1 , 1 ) as the activation function . There are several methods that prevent formation of redundant features . In ( Cogswell et al. , 2015 ) was proposed DeCov loss which penalizes non-diagonal elements of estimated covariance matrix of hidden representation . In ( Desjardins et al. , 2015 ; Blanchette & Laganière , 2018 ; Huang et al. , 2018 ) were proposed approaches for learning decorrelation layers that perform the following transformation : Φ̃ ( hl ) = ( Φ ( hl ) − µΦ ( hl ) ) Σ − 12 Φ ( hl ) . All of these methods have a common drawback : they require estimating covariance matrices . Often in practice the size of mini-batch is much smaller than is needed for estimating covariance matrices . Therefore , the covariance matrix is often singular . Moreover , methods that use the decorrelation layer are computationally expensive when it comes to high-dimensional embeddings , since it is necessary to calculate the square root of the inverse covariance matrix . This is especially evident in wide neural networks . Besides , these techniques add a significant amount of parameters ∑L−1 l=1 N 2 l . As an alternative , we suggest using Dropout ( Srivastava et al. , 2014 ) , which prevents units from co-adapting too much and reduces the correlation between neurons during training stage in the layer in proportion to p - the probability of retaining a unit in the network . See Appendix A.2 for the proof of this statement . It is important to note that we apply normalization to the input data ( input layer l = 0 ) as well as Dropout , since it is not always possible to decorrelate data so that this does not affect the quality of training . Moreover , fully-connected layers are often used in more complex architectures , such as convolutional neural networks . Obviously , after convolution operations , transformed data will be correlated . In this case , we must apply dropout after the convolutional block in order to reduce the correlation of neurons and use the proposed approach for vectorization .
The paper studies the usage of the representations developed in the last layer of a neural network as a way to measure the similarity between input patterns. The fundamental idea revolves around the concept of orthogonal weight matrices, to decorrelate the activations of the neurons, and which would definitely enrich the internal representations developed by the neurons in the last hidden layer. In the paper, it is suggested to regularize during training to maintain the orthogonality of the weight matrices. Moreover, a variant of Batch Normalization is proposed. The method proposed in the paper is then experimentally applied and evaluated on two benchmark datasets (MNIST and Henan Renmin).
SP:504c896a68c2e0154232d2f2214e8a499d941b60
Learning to Actively Learn: A Robust Approach
This work proposes a procedure for designing algorithms for specific adaptive data collection tasks like active learning and pure-exploration multi-armed bandits . Unlike the design of traditional adaptive algorithms that rely on concentration of measure and careful analysis to justify the correctness and sample complexity of the procedure , our adaptive algorithm is learned via adversarial training over equivalence classes of problems derived from information theoretic lower bounds . In particular , a single adaptive learning algorithm is learned that competes with the best adaptive algorithm learned for each equivalence class . Our procedure takes as input just the available queries , set of hypotheses , loss function , and total query budget . This is in contrast to existing meta-learning work that learns an adaptive algorithm relative to an explicit , user-defined subset or prior distribution over problems which can be challenging to define and be mismatched to the instance encountered at test time . This work is particularly focused on the regime when the total query budget is very small , such as a few dozen , which is much smaller than those budgets typically considered by theoretically derived algorithms . We perform synthetic experiments to justify the stability and effectiveness of the training procedure , and then evaluate the method on tasks derived from real data including a noisy 20 Questions game and a joke recommendation task . 1 INTRODUCTION . Closed-loop learning algorithms use previous observations to inform what measurements to take next in a closed-loop in order to accomplish inference tasks far faster than any fixed measurement plan set in advance . For example , active learning algorithms for binary classification have been proposed that under favorable conditions require exponentially fewer labels than passive , random sampling to identify the optimal classifier ( Hanneke et al. , 2014 ) . And in the multi-armed bandits literature , adaptive sampling techniques have demonstrated the ability to identify the “ best arm ” that optimizes some metric with far fewer experiments than a fixed design ( Garivier & Kaufmann , 2016 ; Fiez et al. , 2019 ) . Unfortunately , such guarantees often either require simplifying assumptions that limit robustness and applicability , or appeal to concentration inequalities that are very loose unless the number of samples is very large ( e.g. , web-scale ) . The aim of this work is a framework that achieves the best of both worlds : algorithms that learn through simulated experience to be as effective as possible with a tiny measurement budget ( e.g. , 20 queries ) , while remaining robust due to adversarial training . Our work fits into a recent trend sometimes referred to as learning to actively learn ( Konyushkova et al. , 2017 ; Bachman et al. , 2017 ; Fang et al. , 2017 ; Boutilier et al. , 2020 ; Kveton et al. , 2020 ) which tunes existing algorithms or learns entirely new active learning algorithms by policy optimization . Previous works in this area learn a policy by optimizing with respect to data observed through prior experience ( e.g. , metalearning or transfer learning ) or an assumed explicit prior distribution of problem parameters ( e.g . the true weight vector for linear regression ) . In contrast , our approach makes no assumptions about what parameters are likely to be encountered at test time , and therefore produces algorithms that do not suffer from a potential mismatch of priors . Instead , our method learns a policy that attempts to mirror the guarantees of frequentist algorithms with instance dependent sample complexities : if the problem is hard you will suffer a large loss , if it is easy you will suffer little . The learning framework is general enough to be applied to many active learning settings of interest and is intended to be used to produce novel and robust high performing algorithms . The difference is that instead of hand-crafting hard instances that witness the difficulty of the problem , we use adversarial training inspired by the robust reinforcement learning literature to automatically train minimax policies . Embracing the use of a simulator allows our learned policies to be very aggressive while maintaining robustness . Indeed , this work is particularly useful in the setting where relatively few rounds of querying can be made , where concentration inequalities of existing algorithms are vacuous . To demonstrate the efficacy of our approach we implement the framework for the ( transductive ) linear bandit problem . This paradigm includes pure-exploration combinatorial bandits ( e.g. , shortest path , matchings ) as a special case which itself reduces to active binary classification . We empirically validate our framework on a simple synthetic experiment before turning our attention to datasets derived from real data including a noisy 20 questions game and a joke recommendation task . 2 PROPOSED FRAMEWORK FOR ROBUST LEARNING TO ACTIVELY LEARN . Whether learned or defined by an expert , any algorithm for active learning can be thought of as a policy from the perspective of reinforcement learning . At time t , based on an internal state st , the policy takes action xt and receives observation yt , which then updates the state and the process repeats . In our work , at time t the state st ∈ S is a function of the history { ( xi , yi ) } t−1i=1 such as its sufficient statistics . Without loss of generality , a policy π takes a state as input and defines a probability distribution over X so that at time t we have xt ∼ π ( st ) . Fix a horizon T . For t = 1 , 2 , . . . , T • state st ∈ S is a function of the history , { ( xi , yi ) } t−1i=1 , • action xt ∈ X is drawn at random from the distribution π ( st ) defined over X , and • next state st+1 ∈ S is constructed by taking action xt in state st and observing yt ∼ f ( ·|θ∗ , st , xt ) until the game terminates at time t = T and the policy receives loss LT . Note that LT is a random variable that depends on the tuple ( π , { ( xi , yi ) } Ti=1 , θ∗ ) . We assume that f is a distribution of known parameteric form to the policy ( e.g. , f ( ·|θ , s , x ) ≡ N ( 〈x , θ〉 , 1 ) ) but the parameter θ is unknown to the policy . Let Pπ , θ , Eπ , θ denote the probability and expectation under the probability law induced by executing policy π in the game with θ∗ = θ to completion . Note that Pπ , θ includes any internal randomness of the policy π and the random observations yt ∼ f ( ·|θ , st , xt ) . Thus , Pπ , θ assigns a probability to any trajectory { ( xi , yi ) } Ti=1 . For a given policy π and θ∗ = θ , the metric of interest we wish to minimize is the expected loss ` ( π , θ ) : = Eπ , θ [ LT ] where LT as defined above is the loss observed at the end of the episode . For a fixed policy π , ` ( π , θ ) defines a loss surface over all possible values of θ . This loss surface captures the fact that some values of θ are just intrinsically harder than others , but also that a policy may be better suited for some values of θ versus others . Example : In active binary classification , T is a label budget , X could be a set of images such that we can query the label of example image xt ∈ X , yt ∈ { −1 , 1 } is the requested binary label , and the loss LT is the classification error of a trained classifier on these collected labels . Finally , θx = p ( y = 1|x ) for all x ∈ X . More examples can be found in Appendix A . 2.1 INSTANCE DEPENDENT PERFORMANCE METRIC . We now define the sense in which we wish to evaluate a particular policy . For any fixed value of θ one could clearly design an algorithm that would maximize performance on θ , but then it might have very poor performance on some other value θ′ 6= θ . Thus , we would ideally like π to perform uniformly well over a set of θ ’ s that are all equivalent in a certain sense . Define a positive function C : Θ → ( 0 , ∞ ) that assigns a score to each θ ∈ Θ that intuitively captures the “ difficulty ” of a particular θ , and can be used as a partial ordering of Θ . Ideally , C ( θ ) is a monotonic transformation of ` ( π̃ , θ ) for some “ best ” policy π̃ that we will define shortly . We give the explicit C ( θ ) for the active binary classification example in Section 3 , further description of C in Section 2.2 , and more examples in Appendix A . For any set of problem instances Θ define ` ( π , Θ ) : = sup θ∈Θ ` ( π , θ ) . And for any r ≥ 0 , define Θ ( r ) = { θ : C ( θ ) ≤ r } . The quantity ` ( π , Θ ( r ) ) − infπ′ ` ( π′ , Θ ( r ) ) is then a function of r that describes the sub-optimality gap of a given policy π relative to an r-dependent baseline policy trained specifically for each r. For a fixed rk > 0 , a policy π that aims to minimize just ` ( π , Θ ( r ) ) might focus just on the hard instances ( i.e. , those with C ( θ ) close to r ) and there may exist a different policy π′ that performs far better than π on easier instances ( i.e. , those with C ( θ ) r ) . To avoid this , assuming supr ` ( π , Θ ( r ) ) − infπ′ ` ( π ′ , Θ ( r ) ) < ∞ , we define π∗ : = arg inf π sup r > 0 ( ` ( π , Θ ( r ) ) − inf π′ ` ( π′ , Θ ( r ) ) ) ( 1 ) as the policy that minimizes the worst case sub-optimality gap over all r > 0 . Figure 1 illustrates these definitions . Instead of computing infπ′ ` ( π′ , Θ ( r ) ) for all r , in practice we define a grid with an increasing sequence { rk } Kk=1 , to find an approximation to π∗ . We are now ready to state the goal of this work : Objective : Given an increasing sequence r1 < · · · < rK that indexes nested sets of problem instances of increasing difficulty , Θ ( r1 ) ⊂ Θ ( r2 ) ⊂ · · · ⊂ Θ ( rK ) , we wish to identify a policy π̂ that minimizes the maximum sub-optimality gap with respect to this sequence . Explicitly , we seek to learn π̂ : = arginf π max k≤K ( ` ( π , Θ ( rk ) ) − inf π′ ` ( π′ , Θ ( rk ) ) ) ( 2 ) where ` ( π , Θ ) : = sup θ∈Θ ` ( π , θ ) and ` ( π , θ ) is the expected loss incurred by policy π on instance θ . Note that as K → ∞ and supk rk+1 rk → 1 , ( 1 ) and ( 2 ) are essentially equivalent under benign smoothness conditions on C ( θ ) , in which case π̂ → π∗ . In practice , we choose a finite K where ΘrK contains all problems that can be solved within the budget T relatively accurately , and a small > 0 , where maxk rk+1 rk = 1 + . Furthermore , the objective in ( 2 ) is equivalent with π̂ = arginf π max k≤K ( ` ( π , Θ ( rk ) ) − ` ( πk , Θ ( rk ) ) ) where πk ∈ arg inf π sup θ : C ( θ ) ≤rk ` ( π , θ ) . We can efficiently solve this objective by first computing πk for all k ∈ [ K ] to obtain ` ( πk , Θ ( rk ) ) as benchmarks , and then use these benchmarks to train π̂ . 2.2 PICKING THE COMPLEXITY FUNCTION C ( θ ) We have defined an optimal policy in terms of a function C ( θ ) that determines a partial ordering over instances θ . This function can come from a heuristic that intuitively captures the difficulty of an instance . Or it can be defined and motivated from information theoretic lower bounds that often describe a general ordering , but are typically very loose relative to empirical performance . For example , consider the standard multi-armed bandit game where an agent has access to K distributions and in each round t ∈ [ T ] she chooses a distribution It ∈ [ K ] and observes a random variable in [ 0 , 1 ] with mean θIt . If her strategy is described by a policy π , once t reaches T she receives loss LT = maxi∈ [ K ] ∑T t=1 θi−θIt with expectation ` ( π , θ ) = E [ LT ] where the expectation is taken with respect to the randomness in the observations , and potentially any randomness of the policy . Under benign conditions , it is known that any policy must suffer ` ( π , θ ) & min { √ KT , ∑ i 6=∗ ( θ∗− θi ) −1 } where θ∗ = maxi∈ [ k ] θi ( Lattimore & Szepesvári , 2018 ) . Such a lower bound is an ideal candidate for C ( θ ) . We define a different C ( θ ) for our particular experiments of interest , and others are described in Appendix A . The bottom line is that any function C ( θ ) works , but if it happens to correspond to an information theoretic lower bound , the resulting policy will match the lower bound if it is achievable .
The paper "Learning to Actively Learn" proposes a differentiable procedure to design algorithms for adaptive data collection tasks. The framework is based on the idea of making use of a measure of problem convexity (each problem is parametrized by a parameter theta) to solve solving a min-max objective over policies. The rationale behind this objective is that the resulting policy of solving this min-max objective should be robust to the problem complexity. The algorithm then proceeds to sample problem instances and making use of a differentiable objective to find a policy parametrized by a parameter psi, which could be parametrizing a neural network.
SP:b5366ec9f9cf6d872098a4f610801990b35b29d7
A Technical and Normative Investigation of Social Bias Amplification
1 INTRODUCTION . The machine learning community is becoming increasingly cognizant of problems surrounding fairness and bias , and correspondingly a plethora of new algorithms and metrics are being proposed ( see e.g. , Mehrabi et al . ( 2019 ) for a review ) . The gatekeepers checking the systems to be deployed often take the form of fairness evaluation metrics , and it is vital that these be deeply investigated both technically and normatively . In this paper , we endeavor to do this for bias amplification . Bias amplification happens when a model exacerbates biases from the training data at test time . It is the result of the algorithm ( Foulds et al. , 2018 ) , and unlike other forms of bias , can not be solely attributed to the dataset . To this end , we propose a new way of measuring bias amplification , BiasAmp→ 1 , that builds off a prior metric from Men Also Like Shopping ( Zhao et al. , 2017 ) , that we will call BiasAmpMALS . Our metric ’ s technical composition aligns with the real-world qualities we want it to encompass , addressing a number of the previous metric ’ s shortcomings by being able to : 1 ) generalize beyond binary attributes , 2 ) take into account the base rates that people of each attribute appear , and 3 ) disentangle the directions of amplification . Concretely , consider a visual dataset ( Fig . 1 ) where each image has a label for the task , T , which is painting or not painting , and further is associated with a protected attribute , A , which is woman or man . If the gender of the person biases the prediction of the task , we consider this A→ T bias amplification ; if the reverse happens , then T → A . In our normative discussion , we discuss a few topics . We consider whether predicting protected attributes is necessary in the first place ; by not doing so , we can trivially remove T → A amplification . We also encourage the use of confidence intervals when using our metric because BiasAmp→ , along with other fairness metrics , suffers from the Rashomon Effect ( Breiman , 2001 ) , or multiplicity of good models . In deep neural networks , random seeds have relatively little impact on accuracy ; however , that is not the case for fairness , which is more brittle to randomness . 1The arrow in BiasAmp→ is meant to signify the direction that bias amplification is flowing , and not intended to be a claim about causality . Notably , a trait of bias amplification is that it is not at odds with accuracy , unlike many other fairness metrics , because the goal of not amplifying biases and matching task-attribute correlations is aligned with that of accurate predictions . For example , imagine a dataset where the positive outcome is associated at a higher rate with group A than with group B . A classifier that achieves 100 % accuracy at predicting the positive outcome is not amplifying bias ; however , according to metrics like demographic parity , this perfect classifier is still perpetuating bias because it is predicting the positive label at different rates for both groups . While matching training correlations is desired in object detection where systems should perfectly predict the labels , we will explore the nuances of what this means in situations where the validity of the labels , and thus task-attribute correlations themselves , are up for debate . For example , in the risk prediction task which assesses someone ’ s likelihood of recidivism , the label represents whether someone with a set of input features ended up recidivating , but is not a steadfast indicator of what another person with the same input features will do . Here , we would not want to replicate the task-attribute correlations at test time , and it is important to keep this in mind when deciding what fairness metrics to apply . The notion of amplification also allows us to encapsulate the idea that systemic harms and biases can be more harmful than errors made without such a history ( Bearman et al. , 2009 ) ; for example , in images overclassifying women as cooking carries more of a negative connotation than overclassifying men as cooking.2 Distinguishing between which errors are more harmful than others is a pattern that can often be lifted from the training data . To ground our work , we first distinguish what bias amplification captures that standard fairness metrics can not , and then distinguish BiasAmp→ from BiasAmpMALS . Our key contributions are : 1 ) proposing a new way to measure bias amplification , addressing multiple shortcomings of prior work and allowing us to better diagnose where a model goes wrong , and 2 ) providing a technical analysis and normative discussion around the use of this measure in diverse settings , encouraging thoughtfulness with each application . 2 RELATED WORK . Fairness Measurements . Fairness is nebulous and context-dependent , and approaches to quantifying it ( Verma & Rubin , 2018 ; Buolamwini & Gebru , 2018 ) include equalized odds ( Hardt et al. , 2016 ) , equal opportunity ( Hardt et al. , 2016 ) , demographic parity ( Dwork et al. , 2012 ; Kusner et al. , 2017 ) , fairness through awareness ( Dwork et al. , 2012 ; Kusner et al. , 2017 ) , fairness through unawareness ( Grgic-Hlaca et al. , 2016 ; Kusner et al. , 2017 ) , and treatment equality ( Berk et al. , 2017 ) . We examine bias amplification , which is a type of group fairness where correlations are amplified . Bias Amplification . Bias amplification has been measured by looking at binary classifications ( Leino et al. , 2019 ) , GANs ( Jain et al. , 2020 ; Choi et al. , 2020 ) , and correlations ( Zhao et al. , 2017 ) . Wang et al . ( 2019 ) measures this using dataset leakage and model leakage . The difference between these values is the level of bias amplification , but this is not a fair comparison because the 2We use the terms man and woman to refer to binarized socially-perceived gender expression , recognizing these labels are not inclusive , and in vision datasets are often assigned by annotators rather than self-disclosed . attribute classifier gets discrete labels for the former but continuous model outputs for the latter . Jia et al . ( 2020 ) looks at output distributions like we do , but with a different formulation . The Word Embedding Association Test ( WEAT ) ( Caliskan et al. , 2017 ) measures bias amplification in de-contextualized word embeddings , looking at correlations but not causations ( Bolukbasi et al. , 2016 ) . However , with newer models like BERT and ELMo that have contextualized embeddings , WEAT does not work ( May et al. , 2019 ) , so new techniques have been proposed incorporating context ( Lu et al. , 2019 ; Kuang & Davison , 2016 ) . We use these models to measure the directional aspect of these amplifications , as well as to situate them in the broader world of bias amplification . Directionality . Directionality of amplification has been observed in computer vision ( Stock & Cisse , 2018 ) and language ( Qian et al. , 2019 ) . It has also been studied with causality ( Bhattacharya & Vogt , 2007 ; Wooldridge , 2016 ; Pearl , 2010 ; Middleton et al. , 2016 ; Steiner & Yongnam , 2016 ) . We take a deeper and more empirical approach . Predictive Multiplicity . The Rashomon Effect ( Breiman , 2001 ) , or multiplicity of good models , has been studied in various contexts . The variables investigated that differ across good models include explanations ( Hancox-Li , 2020 ) , individual treatments ( Marx et al. , 2020 ; Pawelczyk et al. , 2020 ) , and variable importance ( Fisher et al. , 2019 ; Dong & Rudin , 2019 ) . We build on these discoveries and investigate how fairness measurements also differ between equally “ good ” models . 3 EXISTING FAIRNESS METRICS . In this section we present existing fairness metrics and show how bias amplification can distinguish errors resulting from under- and overclassification in a way that others can not , followed by a discussion of the shortcomings of BiasAmpMALS . 3.1 OVERVIEW OF EXISTING FAIRNESS METRICS . We begin with a review of existing fairness metrics in a concrete classification setting . We consider again the example from Fig . 1 , where on this dataset women ( a0 ) are correlated with painting ( t0 ) , and men ( a1 ) with not painting ( t1 ) , such that there are N images each of ( a0 , t0 ) and ( a1 , t1 ) but only N/2 images of ( a0 , t1 ) and ( a1 , t0 ) . A classifier trained to recognize painting on this data is likely to learn this association and over-predict painting on images of women and under-predict painting on images of men ; however , algorithmic interventions may counteract this effect and in fact result in the opposite behavior . Fig . 2 shows the behavior of fairness metrics under varying amounts of learned amplification of the correlation . The four fairness metrics are : False Positive Rate ( FPR ) and True Positive Rate ( TPR ) difference : the difference in false positive ( true positive ) rate of predicting the label t0 on images of a1 versus on images of a0 ( Chouldechova , 2016 ; Hardt et al. , 2016 ) , accuracy difference : difference between the overall task prediction accuracy on images of a1 versus on images of a0 ( Berk et al. , 2017 ) , and mean accuracy across subgroups : mean task prediction accuracy across the four image subgroups ( ( a0 , t0 ) , ( a1 , t0 ) , ( a0 , t1 ) , and ( a1 , t1 ) ) ( Buolamwini & Gebru , 2018 ) . However , these metrics are not designed to account for the training correlations , and are unable to distinguish between cases of increased or decreased learned correlations , as seen in Fig . 2 . Zhao et al . ( 2017 ) introduced an alternative to these that explicitly captures the notion of bias amplification . Concretely , they consider P ( A = a|T = t ) of the training data as the fraction of times a protected attribute a ∈ A appears on images corresponding to task t ∈ T . They then compare this with the test-time predictions made by the model , P ( Â = a|T̂ = t ) , or the number of times attribute a is predicted on images where the task is predicted as t , which allows them to measure bias amplification in the absence of any additional annotations on the hold-out set . Note that in this formulation they are assuming that the model is making predictions for both the task and the attribute . The full bias amplification metric ( reformulated in our terms ) , is computed as BiasAmpMALS = 1 |T | |T |∑ t=1 |A|∑ a=1 1 ( P ( Aa = 1|Tt = 1 ) > 1 |A| ) ︸ ︷︷ ︸ y ( t , a ) ( P ( Âa = 1|T̂t = 1 ) − P ( Aa = 1|Tt = 1 ) ) ︸ ︷︷ ︸ ∆ ( t , a ) ( 1 ) Fig . 2 empirically demonstrates that this metric is able to capture the level of increasing bias amplification . ( For consistency in comparison with prior metrics , we assume the model always correctly predicts the protected attribute A . ) However , as we discuss in the next section , there are some properties of bias amplification that this metric is not able to capture : for example , it does not distinguish between errors in predicting the protected attribute versus errors in predicting the task . Thus we introduce a new metric ( last graph of Fig . 2 ) which maintains the desirable properties from Zhao et al . ( 2017 ) while including a number of innovations .
The paper builds on the "bias amplification" aspect of fairness in machine learning literature i.e. the tendency of models to make predictions that are biased in a way that they amplify societal correlations. The paper claims three major contributions: a metric, discussion about the dependence of bias measurements on randomness, and a normative discussion about the use of bias amplification ideas in different domains.
SP:53254b85dc51beed47567630a243e95537bb65ed
Dynamic of Stochastic Gradient Descent with State-dependent Noise
1 INTRODUCTION . Deep learning has achieved great success in various AI applications , such as computer vision , natural language processing , and speech recognition ( He et al. , 2016b ; Vaswani et al. , 2017 ; He et al. , 2016a ) . Stochastic gradient descent ( SGD ) and its variants are the mainstream methods to train deep neural networks , since they can deal with the computational bottleneck of the training over large-scale datasets ( Bottou & Bousquet , 2008 ) . Although SGD can converge to the minimum in convex optimization ( Rakhlin et al. , 2012 ) , neural networks are highly non-convex . To understand the behavior of SGD on non-convex optimization landscape , on one hand , researchers are investigating the loss surface of the neural networks with variant architectures ( Choromanska et al. , 2015 ; Li et al. , 2018b ; He et al. , 2019b ; Draxler et al. , 2018 ; Li et al. , 2018a ) ; on the other hand , researchers illustrate that the noise in stochastic algorithm may make it escape from local minima ( Keskar et al. , 2016 ; He et al. , 2019a ; Zhu et al. , 2019 ; Wu et al. , 2019a ; HaoChen et al. , 2020 ) . It is clear that whether stochastic algorithms can escape from poor local minima and finally stop at a minimum with low generalization error is crucial to its test performance . In this work , we focus on the dynamic of SGD and its impact to generalization , especially the escaping efficiency from local minima . To study the dynamic behavior of SGD , most of the works consider SGD as the discretization of a continuous-time dynamic system and investigate its dynamic properties . There are two typical types of models to approximate dynamic of SGD . ( Li et al. , 2017 ; Zhou et al. , 2019 ; Liu et al. , 2018 ; Chaudhari & Soatto , 2018 ; He et al. , 2019a ; Zhu et al. , 2019 ; Hu et al. , 2019 ; Xie et al. , 2020 ) approximate the dynamic of SGD by Langevin dynamic with constant diffusion coefficient and proved its escaping efficiency from local minima.These works make over-simplified assumption that the covariance matrix of gradient noise is constant , although it is state-dependent in general . The simplified assumption makes the proposed dynamic unable to explain the empirical observation that the distribution of parameters trained by SGD is heavy-tailed ( Mahoney & Martin , 2019 ) . To model the heavy-tailed phenomenon , Simsekli et al . ( 2019 ) ; Şimşekli et al . ( 2019 ) point that the variance of stochastic gradient may be infinite , and they propose to approximate SGD by dynamic driven by α-stable process with the strong infinite variance condition . However , as shown in the work ( Xie et al. , 2020 ; Mandt et al. , 2017 ) , the gradient noise follows Gaussian distribution and the infinite variance condition does not satisfied . Therefore it is still lack of suitable theoretical explanation on the implicit regularization of dynamic of SGD . In this work , we conduct a formal study on the ( state-dependent ) noise structure of SGD and its dynamic behavior . First , we show that the covariance of the noise of SGD in the quadratic basin surrounding the local minima is a quadratic function of the state ( i.e. , the model parameter ) . Thus , we propose approximating the dynamic of SGD near the local minimum using a stochastic differential equation whose diffusion coefficient is a quadratic function of state . We call the new dynamic power-law dynamic . We prove that its stationary distribution is power-law κ distribution , where κ is the signal to noise ratio of the second order derivatives at local minimum . Compared with Gaussian distribution , power-law κ distribution is heavy-tailed with tail-index κ . It matches the empirical observation that the distribution of parameters becomes heavy-tailed after SGD training without assuming infinite variance of stochastic gradient in ( Simsekli et al. , 2019 ) . Second , we analyze the escaping efficiency of power-law dynamic from local minima and its relation to generalization . By using the random perturbation theory for diffused dynamic systems , we analyze the mean escaping time for power-law dynamic . Our results show that : ( 1 ) Power-law dynamic can escape from sharp minima faster than flat minima . ( 2 ) The mean escaping time for power-law dynamic is only in the polynomial order of the barrier height , much faster than the exponential order for dynamic with constant diffusion coefficient . Furthermore , we provide a PAC-Bayes generalization bound and show power-law dynamic can generalize better than dynamic with constant diffusion coefficient . Therefore , our results indicate that the state-dependent noise helps SGD to escape from sharp minima quickly and implicitly learn well-generalized model . Finally , we corroborate our theory by experiments . We investigate the distributions of parameters trained by SGD on various types of deep neural networks and show that they are well fitted by power-law κ distribution . Then , we compare the escaping efficiency of dynamics with constant diffusion or state-dependent diffusion to that of SGD . Results show that the behavior of power-law dynamic is more consistent with SGD . Our contributions are summarized as follows : ( 1 ) We propose a novel power-law dynamic with state-dependent diffusion to approximate dynamic of SGD based on both theoretical derivation and empirical evidence . The power-law dynamic can explain the heavy-tailed phenomenon of parameters trained by SGD without assuming infinite variance of gradient noise . ( 2 ) We analyze the mean escaping time and PAC-Bayes generalization bound for power-law dynamic and results show that power-law dynamic can escape sharp local minima faster and generalize better compared with the dynamics with constant diffusion . Our experimental results can support the theoretical findings . 2 BACKGROUND . In empirical risk minimization problem , the objective is L ( w ) = 1n ∑n i=1 ` ( xi , w ) , where xi , i = 1 , · · · , n are n i.i.d . training samples , w ∈ Rd is the model parameter , and ` is the loss function . Stochastic gradient descent ( SGD ) is a popular optimization algorithm to minimize L ( w ) . The update rule is wt+1 = wt − η · g̃ ( wt ) , where g̃ ( wt ) = 1b ∑ x∈Sb ∇w ` ( x , wt ) is the minibatch gradient calculated by a randomly sampled minibatch Sb of size b and η is the learning rate . The minibatch gradient g̃ ( wt ) is an unbiased estimator of the full gradient g ( wt ) = ∇L ( wt ) , and the term ( g ( wt ) − g̃ ( wt ) ) is called gradient noise in SGD . Langevin Dynamic In ( He et al. , 2019a ; Zhu et al. , 2019 ) , the gradient noise is assumed to be drawn from Gaussian distribution according to central limit theorem ( CLT ) , i.e. , g ( w ) − g̃ ( w ) ∼ N ( 0 , C ) , where covariance matrix C is a constant matrix for all w. Then SGD can be regarded as the numerical discretization of the following Langevin dynamic , dwt = −g ( wt ) dt+ √ ηC1/2dBt , ( 1 ) where Bt is a standard Brownian motion in Rd and √ ηC1/2dBt is called the diffusion term . α-stable Process Simsekli et al . ( 2019 ) assume the variance of gradient noise is unbounded . By generalized CLT , the distribution of gradient noise is α-stable distribution S ( α , σ ) , where σ is the α-th moment of gradient noise for given α with α ∈ ( 0 , 2 ] . Under this assumption , SGD is approximated by the stochastic differential equation ( SDE ) driven by an α-stable process . 2.1 RELATED WORK . There are many works that approximate SGD by Langevin dynamic and most of the theoretical results are obtained for Langevin dynamic with constant diffusion coefficient . From the aspect of optimization , the convergence rate of SGD and its optimal hyper-parameters have been studied in ( Li et al. , 2017 ; He et al. , 2018 ; Liu et al. , 2018 ; He et al. , 2018 ) via optimal control theory . From the aspect of generalization , Chaudhari & Soatto ( 2018 ) ; Zhang et al . ( 2018 ) ; Smith & Le ( 2017 ) show that SGD implicitly regularizes the negative entropy of the learned distribution . Recently , the escaping efficiency from local minima of Langevin dynamic has been studied ( Zhu et al. , 2019 ; Hu et al. , 2019 ; Xie et al. , 2020 ) . He et al . ( 2019a ) analyze the PAC-Bayes generalization error of Langevin dynamic to explain the generalization of SGD . The solution of Langevin dynamic with constant diffusion coefficient is Gaussian process , which does not match the empirical observations that the distribution of parameters trained by SGD is a heavy-tailed ( Mahoney & Martin , 2019 ; Hodgkinson & Mahoney , 2020 ; Gurbuzbalaban et al. , 2020 ) . Simsekli et al . ( 2019 ) ; Şimşekli et al . ( 2019 ) assume the variance of stochastic gradient is infinite and regard SGD as discretization of a stochastic differential equation ( SDE ) driven by an α-stable process . The escaping efficiency for the SDE is also shown in ( Simsekli et al. , 2019 ) . However , these theoretical results are derived for dynamics with constant diffusion term , although the gradient noise in SGD is state-dependent . There are some related works analyze state-dependent noise structure in SGD , such as label noise in ( HaoChen et al. , 2020 ) and multiplicative noise in ( Wu et al. , 2019b ) . These works propose new algorithms motivated by the noise structure , but they do not analyze the escaping behavior of dynamic of SGD and the impact to generalization . Wu et al . ( 2018 ) analyze the escaping behavior of SGD with considering the fluctuations of the second order derivatives and propose the concept linearly stability . In our work , we propose power-law dynamic to approximate SGD and analyze the stationary distribution and the mean escaping time for it . 3 APPROXIMATING SGD BY POWER-LAW DYNAMIC . In this section , we study the ( state-dependent ) noise structure of SGD ( in Section 3.1 ) and propose power-law dynamic to approximate the dynamic of SGD . We first study 1-dimensional power-law dynamic in Section 3.2 and extend it to high dimensional case in Section 3.3 . 3.1 NOISE STRUCTURE OF STOCHASTIC GRADIENT DESCENT . For non-convex optimization , we investigate the noise structure of SGD around local minima so that we can analyze the escaping efficiency from it . We first describe the quadratic basin where the local minimum is located . Suppose w∗ is a local minimum of the training loss L ( w ) and g ( w∗ ) = 0 . We name the -ball B ( w∗ , ) with center w∗ and radius as a quadratic basin if the loss function for w ∈ B ( w∗ , ) is equal to its second-order Taylor expansion as L ( w ) = L ( w∗ ) + 12 ( w − w ∗ ) TH ( w∗ ) ( w − w∗ ) . Here , H ( w∗ ) is the Hessian matrix of loss at w∗ , which is ( semi ) positive definite . Then we start to analyze the gradient noise of SGD . The full gradient of training loss is g ( w ) = H ( w∗ ) ( w − w∗ ) . The stochastic gradient is g̃ ( w ) = g̃ ( w∗ ) + H̃ ( w∗ ) ( w − w∗ ) by Taylor expansion where g̃ ( · ) and H̃ ( · ) are stochastic version of gradient and Hessian calculated by the minibatch . The randomness of gradient noise comes from two parts : g̃ ( w∗ ) and H̃ ( w∗ ) , which reflects the fluctuations of the first-order and second-order derivatives of the model at w∗ over different minibatches , respectively . The following proposition gives the variance of the gradient noise . Proposition 1 For w ∈ B ( w∗ , ) ⊂ R , the variance of gradient noise is σ ( g ( w ) − g̃ ( w ) ) = σ ( g̃ ( w∗ ) ) + 2ρ ( g̃ ( w∗ ) , H̃ ( w∗ ) ) ( w − w∗ ) + σ ( H̃ ( w∗ ) ) ( w − w∗ ) 2 , where σ ( · ) and ρ ( · , · ) are the variance and covariance in terms of the minibatch . From Proposition 1 , we can conclude that : ( 1 ) The variance of noise is finite if g̃ ( w∗ ) and H̃ ( w∗ ) have finite variance because ρ ( g̃ ( w∗ ) , H̃ ( w∗ ) ) ≤ √ σ ( g̃ ( w∗ ) ) · σ ( H̃ ( w∗ ) ) according to Cauchy–Schwarz inequality . For fixed w∗ , a sufficient condition for that g̃ ( w∗ ) and H̃ ( w∗ ) have finite variance is that the training data x are sampled from bounded domain . This condition is easy to be satisfied because the domain of training data are usually normalized to be bounded before training . In this case , the infinite variance assumption about the stochastic gradient in α-stable process is not satisfied . ( 2 ) The variance of noise is state-dependent , which contradicts the assumption in Langevin dynamic . Notations : For ease of the presentation , we use C ( w ) , σg , σH , ρg , H to denote σ ( g ( w ) − g̃ ( w∗ ) ) , σ ( g̃ ( w∗ ) ) , σ ( H̃ ( w∗ ) ) , ρ ( g̃ ( w∗ ) , H̃ ( w∗ ) ) in the following context , respectively . 1
This paper proposes an analysis for an approximate dynamic of SGD which captures the heavy-tailed noise distributions seen practically at local minima. The authors derive this new dynamic (which they call Power-law dynamic) using basic principles and the assumption that the noise variance depends on the state. The dynamics becomes a modified Langevin equation. They prove also that the expected time to escape a barrier is polynomial in the parameters, as well as a generalization error bound.
SP:016ad5eea3a81bb32ae907535e694d8171f996a5
On Linear Identifiability of Learned Representations
1 INTRODUCTION . An increasingly common methodology in machine learning is to improve performance on a primary down-stream task by first learning a high-dimensional representation of the data on a related , proxy task . In this paradigm , training a model reduces to fine-tuning the learned representations for optimal performance on a particular sub-task ( Erhan et al. , 2010 ) . Deep neural networks ( DNNs ) , as flexible function approximators , have been surprisingly successful in discovering effective high-dimensional representations for use in downstream tasks such as image classification ( Sharif Razavian et al. , 2014 ) , text generation ( Radford et al. , 2018 ; Devlin et al. , 2018 ) , and sequential decision making ( Oord et al. , 2018 ) . When learning representations for downstream tasks , it would be useful if the representations were reproducible , in the sense that every time a network relearns the representation function on the same data distribution , they were approximately the same , regardless of small deviations in the initialization of the parameters or the optimization procedure . In some applications , such as learning real-world causal relationships from data , such reproducible learned representations are crucial for accurate and robust inference ( Johansson et al. , 2016 ; Louizos et al. , 2017 ) . A rigorous way to achieve reproducibility is to choose a model whose representation function is identifiable in function space . Informally speaking , identifiability in function space is achieved when , in the limit of infinite data , there exists a single , global optimum in function space . Interestingly , Figure 1 exhibits learned representation functions that appear to be the same up to a linear transformation , even on finite data and optimized without convergence guarantees ( see Appendix A.1 for training details ) . In this paper , we account for Figure 1 by making precise the relationship it exemplifies . We prove that a large class of discriminative and autoregressive models are identifiable in function space , up to a linear transformation . Our results extend recent advances in the theory of nonlinear Independent Components Analysis ( ICA ) , which have recently provided strong identifiability results for generative models of data ( Hyvärinen et al. , 2018 ; Khemakhem et al. , 2019 ; 2020 ; Sorrenson et al. , 2020 ) . Our key contribution is to bridge the gap between these results and discriminative models , commonly used for representation learning ( e.g. , ( Hénaff et al. , 2019 ; Brown et al. , 2020 ) ) . The rest of the paper is organized as follows . In Section 2 , we describe a general discriminative model family , defined by its canonical mathematical form , which generalizes many supervised , self- supervised , and contrastive learning frameworks . In Section 3 , we prove that learned representations in this family have an asymptotic property desirable for representation learning : equality up to a linear transformation . In Section 4 , we show that this family includes a number of highly performant models , state-of-the-art at publication for their problem domains , including CPC ( Oord et al. , 2018 ) , BERT ( Devlin et al. , 2018 ) , and GPT-2 and GPT-3 ( Radford et al. , 2018 ; 2019 ; Brown et al. , 2020 ) . Section 5 investigates the actually realizable regime of finite data and partial optimization , showing that representations learned by members of the identifiable model family approach equality up to a linear transformation as a function of dataset size , neural network capacity , and optimization progress . 2 MODEL FAMILY AND DATA DISTRIBUTION . The learned embeddings of a DNN are a function not only of the parameters , but also the network architecture and size of dataset ( viewed as a sample from the underlying data distribution ) . This renders any analysis in full generality challenging . To make such an analysis tractable , in this section , we begin by specifying a set of assumptions about the underlying data distribution and model family that must hold for the learned representations to be similar up to a linear transformation . These assumptions are , in fact , satisfied by a number of already published , highly performant models . We establish definitions in this section , and discuss these existing approaches in depth in Section 4 . Data Distribution We assume the existence of a generalized dataset in the form of an empirical distribution pD ( x , y , S ) over random variables x , y and S with the following properties : • The random variable x is an input variable , typically high-dimensional , such as text or an image . • The random variable y is a target variable whose value the model predicts . In case of object classification , this would be some semantically meaningful class label . However , in our model family , y may also be a high-dimensional context variable , such a text , image , or sentence fragment . • S is a set containing the possible values of y given x , so pD ( y|x , S ) > 0 ⇐⇒ y ∈ S. Note that the set of labels S is not fixed , but a random variable . This allows supervised , contrastive , and self-supervised learning frameworks to be analyzed together : the meaning of S encodes the task . For supervised classification , S is deterministic and contains class labels . For self-supervised pretraining , S contains randomly-sampled high-dimensional variables such as image embeddings . For deep metric learning ( Hoffer and Ailon , 2015 ; Sohn , 2016 ) , the set S contains one positive and k negative samples of the class to which x belongs . Canonical Discriminative Form Given a data distribution as above , a generalized discriminative model family may be defined by its parameterization of the probability of a target variable y conditioned on an observed variable x and a set S that contains not only the true target label y , but also a collection of distractors y′ : pθ ( y|x , S ) = exp ( fθ ( x ) > gθ ( y ) ) ∑ y′∈S exp ( fθ ( x ) > gθ ( y′ ) ) , ( 1 ) The codomain of the functions fθ ( x ) and gθ ( y ) is RM , and the domains vary according to modelling task . For notational convenience both are parameterized by θ ∈ Θ , but f and g may use disjoint parts of θ , meaning that they do not necessarily share parameters . With F and G we denote the function spaces of fθ and gθ respectively . Our primary domain of interest is when fθ and gθ are highly flexible function approximators , such as DNNs . This brings certain analytical challenges . In neural networks , different choices of parameters θ can result in the same functions fθ and gθ , hence the map Θ → F × G is many-to-one . In the context of representation learning , the function fθ is typically viewed as a nonlinear feature extractor , e.g. , the learned representation of the input data . While other choices meet the membership conditions for the family defined by the canonical form of Equation ( 1 ) , in the remainder , we will focus on DNNs in the remainder . We next present a definition of identifiability suitable for DNNs , and prove that members of the above family satisfy it under additional assumptions . 3 MODEL IDENTIFIABILITY . In this section , we derive identifiability conditions for models in the family defined in Section 2 . 3.1 IDENTIFIABILITY IN PARAMETER SPACE . Identifiability analysis answers the question of whether it is theoretically possible to learn the parameters of a statistical model exactly . Specifically , given some estimator θ′ for model parameters θ∗ , identifiability is the property that , for any { θ′ , θ∗ } ⊂ Θ , pθ′ = pθ∗ =⇒ θ′ = θ∗ . ( 2 ) Models that do not have this property are said to be non-identifiable . This happens when different values { θ′ , θ∗ } ⊂ Θ can give rise to the same model distribution pθ′ ( y|x , S ) = pθ∗ ( y|x , S ) . In such a case , observing an empirical distribution pθ∗ ( y|x , S ) , and fitting a model pθ′ ( y|x , S ) to it perfectly does not guarantee that θ′ = θ∗ . Neural networks exhibit various symmetries in parameter space such that there is almost always a many-to-one correspondence between a choice of θ and resulting probability function pθ . A simple example in neural networks is that one can swap the ( incoming and outgoing ) connections of two neurons in a hidden layer . This changes the value of the parameters , but does not change the network ’ s function . Thus , when representation functions fθ or gθ are parameterized as DNNs , equation 2 is not satisfiable . 3.2 IDENTIFIABILITY IN FUNCTION SPACE . For reliable and efficient representation learning , we want learned representations fθ from two identifiable models to be sufficiently similar for interchangeable use in downstream tasks . The most general property we wish to preserve among learned representations is their ability to discriminate among statistical patterns corresponding to categorical groupings . In the model family defined in Section 2 , the data and context functions fθ and gθ parameterize pθ ( y|x , S ) , the probability of label assignment , through a normalized inner product . This induces a hyperplane boundary , for discrimination , in a joint space of learned representations for data x and context y . Therefore , in the following , we will derive identifiability conditions up to a linear transformation , using a notion of similarity in parameter space inspired by Hyvärinen et al . ( 2018 ) . Definition 1 . Let L∼ be a pairwise relation on Θ defined as : θ′ L∼ θ∗ ⇐⇒ fθ ′ ( x ) = Afθ∗ ( x ) gθ′ ( y ) = Bgθ∗ ( y ) ( 3 ) whereA andB are invertible M ×M matrices . See Appendix B for proof that L∼ is an equivalence relation . In the remainder , we refer to identifiability up to the equivalence relation L∼ as L∼-identifiable or linearly identifiable . 3.3 LINEAR IDENTIFIABILITY OF LEARNED REPRESENTATIONS . We next present a simple derivation of the L∼-identifiability of members of the generalized discriminative family defined in Section 2 . This result reveals sufficient conditions under which a discriminative probabilistic model pθ ( y|x , S ) has a useful property : the learned representations of the input x and target random variables y for any two pairs of parameters ( θ′ , θ∗ ) are related as θ′ L∼ θ∗ , that is , fθ′ ( x ) = Afθ∗ ( x ) and gθ′ ( y ) = Bgθ∗ ( y ) . We first review the notation for the proof , which is introduced in detail in Section 2 . We then highlight an important requirement on the diversity of the data distribution , which must be satisfied for the proof statement to hold . We prove the result immediately after . Notation . The target random variables y , associated with input random variables x , may be class labels ( as in supervised classification ) , or they could be stochastically generated from datapoints x as , e.g. , perturbed image patches ( as in self-supervised learning ) . We account for this additional stochasticity as a set-valued random variable S , containing all possible values of y conditioned on some x . For brevity , we will use shorthands that drop the parameters θ : p′ : = pθ′ , p∗ : = pθ∗ , f∗ : = fθ∗ , f ′ : = fθ′ , g ′ : = gθ′ . Diversity condition . We assume that for any ( θ′ , θ∗ ) for which it holds that p′ = p∗ , and for any given x , by repeated sampling S ∼ pD ( S|x ) and picking yA , yB ∈ S , we can construct a set of M distinct tuples { ( y ( i ) A , y ( i ) B ) } Mi=1 such that the matrices L′ and L∗ are invertible , where L′ consists of columns ( g′ ( y ( i ) A ) − g′ ( y ( i ) B ) ) , and L ∗ consists of columns g∗ ( y ( i ) A ) − g∗ ( y ( i ) B ) , i ∈ { 1 , . . . , M } . See Section 3.4 for detailed discussion . Theorem 1 . Under the diversity condition , models in the family defined by Equation ( 1 ) are linearly identifiable . That is , for any θ′ , θ∗ ∈ Θ , and f∗ , f ′ , g∗ , g′ , p∗ , p′ defined as in Section 2 , p′ = p∗ =⇒ θ′ L∼ θ∗ . ( 4 ) To establish the result , we proceed by directly constructing an invertible linear transformation that satisfies Definition 1 . Consider yA , yB ∈ S. The likelihood ratios for these points p′ ( yA|x , S ) p′ ( yB |x , S ) = p∗ ( yA|x , S ) p∗ ( yB |x , S ) ( 5 ) are equal . Substituting our model definition from equation ( 1 ) , we find : exp ( f ′ ( x ) > g′ ( yA ) ) exp ( f ′ ( x ) > g′ ( yB ) ) = exp ( f∗ ( x ) > g∗ ( yA ) ) exp ( f∗ ( x ) > g∗ ( yB ) ) , ( 6 ) where the normalizing constants cancelled out on the left- and right-hand sides . Taking the logarithm , this simplifies to : ( g′ ( yA ) − g′ ( yB ) ) > f ′ ( x ) = ( g∗ ( yA ) − g∗ ( yB ) ) > f∗ ( x ) . ( 7 ) Note that this equation is true for any triple ( x , yA , yB ) for which pD ( x , yB , yB ) > 0 . We next collect M distinct tuples ( y ( i ) A , y ( i ) B ) so that by repeating Equation ( 7 ) M times and by the diversity condition noted above , the resulting difference vectors are linearly independent . We collect these vectors together as the columns of ( M ×M ) -dimensional matrices L′ and L∗ , forming the following system of M linear equations : L′ > f ′ ( x ) = L∗ > f∗ ( x ) . Since L′ and L∗ are invertible , we rearrange : f ′ ( x ) = ( L∗L′−1 ) > f∗ ( x ) . ( 8 ) Hence , f ′ ( x ) = Af∗ ( x ) where A = ( L∗L′−1 ) . This completes the first half of the proof . See Appendix C for the second half of the proof , which is similar , and handles the function g .
In this paper, the authors address the model identifiability in a general setting that can be adapted to several recent deep learning models (DNN supervised learning, CPC, BERT and GPT). Since model parameters (NN weights) are not identifiable, the authors hypothesize that vector f and g can be identifiably up to a linear transformation. Although the purpose of the work is appealing, there are some issues related to the current structure of the paper, proposed theory and its relationship to the provided experiments. See my detailed comments and questions below:
SP:45ebf4f0cb747eadb32b5254b75d142755f67af6
Deep Quotient Manifold Modeling
1 INTRODUCTION . Real-world data are usually considered to involve a multi-manifold structure by having discrete features as well as continuous features ; continuous features such as size or location induce a smooth manifold structure in general , whereas discrete features such as digit-class or a new object in the background induce disconnections in the structure , making it a set of disjoint manifolds instead of a single ( Khayatkhoei et al. , 2018 ) . While this multiplicity makes modeling data a difficult problem , recently proposed deep generative models showed notable progresses by considering each manifold separately . Extending the conventional models by using multiple generators ( Khayatkhoei et al. , 2018 ; Ghosh et al. , 2017 ; Hoang et al. , 2018 ) , discrete latent variables ( Chen et al. , 2016 ; Dupont , 2018 ; Jeong and Song , 2019 ) , or mixture densities ( Gurumurthy et al. , 2017 ; Xiao et al. , 2018 ; Tomczak and Welling , 2018 ) , they exhibit improved performances in image generations and in learning high-level features . There are , however , two additional properties little considered by these models . First , since discrete features are both common and combinatorial , there can be exponentially many manifolds that are not included in the dataset . For example , an image dataset of a cat playing around in a room would exhibit a simple manifold structure according to the locations of the cat , but there are also numerous other manifolds derivable from it via discrete variations—such as placing a new chair , displacing a toy , turning on a light or their combinations—that are not included in the dataset ( see Fig . 1 ) . Second , while the manifolds to model are numerous considering such variations , they usually have the same generic structure since the underlying continuous features remain the same ; regardless of the chair , toy , or light , the manifold structures are equally due to the location of the cat . Considering these properties , desired is a model that can handle a large number of resembling manifolds , but the aforementioned models show several inefficiencies . They need proportionally many generators or mixture components to model a large number of manifolds ; each of them requires much data , only to learn the manifolds having the same generic structure . Moreover , even if they are successfully trained , new discrete changes are very easy to be made , yet they can not generalize beyond the trained manifolds . In this paper , we propose quotient manifold modeling ( QMM ) —a new generative modeling scheme that considers generic manifold structure independent of discrete features , thereby deriving efficiency in modeling and allowing generalization over untrained manifolds . QMM outwardly follows the multi-generator scheme ( Khayatkhoei et al. , 2018 ; Ghosh et al. , 2017 ; Hoang et al. , 2018 ) ; but it involves a new regularizer that enforces encoder compatibility—a condition that the inverse maps of the generators to be presented by a single deep encoder . Since deep encoders usually exhibit good generalizability , this condition not only makes a generic structure be shared among the generators but also makes it generalizable to untrained manifolds . In particular , it induces a generalizable equivalence relation between data , and the manifold structure of out-of-sample data can be derived by taking the quotient of this relation , hence the name QMM . Since the implementation of QMM is essentially adding a regularizer , it can be easily applied to existing deep generative models such as generative adversarial networks ( GANs ; ( Goodfellow et al. , 2014 ) ) , variational auto-encoders ( VAEs ; ( Kingma and Welling , 2013 ) ) , and their extensions . We demonstrate that these QMM-applied models not only show better FID scores but also show good generalizations . Our contributions can be summarized as follows : • We propose QMM , a new generative modeling scheme that considers generic manifold structure , thereby allowing generalizations over untrained manifolds . • We derive a regularizer enforcing encoder compatibility , an essential condition for QMM . • We show that GANs and VAEs implementing QMM show superior FID scores and generalize across different datasets . 2 BACKGROUND . 2.1 MANIFOLD MODELING IN GANS AND VAES . While generative adversarial networks ( GANs ) ( Goodfellow et al. , 2014 ) and variational autoencoders ( VAEs ) ( Kingma and Welling , 2013 ) are two different strands of models , they have the same data-modeling scheme that leads to a manifold structure ( though VAEs involve stochasticity ) . They model data x ∈ X as a transformation of a low-dimensional latent code z ∈ Z via a generative ( decoding ) map fG : Z → X , which makes every datum they consider lie on a subspace M = fG ( Z ) ⊂ X . Since fG can be assumed to be smooth and injective in practice ( Shao et al. , 2017 ) , M accords with the mathematical definition of a smooth manifold . But to deal with multi-manifold data , these models need to approximate disconnections in the structure with low densities . This requires them to have a highly nonlinear fG , which is difficult to learn and often leads to either a low-quality model or a mode collapse ( Khayatkhoei et al. , 2018 ) . 2.2 MULTI-MANIFOLD EXTENSIONS . To better model the multi-manifold structure , several studies proposed extended GAN and VAE models that consider each of the manifolds separately . According to which component is extended , the approaches can be broken down into the below three . While these approaches have advantages in dealing with multi-manifold data , they still show limiting performance in learning generic structure and do not allow generalization over untrained manifolds . 1 ) Multi-generators—x ( i ) = f ( i ) G ( z ) ( Khayatkhoei et al. , 2018 ; Ghosh et al. , 2017 ; Hoang et al. , 2018 ) . In this approach , each manifold is modeled by a separate generator . The generators are usually independent , but some models design them to share the weight parameters in a subset of the layers . This in part contributes to the learning of a generic structure , but lacks theoretical grounds and shows inferior performances ( see Appendix F ) . 2 ) Mixture density—x ( i ) = fG ( z ( i ) ) , where z ( i ) ∼ p ( i ) ( Gurumurthy et al. , 2017 ; Xiao et al. , 2018 ; Tomczak and Welling , 2018 ) . In this approach , each manifold is modeled by a separate mode of the latent distribution . While the modes outwardly share the generator , the actual mappings are effectively different from each other as they reside in different regions in Z . 3 ) Discrete latent variables—x ( i ) = fG ( [ z ; d ] ) ( Chen et al. , 2016 ; Dupont , 2018 ; Jeong and Song , 2019 ) . In this approach , discrete random variables are explicitly defined and concatenated to the continuous variable . Since discrete information is slowly blended in layer by layer , it can learn the generic structure to some degree , but not as clear ( see Table 1 ) . 3 QUOTIENT MANIFOLD MODELING ( QMM ) . QMM inherits the multi-generator scheme ( Khayatkhoei et al. , 2018 ; Ghosh et al. , 2017 ; Hoang et al. , 2018 ) , but involves an additional regularizer enforcing the encoder compatibility . Leaving the regularizer for the next section , we first explain the role of this compatibility as binding the generative maps . Then , we see how a plausible equivalence relation can be defined using a deep encoder . Lastly , we explain how a new manifold can be obtained by taking the quotient of the relation . 3.1 ENCODER COMPATIBILITY . Definition 1 . LetH be a set of encoding maps ( X → Z ) that can be represented by a deep encoder . We say that generative maps { f ( i ) G : Z →M ( i ) ⊂ X } Ai=1 have encoder compatibility if there exists hE ∈ H satisfying ( f ( i ) G ) −1 ( x ) = hE ( x ) for all x ∈M ( i ) and i . With this condition satisfied , the generative maps { f ( i ) G } i are no longer independent to each other but share a single X ↔ Z translation rule represented by the deep encoder hE ∈ H. However , this binding is meaningful only when H has a certain property ; otherwise , hE is just an extension of functions { ( f ( i ) G ) −1 } i giving no useful signal to { f ( i ) G } i . In practice , H indeed involves an important property that its elements—deep encoders—have good generalizability . Having numerous parameters , deep encoders could overfit data , but in practice they find the smoothest function exhibiting generalizability . For example , if a deep encoder is trained on images illustrated in Fig . 1 to output the position of the cat , we expect it would work fairly well even after we place a vase or turn on a light , generalizing over the discrete changes of the room condition . While this generalizing property is not fully understood to date ( there are several compelling theories ( Zhang et al. , 2016 ; Brutzkus et al. , 2018 ) ) , it has been consistently demonstrated by many deep recognition models ( e.g. , VGG-Net ( Simonyan and Zisserman , 2014 ) , Fast R-CNN ( Girshick , 2015 ) ) . In this regard , we assume its continuity and generalizability in developing our model , and verify them later from the experiments . 3.2 EQUIVALENCE RELATION AND QUOTIENT MANIFOLDS . Putting the generalizability of hE and the compatibility ( f ( i ) G ) −1 = hE together , we expect hE to output the continuous features z given data x . Then , there is a naturally induced equivalence relation ( called the kernel of hE ) x ( 1 ) ∼hE x ( 2 ) ⇐⇒ hE ( x ( 1 ) ) = hE ( x ( 2 ) ) , which effectively groups data having the same continuous features together regardless of the manifolds they are lying on . This can be seen more concretely in Fig . 1 . Assuming the model is well trained , it should have captured the crucial continuous feature—the location of the cat—in Z . Due to the encoder compatibility , such a feature should be encoded in Z smoothly , meaning that hE outputs the location information of the cat in a consistent and generalizable way , if not exactly calibrated . Given this , images having the cat on the same location , regardless of the chair , will have the same hE ( x ) , thus being equivalent under ∼hE ( ones on a green dotted curve ) . Since hE can generalize , the equivalence relation is consistent for data lying on an untrained manifold as well ( ones with the vase , drawn in purple ) . Now that the data lying on different manifolds are made equivalent under ∼hE , manifold structures are described as quotients of this relation . In implementations , taking the quotient is the same as taking the orthogonal directions to the equivalence-relation contours . In Fig . 1 , we can see that M ( 1 ) and M ( 2 ) , the manifolds that are included in the dataset , are already orthogonal to the contours formed from hE . When given an untrained image ( shown in purple ) , we can obtain the new manifold just by following the orthogonal directions . It will be explained later that this manifold can be described by a new generator , whose bias parameters are optimized for the manifold to pass through the given image ( see Sec . 5 ) .
The author extends generative models with multi-generators by restricting the generators to share weights and all bias to be regularized in order to enforce that the inverse maps of the generators can be represented by a single encoder. The regularizer proposed minimizes an upper bound the the sum of the bias variances. This extension is evaluated on a set of visual datasets (MNIST, 3DChair and UT-Zap50k) with respect to density estimation (evaluated with the FID score) and disentanglement (evaluated with their own disentanglement score).
SP:a3b2fa4479b45b1a59e573b452c73cae507485ba
Crowd-sourced Phrase-Based Tokenization for Low-Resourced Neural Machine Translation: The case of Fon Language
1 INTRODUCTION . We would like to start by sharing with you this Fon sentence : « m¢tà m¢tà w¢ zìnwó h¢n wa aligbo m¢ » . How would you tokenize this ? What happens if we implement the standard method of splitting the sentence into its word elements ( either using the space delimiter or using subword units ) ? m¢tà m¢tà w¢ zìnwó h¢n wa aligbo m¢ m¢tà m¢tà w¢ zìnwó h¢n wa aligbo m¢ Well we did that and discovered that a translation ( to French ) model , trained on sentences split this way , gave a literal translation of « chaque singe est entré dans la vie avec sa tête , son destin ( English : each monkey entered the stage of life with its head , its destiny ) » for the above Fon sentence . But we are not talking about a monkey here . It is a metaphor and so some of the words should be taken collectively as phrases . Using a phrase-based tokenizer , we got the following : m¢tà m¢tà w¢ zìnwó h¢n wa aligbo m¢ m¢tà m¢tà w¢ zìnwó h¢n wa aligbo m¢ A native speaker looking at some of these grouped phrases will quickly point out that some of the grouped phrases are wrong . Probably the phrase-based model could not effectively learn the phrases due to the low data it was trained on ? Also , we got a translation of « singe chaque vient au monde dans vie avec tête et destin ( English : monkey each comes into world in life with head and fate ) » . However , this translation is still not correct . The expression actually means « Every human being is born with chances » . Another interpretation would be that we must be open to changes , and constantly be learning to take advantages of each situation in life . One illustrative example , which we encourage the reader to try , is to go to Google Translate and try translating « it costs an arm and a leg » to your language ( native language or a language you understand ) . For the 20 languages we tried , all the translation results were wrong : literal and not fully conveying the true ( some would say phrasal ) expression or meaning . The expression « it costs an arm and a leg » , just means « it is expensive » . Now imagine a language with a sentence structure largely made up of such expressions – that is Fon . Tokenization is generally viewed as a solved problem . Yet , in practice , we often encounter difficulties in using standard tokenizers for NMT tasks , as shown above with Fon . This may be because of special tokenization needs for particular domains ( like medicine ( He & Kayaalp , 2006 ; Cruz Díaz & Maña López , 2015 ) ) , or languages . Fon , one of the five classes of the Gbe language clusters ( Aja , Ewe , Fon , Gen , and Phla-Phera according to ( Capo , 2010 ) ) , is spoken by approximately 1.7 million people located in southwestern Nigeria , Benin , Togo , and southeastern Ghana . There exists approximately 53 different dialects of Fon spoken throughout Benin . Fon has complex grammar and syntax , is very tonal and diacritics are highly influential ( Dossou & Emezue , 2020 ) . Despite being spoken by 1.7 million speakers , Joshi et al . ( 2020 ) have categorized Fon as « left behind » or « understudied » in NLP . This poses a challenge when using standard tokenization methods . Given that most Fon sentences ( and by extension most African languages ) are like the sentence example given above ( or the combination of such expressions ) , there is a need to re-visit tokenization of such languages . In this paper , using Fon in our experiment , we examine standard tokenization methods , and introduce the Word-Expressions-Based ( WEB ) tokenization . Furthermore , we test our tokenization strategy on the FonFrench and French-Fon translation tasks . Our main contributions are the dataset , our analysis and the proposal of WEB for extremely low-resourced African languages ( ALRLs ) . The dataset , models and codes will be open-sourced on our Github page . 2 BACKGROUND AND MOTIVATION . Modern NMT models usually require large amount of parallel data in order to effectively learn the representations of morphologically rich source and target languages . While proposed solutions , such as transfer-learning from a high-resource language ( HRL ) to the low-resource language ( LRL ) ( Gu et al. , 2018 ; Renduchintala et al. , 2018 ; Karakanta et al. , 2018 ) , and using monolingual data ( Sennrich et al. , 2016a ; Zhang & Zong , 2016 ; Burlot & Yvon , 2018 ; Hoang et al. , 2018 ) , have proved effective , they are still not able to produce better translation results for most ALRLs . Standard tokenization methods , like Subword Units ( SU ) ( Sennrich et al. , 2015 ) , inspired by the byte-pair-encoding ( BPE ) ( Gage , 1994 ) , have greatly improved current NMT systems . However , studies have shown that BPE does not always boost performance of NMT systems for analytical languages ( Abbott & Martinus , 2018 ) . Ngo et al . ( 2019 ) show that when morphological differences exist between source and target languages , SU does not significantly improve results . Therefore , there is a great need to revisit NMT with a focus on low-resourced , morphologically complex languages like Fon . This may involve taking a look at how to adapt standard NMT strategies to these languages . 3 TOKENIZATION STRATEGIES AND THEIR CHALLENGES FOR FON . In this section , we briefly discuss the standard tokenization strategies employed in NMT , as well as challenges faced while applying them to Fon . Word-Based tokenization ( WB ) consists of splitting sentences into words , according to a delimiter . We ’ ll show the limits of this method using this Fon expression : « un ¡o ganji » . « un » on its own is an interjection , to express an emotion of surprise or astonishment . But « un ¡o » already means `` I am '' , `` I am at '' , or `` I have '' , depending on the context in which it is used . The whole expression , « un ¡o ganji » , could mean `` I am fine '' or `` I am okay '' . Phrase-Based tokenization ( PhB ) encodes phrases ( group of words ) as atomic units , instead of words . As a result , models trained on PhB have the ability to learn and interpret language-specific phrases ( noun , verbal and prepositional phrases ) , making it better than WB for Fon language . However , due to the lowresourcedness of the language and the randomness of PhB alignments , some extracted pairs are not always contextually faultless . For example , the computer alignment gave respectively [ z¢n , une ( a , an , one ) ] and [ azªn , la ( the ) ] , instead of [ z¢n , une marmite ( a pot ) ] and [ azªn , la maladie ( the disease ) ] . Encoding with SU has made great headway in NMT , especially due to its ability to effectively encode rare out-of-vocabulary words ( Sennrich et al. , 2016b ) . Machácek et al . ( 2018 ) , in analyzing the word segmentation for NMT , reported that the common property of BPE and SU relies on the distribution of character sequences , but disregards any morphological properties of the languages in question . Apart from rule-based tokenization , there are machine learning approaches to tokenization as well , which unfortunately require a substantial amount of training samples ( both original and tokenized versions of the same texts ) ( Riley , 1989 ; Mikheev , 2000 ; Jurish & Würzner , 2013 ) . To the best of our knowledge , there is no known language-specific tokenization proposed for ALRLs , although there have been a number of works on adapting NMT specifically to them ( like ( Orife et al. , 2020 ; van Biljon et al. , 2020 ; Vaswani et al. , 2017 ) , to mention but a few ) . 4 WORD-EXPRESSIONS-BASED TOKENIZATION ( WEB ) . WEB involves aligning and extracting meaningful expressions based on linguistic components of Fon ( phonemes , morphemes , lexemes , syntax , and context ) . This requires the assistance of Fon-French native speakers . Some examples of good alignments are nªncé︸ ︷︷ ︸−→ maman ( mum ) ku¡o jigbézǎn︸ ︷︷ ︸−→ joyeux anniversaire ( Happy Birthday ) nªncé viv¢︸ ︷︷ ︸−→ maman chérie ( dear mum ) ¡o ji¡i¡e ¡o wutu cé à︸ ︷︷ ︸ nªnvi cé︸ ︷︷ ︸ It is important to note that WEB is not a human-in-the-loop process , because it doesn ’ t require human intervention to run . The human intervention occurs while cleaning and preprocessing the dataset . Although not perfect yet , we describe our algorithm as a recursive search algorithm , which looks and finds the most optimal combination of words and expressions which will produce a better translation for a source sentence . The following algorithm was designed to encode and decode sentences using the established vocabularies : 1 . Run through the vocabulary and output a list L of all possible word combinations of words and expressions appearing in the sentence S. 2 . Important principle in Fon : higher word orders = more precise and meaningful expressions . Using this principle , for each element ( word or expression ) , w ∈ L , ( a ) Check if there exists a higher word order , v ∈ L , such that w ( v. ( b ) If 2a is true , discard w , else keep w. 3 . The output is a list L̂ of optimal expressions that from the initial L , making up the initial sentence S. 4 . Add < start > and < end > taggers respectively at the beginning and the end of every element ŵ ( word or expression ) ∈ L̂ . 5 . Encode every ŵ ( word or expression ) ∈ L̂ We argue that WEB scales well because it does not require any linguistic annotations but knowledge and intuitions from bilinguals , meaning , we can crowdsource those phrases . We want to state clearly , in order to avoid any confusion , that WEB is another version of PhB , involving human evaluation . For our study , it took a group of 8 people , all bilinguals speaking Fon and French , and 30 days to align and extract meaningful sentences manually . No preliminary trainings have been done with the annotators , given the fact that they are in majority linguists and natives of the Fon language . This made the step of sentences splitting into expressions , more natural , reliable and faster . 5 THE FON-FRENCH DATASET : DATA COLLECTION , CLEANING AND EXPANSION PROCESSES . As our goal is to create a reliable translation system to be used by the modern Fon-speaking community , we set out to gather more data on daily conversations domain for this study . Thanks to many collaborations with Fon-French bilinguals , journalists and linguists , we gathered daily citations , proverbs and sentences with their French translations . After the collection ’ s stage , we obtained a dataset of 8074 pairs of Fon-French sentences . The cleaning process , which involved the Fon-French bilinguals , mainly consisted of analyzing the contextual meanings of the Fon sentences , and checking the quality of the French translations . In many cases , where the French translations were really bad , we made significant corrections . Another major observation was the presence of many long and complex sentences . That ’ s where the idea of expanding the dataset came from : we proceeded to split , when possible , Fon sentences into short , independent , and meaningful expressions ( expression of 1-6 words ) , and accordingly add their respective French translations . At the end of these processes , we obtained our final dataset of 25,383 pairs of Fon-French sentences . The experiments , described in this paper , were conducted using the final dataset . We strongly believe that involving the Fon-French bilinguals into the cleaning process , greatly improved the quality of the dataset . In fact , many initial translation errors were disregarded by standard , rule-based tokenization ( like WB , PhB and SU ) and cleaning techniques1 . However , with the help of the intuitive or natural language knowledge of the Fon-French bilinguals , bunch of those errors have been fixed . This highlights , the importance of having native speakers of ALRLs to clean and review the dataset , during the initial stages of its compilation . 1Using Python Regex and String packages ( https : //docs.python.org/3/library/re.html ) together with NLTK preprocessing library ( https : //www.nltk.org/ )
The authors investigate different tokenization methods for the translation between French and Fon (an African low-resource language). This means that they compare different ways to construct the input and output vocabularies of a neural machine translation (NMT) system. They further propose their own way to create those units, based on phrases, which is called WEB.
SP:021a44760567c1cf821f9388b6812a24aa708755
Federated Continual Learning with Weighted Inter-client Transfer
1 INTRODUCTION . Continual learning ( Thrun , 1995 ; Kumar & Daume III , 2012 ; Ruvolo & Eaton , 2013 ; Kirkpatrick et al. , 2017 ; Schwarz et al. , 2018 ) describes a learning scenario where a model continuously trains on a sequence of tasks ; it is inspired by the human learning process , as a person learns to perform numerous tasks with large diversity over his/her lifespan , making use of the past knowledge to learn about new tasks without forgetting previously learned ones . Continual learning is a long-studied topic since having such an ability leads to the potential of building a general artificial intelligence . However , there are crucial challenges in implementing it with conventional models such as deep neural networks ( DNNs ) , such as catastrophic forgetting , which describes the problem where parameters or semantic representations learned for the past tasks drift to the direction of new tasks during training . The problem has been tackled by various prior work ( Kirkpatrick et al. , 2017 ; Lee et al. , 2017 ; Shin et al. , 2017 ; Riemer et al. , 2019 ) . More recent works tackle other issues , such as scalability or order-robustness ( Schwarz et al. , 2018 ; Hung et al. , 2019 ; Yoon et al. , 2020 ) . However , all of these models are fundamentally limited in that the models can only learn from its direct experience - they only learn from the sequence of the tasks they have trained on . Contrarily , humans can learn from indirect experience from others , through different means ( e.g . verbal communications , books , or various media ) . Then wouldn ’ t it be beneficial to implement such an ability to a continual learning framework , such that multiple models learning on different machines can learn from the knowledge of the tasks that have been already experienced by other clients ? One problem that arises here , is that due to data privacy on individual clients and exorbitant communication cost , it may not be possible to communicate data directly between the clients or between the server and clients . Federated learning ( McMahan et al. , 2016 ; Li et al. , 2018 ; Yurochkin et al. , 2019 ) is a learning paradigm that tackles this issue by communicating the parameters instead of the raw data itself . We may have a server that receives the parameters locally trained on multiple clients , aggregates it into a single model parameter , and sends it back to the clients . Motivated by our intuition on learning from indirect experience , we tackle the problem of Federated Continual Learning ( FCL ) where we perform continual learning with multiple clients trained on private task sequences , which communicate their task-specific parameters via a global server . Figure 1 ( a ) depicts an example scenario of FCL . Suppose that we are building a network of hospitals , each of which has a disease diagnosis model which continuously learns to perform diagnosis given CT scans , for new types of diseases . Then , under our framework , any diagnosis model which has learned about a new type of disease ( e.g . COVID-19 ) will transmit the task-specific parameters to the global server , which will redistribute them to other hospitals for the local models to utilize . This allows all participants to benefit from the new task knowledge without compromising the data privacy . Yet , the problem of federated continual learning also brings new challenges . First , there is not only the catastrophic forgetting from continual learning , but also the threat of potential interference from other clients . Figure 1 ( b ) describes this challenge with the results of a simple experiment . Here , we train a model for MNIST digit recognition while communicating the parameters from another client trained on a different dataset . When the knowledge transferred from the other client is relevant to the target task ( SVHN ) , the model starts with high accuracy , converge faster and reach higher accuracy ( green line ) , whereas the model underperforms the base model if the transferred knowledge is from a task highly different from the target task ( CIFAR-10 , red line ) . Thus , we need to selective utilize knowledge from other clients to minimize the inter-client interference and maximize inter-client knowledge transfer . Another problem with the federated learning is efficient communication , as communication cost could become excessively large when utilizing the knowledge of the other clients , since the communication cost could be the main bottleneck in practical scenarios when working with edge devices . Thus we want the knowledge to be represented as compactly as possible . To tackle these challenges , we propose a novel framework for federated continual learning , Federated Weighted Inter-client Transfer ( FedWeIT ) , which decomposes the local model parameters into a dense base parameter and sparse task-adaptive parameters . FedWeIT reduces the interference between different tasks since the base parameters will encode task-generic knowledge , while the task-specific knowledge will be encoded into the task-adaptive parameters . When we utilize the generic knowledge , we also want the client to selectively utilize task-specific knowledge obtained at other clients . To this end , we allow each model to take a weighted combination of the task-adaptive parameters broadcast from the server , such that it can select task-specific knowledge helpful for the task at hand . FedWeIT is communication-efficient , since the task-adaptive parameters are highly sparse and only need to be communicated once when created . Moreover , when communication efficiency is not a critical issue as in cross-silo federated learning ( Kairouz et al. , 2019 ) , we can use our framework to incentivize each client based on the attention weights on its task-adaptive parameters . We validate our method on multiple different scenarios with varying degree of task similarity across clients against various federated learning and local continual learning models . The results show that our model obtains significantly superior performance over all baselines , adapts faster to new tasks , with largely reduced communication cost . The main contributions of this paper are as follows : • We introduce a new problem of Federated Continual Learning ( FCL ) , where multiple models continuously learn on distributed clients , which poses new challenges such as prevention of inter-client interference and inter-client knowledge transfer . • We propose a novel and communication-efficient framework for federated continual learn- ing , which allows each client to adaptively update the federated parameter and selectively utilize the past knowledge from other clients , by communicating sparse parameters . 2 RELATED WORK . Continual learning While continual learning ( Kumar & Daume III , 2012 ; Ruvolo & Eaton , 2013 ) is a long-studied topic with a vast literature , we only discuss recent relevant works . Regularizationbased : EWC ( Kirkpatrick et al. , 2017 ) leverages Fisher Information Matrix to restrict the change of the model parameters such that the model finds solution that is good for both previous and the current task , and IMM ( Lee et al. , 2017 ) proposes to learn the posterior distribution for multiple tasks as a mixture of Gaussians . Architecture-based : DEN ( Yoon et al. , 2018 ) tackles this issue by expanding the networks size that are necessary via iterative neuron/filter pruning and splitting , and RCL ( Xu & Zhu , 2018 ) tackles the same problem using reinforcement learning . APD ( Yoon et al. , 2020 ) additively decomposes the parameters into shared and task-specific parameters to minimize the increase in the network complexity . Coreset-based : GEM variants ( Lopez-Paz & Ranzato , 2017 ; Chaudhry et al. , 2019 ) minimize the loss on both of actual dataset and stored episodic memory . FRCL ( Titsias et al. , 2020 ) memorizes approximated posteriors of previous tasks with sophisticatedly constructed inducing points . To the best of our knowledge , none of the existing approaches considered the communicability for continual learning of deep neural networks , which we tackle . CoLLA ( Rostami et al. , 2018 ) aims at solving multi-agent lifelong learning with sparse dictionary learning , but it is not applicable to federated learning or continual deep learning . Federated learning Federated learning is a distributed learning framework under differential privacy , which aims to learn a global model on a server while aggregating the parameters learned at the clients on their private data . FedAvg ( McMahan et al. , 2016 ) aggregates the model trained across multiple clients by computing a weighted average of them based on the number of data points trained . FedProx ( Li et al. , 2018 ) trains the local models with a proximal term which restricts their updates to be close to the global model . FedCurv ( Shoham et al. , 2019 ) aims to minimize the model disparity across clients during federated learning by adopting a modified version of EWC . Recent works Yurochkin et al . ( 2019 ) ; Wang et al . ( 2020 ) introduce well-designed aggregation policies by leveraging Bayesian non-parametric methods . A crucial challenge of federated learning is the reduction of communication cost . TWAFL ( Chen et al. , 2019 ) tackles this problem by performing layer-wise parameter aggregation , where shallow layers are aggregated at every step , but deep layers are aggregated in the last few steps of a loop . Karimireddy et al . ( 2020 ) suggests an algorithm for rapid convergence , which minimizes the interference among discrepant tasks at clients by sacrificing the local optimality . This is an opposite direction from personalized federated learning methods ( Fallah et al. , 2020 ; Lange et al. , 2020 ; Deng et al. , 2020 ) which put more emphasis on the performance of local models . FCL is a parallel research direction to both , and to the best of our knowledge , ours is the first work that considers task-incremental learning of clients under federated learning framework . 3 FEDERATED CONTINUAL LEARNING WITH FEDWEIT . Motivated by the human learning process from indirect experiences , we introduce a novel continual learning under federated learning setting , which we refer to as Federated Continual Learning ( FCL ) . FCL assumes that multiple clients are trained on a sequence of tasks from private data stream , while communicating the learned parameters with a global server . We first formally define the problem in Section 3.1 , and then propose naive solutions that straightforwardly combine the existing federated learning and continual learning methods in Section 3.2 . Then , following Section 3.3 and 3.4 , we discuss about two novel challenges that are introduced by federated continual learning , and propose a novel framework , Federated Weighted Inter-client Transfer ( FedWeIT ) which can effectively handle the two problems while also reducing the client-to-sever communication cost . 3.1 PROBLEM DEFINITION . In the standard continual learning ( on a single machine ) , the model iteratively learns from a sequence of tasks { T ( 1 ) , T ( 2 ) , ... , T ( T ) } where T ( t ) is a labeled dataset of tth task , T ( t ) = { x ( t ) i , y ( t ) i } Nt i=1 , which consists of Nt pairs of instances x ( t ) i and their corresponding labels y ( t ) i . Assuming the most realistic situation , we consider the case where the task sequence is a task stream with an unknown arriving order , such that the model can access T ( t ) only at the training period of task t which becomes inaccessible afterwards . Given T ( t ) and the model learned so far , the learning objective at task t is as follows : minimizeθ ( t ) L ( θ ( t ) ; θ ( t−1 ) , T ( t ) ) , where θ ( t ) is a set of the model parameters at task t. We now extend the conventional continual learning to the federated learning setting with multiple clients and a global server . Let us assume that we have C clients , where at each client cc ∈ { c1 , . . . , cC } trains a model on a privately accessible sequence of tasks { T ( 1 ) c , T ( 2 ) c , ... , T ( t ) c } ⊆ T . Please note that there is no relation among the tasks T ( t ) 1 : c received at step t , across clients . Now the goal is to effectively train C continual learning models on their own private task streams , via communicating the model parameters with the global server , which aggregates the parameters sent from each client , and redistributes them to clients .
This paper investigates a new problem – federated continual learning by Federated Weighted Inter-client Transfer. The key idea is to decompose the network weights into global federated parameters and sparse task-specific parameters such that each client can selectively receive knowledge from other clients by taking a weighted combination of their task-specific parameters. The experiment results in two contrived datasets demonstrate the effectiveness of the proposed method.
SP:dc569d8f517e19b940c774679a98c14eb8272919
Sparse Quantized Spectral Clustering
1 INTRODUCTION . Sparsifying , quantizing , and/or performing other entry-wise nonlinear operations on large matrices can have many benefits . Historically , this has been used to develop iterative algorithms for core numerical linear algebra problems ( Achlioptas & McSherry , 2007 ; Drineas & Zouzias , 2011 ) . More recently , this has been used to design better neural network models ( Srivastava et al. , 2014 ; Dong et al. , 2019 ; Shen et al. , 2020 ) . A concrete example , amenable to theoretical analysis and ubiquitous in practice , is provided by spectral clustering , which can be solved by retrieving the dominant eigenvectors of XTX , for X = [ x1 , . . . , xn ] ∈ Rp×n a large data matrix ( Von Luxburg , 2007 ) . When the amount of data n is large , the Gram “ kernel ” matrix XTX can be enormous , impractical even to form and leading to computationally unaffordable algorithms . For instance , Lanczos iteration that operates through repeated matrix-vector multiplication suffers from an O ( n2 ) complexity ( Golub & Loan , 2013 ) and quickly becomes burdensome . One approach to overcoming this limitation is simple subsampling : dividing X into subsamples of size εn , for some ε ∈ ( 0 , 1 ) , on which one performs parallel computation , and then recombining . This leads to computational gain , but at the cost of degraded performance , since each data point xi looses the cumulative effect of comparing to the whole dataset . An alternative cost-reduction procedure consists in uniformly randomly “ zeroing-out ” entries from the whole matrix XTX , resulting in a sparse matrix with only an ε fraction of nonzero entries . For spectral clustering , by focusing on the eigenspectrum of the “ zeroed-out ” matrix , Zarrouk et al . ( 2020 ) showed that the same computational gain can be achieved at the cost of a much less degraded performance : for n/p rather large , almost no degradation is observed down to very small values of ε ( e.g. , ε ≈ 2 % for n/p & 100 ) . Previous efforts showed that it is often advantageous to perform sparsification/quantization in a nonuniform manner , rather than uniformly ( Achlioptas & McSherry , 2007 ; Drineas & Zouzias , 2011 ) . The focus there , however , is often on ( non-asymptotic bounds of ) the approximation error between the original and the sparsified/quantized matrices . This , however , does not provide a direct access to the actual performance for spectral clustering or other downstream tasks of interest , e.g. , since the top eigenvectors are known to exhibit a phase transition phenomenon ( Baik et al. , 2005 ; Saade et al. , 2014 ) . That is , they can behave very differently from those of the original matrix , even if the matrix after treatment is close in operator or Frobenius norm to the original matrix . Here , we focus on a precise characterization of the eigenstructure of XTX after entry-wise nonlinear transformation such as sparsification or quantization , in the large n , p regime , by performing simultaneously non-uniform sparsification and/or quantization ( down to binarization ) . We consider a simple mixture data model with x ∼ N ( ±µ , Ip ) and let K ≡ f ( XTX/ √ p ) / √ p , where f is an entry-wise thresholding/quantization operator ( thereby zeroing-out/quantizing entries of XTX ) ; and we prove that this leads to significantly improved performances , with the same computational cost , in spectral clustering as uniform sparsification , but for a much reduced cost in storage induced by quantization . The only ( non-negligible ) additional cost arises from the extra need for evaluating each entry of XTX . Our main technical contribution ( of independent interest , e.g. , for those interested in entry-wise nonlinear transformations of feature matrices ) consists in using random matrix theory ( RMT ) to derive the large n , p asymptotics of the eigenspectrum of K = f ( XTX/ √ p ) / √ p for a wide range of functions f , and then comparing to previously-established results for uniform subsampling and sparsification in ( Zarrouk et al. , 2020 ) . Experiments on real-world data further corroborate our findings . Our main contributions are the following . 1 . We derive the limiting eigenvalue distribution of K as n , p→∞ ( Theorem 1 ) , and we identify : ( a ) the existence of non-informative and isolated eigenvectors of K for some f ( Corollary 1 ) ; ( b ) in the absence of such eigenvectors , a phase transition in the dominant eigenvalue-eigenvector ( λ̂ , v̂ ) pair ( Corollary 2 ) : if the signal-to-noise ratio ( SNR ) ‖µ‖2 of the data exceeds a certain threshold γ , then λ̂ becomes isolated from the main bulk ( Von Luxburg , 2007 ; Joseph & Yu , 2016 ; Baik et al. , 2005 ) and v̂ contains data class-structure information exploitable for clustering ; if not , then v̂ contains only noise and is asymptotically orthogonal to the class-label vector . 2 . Letting f be a sparsification , quantization , or binarization operator , we show : ( a ) a selective non-uniform sparsification operator , such that XTX can be drastically sparsified with very little degradation in clustering performance ( Proposition 1 and Section 4.2 ) , which significantly outperforms the random uniform sparsification scheme in ( Zarrouk et al. , 2020 ) ; ( b ) for a given matrix storage budget ( i.e. , fixed number of bits to store K ) , an optimal design of the quantization/binarization operators ( Proposition 2 and Section 4.3 ) , the performances of which are compared against the original XTX and its sparsified but not quantized version . For spectral clustering , the surprisingly small performance drop , accompanied by a huge reduction in computational cost , contributes to improved algorithms for large-scale problems . More generally , our proposed analysis sheds light on the effect of entry-wise nonlinear transformations on the eigenspectra of data/feature matrices . Thus , looking forward ( and perhaps more importantly , given the use of nonlinear transformations in designing modern neural network models as well as the recent interest in applying RMT to neural network analyses ( Dobriban et al. , 2018 ; Li & Nguyen , 2018 ; Seddik et al. , 2018 ; Jacot et al. , 2019 ; Liu & Dobriban , 2019 ) ) , we expect that our analysis opens the door to improved analysis of computationally efficient methods for large dimensional machine learning and neural network models more generally . 2 SYSTEM MODEL AND PRELIMINARIES . Basic setup . Let x1 , . . . , xn ∈ Rp be independently drawn ( not necessarily uniformly ) from a two-class mixture of C1 and C2 with C1 : xi = −µ+ zi , C2 : xi = +µ+ zi ( 1 ) with zi ∈ Rp having i.i.d . zero-mean , unit-variance , κ-kurtosis , sub-exponential entries , µ ∈ Rp such that ‖µ‖2 → ρ ≥ 0 as p → ∞ , and v ∈ { ±1 } n with [ v ] i = −1 for xi ∈ C1 and +1 for xi ∈ C2.1 The data matrix X = [ x1 , . . . , xn ] ∈ Rp×n can be compactly written as X = Z + µvT 1The norm ‖ · ‖ is the Euclidean norm for vectors and the operator norm for matrices . for Z = [ z1 , . . . , zn ] so that ‖v‖ = √ n and both Z , µvT have operator norm of order O ( √ p ) in the n ∼ p regime . In this setting , the Gram ( or linear kernel ) matrix XTX achieves optimal clustering performance on the mixture model ( 1 ) ; see Remark 1 below . However , it consists of a dense n× n matrix , which becomes quickly expensive to store or to perform computation on , as n increases . Thus , we consider instead the following entry-wise nonlinear transformation of XTX : K = { δi 6=jf ( x T i xj/ √ p ) / √ p } n i , j=1 ( 2 ) for f : R → R satisfying some regularity conditions ( see Assumption 1 below ) , where δi 6=j equals 1 for i 6= j and equals 0 otherwise . The diagonal elements f ( xTi xi/ √ p ) ( i ) bring no additional information for clustering and ( ii ) do not scale properly for p large ( xTi xi/ √ p = O ( √ p ) instead of O ( 1 ) ) . Thus , following ( El Karoui , 2010 ; Cheng & Singer , 2013 ) , they are discarded . Most of our technical results hold for rather generic functions f , e.g. , those of interest beyond sparse quantized spectral clustering , but we are particularly interested in f with nontrivial numerical properties ( e.g. , promoting quantization and sparsity ) : Sparsification : f1 ( t ) = t · 1|t| > √2s ( 3 ) Quantization : f2 ( t ) = 22−M ( bt · 2M−2/ √ 2sc+ 1/2 ) · 1|t|≤√2s + sign ( t ) · 1|t| > √2s ( 4 ) Binarization : f3 ( t ) = sign ( t ) · 1|t| > √2s . ( 5 ) Here , s ≥ 0 is some truncation threshold , and M ≥ 2 is a number of information bits.2 The visual representations of these fs are given in Figure 1- ( left ) . For f3 , taking s→ 0 leads to the sign function sign ( t ) . In terms of storage , the quantization f2 consumes 2M−2 +1 bits per nonzero entry , while the binarization f3 takes values in { ±1 , 0 } and thus consumes 1 bit per nonzero entry . Random matrix theory . To provide a precise description of the eigenspectrum of K for the nonlinear f of interest , to be used in the context of spectral clustering , we will provide a large dimensional characterization for the resolvent of K , defined for z ∈ C \ R+ as Q ( z ) ≡ ( K− zIn ) −1 . ( 6 ) This matrix , which plays a central role in RMT analysis ( Bai & Silverstein , 2010 ) , will be used in two primary ways . First , the normalized trace 1n tr Q ( z ) is the so-called Stieltjes transform of the eigenvalue distribution of K , from which the eigenvalue distribution can be recovered , and be further used to characterize the phase transition beyond which spectral clustering becomes theoretically possible ( Corollary 2 ) . Second , for ( λ̂ , v̂ ) , an “ isolated ” eigenvalue-eigenvector pair of K , and a ∈ Rn , a deterministic vector , by Cauchy ’ s integral formula , the “ angle ” between v̂ and a is given by |v̂Ta|2 = − 12πı ∮ Γ ( λ̂ ) aTQ ( z ) a dz , where Γ ( λ̂ ) is a positively oriented contour surrounding λ̂ only . Letting a = v , this will be exploited to characterize the spectral clustering error rate ( Proposition 1 ) . From a technical perspective , unlike linear random matrix models , K ( and thus Q ( z ) ) involves nonlinear dependence between its entries . To break this difficulty , following the ideas of ( Cheng & Singer , 2013 ) , we exploit the fact that , by the central limit theorem , zTi zj/ √ p → N ( 0 , 1 ) in distribution as p → ∞ . As such , up to µvT , which is treated separately with a perturbation argument , the entries of K asymptotically behave like a family of dependent standard Gaussian variables to which f is applied . Expanding f in a series of orthogonal polynomials with respect to the Gaussian measure allows for “ unwrapping ” this dependence . A few words on the theory of orthogonal polynomials ( Andrews et al. , 1999 ) are thus convenient to pursue our analysis . Orthogonal polynomial framework . For a probability measure µ , let { Pl ( x ) , l ≥ 0 } be the orthonormal polynomials with respect to 〈f , g〉 ≡ ∫ fgdµ obtained by the Gram-Schmidt procedure on the monomials { 1 , x , x2 , . . . } , such that P0 ( x ) = 1 , Pl is of degree l and 〈Pl1 , Pl2〉 = δl1−l2 . By the Riesz-Fischer theorem ( Rudin , 1964 , Theorem 11.43 ) , for any function f ∈ L2 ( µ ) , the set of square-integrable functions with respect to 〈· , ·〉 , one can formally expand f as f ( x ) ∼ ∞∑ l=0 alPl ( x ) , al = ∫ f ( x ) Pl ( x ) µ ( dx ) ( 7 ) 2Also , here , b·c denotes the floor function , while erf ( x ) = 2√ π ∫ x 0 e−t 2 dt and erfc ( x ) = 1−erf ( x ) denotes the error function and complementary error function , respectively . where “ f ∼ ∑∞ l=0 alPl ” indicates that ‖f − ∑L l=0 alPl‖ → 0 as L→∞ with ‖f‖2 = 〈f , f〉 . To investigate the asymptotic behavior of K , as n , p→∞ , we make the following assumption on f . Assumption 1 ( Square-integrable in Gauss space ) . Let ξp = zTi zj/ √ p and Pl , p ( x ) be the orthonor- mal polynomials with respect to the measure µp of ξp . For f ∈ L2 ( µp ) , f ( x ) ∼ ∑∞ l=0 al , pPl , p ( x ) with al , p in ( 7 ) such that ( i ) ∑∞ l=0 al , pPl , p ( x ) µp ( dx ) converges in L 2 ( µp ) to f ( x ) uniformly over large p ; and ( ii ) as p→∞ , ∑∞ l=1 a 2 l , p → ν and , for l = 0 , 1 , 2 , al , p → al converges with a0 = 0 . Since ξp → N ( 0 , 1 ) in distribution , the parameters a0 , a1 , a2 and ν are simply moments of the standard Gaussian measure involving f . More precisely , for ξ ∼ N ( 0 , 1 ) , a0 = E [ f ( ξ ) ] , a1 = E [ ξf ( ξ ) ] , √ 2a2 = E [ ξ2f ( ξ ) ] − a0 , ν = E [ f2 ( ξ ) − a20 ] ≥ a21 + a22 . ( 8 ) Imposing the condition a0 = 0 simply discards the non-informative rank-one matrix a01n1Tn/ √ p from K. The three parameters ( a1 , a2 , ν ) are of crucial significance in determining the spectral behavior of K ( see Theorem 1 below ) .The sparse f1 , quantized f2 , and binary f3 of our primary interest all satisfy Assumption 1 ( counterexample exists though , for example f ( x ) = eP ( x ) for polynomial P ( x ) of degree greater than two ) , with their corresponding a2 = 0 ( as we shall see in Corollary 1 below , this is important for the spectral clustering use case ) and a1 , ν given in Figure 1- ( right ) . With these preliminary comments , we are in position to present our main technical results .
This work considers the effect of sparsification, quantization and non-linear transormations on the spectrum of a random matrix with respect to performance in downstream applications like clustering. Eigen decomposition of large matrices is computationally very expensive and therefore methods like sparsification is used in order to reduce the computational complexity, while adding some amount of error. Therefore, theoretical bounds which quantize the amount of deviation because of such processing steps is essential to understand how much/little degraded the performance of machine learning applications are because of this step. This work considers the important case of spectral clustering with a 2 class mixture of subexponential models using
SP:517da79468af9d50729358716877de22c41431a9
Recurrent Independent Mechanisms
Learning modular structures which reflect the dynamics of the environment can lead to better generalization and robustness to changes which only affect a few of the underlying causes . We propose Recurrent Independent Mechanisms ( RIMs ) , a new recurrent architecture in which multiple groups of recurrent cells operate with nearly independent transition dynamics , communicate only sparingly through the bottleneck of attention , and are only updated at time steps where they are most relevant . We show that this leads to specialization amongst the RIMs , which in turn allows for dramatically improved generalization on tasks where some factors of variation differ systematically between training and evaluation . 1 INTRODUCTION . Physical processes in the world often have a modular structure , with complexity emerging through combinations of simpler subsystems . Machine learning seeks to uncover and use regularities in the physical world . Although these regularities manifest themselves as statistical dependencies , they are ultimately due to dynamic processes governed by physics . These processes are often independent and only interact sparsely . For instance , we can model the motion of two balls as separate independent mechanisms even though they are both gravitationally coupled to Earth as well as ( weakly ) to each other . They may , however , occasionally strongly interact via collisions . The notion of independent or autonomous mechanisms has been influential in the field of causal inference , where it is applied not only to dynamic processes but also to time independent datasets . For instance , it has been argued that the conditional distribution of the average annual temperature given the altitude of a place is an abstraction of a causal mechanism ( subsuming complex physical processes involving air pressure , etc . ) that is independent of the distribution of the altitudes of settlements ( Peters et al. , 2017 ) , and will thus apply invariantly for , say , different countries in the same climate zone with different altitude distributions . A complex generative model , temporal or not , can be thought of as the composition of independent mechanisms or “ causal ” modules . In the causality community , this is often considered a prerequisite of being able to perform localized interventions upon variables determined by such models ( Pearl , 2009 ) . It has been argued that the individual modules tend to remain robust or invariant even as other modules change , e.g. , in the case of distribution shift ( Schölkopf et al. , 2012 ; Peters et al. , 2017 ) . One may hypothesize that if a brain is able to solve multiple problems beyond a single i.i.d . ( independent and identically distributed ) task , it would be economical to learn structures aligned with this , by learning independent mechanisms that can flexibly be reused , composed and re-purposed . In the dynamic setting , we think of an overall system being assayed as composed of a number of fairly independent subsystems that evolve over time , responding to forces and interventions . A learning agent then need not devote equal attention to all subsystems at all times : only those aspects that significantly interact need to be considered jointly when taking a decision or forming a plan ( Bengio , 2017 ) . Such sparse interactions can reduce the difficulty of learning since few interactions need to be considered at a time , reducing unnecessary interference when a subsystem is adapted . Models learned this way may be more likely to capture the compositional generative ( or causal ) structure of the world , and thus better generalize across tasks where a ( small ) subset of mechanisms change while most of them remain invariant ( Simon , 1991 ; Peters et al. , 2017 ; Parascandolo et al. , 2018 ) . The central question motivating our work is how a machine learning approach can learn independent but sparsely interacting recurrent mechanisms in order to benefit from such modularity . 2 RECURRENT INDEPENDENT MECHANISMS WITH SPARSE INTERACTIONS . Our approach to modelling a dynamical system of interest divides the overall model into k small subsystems ( or modules ) , each of which is recurrent in order to be able to capture dynamics . We refer to these subsystems as Recurrent Independent Mechanisms ( RIMs ) , where each RIM has distinct functions that are learned automatically from data1 . We refer to RIM k at time step t as having state ht , k , where t = 1 , . . . , T . Each RIM has parameters θk , which are shared across all time steps . At a high level ( see . Fig . 1 ) , we want each RIM to have its own independent dynamics operating by default , and occasionally to interact with other relevant RIMs and with selected elements of the encoded input . The total number of parameters can be kept small since RIMs can specialize on simple sub-problems , similar to Parascandolo et al . ( 2018 ) . This specialization and modularization not only has computational and statistical advantages ( Baum & Haussler , 1989 ; Bengio et al. , 2019 ) , but also prevents individual RIMs from dominating and modelling complex , composite mechanisms . We expect this to lead to more robust systems than training one big homogeneous neural network ( Schmidhuber , 2018 ) . Moreover , modularity also has the desirable implication that a RIM should maintain its own independent functionality even as other RIMs are changed . A more detailed account of the desiderata for the model is given in Appendix A . 2.1 INDEPENDENT RIM DYNAMICS . Now , consider the default transition dynamics which we apply for each RIM independently and during which no information passes between RIMs . We use h̃ for the hidden state after the independent dynamics are applied ( and before attention is applied ) . First , for the RIMs which are not activated ( we refer to the activated set as St ) , the hidden state remains unchanged : h̃t+1 , k = ht , k ∀k /∈ St. ( 1 ) Note that the gradient still flows through a RIM on a step where it is not activated . For the RIMs that are activated , we run a per-RIM independent transition dynamics . The form of this is somewhat flexible , but in this work we opted to use either a GRU ( Chung et al. , 2015 ) or an LSTM ( Hochreiter & Schmidhuber , 1997 ) . We generically refer to these independent transition dynamics as Dk , and we emphasize that each RIM has its own separate parameters . Aside from being RIM-specific , the internal operation of the LSTM and GRU remain unchanged , and the active RIMs are updated by h̃t+1 , k = Dk ( ht , k ) = LSTM ( ht , k , A ( in ) k ; θ ( D ) k ) ∀k ∈ St ( 2 ) as a function of the attention mechanism A ( in ) k applied on the current input , described in the next two subsections below , after explaining the key-value mechanism used to select arguments for this update . 1Note that we are using the term mechanism both for the mechanisms that make up the world ’ s dynamics as well as for the computational modules that we learn to model those mechanisms . 2.2 KEY-VALUE ATTENTION TO PROCESS SETS OF NAMED INTERCHANGEABLE VARIABLES . Each RIM should be activated and updated when the input is relevant to it . We thus utilize competition to allocate representational and computational resources . As argued by Parascandolo et al . ( 2018 ) , this tends to produce independence among learned mechanisms , provided the training data has been generated by a set of independent physical mechanisms . In contrast to Parascandolo et al . ( 2018 ) , we use an attention mechanism for this purpose . In doing so , we are inspired by findings from experimental psychology in the study of the interplay of top-down attention and bottom-up information flow , conceptualized in the biased competition theory of selective attention ( Desimone & Duncan , 1995 ) : A brain ’ s capacity for parallel processing of complex entities is limited , and many brain systems representing visual information use competition ( operating in parallel across the visual field ) to allocate resources , often biased by feedback from higher brain areas . The introduction of content-based soft-attention mechanisms ( Bahdanau et al. , 2014 ) has opened the door to neural networks which operate on sets of typed interchangeable objects . This idea has been remarkably successful and widely applied to most recent Transformer-style multi-head dot product self attention models ( Vaswani et al. , 2017 ; Santoro et al. , 2018 ) , achieving new state-of-the-art results in many tasks . Soft-attention uses the product of a query ( or read key ) Q of dimensionality Nr × d matrix Q , and d dimension of each key ) to a set of No objects each associated with a key ( or write-key ) matrix KT ( No × d ) , and after normalization with a softmax yields outputs in the convex hull of the values ( or write-values ) Vi ( row i of matrix V ) . Its result is computed as Attention ( Q , K , V ) = softmax ( QKT√ d ) V , where the softmax is applied to each row of its argument matrix , yielding a set of convex weights . As a result , one obtains a convex combination of the values V . If the attention is focused on one element for a particular row ( i.e. , the softmax is saturated ) , this simply selects one of the objects and copies its value to row j of the result . Note that the d dimensions in the key can be split into heads which then have their attention matrix and write values computed separately . When the inputs and outputs of each RIM are a set of objects or entities ( each associated with a key and value vector ) , the RIM processing becomes a generic object-processing machine which can operate on “ variables ” in a sense analogous to variables in a programming language : as interchangeable arguments of functions . Because each object has a key embedding ( which one can understand both as a name and as a type ) , the same RIM processing can be applied to any variable which fits an expected `` distributed type '' ( specified by a query vector ) . Each attention head then corresponds to a typed argument of the function computed by the RIM . When the key of an object matches the query , it can be used as input for the RIM . Whereas in regular neural networks ( without attention ) neurons operate on fixed variables ( the neurons which are feeding them from the previous layer ) , the key-value attention mechanisms make it possible to select on the fly which variable instance ( i.e . which entity or object ) is going to be used as input for each of the arguments of the RIM dynamics , with a different set of query embeddings for each RIM . These inputs can come from the external input or from the output of other RIMs . So , if the individual RIMs can represent these “ functions with typed arguments , ” then they can “ bind ” to whatever input is currently available and best suited according to its attention score : the “ input attention ” mechanism would look at the candidate input object ’ s key and evaluate if its “ type ” matches with what this RIM expects ( specified in the query ) .
The authors argue that the world consists of largely independent causal mechanisms that sparsely interact. The authors propose a new kind of recurrent network (RIM) that presumably distills this world view into inductive biases. RIMs consist of largely independent recurrent modules that are sparsely activated and interact through soft attention. They tested RIMs on a number of supervised and reinforcement learning tasks, and showed that RIMs perform better than LSTMs and several other more recently proposed networks (e.g., Differential Neural Computers, Relational Memory Core, etc.) in these tasks. In particular, RIMs can generalize more naturally than other networks to out-of-distribution test set in presumably modular tasks.
SP:351283f0a33b5d1eb8d54d4fb74e93f0505b051c
Deep Reinforcement Learning with Causality-based Intrinsic Reward
1 INTRODUCTION . Reinforcement learning ( RL ) is a powerful approach towards dealing with sequential decisionmaking problems . Combined with deep neural networks , deep reinforcement learning ( DRL ) has been applied in a variety of fields such as playing video games ( Mnih et al. , 2015 ; Vinyals et al. , 2019 ; Berner et al. , 2019 ) , mastering the game of Go ( Silver et al. , 2016 ) and robotic control ( Riedmiller et al. , 2018 ) . However , current DRL algorithms usually learn a black box policy approximated by a deep neural network directly using the state transitions and reward signals , without explicitly understanding the structure information of the environment . Compared with DRL agents , an important reason why humans are believed to be better at learning is the ability to build model on the relations between entities in the environment and then reason based on it . This ability is an important component of human cognition ( Spelke & Kinzler , 2007 ) . As the learning process continues , through interactions with the environment and observations of it , human can gradually understand its actions ’ causal effects on the entities as well as the relations between entities and then reason based on them to figure it out the most important actions to take in order to improve the efficiency . In scenarios that contain multiple entities with complicated relations , optimal policy may be obtained only when the structured relation information is captured and exploited . However , most current DRL algorithms do not consider structured relation information explicitly . The knowledge learned by an agent is implicitly entailed in the policy or action-value function , which are usually unexplainable neural networks . Therefore , whether the relations are well understood and exploited by the agent is unknown . When the environment is with high complexity , blackbox learning of policies suffers from low efficiency , while policy learning over explicit representation of entity relations can significantly boost the learning efficiency . Based on the fact that entities in an environment are often not independent but causally related , we argue that disentangling the learning task into two sequential tasks , namely relational structure learning and policy learning , and leveraging an explicit environmental structure model to facilitate the policy learning process of DRL agents are expected to boost the performance . With the learned relational structure information , the agent performs exploration with a tendency of prioritizing interaction with critical entities , which is encouraged by intrinsic rewards , to learn optimal policy effectively . Taking this inspiration , we propose a deep reinforcement learning algorithm which firstly learns the relations between entities and then recognize critical entity categories and develop an intrinsic reward based approach to improve policy learning efficiency and explainability . The proposed algo- rithm learns a graph to encode the relation information between categories of entities , by evaluating causal effect of one category of entities to another . Thereafter , intrinsic reward based on the learned graph is given to an agent to encourage it to prioritize interaction with entities belonging to important categories ( the categories that are root causes in the graph ) . Previous works also use graphs to provide additional structured information for the agent to assist policy learning ( Wang et al. , 2018 ; Vijay et al. , 2019 ) . However , graphs leveraged by these works are provided by human and thus rely heavily on prior knowledge . Compared with their methods , our algorithm overcomes the deficiency that the graph can not be generated automatically . Our approach requires no prior knowledge and can be combined with existing policy-based or value-based DRL algorithms to boost their learning performance . The key contributions of this work are summarized as follows : • We propose a novel causal RL framework that decomposes the whole task into the structure learning and causal structure aware policy learning . • The learned causal information is leveraged by giving causality based intrinsic reward to an agent , to encourage it to interact with entities belonging to critical categories for accomplishing the task . • We design two new game tasks which contain multiple entities with causal relations as benchmarks to be released to the community . The new benchmarks are designed in such ways that categories of objects are causally related . Experiments are conducted on our designed simulation environments , which show that our algorithm achieves state-of-the-art performance and can facilitate the learning process of DRL agents under other algorithmic frameworks . The paper is organized as follows . In Section 2 , we introduce deep reinforcement learning and Average Causal Effect ( ACE ) , which are key components of this work . Then we illustrate our algorithm in Section 3 in details . In Section 4 , we show the experimental results on the designed environment to demonstrate the effectiveness of our framework . In Section 5 , we introduce previous works that relate to our method . Finally , conclusions and future work are provided in Section 6 . 2 BACKGROUND . 2.1 DEEP REINFORCEMENT LEARNING . An MDP can be defined by a 5-tuple ( S , A , P , R , γ ) , where S is the state space , A is the action space , P is the transition function , R is the reward function and γ is the discount factor ( Sutton & Barto , 2018 ) . A RL agent observes a state st ∈ S at time step t. Then it selects an action at from the action space A following a policy π ( at|st ) , which is a mapping of state space to action space . After taking the action , the agent receives a scalar reward rt according toR ( st , at ) . Then the agent transits to the next state st+1 according to the state transition probabilityP ( st+1|st , at ) . A RL agent aims to learn a policy that maximizes the cumulative discount reward , which can be formulated as Rt = ∑T k=0 γ krt+k where T is the length of the whole episode . In the process of learning an optimal policy , a RL agent generally approximates the state-value function Vπ ( s ) or the action value function Qπ ( s , a ) . The state value function is the expected cumulative future discounted reward from a state with actions sampled from a policy π : Vπ ( s ) = Eπ [ T∑ k=0 γkrt+k|St = s ] . ( 1 ) Deep Reinforcement Learning ( DRL ) which combines Deep Neural Networks ( DNNs ) with RL can be an effective way to deal with high-dimensional state space . It benefits from the representation ability of DNNs , which enable automatic feature engineering and end-to-end learning through gradient descent . Several effective algorithms have been proposed in the literature and we use A2C in this paper as our basic algorithm , which is a synchronous version of A3C ( Mnih et al. , 2016 ) . A2C consists of a variety of actor-critic algorithms ( Sutton et al. , 2000 ) . It directly optimizes the policy πθ parameterized by θ to maximize the objective J ( θ ) = Eπ [ ∑T k=0 γ krt+k ] by taking steps in the direction of ∇θJ ( θ ) . The gradient of the policy can be written as : ∇θJ ( θ ) = Eπ [ ∇θ log πθ ( a|s ) Aπ ( s , a ) ] , ( 2 ) where Aπ ( s , a ) = Qπ ( s , a ) − V π ( s ) is the advantage function . The advantage function can be estimated by one-step TD-error Âπ ( st , at ) = rt + γVφ ( st+1 ) − Vφ ( st ) , where Vφ ( s ) is the approximation of the state-value function V π ( s ) parameterized by φ . 2.2 CAUSAL NEURAL NETWORK ATTRIBUTIONS . Attributions are defined as the effect of an input feature on the prediction function ’ s output ( Sundararajan et al. , 2017 ) and Chattopadhyay et al . ( 2019 ) propose a neural network attribution methodology built from first principles of causality . Chattopadhyay et al . ( 2019 ) views the neural network as a Structural Causal Model ( SCM ) , and proposes a new method to compute the Average Causal Effect of an input neuron on an output neuron based on the do ( . ) calculus ( Pearl , 2009 ) . Definition 1 . ( Average Causal Effect ) . The Average Causal Effect ( ACE ) of a binary random variable x on another random variable y is commonly defined as E [ y|do ( x = 1 ) ] − E [ y|do ( x = 0 ) ] . While the above definition is for binary-valued random variables , the domain of the function learnt by neural networks is usually continuous . Given a neural network with input layer l1 and output layer ln , we hence measure the ACE of an input feature xi ∈ l1 with value α on an output feature y ∈ ln as : ACEydo ( xi=α ) = E [ y|do ( xi = α ) ] − baselinexi . ( 3 ) Definition 2 . ( Causal Attribution ) . The causal attribution of input neuron xi for an output neuron y is defined as ACEydo ( xi=α ) . In Equation 3 , an ideal baseline would be any point along the decision boundary of the neural network , where predictions are neutral . However , Kindermans et al . ( 2019 ) showed that when a reference baseline is fixed to a specific value ( such as a zero vector ) , attribution methods are not affine invariant . Therefore , Chattopadhyay et al . ( 2019 ) proposed the average ACE of xi on y as the baseline value for xi : baselinexi = Exi [ Ey [ y|do ( xi = α ) ] ] ( 4 ) In this paper , we use causal attribution method to infer the relations between entities . 3 METHOD . In this section , we present a novel DRL framework named CARE ( CAusal RElation ) that enables the agent to infer the causal relationship between entities . Figure 1 illustrates the overall framework of CARE . CARE adopts a two-stage training paradigm . In the first stage , the agent learns a model of the environment by minimizing the prediction error of the state transition . Then , we calculate ACE values between categories of entities , which are used for constructing a causal graph G. When G is at hand , we are able to obtain the causal ordering of all categories , that is , a permutation such that nodes ranked lower can not cause nodes ranked higher . This order is used to measure the importance of the categories , and intrinsic reward is given based on the causal ordering . Specifically , the agent receive a one-step “ enhanced ” reward rt where : rt = r G t + r ext t , ( 5 ) where rextt is the original extrinsic reward given by the environment , and r G t is the intrinsic reward , designed by the learning algorithm to encourage the agent to maximize the effect of its behaviour on the change of states of critical entities . We describe the details in later sections . This section is organized as follow . In section 3.1 , we first introduce category-oriented state factorization . In section 3.2 , we describe how to get the relation graph G and in section 3.3 , we show how to calculate the intrinsic reward rGt .
The paper proposes a deep reinforcement learning algorithm of advantage actor-critic (A2C), which firstly learns the causal structure of the environment and then leverages the learned causal information to assist policy learning. The causal structure is computed by calculating Average Causal Effect (ACE) between different categories of entities, and the authors assume that an intrinsic reward is given to encourage the agent to interact more with critical entities of the causal graph. Two experiments were conducted on simulation environments (Shepherd and Ant tasks) and demonstrated the effectiveness in obtaining the rewards and interpretable and accurate detection of the true graph.
SP:6283566c3a3868af63b1721a727aad52eab1aec8
Adaptive Optimizers with Sparse Group Lasso
1 INTRODUCTION . With the development of deep learning , deep neural network ( DNN ) models have been widely used in various machine learning scenarios such as search , recommendation and advertisement , and achieved significant improvements . In the last decades , different kinds of optimization methods based on the variations of stochastic gradient descent ( SGD ) have been invented for training DNN models . However , most optimizers can not directly produce sparsity which has been proven effective and efficient for saving computational resource and improving model performance especially in the scenarios of very high-dimensional data . Meanwhile , the simple rounding approach is very unreliable due to the inherent low accuracy of these optimizers . In this paper , we develop a new class of optimization methods , that adds the regularizers especially sparse group lasso to prevalent adaptive optimizers , and retains the characteristics of the respective optimizers . Compared with the original optimizers with the post-processing procedure which use the magnitude pruning method , the performance of the models can be significantly improved on the same sparsity level . Furthermore , in comparison to the cases without magnitude pruning , the new optimizers can achieve extremely high sparsity with significantly better or highly competitive performance . In this section , we describe the two types of optimization methods , and explain the motivation of our work . 1.1 ADAPTIVE OPTIMIZATION METHODS . Due to the simplicity and effectiveness , adaptive optimization methods ( Robbins & Monro , 1951 ; Polyak , 1964 ; Duchi et al. , 2011 ; Zeiler , 2012 ; Kingma & Ba , 2015 ; Reddi et al. , 2018 ; Yao et al. , 2020 ) have become the de-facto algorithms used in deep learning . There are multiple variants , but they can be represented using the general update formula ( Reddi et al. , 2018 ) : xt+1 = xt − αtmt/ √ Vt , ( 1 ) where αt is the step size , mt is the first moment term which is the weighted average of gradient gt and Vt is the so called second moment term that adjusts updated velocity of variable xt in each direction . Here , √ Vt : = V 1/2 t , mt/ √ Vt : = √ Vt −1 ·mt . By setting different mt , Vt and αt , we can derive different adaptive optimizers including MOMENTUM ( Polyak , 1964 ) , ADAGRAD ( Duchi et al. , 2011 ) , ADAM ( Kingma & Ba , 2015 ) , AMSGRAD ( Reddi et al. , 2018 ) and ADAHESSIAN ( Yao et al. , 2020 ) , etc . See Table 1 . 1.2 REGULARIZED OPTIMIZATION METHODS . Follow-the-regularized-leader ( FTRL ) ( McMahan & Streeter , 2010 ; McMahan et al. , 2013 ) has been widely used in click-through rates ( CTR ) prediction problems , which adds ` 1-regularization ( lasso ) to logistic regression and can effectively balance the performance of the model and the sparsity of features . The update formula ( McMahan et al. , 2013 ) is : xt+1 = arg min x g1 : t · x+ 1 2 t∑ s=1 σs‖x− xs‖22 + λ1‖x‖1 , ( 2 ) where g1 : t = ∑ t s=1gs , 1 2 ∑t s=1 σs‖x− xs‖22 is the strong convex term that stabilizes the algorithm and λ1‖x‖1 is the regularization term that produces sparsity . However , it doesn ’ t work well in DNN models since one input feature can correspond to multiple weights and lasso only can make single weight zero hence can ’ t effectively delete zeros features . To solve above problem , Ni et al . ( 2019 ) adds the ` 21-regularization ( group lasso ) to FTRL , which is named G-FTRL . Yang et al . ( 2010 ) conducts the research on a group lasso method for online learning that adds ` 21-regularization to the algorithm of Dual Averaging ( DA ) ( Nesterov , 2009 ) , which is named DA-GL . Even so , these two methods can not been applied to other optimizers . Different scenarios are suitable for different optimizers in the deep learning fields . For example , MOMENTUM ( Polyak , 1964 ) is typically used in computer vision ; ADAM ( Kingma & Ba , 2015 ) is used for training transformer models for natural language processing ; and ADAGRAD ( Duchi et al. , 2011 ) is used for recommendation systems . If we want to produce sparsity of the model in some scenario , we have to change optimizer which probably influence the performance of the model . 1.3 MOTIVATION . Eq . ( 1 ) can be rewritten into this form : xt+1 = arg min x mt · x+ 1 2αt ‖ √ Vt 1 2 ( x− xt ) ‖22 . ( 3 ) Furthermore , we can rewrite Eq . ( 3 ) into xt+1 = arg min x m1 : t · x+ t∑ s=1 1 2αs ‖Q 1 2 s ( x− xs ) ‖22 , ( 4 ) where m1 : t = ∑t s=1ms , ∑t s=1Qs/αs = √ Vt/αt . It is easy to prove that Eq . ( 3 ) and Eq . ( 4 ) are equivalent using the method of induction . The matrices Qs can be interpreted as generalized learning rates . To our best knowledge , Vt of Eq . ( 1 ) of all the adaptive optimization methods are diagonal for the computation simplicity . Therefore , we considerQs as diagonal matrices throughout this paper . We find that Eq . ( 4 ) is similar to Eq . ( 2 ) except for the regularization term . Therefore , we add the regularization term Ψ ( x ) to Eq . ( 4 ) , which is the sparse group lasso penalty also including ` 2- regularization that can diffuse weights of neural networks . The concrete formula is : Ψt ( x ) = G∑ g=1 ( λ1‖xg‖1 + λ21 √ dxg‖A 1 2 t x g‖2 ) + λ2‖x‖22 , ( 5 ) where λ1 , λ21 , λ2 are regularization parameters of ` 1 , ` 21 , ` 2 respectively , G is the total number of groups of weights , xg is the weights of group g and dxg is the size of group g. In DNN models , each group is defined as the set of outgoing weights from a unit which can be an input feature , or a hidden neuron , or a bias unit ( see , e.g. , Scardapane et al . ( 2016 ) ) . At can be arbitrary positive matrix satisfying At+1 At , e.g. , At = I . In Section 2.1 , we let At = ( ∑t s=1 Qgs 2αs + λ2I ) just for solving the closed-form solution directly , where Qgs is a diagonal matrix whose diagonal elements are part of Qs corresponding to xg . The ultimate update formula is : xt+1 = arg min x m1 : t · x+ t∑ s=1 1 2αs ‖Q 1 2 s ( x− xs ) ‖22 + Ψt ( x ) . ( 6 ) 1.4 OUTLINE OF CONTENTS . The rest of the paper is organized as follows . In Section 1.5 , we introduce the necessary notations and technical background . In Section 2 , we present the closed-form solution of Eq . ( 4 ) and the algorithm of general framework of adaptive optimization methods with sparse group lasso . We prove the algorithm is equivalent to adaptive optimization methods when regularization terms vanish . In the end , we give two concrete examples of the algorithm.1 In Section 3 , we derive the regret bounds of the method and convergence rates . In Section 4 , we validate the performance of new optimizers in the public datasets . In Section 5 , we summarize the conclusion . Appendices A-B list the details of GROUP ADAM and Group Adagrad respectively . Appendices C-F contain technical proofs of our main results and Appendix G includes the details of the empirical results of Section 4.4 . 1.5 NOTATIONS AND TECHNICAL BACKGROUND . We use lowercase letters to denote scalars and vectors , and uppercase letters to denote matrices . We denote a sequence of vectors by subscripts , that is , x1 , . . . , xt , and entries of each vector by an additional subscript , e.g. , xt , i . We use the notation g1 : t as a shorthand for ∑t s=1 gs . Similarly we write m1 : t for a sum of the first moment mt , and f1 : t to denote the function f1 : t ( x ) = ∑t s=1 fs ( x ) . Let Mt = [ m1 · · ·mt ] denote the matrix obtained by concatenating the vector sequence { mt } t≥1 andMt , i denote the i-th row of this matrix which amounts to the concatenation of the i-th component of each vector . The notation A 0 ( resp . A 0 ) for a matrix A means that A is symmetric and positive semidefinite ( resp . definite ) . Similarly , the notations A B and A B mean that A−B 0 andA−B 0 respectively , and both tacitly assume thatA andB are symmetric . Given A 0 , we write A 12 for the square root of A , the unique X 0 such that XX = A ( McMahan & Streeter ( 2010 ) , Section 1.4 ) . Let E be a finite-dimension real vector space , endowed with the Mahalanobis norm ‖ · ‖A which is denoted by ‖·‖A = √ 〈· , A·〉 as induced byA 0 . Let E∗ be the vector space of all linear functions on E . The dual space E∗ is endowed with the dual norm ‖ · ‖∗A = √ 〈· , A−1·〉 . Let Q be a closed convex set in E . A continuous function h ( x ) is called strongly convex on Q with norm ‖ · ‖H ifQ ⊆ dom h and there exists a constant σ > 0 such that for all x , y ∈ Q and α ∈ [ 0 , 1 ] we have h ( αx+ ( 1− α ) y ) ≤ αh ( x ) + ( 1− α ) h ( y ) − 1 2 σα ( 1− α ) ‖x− y‖2H . 1To fulfill research interest of optimization methods , we will release the code in the future . The constant σ is called the convexity parameter of h ( x ) , or the modulus of strong convexity . We also denote by ‖ · ‖h = ‖ · ‖H . Further , if h is differential , we have h ( y ) ≥ h ( x ) + 〈∇h ( x ) , y − x〉+ σ 2 ‖x− y‖2h . We use online convex optimization as our analysis framework . On each round t = 1 , . . . , T , a convex loss function ft : Q 7→ R is chosen , and we pick a point xt ∈ Q hence get loss ft ( xt ) . Our goal is minimizing the regret which is defined as the quantity RT = T∑ t=1 ft ( xt ) −min x∈Q T∑ t=1 ft ( x ) . ( 7 ) Online convex optimization can be seen as a generalization of stochastic convex optimization . Any regret minimizing algorithm can be converted to a stochastic optimization algorithm with convergence rate O ( RT /T ) using an online-to-batch conversion technique ( Littlestone , 1989 ) . In this paper , we assume Q ≡ E = Rn , hence we have E∗ = Rn . We write sTx or s · x for the standard inner product between s , x ∈ Rn . For the standard Euclidean norm , ‖x‖ = ‖x‖2 =√ 〈x , x〉 and ‖s‖∗ = ‖s‖2 . We also use ‖x‖1 = ∑n i=1 |x ( i ) | and ‖x‖∞ = max i|x ( i ) | to denote ` 1-norm and ` ∞-norm respectively , where x ( i ) is the i-th element of x .
This work studies the adaptive proximal gradient descent method, and specifically studies the group sparsity. To encourage the group sparsity, a regularizer which is a combination of $\ell_1$ norm, block $\ell_1$ norm and $\ell_2$ norm square is used. This paper gives the update rule of the proximal gradient with the specific regularizer. After proposing the update rule, the paper analyzes the convergence and regret guarantee of the algorithm.
SP:d98564657b7cd55efa243520c5bd7ef8be405a26
Rethinking Architecture Selection in Differentiable NAS
1 INTRODUCTION . Neural Architecture Search ( NAS ) has been drawing increasing attention in both academia and industry for its potential to automatize the process of discovering high-performance architectures , which have long been handcrafted . Early works on NAS deploy Evolutionary Algorithm ( Stanley & Miikkulainen , 2002 ; Real et al. , 2017 ; Liu et al. , 2017 ) and Reinforcement Learning ( Zoph & Le , 2017 ; Pham et al. , 2018 ; Zhong et al. , 2018 ) to guide the architecture discovery process . Recently , several one-shot methods have been proposed that significantly improve the search efficiency ( Brock et al. , 2018 ; Guo et al. , 2019 ; Bender et al. , 2018 ) . As a particularly popular instance of one-shot methods , DARTS ( Liu et al. , 2019 ) enables the search process to be performed with a gradient-based optimizer in an end-to-end manner . It applies continuous relaxation that transforms the categorical choice of architectures into continuous architecture parameters α . The resulting supernet can be optimized via gradient-based methods , and the operations associated with the largest architecture parameters are selected to form the final architecture . Despite its simplicity , several works cast doubt on the effectiveness of DARTS . For example , a simple randomized search ( Li & Talwalkar , 2019 ) outperforms the original DARTS ; Zela et al . ( 2020 ) observes that DARTS degenerates to networks filled with parametric-free operations such as the skip connection or even random noise , leading to the poor performance of the selected architecture . While the majority of previous research attributes the failure of DARTS to its supernet optimization ( Zela et al. , 2020 ; Chen & Hsieh , 2020 ; Chen et al. , 2021 ) , little has been discussed about the validity of another important assumption : the value of α reflects the strength of the underlying operations . In this paper , we conduct an in-depth analysis of this problem . Surprisingly , we find that in many cases , α does not really indicate the operation importance in a supernet . Firstly , the operation associated with larger α does not necessarily result in higher validation accuracy after discretization . Secondly , as an important example , we show mathematically that the domination of skip connection observed in DARTS ( i.e . αskip becomes larger than other operations . ) is in fact a reasonable outcome of the supernet ’ s optimization but becomes problematic when we rely on α to select the best operation . If α is not a good indicator of operation strength , how should we select the final architecture from a pretrained supernet ? Our analysis indicates that the strength of each operation should be evaluated based on its contribution to the supernet performance instead . To this end , we propose an alternative perturbation-based architecture selection method . Given a pretrained supernet , the best operation on an edge is selected and discretized based on how much it perturbs the supernet accuracy ; The final architecture is derived edge by edge , with fine-tuning in between so that the supernet remains converged for every operation decision . We re-evaluate several differentiable NAS methods ( DARTS ( Liu et al. , 2019 ) , SDARTS ( Chen & Hsieh , 2020 ) , SGAS ( Li et al. , 2020 ) ) and show that the proposed selection method is able to consistently extract significantly improved architectures from the supernets than magnitude-based counterparts . Furthermore , we find that the robustness issues of DARTS can be greatly alleviated by replacing the magnitude-based selection with the proposed perturbation-based selection method . 2 BACKGROUND AND RELATED WORK . Preliminaries of Differentiable Architecture Search ( DARTS ) We start by reviewing the formulation of DARTS . DARTS ’ search space consists of repetitions of cell-based microstructures . Every cell can be viewed as a DAG with N nodes and E edges , where each node represents a latent feature map xi , and each edge is associated with an operation o ( e.g . skip connect , sep conv 3x3 ) from the search space O . Continuous relaxation is then applied to this search space . Concretely , every operation on an edge is activated during the search phase , with their outputs mixed by the architecture parameter α to form the final mixed output of that edge m̄ ( xi ) = ∑ o∈O expαo∑ o′ expαo′ o ( xi ) . This particular formulation allows the architecture search to be performed in a differentiable manner : DARTS jointly optimizes α and model weight w with the following bilevel objective via alternative gradient updates : min α Lval ( w∗ , α ) s.t . w∗ = arg min w Ltrain ( w , α ) . ( 1 ) We refer to the continuous relaxed network used in the search phase as the supernet of DARTS . At the end of the search phase , the operation associated with the largest αo on each edge will be selected from the supernet to form the final architecture . Failure mode analysis of DARTS Several works cast doubt on the robustness of DARTS . Zela et al . ( 2020 ) tests DARTS on four different search spaces and observes significantly degenerated performance . They empirically find that the selected architectures perform poorly when DARTS ’ supernet falls into high curvature areas of validation loss ( captured by large dominant eigenvalues of the Hessian∇2α , αLval ( w , α ) ) . While Zela et al . ( 2020 ) relates this problem to the failure of supernet training in DARTS , we examine it from the architecture selection aspects of DARTS , and show that much of DARTS ’ robustness issue can be alleviated by a better architecture selection method . Progressive search space shrinking There is a line of research on NAS that focuses on reducing the search cost and aligning the model sizes of the search and evaluation phases via progressive search space shrinking ( Liu et al. , 2018 ; Li et al. , 2019 ; Chen et al. , 2021 ; Li et al. , 2020 ) . The general scheme of these methods is to prune out weak operations and edges sequentially during the search phase , based on the magnitude of α following DARTS . Our method is orthogonal to them in this respect , since we select operations based on how much it contributes to the supernet ’ s performance rather than the α value . Although we also discretize edges greedily and fine-tune the network in between , the purpose is to let the supernet recover from the loss of accuracy after discretization to accurately evaluate operation strength on the next edge , rather than to reduce the search cost . 3 THE PITFALL OF MAGNITUDE-BASED ARCHITECTURE SELECTION IN . DARTS In this section , we put forward the opinion that the architecture parameter α does not necessarily represent the strength of the underlying operation in general , backed by both empirical and theoretical evidence . As an important example , we mathematically justify that the skip connection domination phenomenon observed in DARTS is reasonable by itself , and becomes problematic when combined with the magnitude-based architecture selection . 3.1 α MAY NOT REPRESENT THE OPERATION STRENGTH Following DARTS , existing differentiable NAS methods use the value of architecture parameters α to select the final architecture from the supernet , with the implicit assumption that α represents the strength of the underlying operations . In this section , we study the validity of this assumption in detail . Consider one edge on a pretrained supernet ; the strength of an operation on the edge can be naturally defined as the supernet accuracy after we discretize to this operation and fine-tune the remaining network until it converges again ; we refer to this as ” discretization accuracy at convergence ” for short . The operation that achieves the best discretization accuracy at convergence can be considered as the best operation for the given edge . Figure 1 shows the comparison of α ( blue ) and operation strength ( orange ) of randomly select edges on DARTS supernet . As we can see , the magnitude of α for each operation does not necessarily agree with their relative strength measured by discretization accuracy at convergence . Moreover , operations assigned with small αs are sometimes strong ones that lead to high discretization accuracy at convergence . To further verify the mismatch , we investigate the operation strength on search space S2 , where DARTS fails dramatically due to excessive skip connections ( Zela et al. , 2020 ) . S2 is a variant of DARTS search space that only contains two operations per edge ( skip connect , sep conv 3x3 ) . Figure 2 shows the selected operations based on α ( left ) and operation strength ( right ) on all edges on S2 . From Figure 2a , we can see that αskip connect > αsep conv 3x3 on 12 of 14 edges . Consequently , the derived child architecture will lack representation ability and perform poorly due to too many skip connections . However , as shown in Figure 2b , the supernet benefits more from discretizing to sep conv 3x3 than skip connect on half of the edges . 3.2 A CASE STUDY : SKIP CONNECTION . Several works point out that DARTS tends to assign large α to skip connections , resulting in shallow architectures with poor generability ( Zela et al. , 2020 ; Liang et al. , 2019 ; Bi et al. , 2019 ) . This ” skip connection domination ” issue is generally attributed to the failure of DARTS ’ supernet optimization . In contrast , we draw inspiration from research on ResNet ( He et al. , 2016 ) and show that this phenomenon by itself is a reasonable outcome while DARTS refines its estimation of the optimal feature map , rendering αskip ineffective in the architecture selection . In vanilla networks ( e.g. , VGG ) , each layer computes a new level of feature map from the output feature map of the predecessor layer ; thus , reordering layers at test time would dramatically hurt the performance ( Veit et al. , 2016 ) . Unlike vanilla networks , Greff et al . ( 2017 ) and Veit et al . ( 2016 ) discover that successive layers in ResNet with compatible channel sizes are in fact estimating the same optimal feature map so that the outputs of these layers stay relatively close to each other at convergence ; As a result , ResNet ’ s test accuracy remains robust under layer reordering . Greff et al . ( 2017 ) refers to this unique way of feature map estimation in ResNet as the ” unrolled estimation. ” DARTS ’ supernet resembles ResNet , rather than vanilla networks like VGG , in both appearance and behavior . Appearance-wise , within a cell of DARTS ’ supernet , edges with skip connection are in direct correspondence with the successive residual layers in ResNet . Behavior-wise , DARTS ’ supernet also exhibits a high degree of robustness under edge shuffling . As shown in Table 1 , randomly reordering edges on a pretrained DARTS ’ supernet at test time also has little effect on its performance . This evidence indicates that DARTS performs unrolled estimation like ResNet as well , i.e. , edges within a cell share the same optimal feature map that they try to estimate . In the following proposition , we apply this finding and provide the optimal solution of α in the sense of minimizing the variance of feature map estimation . Proposition 1 . 1 Without loss of generality , consider one cell from a simplified search space consists of two operations : ( skip , conv ) . Let m∗ denotes the optimal feature map , which is shared across all edges according to the unrolled estimation view ( Greff et al. , 2017 ) . Let oe ( xe ) be the output of convolution operation , and let xe be the skip connection ( i.e. , the input feature map of edge e ) . Assume m∗ , oe ( xe ) and xe are normalized to the same scale . The current estimation of m∗ can then be written as : me ( xe ) = exp ( αconv ) exp ( αconv ) + exp ( αskip ) oe ( xe ) + exp ( αskip ) exp ( αconv ) + exp ( αskip ) xe , ( 2 ) where αconv and αskip are the architecture parameters defined in DARTS . The optimal α∗conv and α∗skip minimizing var ( me ( xe ) − m∗ ) , the variance of the difference between the optimal feature map m∗ and its current estimation me ( xe ) , are given by : α∗conv ∝ var ( xe −m∗ ) ( 3 ) α∗skip ∝ var ( oe ( xe ) −m∗ ) . ( 4 ) We refer the reader to Appendix A.4 for detailed proof . From eq . ( 3 ) and eq . ( 4 ) , we can see that the relative magnitudes of αskip and αconv come down to which one of xe or oe ( xe ) is closer to m∗ in variance : • xe ( input of edge e ) comes from the mixed output of the previous edge . Since the goal of every edge is to estimate m∗ ( unrolled estimation ) , xe is also directly estimating m∗ . 1Proposition 1 unfolds the optimal α in principle and does not constraint the particular optimization method ( i.e. , bilevel , single-level , or blockwise update ) to achieve it . Moreover , this proposition can be readily extended to various other search spaces since we can group all non-skip operations into a single oe ( · ) . • oe ( xe ) is the output of a single convolution operation instead of the complete mixed output of edge e , so it will deviate from m∗ even at convergence . Therefore , in a well-optimized supernet , xe will naturally be closer tom∗ than oe ( xe ) , causing αskip to be greater than αconv . Our analysis above indicates that the better the supernet , the larger the ( αskip − αconv ) gap ( softmaxed ) will become since xe gets closer and closer tom∗ as the supernet is optimized . This result is evidenced in Figure 3 , where mean ( αskip − αconv ) continues to grow as the supernet gets better . In this case , although αskip > αconv is reasonable by itself , it becomes an inductive bias to NAS if we were to select the final architecture based on α .
In one-shot differentiable NAS, a supergraph is usually trained (via bilevel optimization as in DARTS, or other approximations to bilevel such as gumbel softmax, etc). After supergraph training, a final architecture is obtained by taking the operator at each edge which has the highest architecture weight magnitude. This step is usually termed as the 'finalization' step. (In DARTS the finalization step actually orders incoming edges by the max of the architecture weight magnitudes at each edge and selects the top two edges and the corresponding maximum architecture weight in them as the final operators.). This paper examines this quite ad hoc step very closely. It finds that the magnitude of architecture weights (alphas commonly in this niche literature) are misleading. It shows by careful ablation experiments that alpha magnitudes are very much not useful in selecting good operators.
SP:eceef2daaa86f86534b3b33ca96c19f0b52e20b7
On Episodes, Prototypical Networks, and Few-Shot Learning
1 Introduction . The problem of few-shot learning ( FSL ) – classifying examples from previously unseen classes given only a handful of training data – has considerably grown in popularity within the machine learning community in the last few years . The reason is likely twofold . First , being able to perform well on FSL problems is important for several applications , from learning new symbols [ 23 ] to drug discovery [ 2 ] . Second , since the aim of researchers interested in meta-learning is to design systems that can quickly learn novel concepts by generalising from previously encountered learning tasks , FSL benchmarks are often adopted as a practical way to empirically validate meta-learning algorithms . To the best of our knowledge , there is not a widely recognised definition of meta-learning . In a recent survey , Hospedales et al . [ 22 ] informally describe it as “ the process of improving a learning algorithm over multiple learning episodes ” . In practical terms , following the compelling rationale that “ test and train conditions should match ” [ 48 , 13 ] , several seminal meta-learning papers ( e.g . [ 48 , 32 , 14 ] ) have emphasised the importance of organising training into episodes , i.e . learning problems with a limited amount of “ training ” ( the support set ) and “ test ” examples ( the query set ) to mimic the test-time scenario presented by FSL benchmarks . However , several recent works ( e.g . [ 9 , 49 , 11 , 44 ] ) showed that simple baselines can outperform established FSL meta-learning methods by using embeddings pre-trained with the standard crossentropy loss , thus casting a doubt on the importance of episodes in FSL . Inspired by these results , we aim at understanding the practical usefulness of episodic learning in popular FSL methods relying on metric-based nonparametric classifiers such as Matching and Prototypical Networks [ 48 , 40 ] . We chose this family of methods because they do not perform any adaptation at test time . This allows us ∗Work done while research intern at FiveAI 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . to test the efficacy of episodic training without having to significantly change the baseline algorithms , which could potentially introduce confounding factors . In this work we perform a case study focussed on Matching Networks [ 48 ] and Prototypical Networks [ 40 ] , and we show that within this family of methods episodic learning a ) is detrimental for performance , b ) is analogous to randomly discarding examples from a batch and c ) introduces a set of superfluous hyperparameters that require careful tuning . Without episodic learning , these methods are closely related to the classic Neighbourhood Component Analysis ( NCA ) [ 19 , 35 ] on deep embeddings and achieve , without bells and whistles , an accuracy that is competitive with recent methods on multiple FSL benchmarks : miniImageNet , CIFAR-FS and tieredImageNet . PyTorch code is available at https : //github.com/fiveai/on-episodes-fsl . 2 Background and method . This section is divided as follows : Sec . 2.1 introduces episodic learning and illustrates a data efficiency issue encountered with nonparametric few-shot learners based on episodes ; Sec . 2.2 introduces the losses from Snell et al . [ 40 ] , Vinyals et al . [ 48 ] and Goldberger et al . [ 19 ] which we use throughout our experiments ; and Sec . 2.3 explains the three options we explored to perform FSL classification with previously-trained feature embeddings . 2.1 Episodic learning . A common strategy to train FSL methods is to consider a distribution Ê over possible subsets of labels that is as close as possible to the one encountered during evaluation E 2 [ 48 ] . Each episodic batch BE = { S , Q } is obtained by first sampling a subset of labels L from Ê , and then sampling images constituting both support set S and query set Q from the set of images with labels in L , where S = { ( s1 , y1 ) , . . . , ( sn , yn ) } , Q = { ( q1 , y1 ) , . . . , ( qm , ym ) } , and Sk and Qk denote the sets of images with label y = k in the support set and query set respectively . For most methods , this corresponds to training on a series of mini-batches in which each image belongs to either the support or the query set . Support and query sets are constructed such that they both contain all the classes of L , and a fixed number of images per class . Therefore , episodes are defined by three variables : the number of classes w = |L| ( the “ ways ” ) , the number of examples per class in the support set n = |Sk| ( the “ shots ” ) , and the number of examples per class in the query set m = |Qk| . During evaluation , the set { w , n , m } defines the problem setup . Instead , at training time { w , n , m } can be seen as a set of hyperparameters controlling the batch creation , and that ( as we will see in Sec . 3.2 ) requires careful tuning . 2Note that , in FSL , the sets of classes encountered during training and evaluation are disjoint . In a Maximum Likelihood Estimation framework , training on these episodes can be written as arg max θ E L∼Ê E S∼L Q∼L ∑ ( qi , yi ) ∈Q logPθ ( yi|qi , S , ρ ) . ( 1 ) For the sake of brevity , with a slight abuse of notation we omit the function fθ ( e.g . a deep neural network ) which is used to obtain a representation for the images in S and Q , and whose parameters θ are optimised during the training process . Note that the optimisation of Eq . 1 depends on an optional set of parameters ρ . This is obtained by an “ inner ” optimisation procedure , whose scope is limited to the current episode [ 22 ] . The idea is that the “ outer ” optimisation loop , by attending to a distribution of episodes , will appropriately shift the inductive bias of the algorithm located in the inner loop , thus learning how to learn [ 47 ] . In recent years , many interesting proposals have been made about what form ρ should have , and how it should be computed . For instance , in MAML [ 14 ] ρ takes the form of an update of the global parameters θ , while Ravi and Larochelle [ 32 ] learn to optimise by considering ρ as set of the hyper-parameters of the optimiser ’ s update rule . Other methods , such as Matching and Prototypical Networks [ 48 , 40 ] , avoid learning a separate set of parameters ρ altogether , and utilise a nonparametric learner ( such as nearest neighbour classifiers ) at the inner level . We chose to focus our case study on these methods not only because they have been seminal for the community , but also for ease of experimental design . Having ρ = ∅ considerably reduces the design complexity of the algorithm , thus allowing precise ablations to understand the efficacy of episodic learning without considerably changing the nature of the original algorithms . Considerations on data efficiency . The constraints imposed by episodic learning on the role each image has in a training batch has subtle but important implications , illustrated in Fig . 1 by highlighting the number of distances contributing to the loss . By dividing batches between support and query set ( S and Q ) during training , episodes have the side effect of disregarding many of the distances between labelled examples that would constitute useful training signal for nonparametric FSL methods . More specifically , for metric-based nonparametric methods , the number of training distances that are omitted in a batch because of the episodic strategy grows quadratically as O ( w2 ( m2 + n2 ) ) ( derivation shown in Appendix A ) . Table 1 breaks down this difference in terms of gradients from positives and negatives distance pairs ( which we simply refer to as positives and negatives throughout the rest of the paper ) . In a typical training batch with w = 20 , m = 15 and n = 5 [ 40 ] , ignoring the episodic constraints increases the number of both positives and negatives by more than 150 % . In the remainder of this paper , we conduct a case study to illustrate how this issue affects two of the most popular FSL algorithms relying on nonparametric approaches at the inner level : Prototypical Networks [ 40 ] and Matching Networks [ 48 ] . 2.2 Loss functions . Prototypical Networks ( PNs ) [ 40 ] are one of the most popular and effective approaches in the few-shot learning literature . They are at the core of several recently proposed FSL methods ( e.g . [ 27 , 18 , 1 , 50 , 7 ] ) , and they are used in a number of applied machine learning works ( e.g . EEG scan analysis for autism [ 36 ] and glaucoma grading [ 17 ] ) . During training , episodes consisting of a support set S and a query set Q are sampled as described in Sec . 2.1 . Then , a prototype for each class k is computed as the mean embedding of the samples from the support set belonging to that class : ck = ( 1/|Sk| ) · ∑ ( si , yk ) ∈Sk fθ ( si ) , where fθ is a deep neural network with parameters θ learned via Eq . 1 . Let C = { ( c1 , y1 ) , . . . , ( ck , yk ) } be the set of prototypes and corresponding labels . The loss can be written as follows : LPNs = −1 |Q| ∑ ( qi , yi ) ∈Q log ( exp−‖fθ ( qi ) − cyi‖2∑ k′ exp−‖fθ ( qi ) − ck′‖2 ) , where k′ is an index that goes over all classes . Matching Networks ( MNs ) [ 48 ] are closely related to PNs in the multi-shot case and equivalent in the 1-shot case . Rather than aggregating the embeddings of the same class into prototypes , this loss directly computes a softmax over individual embeddings of the support set , as : LMNs = −1 |Q| ∑ ( qi , y ) ∈Q log ∑ sj ∈Sy exp−‖fθ ( qi ) − fθ ( sj ) ‖2 ∑ sk ∈S exp−‖fθ ( qi ) − fθ ( sk ) ‖2 . In their work , Vinyals et al . [ 48 ] use the cosine rather than the Euclidean distance . However , ( as [ 40 ] ) we observed that the Euclidean distance is a better choice for FSL problems , and thus we use it in all the losses of our experiments . Note that Vinyals et al . [ 48 ] also suggest a variant to LMNs ( MNs with “ Full Context Embeddings ” ) , where an LSTM ( with an extra set of parameters ) is used to condition the way the inputs are embedded in the current support set . In our experiments , we did not consider this variant as it falls in the category of adaptive episodic learning approaches ( ρ 6= ∅ , see Sec . 2.1 ) . Neighbourhood Component Analysis ( NCA ) . LMNs and LPNs sum over the likelihoods that a query image belongs to the same class of a certain sample ( or prototype ) from the support set by computing the softmax over the distances between the query and the support samples ( or prototypes ) . This is closely related to the Neighbourhood Component Analysis approach by Goldberger et al . [ 19 ] ( and expanded to the non-linear case by Salakhutdinov et al . [ 35 ] and Frosst et al . [ 15 ] ) , except for a few important differences which we discuss at the end of this section . Let i ∈ [ 1 , b ] be the indices of the images within a batch B . The NCA loss can be written as : LNCA = −1 |B| ∑ i∈1 , ... , b log ∑ j∈1 , ... , b j 6=i yi=yj exp−‖zi − zj‖2 ∑ k∈1 , ... , b k 6=i exp−‖zi − zk‖2 , where zi = fθ ( xi ) is an image embedding and yi its corresponding label . By minimising this loss , distances between embeddings from the same class will be minimised , while distances between embeddings from different classes will be maximised . Importantly , note how the concepts of support set and query set here do not exist . More simply , the images ( and respective labels ) constituting the batch B = { ( x1 , y1 ) , . . . , ( xb , yb ) } are sampled uniformly . Given the similarity between these three losses , and considering that PNs and MNs do not perform episode-specific parameter adaptation , { w , m , n } can be simply interpreted as the set of hyperparameters controlling the sampling of mini-batches during training . More specifically , PNs , MNs and NCA differ in three aspects : I . First and foremost , due to the nature of episodic learning , PNs and MNs only consider pairwise distances between the query and the support set ( Fig . 1 left ) ; NCA instead uses all the distances within a batch and treats each example in the same way ( Fig . 1 right ) . II . Only PNs rely on the creation of prototypes . III . Because of how L , S and Q are sampled in episodic learning ( Eq . 1 ) , for PNs and MNs some images might be sampled more frequently than others ( sampling “ with replacement ” ) . NCA instead visits every image of the dataset once for each epoch ( sampling “ without replacement ” ) . To investigate the effects of these three differences , in Sec . 3 we conduct a wide range of experiments .
The paper's starting point is the question whether the episodic training is beneficial, or not, for FSL / Prototypical Networks. The work can be seen as a follow-up of the recent works showing that simple baselines can outperform rather sophisticated few-shot learning models. Towards answering this question, this paper points out that Prototypical Networks (PN) are related to Neighborhood Component Analysis (NCA), and NCA can be considered as an episodic training-free alternative of PN.
SP:173177f78449ef09647670389b0ffba1e35db0ba
Practical Real Time Recurrent Learning with a Sparse Approximation
1 Introduction . Recurrent neural networks ( RNNs ) have been successfully applied to a wide range of sequence learning tasks , including text-to-speech ( Kalchbrenner et al. , 2018 ) , language modeling ( Dai et al. , 2019 ) , automatic speech recognition ( Amodei et al. , 2016 ) , translation ( Chen et al. , 2018 ) and reinforcement learning ( Espeholt et al. , 2018 ) . RNNs have greatly benefited from advances in computational hardware , dataset sizes , and model architectures . However , the algorithm used to compute their gradients in almost all practical applications has not changed since the introduction of Back-Propagation Through Time ( BPTT ) . The key limitation of BPTT is that the entire state history must be stored , meaning that the memory cost grows linearly with the sequence length . For sequences too long to fit in memory , as often occurs in domains such as language modelling or long reinforcement learning episodes , truncated BPTT ( TBPTT ) ( Williams & Peng , 1990 ) can be used . Unfortunately the truncation length used by TBPTT also limits the duration over which temporal structure can be realiably learned . Forward-mode differentiation , or Real-Time Recurrent Learning ( RTRL ) as it is called when applied to RNNs ( Williams & Zipser , 1989 ) , solves some of these problems . It doesn ’ t require storage of any past network states , can theoretically learn dependencies of any length and can be used to update parameters at any desired frequency , including every step ( i.e . fully online ) . However , its fixed storage requirements are O ( k · |θ| ) , where k is the state size and |θ| is the number of parameters θ in the core . Perhaps even more daunting , the computation it requires is O ( k2 · |θ| ) . This makes it impractical for even modestly sized networks . The advantages of RTRL have led to a search for more efficient approximations that retain its desirable properties , whilst reducing its computational and memory costs . One recent line of work introduces unbiased , but noisy approximations to the influence update . Unbiased Online Recurrent Optimization ( UORO ) ( Tallec & Ollivier , 2018 ) is an approximation with the same cost as TBPTT – O ( |θ| ) – however its gradient estimate is severely noisy ( Cooijmans & Martens , 2019 ) and its performance has in practice proved worse than TBPTT ( Mujika et al. , 2018 ) . Less noisy approximations with better accuracy on a variety of problems include both Kronecker Factored RTRL ( KF-RTRL ) ( Mujika et al. , 2018 ) and Optimal Kronecker-Sum Approximation ( OK ) ( Benzing et al. , 2019 ) . However , both increase the computational costs to O ( k3 ) . The last few years have also seen a resurgence of interest in sparse neural networks – both their properties ( Frankle & Carbin , 2019 ) and new methods for training them ( Evci et al. , 2019 ) . A number of works have noted their theoretical and practical efficiency gains over dense networks ( Zhu & Gupta , 2018 ; Narang et al. , 2017 ; Elsen et al. , 2019 ) . Of particular interest is the finding that scaling the state size of an RNN while keeping the number of parameters constant leads to increased performance ( Kalchbrenner et al. , 2018 ) . In this work we introduce a new sparse approximation to the RTRL influence matrix . The approximation is biased but not stochastic . Rather than tracking the full influence matrix , we propose to track only the influence of a parameter on neurons that are affected by it within n steps of the RNN . The algorithm is strictly less biased but more expensive as n increases . The cost of the algorithm is controlled by n and the amount of sparsity in the Jacobian of the recurrent cell . We study the nature of this bias in Appendix C. Larger n can be coupled with concomitantly higher sparsity to keep the cost fixed . This enables us to achieve the benefits of RTRL with a computational cost per step comparable in theory to BPTT . The approximation approaches full RTRL as n increases . Our contributions are as follows : • We propose SnAp – a practical approximation to RTRL , which is is applicable to both dense and sparse RNNs , and is based on the sparsification of the influence matrix . • We show that parameter sparsity in RNNs reduces the costs of RTRL in general and SnAp in particular . • We carry out experiments on both real-world and synthetic tasks , and demonstrate that the SnAp approximation : ( 1 ) works well for language modeling compared to the exact unapproximated gradient ; ( 2 ) admits learning temporal dependencies on a synthetic copy task and ( 3 ) can learn faster than BPTT when run fully online . 2 Background . We consider recurrent networks whose dynamics are governed by ht = fθ ( ht−1 , xt ) where ht ∈ Rk is the state , xt ∈ Ra is an input , and θ ∈ Rp are the network parameters . It is assumed that at each step t ∈ { 1 , ... , T } , the state is mapped to an output yt = gφ ( ht ) , and the network receives a loss Lt ( yt , y∗t ) . The system optimizes the total loss L = ∑ t Lt with respect to parameters θ by following the gradient ∇θL . The standard way to compute this gradient is BPTT – running backpropagation on the computation graph “ unrolled in time ” over a number of steps T : ∇θL = T∑ t=1 ∂L ∂ht ∂ht ∂θt = T∑ t=1 ( ∂L ∂ht+1 ∂ht+1 ∂ht + ∂Lt ∂ht ) ∂ht ∂θt ( 1 ) The recursive expansion ∂L∂ht = ∂L ∂ht+1 ∂ht+1 ∂ht + ∂Lt∂ht is the backpropagation rule . The slightly nonstandard notation θt refers to the copy of the parameters used at time t , but the weights are shared for all timesteps and the gradient adds over all copies . 2.1 Real Time Recurrent Learning ( RTRL ) . Real Time Recurrent Learning ( Williams & Zipser , 1989 ) computes the gradient as : ∇θL = T∑ t=1 ∂Lt ∂ht ∂ht ∂θ = T∑ t=1 ∂Lt ∂ht ( ∂ht ∂θt + ∂ht ∂ht−1 ∂ht−1 ∂θ ) ( 2 ) This can be viewed as an iterative algorithm , updating ∂ht∂θ from the intermediate quantity ∂ht−1 ∂θ . To simplify equation 2we introduce the following notation : have Jt : = ∂ht∂θ , It : = ∂ht ∂θt andDt : = ∂ht∂ht−1 . J stands for “ Jacobian ” , I for “ immediate Jacobian ” , and D for “ dynamics ” . We sometimes refer to J as the “ influence matrix ” . The recursion can be rewritten Jt = It +DtJt−1 . Cost analysis Jt is a matrix in Rk×|θ| , which can be on the order of gigabytes for even modestly sized RNNs . Furthermore , performing the operationDtJt−1 involves multiplying a k× k matrix by a k × |θ| matrix each timestep . That requires |θ| times more computation than the forward pass of the RNN core . To make explicit just how expensive RTRL is – this is a factor of roughly one million for a vanilla RNN with 1000 hidden units . 2.2 Truncated RTRL and stale Jacobians . In analogy to Truncated BPTT , one can consider performing a gradient update partway through a training sequence ( at time t ) but still passing forward a stale state and a stale influence Jacobian Jt rather than resetting both to zero after the update . This enables more frequent weight updating at the cost of a staleness bias . The Jacobian Jt becomes “ stale ” because it tracks the sensitivity of the state to old parameters . Experiments ( section 5.2 ) show that this tradeoff can be favourable toward more frequent updates in terms of data efficiency . In fact , much of the RTRL literature assumes that the parameters are updated at every step t ( “ fully online ” ) and that the influence Jacobian is never reset , at least until the start of a new sequence . All truncated BPTT experiments in our paper pass forward a stale state if an update is done before the end of the sequence . 2.3 Sparsity in RNNs . One of the early explorations of sparsity in the parameters of RNNs ( i.e . many entries of θ are exactly zero ) was Ström ( 1997 ) , where one-shot pruning based on weight magnitude with subsequent retraining was employed in a speech recognition task . The current standard approach to inducing sparsity in RNNs ( Zhu & Gupta , 2018 ) remains similar , except that magnitude based pruning happens slowly over the course of training so that no retraining is required . Kalchbrenner et al . ( 2018 ) discovered a powerful property of sparse RNNs in the course of investigating them for text-to-speech – for a constant parameter and flop budget sparser RNNs have more capacity per parameter than dense ones . This property has so far only been shown to hold when the sparsity pattern is adapted during training ( in this case , with pruning ) . Note that parameter parity is achieved by simultaneously increasing the RNN state size and the degree of sparsity . This suggests that training large sparse RNNs could yield powerful sequence models , but the memory required to store the history of ( now much larger ) states required for BPTT becomes prohibitive for long sequences . In this paper , we use a fixed sparsity pattern rather than pruning ( see Appendix B ) , for simplicity . In particular , we pick uniformly at random which indices of weight matrices to force to zero and hold this sparsity pattern constant over the course of training . 3 The Sparse n-Step Approximation ( SnAp ) . Ourmain contribution in this work is the development of an approximation to RTRL called the Sparse n-Step Approximation ( SnAp ) which reduces RTRL ’ s computational requirements substantially . SnAp imposes sparsity on J even though it is in general dense . We choose the sparsity pattern to be the locations that are non-zero after n steps of the RNN ( Figure 1 ) . We also choose to use the same pattern for all steps , though this is not a requirement . This means that the sparsity pattern of Jt is known and can be used to reduce the amount of computation in the product DtJt−1 . See Figure 2 for a visualization of the process . The costs of the resulting methods are compared in Table 1 . We note an alternative strategy would be to perform the full multiplication ofDtJt−1 and then only keep the top-k values . This would reduce the bias of the approximation but increase its cost . More formally , we adopt the following approximation for all t : ( Jt ) ij ≈ { ( Jt ) ij if ( θt ) j influences hidden unit ( ht+n ) i 0 otherwise 3.1 Sparse One-Step Approximation ( SnAp-1 ) . Even for a fully dense RNN , each parameter will in the usual case only immediately influence the single hidden unit it is directly connected to . This means that the immediate Jacobian It tends to be extremely sparse . For example , a Vanilla RNN will have only one nonzero element per column , which is a sparsity level of k−1k . Storing only the nonzero elements of It already saves a significant amount of memory without making any approximations ; It is the same shape as the daunting Jt matrix whereas the nonzero values are the same size as θ . It can become more dense in architectures ( such as GRU and LSTM ) which involve the composition of parameterised layers within a single core step ( see Appendix A for an in-depth discussion of the effect of gating architectures on Jacobian sparsity ) . In the Sparse One-Step Approximation , we only keep entries in Jt if they are nonzero in It . After just two RNN steps , a given parameter has influenced every unit of the state through its intermediate influence on other units . Thus only SnAp with n = 1 is efficient for dense RNNs because n > 1 does not result in any sparsity in J ; for dense networks SnAp-2 already reduces to full RTRL . ( N.b . : SnAp-1 is also applicable to sparse networks . ) Figure 1 depicts the sparse structure of the influence of a parameter for both sparse and fully dense cases . SnAp-1 is effectively diagonal , in the sense that the effect of parameter j on hidden unit i ismaintained throughout time , but ignoring the indirect effect of parameter j on unit i via paths through other units i′ . More formally , it is useful to define u ( j ) as the one component in the state ht connected directly to the parameter j ( which has at the other end of the connection some other entry i′ within ht−1 or xt ) . Let i = u ( j ) . The imposition of the one-step sparsity pattern means only the entry in row i will be kept for column j in Jt . Inspecting the update for this particular entry , we have ( Jt ) ij = ( It ) ij + n∑ m=1 ( Dt ) im ( Jt−1 ) mj = ( It ) ij + ( Dt ) ii ( Jt−1 ) ij ( 3 ) The equality follows from the assumption that ( Jt−1 ) mj = 0 if m 6= i. Diagonal entries in Dt are thus crucial for this approximation to be expressive , such as those arising from skip connections .
This work presents a method, named SnAp, that takes Real-time Recurrent Learning derivations and proposes to approximate its computations with sparse approximations to make them more computational tractable. The method is an alternative to overcome the truncation in backpropagation through time (BPTT) over long term temporal structure. The method assumes a sparsity pattern on the parameters of the network that leads to the relationship on how the gradients could be updated. Finally, the method is evaluated against BPTT, UORO and RTRL on character-level language modeling and a copy task.
SP:929103e44d7ee2bc3b8a4d0c9e523c082a17fb44
Degree-Quant: Quantization-Aware Training for Graph Neural Networks
1 INTRODUCTION . GNNs have received substantial attention in recent years due to their ability to model irregularly structured data . As a result , they are extensively used for applications as diverse as molecular interactions ( Duvenaud et al. , 2015 ; Wu et al. , 2017 ) , social networks ( Hamilton et al. , 2017 ) , recommendation systems ( van den Berg et al. , 2017 ) or program understanding ( Allamanis et al. , 2018 ) . Recent advancements have centered around building more sophisticated models including new types of layers ( Kipf & Welling , 2017 ; Velickovic et al. , 2018 ; Xu et al. , 2019 ) and better aggregation functions ( Corso et al. , 2020 ) . However , despite GNNs having few model parameters , the compute required for each application remains tightly coupled to the input graph size . A 2-layer Graph Convolutional Network ( GCN ) model with 32 hidden units would result in a model size of just 81KB but requires 19 GigaOPs to process the entire Reddit graph . We illustrate this growth in fig . 1 . One major challenge with graph architectures is therefore performing inference efficiently , which limits the applications they can be deployed for . For example , GNNs have been combined with CNNs for SLAM feature matching ( Sarlin et al. , 2019 ) , however it is not trivial to deploy this technique on smartphones , or even smaller devices , whose neural network accelerators often do not implement floating point arithmetic , and instead favour more efficient integer arithmetic . Integer quantization is one way to lower the compute , memory and energy budget required to perform inference , without requiring modifications to the model architecture ; this is also useful for model serving in data centers . Although quantization has been well studied for CNNs and language models ( Jacob et al. , 2017 ; Wang et al. , 2018 ; Zafrir et al. , 2019 ; Prato et al. , 2019 ) , there remains relatively little work addressing ∗Equal contribution . Correspondence to : Shyam Tailor < sat62 @ cam.ac.uk > GNN efficiency ( Mukkara et al. , 2018 ; Jia et al. , 2020 ; Zeng & Prasanna , 2020 ; Yan et al. , 2020 ) . To the best of our knowledge , there is no work explicitly characterising the issues that arise when quantizing GNNs or showing latency benefits of using low-precision arithmetic . The recent work of Wang et al . ( 2020 ) explores only binarized embeddings of a single graph type ( citation networks ) . In Feng et al . ( 2020 ) a heterogeneous quantization framework assigns different bits to embedding and attention coefficients in each layer while maintaining the weights at full precision ( FP32 ) . Due to the mismatch in operands ’ bit-width the majority of the operations are performed at FP32 after data casting , making it impractical to use in general purpose hardware such as CPUs or GPUs . In addition they do not demonstrate how to train networks which generalize to unseen input graphs . Our framework relies upon uniform quantization applied to all elements in the network and uses bit-widths ( 8-bit and 4-bit ) that are supported by off-the-shelf hardware such as CPUs and GPU for which efficient low-level operators for common operations found in GNNs exists . This work considers the motivations and problems associated with quantization of graph architectures , and provides the following contributions : • The explanation of the sources of degradation in GNNs when using lower precision arithmetic . We show how the choice of straight-through estimator ( STE ) implementation , node degree , and method for tracking quantization statistics significantly impacts performance . • An architecture-agnostic method for quantization-aware training on graphs , Degree-Quant ( DQ ) , which results in INT8 models often performing as well as their FP32 counterparts . At INT4 , models trained with DQ typically outperform quantized baselines by over 20 % . We show , unlike previous work , that models trained with DQ generalize to unseen graphs . We provide code at this URL : https : //github.com/camlsys/degree-quant . • We show that quantized networks achieve up to 4.7× speedups on CPU with INT8 arithmetic , relative to full precision floating point , with 4-8× reductions in runtime memory usage . 2 BACKGROUND . 2.1 MESSAGE PASSING NEURAL NETWORKS ( MPNNS ) . Many popular GNN architectures may be viewed as generalizations of CNN architectures to an irregular domain : at a high level , graph architectures attempt to build representations based on a node ’ s neighborhood ( see fig . 2 ) . Unlike CNNs , however , this neighborhood does not have a fixed ordering or size . This work considers GNN architectures conforming to the MPNN paradigm ( Gilmer et al. , 2017 ) . A graph G = ( V , E ) has node features X ∈ RN×F , an incidence matrix I ∈ N2×E , and optionallyDdimensional edge features E ∈ RE×D . The forward pass through an MPNN layer consists of message passing , aggregation and update phases : h ( i ) l+1 = γ ( h ( i ) l , ∧ j∈N ( i ) [ φ ( h ( j ) l , h ( i ) l , eij ) ] ) . Messages from node u to node v are calculated using function φ , and are aggregated using a permutation-invariant function ∧ . The features at v are subsequently updated using γ . We focus on three architectures with corresponding update rules : 1 . Graph Convolution Network ( GCN ) : h ( i ) l+1 = ∑ j∈N ( i ) ∪ { i } ( 1√ didj Wh ( j ) l ) ( Kipf & Welling , 2017 ) , where di refers to the degree of node i . 2 . Graph Attention Network ( GAT ) : h ( i ) l+1 = αi , iWh ( i ) l + ∑ j∈N ( i ) ( αi , jWh ( j ) l ) , where α represent attention coefficients ( Velickovic et al. , 2018 ) . 3 . Graph Isomorphism Network ( GIN ) : h ( i ) l+1 = fΘ [ ( 1 + ) h ( i ) l + ∑ j∈N ( i ) h ( j ) l ] , where f is a learnable function ( e.g . a MLP ) and is a learnable constant ( Xu et al. , 2019 ) . 2.2 QUANTIZATION FOR NON-GRAPH NEURAL NETWORKS . Quantization allows for model size reduction and inference speedup without changing the model architecture . While there exists extensive studies of the impact of quantization at different bitwidths ( Courbariaux et al. , 2015 ; Han et al. , 2015 ; Louizos et al. , 2017 ) and data formats ( Micikevicius et al. , 2017 ; Carmichael et al. , 2018 ; Kalamkar et al. , 2019 ) , it is 8-bit integer ( INT8 ) quantization that has attracted the most attention . This is due to INT8 models reaching comparable accuracy levels to FP32 models ( Krishnamoorthi , 2018 ; Jacob et al. , 2017 ) , offer a 4× model compression , and result in inference speedups on off-the-shelf hardware as 8-bit arithmetic is widely supported . Quantization-aware training ( QAT ) has become the de facto approach towards designing robust quantized models with low error ( Wang et al. , 2018 ; Zafrir et al. , 2019 ; Wang et al. , 2018 ) . In their simplest forms , QAT schemes involve exposing the numerical errors introduced by quantization by simulating it on the forward pass Jacob et al . ( 2017 ) and make use of STE ( Bengio et al. , 2013 ) to compute the gradients—as if no quantization had been applied . For integer QAT , the quantization of a tensor x during the forward pass is often implemented as : xq = min ( qmax , max ( qmin , bx/s+ zc ) ) , where qmin and qmax are the minimum and maximum representable values at a given bit-width and signedness , s is the scaling factor making x span the [ qmin , qmax ] range and , z is the zero-point , which allows for the real value 0 to be representable in xq . Both s and z are scalars obtained at training time . hen , the tensor is dequantized as : x̂ = ( xq − z ) s , where the resulting tensor x̂ ∼ x for a high enough bit-width . This similarity degrades at lower bit-widths . Other variants of integer QAT are presented in Jacob et al . ( 2017 ) and Krishnamoorthi ( 2018 ) . To reach performance comparable to FP32 models , QAT schemes often rely on other techniques such as gradient clipping , to mask gradient updates based on the largest representable value at a given bit-width ; stochastic , or noisy , QAT , which stochastically applies QAT to a portion of the weights at each training step ( Fan et al. , 2020 ; Dong et al. , 2017 ) ; or the re-ordering of layers ( Sheng et al. , 2018 ; Alizadeh et al. , 2019 ) . 3 QUANTIZATION FOR GNNS . In this section , we build an intuition for why GNNs would fail with low precision arithmetic by identifying the sources of error that will disproportionately affect the accuracy of a low precision model . Using this insight , we propose our technique for QAT with GNNs , Degree-Quant . Our analysis focuses on three models : GCN , GAT and GIN . This choice was made as we believe that these are among the most popular graph architectures , with strong performance on a variety of tasks ( Dwivedi et al. , 2020 ) , while also being representative of different trends in the literature . 3.1 SOURCES OF ERROR . QAT relies upon the STE to make an estimate of the gradient despite the non-differentiable rounding operation in the forward pass . If this approximation is inaccurate , however , then poor performance will be obtained . In GNN layers , we identify the aggregation phase , where nodes combine messages from a varying number of neighbors in a permutation-invariant fashion , as a source of substantial numerical error , especially at nodes with high in-degree . Outputs from aggregation have magnitudes that vary significantly depending on a node ’ s in-degree : as it increases , the variance of aggregation values will increase.1 Over the course of training qmin and qmax , the quantization range statistics , become severely distorted by infrequent outliers , reducing the resolution for the vast majority of values observed . This reults in increased rounding error for nodes with smaller in-degrees . Controlling qmin and qmax hence becomes a trade-off balancing truncation error and rounding error . We can derive how the mean and variance of the aggregation output values vary as node in-degree , n , increases for each of the three GNN layers . Suppose we model incoming message values for a single output dimension with random variables Xi , without making assumptions on their exact distribution or independence . Further , we use Yn as the random variable representing the value of node output after the aggregation step . With GIN layers , we have Yn = ( 1 + ) X0 + ∑n i=1Xi . It is trivial to prove that E ( Yn ) = O ( n ) . The variance of the aggregation output is also O ( n ) in the case that that ∑ i 6=j Cov ( Xi , Xj ) ∑ i Var ( Xi ) . We note that if ∑ i 6=j Cov ( Xi , Xj ) is large then it implies that the network has learned highly redundant features , and may be a sign of over-fitting . Similar arguments can be made for GCN and GAT layers ; we would expect GCN aggregation values to grow like O ( √ n ) , and GAT aggregation values to remain constant ( O ( 1 ) ) due to the attention coefficients . We empirically validate these predictions on GNNs trained on Cora ; results are plotted in fig . 3 . We see that the aggregation values do follow the trends predicted , and that for the values of in-degree in the plot ( up to 168 ) the covariance terms can be neglected . As expected , the variance and mean of the aggregated output grow fastest for GIN , and are roughly constant for GAT as in-degree increases . From this empirical evidence , it would be expected that GIN layers are most affected by quantization . By using GIN and GCN as examples , we can see how aggregation error causes error in weight updates . Suppose we consider a GIN layer incorporating one weight matrix in the update function i.e . h ( i ) l+1 = f ( Wy ( i ) GIN ) , where f is an activation function , y ( i ) GIN = ( 1 + ) h ( i ) l + ∑ j∈N ( i ) h ( j ) l , and N ( i ) denotes the in-neighbors of node i . Writing y ( i ) GCN = ∑ k∈N ( i ) ( 1√ didk Wh ( j ) l ) , we see that the derivatives of the loss with respect to the weights for GCN and GIN are : GIN ∂L ∂W = |V |∑ i=1 ( ∂L ∂h ( i ) l+1 ◦ f ′ ( Wy ( i ) GIN ) ) y ( i ) > GIN GCN ∂L ∂W = |V |∑ i=1 ∑ j∈N ( i ) 1√ didj ( ∂L ∂h ( i ) l+1 ◦ f ′ ( y ( i ) GCN ) ) h ( j ) > l The larger the error in y ( i ) GIN—caused by aggregation error—the greater the error in the weight gradients for GIN , which results in poorly performing models being obtained . The same argument applies to GCN , with the h ( j ) > l and y ( i ) GCN terms introducing aggregation error into the weight updates .
The authors propose a new technique for quantization aware training of neural networks that is specially suited for graph neural networks. They do a good job of motivating the problem by demonstrating that the large variation of input degree in GNNs can lead to unique challenges for numerical precision, forcing a compromise between truncation error and rounding error. Th proposed technique incorporates stochastic masking and quantization proportional to the input degree to allow higher input-degree nodes to operate at higher resolution on average.
SP:e5152f19fbd60b76c867e34096a7ba19b2ed6af4
Cluster-Former: Clustering-based Sparse Transformer for Question Answering
1 INTRODUCTION . Long-range contextual understanding has proven critical in many natural language processing ( NLP ) tasks . For example , the relevant context for correctly answering an open-domain question can arch over thousands of words . Encoding long sequences via deep neural networks , however , has remained an expensive and challenging task due to high demand on training time and GPU memory . Traditional sequence modeling methods ( Hochreiter & Schmidhuber , 1997 ) encode long sequences in a chronological order , which suffers high latency . In the place of sequential encoding , recent models such as Transformer ( Vaswani et al. , 2017 ) use simultaneous self-attention over the entire input instead , which has been successfully adopted in many NLP tasks such as textual entailment ( Devlin et al. , 2019 ) , dependency parsing ( Zhou & Zhao , 2019 ) , and summarization ( Lewis et al. , 2019 ) . A caveat with Transformer though is that building full connections over long sequences translates to quadratic growth on memory demand and computational complexity w.r.t . sequence length . One way to efficiently encode long sequences is to first chunk a sequence into much shorter ones with a sliding window , then build connections between the shorter sequences ( Figure 1 ( a ) ) . For example , Child et al . ( 2019 ) , Beltagy et al . ( 2020 ) and Zaheer et al . ( 2020 ) apply sparse attention to chunked sequences in hand-designed patterns in order to gather information from the chunks ( Figure 1 ( b ) ) . Choi et al . ( 2017 ) and Wang et al . ( 2019 ) first use a simpler model to filter chunked sequences , then process selected sequences with fully-connected self-attention . Rae et al . ( 2019 ) makes use of the shared memory of chunked sequences to build connections between them . However , these methods can not encode long-range dependencies with as much flexibility or accuracy as fully-connected selfattention , due to their dependency on hand-designed patterns . Recently , several studies ( Kitaev et al. , 2020 ; Tay et al. , 2020b ) propose to further improve the sparse attention mechanism by hashing or sorting the hidden states into different buckets ( Figure 1 ( c ) ) . These works mainly explore tasks with relatively short sequences , such as sentence-level Machine Translation ( MT ) , where the number of hashing vectors is relatively small ( less than 16 in Kitaev et al . ( 2020 ) ) , allowing randomly initialized hashing vectors to hash hidden states into correct buckets . However , how to use hashing-based attention in the context of long sequences ( e.g. , , up to thousands of words ) is still an unexplored territory . Our proposed framework for efficient long sequence encoding , Cluster-Former , marries both sliding-window and hashing-based methods to achieve effective local and long-range dependency encoding . Cluster-Former consists of two types of encoding layer . The first one ( noted as SlidingWindow Layer ) focuses on extracting local information within a sliding window . It applies Transformer to the hidden states of each chunked sequence independently , as shown in Figure 1 ( a ) . The other one ( noted as Cluster-Former Layer ) learns to encode global information beyond the initial chunked sequences . Specifically , we first apply clustering to the input hidden states so that similar hidden states are assigned to the same cluster , as shown in Figure 1 ( d ) . The clustered and sorted input is then divided uniformly into chunks , each encoded by a Transformer layer . Note that to make model training more efficient , the cluster centroids are not computed online but updated periodically ( every epoch or a few epochs ) . We accumulate the hidden states from the layer prior to the Cluster-Former layer in a memory bank , and apply the K-Means algorithm to form cluster centroids during each update cycle . Compared to previously discussed sparse attention based on pre-selected positions ( Figure 1 ( b ) ) or randomly-initialized hashing vectors ( Figure 1 ( c ) ) , experimental results show that our method can encode dependency across chunked sequences more effectively . Our contributions can be summarized as follows . ( i ) We propose Cluster-Former , a novel approach to capturing long-range dependencies more effectively than locality-sensitive hashing method . ( ii ) We propose a new Transformer-based framework to process long sequences by combining SlidingWindow and Cluster-Former layers to extract both local and global contextual information . ( iii ) Our model achieves the best performance on question answering datasets of Natural Questions ( long answer ) , SearchQA , and Quasar-T . 2 RELATED WORK . Efficient Transformers With Transformer models growing larger and larger , how to handle longer sequences arises as a critical challenge . Many works have been proposed to improve the computational and memory efficiency of Transformers , including Sparse Transformer ( Child et al. , 2019 ) , Routing Transformer ( Roy et al. , 2020 ) , Reformer ( Kitaev et al. , 2020 ) , Sinkhorn Transformer ( Tay et al. , 2020b ) , Longformer ( Beltagy et al. , 2020 ) , ETC ( Ainslie et al. , 2020 ) , Synthesizer ( Tay et al. , 2020a ) , Performer ( Choromanski et al. , 2020 ) , Linformer ( Wang et al. , 2020 ) , Linear Transformer ( Katharopoulos et al. , 2020 ) , and BigBird ( Zaheer et al. , 2020 ) . Tay et al . ( 2020c ) provided an excellent literature survey on this emerging topic . Our method falls into the setting of learnable sparse-attention patterns including Routing Transformer , Reformer and Sinkhorn Transformer . Our method is closer to Routing Transformer ( Roy et al. , 2020 ) which also uses cluster centroids to learn patterns , while we are targeting on quite different tasks ( language modeling VS question answering ) which leads to the significant difference on frameworks . Moreover , our cluster centroids are updated in very different ways ( online exponentially moving centroids VS periodical centroids update by KMeans ) . Long Sequence in Question Answering For tasks such as open-domain question answering ( Chen et al. , 2017 ) , a large volume of documents or paragraphs is usually retrieved to infer the answer , yielding extremely long context content . Despite the fact that state-of-the-art NLP models are capable of extracting answers amid complex context , they still struggle with extremely long input sequences . Recent advances that advocate the use of large-scale pre-trained models ( Lewis et al. , 2019 ; Liu et al. , 2019 ; Lan et al. , 2020 ) for question answering make this problem more prominent , due to tremendous memory consumption . To process long sequences , the most widely-used method is to first use a lightweight model to filter out redundant text , then use sliding-window-based approaches to encode the remaining sequences with a more sophisticated model . Chen et al . ( 2017 ) integrated bi-gram features into Information Retrieval ( IR ) methods to retrieve related documents more accurately . Wang et al . ( 2018 ) trained a paragraph selector using as the reward whether the entire system can obtain the correct answer or not . Lin et al . ( 2018 ) proposed to use a paragraph ranking model to curate data that are required for training reading comprehension models . Wang et al . ( 2019 ) trained a ranker to merge paragraphs for multi-passage reasoning . Asai et al . ( 2020 ) trained a recurrent retriever to select paragraphs for multi-hop question answering . Besides the above methods , directly applying Efficient Transformers to process long sequences in question answering is another option . In this paper , we focus on this direction by directly training our Cluster-Former on the long context without using lightweight model for context filtering . 3 PROPOSED APPROACH . The proposed framework to handle long sequences is pivoted on two types of Transformer layer : ( i ) Sliding-Window Layer ; and ( ii ) Cluster-Former Layer . The former focuses on encoding local sequence information , while the latter is on encoding global context and always built on top of the former layer . An overview of the two layers is illustrated in Figure 2 . 3.1 SLIDING-WINDOW LAYER . Despite that our focus is on capturing long-range dependencies for global context , local information also plays a critical role for knowledge propagation . Therefore , in the lower section of our network , we adopt the traditional sliding-window encoding mechanism . A sliding window segments a long sequence X into short , overlapping ones with window size l and stride m , as illustrated in Figure 2 ( a ) . Note that in this paper , we focus on question answering tasks , for which we concatenate the question Q with each sequence chunked from the document : H0k = [ Q ; X [ m× k : ( m× k + l ) ] ] , ( 1 ) where Q ∈ Rq×d denotes question embeddings given a QA task , q is the number of tokens in the question , and X ∈ Rx×d is the embeddings for all context , x is the number of tokens in context . k is the ID of the chunked sequence , l is the window size , and m is the stride of the sliding window . [ idx1 : idx2 ] indicates selecting rows between the index of idx1 and idx2 of the matrix . [ · ; · ] means concatenating the matrices along the row . We first use Transformer to encode each sequence in sliding window as follows : Hn+1k = Transformer ( H n k ) , ( 2 ) where Hn+1k ∈ R ( q+l ) ×d is the output of Transformer on the k-th sequence in the n-th layer . While it is not the final output of the n-th layer . As we expect the neighbouring sequences to share useful information in hidden states as well , we always set m < l to allow overlapping between sequences . We use the mean values of the Transformer hidden states at the overlapped tokens between windows as final outputs . To merge the representations from ( k − 1 ) -th sequence : Hn+1k [ q : q + l −m ] + = H n+1 k−1 [ q + m : end ] , Hn+1k [ q : q + l −m ] / = 2 , and merge representations from ( k + 1 ) -th sequence : Hn+1k [ q + m : end ] + = H n+1 k+1 [ q : q + l −m ] , Hn+1k [ q + m : end ] / = 2 , ( 3 ) where + = is to add matrices in-place and / = is to divide a matrix by a scalar value in-place . The merged hidden states Hn+1k ∈ R ( q+l ) ×d are the final outputs of the n-th layer . If the next layer is Cluster-Former , the output hidden states in this layer Hn+1k will be saved into memory bank for computing the cluster centroids . 3.2 CLUSTER-FORMER LAYER . Algorithm 1 Cluster Centroids Update 1 : Initialize Memory = Queue ( ) 2 : Centroids = GETCENTROIDS ( RandomVector ) 3 : 4 : function TRAIN ( Inputs ) 5 : for i = 1 , 2 , . . . , IterationNum do 6 : States = Sliding-Transformer ( Inputs [ i ] ) 7 : Memory.add ( States ) 8 : while len ( Memory ) > M do 9 : Memory.pop ( ) 10 : end while 11 : if i % ClusterUpdateFrequency == 0 then 12 : Centroids = GETCENTROIDS ( Memory ) 13 : end if 14 : Clusters = cluster States by Centroids 15 : States = Cluster-Former ( Clusters ) 16 : end for 17 : end function 18 : 19 : function GETCENTROIDS ( HiddenStates ) 20 : Centroids = K-Means ( HiddenStates ) 21 : Outputs = List ( ) 22 : Outputs [ 1 ] = Centroids [ 1 ] 23 : for i = 2 , 3 , . . . , ClusterNum do 24 : Outputs [ i ] = centroid from Centroids that is closest to Outputs [ i− 1 ] but not in Outputs 25 : end for 26 : return Outputs 27 : end function We introduce a Cluster-Former layer to add global representational power to Transformer beyond sliding windows . An in-depth visualization of the layer is illustrated in Figure 2 ( b ) . The input of the Cluster-Former layer comes from the hidden states of the prior layer ( in our case a Sliding-Window layer ) . After merging the overlaps between sequence chunks , the input of this layer is defined as : H̄n = [ Hn0 [ 0 : q + m ] ; ... ; H n k [ 0 : q + m ] ] , ( 4 ) where H̄n ∈ R ( qdx/me+x ) ×d is the hidden states to cluster , x is the number of tokens in the context . As the hidden states with larger cosine similarity are more likely to have higher attention weights , we build sparse selfattention only on the hidden states in the same cluster . In this work , we use KMeans as the chosen clustering method for simplicity . More advanced clustering algorithms have the potential of yielding better performance . Since running KMeans on the fly in each training iteration is computationally expensive , we decide to re-compute the cluster centroids with low frequency ( every epoch or a few epochs ) . In addition , to avoid dramatic changes in the cluster centroids due to limited hidden state inputs , we maintain a memory bank for the most recent hidden states . The entire procedure is depicted in Algorithm 1 . Once we compute the cluster centroids , we can directly use them for hidden state clustering as follows : vn = argmax ( Hn ( Cn ) T ||Hn||2||Cn||2 ) , ( 5 ) where Cn ∈ Rp×d are the cluster centroids for layer n , and p is the pre-defined number of clusters . The function argmax ( · ) performs on the last dimension and assigns all the input hidden states into different clusters based on the max value of cosine similarity between the hidden states and cluster centroids . vn ∈ R ( qdx/me+x ) is the assigned cluster IDs of all the input hidden states . Since the number of hidden states in different clusters can vary substantially , padding them to the maximum length for Transformer training will significantly increase the computational time . To make the extraction of global context more efficient , we greedily pick the cluster centroids based on the nearest neighbour ( measured by cosine similarity ) as shown in the function GETCENTROIDS in Algorithm 1 . Thus , the hidden states with similar cluster IDs are also close to each other . Then , we can directly sort the cluster IDs of hidden states and uniformly chunk the hidden states ( same window size and stride m ) : un = argsort ( vn ) , ank = u n [ mk : m ( k + 1 ) ] , Enk = H n [ ank ] , ( 6 ) where the function argsort ( · ) is to obtain the indexes of input values sorted in order ( same values sorted by the corresponding position of hidden states ) . ank ∈ Rm is the chunked indexes of the hidden states . Enk ∈ Rm×d is the k-th clustered hidden states , and we will run Transformer on top of it to build the connection beyond the words in the initial sliding window as follows : En+1k = Transformer ( E n k ) . ( 7 ) After updating the hidden states , we map them back to the order before clustering : H̄n+1 = [ En+10 ; E n+1 1 ; ... ; E n+1 K ] , ān = [ an0 ; a n 1 ; ... ; a n K ] , ( 8 ) H̄n+1 [ ān ] = clone ( H̄n+1 ) , ( 9 ) where H̄n+1 is the final output hidden state of this layer and has the same word order as the input H̄n . In experiments , we stack these two types of layer interchangeably to capture both global and local context efficiently . 4 EXPERIMENTS 4.1 DATASETS We evaluate our proposed approach on multiple question answering benchmarks . The statistics of all the datasets are summarized in Table 1 . Quasar-T1 ( Dhingra et al. , 2017 ) : The goal of this task is to answer open-domain questions from Trivia Challenge . All the passages harvested through information retrieval can be used to answer questions . The task requires the model to generate answers in phrases . The evaluation metric on this dataset is based on Exact Match and F1 score of the bag-of-words matching . Our evaluation tool2 comes from the SQuAD dataset . SearchQA3 ( Dunn et al. , 2017 ) : The setting of this dataset is the same as Quasar-T , except that the questions are sourced from Jeopardy ! instead . 1https : //github.com/bdhingra/quasar 2https : //rajpurkar.github.io/SQuAD-explorer/ 3https : //github.com/nyu-dl/dl4ir-searchQA Natural Questions4 ( Kwiatkowski et al. , 2019 ) : This task aims to answer questions based on a given Wikipedia document , and has two settings . ( i ) Long answer : select a paragraph that can answer the question based on the Wikipedia document if any . ( ii ) Short answer : extract an answer phrase from the document if the document contains the answer . As the given document may not contain answer , we can either predict an answer or predict no answer . The evaluation metric on this dataset is the F1 score , where true positives are exactly correct answers , false positives are incorrect answer predictions , and false negatives are incorrect “ no answer ” predictions . As the test set is hidden , we split 5 % of the training set for validation , and use the original validation set for testing . We use the official tool from the dataset to evaluate our models . We also submit our best model to the leaderboard .
Cluster-former is the latest proposal for enabling transformers to deal with long input sequences. Such sequences are particularly problematic for problems like question answering, QA, (or summarization), where the context can be arbitrarily long, and effectively open-ended when the setup includes a context retrieval component (e.g., as in OpenQA). Cluster-Former combines local information by encoding sequence chunks separately with a sliding window, then injects clustering layers, that use k-means to compute centroids to cluster hidden states and capture global information. The approach yields state-of-the-art, and top-of-leaderboard, results on Natural Questions (long answers).
SP:031cbb9fd369d00fa867901cf650c777d356d853
Powers of layers for image-to-image translation
1 INTRODUCTION . Neural networks define arbitrarily complex functions involved in discriminative or generative tasks by stacking layers , as supported by the universal approximation theorem ( Hornik et al. , 1989 ; Montúfar , 2014 ) . More precisely , the theorem states that stacking a number of basic blocks can approximate any function with arbitrary precision , provided it has enough hidden units , with mild conditions on the non-linear basic blocks . Studies on non-linear complex holomorphic functions involved in escape-time fractals showed that iterating simple non-linear functions can also construct arbitrarily complex landscapes ( Barnsley et al. , 1988 ) . These functions are complex in the sense that their iso-surfaces are made arbitrarily large by increasing the number of iterations . Yet there is no control on the actual shape of the resulting function . This is why generative fractals remain mathematical curiosities or at best tools to construct intriguing landscapes . In this paper , our objective is to combine the expressive power of both constructions , and we study the optimization of a function that iterates a single building block in the latent space of an auto-encoder . We focus on image translation tasks , that can be trained from either paired or unpaired data . In the paired case , pairs of corresponding input and output images are provided during training . It offers a direct supervision , so the best results are usually obtained with these methods ( Chen et al. , 2017 ; Wang et al. , 2018 ; Park et al. , 2019 ) . We focus on unpaired translation : only two corpora of images are provided , one for the input domain A and the other for the output domain B . Therefore we do not have access to any parallel data ( Conneau et al. , 2017 ) , which is a realistic scenario in many applications , e.g. , image restoration . We train a function fAB : A ! B , such that the output b⇤ = F ( a ) for a 2 A is indiscernible from images of B . Our transformation is performed by a single residual block that is composed a variable number of times . We obtain this compositional property thanks to a progressive learning scheme that ensures that the output is valid for a large range of iterations . As a result , we can modulate the strength of the transformation by varying the number of times the transformation is composed . This is of particular interest in image translation tasks such as denoising , where the noise level is unknown at training time , and style transfer , where the user may want to select the best rendering . This “ Powers of layers ” ( PoL ) mechanism is illustrated in Figure 1 in the category transfer context ( horse to zebra ) . Our architecture is very simple and only the weights of the residual block differ depending on the task , which makes it suitable to address a large number of tasks with a limited number of parameters . This proposal is in sharp contrast with the trend of current state-of-the-art works to specialize the architecture and to increase its complexity and number of parameters ( Fu et al. , 2019 ; Viazovetskyi et al. , 2020 ; Choi et al. , 2020 ) . Despite its simplicity , our proof of concept exhibits similar or better performance than a vanilla CycleGAN architecture , all things being equal otherwise , for the original set of image-to-image translation tasks proposed in their papers , as well as for denoising , deblurring and deblocking . With significantly fewer parameters and a versatile architecture , we report competitive results confirmed by objective and psycho-visual metrics , illustrated by visualizations . We will provide the implementation for the sake of reproducibility . 2 RELATED WORK . Generative adversarial networks ( GANs ) ( Goodfellow et al. , 2014 ) is a framework where two networks , a generator and a discriminator , are learned together in a zero-sum game fashion . The generator learns to produce more and more realistic images w.r.t . the training dataset . The discriminator learns to separate between real data and increasingly realistic generated images . GANs are used in many tasks such as domain adaptation ( Bousmalis et al. , 2016 ) , style transfer ( Karras et al. , 2019b ) , inpainting ( Pathak et al. , 2016 ) and talking head generation ( Zakharov et al. , 2019 ) . Unpaired image-to-image translation considers the tasks of transforming an image from a domain A into an image in a domain B . The training set comprises a sample of images from domains A and B , but no pairs of corresponding images . A classical approach is to train two generators ( A ! B and B ! A ) and two discriminators , one for each domain . When there is a shared latent space between the domains , a possible choice is to use a variational auto encoder like in CoGAN Liu & Tuzel ( 2016 ) . CycleGAN Zhu et al . ( 2017 ) , DualGAN Yi et al . ( 2017 ) and subsequent works ( Liu et al. , 2019 ; Fu et al. , 2019 ; Choi et al. , 2020 ) augment the adversarial loss induced by the discriminators with a cycle consistency constraint to preserve semantic information throughout the domain changes . All these variants have architectures roughly similar to CycleGAN : an encoder , a decoder and residual blocks operating on the latent space . They also incorporate elements of other networks such as StyleGAN Karras et al . ( 2019a ) . In our work , we build upon a simplified form of the CycleGAN architecture that generalizes over tasks easily . We applied also our method to NICE-GAN Chen et al . ( 2020 ) . A concurrent work , GANHopper by Lira et al . ( 2020 ) proposes to iterate CycleGAN generators in order to perform the transformation . However , their method has many difference with ours : They iterate full generators and not a single residual block , their encoder and decoder are not fixed , their number of iteration is fixed and they have to use additional discriminators to act on intermediate transformation states . Other works ( Zhang et al. , 2019 ; Li et al. , 2020 ) use recurrent networks to perform transformations but this is done in a paired context , which results in very different methods from ours and GANHopper . Transformation modulation is an interpolation between two image domains . It is a byproduct of some approaches : For instance , a linear interpolation in latent space ( Brock et al. , 2018 ; Radford et al. , 2015 ) morphs between two images . Nevertheless , one important limitation is that the starting and ending points must both be known , which is not the case in unpaired learning . Other approaches such as the Fader networks ( Lample et al. , 2017 ) or StyleGan2 ( Viazovetskyi et al. , 2020 ) act on scalar or boolean attributes that are disentangled in the latent space ( eg. , age for face images , wear glasses or not , etc ) . Nevertheless , this results in complex models , for which dataset size and the variability of images strongly impacts the performance : they fail to modulate the transform with small datasets or with large variabilities . A comparison of PoL with the Fader network is provided in Appendix C and shows that our approach is more effective . Progressive learning and inference time modulation are performed in multi-scale methods such as SinGAN ( Rott Shaham et al. , 2019 ) and ProgressiveGAN ( Karras et al. , 2017 ) . Progressive learning obtains excellent results for high resolution images where it is more difficult to use classical approaches . The training is performed in several steps during which the size of both the images and the network are increased . The inference time of some architectures can be modulated by stopping the forward pass at some layer ( Huang et al. , 2016 ; Wu et al. , 2017 ; Veit & Belongie , 2017 ) .This differs from our approach , where the number of residual block compositions ( “ powers ” ) can be chosen , to shorten the inference . A by-product is a reduction of the number of network parameters . Weight sharing is a way of looking at our method , because the same layer is applied several times within the same network . Recurrent Neural Networks ( RNN ) are the most classical example weight sharing in a recursive architecture . Besides RNNs , weight sharing is mainly used for model compression , sequential data and ordinary differential equations ( ODE ) ( Gao et al. , 2019 ; Han et al. , 2015 ; Chen et al. , 2018 ) .A few works ( Jastrzebski et al. , 2017 ; Zhang & Jung , 2018 ) apply weight sharing to unfold a ResNet and evaluate its performance in classification tasks . The optimization is inherently difficult , so they use independent batch normalization for each shared layer . With PoL we observe the same optimization issues , that we solve by a progressive training strategy , see Section 3.3 . Recent work ( Jeon et al. , 2020 ) are interested in the composition of the same block by considering the parallel with the fixed point theorem , nevertheless their application remains to rather simple problems compared to our unpaired image-to-image translation tasks . 3 POWER OF LAYERS . We adopt the same context as CycleGANand focus on unpaired image-to-image translation : the objective is to transform an image from domain A into an image from domain B . In our case the domains can be noise levels , painting styles , blur , JPEG artifacts , or simply object classes that appear in the image . The training is unpaired : we do not have pairs of corresponding images at training time . CycleGAN is simple , adaptable to different tasks and allows a direct comparison in Sections 4 and 5 . We learn two generators and two discriminators . The generator GAB : I ! I transforms an element of A into an element of B , and GBA goes the other way round , I being the fixed-resolution image space . The discriminators DA : I ! [ 0 , 1 ] ( resp . DB ) predicts whether an element belongs to domain A ( resp B ) . We use the same losses as commonly used in unpaired image-to-image translation : LTotal = AdvLAdv + CycLCyc + IdLId , ( 1 ) where LAdv ( GAB , DB ) = Eb⇠B [ logDB ( b ) ] + Ea⇠A [ log ( 1 DB ( GAB ( a ) ) ) ] , LCyc ( GAB , GBA ) = Eb⇠B [ kGAB ( GBA ( b ) ) bk1 ] + Ea⇠A [ kGBA ( GAB ( a ) ) ak1 ] , LId ( GAB , GBA ) = Eb⇠B [ kGAB ( b ) bk2 ] + Ea⇠A [ kGBA ( a ) ak2 ] . The Adversarial loss LAdv ( GAB , DB ) verifies that the generated images are in the correct domain . The Cycle Consistency loss LCyc ( GAB , GBA ) ensures a round-trip through the two generators reconstructs the initial image , and the identity loss LId ( GAB , GBA ) penalizes the generators transforming images that are already in their target domain . We keep the same linear combination coefficients as in CycleGAN : Adv = 1 , Cyc = 10 , Id = 5 .
This paper proposes an unpaired image-to-image translation method which applies a pre-trained auto-encoder and a latent feature transformer (single block) to perform iterative image transformation. A progressive training and warm-up strategy is used to settle the numerical exponentiation effects caused by powers of layers. In the testing phase, the discriminator is also used to adjust the inference time.
SP:31e67caf860b47d871f17848355cd91b65830f59
Partial Rejection Control for Robust Variational Inference in Sequential Latent Variable Models
1 INTRODUCTION . Exact inference in latent variable models is usually intractable . Markov Chain Monte-Carlo ( MCMC ) ( Andrieu et al. , 2003 ) and variational inference ( VI ) methods ( Blei et al. , 2017 ) , are commonly employed in such models to make inference tractable . While MCMC has been the traditional method of choice , often with provable guarantees , optimization-based VI methods have also enjoyed considerable recent interest due to their excellent scalability on large-scale datasets . VI is based on maximizing a lower bound constructed through a marginal likelihood estimator . For latent variable models with sequential structure , sequential Monte-Carlo ( SMC ) ( Doucet & Johansen , 2009 ) returns a much lower variance estimator of the log marginal likelihood than importance sampling ( Bérard et al. , 2014 ; Cérou et al. , 2011 ) . In this work , we focus our attention on designing a low variance , unbiased , and computationally efficient estimator of the marginal likelihood . The performance of SMC based methods is strongly dependent on the choice of the proposal distribution . Inadequate proposal distributions propose values in low probability areas under the target , leading to particle depletion ( Doucet & Johansen , 2009 ) . An effective solution is to use rejection control ( Liu et al. , 1998 ; Peters et al. , 2012 ) which is based on an approximate rejection sampling step within SMC to reject samples with low importance weights . In this work , we leverage the idea of partial rejection control ( PRC ) within the framework of SMC based VI for sequential latent variable models . To this end , we construct a novel lower bound , VSMC-PRC , and propose an efficient optimization strategy for selecting the variational parameters . Compared to other recent SMC based VI approaches ( Naesseth et al. , 2017 ; Maddison et al. , 2017 ; Le et al. , 2017 ) , our approach consists of an inbuilt accept-reject mechanism within SMC to prevent particle depletion . The use of accept-reject within SMC makes the particle weight intractable , therefore , we use a generalization of the Bernoulli factory ( Asmussen et al. , 1992 ) to construct unbiased estimators of the marginal likelihood for SMC-PRC . Although the idea of combining VI with an inbuilt accept-reject mechanism is not new ( Salimans et al. , 2015 ; Ruiz & Titsias , 2019 ; Grover et al. , 2018 ; Gummadi , 2014 ) , a key distinction of our approach is to incorporate an accept-reject mechanism along with a resampling framework . In contrast to standard sampling algorithms that may reject the entire stream of particles , we use a partial accept-reject on the most recent update , increasing the sampling efficiency . Further , the variational framework of SMC-PRC is interesting in itself as it combines accept-reject with particle filter methods . Therefore , our proposed bound VSMC-PRC generalizes several existing approaches for example : Variational Rejection Sampling ( VRS ) ( Grover et al. , 2018 ) , FIVO ( Maddison et al. , 2014 ) , IWAE ( Burda et al. , 2015 ) , and standard variational Bayes ( Blei et al. , 2017 ) . Another key distinction is that , while existing approaches using Bernoulli factory are limited to niche one-dimensional toy examples , our proposed approach is scalable . To the best of our knowledge , there is no prior work that has used Bernoulli factories for such a general case like variational recurrent neural networks ( VRNN ) ; therefore , we believe this aspect to be a significant contribution as well . The rest of the paper is organized as follows : In Section 2 , we provide a brief review on SMC , partial rejection control , and dice enterprise . In Section 3 , we introduce our VSMC-PRC bound and provide new theoretical insights into the Monte-Carlo estimator and design efficient ways to optimize it . Finally , we discuss related work and present experiments on the Gaussian state-space model ( SSM ) and VRNN . 2 BACKGROUND . We denote a sequence of T real-valued observations as x1 : T = ( x1 , x2 , . . . , xT ) , and assume that there is an associated sequence of latent variables z1 : T = ( z1 , z2 , . . . , zT ) . We are interested in inferring the posterior distribution of the latent variables , i.e. , p ( z1 : T |x1 : T ) . The task is , in general , intractable . For the rest of the paper we have used some common notations from SMC and VI literature where zit : i th particle at time t ; Ait−1 : ancestor variable for the i th particle at time t ; θ and φ : model and variational parameters , respectively . 2.1 SEQUENTIAL MONTE CARLO WITH PARTIAL REJECTION CONTROL . An SMC sampler approximates a sequence of densities { pθ ( z1 : t|x1 : t ) } Tt=1 through a set of N weighted samples generated from a proposal distribution . Let the proposal density be qφ ( z1 : T |x1 : T ) = T∏ t=1 qφ ( zt|x1 : t , z1 : t−1 ) . ( 1 ) Consider time t−1 at which we have uniformly weighted samples { N−1 , zi1 : t−1 , Ait−1 } Ni=1 estimating pθ ( z1 : t−1|x1 : t−1 ) . We want to estimate pθ ( z1 : t|x1 : t ) such that particles with a low importance weight are automatically rejected . PRC achieves this by using an approximate rejection sampling step ( Liu et al. , 1998 ; Peters et al. , 2012 ) . The overall procedure is as follows : 1 . Generate zit ∼ qφ ( zt|x1 : t , z Ait−1 1 : t−1 ) where i = 1 , 2 , . . . , N . 2 . Accept zit with probability aθ , φ ( z i t|z Ait−1 1 : t−1 , x1 : t ) = 1 + M ( i , t− 1 ) qφ ( zit|x1 : t , zAit−11 : t−1 ) pθ ( xt , zit|x1 : t−1 , z Ait−1 1 : t−1 ) −1 , ( 2 ) where M ( i , t− 1 ) is a hyperparameter controlling the acceptance rate ( see Proposition 3 and Section 3.3 for more details ) . Note that PRC applies accept-reject only on zit , not on the entire trajectory . 3 . If zit is rejected go to step 1 . 4 . The new incremental importance weight of the accepted sample is αt ( z i 1 : t ) = c i tZ ( z Ait−1 1 : t−1 , x1 : t ) , ( 3 ) where cit is cit = pθ ( xt , z i t|x1 : t−1 , z Ait−1 1 : t−1 ) qφ ( zit|x1 : t , z Ait−1 1 : t−1 ) aθ , φ ( z i t|z Ait−1 1 : t−1 , x1 : t ) , ( 4 ) and the intractable normalization constant Z ( . ) ( For simplicity of notation , we have ignored the dependence of Z ( . ) on M ( i , t− 1 ) ) Z ( z Ait−1 1 : t−1 , x1 : t ) = ∫ aθ , φ ( zt|z Ait−1 1 : t−1 , x1 : t ) qφ ( zt|x1 : t , z Ait−1 1 : t−1 ) dzt . ( 5 ) 5 . Compute Monte-Carlo estimator of unnormalized weight w̃it = pθ ( xt , z i t|x1 : t−1 , z Ait−1 1 : t−1 ) 1 K ∑K k=1 aθ , φ ( δ i , k t |z Ait−1 1 : t−1 , x1 : t ) qφ ( zit|x1 : t , z Ait−1 1 : t−1 ) aθ , φ ( z i t|z Ait−1 1 : t−1 , x1 : t ) , ( 6 ) where δi , kt ∼ qφ ( zt|x1 : t , z Ait−1 1 : t−1 ) and k = 1 , 2 , . . . , K. Note that w̃ i t would be essential for constructing unbiased estimator for pθ ( x1 : T ) . 6 . Generate ancestor variables Ait through dice-enterprise and set new weights w i t = N −1 for i = 1 , 2 , . . . , N : Ait ∼ Categorical ( αt ( z 1 1 : t ) ∑N j=1 αt ( z j 1 : t ) , αt ( z 2 1 : t ) ∑N j=1 αt ( z j 1 : t ) , . . . , αt ( z N 1 : t ) ∑N j=1 αt ( z j 1 : t ) ) . ( 7 ) 2.2 DICE ENTERPRISE . Simulation of ancestor variables in Eq . 7 is non-trivial due to intractable normalization constants in the incremental importance weight ( see Eq . 3 ) . Vanilla Monte-Carlo estimation of αt ( . ) yields biased samples of ancestor variables from Eq . 7 . To address this issue , we leverage a generalization of Bernoulli factory , called dice-enterprise ( Morina et al. , 2019 ) . Note that multinoulli extensions of Bernoulli factory ( Dughmi et al. , 2017 ) have also been used for resampling within intractable SMC before ( Schmon et al. , 2019 ) , a key distinction of our approach is to design a scalable Bernoulli factory methodology especially useful for VI applications . Suppose we can simulate Bernoulli ( pit ) outcomes where p i t is intractable . Bernoulli factory problem simulates an event with probability f ( pit ) , where f ( . ) is some desired function . In our case , the intractable coin probability pit is the intractable normalization constant , pit = Z ( z Ait−1 1 : t−1 , x1 : t ) = ∫ aθ , φ ( zt|z Ait−1 1 : t−1 , x1 : t ) qφ ( zt|x1 : t , z Ait−1 1 : t−1 ) dzt . ( 8 ) Since pit ∈ [ 0 , 1 ] and we can easily simulate this coin , we obtain the dice-enterprise algorithm below . 1 . Required : Constants { cit } Ni=1 see Eq . 4 . 2 . Sample C ∼ Categorical ( c1t∑N j=1 c j t , c2t∑N j=1 c j t , . . . , cNt∑N j=1 c j t ) 3 . If C = i , generate Ui ∼ U [ 0 , 1 ] and zt ∼ qφ ( zt|x1 : t , z Ait−1 1 : t−1 ) • If Ui < aθ , φ ( zt|z Ait−1 1 : t−1 , x1 : t ) output i • Else go to step 2 The dice-enterprise produces unbiased ancestor variables . Note that we can easily control the efficiency of the proposed dice-enterprise through the hyper-parameter M ( similar to Eq . 2 ) in contrast to existing Bernoulli factory algorithms ( Schmon et al. , 2019 ) . For details on efficiency and correctness , please refer to Section 3.1 and Section 3.3 . Our proposed VSMC-PRC bound is constructed through a marginal likelihood estimator obtained by combining the SMC sampler with a PRC step and dice-enterprise . The variance of estimators obtained through SMC-PRC particle filter is usually low ( Peters et al. , 2012 ) . Therefore , we expect VSMC-PRC to be a tighter bound compared to the standard SMC based bounds used in recent works ( Maddison et al. , 2017 ; Naesseth et al. , 2017 ; Le et al. , 2017 ) . Algorithm 1 summarizes the generative process to simulate the VSMC-PRC bound . Please see Figure 1 to visualize the generative process for VSMC-PRC . Algorithm 1 Estimating the VSMC-PRC lower bound 1 : Required : N , K , and M 2 : for t ∈ { 1 , 2 , . . . , T } do 3 : for i ∈ { 1 , 2 , . . . , N } do 4 : zit , c i t , w̃ i t ∼ PRC ( q , p , M ( i , t− 1 ) ) 5 : zi1 : t = ( z Ait−1 1 : t−1 , z i t ) 6 : end for 7 : for i ∈ { 1 , 2 , . . . , N } do 8 : Ait = DICE-ENT ( { cit , zi1 : t } Ni=1 ) 9 : end for 10 : end for 11 : return log ∏T t=1 ( 1 N ∑N i=1 w̃ i t ) 12 : 13 : PRC ( q , p , M ( i , t− 1 ) ) 14 : while sample not accepted do 15 : Generate zit ∼ qφ ( zt|x1 : t , z Ait−1 1 : t−1 ) 16 : Accept zit with probability aθ , φ ( z i t|z Ait−1 1 : t−1 , x1 : t ) 17 : end while 18 : Sample { δi , kt } Kk=1 ∼ qφ ( zt|x1 : t , z Ait−1 1 : t−1 ) 19 : Calculate w̃it from Eq . 6 20 : Calculate cit from Eq . 4 21 : return ( zit , c i t , w̃ i t ) 22 : 23 : DICE-ENT ( { cit , zi1 : t } Ni=1 ) 24 : Sample C ∼ Multinoulli ( cit∑N j=1 c j t ) N i=125 : if C == i then 26 : Sample Ui ∼ U [ 0 , 1 ] 27 : zit ∼ qφ ( zt|x1 : t , z Ait−1 1 : t−1 ) 28 : end if 29 : if Ui < aθ , φ ( zit|z Ait−1 1 : t−1 , x1 : t ) then 30 : return ( i ) 31 : else 32 : return DICE-ENT ( { cit , zi1 : t } Ni=1 ) 33 : end if
This paper describes an SMC algorithm to sample the posterior distribution of latent states $p_\theta(z_{1:T}|x_{1:T})$ in a latent variable models $p_\theta(x_{1:T}, z_{1:T})$. The authors consider a completely general setting (the authors assume Eq.(1) but clearly there is nothing to assume here, this the standard Bayes rule). It is well known that the vanilla SMC sampler is a good candidate for ELBO because it provides an unbiased estimator of the likelihood. But the authors prefer here to use a more sophisticated version of the SMC algorithm, which features a partial rejection algorithm, which amounts to eliminate proposed particles which are "large enough" likelihood.
SP:26f9757d1a510fe264bda0570cea50301383c39a
Flowtron: an Autoregressive Flow-based Generative Network for Text-to-Speech Synthesis
1 INTRODUCTION . Current speech synthesis methods do not give the user enough control over how speech actually sounds . Automatically converting text to audio that successfully communicates the text was achieved a long time ago ( Umeda et al. , 1968 ; Badham et al. , 1983 ) . However , communicating only the text information leaves out the acoustic properties of the voice that convey much of the meaning and human expressiveness . In spite of this , the typical speech synthesis problem is formulated as a text to speech ( TTS ) problem in which the user inputs only text since the 1960s . This work proposes a normalizing flow model ( Kingma & Dhariwal , 2018 ; Huang et al. , 2018 ) that learns an unsupervised mapping from non-textual information to manipulable latent Gaussian distributions . Taming the non-textual information in speech is difficult because the non-textual is unlabeled . A voice actor may speak the same text with different emphasis or emotion based on context , but it is unclear how to label a particular reading . Without labels for the non-textual information , recent approaches ( Shen et al. , 2017 ; Arik et al. , 2017a ; b ; Ping et al. , 2017 ) have formulated speech synthesis as a TTS problem wherein the non-textual information is implicitly learned . Despite their success in recreating non-textual information in the training set , the user has limited insight and control over it . It is possible to formulate an unsupervised learning problem in such a way that the user can exploit the unlabeled characteristics of a data set . One way is to formulate the problem such that the data is assumed to have a representation in some latent space , and have the model learn that representation . This latent space can then be investigated and manipulated to give the user more control over the generative model ’ s output . Such approaches have been popular in image generation , allowing users to interpolate smoothly between images and to identify portions of the latent space that correlate with various features ( Radford et al. , 2015 ; Kingma & Dhariwal , 2018 ; Izmailov et al. , 2019 ) . Recent deep learning approaches to expressive speech synthesis have combined text and learned latent embeddings for non-textual information ( Wang et al. , 2018 ; Skerry-Ryan et al. , 2018 ; Hsu et al. , 2018 ; Habib et al. , 2019 ; Sun et al. , 2020 ) . These approaches impose an undesirable paradox : they require making assumptions before hand about the dimensionality of the embeddings when the correct dimensionality can only be determined after the model is trained . Even then , these embeddings are not guaranteed to contain all the non-textual information it takes to reconstruct speech , often resulting in models with dummy or uninterpretable latent dimensions and not enough capacity , as the appendices in Wang et al . ( 2018 ) ; Skerry-Ryan et al . ( 2018 ) ; Hsu et al . ( 2018 ) confirm . Furthermore , most models are not able to manipulate speech characteristics over time due to fixedlength embeddings . Their assumption is that variable-length embeddings are not robust to text and speaker perturbations ( Skerry-Ryan et al. , 2018 ) , which we show not to be the case . Finally , although VAEs and GANs ( Sun et al. , 2020 ; Habib et al. , 2019 ; Hsu et al. , 2018 ; Bińkowski et al. , 2019 ; Akuzawa et al. , 2018 ) provide a latent embedding that can be manipulated , they may be difficult to train , are limited to approximate latent variable prediction , and rely on an implicit generative model or ELBO estimate to perform MLE in the latent space ( Kingma & Dhariwal , 2018 ; Lucic et al. , 2018 ; Kingma et al. , 2016 ) . In this paper we propose Flowtron : an autoregressive flow-based generative network for melspectrogram synthesis with style transfer over time and speech variation . Flowtron learns an invertible function that maps a distribution over mel-spectrograms to a latent z-space parameterized by a spherical Gaussian . Figure 1 shows that acoustic characteristics like timbre and F0 correlate with portions of the z-space of Flowtron models trained without speaker embeddings . With our formalization , we can generate samples containing specific speech characteristics manifested in mel-space by finding and sampling the corresponding region in z-space ( Gambardella et al. , 2019 ) . Our formulation also allows us to impose a structure to the z-space and to parametrize it with a Gaussian mixture , similar to Hsu et al . ( 2018 ) . In our simplest setup , we generate samples with a zero mean spherical Gaussian prior and control the amount of variation by adjusting its variance . Compared to VAEs and GANs and their disadvantages enumerated in Kingma & Dhariwal ( 2018 ) , manipulating a latent prior in Flowtron comes at no cost in speech quality nor optimization challenges . Flowtron is able to generalize and produce sharp mel-spectrograms , even at high σ2 values , by simply maximizing the likelihood of the data while not requiring any additional Prenet or Postnet layer ( Wang et al. , 2017 ) , nor compound loss functions required by most SOTA models ( Shen et al. , 2017 ; Ping et al. , 2017 ; Skerry-Ryan et al. , 2018 ; Wang et al. , 2018 ; Bińkowski et al. , 2019 ) . In summary , Flowtron is optimized by maximizing the exact likelihood of the training data , which makes training simple and stable . Using normalizing flows , it learns an invertible mapping from data to latent space that can be manipulated to modulate many aspects of speech synthesis . Concurrent with this work are Glow-TTS ( Kim et al. , 2020 ) and Flow-TTS ( Miao et al. , 2020 ) , both of which incorporate normalizing flows into the TTS task . Our work differs from these two in that Flowtron is an autoregressive architecture where we explore the use of flow to modulate speech and style variation . In contrast , Glow-TTS and Flow-TTS are parallel architectures that focus on inference speed . Our mean opinion scores ( MOS ) show that Flowtron matches SOTA TTS models in terms of speech quality . Further , we provide results on speech variation , interpolation between samples and interpolation between styles over time , and style transfer between seen and unseen speakers with equal or different sentences . We hope this work , the first to show evidence that normalizing flows can be used for expressive text-to-speech synthesis and style transfer , will further stimulate developments in normalizing flows . 2 FLOWTRON . Flowtron is an autoregressive flow that generates a sequence of mel-spectrogram frames . A normalizing flow generates samples by first sampling a latent variable from a known distribution p ( z ) , and applying a series of invertible transformations to produce a sample from the target distribution p ( x ) . These invertible transformations f are known as steps of flow : x = f1 ◦ f2 ◦ . . .fk ( z ) ( 1 ) Because each transformation is invertible , we can directly evaluate the exact log-likelihood of the target distribution p ( x ) using the change of variables : log pθ ( x ) = log pθ ( z ) + k∑ i=1 log |det ( J ( f−1i ( x ) ) ) | ( 2 ) z = f−1k ◦ f −1 k−1 ◦ . . .f −1 1 ( x ) ( 3 ) Where J is the Jacobian of the inverse transform f−1i ( x ) . By cleverly choosing the latent distribution p ( z ) and the invertible transformations , the exact log-likelihood becomes simple and tractable . 2.1 LATENT DISTRIBUTIONS . We consider two simple distributions for the latent distribution z : a zero-mean spherical Gaussian and a mixture of spherical Gaussians with fixed or learnable parameters . z ∼ N ( z ; 0 , I ) or z ∼ ∑ k φ̂kN ( z ; µ̂k , Σ̂k ) ( 4 ) The zero-mean spherical Gaussian has a simple log-likelihood . The mixture of the spherical Gaussians , has inherent clusters that might result in interesting aspects of the audio information . 2.2 INVERTIBLE TRANSFORMATIONS . Normalizing flows are typically constructed using coupling layers ( Dinh et al. , 2014 ; 2016 ; Kingma & Dhariwal , 2018 ) . In our case , we use an autoregressive affine coupling layer ( Dinh et al. , 2016 ) . The latent variable z has the same number of dimensions and frames as the resulting mel-spectrogram sample . The previous frames z1 : t−1 produce scale and bias terms , st and bt respectively , that affine-transform the succeeding time step zt : ( log st , bt ) = NN ( z1 : t−1 , text , speaker ) ( 5 ) f ( zt ) = ( zt − bt ) ÷ st ( 6 ) f−1 ( zt ) = st zt + bt ( 7 ) Here , NN ( ) can be any autoregressive causal transformation ( Shumway & Stoffer , 2017 ) . The affine coupling layer is a reversible transformation , even though NN ( ) itself need not be invertible . We use a 0-vector for obtaining the scaling and bias terms what will affine transform z1 . This 0-vector constant also guarantees that the first z is always known . With an affine coupling layer , only the st term changes the volume of the mapping and adds a change of variables term to the loss . This term also penalizes the model for non-invertible affine mappings . log |det ( J ( f−1coupling ( x ) ) ) | = log |s| ( 8 ) To evaluate the likelihood , we take the mel-spectrograms and pass them through the inverse steps of flow conditioned on the text and optional speaker ids , adding the corresponding log |s| penalties , and evaluate the result based on the Gaussian likelihoods . With this setup , it is also possible to reverse the ordering of the mel-spectrogram frames in time without loss of generality . We reverse the order of frames on even steps of flow , defining a step of flow as a full pass over the input sequence . This allows the model to learn dependencies both forward and backwards in time while remaining causal and invertible . 2.3 MODEL ARCHITECTURE . Our text encoder modifies the text encoder in Tacotron 2 by replacing batch-norm with instance-norm . Our decoder and NN architecture , depicted in Figure 2 , removes the Prenet and Postnet layers from Tacotron previously thought to be essential ( Shen et al. , 2017 ) . Please compare Figure 2 describing our architecture and Figure 8 in A.4.4 describing Tacotron ’ s architecture . We also provide model summary views in A.6 We use the content-based tanh attention described in Vinyals et al . ( 2015 ) , which can be easily modified to become also location sensitive . We use the Mel Encoder described in Hsu et al . ( 2018 ) to predict the parameters of the Gaussian Mixture . Following ( Valle et al. , 2019b ) , we use speakerembeddings channel-wise concatenated with the encoder outputs at every token . We use a single shared embedding for models not conditioned on speaker id . The step of flow closest to the latent variable z has a gating mechanism that prunes extra frames from the z-values provided to the model during inference . The length of z-values remains fixed on the next steps of flow .
This paper presents a text-to-speech synthesis system, called Flowtron which uses a normalizing flow to generate a sequence of mel-spectrogram frames. The difference between the proposed Flowtron and the previously prosed flow-based methods is, the authors argue as the main contributions, its ability to produce more diverse and expressive speech samples of specific speech attributes by sampling from the latent space. Evaluation is done using the two public datasets, and a number of experiments are performed to show that the proposed method not only achieves a good MOS score in general but also generates speech samples with variation, including the style transfer.
SP:798bd74ff3a9e5b08eba7c3d90b5c85494cb48a8
Are Neural Rankers still Outperformed by Gradient Boosted Decision Trees?
Despite the success of neural models on many major machine learning problems , their effectiveness on traditional Learning-to-Rank ( LTR ) problems is still not widely acknowledged . We first validate this concern by showing that most recent neural LTR models are , by a large margin , inferior to the best publicly available Gradient Boosted Decision Trees ( GBDT ) in terms of their reported ranking accuracy on benchmark datasets . This unfortunately was somehow overlooked in recent neural LTR papers . We then investigate why existing neural LTR models under-perform and identify several of their weaknesses . Furthermore , we propose a unified framework comprising of counter strategies to ameliorate the existing weaknesses of neural models . Our models are the first to be able to perform equally well , comparing with the best tree-based baseline , while outperforming recently published neural LTR models by a large margin . Our results can also serve as a benchmark to facilitate future improvement of neural LTR models . 1 INTRODUCTION . Neural approaches have been dominating in many major machine learning domains , such as computer vision ( He et al. , 2015 ) , natural language processing ( Devlin et al. , 2019 ) , and speech recognition ( Hannun et al. , 2014 ) . However , the effectiveness of neural approaches in traditional Learningto-Rank ( LTR ) , the long-established inter-disciplinary research area at the intersection of machine learning and information retrieval ( Liu , 2009 ) , is not widely acknowledged ( Yang et al. , 2019 ) , especially on benchmark datasets that have only numerical features . Historically , a series of LTR models were developed by researchers at Microsoft , starting with RankNet ( Burges et al. , 2005 ) and LambdaRank ( Burges et al. , 2007 ) , both based on neural networks , and culminating in LambdaMART ( Wu et al. , 2010 ) , which is based on Gradient Boosted Decision Trees ( GBDT ) ; Burges ( 2010 ) provides an overview of this evolution . There are two publicly available implementations of LambdaMART : one provided by the RankLib1 library that is part of the Lemur Project ( henceforth referred to as λMARTRankLib ) ; and the LightGBM2 implementation provided by Microsoft ( Ke et al. , 2017 ) ( henceforth referred to as λMARTGBM ) . As we will show in Section 3 , λMARTGBM substantially outperforms λMARTRankLib . There is strong and continuing interest in neural ranking models , with numerous papers published in the last few years alone . Most of these papers treat RankNet and LambdaRank as weak baselines ( Pang et al. , 2020 ; Bruch et al. , 2019b ) and LambdaMART as the “ state-of-the-art ” ( Bruch et al. , 2019b ; Li et al. , 2019 ; Zhu & Klabjan , 2020 ; Hu et al. , 2019 ) . However , when examining these papers , we note that they either acknowledge their under-performance to λMARTGBM or claim state-of-the-art performance by comparing to a weaker λMARTRankLib implementation . The inconsistency of performance evaluation on benchmark datasets in this field has made it difficult to measure progress ( Lipton & Steinhardt , 2018 ) . It therefore remains an open question whether neural LTR models are as effective as they claim to be , and how to improve them if that is not the case . 1https : //sourceforge.net/p/lemur/wiki/RankLib/ 2https : //github.com/microsoft/LightGBM In this paper , we first conduct a benchmark to show that λMARTGBM outperforms recently published neural models , as well as the λMARTRankLib , by a large margin . While the neural paradigm is still appealing in a myriad of ways , such as being composable , flexible , and able to benefit from a plethora of new advances ( Vaswani et al. , 2017 ; Devlin et al. , 2019 ) , the research progress in neural ranking models could be hindered due to their inferior performance to tree models . It thus becomes critical to understand the pitfalls of building neural rankers and boost their performance on benchmark datasets . Specifically , we investigate why neural LTR approaches under-perform on standard LTR datasets and identify three major weaknesses that are typically ignored by recent work . First , neural models are not as adept at performing effective feature transformations and scaling , which is one major benefit of using tree-based methods ( Saberian et al. , 2019 ) . In ranking data which is typically longtailed , this can be a prohibitive property . Second , standard feed-forward networks are ineffective in generating higher-order features as noted by recent papers ( Wang et al. , 2017b ; Beutel et al. , 2018 ) . More effective network architectures for neural LTR models are needed . Third , recent neural LTR work on benchmark datasets does not employ high-capacity networks , a key success factor of many neural models ( Devlin et al. , 2019 ) , possibly due to a small scale of training data that causes overfitting . On the other hand , there are several potential benefits of neural approaches over LambdaMART for LTR , such as their flexibility to model listwise data and the existence of many techniques to mitigate data sparsity . To that end , we propose a new framework that ameliorates the weaknesses of existing neural LTR approaches and improves almost all major network components . In the proposed framework , we make several technical contributions : ( 1 ) We demonstrate empirical evidence that a simple log1p transformation on the input features is very helpful . ( 2 ) We use data augmentation ( DA ) to make the most out of high-capacity neural models , which is surprisingly the first work in the LTR literature to do so . We show that adding a simple Gaussian noise helps , but only when the model capacity is appropriately augmented ( which probably explains why there is no prior work on such a simple idea ) . ( 3 ) We use self-attention ( SA ) to model the listwise ranking data as context , and propose to use latent cross ( LC ) to effectively generate the interaction of each item and its listwise context . We conduct experiments on three widely used public LTR datasets . Our neural models are trained with listwise ranking losses . On all datasets , our framework can outperform recent neural LTR methods by a large margin . When comparing with the strong LambdaMART implementation , λMARTGBM , we are able to achieve equally good results , if not better . Our work can also serve as a benchmark for neural ranking models , which we believe can lay a fertile ground for future neural LTR research , as rigorous benchmarks on datasets such as ImageNet ( Russakovsky et al. , 2015 ) and GLUE ( Wang et al. , 2018a ) do in their respective fields . 2 BACKGROUND . We provide some background on LTR , including its formulation and common metrics . We review LambdaMART and highlight its two popular implementations which are causes of the inconsistency of evaluations in the recent literature . 2.1 LEARNING TO RANK . LTR methods are supervised techniques and the training data can be represented as a set Ψ = { ( x , y ) ∈ χn × Rn ) } , where x is a list of n items xi ∈ χ and y is a list of n relevance labels yi ∈ R for 1 ≤ i ≤ n. We use χ as the universe of all items . In traditional LTR problems , each xi corresponds to a query-item pair and is represented as a feature vector in Rk where k is the number of feature dimensions . With slightly abuse of notation , we also use xi as the feature vector and say x ∈ Rn×k . The objective is to learn a function that produces an ordering of items in x so that the utility of the ordered list is maximized . Most LTR algorithms formulate the problem as learning a ranking function to score and sort the items in a list . As such , the goal of LTR boils down to finding a parameterized ranking function s ( · ; Θ ) : χn → Rn , where Θ denotes the set of parameters , to minimize the empirical loss : L ( s ) = 1 |Ψ| ∑ ( x , y ) ∈Ψ l ( y , s ( x ) ) , ( 1 ) where l ( · ) is the loss function on a single list . LTR algorithms differ primarily in how they parameterize s and how they define l. There are many existing ranking metrics such as NDCG and MAP used in LTR problems . A common property of these metrics is that they are rank-dependent and place more emphasis on the top ranked items . For example , the commonly adopted NDCG metric is defined as NDCG ( πs , y ) = DCG ( πs , y ) DCG ( π∗ , y ) , ( 2 ) where πs is a ranked list induced by the ranking function s on x , π∗ is the ideal list ( where x is sorted by y ) , and DCG is defined as : DCG ( π , y ) = n∑ i=1 2yi − 1 log2 ( 1 + π ( i ) ) = n∑ i=1 Gi Di ( 3 ) In practice , the truncated version that only considers the top-k ranked items , denoted as NDCG @ k , is often used . 2.2 LAMBDAMART . LTR models have evolved from linear models ( Joachims , 2002 ) , to nerual networks ( Burges et al. , 2005 ) , and then to decision trees ( Burges , 2010 ) in the past two decades . LambdaMART , proposed about ten years ago ( Wu et al. , 2010 ; Burges , 2010 ) , is still treated as the “ state-of-the-art ” for LTR problems in recent papers ( Bruch et al. , 2019b ; Zhu & Klabjan , 2020 ) . It is based on Gradient Boosted Decision Trees ( GBDT ) . During each boosting step , the loss is dynamically adjusted based on the ranking metric in consideration . For example , ∆NDCG is defined as the absolute difference between the NDCG values when two documents i and j swap their positions in the ranked list sorted by the obtained ranking functions so far . ∆NDCG ( i , j ) = |Gi −Gj | · ∣∣∣ 1 Di − 1 Dj ∣∣∣ . ( 4 ) Then LambdaMART uses a pairwise logistic loss and adapts the loss by re-weighting each item pair in each iteration , with s ( x ) |i being the score for item i and α being a hyperparameter : l ( y , s ( x ) ) = ∑ yi > yj ∆NDCG ( i , j ) log2 ( 1 + e −α ( s ( x ) |i−s ( x ) |j ) ) ( 5 ) There are two popular public implementations of LambdaMART , namely λMARTGBM and λMARTRankLib . λMARTGBM is more recent than λMARTRankLib and has more advanced features by leveraging novel data sampling and feature bundling techniques ( Ke et al. , 2017 ) . However , recent neural LTR papers either use the weaker implementation of λMARTRankLib ( Pang et al. , 2020 ; Wang et al. , 2017a ; Ai et al. , 2018 ; 2019 ) , or acknowledge the inferior performance of neural models when compared with λMARTGBM ( Bruch et al. , 2019b ) . Such an inconsistency makes it hard to determine whether neural models are indeed more effective than the tree-based models .
- The paper argues that neural models perform significantly worse than GBDT models on some learning to rank benchmarks. It first conducts a set of experiments to show that GBDT outperforms some neural rankers. Then, it presents a few tweaks related to feature transformation and data augmentation to improve the performance of neural models. The resulting neural models perform on par with the state-of-the-art GBDT models.
SP:a97b9cd6237040dc602bed2c66af26143847c37f
Neural spatio-temporal reasoning with object-centric self-supervised learning
1 INTRODUCTION . Artificial intelligence research has long been divided into rule-based approaches and statistical models . Neural networks , a classic example of the statistical approach , certainly have limitations despite their massive popularity and success . For example , experiments with two recently released video question-answering datasets , CLEVRER ( Yi et al. , 2020 ) and CATER ( Girdhar & Ramanan , 2020 ) , demonstrate that neural networks fail to adequately reason about spatio-temporal and compositional structure in visual scenes . While the networks perform adequately when asked to describe their inputs , they tend to fail when asked to predict , explain , or consider counterfactual possibilities . By contrast , a neuro-symbolic model called NS-DR ( Yi et al. , 2020 ) appears to be much better suited to predicting , explaining , and considering counterfactual possibilities with this data . The model leverages independent neural networks to detect objects , infer dynamics , and syntactically parse the question . A hand-coded symbolic executor interprets the questions grounded on the outputs of the networks . The fact that hybrid models employing both distributed ( neural ) representations and symbolic logic can sometimes perform better has led some to consider neuro-symbolic hybrids to be a more promising model class compared to end-to-end neural networks ( Andreas et al. , 2016 ; Yi et al. , 2018 ; Marcus , 2020 ) . There is evidence from other domains , however , that neural networks can indeed adequately model higher-level cognitive processes . For example , in some symbolic domains ( such as language ) , neural networks outperform hybrid neuro-symbolic approaches when tasked to classify or predict ( Devlin et al. , 2018 ) . Neural models have also had some success in mathematics , a domain that , intuitively , would seem to require the execution of formal rules and manipulation of symbols ( Lample & Charton , 2020 ) . Somewhat surprisingly , large-scale neural language models such as GPT-3 ( Brown et al. , 2020 ) can acquire a propensity for arithmetic reasoning and analogy-making without being trained explicitly for such tasks , suggesting that current neural network limitations are ameliorated when scaling to more data and using larger , more efficient architectures ( Brown et al. , 2020 ; Mitchell , 2020 ) . A key motivation of our work , therefore , is to reconcile existing neural network limitations in video domains with their ( perhaps surprising ) successes in symbolic domains . One common element of these latter results is the repeated application of self-attention processes ( Vaswani et al. , 2017 ) to sequences of discrete ‘ entities ’ . Here , we apply this insight to videos of physical interactions between sets of objects , where the input data to models are continuously-valued pixel arrays at multiple timesteps ( together with symbolic questions in certain cases ) . A key design decision is the appropriate level of granularity for the discrete units underlying the selfattention computation . What is the visual analogue to a word in language , or a symbol in mathematics ? We hypothesize that the discrete entities acted upon by self-attention should correspond to semantic entities relevant to the task . For tasks based on visual data derived from physical interactions , these entities are often times objects ( van Steenkiste et al. , 2019 ; Battaglia et al. , 2018 ) . To extract representations of these entities , we use MONet , an unsupervised object segmentation model ( Burgess et al. , 2019 ) , but we leave open the possibility that other object-estimation algorithms might work better . We propose that a sufficiently expressive self-attention model acting on entities corresponding to physical objects will exhibit , on video datasets , a similar level of higher-level cognition and ‘ reasoning ’ seen when these models are applied to language or mathematics . Altogether , our results demonstrate that self-attention-based neural nets can outperform hybrid neurosymbolic models on visual tasks that require high-level cognitive processes , such as causal reasoning and physical understanding . We show that choosing the right level of discretization is critical for successfully learning these higher-order capabilities : pixels and local features are too fine , and entire scenes are too coarse . Moreover , we identify the value of self-supervised tasks , especially in low data regimes . These tasks ask the model to infer future arrangements of objects given the past , or to infer what must have happened for objects to look as they do in the present . We verify these conclusions in two video datasets , one in which the input is exclusively visual ( CATER ) and one that requires the combination of language ( questions ) and vision ( CLEVRER ) . 2 METHODS . Our principal motivation is the converging evidence for the value of self-attention mechanisms operating on a finite sequences of discrete entities . Written language is inherently discrete and hence is well-suited to self-attention-based approaches . In other domains , such as raw audio or vision , it is less clear how to leverage self-attention . We hypothesize that the application of self-attention-based models to visual tasks could benefit from an approximate ’ discretization ’ process analogous to the segmentation of speech into words or morphemes , and that determining the appropriate level of discretization is an important choice that can significantly affect model performance . At the finest level , data could simply be discretized into pixels ( as is already the case for most machine-processed visual data ) . But since pixels are too-fine grained , some work considers the downsampled “ hyper-pixel ” outputs of a convolutional network to comprise the set of discrete units ( e.g . Zambaldi et al . ( 2019 ) ; Lu et al . ( 2019 ) ) . In the case of videos , an even courser discretization scheme is often used : representations of frames or subclips ( Sun et al. , 2019b ) . The neuroscience literature , however , suggests that biological visual systems infer and exploit the existence of objects , rather than use spatial or temporal blocks with artificial boundaries ( Roelfsema et al. , 1998 ; Spelke , 2000 ; Chen , 2012 ) . Because objects are the atomic units that tasks we consider here focus on , it makes sense to discretize on the level of objects . Numerous object segmentation algorithms have been proposed ( Ren et al. , 2015 ; He et al. , 2017 ; Greff et al. , 2019 ) . We chose to use MONet , an unsupervised object segmentation algorithm that produces object representations with disentangled features ( Burgess et al. , 2019 ) . Because MONet is unsupervised , we can train it directly in our domain of interest without the need for object segmentation labels . To segment each frame into object representations , MONet first uses a recurrent attention network to obtain a set of No “ object attention masks ” ( No is a fixed parameter ) . Each attention mask represents the probability that any given pixel belongs to that mask ’ s object . The pixels assigned to the mask are encoded into latent variables with means µti ∈ Rd , where i indexes the object and t the frame . These means are used as the object representations in our model . More details are provided in Appendix A.1 . The self-attention component is a transformer model ( Vaswani et al. , 2017 ) over the sequence µti . In addition to this sequence of vectors , we include a trainable vector CLS ∈ Rd that is used to generate classification results ; this plays a similar role to the CLS token in BERT ( Devlin et al. , 2018 ) . Finally , for our CLEVRER experiments , where the inputs include a question and potentially several choices , we embed each question word wi ( and choice for multiple choice questions ) in Rd and include these in the sequence of inputs to the transformer . We also append a two-dimensional one-hot vector to µti and wi to indicate whether the input is a word or an object . We pass the sequence consisting of the object latent means µti , the classification token , and the word embeddings ( for CLEVRER ) through a transformer with NT layers . We add a relative positional encoding at each layer of the transformer to give the model knowledge of the word and frame order ( Dai et al. , 2019 ) . The transformed value of the classification token CLS is passed through an MLP ( with one hidden layer of size NH ) to generate the final answer . This general approach is adapted to each of our datasets according to the format of expected answers . The final layer , which operates on the transformed value of CLS , is a softmax over answers for CLEVRER descriptive questions , a logit for each choice for CLEVRER multiple-choice questions , or a softmax over the grid-index of the final location of the snitch for CATER . A schema of our architecture is shown in Figure 1 . Note that in this model , an object in one frame can attend to every object in every frame . We also consider an alternative model with hierarchical attention , which consists of two stages of selfattention with two different transformers . The first transformer acts independently on the objects within each frame along with the word embeddings . The outputs of the first transformer for each frame are concatenated into a single feature vector , one for each frame . The second transformer acts on these feature vectors , treating each frame as an atomic entity . We study the importance of global attention ( objects as the atomic entities ) vs hierarchical attention ( objects , and subsequently frames as the atomic entities ) . The comparison is shown in Table 1 . 2.1 SELF-SUPERVISED LEARNING . Self-supervised learning—unsupervised learning where the data provides its own supervision—has a long history in language processing , where it allows models to acquire useful representations of words , phrases and sentences ( Mikolov et al. , 2013 ; Kiros et al. , 2015 ; Devlin et al. , 2018 ) . Such techniques are also effective in visual domains , for image classification ( Chen et al. , 2020 ) , video analysis ( Han et al. , 2019 ) , and RL agents ( Gregor et al. , 2019 ) . In these cases , it is proposed that the learned representations are more informationally dense , allowing models to satisfy their ultimate objectives more effectively . MONet , the technique we use to estimate object-centric visual representations , can also be considered a self-supervised learning method . We explored whether self-supervised learning could improve the performance of our model beyond the benefits conveyed by object-level representation , i.e . in ways that support the model ’ s interpretation Estimation steps . of the dynamics of the scenes rather than just via improved perception of static observations . Our approach is inspired by the loss used in BERT ( Devlin et al. , 2018 ) , where a bidirectional transformer model is trained to predict certain words that are masked from the input . In our case , we mask object representations , and train the model to infer the content of the masked object representations using its knowledge from all unmasked objects . More formally , we set transformer input = 〈 CLS ; mtiµti|t , i ; wi|i 〉 , where mti ∈ { 0 , 1 } is a masking indicator . We write the output of the transformer as transformer output = 〈 CLS′ ; µ′ti|t , i ; w ′ i|i 〉 . We expect the transformer to understand the underlying dynamics of the video , so that the masked out slot µti could be predicted from µ′ti . We add an auxiliary loss to guide the transformer in learning effective representations capable of this type of dynamics prediction : auxiliary loss = ∑ t , i τtil ( f ( µ ′ ti ) , µ ) , where f is a learned linear mapping to Rd , l a loss function , and τti ∈ { 0 , 1 } are one-hot indicator variables identifying the prediction targets . We propagate gradients only to the parameters of f and the transformer . This auxiliary loss is added to the main classification loss with weighting λ , and both losses are minimized simultaneously by the optimizer . In particular , we do not pretrain the model with only the auxiliary loss . We tested two different loss functions , an L2 loss and a contrastive loss ( formulas given in Appendix A.2 ) , and six different masking schemes , as illustrated in Figure 2 . This exploration was motivated by the observation that video inputs at adjacent timesteps are highly correlated in a way that adjacent words are not . We thus hypothesized that BERT-style prediction of adjacent words might not be optimal . A different masking strategy , in which prediction targets are separated from the context by more than a single timestep , may stimulate capacity in the network to acquire the environment knowledge that permits context-based unrolls and better long-horizon predictions . First , we set mti = 1 ( uniformly ) at random across t and i and τti = 1−mti , generated by fixing the expected proportion of the mti set to 1 ( schema b in Figure 2 ) . While simple , this has the downside of masking out multiple objects per frame , which is potentially problematic since MONet does not assign objects to slot indices in a well defined way . MONet usually switches object-to-slot assignments multiple times in a single video , and these switches occur unpredictably . If multiple slots are masked out , the transformer can not determine with certainty which missing object to assign to each slot , and so the auxiliary loss could penalize the model even if it predicted all the objects correctly . To avoid this problem , we also try constraining the mask such that exactly one mti = 0 for each t ( schema a ) ; this ensures only one slot per frame is masked out , eliminating the ambiguity . To pose harder prediction challenges , we add a buffer between the context ( where mti = 1 ) and the infilling targets ( where τti = 1 ) . For t in this buffer zone , both mti = 0 and τti = 0 ( schemas c–f ) . In the presence of this buffer , we compared prediction ( where the context is strictly before the targets ; schema c , d ) versus infilling ( where the context surrounds the targets ; schema e , f ) . We also compared setting the targets as individual objects ( schema c , e ) versus targets as entire scenes ( schema d , f ) . We visually inspect the efficacy of this self-supervised loss in encouraging better representations ( beyond improvements of scores on tasks ) in Appendix C .
the paper propose to tackle visual reasoning problem in videos. The proposed solution is to combine MONET (Burgess et al., 2019) with self-attention mechanism (Vaswani et al., 2017) to first encode images into object-centric encodings and aggregate the encodings using self-attention to make the final prediction. The method is shown to outperform neural-symbolic reasoning approaches such as MAC (Hudson & Manning, 2018) and NS-DR (Yi et al 2020.) on image QA and R3D (Girdhar & Ramanan, 2020) on CARTER, which is a video reasoning task / benchmark.
SP:e56c1cfe3a5303c1176c9778ef1ea75855d7e20f
Influence Estimation for Generative Adversarial Networks
1 INTRODUCTION . Generative adversarial networks ( GANs ) proposed by Goodfellow et al . ( 2014 ) are a powerful subclass of generative model , which is successfully applied to a number of image generation tasks ( Antoniou et al. , 2017 ; Ledig et al. , 2017 ; Wu et al. , 2016 ) . The expansion of the applications of GANs makes improvements in the generative performance of models increasingly crucial . An effective approach for improving machine learning models is to identify training instances that harm the model performance . Traditionally , statisticians manually screen a dataset for harmful instances , which misguide a model into producing biased predictions . Recent influence estimation methods ( Khanna et al. , 2019 ; Hara et al. , 2019 ) automated the screening of datasets for deep learning settings , in which the sizes of both datasets and data dimensions are too large for users to manually determine the harmful instances . Influence estimation measures the effect of removing an individual training instance on a model ’ s prediction without the computationally prohibitive cost of model retraining . The recent studies identified harmful instances by estimating how the loss value changes if each training instance is removed from the dataset . Although previous studies have succeeded in identifying the harmful instances in supervised settings , the extension of their approaches to GAN is non-trivial . Previous approaches require that ( i ) the existence or absence of a training instance directly affects a loss value , and that ( ii ) the decrease in the loss value represents the harmfulness of the removed training instance . In GAN training , however , neither of the requirements is satisfied . ( i ) As training instances are only fed into the discriminator , they only indirectly affect the generator ’ s loss , and ( ii ) the changes in the losses of GAN do not necessarily capture how the removed instances harm the generative performance . This is because the ability of the loss to evaluate the generator is highly dependent on the performance of the discriminator . To this end , ( i ) we propose an influence estimation method that uses the Jacobian of the gradient of the discriminator ’ s loss with respect to the generator ’ s parameters ( and vice versa ) , which traces how the absence of an instance in the discriminator ’ s training affects the generator ’ s parameters . In addition , ( ii ) we propose a novel evaluation scheme to judge if an instance is harmful or not on the basis of influence on GAN evaluation metric , that is , how a GAN evaluation metric ( e.g. , inception score ( Salimans et al. , 2016 ) ) changes if a given training instance is removed from the dataset . We identify harmful instances by estimating the influence on GAN evaluation metric by leveraging our influence estimation method . We verified that the proposed influence estimation method correctly estimated the influence on GAN evaluation metrics across different settings of the dataset , model architecture , and GAN evaluation metrics . We also demonstrated that removing harmful instances , which were identified by the proposed method , effectively improved various GAN evaluation metrics.1 Our contributions are summarized as follows : • We propose an influence estimation method that uses the Jacobian of the gradient of the discriminator ’ s loss with respect to the generator ’ s parameters ( and vice versa ) , which traces how the absence of an instance in the discriminator ’ s training affects the generator ’ s parameters . • We propose a novel evaluation scheme to judge if an instance is harmful or not on the basis of influence on GAN evaluation metrics rather than that on the loss value , and to leverage the proposed influence estimation method to identify harmful instances . • We experimentally verified that our influence estimation method correctly inferred the influence on GAN evaluation metrics . Further , we demonstrated that the removal of the harmful instances suggested by the proposed method effectively improved the generative performance with respect to various GAN evaluation metrics . 2 PRELIMINARIES . Notation For column vectors a , b ∈ Rp , we denote the inner product by 〈a , b〉 = ∑p i=1 aibi . For a function f ( a ) , we denote its gradient with respect to a by∇af ( a ) . We denote the identity matrix of size p by Ip , the zero vector of length p by 0p , and the ones vector of length p by 1p . Generative Adversarial Networks ( GAN ) For simplicity , we consider an unconditional GAN that consists of the generator G : Rdz → Rdx and the discriminator D : Rdx → R , where dz and dx are the number of dimensions of latent variable z ∼ p ( z ) and data point x ∼ p ( x ) , respectively . The parameters of generator θG ∈ RdG and discriminator θD ∈ RdD are learned though the adversarial training ; G tries to sample realistic data whileD tries to identify whether the data is real or generated . Formulation of GAN Objectives For the generality , we adopt the formulation of Gidel et al . ( 2019 ) in which G and D try to minimize LG and LD , respectively , to obtain the following Nash equilibrium ( θ∗G , θ ∗ D ) : θ∗G ∈ arg min θG LG ( θG , θ ∗ D ) and θ ∗ D ∈ arg min θD LD ( θ ∗ G , θD ) . ( 1 ) For the latter part of this paper , we use a coupled parameter vector θ : = ( θG , θD ) > ∈ Rdθ=dG+dD when we refer to the whole parameters of GAN . In this paper , we assume that LG and LD have the following forms2 : LG ( θ ) : = Ez∼p ( z ) [ fG ( z ; θ ) ] , LD ( θ ) : = Ez∼p ( z ) [ f [ z ] D ( z ; θ ) ] + Ex∼p ( x ) [ f [ x ] D ( x ; θ ) ] . ( 2 ) 1Code is at https : //github.com/hitachi-rd-cv/influence-estimation-for-gans 2This covers the common settings of GAN objectives : the non-zero-sum game proposed by Goodfellow et al . ( 2014 ) , Wasserstein distance ( Arjovsky et al. , 2017 ) , and the least squares loss ( Mao et al. , 2017 ) . We can recover the original minimax objective by taking fG ( z ; θ ) = log ( 1−DθD ( GθG ( z ) ) ) , f [ z ] D = −fG , and f [ x ] D ( x ; θ ) = − logDθD ( x ) . Adversarial SGD ( ASGD ) To make our derivation easier to understand , we newly formulate the parameter update of a GAN trained by stochastic gradient descent , which we call adversarial SGD ( ASGD ) . For simplicity , this paper considers simultaneous training , in which the generator and the discriminator are simultaneously updated at a single step . We denote the dataset by Dx : = { xn ∼ p ( x ) } Nn=1 , which consists of N data points . Let St ⊂ { 1 , . . . , N } be a set of sample indices at the t-th step . We assume that the mini-batch of the t-th step consists of instances { xi } i∈St and a set of latent variables Zt = { z [ t ] l ∼ p ( z ) } |St| l=1 , which are sampled independently at each step t. We denote the mean of LG and LD across the mini-batch by L G ( Z ; θ ) : = 1|Z| ∑ z∈Z fG ( z ; θ ) and LD ( S , Z ; θ ) : = 1|Z| ( ∑ z∈Z f [ z ] D ( z ; θ ) + ∑ i∈S f [ x ] D ( xi ; θ ) ) , respectively . The t-th step of ASGD updates the coupled parameters by θ [ t+1 ] = θ [ t ] −Btg ( St , Zt ; θ [ t ] ) , where Bt : = ( η [ t ] G IdG O O η [ t ] D IdD ) ∈ Rdθ×dθ , g ( S , Z ; θ ) : = ( ∇θGL G ( Z ; θ ) ∇θDLD ( S , Z ; θ ) ) ∈ Rdθ . ( 3 ) η [ t ] G ∈ R+ and η [ t ] D ∈ R+ are the learning rates of the t-th step for θG and θD , respectively . 3 PROPOSED METHOD . This section explains the two main contributions of our paper : the influence estimation method for GANs that predicts how the removal of a training instance changes the output of the generator and the discriminator ( Section 3.1 ) , and two important parts of our instance evaluation scheme , that are , the definition of influence on GAN evaluation metric and its estimation algorithm ( Section 3.2 ) . 3.1 INFLUENCE ESTIMATION FOR GAN . We refer to influence estimation as the estimation of changes in a model ’ s output under a training instance ’ s absence . As the model ’ s output changes through the changes in the model ’ s parameters , we start with the definition of ASGD-Influence , which represents the changes in parameters , and then formulate its estimator . ASGD-Influence ASGD-Influence is defined on the basis of the following counterfactual ASGD . Let θ [ t ] −j denote the parameters at t-th step trained without using j-th training instance . Counterfactual ASGD starts optimization from θ [ 1 ] −j = θ [ 1 ] and updates the parameters of the t-th step by θ [ t+1 ] −j = θ [ t ] −j−Btg ( St \ { j } , Zt ; θ [ t ] −j ) . We define ASGD-Influence ∆θ−j as the parameter differ- ence between counterfactual ASGD and ASGD at the final step t = T , namely ∆θ−j : = θ [ T ] −j−θ [ T ] . Estimator of ASGD-Influence Our estimator uses an approximation of the mean of the gradient . Let ( ∇θGL G ( Z ; θ ) , ∇θDLD ( S , Z ; θ ) ) > be the joint gradient vector of the mini-batch . We introduce the Jacobian of the joint gradient vector of the t-th mini-batch with respect to θ : Jt : = ( J [ t ] GG J [ t ] GD J [ t ] DG J [ t ] DD ) = ( ∇2θGL G ( Zt ; θ [ t ] ) ∇θD∇θGL G ( Zt ; θ [ t ] ) ∇θG∇θDLD ( St , Zt ; θ [ t ] ) ∇2θDLD ( St , Zt ; θ [ t ] ) ) . ( 4 ) When we assume both LG ( θ ) and LG ( θ ) are second-order differentiable with respect to θ , the first-order Taylor approximation gives g ( St , Zt ; θ [ t ] −j ) − g ( St , Zt ; θ [ t ] ) ≈ Jt ( θ [ t ] −j − θ [ t ] ) . With this approximation , we have θ [ t+1 ] −j − θ [ t+1 ] = ( θ [ t ] −j − θ [ t ] ) −Bt ( g ( St , Zt ; θ [ t ] −j ) − g ( St , Zt ; θ [ t ] ) ) ≈ ( Idθ −BtJt ) ( θ [ t ] −j − θ [ t ] ) , ∀j 6∈ St. ( 5 ) For simplicity , we first focus on 1-epoch ASGD in which each instance appears only once . Let π ( j ) be the step where the j-th instance is used . Considering the absence of ∇θDf [ x ] D ( xj ; θ [ π ( j ) ] ) in the π ( j ) -th step of counterfactual ASGD , we have θ [ π ( j ) +1 ] −j − θ [ π ( j ) +1 ] = η [ π ( j ) ] D |Sπ ( j ) | ( 0dG , ∇θDf [ x ] D ( xj ; θ [ π ( j ) ] ) ) > . By denoting Zt : = Idθ − BtJt and recursively applying the approximation ( 5 ) , we obtain ∆θ−j ≈ η [ π ( j ) ] D |Sπ ( j ) | ZT−1ZT−2 · · ·Zπ ( j ) +1 ( 0dG ∇θDf [ x ] D ( xj ; θ [ π ( j ) ] ) ) . ( 6 ) For the practical situation of K-epoch ASGD , in which the j-th instance is sampled K times at t = π1 ( j ) , . . . , πK ( j ) , the estimator of the ASGD-Influence is given by ∆θ̂−j : = K∑ k=1 T−πk ( j ) −1∏ s=1 ZT−s η [ πk ( j ) ] D |Sπk ( j ) | ( 0dG ∇θDf [ x ] D ( xj ; θ [ πk ( j ) ] ) ) . ( 7 ) Linear Influence To estimate the influence on outputs , we introduce linear influence L [ T ] −j ( u ) : = 〈u , ∆θ−j〉 of a given query vector u ∈ Rdθ . If we take u = ∇θfG ( z ; θ [ T ] ) , the linear influence approximates the influence on the generator ’ s loss L [ T ] −j ( u ) ≈ fG ( z ; θ [ T ] −j ) − fG ( z ; θ [ T ] ) . Let ( u [ t ] > G ∈ RdG , u [ t ] > D ∈ RdD ) : = u > ZT−1ZT−2 · · ·Zt+1 . The linear influence of the j-th instance is approximated by the proposed estimator : L [ T ] −j ( u ) ≈ 〈 u , ∆θ̂−j 〉 = K∑ k=1 η [ πk ( j ) ] D |Sπk ( j ) | 〈 u [ πk ( j ) ] D , ∇θDf [ x ] D ( xj ; θ [ πk ( j ) ] ) 〉 . ( 8 ) The estimation algorithm consists of two phases ; training phase performs K-epoch ASGD by storing information A [ t ] ← ( St , η [ t ] G , η [ t ] D , θ [ t ] , Zt ) and inference phase calculates ( 8 ) using A [ 1 ] , . . . , A [ T−1 ] . See Appendix A for the detailed algorithm .
The paper presents an influence estimation method for GANs. It discusses why previous approaches on influence estimation cannot be easily extended to GANs. It proposes to use Jacobian of the gradient of discriminator’s loss with respect to the generator’s parameters to learn how absence of an instance in the discriminator’s training affects the generator’s parameters. The authors evaluate whether an instance is harmful based on its influence on GAN evaluation metrics. They show that removing these harmful instances improves performance of GANs on MNIST with respect to three metrics: Inception Score, FID and Average Log Likelihood (ALL).
SP:1d3fbd26ee829b120b08d1d474743606d3f72292
A Design Space Study for LISTA and Beyond
1 INTRODUCTION . The signal processing and optimization realm has an everlasting research enthusiasm on addressing ill-conditioned inverse problems , that are often regularized by handcrafted model-based priors , such as sparse coding , low-rank matrix fitting and conditional random fields . Since closed-form solutions are typically unavailable for those model-based optimizations , many analytical iterative solvers arise to popularity . More recently , deep learning based approaches provide an interesting alternative to inverse problems . A learning-based inverse problem solver attempts to approximate the inverse mapping directly by optimizing network parameters , by fitting “ black box ” regression from observed measurements to underlying signals , using synthetic or real-world sample pairs . Being model-based and model-free respectively , the analytical iterative solvers and the learningbased regression make two extremes across the spectrum of inverse problem solutions . A promising direction arising in-between them is called algorithm unrolling ( Monga et al. , 2019 ) . Starting from an analytical iterative solver designed for model-based optimization , its unrolled network architecture can be generated by cascading the iteration steps for a finite number of times , or equivalently , by running the iterative algorithm with early stopping . The original algorithm parameters will also turn into network parameters . Those parameters are then trained from end to end using standard deep network training , rather than being derived analytically or selected from cross-validation . Unrolling was first proposed to yield faster trainable regressors for approximating iterative sparse solvers ( Gregor & LeCun , 2010 ) , when one needs to solve sparse inverse problems on similar data repeatedly . Later on , the unrolled architectures were believed to incorporate model-based priors while enjoying the learning capacity of deep networks empowered by training data , and therefore became a rising direction in designing principled and physics-informed deep architectures . The growing popularity of unrolling lies in their demonstrated effectiveness in developing compact , data-efficient , interpretable and high-performance architectures , when the underlying optimization model is assumed available . Such approaches have witnessed prevailing success in applications such as compressive ∗The authors Tianjian Meng and Xiaohan Chen contribute equally to the work . sensing ( Zhang & Ghanem , 2018 ) , computational imaging ( Mardani et al. , 2018 ) , wireless communication ( Cowen et al. , 2019 ; Balatsoukas-Stimming & Studer , 2019 ) , computer vision ( Zheng et al. , 2015 ; Peng et al. , 2018 ) , and other algorithms such as ADMM ( Xie et al. , 2019 ) . The empirical success of unrolling has sparkled many curiosities towards its deeper understanding . A series of efforts ( Moreau & Bruna , 2017 ; Giryes et al. , 2018 ; Chen et al. , 2018 ; Liu et al. , 2019 ; Ablin et al. , 2019 ; Takabe & Wadayama , 2020 ) explored the theoretical underpinning of unrolling as a specially adapted iterative optimizer to minimizing the specific objective function , and proved the favorable convergence rates achieved over classical iterative solver , when the unrolled architectures are trained to ( over ) fit particular data . Orthogonally , this paper reflects on unrolling as a design approach for deep networks . The core question we ask is : For solving model-based inverse problems , what is the role of unrolling in designing deep architectures ? What can we learn from unrolling , and how to go beyond ? 1.1 RELATED WORKS : PRACTICES AND THEORIES OF UNROLLING . ( Gregor & LeCun , 2010 ) pioneered to develop a learning-based model for solving spare coding , by unrolling the iterative shrinkage thresholding algorithm ( ISTA ) algorithm ( Blumensath & Davies , 2008 ) as a recurrent neural network ( RNN ) . The unrolled network , called Learned ISTA ( LISTA ) , treated the ISTA algorithm parameters as learnable and varied by iteration . These were then finetuned to obtain optimal performance on the data for a small number of iterations . Numerous works ( Sprechmann et al. , 2015 ; Wang et al. , 2016a ; Zhang & Ghanem , 2018 ; Zhou et al. , 2018 ) followed this idea to unroll various iterative algorithms for sparse , low-rank , or other regularized models . As the most classical unrolling example , a line of recent efforts have been made towards theoretically understanding LISTA . Moreau & Bruna ( 2017 ) re-factorized the Gram matrix of the dictionary , and thus re-parameterized LISTA to show its acceleration gain , but still sublinearly . Giryes et al . ( 2018 ) interpreted LISTA as a projected gradient descent descent ( PGD ) where the projection step was inaccurate . Chen et al . ( 2018 ) and Liu et al . ( 2019 ) for the first time introduced necessary conditions for LISTA to converge linearly , and show the faster asymptotic rate can be achieved with only minimal learnable parameters ( e.g. , iteration-wise thresholds and step sizes ) . Ablin et al . ( 2019 ) further proved that learning only step sizes improves the LISTA convergence rate by leveraging the sparsity of the iterate . Besides , several other works examined the theoretical properties of unrolling other iterative algorithms , such as iterative hard thresholding ( Xin et al. , 2016 ) , approximated message passing ( Borgerding & Schniter , 2016 ) , and linearized ADMM ( Xie et al. , 2019 ) . Besides , the safeguarding mechanism was also introduced for guiding learned updates to ensure convergence , even when the test problem shifts from the training distribution ( Heaton et al. , 2020 ) . On a separate note , many empirical works ( Wang et al. , 2016a ; b ; Gong et al. , 2020 ) advocated that the unrolled architecture , when used as a building block for an end-to-end deep model , implicitly enforces some structural prior towards the model training ( resulting from the original optimization objective ) ( Dittmer et al. , 2019 ) . That could be viewed as a special example of “ architecture as prior ” ( Ulyanov et al. , 2018 ) . A recent survey ( Monga et al. , 2019 ) presents a comprehensive discussion . Specifically , the authors suggested that since iterative algorithms are grounded on domain-specific formulations , they embed reasonably accurate characterization of the target function . The unrolled networks , by expanding the learnable capacity of iterative algorithms , become “ tunable ” to approximate the target function more accurately . Meanwhile compared to generic networks , they span a relatively small subset in the function space and therefore can be trained more data-efficiently . 1.2 MOTIVATIONS AND CONTRIBUTIONS . This paper aims to quantitatively assess “ how good the unrolled architectures actually are ” , using LISTA for sparse recovery as a representative example . We present the first design space ablation study1 on LISTA : starting from the original unrolled architecture , we extensively vary the connectivity patterns and neuron types . We seek and assess good architectures in a number of challenging settings , and hope to expose successful design patterns from those top performers . As we enable layer-wise different skip connections and neuron types , the LISTA-oriented design space is dauntingly large ( see Sections 2.1 and 2.2 for explanations ) . As its manual exploration is infeasible , we introduce the tool of neural architecture search ( NAS ) into the unrolling field . NAS 1We define a design space as a family of models derived from the same set of architecture varying rules . can explore a gigantic design space much more efficiently , and can quickly identify the subset of top-performing candidates for which we can focus our analysis on . Our intention is not to innovate on NAS , but instead , to answer a novel question in LISTA using NAS as an experiment tool . From our experiments , a befitting quote may be : for designing neural networks to solve modelbased inverse problems , unrolling is a good answer , but usually not the best . Indeed , we are able to discover consistently better networks in all explored settings . From top candidates models , we observe highly consistent and potentially transferable patterns . We conclude this paper with more discussions on how to better leverage and further advance the unrolling field . 2 TECHNICAL APPROACH . Assume a sparse vector x∗ = [ x∗1 , · · · , x∗M ] T ∈ RM , we observe its noisy linear measurements : b = ∑M m=1 dmx ∗ m + ε = Dx ∗ + ε , ( 1 ) where b ∈ RN , D = [ d1 , · · · , dM ] ∈ RN×M is the dictionary , and ε ∈ RN is additive Gaussian white noise . For simplicity , each column of D is normalized , that is , ‖dm‖2 = ‖D : ,m‖2 = 1 , m = 1 , 2 , · · · , M . Typically , we have N M . A popular approach for solving the inverse problem : b→ x , is to solve the LASSO below ( λ is a scalar ) : minx 1 2 ‖b−Dx‖22 + λ‖x‖1 ( 2 ) using iterative algorithms such as the iterative shrinkage thresholding algorithm ( ISTA ) : x ( k+1 ) = ηλ/L ( x ( k ) + DT ( b−Dx ( k ) ) /L ) , k = 0 , 1 , 2 , . . . ( 3 ) where ηθ is the soft-thresholding function2 and L is a smoothness constant that decides the step size . Inspired by ISTA , ( Gregor & LeCun , 2010 ) proposed to learn the weight matrices in ISTA rather than fixing them . LISTA unrolls ISTA iterations as a recurrent neural network ( RNN ) : if truncated to K iterations , LISTA becomes a K-layer feed-forward neural network with side connections : x ( k+1 ) = ηθ ( k ) ( Wbb + α ( k ) W ( k ) x x ( k ) ) , k = 0 , 1 , · · · , K − 1 . ( 4 ) If we set Wb ≡ DT /L , W ( k ) x ≡ I−DTD/L , α ( k ) ≡ 1 , θ ( k ) ≡ λ/L , then LISTA recovers ISTA3 . In practice , we start with x ( 0 ) set to zero . As suggested by the seminal work ( Liu et al. , 2019 ) , sharing Wb and Wx across layers does no hurt to the performance while reducing the parameter complexity . We follow their weight-tying scheme in the paper , while learning layer-wise α ( k ) and θ ( k ) . α ( k ) is separated from Wx to preserve flexibility . We note one slight difference between our formulation ( 4 ) , and the parameterization scheme suggested by Theorem 1 of ( Chen et al. , 2018 ) . The latter also restricted { Wb , Wx } to be coupled layerwise , and showed it yielded the same representation capability as the orginal LISTA in Gregor & LeCun ( 2010 ) . We instead have { Wb , Wx } as two independent learnable weight matrices . The main reason we did not follow ( Chen et al. , 2018 ) is that Wb-Wx coupling was directly derived for unrolling ISTA , which is no longer applicable nor intuitive for other non-LISTA architecture variants . Our empirical results also back that our parameterization in ( 4 ) is easier to train for varied architectures from search , and performs the same well when adopted in training the original LISTA . Now , given pairs of sparse vector and its noisy measurement ( x∗ , b ) , our goal is to learn the parameters Θ = { Wb , Wx , α ( k ) , θ ( k ) } K−1k=0 such that x ( K ) is close to x∗ for all sparse x∗ following some distribution P . Therefore , all parameters in Θ are subject to end-to-end learning : min Θ Ex∗ , b∼P‖x ( K ) ( Θ , b , x ( 0 ) ) − x∗‖22 . ( 5 ) This problem is approximately solved over a training dataset { ( x∗i , bi ) } Ni=1 sampled from P . 2Soft-thresholding function is defined in a component-wise way : ηθ ( x ) = sign ( x ) max ( 0 , |x| − θ ) 3Those can be parameter initialization in LISTA , which we follow ( Chen et al. , 2018 ) to use by default .
This paper studies a very interesting new problem of assessing unrolled models in a broader context using NAS methods. LISTA-style unrolling has been popular for deep learning-based inverse problems. But it is quantitatively unclear how good the unrolled models are, among all possible model variations. To fill in this gap, the authors first define a proper search space based on the varying connections and neurons from the unrolled LISTA backbone architecture. NAS is then exploited as the tool to find the best subsect of architecture from the large space.
SP:e9cb82d442fd1f42348d33be29e2735da7e13dbe
Robust Overfitting may be mitigated by properly learned smoothening
1 INTRODUCTION Adversarial training ( AT ) ( Madry et al. , 2018 ) , i.e. , training a deep network to minimize the worst-case training loss under input perturbations , is recognized as the current best defense method to adversarial attacks . However , one of its pitfalls was exposed by a recent work ( Rice et al. , 2020 ) : in contrast to the commonly-held belief that overparameterized deep networks hardly overfit in standard training ( Zhang et al. , 2016 ; Neyshabur et al. , 2017 ; Belkin et al. , 2019 ) , overfitting turns out to be a dominant phenomenon in adversarially robust training of deep networks . After a certain point in AT , e.g. , immediately after the first learning rate decay , the robust test errors will only continue to substantially increase with further training ( see Figure 1 bottom for example ) . That surprising phenomenon , termed as “ robust overfitting ” , has been prevalent on many datasets and models . As Rice et al . ( 2020 ) pointed out , it poses serious challenges to assess recent algorithmic ∗Equal Contribution . 1 advances upon AT : by just using an earlier checkpoint , the performance of AT be drastically boosted to match the more recently reported state-of-the-arts ( Yang et al. , 2019b ; Zhang et al. , 2019b ) . Even worse , Rice et al . ( 2020 ) tested several other implicit and explicit regularization methods , including weight decay , data augmentation and semi-supervised learning ; they reported that none of those alternatives seem to combat robust overfitting ( stably ) better than simple early stopping . The authors thus advocated using the validation set to select a stopping point , although the manual picking would inevitably trade off between selecting either the peak point of robust test accuracy or that of standard accuracy , which often do not coincide ( Chen et al. , 2020a ) . Does there exist more principled , hands-off , and hassle-free mitigation for this robust overfitting , for us to further unleash the competency of AT ? This paper explores two options along the way , that draw two more sophisticated ideas from enhancing standard deep models ’ generalization . Both could be viewed as certain types of learned smoothening , and are directly plugged into AT : • Our first approach is to smooth the logits in AT via self-training , using knowledge distillation with the same model pre-trained as a self-teacher . The idea is inspired by two facts : ( 1 ) label smoothening ( Szegedy et al. , 2016 ) can calibrate the notorious overconfidence of deep networks ( Hein et al. , 2019 ) , and that was found to improve their standard generalization ; ( 2 ) label smoothening can be viewed as a special case of knowledge distillation ( Yuan et al. , 2020 ) , and self-training can produce more semantic-aware and discriminative soft label “ self-teachers ” than naive label smoothening ( Chen et al. , 2020b ; Tang et al. , 2020 ) . • Our second approach is to smooth the weights in AT via stochastic weight averaging ( SWA ) ( Izmailov et al. , 2018 ) , a popular training technique that leads to better standard generalization than SGD , with almost no computational overhead . While SWA has not yet be applied to AT , it is known to find flatter minima which are widely believed to indicate stronger robustness ( Hein & Andriushchenko , 2017 ; Wu et al. , 2020a ) . Meanwhile , SWA could also be interpreted as a temporal model ensemble , and therefore might bring the extra robustness of ensemble defense ( Tramèr et al. , 2018 ; Grefenstette et al. , 2018 ) with the convenience of a single model . Those suggest that applying SWA is natural and promising for AT . To be clear , neither knowledge-distillation/self-training nor SWA was invented by this paper : they have been utilized in standard training to alleviate ( standard ) overfitting and improve generalization , by fixing over-confidence and by finding flatter solutions , respectively . By introducing and adapting them to AT , our aim is to complement the existing study , demonstrating that while simpler regularizations were unable to fix robustness overfitting as Rice et al . ( 2020 ) found , our learned logit/weight smoothening could effectively regularize and mitigate it , without needing early stopping . Experiments demonstrate that by plugging in the two techniques to AT , we can simultaneously boost the standard accuracy by 3.72 % ∼ 6.68 % and robust accuracy by 0.22 % ∼ 2.03 % , across multiple datasets ( STL-10 , SVHN , CIFAR-10 , CIFAR-100 , and Tiny ImageNet ) , perturbation types ( ` ∞ and ` 2 ) , and robustified methods ( PGD , TRADES , and FSGM ) , establishing the new state-of-the-art in AT . As shown in Figure 1 example , our method eliminates the robust overfitting phenomenon in AT , even when training up to 200 epochs . Our results imply that although robustness overfitting is more challenging than standard overfitting , its mitigation is still feasible with properly-chosen , advanced regularizations that were developed for the latter . Overall , our findings join ( Rice et al. , 2020 ) in re-establishing the competitiveness of the simplest AT baseline . 1.1 BACKGROUND WORK . Deep networks are easily fooled by imperceivable adversarial samples . To tackle this vulnerability , numerous defense methods were proposed ( Goodfellow et al. , 2015 ; Kurakin et al. , 2016 ; Madry et al. , 2018 ) , yet many of them ( Liao et al. , 2018 ; Guo et al. , 2018 ; Xu et al. , 2017 ; Dziugaite et al. , 2016 ; Dhillon et al. , 2018 ; Xie et al. , 2018 ; Jiang et al. , 2020 ) were later found to result from training artifacts , such as obfuscated gradients ( Athalye et al. , 2018 ) caused by input transformation or randomization . Among them , adversarial training ( AT ) ( Madry et al. , 2018 ) remains one of the most competitive options . Recently more improved defenses have been reported ( Dong et al. , 2018 ; Yang et al. , 2019b ; Mosbach et al. , 2018 ; Hu et al. , 2020 ; Wang et al. , 2020a ; Dong et al. , 2020 ; Zhang et al. , 2020a ; b ) , with some of them also being variants of AT , e.g . TRADES ( Zhang et al. , 2019b ) and AT with metric learning regularizers ( Mao et al. , 2019 ; Pang et al. , 2019 ; 2020 ) . While overfitting has become less a practical concern in training deep networks nowadays , it was not yet noticed nor addressed in the adversarial defense field until lately . An overfitting phenomenon was 2 first observed in a few fast adversarial training methods ( Zhang et al. , 2019a ; Shafahi et al. , 2019b ; Wong et al. , 2020 ) based on FGSM ( Goodfellow et al. , 2015 ) , e.g. , sometimes the robust accuracy against a PGD adversary suddenly drop to nearly zero after some training . ( Andriushchenko & Flammarion , 2020 ) suggested it to be rooted in those methods ’ local linearization assumptions of the loss landscape in those “ fast ” AT . The recently reported robust overfitting ( Rice et al. , 2020 ) seems to raise a completely new challenge for the classical AT ( not fast ) : the model starts to irreversibly lose robustness after training with AT for a period , even the double-descent generalization curves still seemed to hold ( Belkin et al. , 2019 ; Nakkiran et al. , 2019 ) . Among various options tried in Rice et al . ( 2020 ) , early-stopping was so far the only effective remedy found . 2 METHODOLOGY . 2.1 LEARNING TO SMOOTH LOGITS IN AT . Rationale : Why AT enforces models robust against adversarial attacks of a specific type and certain magnitudes . However , it has been shown to “ overfit ” the threat model “ seen ” during training ( Kang et al. , 2019 ; Maini et al. , 2019 ; Stutz et al. , 2020 ) , and its gained robustness does not extrapolate to larger perturbations nor unseen attack types . Stutz et al . ( 2020 ) hypothesized this to be an unwanted consequence of enforcing high-confidence predictions on adversarial examples since high-confidence predictions are difficult to extrapolate to arbitrary regions beyond the seen examples during training . We generalize this observation : during AT , the attacks generated at every iteration can be naturally considered as continuously varying/evolving , along with the model training . Therefore , we hypothesize one source of robust overfitting might lie in that the model “ overfits ” the attacks generated in the early stage of AT and fails to generalize or adapt to the attacks in the late stage . To alleviate the overconfidence problem , we adapt the label smoothening ( LS ) technique in standard training ( Szegedy et al. , 2016 ) . LS creates uncertainty in the one-hot labels , by computing crossentropy not with the “ hard ” targets from the dataset , but with a weighted mixture of these one-hot targets with the uniform distribution . This uncertainty helps to tackle alleviate the overconfidence problem Hein et al . ( 2019 ) and improves the standard generalization . The idea of LS was previously investigated in other defense methods ( Shafahi et al. , 2019a ; Goibert & Dohmatob , 2019 ) , but much of the observed robustness gains were later attributed to obfuscated gradients ( Athalye et al. , 2018 ) . Two recent works ( Stutz et al. , 2020 ; Cheng et al. , 2020 ) have integrated LS with AT to inject label uncertainty : Stutz et al . ( 2020 ) used a convex combination of uniform and one-hot distributions as target for the cross-entropy loss in AT , which resembles the LS regularizer , while Cheng et al . ( 2020 ) concurrently used an LS regularizer for AT . However , there is one pitfall of the naive LS in ( Szegedy et al. , 2016 ) : over-smoothening labels in a data-blind way could cause loss of information in the logits , and hence weakened discriminative power of the trained models ( Müller et al. , 2019 ) . That calls for a careful and adaptive balance between discriminative capability and confidence calibration of the model . In the context of AT , Stutz et al . ( 2020 ) crafted a perturbation-dependent parameter , to explicitly control the transition from one-hot to the uniform distribution when the attack magnitude grows from small to large . To identify more automated and principled means , we notice another recent work ( Yuan et al. , 2020 ) , who explicitly connected knowledge distillation ( KD ) ( Hinton et al. , 2015 ) to LS . The authors pointed out that LS equals a special case of KD using a virtual and hand-crafted teacher ; on the contrary , the conventional KD provides data-driven soften labels rather than simply mixing one-shot and uniform vectors . Together with many others ( Furlanello et al. , 2018 ; Chen et al. , 2020b ) , these works demonstrated that using model-based and learned soft labels supplies much superior confidence calibration and logit geometry compared to the naive LS ( Tang et al. , 2020 ) . Furthermore , ( Furlanello et al. , 2018 ; Chen et al. , 2020b ; Yuan et al. , 2020 ) unanimously revealed that another strong teacher model with extra privileged information is NOT critical to the success of KD . Yuan et al . ( 2020 ) shows that even a poorly-trained teacher with much lower accuracy can still improve the student . Moreover , Chen et al . ( 2020b ) ; Yuan et al . ( 2020 ) find self-teacher to be sufficiently effective for KD , that is , using soft-logit outputs from the student or designed manually as the KD regularization to train itself ( also called teacher-free KD 3 ( Tf-KD ) in ( Yuan et al. , 2020 ) ) . These observations make the main cornerstone for our learned logit smoothening approach next . Approach : How We follow ( Chen et al. , 2020b ; Yuan et al. , 2020 ) to use self-training with the same model , but introduce one specific modification . The one model could be trained with at least two different ways : standard training , or robust training ( AT or other cheaper ways ; see ablation experiments ) . That can yield two self-teachers . We assume both to be available ; and let x be the input , y the one-hot ground truth label , δ the adversarial perturbation bounded by ` p norm ball with radius , and θr/θs the weights of the robust-/standard-trained self-teachers , respectively . Note the two self-teachers share the identical network architecture and training data with our target model . Our self-training smoothed loss function is expressed below ( λ1 and λ2 are two hyperparameters ) : min θ E ( x , y ) ∈D { ( 1− λ1 − λ2 ) · max δ∈B ( x ) LXE ( f ( θ , x + δ ) , y ) + λ1 · KDadv ( f ( θ , x + δ ) , f ( θr , x + δ ) ) + λ2 · KDstd ( f ( θ , x + δ ) , f ( θs , x + δ ) ) } , ( 1 ) where LXE is robustified cross-entropy loss adopted in the original AT ; KDadv and KDstd are the Kullback–Leibler divergence loss with the robust-trained and standard-trained self-teachers , respectively . λ1 = 0.5 and λ2 = 0.25 are default in all experiments . More details are in Appendix A2.1 . Figure 2 visualizes an example of logit distributions , generated by naive LS ( Szegedy et al. , 2016 ) , the Tf-KD regularizer using manually-designed self-teacher in ( Yuan et al. , 2020 ) , as well our standard- and robust-trained teachers , respectively . We observe both standard and robust selfteachers are more discriminative than the other two baseline smoothenings , while the robust selfteacher is relatively more conservative as one shall expect .
The paper studies a method for mitigating robust overfitting. Rice et al., and others have observed that when training a neural network robustly on say CIFAR10, then the robust test error often overfits, i.e., it has a U-shaped curve as a function of training epochs. Rice et al. demonstrated that early stopping the robust training enables state-of-the-art robust performance. However, to realize this performance, it is necessary to find a good early stopping point, which can be difficult (but can be found with testing on a validation set). The paper proposes an alternative to early stopping: smoothing the logits and smoothing the weights, by using two existing techniques, namely self-training and stochastic weight averaging. The paper finds that smoothing mitigates robust overfitting, and reports even a slight improvement over early stopping at the optimal point.
SP:287426061a33fd5cef9b00660c06e98f3af010d2
Trajectory Prediction using Equivariant Continuous Convolution
Trajectory prediction is a critical part of many AI applications , for example , the safe operation of autonomous vehicles . However , current methods are prone to making inconsistent and physically unrealistic predictions . We leverage insights from fluid dynamics to overcome this limitation by considering internal symmetry in real-world trajectories . We propose a novel model , Equivariant Continous COnvolution ( ECCO ) for improved trajectory prediction . ECCO uses rotationallyequivariant continuous convolutions to embed the symmetries of the system . On both vehicle and pedestrian trajectory datasets , ECCO attains competitive accuracy with significantly fewer parameters . It is also more sample efficient , generalizing automatically from few data points in any orientation . Lastly , ECCO improves generalization with equivariance , resulting in more physically consistent predictions . Our method provides a fresh perspective towards increasing trust and transparency in deep learning models . Our code and data can be found at https : //github.com/Rose-STL-Lab/ECCO . 1 INTRODUCTION . Trajectory prediction is one of the core tasks in AI , from the movement of basketball players to fluid particles to car traffic ( Sanchez-Gonzalez et al. , 2020 ; Gao et al. , 2020 ; Shah & Romijnders , 2016 ) . A common abstraction underlying these tasks is the movement of many interacting agents , analogous to a many-particle system . Therefore , understanding the states of these particles , their dynamics , and hidden interactions is critical to accurate and robust trajectory forecasting . Even for purely physical systems such as in particle physics , the complex interactions among a large number of particles makes this a difficult problem . For vehicle or pedestrian trajectories , this challenge is further compounded with latent factors such as human psychology . Given these difficulties , current approaches require large amounts of training data and many model parameters . State-of-the-art methods in this domain such as Gao et al . ( 2020 ) are based on graph neural networks . They do not exploit the physical properties of system and often make predictions which are not self-consistent or physically meaningful . Furthermore , they predict a single agent trajectory at a time instead of multiple agents simultaneously . ∗Equal Contribution Our model is built upon a key insight of many-particle systems pertaining to intricate internal symmetry . Consider a model which predicts the trajectory of cars on a road . To be successful , such a model must understand the physical behavior of vehicles together with human psychology . It should distinguish left from right turns , and give consistent outputs for intersections rotated with different orientation . As shown in Figure 1 , a driver ’ s velocity rotates with the entire scene , whereas vehicle interactions are invariant to such a rotation . Likewise , psychological factors such as reaction speed or attention may be considered vectors with prescribed transformation properties . Data augmentation is a common practice to deal with rotational invariance , but it can not guarantee invariance and requires longer training . Since rotation is a continuous group , augmentation requires sampling from infinitely many possible angles . In this paper , we propose an equivariant continuous convolutional model , ECCO , for trajectory forecasting . Continuous convolution generalizes discrete convolution and is adapted to data in manyparticle systems with complex local interactions . Ummenhofer et al . ( 2019 ) designed a model using continuous convolutions for particle-based fluid simulations . Meanwhile , equivariance to group symmetries has proven to be a powerful tool to integrate physical intuition in physical science applications ( Wang et al. , 2020 ; Brown & Lunter , 2019 ; Kanwar et al. , 2020 ) . Here , we test the hypothesis that an equivariant model can also capture internal symmetry in non-physical human behavior . Our model utilizes a novel weight sharing scheme , torus kernels , and is rotationally equivariant . We evaluate our model on two real-world trajectory datasets : Argoverse autonomous vehicle dataset ( Chang et al. , 2019 ) and TrajNet++ pedestrian trajectory forecasting challenge ( Kothari et al. , 2020 ) . We demonstrate on par or better prediction accuracy to baseline models and data augmentation with fewer parameters , better sample efficiency , and stronger generalization properties . Lastly , we demonstrate theoretically and experimentally that our polar coordinate-indexed filters have lower equivariance discretization error due to being better adapted to the symmetry group . Our main contributions are as follows : • We propose Equivariant Continous COnvolution ( ECCO ) , a rotationally equivariant deep neural network that can capture internal symmetry in trajectories . • We design ECCO using a novel weight sharing scheme based on orbit decomposition and polar coordinate-indexed filters . We implement equivariance for both the standard and regular representation L2 ( SO ( 2 ) ) . • On benchmark Argoverse and TrajNet++ datasets , ECCO demonstrates comparable accuracy while enjoying better generalization , fewer parameters , and better sample complexity . 2 RELATED WORK . Trajectory Forecasting For vehicle trajectories , classic models in transportation include the CarFollowing model ( Pipes , 1966 ) and Intelligent Driver model ( Kesting et al. , 2010 ) . Deep learning has also received considerable attention ; for example , Liang et al . ( 2020 ) and Gao et al . ( 2020 ) use graph neural networks to predict vehicle trajectories . Djuric et al . ( 2018 ) use rasterizations of the scene with CNN . See the review paper by Veres & Moussa ( 2019 ) for deep learning in transportation . For human trajectory modeling , Alahi et al . ( 2016 ) propose Social LSTM to learn these humanhuman interactions . TrajNet ( Sadeghian et al. , 2018 ) and TrajNet++ ( Kothari et al. , 2020 ) introduce benchmarking for human trajectory forecasting . We refer readers to Rudenko et al . ( 2020 ) for a comprehensive survey . Nevertheless , many deep learning models are data-driven . They require large amounts of data , have many parameters , and can generate physically inconsistent predictions . Continuous Convolution Continuous convolutions over point clouds ( CtsConv ) have been successfully applied to classification and segmentation tasks ( Wang et al. , 2018 ; Lei et al. , 2019 ; Xu et al. , 2018 ; Wu et al. , 2019 ; Su et al. , 2018 ; Li et al. , 2018 ; Hermosilla et al. , 2018 ; Atzmon et al. , 2018 ; Hua et al. , 2018 ) . More recently , a few works have used continuous convolution for modeling trajectories or flows . For instance , Wang et al . ( 2018 ) uses CtsConv for inferring flow on LIDAR data . Schenck & Fox ( 2018 ) and Ummenhofer et al . ( 2019 ) model fluid simulation using CtsConv . Closely related to our work is Ummenhofer et al . ( 2019 ) , who design a continuous convolution network for particle-based fluid simulations . However , they use a ball-to-sphere mapping which is not well-adapted for rotational equivariance and only encode 3 frames of input . Graph neural networks ( GNNs ) are a related strategy which have been used for modeling particle system dynamics ( Sanchez-Gonzalez et al. , 2020 ) . GNNs are also permutation invariant , but they do not natively encode relative positions and local interaction as a CtsConv-based network does . Equivariant and Invariant Deep Learning Developing neural nets that preserve symmetries has been a fundamental task in image recognition ( Cohen et al. , 2019b ; Weiler & Cesa , 2019 ; Cohen & Welling , 2016a ; Chidester et al. , 2018 ; Lenc & Vedaldi , 2015 ; Kondor & Trivedi , 2018 ; Bao & Song , 2019 ; Worrall et al. , 2017 ; Cohen & Welling , 2016b ; Weiler et al. , 2018 ; Dieleman et al. , 2016 ; Maron et al. , 2020 ) . Equivariant networks have also been used to predict dynamics : for example , Wang et al . ( 2020 ) predicts fluid flow using Galilean equivariance but only for gridded data . Fuchs et al . ( 2020 ) use SE ( 3 ) -equivariant transformers to predict trajectories for a small number of particles as a regression task . As in this paper , both Bekkers ( 2020 ) and Finzi et al . ( 2020 ) address the challenge of parameterizing a kernel over continuous Lie groups . Finzi et al . ( 2020 ) apply their method to trajectory prediction on point clouds using a small number of points following strict physical laws . Worrall et al . ( 2017 ) also parameterizes convolutional kernels using polar coordinates , but maps these onto a rectilinear grid for application to image data . Weng et al . ( 2018 ) address rotational equivariance by inferring a global canonicalization of the input . Similar to our work , Esteves et al . ( 2018 ) use functions evenly sampled on the circle , however , their features are only at a single point whereas we assign feature vectors to each point in a point cloud . Thomas et al . ( 2018 ) introduce Tensor Field Networks which are SO ( 3 ) -equivariant continuous convolutions . Unlike our work , both Worrall et al . ( 2017 ) and Thomas et al . ( 2018 ) define their kernels using harmonic functions . Our weight sharing method using orbits and stabilizers is simpler as it does not require harmonic functions or Clebsch-Gordon coefficients . Unlike previous work , we implement a regular representation for the continuous rotation group SO ( 2 ) which is compatible with pointwise nonlinearities and enjoys an empirical advantage over irreducible representations . 3 BACKGROUND . We first review the necessary background of continuous convolution and rotational equivariance . 3.1 CONTINUOUS CONVOLUTION . Continuous convolution ( CtsConv ) generalizes the discrete convolution to point clouds . It provides an efficient and spatially aware way to model the interactions of nearby particles . Let f ( i ) ∈ Rcin denote the feature vector of particle i . Thus f is a vector field which assigns to the points x ( i ) a vector in Rcin . The kernel of the convolution K : R2 → Rcout×cin is a matrix field : for each point x ∈ R2 , K ( x ) is a cout × cin matrix . Let a be a radial local attention map with a ( r ) = 0 for r > R. The output feature vector g ( i ) of particle i from the continous convolution is given by g ( i ) = CtsConvK , R ( x , f ; x ( i ) ) = ∑ j a ( ‖x ( j ) − x ( i ) ‖ ) K ( x ( j ) − x ( i ) ) · f ( j ) . ( 1 ) CtsConv is naturally equivariant to permutation of labels and is translation invariant . Equation 1 is closely related to graph neural network ( GNN ) ( Kipf & Welling , 2017 ; Battaglia et al. , 2018 ) , which is also permutation invariant . Here the graph is dynamic and implicit with nodes x ( i ) and edges eij if ‖x ( i ) − x ( j ) ‖ < R. Unlike a GNN which applies the same weights to all neighbours , the kernel K depends on the relative position vector x ( i ) − x ( j ) . 3.2 ROTATIONAL EQUIVARIANCE . Continuous convolution is not naturally rotationally equivariant . Fortunately , we can translate the technique of rotational equivariance on CNNs to continuous convolutions . We use the language of Lie groups and their representations . For more background , see Hall ( 2015 ) and Knapp ( 2013 ) . More precisely , we denote the symmetry group of 2D rotations by SO ( 2 ) = { Rotθ : 0 ≤ θ < 2π } . As a Lie group , it has both a group structure Rotθ1 ◦ Rotθ2 = Rot ( θ1+θ2 ) mod2π which a continuous map with respect to the topological structure . As a manifold , SO ( 2 ) is homomeomorphic to the circle S1 ∼= { x ∈ R2 : ‖x‖ = 1 } . The group SO ( 2 ) can act on a vector space Rc by specifying a representation map ρ : SO ( 2 ) → GL ( Rc ) which assigns to each element of SO ( 2 ) an element of the set of invertible c × c matrices GL ( Rc ) . The map ρ must a be homomorphism ρ ( Rotθ1 ) ρ ( Rotθ1 ) = ρ ( Rotθ1 ◦ Rotθ2 ) . For example , the standard representation ρ1 on R2 is by 2 × 2 rotation matrices . The regular representation ρreg on L2 ( SO ( 2 ) ) = { ϕ : SO ( 2 ) → R : |ϕ|2 is integrable } is ρreg ( Rotφ ) ( ϕ ) = ϕ◦Rot−φ . Given input f with representation ρin and output with representation ρout , a map F is SO ( 2 ) -equivariant if F ( ρin ( Rotθ ) f ) = ρout ( Rotθ ) F ( f ) . Discrete CNNs are equivariant to a group G if the input , output , and hidden layers carry a G-action and the linear layers and activation functions are all equivariant ( Kondor & Trivedi , 2018 ) . One method for constructing equivariant discrete CNNs is steerable CNN ( Cohen & Welling , 2016b ) . Cohen et al . ( 2019a ) derive a general constraint for when a convolutional kernelK : Rb → Rcout×cin is G-equivariant . Assume G acts on Rb and that Rcout and Rcin are G-representations ρout and ρin respectively , then K is G-equivariant if for all g ∈ G , x ∈ R2 , K ( gx ) = ρout ( g ) K ( x ) ρin ( g −1 ) . ( 2 ) For the group SO ( 2 ) , Weiler & Cesa ( 2019 ) solve this constraint using circular harmonic functions to give a basis of discrete equivariant kernels . In contrast , our method is much simpler and uses orbits and stabilizers to create continuous convolution kernels .
This paper presents a novel Equivariant Continous COnvolution (ECCO) method for vehicle and pedestrian trajectory prediction. ECCO extends the previous continuous convolution method and makes it rotationally equivariant. To achieve that, they constrain the convolution kernel function K and make only the K(0, r) component freely trainable, and use it to derive the other components. They also propose a torus kernel that can be used on functions on circles. They evaluated their approach on two real-world trajectory prediction datasets, Argoverse and TrajNet++. They compared to basic baselines including constant velocity, nearest neighbor, and LSTM, as well as CtsConv (non-equivariant continuous convolution) and VectorNet. Results show that ECCO achieves significantly lower prediction errors than CtsConv and has fewer model weights. However, their prediction error is slightly higher than VectorNet at 2s and 3s.
SP:7699e91f9cf5149401b1adf811bcdaa643869262
Disentangled Generative Causal Representation Learning
1 INTRODUCTION Consider the observed data x from a distribution qx on X ⊆ Rd and the latent variable z from a prior pz on Z ⊆ Rk . In bidirectional generative models ( BGMs ) , we are normally interested in learning an encoder E : X → Z to infer latent variables and a generator G : Z → X to generate data , to achieve both representation learning and data generation . Classical BGMs include Variational Autoencoder ( VAE ) ( Kingma & Welling , 2014 ) and BiGAN ( Donahue et al. , 2017 ) . In representation learning , it was argued that an effective representation for downstream learning tasks should disentangle the underlying factors of variation ( Bengio et al. , 2013 ) . In generation , it is highly desirable if one can control the semantic generative factors by aligning them with the latent variables such as in StyleGAN ( Karras et al. , 2019 ) . Both goals can be achieved with the disentanglement of latent variable z , which informally means that each dimension of z measures a distinct factor of variation in the data ( Bengio et al. , 2013 ) . Earlier unsupervised disentanglement methods mostly regularize the VAE objective to encourage independence of learned representations ( Higgins et al. , 2017 ; Burgess et al. , 2017 ; Kim & Mnih , 2018 ; Chen et al. , 2018 ; Kumar et al. , 2018 ) . Later , Locatello et al . ( 2019 ) show that unsupervised learning of disentangled representations is impossible : many existing unsupervised methods are actually brittle , requiring careful supervised hyperparameter tuning or implicit inductive biases . To promote identifiability , recent work resorts to various forms of supervision ( Locatello et al. , 2020b ; Shu et al. , 2020 ; Locatello et al. , 2020a ) . In this work , we also incorporate supervision on the ground-truth factors in the form stated in Section 3.2 . Most of these existing methods are built on the assumption that the underlying factors of variation are mutually independent . However , in many real world cases the semantically meaningful factors of interests are not independent ( Bengio et al. , 2020 ) . Instead , semantically meaningful high-level variables are often causally correlated , i.e. , connected by a causal graph . In this paper , we prove formally that methods with independent priors fail to disentangle causally correlated factors . Motivated by this observation , we propose a new method to learn disentangled generative causal representations called DEAR . The key ingredient of our formulation is a structured causal model ( SCM ) ( Pearl et al. , 2000 ) as the prior for latent variables in a bidirectional generative model . With some background knowledge on the binary causal structure , the causal prior is then learned jointly with a generator and an encoder using a suitable GAN ( Goodfellow et al. , 2014 ) loss . We establish theoretical guarantees for DEAR to learn disentangled causal representations under appropriate conditions . An immediate application of DEAR is causal controllable generation , which can generate data from any desired interventional distributions of the latent factors . Another useful application of disentangled representations is to use such representations in downstream tasks , leading to better sample complexity ( Bengio et al. , 2013 ; Schölkopf et al. , 2012 ) . Moreover , it is believed that causal disentanglement is invariant and thus robust under distribution shifts ( Schölkopf , 2019 ; Arjovsky et al. , 2019 ) . In this paper , we demonstrate these conjectures in various downstream prediction tasks for the proposed DEAR method , which has theoretically guaranteed disentanglement property . We summarize our main contributions as follows : • We formally identify a problem with previous disentangled representation learning methods using the independent prior assumption , and prove that they fail to disentangle when the underlying factors of interests are causally correlated . • We propose a new disentangled learning method , DEAR , which integrates an SCM prior into a bidirectional generative model , trained with a suitable GAN loss . • We provide theoretical justification on the identifiability of the proposed formulation . • Extensive experiments are conducted on both synthesized and real data to demonstrate the effec- tiveness of DEAR in causal controllable generation , and the benefits of the learned representations for downstream tasks in terms of sample efficiency and distributional robustness . 2 OTHER RELATED WORK GAN-based disentanglement methods . Existing methods , including InfoGAN ( Chen et al. , 2016 ) and InfoGAN-CR ( Lin et al. , 2020 ) , differ from our proposed formulation mainly in two folds . First they still assume an independent prior for latent variables , so suffer from the same problem with previous VAE-based methods mentioned above . Besides , the idea of InfoGAN-CR is to encourage each latent code to make changes that are easy to detect , which actually applies well only when the underlying factors are independent . Second , InfoGAN as a bidirectional generative modeling method further requires variational approximation apart from adversarial training , which is inferior to the principled formulation in BiGAN and AGES ( Shen et al. , 2020 ) that we adopt . Causality with generative models . CausalGAN ( Kocaoglu et al. , 2018 ) and a concurrent work ( Moraffah et al. , 2020 ) of ours , are unidirectional generative models ( i.e. , a generative model that learns a single mapping from the latent variable to data ) that build upon a cGAN ( Mirza & Osindero , 2014 ) . They assign an SCM to the conditional attributes while leave the latent variables as independent Gaussian noises . The limit of a cGAN is that it always requires full supervision on attributes to apply conditional adversarial training . And the ground-truth factors are directly fed into the generator as the conditional attributes , without an extra effort to align the dimensions between the latent variables and the underlying factors , so their models have nothing to do with disentanglement learning . Moreover their unidirectional nature makes it impossible to learn representations . Besides they only consider binary factors whose consequent semantic interpolations appear nonsmooth , as shown in Appendix D. CausalVAE ( Yang et al. , 2020 ) assigns the SCM directly on the latent variables , but built upon iVAE ( Khemakhem et al. , 2020 ) , it adopts a conditional prior given the ground-truth factors so is also limited to fully supervised setting . 3 PROBLEM SETTING 3.1 GENERATIVE MODEL We first describe the probabilistic framework of disentangled learning with supervision . We follow the commonly assumed two-step data generating process that first samples the underlying generative factors , and then conditional on those factors , generates the data ( Kingma & Welling , 2014 ) . During the generation process , the generator induces the generated conditional pG ( x|z ) and generated joint distribution pG ( x , z ) = pz ( z ) pG ( x|z ) . During the inference process , the encoder induces the encoded conditional qE ( z|x ) which can be a factorized Gaussian and the encoded joint distribution qE ( x , z ) = qx ( x ) qE ( z|x ) . We consider the following objective for generative modeling : Lgen = DKL ( qE ( x , z ) , pG ( x , z ) ) , ( 1 ) which is shown to be equivalent to the evidence lower bound used in VAEs up to a constant , and allows a closed form only with factorized Gaussian prior , encoder and generator ( Shen et al. , 2020 ) . Since constraints on the latent space are required to enforce disentanglement , it is desired that the distribution family of qE ( x , z ) and pG ( x , z ) should be large enough , especially for complex data like images . Normally more general implicit distributions are favored over factorized Gaussians in terms of expressiveness ( Karras et al. , 2019 ; Mescheder et al. , 2017 ) . Then minimizing ( 1 ) requires adversarial training , as discussed detailedly in Section 4.3 . 3.2 SUPERVISED REGULARIZER To guarantee disentanglement , we incorporate supervision when training the BGM , following the similar idea in Locatello et al . ( 2020b ) but with a different formulation . Specifically , let ξ ∈ Rm be the underlying ground-truth factors of interests of x , following distribution pξ , and yi be some continuous or discrete observation of the underlying factor ξi satisfying ξi = E ( yi|x ) for i = 1 , . . . , m. For example , in the case of human face images , y1 can be the binary label indicating whether a person is young or not , and ξ1 = E ( y1|x ) = P ( y1 = 1|x ) is the probability of being young given one image x . Let Ē ( x ) be the deterministic part of the stochastic transformation E ( x ) , i.e. , Ē ( x ) = E ( E ( x ) |x ) , which is used for representation learning . We consider the following objective : L ( E , G ) = Lgen ( E , G ) + λLsup ( E ) , ( 2 ) where Lsup = ∑m i=1 Ex , y [ CE ( Ēi ( x ) , yi ) ] if yi is the binary or bounded continuous label of the i-th factor ξi , where CE ( l , y ) = y log σ ( l ) + ( 1 − y ) log ( 1 − σ ( l ) ) is the cross-entropy loss with σ ( · ) being the sigmoid function ; Lsup = ∑m i=1 Ex , y [ Ēi ( x ) − yi ] 2 if yi is the continuous observation of ξi , and λ > 0 is the coefficient to balance both terms . We empirically find the choice of λ quite insensitive to different tasks and datasets , and hence set λ = 5 in all experiments . Estimating of Lgen requires the unlabelled dataset { x1 , . . . , xN } while estimating Lsup requires a labeled dataset { ( xj , yj ) : j = 1 , . . . , Ns } where Ns can be much smaller than N . In contrast , Locatello et al . ( 2020b ) propose the regularizer Lsup = ∑m i=1 Ex , z [ CE ( Ēi ( x ) , zi ) ] involving only the latent variable z which is a part of the generative model , without distinguishing from the ground-truth factor ξ and its observation y . Hence they do not establish any theoretical justification on disentanglement . Besides , they adopt a VAE loss for Lgen with an independent prior , which suffers from the unidentifiability problem described in the next section . 3.3 UNIDENTIFIABILITY WITH AN INDEPENDENT PRIOR Intuitively , the above supervised regularizer aims at ensuring some alignment between factor ξ and latent variable z . We start with the definition of a disentangled representation following this intuition . Definition 1 ( Disentangled representation ) . Given the underlying factor ξ ∈ Rm of data x , a deterministic encoder E is said to learn a disentangled representation with respect to ξ if ∀i = 1 , . . . , m , there exists a 1-1 function gi such that Ei ( x ) = gi ( ξi ) . Further , a stochastic encoder E is said to be disentangled wrt ξ if its deterministic part Ē ( x ) is disentangled wrt ξ . As stated above , we consider the general case where the underlying factors of interests are causally correlated . Then the goal becomes to disentangle the causal factors . Previous methods mostly use an independent prior for z , which contradicts with the truth . We make this formal through the following proposition , which indicates that the disentangled representation is generally unidentifiable with an independent prior . Proposition 1 . Let E∗ be any encoder that is disentangled wrt ξ . Let b∗ = Lsup ( E∗ ) , a = minG Lgen ( E ∗ , G ) , and b = min { ( E , G ) : Lgen=0 } Lsup ( E ) . Assume the elements of ξ are connected by a causal graph whose adjacency matrix A0 is not a zero matrix . Suppose the prior pz is factorized , i.e. , pz ( z ) = ∏k i=1 pi ( zi ) . Then we have a > 0 , and either when b ∗ ≥ b or b∗ < b and λ < ab−b∗ , there exists a solution ( E ′ , G′ ) such that for any generator G , we have L ( E′ , G′ ) < L ( E∗ , G ) . All proofs are given in Appendix A . This proposition directly suggests that minimizing ( 2 ) favors the solution ( E′ , G′ ) over one with a disentangled encoder E∗ . Thus , with an independent prior we have no way to identify the disentangled solution with λ that is not large enough . However , in real applications it is impossible to estimate the threshold , and too large λ makes it difficult to learn the BGM . In the following section we propose a solution to this problem . 4 CAUSAL DISENTANGLEMENT LEARNING 4.1 GENERATIVE MODEL WITH A CAUSAL PRIOR We propose to use a causal model as the prior pz . Specifically we use the generalized nonlinear Structural Causal Model ( SCM ) proposed by Yu et al . ( 2019 ) as follows z = f ( ( I −A⊤ ) −1h ( $ ) ) : = Fβ ( $ ) , ( 3 ) where A is the weighted adjacency matrix of the directed acyclic graph ( DAG ) upon the k elements of z ( i.e. , Aij ∕= 0 if and only if zi is the parent of zj ) , $ denotes the exogenous variables following N ( 0 , I ) , f and h are element-wise nonlinear transformations , and β = ( f , h , A ) denotes the set of parameters of f , h and A , with the parameter space B . Further let 1A = I ( A ∕= 0 ) denote the corresponding binary adjacency matrix , where I is the element-wise indicator function . When f is invertible , ( 3 ) is equivalent to f−1 ( z ) = A⊤f−1 ( z ) + h ( $ ) ( 4 ) which indicates that the factors z satisfy a linear SCM after nonlinear transformation f , and enables interventions on latent variables as discussed later . The model structure is presented in Figure 1 . Note that different from our model where z is the latent variable following the prior ( 3 ) with the goal of causal disentanglement , Yu et al . ( 2019 ) proposed a causal discovery method where variables z are observed with the aim of learning the causal structure among z . In causal structure learning , the graph is required to be acyclic . Zheng et al . ( 2018 ) propose an equality constraint whose satisfaction ensures acyclicity and solve the problem with augmented Lagrangian method , which however leads to optimization difficulties ( Ng et al. , 2020 ) . In this paper , to avoid dealing with the non-convex constraint but focus on disentangling , we assume to have some prior knowledge of the binary causal structure . Specifically , we assume the super-graph of the true binary graph 1A∗ is given , the best case of which is the true graph while the worst is that only the causal ordering is available . Then we learn the weights of the non-zero elements of the prior adjacency matrix that indicate the sign and scale of causal effects , jointly with other parameters using the formulation and algorithm described in later sections . To incorporate structure learning methods and jointly learn the structure from scratch with guarantee of identifiability could be explored in future work . An ablation study is done in Appendix B regarding this prior knowledge . To enable causal controllable generation , we use invertible f and h and describe the mechanism to generate images from interventional distributions of latent variables . Note that interventions can be formalized as operations that modify a subset of equations in ( 4 ) ( Pearl et al. , 2000 ) . Suppose we would like to intervene on the i-th dimension of z , i.e. , Do ( zi = c ) , where c is a constant . Once we have latent factors z inferred from data x , i.e. , z = E ( x ) , or sampled from prior pz , we follow the intervened equations in ( 4 ) to obtain z′ on the left hand side using ancestral sampling by performing ( 4 ) iteratively . Then we decode the intervened latent factor z′ to generate the sample G ( z′ ) . In Section 5.1 we define the two types of interventions of most interests in applications . Another issue of the model is the latent dimension , to handle which we propose the so-called composite prior . Recall that m is the number of generative factors that we are interested to disentangle , e.g. , all the semantic concepts related to some field , where m tends to be smaller than the total number M of generative factors . The latent dimension k of the generative model should be no less than M to allow a sufficient degree of freedom in order to generate or reconstruct data well . Since M is generally unknown in reality , we set a sufficiently large k , at least larger than m which is a trivial lower bound of M . The role of the remaining k−m dimensions is to capture other factors necessary for generation whose structure is not cared or explicitly modeled . Then we propose to use a prior that is a composition of a causal model for the first m dimensions and another distribution for the other k −m dimensions to capture other factors necessary for generation , like a standard Gaussian . 4.2 FORMULATION AND IDENTIFIABILITY OF DISENTANGLEMENT In this section , we present the formulation of DEAR and establish the theoretical justification of it . Compared with the BGM described in Section 3.1 , here we have one more module to learn that is the SCM prior . Thus pG ( x , z ) becomes pG , F ( x , z ) = pF ( z ) pG ( x|z ) where pF ( z ) or pβ ( z ) denotes the marginal distribution of Fβ ( $ ) with $ ∼ N ( 0 , I ) . We then rewrite the generative loss as follows Lgen ( E , G , F ) = DKL ( qE ( x , z ) , pG , F ( x , z ) ) . ( 5 ) Then we propose the following formulation to learn causal generative causal representations : min E , G , F L ( E , G , F ) : = Lgen ( E , G , F ) + λLsup ( E ) . ( 6 ) In order to achieve causal disentanglement , we make two assumptions on the causal model . Assumption 1 supposes a sufficiently large capacity of the SCM in ( 3 ) to contain the underlying distribution pξ , which is reasonable due to the generalization of the nonlinear SCM . Assumption 2 states the identifiability of the true causal structure 1A0 of ξ , which is applicable given the true causal ordering under basic Markov and causal minimality conditions ( Pearl , 2014 ; Zhang & Spirtes , 2011 ) . Assumption 1 ( SCM capacity ) . The underlying distribution pξ belongs to the distribution family { pβ : β ∈ B } , i.e. , there exits β0 = ( f0 , h0 , A0 ) such that pξ = pβ0 . Assumption 2 ( Structure identifiability ) . For all β = ( f , h , A ) ∈ B with pβ = pβ0 , it holds that 1A = 1A0 . The following theorem then guarantees that under appropriate conditions the DEAR formulation can learn the disentangled representations defined in Definition 1 . Theorem 1 . Assume the infinite capacity of E and G. Further under Assumption 1-2 , DEAR formulation ( 6 ) learns the disentangled encoder E∗ . Specifically , we have gi ( ξi ) = σ−1 ( ξi ) if CE loss is used for the supervised regularizer , and gi ( ξi ) = ξi if L2 loss is used . Note that the identifiability we establish in this paper differs from some previous work on the parameter identifiability , e.g. , Khemakhem et al . ( 2020 ) . We argue that to learn disentangled representations , the form in Definition 1 , i.e. , the existence but not the uniqueness of gi ’ s , is sufficient to identify the relation among the representations and the data . In contrast , parameter identifiability may not be achievable in many cases like over-parametrization . Thus the identifiability discussed here is more realistic in terms of the goal of disentangling . Later we provide empirical evidence to support the theory directly through the application in causal controllable generation . 4.3 ALGORITHM In this section we propose the algorithm to solve the formulation ( 6 ) . The SCM prior pF ( z ) and implicit generated conditional pG ( x|z ) make ( 5 ) lose an analytic form . Hence we adopt a GAN method to adversarially estimate the gradient of ( 5 ) . We parametrize Eφ ( x ) and Gθ ( z ) by neural networks . Different from Shen et al . ( 2020 ) , the prior also involves learnable parameters . We present in the following lemma the gradient formulas of ( 5 ) . Lemma 1 . Let r ( x , z ) = q ( x , z ) /p ( x , z ) and D ( x , z ) = log r ( x , z ) . Then we have ∇θLgen = −Ez∼pβ ( z ) [ s ( x , z ) ∇xD ( x , z ) ⊤|x=Gθ ( z ) ∇θGθ ( z ) ] , ∇φLgen = Ex∼qx [ ∇zD ( x , z ) ⊤|z=Eφ ( x ) ∇φEφ ( x ) ] , ∇βLgen = −E $ [ s ( x , z ) ( ∇xD ( x , z ) ⊤∇βG ( Fβ ( ! ) ) +∇zD ( x , z ) ⊤∇βFβ ( ! ) ) | x=G ( Fβ ( $ ) ) z=Fβ ( $ ) ] , ( 7 ) where s ( x , z ) = eD ( x , z ) is the scaling factor . We then estimate the gradients in ( 7 ) by training a discriminator Dψ via empirical logistic regression : minψ′ [ 1 |Se| ∑ ( x , z ) ∈Se log ( 1 + e −Dψ′ ( x , z ) ) + 1|Sg| ∑ ( x , z ) ∈Sg log ( 1 + e Dψ′ ( x , z ) ) ] , where Se and Sg are finite samples from qE ( x , z ) and pG ( x , z ) respectively , leading to a GAN approach . Based on above , we propose Algorithm 1 to learn disentangled generative causal representation . Algorithm 1 : Disentangled gEnerative cAusal Representation ( DEAR ) Learning Input : training set { x1 , . . . , xN , y1 , . . . , yNs } , initial parameters φ , θ , β , ψ , batch-size n 1 while not convergence do 2 for multiple steps do 3 Sample { x1 , . . . , xn } from the training set , { ! 1 , . . . , ! n } from N ( 0 , I ) 4 Generate from the causal prior zi = Fβ ( ! i ) , i = 1 , . . . n 5 Update ψ by descending the stochastic gradient : 1 n ∑n i=1 ∇ψ [ log ( 1 + e−Dψ ( xi , Eφ ( xi ) ) ) + log ( 1 + eDψ ( Gθ ( zi ) , zi ) ) ] 6 Sample { x1 , . . . , xn , y1 , . . . , yns } , { ! 1 , . . . , ! n } as above ; generate zi = Fβ ( ! i ) 7 Compute θ-gradient : − 1 n ∑n i=1 s ( Gθ ( zi ) , zi ) ∇θDψ ( Gθ ( zi ) , zi ) 8 Compute φ-gradient : 1 n ∑n i=1 ∇φDψ ( xi , Eφ ( xi ) ) + 1 ns ∑ns i=1 ∇φLsup ( φ ; xi , yi ) 9 Compute β-gradient : − 1 n ∑n i=1 s ( G ( zi ) , zi ) ∇βDψ ( Gθ ( Fβ ( ! i ) ) , Fβ ( ! i ) ) 10 Update parameters φ , θ , β using the gradients Return : φ , θ , β Remark : without loss of generality , assume the first Ns samples in the training set and the first ns samples in each mini-batch has available labels ; ns may vary across different iterations . 5 EXPERIMENTS We evaluate our methods on two datasets . The first one is a synthesized dataset Pendulum similar to the one in Yang et al . ( 2020 ) . As shown in Figure 3 , each image is generated by four continuous factors : pendulum angle , light angle , shadow length and shadow position whose underlying structure is given in Figure 2 ( a ) following physical mechanisms . To make the dataset realistic , we introduce random noises when generating the two effects from the causes , representing the measurement error . We further introduce 20 % corrupted data whose shadow is randomly generated , mimicking some environmental disturbance . The sample sizes for training , validation and test set are all 6,724.1 The second one is a real human face dataset CelebA ( Liu et al. , 2015 ) , containing 202,599 images with 40 labelled binary attributes . Among them we consider two groups of causally correlated factors shown in 2 ( b , c ) . We believe these two datasets are diverse enough to assess our methods . All the details of experimental setup and architectures are given in Appendix C. pendulum_ ngle ( 1 ) light_angle ( 2 ) shadow_length ( 3 ) shadow_position ( 4 ) pendulum_ angle ( 0 ) light_ angle ( 1 ) shadow_ position ( 3 ) shadow_ length ( 2 ) ( a ) Pendulum smile ( 1 ) checkbone ( 3 ) narrow_eye ( 5 ) mouth_open ( 4 ) gender ( 2 ) smile6 chubby ( 6 ) smile ( 0 ) gender ( 1 ) narrow_ eye ( 4 ) chubby ( 5 ) mouth_ open ( 3 ) cheekbone ( 2 ) ( b ) CelebA-Smile Age6 young ( 1 ) gend r ( 2 ) receding_hairline ( 3 ) make_up ( 4 ) chubby ( 5 ) eye_bag ( 6 ) young ( 0 ) gender ( 1 ) receding_ hairline ( 2 ) make_ up ( 3 ) chubby ( 4 ) eye_bag ( 2 ) ( c ) CelebA-Attractive Figure 2 : Underlying causal structures . 5.1 CONTROLLABLE GENERATION We first investigate the performance of our methods in disentanglement through applications in causal controllable generation ( CG ) . Traditional CG methods mainly manipulate the independent generative factors ( Karras et al. , 2019 ) , while we consider the general case where the factors are causally correlated . With a learned SCM as the prior , we are able to generate images from any desired interventional distributions of the latent factors . For example , we can manipulate only the 1The Pendulum dataset will be released as a causal disentanglement benchmark soon . cause factor while leave its effects unchanged . Besides , the BGM framework enables controllable generation either from scratch or a given unlabeled image . We consider two types of intervention . In traditional traversals , we manipulate one dimension of the latent vector while keep the others fixed to either their inferred or sampled values ( Higgins et al. , 2017 ) . A causal view of such operations is an intervention on all the variables by setting them as constants with only one of them varying . Another interesting type of interventional distribution is to intervene on only one latent variable , i.e. , Pdo ( zi=c ) ( z ) . The proposed SCM prior enables us to conduct such intervention though the mechanism given in Section 4.1 . Figure 3-4 illustrate the results of causal controllable generation of the proposed DEAR and the baseline method with an independent prior , S-β-VAE ( Locatello et al. , 2020b ) . Results from other baselines including S-TCVAE , S-FactorVAE ( which essentially make no difference due to the independence assumption ) and CausalGAN are given in Appendix D. Note that we do not compare with unsupervised disentanglement methods because of fairness and their lack of justification . In each figure , we first infer the latent representations from a test image in block ( c ) . The traditional traversals of two models are given in blocks ( a , b ) . We see that in each line when manipulating one latent dimension , the generated images from our model vary only in a single factor , indicating that our method can disentangle the causally correlated factors . It is worth pointing out that we are the first to achieve the disentanglement between the cause and its effects , while other methods tend to entangle them . In block ( d ) , we show the results of intervention on the latent variables representing the cause factors , which clearly show that intervening on a cause variable changes its effect variables . Results in Appendix D further show that intervening on an effect node does not influence its cause . Since the underlying factors are causally correlated , all previous quantitative metrics for disentanglement no longer apply . We provide more qualitative traversals in Appendix D to show the overall performance . A quantitative metric for causal disentanglement is worth exploring in future work . 5.2 DOWNSTREAM TASK The previous section verifies the good disentanglement performance of DEAR . In this section , equipped with DEAR , we investigate and demonstrate the benefits of learned disentangled causal representations in sample efficiency and distributional robustness . We state the downstream tasks . On CelebA , we consider the structure CelebA-Attractive in Figure 2 ( c ) . We artificially create a target label τ = 1 if young=1 , gender=0 , receding hairline=0 , make up=1 , chubby=0 , eye bag=0 , and τ = 0 otherwise , indicating one kind of attractiveness as a slim young woman with makeup and thick hair.2 On the pendulum dataset , we regard the label of data corruption as the target τ , i.e. , τ = 1 if the data is corrupted and τ = 0 otherwise . We consider the downstream tasks of predicting the target label . In both cases , the factors of interests in Figure 2 ( a , c ) are causally related to τ , which are the features that humans use to do the task . Hence it is conjectured that a disentangled representation of these causal factors tends to be more data efficient and invariant to distribution shifts . 5.2.1 SAMPLE EFFICIENCY For a BGM including the previous state-of-the-art supervised disentangling methods S-VAEs ( Locatello et al. , 2020b ) and DEAR , we use the learned encoder to embed the training data to the latent space and train a MLP classifier on the representations to predict the target label . Without an encoder , one normally needs to train a convolutional neural network with raw images as the input . Here we adopt the ResNet50 as the baseline classifier which is the architecture of the BGM encoder . Since disentangling methods use additional supervision of the generative factors , we consider another baseline that is pretrained using multi-label prediction of the factors on the same training set . To measure the sample efficiency , we use the statistical efficiency score defined as the average test accuracy based on 100 samples divided by the average accuracy based on 10,000/all samples , following Locatello et al . ( 2019 ) . Table 1 presents the results , showing that DEAR owns the highest sample efficiency on both datasets . ResNet with raw data inputs has the lowest efficiency , although multi-label pretraining improves its performance to a limited extent . S-VAEs have better efficiency than the ResNet baselines but lower accuracy under the case with more training data , which we think is mainly because the independent prior conflicts with the supervised loss as indicated in Proposition 1 , making the learned representations entangled ( as shown in the previous section ) and less informative . Besides , we also investigate the performance of DEAR under the semi-supervised setting where only 10 % of the labels are available . We find that DEAR with fewer labels has comparable sample efficiency with that in the fully supervised setting , with a sacrifice in accuracy that is yet still comparable to other baselines with more supervision . 2Note that the definition of attractiveness here only refers to one kind of attractiveness , which has nothing to do with the linguistic definition of attractiveness . ( b ) Pendulum 5.2.2 DISTRIBUTIONAL ROBUSTNESS We manipulate the training data to inject spurious correlations between the target label and some spurious attributes . On CelebA , we regard mouth open as the spurious factor ; on Pendulum , we choose background color ∈ { blue ( + ) , white ( − ) } . We manipulate the training data such that the target label is more strongly correlated with the spurious attributes , i.e. , the target label and the spurious attribute of 80 % of the examples are both positive or negative , while those of 20 % examples are opposite . For example , in the manipulated training set , 80 % smiling examples in CelebA have an open mouth ; 80 % corrupted examples in Pendulum are masked with a blue background . The test set however does not have these correlations , leading to a distribution shift . Intuitively these spurious attributes are not causally correlated to the target label , but normal independent and identically distributed ( IID ) based methods like empirical risk minimization ( ERM ) tend to exploit these easily learned spurious correlations in prediction , and hence face performance degradation when the such correlation no longer exists during test . In contrast , causal factors are regarded invariant and thus robust under such shifts . Previous sections justify both theoretically and empirically that DEAR can learn disentangled causal representations . We then apply those representations by training a classifier upon them , which is conjectured to be invariant and robust . Baseline methods include ERM , multi-label ERM to predict target label and all the factors considered in disentangling to have the same amount of supervision , and S-VAEs that can not disentangle well in the causal case . Table 2 shows the average and worst-case ( Sagawa et al. , 2019 ) test accuracy to assess both the overall classification performance and distributional robustness , where we group the test set according to the two binary labels , the target one and the spurious attribute , into four cases and regard the one with the worst accuracy as the worst-case , which usually owns the opposite correlation to the training data . We see that the classifiers trained upon DEAR representations outperform the baselines in both metrics . Particularly , when comparing the worst-case accuracy with the average one , we observe a slump from around 80 to around 60 for other methods on CelebA , while DEAR enjoys an acceptable small decline . These results support the above conjecture and the benefits of causal disentanglement in distributional robustness . 6 CONCLUSION This paper showed that previous methods with the independent latent prior assumption fail to learn disentangled representation when the underlying factors of interests are causally correlated . We then proposed a new disentangled learning method called DEAR with theoretical guarantees . Extensive experiments demonstrated the effectiveness of DEAR in causal generation , and the benefits of the learned representations for downstream tasks . REFERENCES Martin Arjovsky , Léon Bottou , Ishaan Gulrajani , and David Lopez-Paz . Invariant risk minimization . arXiv preprint arXiv:1907.02893 , 2019 . Yoshua Bengio , Aaron Courville , and Pascal Vincent . Representation learning : A review and new perspectives . IEEE transactions on pattern analysis and machine intelligence , 35 ( 8 ) :1798–1828 , 2013 . Yoshua Bengio , Tristan Deleu , Nasim Rahaman , Rosemary Ke , Sébastien Lachapelle , Olexa Bilaniuk , Anirudh Goyal , and Christopher Pal . A meta-transfer objective for learning to disentangle causal mechanisms . In ICLR , 2020 . Christopher P. Burgess , Irina Higgins , Arka Pal , Loı̈c Matthey , Nicholas Watters , Guillaume Desjardins , and Alexander Lerchner . Understanding disentangling in beta-vae . NIPS Workshop of Learning Disentangled Features , 2017 . Tian Qi Chen , Xuechen Li , Roger B. Grosse , and David K. Duvenaud . Isolating sources of disentanglement in variational autoencoders . In NeurIPS , 2018 . Xi Chen , Yan Duan , Rein Houthooft , John Schulman , Ilya Sutskever , and Pieter Abbeel . Infogan : Interpretable representation learning by information maximizing generative adversarial nets . In Advances in neural information processing systems , pp . 2172–2180 , 2016 . Jeff Donahue , Philipp Krähenbühl , and Trevor Darrell . Adversarial feature learning . In ICLR , 2017 . Vincent Dumoulin , Ishmael Belghazi , Ben Poole , Alex Lamb , Martı́n Arjovsky , Olivier Mastropietro , and Aaron C. Courville . Adversarially learned inference . In ICLR , 2017 . Ian Goodfellow , Jean Pouget-Abadie , Mehdi Mirza , Bing Xu , David Warde-Farley , Sherjil Ozair , Aaron Courville , and Yoshua Bengio . Generative adversarial nets . In Advances in neural information processing systems , pp . 2672–2680 , 2014 . Kaiming He , Xiangyu Zhang , Shaoqing Ren , and Jian Sun . Deep residual learning for image recognition . In Proceedings of the IEEE conference on computer vision and pattern recognition , pp . 770–778 , 2016 . Irina Higgins , Loı̈c Matthey , Arka Pal , Christopher Burgess , Xavier Glorot , Matthew Botvinick , Shakir Mohamed , and Alexander Lerchner . beta-vae : Learning basic visual concepts with a constrained variational framework . In ICLR , 2017 . Tero Karras , Samuli Laine , and Timo Aila . A style-based generator architecture for generative adversarial networks . In Proceedings of the IEEE conference on computer vision and pattern recognition , pp . 4401–4410 , 2019 . Ilyes Khemakhem , Diederik Kingma , Ricardo Monti , and Aapo Hyvarinen . Variational autoencoders and nonlinear ica : A unifying framework . In International Conference on Artificial Intelligence and Statistics , pp . 2207–2217 , 2020 . Hyunjik Kim and Andriy Mnih . Disentangling by factorising . In ICML , 2018 . Diederik P Kingma and Max Welling . Auto-encoding variational bayes . In ICLR , 2014 . Murat Kocaoglu , Christopher Snyder , Alexandros G Dimakis , and Sriram Vishwanath . Causalgan : Learning causal implicit generative models with adversarial training . In ICLR , 2018 . Abhishek Kumar , Prasanna Sattigeri , and Avinash Balakrishnan . Variational inference of disentangled latent concepts from unlabeled observations . In ICLR , 2018 . Felix Leeb , Yashas Annadani , Stefan Bauer , and Bernhard Schölkopf . Structural autoencoders improve representations for generation and transfer . arXiv preprint arXiv:2006.07796 , 2020 . Zinan Lin , Kiran K Thekumparampil , Giulia Fanti , and Sewoong Oh . Infogan-cr and modelcentrality : Self-supervised model training and selection for disentangling gans . In ICML , 2020 . Ziwei Liu , Ping Luo , Xiaogang Wang , and Xiaoou Tang . Deep learning face attributes in the wild . In Proceedings of the IEEE international conference on computer vision , pp . 3730–3738 , 2015 . F. Locatello , S. Bauer , M. Lucic , G. Raetsch , S. Gelly , B. Schölkopf , and O. Bachem . Challenging common assumptions in the unsupervised learning of disentangled representations . In Proceedings of the 36th International Conference on Machine Learning ( ICML ) , volume 97 of Proceedings of Machine Learning Research , pp . 4114–4124 . PMLR , June 2019 . URL http : //proceedings.mlr.press/v97/locatello19a.html . Francesco Locatello , Ben Poole , Gunnar Rätsch , Bernhard Schölkopf , Olivier Bachem , and Michael Tschannen . Weakly-supervised disentanglement without compromises . In ICML , 2020a . Francesco Locatello , Michael Tschannen , Stefan Bauer , Gunnar Rätsch , Bernhard Schölkopf , and Olivier Bachem . Disentangling factors of variation using few labels . In ICLR , 2020b . Lars Mescheder , Sebastian Nowozin , and Andreas Geiger . Adversarial variational bayes : Unifying variational autoencoders and generative adversarial networks . In Proceedings of the 34th International Conference on Machine Learning-Volume 70 , pp . 2391–2400 . JMLR . org , 2017 . Mehdi Mirza and Simon Osindero . Conditional generative adversarial nets . arXiv preprint arXiv:1411.1784 , 2014 . Raha Moraffah , Bahman Moraffah , Mansooreh Karami , Adrienne Raglin , and Huan Liu . Can : A causal adversarial network for learning observational and interventional distributions . arXiv preprint arXiv:2008.11376 , 2020 . Ignavier Ng , AmirEmad Ghassami , and Kun Zhang . On the role of sparsity and dag constraints for learning linear dags . arXiv preprint arXiv:2006.10201 , 2020 . Judea Pearl . Probabilistic reasoning in intelligent systems : networks of plausible inference . Elsevier , 2014 . Judea Pearl et al . Models , reasoning and inference . Cambridge , UK : CambridgeUniversityPress , 2000 . Ali Razavi , Aaron van den Oord , and Oriol Vinyals . Generating diverse high-fidelity images with vq-vae-2 . In Advances in Neural Information Processing Systems , pp . 14866–14876 , 2019 . Shiori Sagawa , Pang Wei Koh , Tatsunori B Hashimoto , and Percy Liang . Distributionally robust neural networks for group shifts : On the importance of regularization for worst-case generalization . arXiv preprint arXiv:1911.08731 , 2019 . Bernhard Schölkopf . Causality for machine learning . arXiv preprint arXiv:1911.10500 , 2019 . Bernhard Schölkopf , Dominik Janzing , Jonas Peters , Eleni Sgouritsa , Kun Zhang , and Joris Mooij . On causal and anticausal learning . In ICML , 2012 . Xinwei Shen , Tong Zhang , and Kani Chen . Bidirectional generative modeling using adversarial gradient estimation . arXiv preprint arXiv:2002.09161 , 2020 . Rui Shu , Yining Chen , Abhishek Kumar , Stefano Ermon , and Ben Poole . Weakly supervised disentanglement with guarantees . In ICLR , 2020 . Mengyue Yang , Furui Liu , Zhitang Chen , Xinwei Shen , Jianye Hao , and Jun Wang . Causalvae : Structured causal disentanglement in variational autoencoder . arXiv preprint arXiv:2004.08697 , 2020 . Yue Yu , Jie Chen , Tian Gao , and Mo Yu . Dag-gnn : Dag structure learning with graph neural networks . In ICML , 2019 . Han Zhang , Ian Goodfellow , Dimitris Metaxas , and Augustus Odena . Self-attention generative adversarial networks . In International Conference on Machine Learning , pp . 7354–7363 . PMLR , 2019 . Jiji Zhang and Peter Spirtes . Intervention , determinism , and the causal minimality condition . Synthese , 182 ( 3 ) :335–347 , 2011 . Shengjia Zhao , Jiaming Song , and Stefano Ermon . Learning hierarchical features from generative models . In ICML , 2017 . Xun Zheng , Bryon Aragam , Pradeep K Ravikumar , and Eric P Xing . Dags with no tears : Continuous optimization for structure learning . In Advances in Neural Information Processing Systems , pp . 9472–9483 , 2018 . APPENDIX A PROOFS A.1 PROOF OF PROPOSITION 1 Proof . On one hand , by the assumption that the elements of ξ are connected by a causal graph whose adjacency matrix is not a zero matrix . Then exist i ∕= j such that ξi and ξj are not independent , indicating that the probability density of ξ can not be factorized . Since E∗ is disentangled wrt ξ , by Definition 1 , ∀i = 1 , . . . , m there exists gi such that E∗i ( x ) = gi ( ξi ) . This implies that the probability density of E∗ ( x ) is not factorized . On the other hand , notice that the distribution family of the latent prior is { pz : pz is factorized } . Hence the intersection of the marginal distribution families of z and E∗ ( x ) is an empty set . Then the joint distribution families of ( x , E∗ ( x ) ) and ( G ( z ) , z ) also have an empty intersection . We know that Lgen ( E , G ) = 0 implies qE ( x , z ) = pG ( x , z ) which contradicts the above . Therefore , we have a = minG Lgen ( E∗ , G ) > 0 . Let ( E′ , G′ ) be the solution of the optimization problem min { ( E , G ) : Lgen=0 } Lsup ( E ) . Then we have L′ = L ( E′ , G′ ) = λb , and L∗ = L ( E∗ , G ) ≥ a + λb∗ > λb∗ for any generator G. When b∗ ≥ b we directly have L′ < L∗ . When b∗ < b and λ is not large enough , i.e. , λ < ab−b∗ , we have L′ < L∗ . A.2 PROOF OF THEOREM 1 Proof . Assume E is deterministic . On one hand , for each i = 1 , . . . , m , first consider the cross-entropy loss Lsup , i ( E ) = E ( x , y ) [ CE ( Ei ( x ) , yi ) ] = ∫ p ( x ) p ( yi|x ) ( yi log σ ( Ei ( x ) ) + ( 1−yi ) log ( 1−σ ( Ei ( x ) ) ) ) dxdyi , where p ( yi|x ) is the probability mass function of the binary label yi given x , characterized by P ( yi = 1|x ) = E ( yi|x ) and P ( yi = 0|x ) = 1− E ( yi|x ) . Let ∂Lsup , i ∂σ ( Ei ( x ) ) = ∫ p ( x ) p ( yi|x ) ( yi 1 σ ( Ei ) ( 1− σ ( Ei ) ) − 1 1− σ ( Ei ) ) dxdyi = 0 . Then we know that E∗i ( x ) = σ −1 ( E ( yi|x ) ) = σ−1 ( ξi ) minimizes Lsup , i . Consider the L2 loss Lsup , i ( φ ) = E ( x , y ) [ Ēi ( x ) − yi ] 2 = ∫ p ( x ) p ( yi|x ) ‖Ei ( x ) − yi‖2dxdyi . Let ∂Lsup , i ∂Ei ( x ) = 2 ∫ p ( x ) p ( yi|x ) ( Ei ( x ) − yi ) dxdyi = 0 . Then we know that E∗i ( x ) = E ( yi|x ) = ξi minimizes Lsup , i in this case . On the other hand , by Assumption 1 there exists β0 = ( f0 , h0 , A0 ) such that pξ = pβ0 . Then the distribution of E∗ ( x ) is given by pβ∗ with β∗ = ( g ◦ f0 , h0 , A0 ) . Assumption 2 ensures that there is no β′ = ( f ′ , h′ , A′ ) such that A′ ∕= A0 but pβ′ = pβ∗ . Let F ∗ = Fβ∗ . Further due to the infinite capacity of G , we have the distribution family of pG , F∗ ( x , z ) contains qE∗ ( x , z ) . Then by minimizing the loss in ( 6 ) over G , we can find G∗ such that pG∗ , F∗ ( x , z ) matches qE∗ ( x , z ) and thus Lgen ( E∗ , G∗ , F ∗ ) reaches 0 . Hence minimizing L = Lgen +λLsup , which is the DEAR formulation ( 6 ) , leads to the solution with E∗i ( x ) = gi ( ξi ) with gi ( ξi ) = σ −1 ( ξi ) if CE loss is used , and gi ( ξi ) = ξi if L2 loss is used , and the true binary adjacency matrix . For a stochastic encoder , we establish the disentanglement of its deterministic part as above , and follow Definition 1 to obtain the desired result . A.3 PROOF OF LEMMA 1 We follow the same proof scheme as in Shen et al . ( 2020 ) where the only difference lies in the gradient wrt the prior parameter β . To make this paper self-contained , we restate some proof steps here using our notations . Let ‖ · ‖ denote the vector 2-norm . For a scalar function h ( x , y ) , let ∇xh ( x , y ) denote its gradient with respect to x . For a vector function g ( x , y ) , let ∇xg ( x , y ) denote its Jacobi matrix with respect to x . Given a differentiable vector function g ( x ) : Rk → Rk , we use ∇ · g ( x ) to denote its divergence , defined as ∇ · g ( x ) : = k∑ j=1 ∂ [ g ( x ) ] j ∂ [ x ] j , where [ x ] j denotes the j-th component of x . We know that ∫ ∇ · g ( x ) dx = 0 for all vector function g ( x ) such that g ( ∞ ) = 0 . Given a matrix function w ( x ) = ( w1 ( x ) , . . . , wl ( x ) ) : Rk → Rk×l where each wi ( x ) , i = 1 . . . , l is a k-dimensional differentiable vector function , its divergence is defined as ∇ · w ( x ) = ( ∇ · w1 ( x ) , . . . , ∇ · wl ( x ) ) . To prove Lemma 1 , we need the following lemma which specifies the dynamics of the generator joint distribution pg ( x , z ) and the encoder joint distribution pe ( x , z ) , denoted by pθ ( x , z ) and pφ ( x , z ) here . Lemma 2 . Using the definitions and notations in Lemma 1 , we have ∇θpθ , β ( x , z ) = −∇xpθ , β ( x , z ) ⊤gθ ( x ) − pθ , β ( x , z ) ∇ · gθ ( x ) , ( 8 ) ∇φqφ ( x , z ) = −∇zqφ ( x , z ) ⊤eφ ( z ) − qφ ( x , z ) ∇ · eφ ( z ) , ( 9 ) ∇βpθ , β ( x , z ) = ∇xpθ , β ( x , z ) ⊤f̃β ( x ) −∇zpθ , β ( x , z ) ⊤fβ ( z ) − pθ , β ( x , z ) ∇ · ( f̃β ( x ) fβ ( z ) ) , ( 10 ) for all data x and latent variable z , where gθ ( Gθ ( z , $ ) ) = ∇θGθ ( z , $ ) , eφ ( Eφ ( x , $ ) ) = ∇φEφ ( x , $ ) , fβ ( Fβ ( $ ) ) = ∇βFβ ( $ ) , and f̃β ( G ( Fβ ( $ ) ) ) = ∇βG ( Fβ ( $ ) ) . Proof of Lemma 2 . We only prove ( 10 ) which is the distinct part from Shen et al . ( 2020 ) . Let l be the dimension of parameter β . To simplify notation , let random vector Z = Fβ ( $ ) and X = G ( Z ) ∈ Rd and Y = ( X , Z ) ∈ Rd+k , and let p be the probability density of Y . For each i = 1 , . . . , l , let ∆ = δei where ei is a l-dimensional unit vector whose i-th component is one and all the others are zero , and δ is a small scalar . Let Z ′ = Fβ+δ ( $ ) , X ′ = G ( Z ′ ) and Y ′ = ( X ′ , Z ′ ) so that Y ′ is a random variable transformed from Y by Y ′ = Y + ( f̃β ( X ) fβ ( Z ) ) ∆+ o ( δ ) . Let p′ be the probability density of Y ′ . For an arbitrary y′ = ( x′ , z′ ) ∈ Rd+k , let y′ = y + ( f̃β ( x ) fβ ( z ) ) ∆+ o ( δ ) and y = ( x , z ) . Then we have p′ ( y′ ) = p ( y ) | det ( dy′/dy ) |−1 = p ( y ) | det ( Id + ( ∇f̃β ( x ) , ∇fβ ( z ) ) ⊤∆+ o ( δ ) ) |−1 = p ( y ) ( 1 +∆⊤∇ · ( f̃β ( x ) , fβ ( z ) ) ⊤ + o ( δ ) ) −1 = p ( y ) ( 1−∆⊤∇ · ( f̃β ( x ) , fβ ( z ) ) ⊤ + o ( δ ) ) = p ( y ) −∆⊤p ( y′ ) ∇ · ( f̃β ( x′ ) , fβ ( z′ ) ) ⊤ + o ( δ ) = p ( y′ ) −∆⊤ ( f̃β ( x′ ) , fβ ( z′ ) ) ·∇x′p ( x′ , z ) −∆⊤p ( y′ ) ( ∇ · f̃β ( x′ ) , ∇ · fβ ( z′ ) ) ⊤ + o ( δ ) . Since y′ is arbitrary , above implies that p′ ( x , z ) = p ( x , z ) −∆⊤ ( f̃β ( x ) , fβ ( z ) ) · ( ∇xp ( x , z ) , ∇zp ( x , z ) ) ⊤ ·∇xp ( x , z ) −∆⊤p ( x , z ) ( ∇ · f̃β ( x′ ) , ∇ · fβ ( z′ ) ) ⊤ + o ( δ ) for all x ∈ Rd , z ∈ Rk and i = 1 , . . . , l , leading to ( 10 ) by taking δ → 0 , and noting that p = pβ and p′ = pβ+∆ . Similarly we can obtain ( 8 ) and ( 9 ) . Proof of Lemma 1 . Recall the objective DKL ( q , p ) = ∫ q ( x , z ) log ( p ( x , z ) /q ( x , z ) ) dxdz . Denote its integrand by ℓ ( q , p ) . Let ℓ′2 ( q , p ) = ∂ℓ ( q , p ) /∂p . We have ∇βℓ ( q ( x , z ) , p ( x , z ) ) = ℓ′2 ( q ( x , z ) , p ( x , z ) ) ∇βpθ , β ( x , z ) where ∇βpθ , β ( x , z ) is computed in Lemma 2 . Besides , we have ∇x · [ ℓ′2 ( q , p ) p ( x , z ) f̃β ( x ) ] = ℓ′2 ( q , p ) p ( x , z ) ∇ · f̃β ( x ) + ℓ′2 ( q , p ) ∇xp ( x , z ) · f̃β ( x ) +∇xℓ′2 ( q , p ) p ( x , z ) f̃β ( x ) , ∇z · [ ℓ′2 ( q , p ) p ( x , z ) fβ ( z ) ] = ℓ′2 ( q , p ) p ( x , z ) ∇ · fβ ( z ) + ℓ′2 ( q , p ) ∇p ( x , z ) · fβ ( z ) +∇ℓ′2 ( q , p ) p ( x , z ) fβ ( z ) . Thus , ∇βLgen = ∫ ∇βℓ ( q ( x , z ) , p ( x , z ) ) dxdz = ∫ p ( x , z ) [ ∇xℓ′2 ( q , p ) f̃β ( x ) +∇zℓ′2 ( q , p ) fβ ( z ) ] where we can compute ∇xℓ′2 ( q , p ) = s ( x , z ) ∇xD ( x , z ) and ∇xℓ′2 ( q , p ) = s ( x , z ) ∇zD ( x , z ) . Hence ∇βLgen = −E ( x , z ) ∼p ( x , z ) [ s ( x , z ) ( ∇xD ( x , z ) ⊤f̃β ( x ) +∇zD ( x , z ) ⊤fβ ( z ) ) ] = −E ' [ s ( x , z ) ( ∇xD ( x , z ) ⊤∇βG ( Fβ ( $ ) ) +∇zD ( x , z ) ⊤∇βFβ ( $ ) ) | x=G ( Fβ ( ' ) ) z=Fβ ( ' ) ] . where the second equality follows reparametrization . Lemma 3 . For any a , b ∈ R ( a < b ) , the set of continuous piece-wise linear function P is dense in C [ a , b ] where the metric d ( f , g ) = supx∈ [ a , b ] |f ( x ) − g ( x ) | . Note that P is defined as P = ∪h∈ { ( b−a ) /n|n∈N+ } Ph Ph = k + ( b−a ) /h−1∑ i=0 wi ( x− a− ih ) 1 ( x ≥ a+ ih ) ∣∣∣∣wi , k ∈ R , where [ · ] here is floor function . Proof . Since [ a , b ] is compact , any function f ∈ C [ a , b ] is uniform continuous , i.e. , ∀ $ > 0 , there exists δ > 0 such that |x− y| < δ =⇒ |f ( x ) − f ( y ) | < $ /2 . Let [ a , b ] = ∪N−1n=0 [ an , bn ] , and gn ( x ) be a linear function , such that an = a+ nh , bn = a+ ( n+ 1 ) h , gn ( an ) = f ( an ) , gi ( bn ) = f ( bn ) , Nh = b− a . Assume that h < δ . For any x ∈ [ an , bn ] , we have |f ( x ) − gi ( x ) | ≤ min { |f ( x ) − f ( an ) |+ |gi ( x ) − gi ( an ) | , |f ( x ) − f ( bn ) |+ |gi ( x ) − gi ( bn ) | } ≤ |gi ( an ) − gi ( bn ) |+min { |f ( x ) − f ( an ) | , |f ( x ) − f ( bn ) | } ≤ |f ( an ) − f ( bn ) |+min { |f ( x ) − f ( an ) | , |f ( x ) − f ( bn ) | } < $ . Thus , sup x∈ [ an , bn ] |f ( x ) − gn ( x ) | < $ . We define g ( x ) = N−1∑ n=1 gn ( x ) 1 ( x ∈ [ an , bn ] ) which is obvious that g ( x ) ∈ Ph ⊂ P . And we have sup x∈ [ a , b ] |f ( x ) − g ( x ) | < $ Therefore , P is dense in C [ a , b ] and Ph is $ -dense . APPENDIX B LEARNING THE STRUCTURE As mentioned in Section 4.1 , our DEAR algorithm requires the prior knowledge on the super-graph of the true graph over the underlying factors of interests . The experiments shown in the main text are all based on the assumption that the true graph is given . In this section we investigate the performance of the learned weighted adjacency matrix and present an ablation study on different extents of prior knowledge on the structure . B.1 GIVEN THE TRUE GRAPH Figure 5 shows the learned weighted adjacency matrices when the true binary structure is given , whose weights show sensible signs and scalings consistent with common knowledge . For example , smile and its effect mouth open are positively correlated . The corresponding element in the weighted adjacency A03 of ( a ) turns out positive , which makes sense . Also gender ( the logit of male ) and its effect make up are negatively correlated . Then A13 of ( b ) turns out negative . B.2 GIVEN THE TRUE CAUSAL ORDERING Consider the Pendulum dataset , whose ground-truth structure is given in Figure 2 ( a ) . Consider a causal ordering pendulum angle , light angle , shadow position , shadow length , given which we start with a full graph whose elements are randomly initialized around 0 as shown in Figure 6 ( a ) . Figure 6 presents the adjacency matrices learned by DEAR at different training epochs , from which we see that it eventually obtains the learned structure that nearly coincides with the one learned given the true graph shown in Figure 5 ( c ) . This experiment shows the potential of DEAR to incorporate structure learning methods to learn the latent causal structure from scratch , which will be explored in future research . APPENDIX C IMPLEMENTATION DETAILS In this section we state the details of experimental setup and the network architectures used for all experiments . Preprocessing and hyperparameters . We pre-process the images by taking a center crops of 128 × 128 for CelebA and resizing all images in CelebA and Pendulum to the 64 × 64 resolution . We adopt Adam with β1 = 0 , β2 = 0.999 , and a learning rate of 1× 10−4 for D , 5× 10−5 for E , G and F , and 1 × 10−3 for the adjacency matrix A . We use a mini-batch size of 128 . For adversarial training in Algorithm 1 , we train the D once on each mini-batch . The coefficient λ of the supervised regularizer is set to 5 . We use CE supervised loss for both CelebA with binary observations of the underlying factors and Pendulum with bounded continuous observations . Note that L2 loss works comparable to CE loss on Pendulum . In downstream tasks , for BGMs with an encoder , we train a two-level MLP classifier with 100 hidden nodes using Adam with a learning rate of 1× 10−2 and a mini-batch size of 128 . Models were trained for around 150 epochs on CelebA and 600 epochs on Pendulum on NVIDIA RTX 2080 Ti . Network architectures . We follow the architectures used in Shen et al . ( 2020 ) . Specifically , for such realistic data , we adopt the SAGAN ( Zhang et al. , 2019 ) architecture for D and G. The D network consists of three modules as shown in Figure 7 and detailed described in ( Shen et al. , 2020 ) . Details for newtork G and Dx are given in Figure 7 and Table 3 . The encoder architecture is the ResNet50 ( He et al. , 2016 ) followed by a 4-layer MLP of size 1024 . Implementation of the SCM . Recall the nonlinear SCM as the prior Z = f ( ( I −A⊤ ) −1h ( $ ) ) : = Fβ ( $ ) . We find Gaussians are expressive enough as unexplained noises , so we set h as the identity mapping . As mentioned in Section 4.1 we require the invertibility of f . We implement both linear and nonlinear ones . For a linear f , we formally refer to f ( z ) = Wz + b , where W and b are learnable weights and biases . Note that W is a diagonal matrix to model the element-wise transformation . Its inverse function can be easily computed by f−1 ( z ) = W−1 ( z − b ) . For a non-linear f , we use piece-wise linear functions defined by f ( i ) ( z ( i ) ) = w ( i ) 0 z ( i ) + Na∑ t=1 w ( i ) t ( z ( i ) − ai ) 1 ( z ( i ) ≥ ai ) + b ( i ) where · ( i ) denote the i-th dimension of a vector or a vector-function , a0 < a1 < · · · < aNa are points of division , and 1 ( · ) is the indicator function . From its denseness shown in lemma 3 , the family of such piece-wise linear functions is expressive enough to model general element-wise nonlinear invertible transformations . Experimental details for baseline methods . We reproduce the S-VAEs including S-VAE , S-βVAE and S-TCVAE using E and G with the same architecture as ours and adopt the same optimization algorithm for training . The coefficient for the independence regularizer is set to 4 since we notice that setting a larger independence regularizer hurts disentanglement in the correlated case . For the supervised regularizer , we use λ = 1000 for a balance of generative model and supervision . The ERM ResNet is trained using the same optimizer with a learning rate of 1× 10−4 . APPENDIX D ADDITIONAL RESULTS OF CAUSAL CONTROLLABLE GENERATION In this section we present more qualitative results of causal controllable generation on two datasets using DEAR and baseline methods , including S-VAEs ( Locatello et al. , 2020b ) and CausalGAN ( Kocaoglu et al. , 2018 ) . We consider three underlying structures on two datasets : Pendulum in Figure 2 ( a ) , CelebA-Smile in Figure 2 ( b ) , and CelebA-Attractive in Figure 2 ( c ) .
This paper presents a latent variable model where the variables in the latent space are causally disentangled, i.e. the disentanglement is ensured according to a structural causal model (SCM). The resulting model is made up of two parts. The first one, a generative unsupervised part, is essentially a VAE and is defined with the VAE ELBO loss. The second part is supervised and accounts for the causal disentanglement of the factors that are assumed to underlie the distribution; the authors claim the fewer supervised samples are required to estimate the second part of the loss alone. The two parts are then combined with a hyperparameter.
SP:f2f1c3e0201395340e06f5873299639a8f4d16ee
Parameterized Pseudo-Differential Operators for Graph Convolutional Neural Networks
1 INTRODUCTION . Convolutional neural networks have performed incredibly well on tasks such as image classification , segmentation , and object detection ( Khan et al. , 2020 ) . While there have been diverse architectural design innovations leading to improved accuracies across these tasks , all of these tasks share the common property that they operate on structured Euclidean domain inputs . A growing body of research on how to transfer these successes into non-Euclidean domains , such as manifolds and graphs , has followed . We focus on unstructured graphs which represent discretizations of an underlying metric space . These data types are ubiquitous in computational physics , faceted surface meshes , and ( with superpixel conversion ) images . Previous efforts to extend CNNs to this type of data have involved parameterized function approximations on localized neighborhoods , such as MoNet ( Monti et al. , 2017 ) and SplineCNN ( Fey et al. , 2017 ) . These function approximations ( Gaussian mixture models in the case of MoNet and B-spline kernels in the case of SpineCNN ) are complex and relatively expensive to calculate compared to CNN kernels . Inspired by earlier work in shape correspondence ( Boscaini et al. , 2016 ) , image segmentation on the unit sphere ( Jiang et al. , 2019 ) , and low-dimensional embeddings of computational physics data ( Tencer & Potter , 2020 ) we seek to utilize parameterized differential operators ( PDOs ) to construct convolution kernels . In contrast to MoNet and SpineCNN , parameterized differential operators are cheap to compute and involve only elementary operations . Boscaini et al . ( 2016 ) used anisotropic diffusion kernels while Jiang et al . ( 2019 ) included gradient operators in addition to an isotropic diffusion operator . Tencer & Potter ( 2020 ) performed an ablation study of the differential operators used and demonstrated that the including the gradient operators is broadly beneficial , but that little is gained by including additional terms . Prior work ( Jiang et al. , 2019 ; Tencer & Potter , 2020 ) has used differential operators precomputed for specific meshes . This approach has two drawbacks : ( 1 ) precomputing operators is not practical for datasets for which the connectivity graph varies between sample points , and ( 2 ) differential operators place restrictions on graph connectivity . Differential operators defined for mesh topologies rely on element connectivity information which is unavailable for more general graphs . Superpixel image datasets highlight both of these deficiencies . In contrast to these prior works , we do not precompute any operators and we do not directly use differential operators . Instead , we formulate pseudo-differential operators which are cheaply computed at run-time for a more general class of graphs . While our approach only applies to graphs with relative position information for each node , the set of graphs with the required positional information is large , encompassing nearly all physical systems as well as a significant number of other graphs , such as graph representations derived from image data . Since our method relies on computing approximate spatial derivatives of nodal features , it is also important that these nodal values represent a meaningfully changing field . This criteria is not necessarily met for the node correspondence task on the FAUST dataset or the shape classification task on the ModelNet10 dataset and a corresponding decrease in performance is observed . In contrast , nodal features are critical to superpixel image classification tasks and our method is observed to perform well for these datasets . Superpixel representations are popular for a wide range of tasks , particularly tasks in which large data quantities make the direct application of CNNs to the raw data impractical , such as hyperspectral imaging ( Hong et al. , 2020 ) and medical diagnostics ( Roth et al. , 2015 ) . For these applications , the superpixel representation serves as a sort of context aware lossy compression . Knyazev et al . ( 2019 ) compared GCNs applied to superpixel images to CNNs applied to low resolution images with approximately the same information content . In those cases , the graph methods not only held their own , but pulled ahead compared to the CNN performance . While those datasets were not at all pushing the limitations of image size , they indicate a possibility that superpixel methods might handle high resolution image data more efficiently and the value in developing methods that perform well on superpixel datasets . Our method is especially well-suited for analyzing superpixel image representations in addition to being applicable to the datasets used by Jiang et al . ( 2019 ) and Tencer & Potter ( 2020 ) to demonstrate their PDO-based approaches . For regular meshes , such as the icosahedral spherical mesh used by Jiang et al . ( 2019 ) , our pseudo-differential operators closely approximate the differential operators used in those works . 1.1 OUR CONTRIBUTIONS . We created a novel layer architecture inspired by PDOs . • We improve upon the static matrix approach of Tencer & Potter ( 2020 ) with a dynamic method that enables support for variable graph forms and eliminates the need to precompute matrices . • Our method utilizes pseudo-differential operators in contrast to the differential operators used in prior works . Pseudo-differential operators are cheap to compute and are applicable to a broader class of graphs than differential operators . • Our novel mixing layer is conceptually simple and easy to code ( integrating painlessly with existing graph libraries ) . ( section 3.1 ) • The new approach remains accurate for both sparsely and densely connected graphs , including state-of-the-art results for the MNIST superpixel 75 dataset both with and without reduced edge connection input data . ( section 4.1 ) • The new approach is faster than common approaches for equivalent numbers of features owing to the simpler mathematical functions involved . ( section 4.1.2 ) 2 PROBLEM . Many real world datasets may be treated as attributed graphs with positional information provided for the nodes or relative positional information provided for the edges . In physics and engineer- ing , high-fidelity simulation tools represent continuous spatial functions using unstructured spatial discretizations . In computer vision , triangle surface meshes and super pixel image representations are common . Tencer & Potter ( 2020 ) have recently used convolutional autoencoder architectures with PDOs to perform manifold learning on datasets from computational physics . Their approach required precomputing matrices corresponding to various differential operators on a sequence of progressively coarser meshes . We sought to generalize their approach to support heterogeneous graphs without explicitly defined gradient operators and to avoid the need to precompute matrices or coarsened spatial discretizations . Our ideal solution , would be fast , simple , scale well , make efficient use of information , and operate effectively on sparsely connected graphs . While there are a number of existing approaches that will work for arbitrary graph information , all have some form of limitation that makes them ill suited for our use cases . Whether ignoring graph connectivity information ( Gray et al. , 2020 ) , non-existent use of position information ( Kipf & Welling , 2016 ; Berg et al. , 2017 ) , or complex formulations ( Fey et al. , 2017 ; Monti et al. , 2017 ) , each has some weakness that made its use less than ideal . 3 METHOD . Our layer works by calculating several quantities that are analogous to the sets of differential operators used in Tencer & Potter ( 2020 ) . For each node of a layer , each input channel has multiple values calculated ( 4 items for 2-dimensional and 5 for 3-dimensional graphs ) : • Value of the node in the prior layer ( identity ) • Average values at the 1-ring neighbors of the node • Average gradient components ( i.e . ∂∂x , ∂ ∂y ) of value along each connected edge weighted by inverse edge length These items are then mixed by a neural network yielding the desired number of output channels . 3.1 NOVEL LAYER . In contrast to previous methods utilizing PDOs , the method presented here generalizes to heterogeneous datasets , in which the number of nodes , the connectivity , and positions vary across samples . Additionally , by relaxing the definitions of the gradient operators , our implementation is applicable to overconnected graphs ( such as superpixel image representations ) rather than only meshes suitable for common PDE solution methods ( finite element , finite volume , etc. ) . A consequence of this generalization is slightly more computational overhead from dynamically generating the required operators on the fly rather than precomputing them offline . However , as seen in Figure 1 , this overhead does not result in slower training time relative to other methods . The key components of Tencer & Potter ( 2020 ) ’ s approach were the sparse matrix mixing , pooling , and interpolation . In our implementation of the mixing layer , we used pytorch-geometric ’ s MessagePassing base class Fey & Lenssen ( 2019 ) . For pooling layers , we evaluated two of pytorch-geometric ’ s clustering method implementations : voxel_grid and graclus ( Dhillon et al. , 2007 ; Simonovsky & Komodakis , 2017 ) . Their voxel_grid implementation gave the best accuracy on the MNIST superpixel dataset . The MessagePassing class operates by calculating new values for each node i on layer ( k ) with information from their prior node values x ( k−1 ) i , prior values at connected nodes x ( k−1 ) j , and/or the edge attributes ei , j . x ( k ) i = γ ( k ) ( x ( k−1 ) i , j∈N ( i ) φ ( k ) ( x ( k−1 ) i , x ( k−1 ) j , ei , j ) ) ( 1 ) j∈N ( i ) is an aggregation method ( such as mean ) that aggregates φ ( k ) for each node j connected to node i in layer ( k−1 ) into a specific number of values independent of the number of connections . φ ( k ) and γ ( k ) are arbitrary functions . Convenient and physically motivated choices for φ ( k ) are derived from mesh differential operators , e.g . I , ∇ , or ∆ . The identity operator I simply passes the value forward . For the others , let f : Ω→ R be a smooth scalar function for which only the values f1 , . . . , fn at the nodes are known and fi corresponds to the value of f at node i . The Laplacian operator ∆ may be expressed as the difference between fi and the average value of fj , j ∈ N ( i ) . For triangle meshes , the nodal gradient operator ∇ is often expressed as the average gradient in the adjacent facets which is equivalent to a weighted sum over the connected edge gradients ∇fi ≈ ∑ vj∈N ( i ) wi , j∇f ( ei , j ) . ( 2 ) with ∇f ( ei , j ) = fi−fjri , j êi , j . We denote the Euclidean distance between the two nodes as ri , j , and the unit vector oriented along the edge ei , j as êi , j . For a 2D mesh without intersecting edges wi , j = Ai , j∑ j∈N ( i ) Ai , j , where Ai , j is the total area of the 2 facets connected to ei , j ( Mancinelli et al. , 2019 ) . For an overconnected graph ( like MNIST superpixel ) , these facet areas are not defined . If we weight the contributions of each edge equally , our choice for φ ( k ) becomes ( x ( k−1 ) i − x ( k−1 ) j ) rx , i , j r2i , j , ( x ( k−1 ) i − x ( k−1 ) j ) ry , i , j r2i , j , x ( k−1 ) j , ( 3 ) where rx , i , j and ry , i , j are the differences in positions of nodes i and j in the x- and y-dimensions , respectively . We can easily extend these to 3 dimensions ( which was required for the FAUST dataset ) by adding a z term , in which case , the parameter cost per channel goes up by only a factor of 25 % . φ ( k ) returns a stack of these values for every input channel . The first 2 terms of equation 3 are xand y-components of the gradient . The 3rd term is the average of the neighboring nodes , which , when combined with the identity term x ( k−1 ) i ( which is concatenated after aggregation ) results in the Laplacian . Given that the next step in the layer is to mix these components via a neural network ( our γ ( k ) function ) , the Laplacian can be reconstructed by blending these terms if desirable . Note that none of these values require complex calculations , which contributes to the layer ’ s superior computational performance ( section 4.1.2 ) . We hypothesize that by limiting the representational space for each node such that it knows only about itself and the local gradient the network is forced to find simpler representations that are more likely to generalize .
The paper defines simple differential operators at nodes in a graph (gradient, Laplacian) and uses them in the proposed graph convolutional layer. The claim is that simple operators will limit the representation power of the layer leading to better generalization. While this might be true at some level, it goes against the trends in deep learning which move away from such predefined constraints on the representation power of models.
SP:829267dac365b8cdd66c0188da58602135a0c4b9
Image GANs meet Differentiable Rendering for Inverse Graphics and Interpretable 3D Neural Rendering
1 INTRODUCTION . The ability to infer 3D properties such as geometry , texture , material , and light from photographs is key in many domains such as AR/VR , robotics , architecture , and computer vision . Interest in this problem has been explosive , particularly in the past few years , as evidenced by a large body of published works and several released 3D libraries ( TensorflowGraphics by Valentin et al . ( 2019 ) , Kaolin by J. et al . ( 2019 ) , PyTorch3D by Ravi et al . ( 2020 ) ) . The process of going from images to 3D is often called “ inverse graphics ” , since the problem is inverse to the process of rendering in graphics in which a 3D scene is projected onto an image by taking into account the geometry and material properties of objects , and light sources present in the scene . Most work on inverse graphics assumes that 3D labels are available during training ( Wang et al. , 2018 ; Mescheder et al. , 2019 ; Groueix et al. , 2018 ; Wang et al. , 2019 ; Choy et al. , 2016 ) , and trains a neural network to predict these labels . To ensure high quality 3D ground-truth , synthetic datasets such as ShapeNet ( Chang et al. , 2015 ) are typically used . However , models trained on synthetic datasets often struggle on real photographs due to the domain gap with synthetic imagery . To circumvent these issues , recent work has explored an alternative way to train inverse graphics networks that sidesteps the need for 3D ground-truth during training . The main idea is to make ∗indicates equal contribution . graphics renderers differentiable which allows one to infer 3D properties directly from images using gradient based optimization , Kato et al . ( 2018 ) ; Liu et al . ( 2019b ) ; Li et al . ( 2018 ) ; Chen et al . ( 2019 ) . These methods employ a neural network to predict geometry , texture and light from images , by minimizing the difference between the input image with the image rendered from these properties . While impressive results have been obtained in Liu et al . ( 2019b ) ; Sitzmann et al . ( 2019 ) ; Liu et al . ( 2019a ) ; Henderson & Ferrari ( 2018 ) ; Chen et al . ( 2019 ) ; Yao et al . ( 2018 ) ; Kanazawa et al . ( 2018 ) , most of these works still require some form of implicit 3D supervision such as multi-view images of the same object with known cameras . Thus , most results have been reported on the synthetic ShapeNet dataset , or the large-scale CUB ( Welinder et al. , 2010 ) bird dataset annotated with keypoints from which cameras can be accurately computed using structure-from-motion techniques . On the other hand , generative models of images appear to learn 3D information implicitly , where several works have shown that manipulating the latent code can produce images of the same scene from a different viewpoint ( Karras et al. , 2019a ) . However , the learned latent space typically lacks physical interpretation and is usually not disentangled , where properties such as the 3D shape and color of the object often can not be manipulated independently . In this paper , we aim to extract and disentangle 3D knowledge learned by generative models by utilizing differentiable graphics renderers . We exploit a GAN , specifically StyleGAN ( Karras et al. , 2019a ) , as a generator of multi-view imagery to train an inverse graphics neural network using a differentiable renderer . In turn , we use the inverse graphics network to inform StyleGAN about the image formation process through the knowledge from graphics , effectively disentangling the GAN ’ s latent space . We connect StyleGAN and the inverse graphics network into a single architecture which we iteratively train using cycle-consistency losses . We demonstrate our approach to significantly outperform inverse graphics networks on existing datasets , and showcase controllable 3D generation and manipulation of imagery using the disentangled generative model . 2 RELATED WORK . 3D from 2D : Reconstructing 3D objects from 2D images is one of the mainstream problems in 3D computer vision . We here focus our review to single-image 3D reconstruction which is the domain of our work . Most of the existing approaches train neural networks to predict 3D shapes from images by utilizing 3D labels during training , Wang et al . ( 2018 ) ; Mescheder et al . ( 2019 ) ; Choy et al . ( 2016 ) ; Park et al . ( 2019 ) . However , the need for 3D training data limits these methods to the use of synthetic datasets . When tested on real imagery there is a noticeable performance gap . Newer works propose to differentiate through the traditional rendering process in the training loop of neural networks , Loper & Black ( 2014 ) ; Kato et al . ( 2018 ) ; Liu et al . ( 2019b ) ; Chen et al . ( 2019 ) ; Petersen et al . ( 2019 ) ; Gao et al . ( 2020 ) . Differentiable renderers allow one to infer 3D from 2D images without requiring 3D ground-truth . However , in order to make these methods work in practice , several additional losses are utilized in learning , such as the multi-view consistency loss whereby the cameras are assumed known . Impressive reconstruction results have been obtained on the synthetic ShapeNet dataset . While CMR by Kanazawa et al . ( 2018 ) and DIB-R by Chen et al . ( 2019 ) show real-image 3D reconstructions on CUB and Pascal3D ( Xiang et al. , 2014 ) datasets , they rely on manually annotated keypoints , while still failing to produce accurate results . A few recent works , Wu et al . ( 2020 ) ; Li et al . ( 2020 ) ; Goel et al . ( 2020 ) ; Kato & Harada ( 2019 ) , explore 3D reconstruction from 2D images in a completely unsupervised fashion . They recover both 3D shapes and camera viewpoints from 2D images by minimizing the difference between original and re-projected images with additional unsupervised constraints , e.g. , semantic information ( Li et al . ( 2020 ) ) , symmetry ( Wu et al . ( 2020 ) ) , GAN loss ( Kato & Harada ( 2019 ) ) or viewpoint distribution ( Goel et al . ( 2020 ) ) . Their reconstruction is typically limited to 2.5D ( Wu et al . ( 2020 ) ) , and produces lower quality results than when additional supervision is used ( Goel et al . ( 2020 ) ; Li et al . ( 2020 ) ; Kato & Harada ( 2019 ) ) . In contrast , we utilize GANs to generate multi-view realistic datasets that can be annotated extremely efficiently , which leads to accurate 3D results . Furthermore , our model achieves disentanglement in GANs and turns them into interpretable 3D neural renderers . Neural Rendering with GANs : GANs ( Goodfellow et al. , 2014 ; Karras et al. , 2019a ) can be regarded as neural renderers , as they take a latent code as input and “ render ” an image . However , the latent code is sampled from a predefined prior and lacks interpretability . Several works generate images with conditions : a semantic mask ( Zhu et al. , 2017 ) , scene layout Karacan et al . ( 2016 ) , or a caption ( Reed et al. , 2016 ) , and manipulate the generated images by modifying the input condition . Despite tremendous progress in this direction , there is little work on generating images through an interpretable 3D physics process . Dosovitskiy et al . ( 2016 ) synthesizes images conditioned on object style , viewpoint , and color . Most relevant work to ours is Zhu et al . ( 2018 ) , which utilizes a learnt 3D geometry prior and generates images with a given viewpoint and texture code . We differ in three important ways . First , we do not require a 3D dataset to train the 3D prior . Second , the texture in our model has 3D physical meaning , while Zhu et al . ( 2018 ) still samples from a prior . We further control background while Zhu et al . ( 2018 ) synthesizes objects onto white background . Disentangling GANs : Learning disentangled representations has been widely explored , Lee et al . ( 2020 ) ; Lin et al . ( 2019 ) ; Perarnau et al . ( 2016 ) . Representative work is InfoGAN Chen et al . ( 2016 ) , which tries to maximize the mutual information between the prior and the generated image distribution . However , the disentangled code often still lacks physical interpretability . Tewari et al . ( 2020 ) transfers face rigging information from an existing model to control face attribute disentanglement in the StyleGAN latent space . Shen et al . ( 2020 ) aims to find the latent space vectors that correspond to meaningful edits , while Härkönen et al . ( 2020 ) exploits PCA to disentangle the latent space . Parallel to our work , Zhang et al . ( 2021 ) ; Li et al . ( 2021 ) attempt to interpret the semantic meaning of StyleGAN latent space . In our work , we disentangle the latent space with knowledge from graphics . 3 OUR APPROACH . We start by providing an overview of our approach ( Fig . 1 ) , and describe the individual components in more detail in the following sections . Our approach marries two types of renderers : a GANbased neural “ renderer ” and a differentiable graphics renderer . Specifically , we leverage the fact that the recent state-of-the-art GAN architecture StyleGAN by Karras et al . ( 2019a ; b ) learns to produce highly realistic images of objects , and allows for a reliable control over the camera . We manually select a few camera views with a rough viewpoint annotation , and use StyleGAN to generate a large number of examples per view , which we explain in Sec . 3.1 . In Sec . 3.2 , we exploit this dataset to train an inverse graphics network utilizing the state-of-the-art differentiable renderer , DIBR by Chen et al . ( 2019 ) in our work , with a small modification that allows it to deal with noisy cameras during training . In Sec . 3.3 , we employ the trained inverse graphics network to disentangle StyleGAN ’ s latent code and turn StyleGAN into a 3D neural renderer , allowing for control over explicit 3D properties . We fine-tune the entire architecture , leading to significantly improved results . 3.1 STYLEGAN AS SYNTHETIC DATA GENERATOR . We first aim to utilize StyleGAN to generate multi-view imagery . StyleGAN is a 16 layers neural network that maps a latent code z ∈ Z drawn from a normal distribution into a realistic image . The code z is first mapped to an intermediate latent code w ∈ W which is transformed to w∗ = ( w∗1 , w ∗ 2 , ... , w ∗ 16 ) ∈ W ∗ through 16 learned affine transformations . We call W ∗ the transformed latent space to differentiate it from the intermediate latent space W . Transformed latent codes w∗ are then injected as the style information to the StyleGAN Synthesis network . Different layers control different image attributes . As observed in Karras et al . ( 2019a ) , styles in early layers adjust the camera viewpoint while styles in the intermediate and higher layers influence shape , texture and background . We provide a careful analysis of all layers in Appendix . We empirically find that the latent code w∗v : = ( w ∗ 1 , w ∗ 2 , w ∗ 3 , w ∗ 4 ) in the first 4 layers controls camera viewpoints . That is , if we sample a new code w∗v but keep the remaining dimensions of w ∗ fixed ( which we call the conten code ) , we generate images of the same object depicted in a different viewpoint . Examples are shown in Fig . 2 . We further observe that a sampled codew∗v in fact represents a fixed camera viewpoint . That is , if we keep w∗v fixed but sample the remaining dimensions of w ∗ , StyleGAN produces imagery of different objects in the same camera viewpoint . This is shown in columns in Fig . 2 . Notice how aligned the objects are in each of the viewpoints . This makes StyleGAN a multi-view data generator ! “ StyleGAN ” multi-view dataset : We manually select several views , which cover all the common viewpoints of an object ranging from 0-360 in azimuth and roughly 0-30 in elevation . We pay attention to choosing viewpoints in which the objects look most consistent . Since inverse graphics works require camera pose information , we annotate the chosen viewpoint codes with a rough absolute camera pose . To be specific , we classify each viewpoint code into one of 12 azimuth angles , uniformly sampled along 360 deg . We assign each code a fixed elevation ( 0◦ ) and camera distance . These camera poses provide a very coarse annotation of the actual pose – the annotation serves as the initialization of the camera which we will optimize during training . This allows us to annotate all views ( and thus the entire dataset ) in only 1 minute – making annotation effort neglible . For each viewpoint , we sample a large number of content codes to synthesize different objects in these views . Fig . 2 shows 2 cars , and a horse and a bird . Appendix provides more examples . Since DIB-R also utilizes segmentation masks during training , we further apply MaskRCNN by He et al . ( 2017 ) to get instance segmentation in our generated dataset . As StyleGAN sometimes generates unrealistic images or images with multiple objects , we filter out “ bad ” images which have more than one instance , or small masks ( less than 10 % of the whole image area ) .
This paper proposes to couple a GAN, an inverse graphics network, and a differentiable renderer. The authors base their work on StyleGAN, and use the observation that a specific part of the latent code corresponds to camera view-point to rapidly annotate a large amount of synthetic images with approximate camera pose. They then use these images and rough annotations to train the inverse graphics network to provide 3D and texture data. The differentiable renderer is used to synthesize 2D images from 3D, which can be compared to the input for consistency. In a second step, the authors use the inferred 3D data to disentangle the latent space of StyleGAN to allow to use it as a controllable renderer.
SP:31ecf3efa2c7a0276d2f8fc761d358cfeed6e98d
Self-supervised Contrastive Zero to Few-shot Learning from Small, Long-tailed Text data
1 INTRODUCTION . The current prevailing approach to supervised and few-shot learning is to use self-supervised pretraining on large-scale ‘ task-external ’ data and then fine-tune on end-task labels . Recent studies have found that , thus far , this way of pretraining fails in low-resource settings ( Yogatama et al. , 2019 ; Şerbetci et al. , 2020 ) and that reported performance improvements are caused in part by evaluation setups that are designed in line with the paradigm that “ massive resources are pivotal ” to improving language understanding ( Linzen , 2020 ; Schick & Schütze , 2020a ; Dodge et al. , 2020 ; Brown et al. , 2020 ) or computer vision ( Chen et al. , 2020 ) . Despite these critiques , the underlying goal of better initialisation of layer weights is a core requirement of successful learning with neural networks , where self-supervised layer-wise pretraining ( Bengio et al. , 2006 ) was replaced by better layer initialisation ( Glorot & Bengio , 2010 ) , which was in turn replaced by pretraining on growing amounts of external data ( Bojanowski et al. , 2017 ; Devlin et al. , 2019 ; Chen et al. , 2020 ; Brown et al. , 2020 ) – i.e . FastText , BERT , SIMCLR and GPT-3 . The latter three approaches require massive compute and data resources , but enable marked learning improvements in few-shot ( SIMCLR , GPT3 ) or zero-shot ( GPT-3 ) scenarios compared to models that have several orders of magnitude fewer parameters . There are efforts to reduce model size requirements for few and zero-shot adaptation by orders of magnitude ( Schick & Schütze , 2020a ; b ; Plank & Rethmeier , 2019 ) , with some being increasingly beneficial in scenarios with low input data ( X ) , label resources ( Y ) , and rare events in X , Y . Crucially , such approaches do not simply rely on more data , but on creating better initialised input features X . In contrast , approaches like SIMCLR or BERT ( Chen et al. , 2020 ; Devlin et al. , 2019 ) use self-supervision via contrastive learning and input masking on large-scale datasets to create broader learning signals than supervision provides . SIMCLR is based on a metric learning approach called contrastive self-supervision – i.e . learning to distinguish ( dis- ) similar inputs using generated , but weak supervision tasks . However , as Musgrave et al . ( 2020 ) find , “ when evaluating old vs. recent metric learning approaches , while controlling for data and model size , newer methods only marginally improve over the classic contrastive formulation ” . Remarkably , Bansal et al . ( 2020 ) recently showed that adding broader self-supervision rather than increasing data size during large-scale pretraining can substantially boost few-shot performance . Our central question is whether increased ( broader ) pretraining self-supervision also boosts few and zero-shot performance using only small-scale , ‘ task-internal ’ data , instead of resorting to largescale pretraining on orders of magnitude more ‘ task-external ’ data – i.e . Do we really need large datasets for pretraining or just more ( broader ) self-supervised learning signals ? To broaden small data self-supervision , we propose a contrastive self-supervised objective based on labelembedding prediction , where labels are expressed as word embeddings to learn their matching with an input text embedding . For contrastive learning , our method samples positive and negative word input tokens X for self-supervised pretraining , zero and few-shot learning ; and positive and negative classes Y for few-shot to fully supervised fine-tuning . Thus , we propose a model architecture that unifies training from labels Y and inputs X . To increase evaluation robustness , we compare models of the same parameter and data sizes as suggested by Musgrave et al . ( 2020 ) , and evaluate on a challenging learning problem as suggested by Linzen ( 2020 ) ; Hooker ( 2020 ) . Namely , we evaluate against a challenging low-resource , long-tailed , noisy multi-label data settings , where information is always limited , since the long tail grows with data size and because its modeling requires the majority of parameters ( Hooker et al. , 2020b ) . For robust evaluation , we use a typical training , development , test setup and first establish a solid , supervised baseline for many-class multi-label classification that is optimised with a set of generalisation techniques proposed by Jiang et al . ( 2020 ) . For evaluation in supervised , few and zero-shot learning scenarios , we analyse and propose evaluation metric choices which are meaningful across all scenarios for broader performance comparisons . Contributions : 1 We provide a straight-forward method for self-supervised contrastive labelembedding prediction and 2 evaluate it in a challenging , noisy long-tail , low-resource multi-label text prediction scenario . 3 We show that small-scale ‘ data-internal ’ pretraining ( on 8-80MB of text ) not only improves supervised performance , but also strongly boosts few and zero-shot learning by increasing self-supervision amounts for small data , rather than increasing data amounts via the standard large-scale external data pretraining approach . 2 RELATED WORK . Large to Web-scale data pretraining is at the core of state-of-the-art methods in computer vision ( Chen et al. , 2020 ) and language processing ( Rogers et al. , 2020 ; Brown et al. , 2020 ) . However , challenges and disadvantages are increasingly being discussed . ( i ) A requirement of large-scale external text data resources ( Yogatama et al. , 2019 ; Schick & Schütze , 2020a ) , ( ii ) an inability to pretrain recent architectures on small-scale data ( Liu et al. , 2020 ; Melis et al. , 2020 ; Şerbetci et al. , 2020 ) , ( iii ) calls for more challenging evaluation tasks ( Linzen , 2020 ; McCoy et al. , 2019 ) and ( iv ) diminishing returns of pretraining on large supervised datasets ( Wang et al. , 2020b ) . To address issue ( iii ) , challenging evaluations on long-tail prediction ( Chang et al. , 2019 ) , few-shot ( Schick & Schütze , 2020a ) , or zero-shot ( Brown et al. , 2020 ) , were recently shown to benefit from self-supervised pretraining , but to-date , require massive , ‘ task-external ’ , pretraining datasets . ( c ) Remarkably , Bansal et al . ( 2020 ) showed that for large ‘ data-external ’ pretraining , using more self-supervision , not more data , also boosts few-shot performance . This finding inspired us to collect evidence towards a core question : “ Do we need massive data ( signals ) or just more ( diverse ) self-supervised learning signals for pretraining ? ” . We collect evidence by posing three research questions and propose solutions that require designing approaches for issues ( i-iii ) as follows . One , to address issue ( i ) , “ can increasing self-supervision signals during ‘ data-internal ’ pretraining on small data , i.e . without large-scale ‘ data-external ’ pretraining , boost few and zero-shot performance ” ? Two , to address issue ( ii ) , “ what pretraining objectives and models do we chose that work without large training data ” ? Three , to address issue ( iii ) , “ within what challenging learning scenario should we evaluate while incorporating the now standard “ any NLP task as a ‘ text-to-text ’ problem ” paradigm ( Raffel et al. , 2020 ) ” ? Fortunately , existing techniques can be extended to address these issues . For example , supervised label embedding prediction ( pre- ) training enables few and zero-shot learning of subsequent ( unseen ) supervised tasks . However , this requires the first ( pre-training ) task to be supervised , unlike recent large scale self-supervised pretraining methods . Large-scale , self-supervised pretraining and label embeddings can be combined ( Chang et al. , 2019 ) to fine-tune externally pretrained BERT models via label embedding prediction to boost long-tail task performance . However , BERTs ’ contextualized word embeddings did not work as label embeddings ELMOs ’ word embeddings had to be used ( 3.2 ) , further increasing resource requirements . Even worse , when comparing language model pretraining on small text corpora , Transformers ( Wang et al. , 2020a ) largely underperform CNNs and LSTMs ( Merity et al. , 2017 ) . Fortunately , Liu et al . ( 2017 ) established that label-embedding prediction CNNs boost long-tail prediction , even without modern self-supervision or using large ‘ task-external ’ data pretraining . Further , Pappas & Henderson ( 2019 ) ; Zhang et al . ( 2018b ) used supervised text label-embedding ( pre- ) training and investigated transfer to subsequent supervised tasks , though not under long-tail evaluation . Here , label embeddings are average word embeddings over label description words – i.e . label descriptions are required . The former added noise contrastive estimation ( NCE ) ( Ma & Collins , 2018 ) via negative sampling of labels to zero-shot predict rare , unseen classes post supervised pretraining on seen classes . Later , Jiang et al . ( 2019 ) adapted the same idea for zero-shot image classification via supervised pretraining on pairs of ‘ source ’ images and ‘ source ’ text label descriptions . They reduced overfitting by additionally pretraining on pairs of ‘ source ’ image and most similar ‘ zero-shot target class ’ text descriptions – though this is not technically zero-shot learning because sensible target label text descriptions have to be provided , which when unknown ( zero-shot ) , again leads to the long-tail issue . All these approaches are loosely based on Matching Networks by Vinyals et al . ( 2016 ) and add various training objectives . We thus combine the advantages of self-supervised pretraining for large data with supervised label embedding prediction for smaller data to propose a contrastive self-supervised pretraining via label-embedding prediction usable for small data pretraining . We extend the supervised label embedding baseline method by Zhang et al . ( 2018b ) and add four important changes . First , we combine label and word embedding look-up tables into one table , as this pushes input words and label ( -words ) to remain in a shared vector space during training , when predicting dense label ( -word ) embeddings from dense input word embeddings . This ‘ dense-to-dense ’ prediction of words to label ( -words ) follows the current “ any NLP task as a ‘ text-to-text ’ prediction ” paradigm ( Raffel et al. , 2020 ) , but avoids constant dense-to-sparse translation into label distributions via a compute intensive softmax . Secondly , we thus use a noise contrastive estimation ( NCE ) objective ( Ma & Collins , 2018 ) , replacing softmax normalization with negative sampling of ( supervision ) labels . Combining NCE and label embeddings allows predicting arbitrarily large class set ( long-tails ) and unseen classes . While Pappas & Henderson ( 2019 ) used NCE for supervised label pretraining , we add self-supervised pseudo-label ( word ) pretraining . Because labels and input words occupy the same vector space , we can use pseudo-labels ( words ) for self-supervised pretraining by sampling positive words from a current text instance , and negative words from adjacent text instances within a mini-batch . Three , we chose to sample from within a batch to reduce reliance ( training bias ) on knowing or expecting future and past word or label distribution statistics for the whole dataset , since in a zero-shot evaluation scenario unseen label and input word statistics are unknown . This also adds subsequent learning flexibility because no statistics collection preprocessing is required . Fourth , we add k-max pooling as in the CNN long-tail research by Liu et al . ( 2017 ) , because it helps during zero-shot learning . Such label-embedding based self-supervised pretraining has multiple advantages . It does not require large or external resources as in ( i ) . Its small ‘ data-internal ’ self-supervised word pseudo label pretraining addresses issue ( ii ) and enables unsupervised zero-shot learning . It also markedly boosts few-shot performance without requiring task external supervised annotations as in ( i ) or supervised embedding transfer as in Pappas & Henderson ( 2019 ) ; Zhang et al . ( 2018b ) ; Jiang et al . ( 2019 ) . Since label embeddings are a common long-tail prediction technique , which addresses issue ( iii ) , it makes our approach suitable for low-resource , long-tail learning without task external labels or large-scale annotated datasets . Finally , label embedding NCE training allows for ( dense ) ‘ text-totext ’ training , making it applicable to a variety of tasks . We demonstrate the benefits of such a selfsupervised pretraining method and model for self-supervised zero-shot learning ( inputX-efficiency ) §6.4 or few-shot learning ( label Y -efficiency ) §6.3 . coded by the same word embedding layer E 1 , where labels have word IDs for lookup . The text embeddings are then encoded by a sequence encoder T 2 , while c labels are encoded by a label encoder L 3 . Each text has multiple labels , so the text encoding ti is repeated for , and concatenated with , each label encoding l◦i , l . The resulting batch of ‘ text-embedding , label-embedding ’ pairs [ [ ti , l ◦ i,1 ] , . . . , [ ti , l ◦ i , c ] ] 4 is fed into a ‘ matcher ’ classifier 5 that trains a binary cross entropy loss 6 on multiple ( pseudo- ) label ( mis- ) matches { 0 , 1 } for each text instance ti , resulting in a noise contrastive estimation objective ( NCE ) . Words like ‘ measuring ’ provide self-supervised pseudo-labels ( left ) . Positive and negative ( pseudo- ) labels are sampled from their own or other instances in a minibatch . Unlike Zhang et al . ( 2018a ) we use a CNN for 2 , negative sampling and self-supervision .
This paper proposes a contrastive autoencoder approach that only requires small data to perform a multi-label classification on the long-tail problem. They introduce a matching network to compare text and label embeddings and calculate the probabilities of the label given the input. The proposed idea is very straightforward by combining a matching network with contrastive learning to give broader signals. The goal of this work is to enable zero-shot and few-shot learning with very few resources as a more sustainable approach to machine learning applications.
SP:66e2413a5a20b51378742286d20985a11776a782
Exploring Routing Strategies for Multilingual Mixture-of-Experts Models
1 INTRODUCTION . Scaling up neural network models has recently received great attention , given the significant quality improvements in a variety of areas such as natural language understanding ( Raffel et al. , 2019 ; Brown et al. , 2020 ) and multilingual machine translation ( Huang et al. , 2019 ; Lepikhin et al. , 2020 ) . While training massive models on large amounts of data can almost guarantee improved quality , there are two factors affecting their practicality and applicability : ( 1 ) training efficiency and ( 2 ) inference efficiency . Large dense models are often prohibitively compute-intensive to train , with some models requiring TFlops-days of compute ( Brown et al. , 2020 ) . A recent line of work has proposed sparsely-gated Mixture-of-Experts ( MoE ) layers as an efficient alternative to dense models ( Shazeer et al. , 2017 ; Lepikhin et al. , 2020 ; Riabinin & Gusev , 2020 ) in order to address training efficiency limitations . In a vanilla sparsely-gated MoE model each token of the input sequence activates a different subset of the experts , hence the computation cost per token becomes only proportional to the size of the activated sub-network . However , they fail to meet requirements on inference efficiency . Consider a long sequence where each token of the sequence activates a disjoint subset of available experts . From a practical standpoint , the inference trace of the full sequence spans several experts independently for every token , resulting in an independent pathway for each token . Although this is a desired property adding flexibility to the model and increasing its capacity , it becomes prohibitive for inference for the following reasons : The model parameters in these large models are beyond the memory limit of a single accelerator , and require model parallelism to shard them across a cluster of devices during inference . For models with MoE Layers , the input token would be dynamically routed to different experts allocated to different devices . This further adds communication cost across devices to the overall serving cost . Moreover , due to the sequential nature of the autoregressive decoding ( Kasai et al. , 2020 ; Chen et al. , 2018 ) , the added communication cost from model parallel decoders gets multiplied by the number of decoding steps . To add to this , serving MoE models efficiently requires batching a large number of input tokens together , otherwise only a subset of the MoE network will be activated leading to device under-utilization . In this work , we study the inference efficiency of sparsely gated MoE models while taking into account the characteristics of the intended application , Multilingual Neural Machine Translation ( MNMT ) . MNMT is an inherently multi-task learning problem , aimed at building a single neural network for translating multiple language pairs simultaneously . In a MNMT model , the extent to which parameters are shared across languages determines the magnitude of positive transfer ( Baldwin & Ford , 1988 ) and conversely task interference due to the capacity bottleneck ( Arivazhagan et al. , 2019 ) . In an ideal scenario , we would want to efficiently train a single large MNMT model maximizing transfer while expanding the capacity bottleneck ; at the same time , we would like to enjoy the benefits of sparsely activated sub-networks per-task at inference time , i.e . extracting out a sub-network from the model to decode for a particular language pair to actualize inference efficiency . We propose routing algorithms for MoE models with affordable serving costs . While vanilla MoEs route each sub-word token in the input to its preferred experts , we explore alternative routing strategies that leverage global task level information to route all tokens corresponding to a particular task collectively to the same set of experts . While this strategy could be perceived to be restrictive for parameter sharing across tasks , we empirically demonstrate that routing based on task boundaries performs better when applied to MNMT . During training , we mix the inputs from different tasks in the same batch in order to learn the routing network and encourage positive transfer among the tasks . During inference , we decode different tasks separately and only load the subset of experts associated with the corresponding task . We compare our method with multilingual baselines and find that we achieve significant gains on two benchmarks : a multilingual WMT task with comparable inference cost ( +3.59 BLEU ) , described in Section 4 , and a large internal dataset ( +3.6 BLEU ) , in Section 4.3.2 ) . We see that the gains are comparable with conventional position-wise Mixture-of-Expert models while utilizing decoders with only a fraction ( 6.25 % and 1.56 % ) of their serving cost . We discuss the trade-offs of these different methods in Section 3.2 . In Section 4.3.4 , we analyze the routing decisions made in MoE models and motivate our method . 2 SCALING TRANSFORMERS WITH MIXTURE-OF-EXPERTS . The Transformer ( Vaswani et al. , 2017 ) architecture is a popular model used for neural machine translation and other natural language understanding problems . In sequence-to-sequence problems ( of which neural machine translation is one example ) , the model consists of a separate encoder and decoder , each of which contains multiple Transformer layers . For further details on Transformers , we refer the reader to the original paper ( Vaswani et al. , 2017 ) . We use the Mixture-of-Experts Transformer models used by Lepikhin et al . ( 2020 ) , where the MoE layers for the Transformers consist of E feed-forward networks ( FFN ) , such that ( FFN1 . . . FFNE ) . FFNe ( xs ) = woe · ReLU ( wie · xs ) ys = E∑ e=1 Gs , e · FFNe ( xs ) Here , xs is the input token at position s to the MoE layer and each FFNe is a two layer neural network using a ReLU activation function . wie and woe are the input and output projection weights of the e-th expert . Finally , Gs , E is vector computed by the gating network . For each expert , most values of this vector are zeros , one value being positive . We use this vector to route the token to a select few experts . The entries chosen from Gs , E determine how much the expert contributes to the final output ys . Note that , in this work we choose the top 2 weight experts for each example to be comparable with the prior work . The gating network Gs , E must be considered carefully for efficiency purposes : ( 1 ) the utilization of experts must be balanced and ( 2 ) the function must be efficient to implement at scale . For a more thorough discussion of MoE transformer , we direct the reader to Lepikhin et al . ( 2020 ) . 3 METHODS . In this section we describe our candidate routing strategies in the context of MNMT and discuss their trade-offs from the perspective of the training and inference efficiency . It is known that multi- lingual models learn different overlapping representations depending on the language - this is true for both dense ( Wu & Dredze , 2019 ; Tiedemann , 2018 ; Tan et al. , 2019 ; Östling & Tiedemann , 2016 ; Kudugunta et al. , 2019 ) and sparse models ( Section 4.3.4 ) . Therefore we propose changing the routing algorithm GATE ( xs ) of MoEs to choose different experts using more natural separations . 3.1 ROUTING STRATEGIES . Given the sequential nature of the multilingual machine translation task , the routing decisions can be made at three different granularities , from bottom up ( i ) token-level , ( ii ) sentence-level and ( iii ) task-level , as detailed below . • Token-level Routing : This is the baseline discussed in Section 2 where each token is routed independently . • Sentence-level Routing : Each sequence ( sentence ) , and all tokens that form the sequence , are routed to the same expert . We change the routing algorithm to select experts by sentence representation , calculated by taking the average token representations in a given sentence . • Task-level Routing : We select experts by task boundaries as opposed to making input- level decisions . In the context of MNMT , these task boundaries can either be defined by the target language ( French-to-English and German-to-English are the same task ) or the language pair ( French-to-English and German-to-English are different tasks ) . Gs , E = GATE ( 1 S S∑ s=1 xs ) ( Sentence-level routing ) ( 1 ) Gs , E = GATE ( task ids ) ( Task-level routing ) ( 2 ) We further illustrate the difference in Figure 1 , in token-based MoE models ( Figure 1a ) , tokens from each example are routed to different experts , whereas in task-level MoE models ( Figure 1b ) , tokens may be routed to the same expert based on task . 3.2 INFERENCE IMPLICATIONS OF ROUTING STRATEGIES . While the MoE models discussed in ( Shazeer et al. , 2017 ; Lepikhin et al. , 2020 ) train quickly relative to the number of parameters in terms of the wall-clock time , they are expensive to serve . Consider a MoE with 512 experts and 50B parameters ( Lepikhin et al. , 2020 ) . When employing token-level routing , each token can be independently routed to a different set of experts during inference . Given that the entire model is too large to load into memory on a single accelerator , the two potential solutions to utilize this model for inference are : ( i ) Loading experts dynamically from host to device depending on routing decisions , or ( ii ) Utilizing model-parallelism over multiple accelerators for serving . While the first solution incurs heavy host-device communication costs , the second introduces significantly inter-device communication overhead . Another practical approach to serve a large MoE would require model compression via quantization , pruning or distillation ( Cheng et al. , 2017 ) . While the first two strategies haven ’ t been explored in the context of conditional computation , distillation ( Hinton et al. , 2015 ; Kim & Rush , 2016 ) has been found to introduce undesirable artifacts into the student model ( Freitag et al. , 2019 ; Bogoychev & Sennrich , 2019 ) in the context of NMT . On the other hand , if we limit the number of experts available to every task in the model to a small fraction of the total available capacity , it is possible to extract task-specific models for serving , alleviating the need for complex serving strategies or compression . Since decoding time complexity for auto-regressive seq2seq models is dominated by the decoder ( Kasai et al. , 2020 ) , we can also pursue a hybrid strategy where the encoder utilizes more expensive routing strategies while the decoder of the model utilizes simpler and efficient routing . We do note , however , that MoE models that route purely by task boundaries are slower to train due to load balancing considerations . All examples in the input batch belonging to the same task would route to the same set of experts , possibly leading to some experts bearing a significant amount of the load . Balancing between these inference and training time trade-offs merits further exploration . Summarizing the effective decoding cost of the MoE models utilizing different routing strategies : • Token/Sentence level routing : The routing decisions are made dynamically . Assuming each token/sentence makes disjoint choices , the server needs to load all E experts . • Task-level routing : Tokens corresponding to each input sentence are routed to the same experts statically . The server only needs to pre-load K experts ( assuming top-K routing ) .
In this paper, the authors explore alternatives to the standard token-based routing in sparsely-gated MoE models for multilingual NMT. This exploration is motivated by the need for efficient inference in MoE models, for which token-based routing is a limitation. The alternative is task-based routing, where examples for a task are assigned to the same experts. This allows efficient device placement and request dispatch at inference time. The paper compares with the approaches as well as hybrid approaches where different parts of the network use different routing mechanisms. The results show that task level routing is comparable to token-level routing with the added benefit of inference efficiency. Performing task-based routing on the decoder side only gives better better translation quality, at the cost of inference efficiently. An analysis of routing decision in token-based routing justifies the design choices.
SP:37c923f6c8e655da32a295e69856cf7d7eff9618
Bidirectionally Self-Normalizing Neural Networks
1 INTRODUCTION . Neural networks have brought unprecedented performance in various artificial intelligence tasks ( Graves et al. , 2013 ; Krizhevsky et al. , 2012 ; Silver et al. , 2017 ) . However , despite decades of research , training neural networks is still mostly guided by empirical observations and successful training often requires various heuristics and extensive hyperparameter tuning . It is therefore desirable to understand the cause of the difficulty in neural network training and to propose theoretically sound solutions . A major difficulty is the gradient exploding/vanishing problem ( Glorot & Bengio , 2010 ; Hochreiter , 1991 ; Pascanu et al. , 2013 ; Philipp et al. , 2018 ) . That is , the norm of the gradient in each layer is either growing or shrinking at an exponential rate as the gradient signal is propagated from the top layer to bottom layer . For deep neural networks , this problem might cause numerical overflow and make the optimization problem intrinsically difficult , as the gradient in each layer has vastly different magnitude and therefore the optimization landscape becomes pathological . One might attempt to solve the problem by simply normalizing the gradient in each layer . Indeed , the adaptive gradient optimization methods ( Duchi et al. , 2011 ; Kingma & Ba , 2015 ; Tieleman & Hinton , 2012 ) implement this idea and have been widely used in practice . However , one might also wonder if there is a solution more intrinsic to deep neural networks , whose internal structure if well-exploited would lead to further advances . To enable the trainability of deep neural networks , batch normalization ( Ioffe & Szegedy , 2015 ) was proposed in recent years and achieved widespread empirical success . Batch normalization is a differentiable operation which normalizes its inputs based on mini-batch statistics and inserted between the linear and nonlinear layers . It is reported that batch normalization can accelerate neural network training significantly ( Ioffe & Szegedy , 2015 ) . However , batch normalization does not solve the gradient exploding/vanishing problem ( Philipp et al. , 2018 ) . Indeed it is proved that batch normalization can actually worsen the problem ( Yang et al. , 2019 ) . Besides , batch normalization requires separate training and testing phases and might be ineffective when the mini-batch size is small ( Ioffe , 2017 ) . The shortcomings of batch normalization motivate us to search for a more principled and generic approach to solve the gradient exploding/vanishing problem . Alternatively , self-normalizing neural networks ( Klambauer et al. , 2017 ) and dynamical isometry theory ( Pennington et al. , 2017 ) were proposed to combat gradient exploding/vanishing problem . In self-normalizing neural networks , the output of each network unit is constrained to have zero mean and unit variance . Based on this motivation , a new activation function , scaled exponential linear unit ( SELU ) , was devised . In dynamical isometry theory , all singular values of the input-output Jacobian matrix are constrained to be close to one at initialization . This amounts to initializing the functionality of a network to be close to an orthogonal matrix . While the two theories dispense batch normalization , it is shown that SELU still suffers from exploding/vanishing gradient problem and dynamical isometry restricts the functionality of the network to be close to linear ( pseudolinearity ) ( Philipp et al. , 2018 ) . In this paper , we follow the above line of research to investigate neural network trainability . Our contributions are three-fold : First , we introduce bidirectionally self-normalizing neural network ( BSNN ) that consist of orthogonal weight matrices and a new class of activation functions which we call Gaussian-Poincaré normalized ( GPN ) functions . We show many common activation functions can be easily transformed into their respective GPN versions . Second , we rigorously prove that the gradient exploding/vanishing problem disappears with high probability in BSNNs if the width of each layer is sufficiently large . Third , with experiments on synthetic and real-world data , we confirm that BSNNs solve the gradient vanishing/exploding problem to large extent while maintaining nonlinear functionality . 2 THEORY . In this section , we introduce bidirectionally self-normalizing neural network ( BSNN ) formally and analyze its properties . All the proofs of our results are left to Appendix . To simplify the analysis , we define a neural network in a restricted sense as follows : Definition 1 ( Neural Network ) . A neural network is a function from Rn to Rn composed of layerwise operations for l = 1 , . . . , L as h ( l ) = W ( l ) x ( l ) , x ( l+1 ) = φ ( h ( l ) ) , ( 1 ) where W ( l ) ∈ Rn×n , φ : R → R is a differentiable function applied element-wise to a vector , x ( 1 ) is the input and x ( L+1 ) is the output . Under this definition , φ is called the activation function , { W ( l ) } Ll=1 are called the parameters , n is called the width and L is called the depth . Superscript ( l ) denotes the l-th layer of a neural network . The above formulation is similar to ( Pennington et al. , 2017 ) but we omit the bias term in ( 1 ) for simplicity as it plays no role in our analysis . Let E be the objective function of { W ( l ) } Ll=1 and D ( l ) be a diagonal matrix with diagonal elements D ( l ) ii = φ ′ ( h ( l ) i ) , where φ ′ denotes the derivative of φ . Now , the error signal is back propagated via d ( L ) = D ( L ) ∂E ∂x ( L+1 ) , d ( l ) = D ( l ) ( W ( l+1 ) ) Td ( l+1 ) , ( 2 ) and the gradient of the weight matrix for layer l can be computed as ∂E ∂W ( l ) = d ( l ) ( x ( l ) ) T . ( 3 ) To solve the gradient exploding/vanishing problem , we constrain the forward signal x ( l ) and the backward signal d ( l ) in order to constrain the norm of the gradient . This leads to the following definition and proposition . Definition 2 ( Bidirectional Self-Normalization ) . A neural network is bidirectionally selfnormalizing if ‖x ( 1 ) ‖2 = ‖x ( 2 ) ‖2 = ... = ‖x ( L ) ‖2 , ( 4 ) ‖d ( 1 ) ‖2 = ‖d ( 2 ) ‖2 = ... = ‖d ( L ) ‖2 . ( 5 ) Proposition 1 . If a neural network is bidirectionally self-normalizing , then∥∥∥ ∂E ∂W ( 1 ) ∥∥∥ F = ∥∥∥ ∂E ∂W ( 2 ) ∥∥∥ F = ... = ∥∥∥ ∂E ∂W ( L ) ∥∥∥ F . ( 6 ) In the rest of this section , we derive the conditions under which bidirectional self-normalization is achievable for a neural network . 2.1 CONSTRAINTS ON WEIGHT MATRICES . We constrain the weight matrices to be orthogonal since multiplication by an orthogonal matrix preserves the norm of a vector . For linear networks , this guarantees bidirectionally selfnoramlizingnormalization and its further benefits are discussed in ( Saxe et al. , 2014 ) . Even for nonlinear neural networks , orthogonal constraints are shown to improve the trainability with proper scaling ( Mishkin & Matas , 2016 ; Pennington et al. , 2017 ) . 2.2 CONSTRAINTS ON ACTIVATION FUNCTIONS . To achieve bidirectionally self-noramlizingnormalization for a nonlinear network , it is not enough only to constrain the weight matrices . We also need to constrain the activation function in such a way that both forward and backward signals are normalized . To this end , we propose the following constraint that captures the relationship between a function and its derivative . Definition 3 ( Gaussian-Poincaré Normalization ) . Function φ : R → R is Gaussian-Poincaré normalized if it is differentiable and Ex∼N ( 0,1 ) [ φ ( x ) 2 ] = Ex∼N ( 0,1 ) [ φ′ ( x ) 2 ] = 1 . ( 7 ) The definition is inspired by the following theorem which shows the fundamental relationship between a function and its derivative under Gaussian measure . Theorem 1 ( Gaussian-Poincaré Inequality ( Bogachev , 1998 ) ) . If function φ : R→ R is differentiable with bounded Ex∼N ( 0,1 ) [ φ ( x ) 2 ] and Ex∼N ( 0,1 ) [ φ′ ( x ) 2 ] , then Varx∼N ( 0,1 ) [ φ ( x ) ] ≤ Ex∼N ( 0,1 ) [ φ′ ( x ) 2 ] . ( 8 ) Note that there is an implicit assumption that the input is approximately Gaussian for a GaussianPoincaré normalized ( GPN ) function . Even though this is standard in the literature ( Klambauer et al. , 2017 ; Pennington et al. , 2017 ; Schoenholz et al. , 2017 ) , we will rigorously prove that this assumption is valid when orthogonal weight matrices are used in equation 1 . Next , we state a property of GPN functions . Proposition 2 . Function φ : R→ R is Gaussian-Poincaré normalized and Ex∼N ( 0,1 ) [ φ ( x ) ] = 0 if and only if φ ( x ) = x or φ ( x ) = −x . This result indicates that any nonlinear function with zero mean under Gaussian distribution ( e.g. , Tanh and SELU ) is not GPN . Now we show that a large class of activation functions can be converted into their respective GPN versions using an affine transformation . Proposition 3 . For any differentiable function φ : R → R with non-zero and bounded Ex∼N ( 0,1 ) [ φ ( x ) 2 ] and Ex∼N ( 0,1 ) [ φ′ ( x ) 2 ] , there exist two constants a and b such that aφ ( x ) + b is Gaussian-Poincaré normalized . To obtain a and b , one can use numerical procedure to compute the values of Ex∼N ( 0,1 ) [ φ′ ( x ) 2 ] , Ex∼N ( 0,1 ) [ φ ( x ) 2 ] and Ex∼N ( 0,1 ) [ φ ( x ) ] and then solve the quadratic equations Ex∼N ( 0,1 ) [ a2φ′ ( x ) 2 ] = 1 , ( 9 ) Ex∼N ( 0,1 ) [ ( aφ ( x ) + b ) 2 ] = 1 . ( 10 ) We computed a and b ( not unique ) for several common activation functions with their default hyperparameters1 and the results are listed in Table 1 . Note that ReLU , LeakyReLU and SELU are not differentiable at x = 0 but they can be regarded as approximations of their smooth counterparts . We ignore such point and evaluate the integrals for x ∈ ( −∞ , 0 ) ∪ ( 0 , ∞ ) . With the orthogonal constraint on the weight matrices and the Gaussian-Poincaré normalization on the activation function , we prove that bidirectionally self-noramlizingnormalization is achievable with high probability under mild conditions in the next subsection . 1We use α = 0.01 for LeakyReLU , α = 1 for ELU and φ ( x ) = x/ ( 1 + exp ( −1.702x ) ) for GELU .
In this paper, the authors introduce the bidirectional self-normalizing neural networks (BSNN) that preserve the norms in both forward and backward passes. To serve such purpose, a new class of activation functions, GPN, is proposed, which can be obtained via the affine transform of existing activation functions like tanh and SELU. The authors prove that under orthogonal weights and GPN, the norm for both forward and backward passes can be well preserved. Besides, the conclusions are also supported by experiments on synthetic data and real-world data like MNIST and CIFAR 10.
SP:54c5295194b84ff9c33532c6c556558575e42419
Segmenting Natural Language Sentences via Lexical Unit Analysis
1 INTRODUCTION . Sequence segmentation is essentially the process of partitioning a sequence of fine-grained lexical units into a sequence of coarse-grained ones . In some scenarios , each composed unit is assigned a categorical label . For example , Chinese word segmentation splits a character sequence into a word sequence ( Xue , 2003 ) . Syntactic chunking segments a word sequence into a sequence of labeled groups of words ( i.e. , constituents ) ( Sang & Buchholz , 2000 ) . There are currently two mainstream approaches to sequence segmentation . The most common is to regard it as a sequence labeling problem by using IOB tagging scheme ( Mesnil et al. , 2014 ; Ma & Hovy , 2016 ; Liu et al. , 2019b ; Chen et al. , 2019a ; Luo et al. , 2020 ) . A representative work is Bidirectional LSTM-CRF ( Huang et al. , 2015 ) , which adopts LSTM ( Hochreiter & Schmidhuber , 1997 ) to read an input sentence and CRF ( Lafferty et al. , 2001 ) to decode the label sequence . This type of method is very effective , providing tons of state-of-the-art performances . However , it is vulnerable to producing invalid labels , for instance , “ O , I-tag , I-tag ” . This problem is very severe in low resource settings ( Peng et al. , 2017 ) . In experiments ( see section 4.6 ) , we also find that it performs poorly in recognizing long-length segments . Recently , there is a growing interest in span-based models ( Zhai et al. , 2017 ; Li et al. , 2019 ; Yu et al. , 2020 ) . They treat a span rather than a token as the basic unit for labeling . Li et al . ( 2019 ) cast named entity recognition ( NER ) to a machine reading comprehension ( MRC ) task , where entities are extracted as retrieving answer spans . Yu et al . ( 2020 ) rank all the spans in terms of the scores predicted by a bi-affine model ( Dozat & Manning , 2016 ) . In NER , span-based models have significantly outperformed their sequence labeling based counterparts . While these methods circumvent the use of IOB tagging scheme , they still rely on post-processing rules to guarantee the extracted span set to be valid . Moreover , since span-based models are locally normalized at span level , they potentially suffer from the label bias problem ( Lafferty et al. , 2001 ) . This paper seeks to provide a new framework which infers the segmentation of a unit sequence by directly selecting from all valid segmentation candidates , instead of manipulating tokens or spans . To this end , we propose Lexical Unit Analysis ( LUA ) in this paper . LUA assigns a score to every valid segmentation candidate and leverages dynamic programming ( DP ) ( Bellman , 1966 ) to search for the maximum scoring one . The score of a segmentation is computed by using the scores of its all segments . Besides , we adopt neural networks to score every segment of the input sentence . The purpose of using DP is to solve the intractability of extracting the maximum scoring segmentation candidate by brute-force search . The time complexity of LUA is quadratic time , yet it can be optimized to linear time in practice by performing parallel matrix computations . For training criterion , we incur a hinge loss between the ground truth and the predictions . We also extend LUA to unlabeled segmentation and capturing label correlations . Figure 1 illustrates the comparison between previous methods and the proposed LUA . Prior models at token level and span level are vulnerable to generating invalid predictions , and hence rely on heuristic rules to fix them . For example , in the middle part of Figure 1 , the spans of two inferred named entities , [ Word Cup ] MISC and [ Cup ] MISC , conflicts , which is mitigated by comparing the predicted scores . LUA scores all possible segmentation candidates and uses DP to extract the maximum scoring one . In this way , our models guarantee the predictions to be valid . Moreover , the globality of DP addresses the label bias problem . Extensive experiments are conducted on syntactic chunking , NER , slot filling , Chinese word segmentation , and Chinese part-of-speech ( POS ) tagging across 15 tasks . We have obtained new stateof-the-art results on 13 of them and performed competitively on the others . In particular , we observe that LUA is expert at identifying long-length segments . 2 METHODOLOGY . We denote an input sequence ( i.e. , fine-grained lexical units ) as x = [ x1 , x2 , · · · , xn ] , where n is the sequence length . An output sequence ( i.e. , coarse-grained lexical units ) is represented as the segmentation y = [ y1 , y2 , · · · , ym ] with each segment yk being a triple ( ik , jk , tk ) . m denotes its length . ( ik , jk ) specifies a span that corresponds to the phrase xik , jk = [ xik , xik+1 , · · · , xjk ] . tk is a label from the label space L. We define a valid segmentation candidate as its segments are non-overlapping and fully cover the input sequence . A case extracted from CoNLL-2003 dataset ( Sang & De Meulder , 2003 ) : x = [ [ SOS ] , Sangthai , Glory , 22/11/96 , 3000 , Singapore ] y = [ ( 1 , 1 , O ) , ( 2 , 3 , MISC ) , ( 4 , 4 , O ) , ( 5 , 5 , O ) , ( 6 , 6 , LOC ) ] . Start-of-sentence symbol [ SOS ] is added in the pre-processing stage . 2.1 MODEL : SCORING SEGMENTATION CANDIDATES . We denote Y as the universal set that contains all valid segmentation candidates . Given one of its members y ∈ Y , we compute the score f ( y ) as f ( y ) = ∑ ( i , j , t ) ∈y ( sci , j + s l i , j , t ) , ( 1 ) Algorithm 1 : Inference via Dynamic Programming ( DP ) Input : Composition score sci , j and label score sli , j , t for every possible segment ( i , j , t ) . Output : The maximum segmentation scoring candidate ŷ and its score f ( ŷ ) . 1 Set two n× n shaped matrices , cL and bc , for computing maximum scoring labels . 2 Set two n-length vectors , g and bg , for computing maximum scoring segmentation . 3 for 1 ≤ i ≤ j ≤ n do 4 Compute the maximum label score for each span ( i , j ) : sLi , j = maxt∈L s l i , j , t . 5 Record the backtracking index : bci , j = argmaxt∈L s l i , j , t . 6 Initialize the value of the base case x1,1 : g1 = sc1,1 + s L 1,1 . 7 for i ∈ [ 2 , 3 , · · · , n ] do 8 Compute the value of the prefix x1 , i : gi = max1≤j≤i−1 ( gi−j + ( s c i−j+1 , i + s L i−j+1 , i ) ) . 9 Record the backtracking index : bgi = argmax1≤j≤i−1 ( gi−j + ( s c i−j+1 , i + s L i−j+1 , i ) ) . 10 Get the maximum scoring candidate ŷ by back tracing the tables bg and bc . 11 Get the maximum segmentation score : f ( ŷ ) = gn . where sci , j is the composition score to estimate the feasibility of merging several fine-grained units [ xi , xi+1 , · · · , xj ] into a coarse-grained unit and sli , j , t is the label score to measure how likely the label of this segment is t. Both scores are obtained by a scoring model . Scoring Model . a scoring model scores all possible segments ( i , j , t ) for an input sentence x. Firstly , we get the representation for each fine-grained unit . Following prior works ( Li et al. , 2019 ; Luo et al. , 2020 ; Yu et al. , 2020 ) , we adopt BERT ( Devlin et al. , 2018 ) , a powerful pre-trained language model , as the sentence encoder . Specifically , we have [ hw1 , h w 2 · · · , hwn ] = BERT ( x ) , ( 2 ) Then , we compute the representation for a coarse-grained unit xi , j , 1 ≤ i ≤ j ≤ n as hpi , j = h w i ⊕ hwj ⊕ ( hwi − hwj ) ⊕ ( hwi hwj ) , ( 3 ) where ⊕ is vector concatenation and is element-wise product . Eventually , we employ two non-linear feedforward networks to score a segment ( i , j , t ) : sci , j = ( vc ) T tanh ( Wchpi , j ) , s l i , j , t = ( vlt ) T tanh ( Wlhpi , j ) , ( 4 ) where vc , Wc , vlt , t ∈ L , and Wl are all learnable parameters . Besides , the scoring model used here can be flexibly replaced by any regression method . 2.2 INFERENCE VIA DYNAMIC PROGRAMMING . The prediction of the maximum scoring segmentation candidate can be formulated as ŷ = argmax y∈Y f ( y ) . ( 5 ) Because the size of search space |Y| increases exponentially with respect to the sequence length n , brute-force search to solve Equation 5 is computationally infeasible . LUA uses DP to address this issue , which is facilitated by the decomposable nature of Equation 1 . DP is a well-known optimization method which solves a complicated problem by breaking it down into simpler sub-problems in a recursive manner . The relation between the value of the larger problem and the values of its sub-problems is called the Bellman equation . Sub-problem . In the context of LUA , the sub-problem of segmenting an input unit sequence x is segmenting its prefixes x1 , i , 1 ≤ i ≤ n. We define gi as the maximum segmentation score of the prefix x1 , i . Under this scheme , we have maxy∈Y f ( y ) = gn . The Bellman Equation . The relatinship between segmenting a sequence x1 , i , i > 1 and segmenting its prefixes x1 , i−j , 1 ≤ j ≤ i− 1 is built by the last segments ( i− j + 1 , i , t ) : gi = max 1≤j≤i−1 ( gi−j + ( s c i−j+1 , i +max t∈L sli−j+1 , i , t ) ) . ( 6 ) In practice , to reduce the time complexity of above equation , the last term is computed beforehand as sLi , j = maxt∈L s l i , j , t , 1 ≤ i ≤ j ≤ n. Hence , Equation 6 is reformulated as gi = max 1≤j≤i−1 ( gi−j + ( s c i−j+1 , i + s L i−j+1 , i ) ) . ( 7 ) The base case is the first token x1,1 = [ [ SOS ] ] . We get its score g1 as sc1,1 + s L 1,1 . Algorithm 1 shows how DP is applied in inference . Firstly , we set two matrices and two vectors to store the solutions to the sub-problems ( 1-st to 2-nd lines ) . Secondly , we get the maximum label scores for all the spans ( 3-rd to 5-th lines ) . Then , we initialize the trivial case g1 and recursively calculate the values for prefixes x1 , i , i > 1 ( 6-th to 9-th lines ) . Finally , we get the predicted segmentation ŷ and its score f ( ŷ ) ( 10-th to 11-th lines ) . The time complexity of Algorithm 1 is O ( n2 ) . By performing the max operation of Equation 7 in parallel on GPU , it can be optimized to only O ( n ) , which is highly efficient . Besides , DP , as the backbone of the proposed model , is non-parametric . The trainable parameters only exist in the scoring model part . These show LUA is a very light-weight algorithm .
The paper is well-written, easy to follow and clear. However, the novelty and main contribution of the paper is not clear. The authors used a scoring model to score the composition of each segment, as well as the probability of having a specific label for the segment. The BERT language model is used in the paper to encode the input sequence. The training part is a more like a supervised training and a dynamic programming (DP) approach is used for inference. It is not clear how DP contributes to the success of the model, as the scores for segments are derived during the training (which seems most of the success is coming from the labeled data (i.e. supervised training) and BERT encoding). One other thing about formatting and citing references, some of the references are published in conference proceedings, not sure why authors cited their arxiv version.
SP:a8e0b9e55e9a0648ba1c64cf0edb8f09c9a38109
Learning Algebraic Representation for Abstract Spatial-Temporal Reasoning
1 INTRODUCTION . “ Thought is in fact a kind of Algebra. ” —William James ( James , 1891 ) Imagine you are given two alphabetical sequences of “ c , b , a ” and “ d , c , b ” , and asked to fill in the missing element in “ e , d , ? ” . In nearly no time will one realize the answer to be c. However , more surprising for human learning is that , effortlessly and instantaneously , we can “ freely generalize ” ( Marcus , 2001 ) the solution to any partial consecutive ordered sequences . While believed to be innate in early development for human infants ( Marcus et al. , 1999 ) , such systematic generalizability has constantly been missing and proven to be particularly challenging in existing connectionist models ( Lake & Baroni , 2018 ; Bahdanau et al. , 2019 ) . In fact , such an ability to entertain a given thought and semantically related contents strongly implies an abstract algebra-like treatment ( Fodor et al. , 1988 ) ; in literature , it is referred to as the “ language of thought ” ( Fodor , 1975 ) , “ physical symbol system ” ( Newell , 1980 ) , and “ algebraic mind ” ( Marcus , 2001 ) . However , in stark contrast , existing connectionist models tend only to capture statistical correlation ( Lake & Baroni , 2018 ; Kansky et al. , 2017 ; Chollet , 2019 ) , rather than providing any account for a structural inductive bias where systematic algebra can be carried out to facilitate generalization . This contrast instinctively raises a question—what constitutes such an algebraic inductive bias ? We argue that the foundation of the modeling counterpart to the algebraic treatment in early human development ( Marcus , 2001 ; Marcus et al. , 1999 ) lies in algebraic computations set up on mathematical axioms , a form of formalized human intuition and the starting point of modern mathematical reasoning ( Heath et al. , 1956 ; Maddy , 1988 ) . Of particular importance to the basic building blocks of algebra is the Peano Axiom ( Peano , 1889 ) . In the Peano Axiom , the essential components of algebra , the algebraic set and corresponding operators over it , are governed by three statements : ( 1 ) the existence of at least one element in the field to study ( “ zero ” element ) , ( 2 ) a successor function that is recursively applied to all elements and can , therefore , span the entire field , and ( 3 ) the principle of mathematical induction . Building on such a fundamental axiom , we begin to form the notion of an algebraic set and induce the operator along with it to construct an algebraic structure . We hypothesize that such a treatment of algebraic computations set up on fundamental axioms is essential for a model ’ s systematic generalizability , the lack of which will only make it sub-optimal . To demonstrate the benefits of such an algebraic treatment in systematic generalization , we showcase a prototype for Raven ’ s Progressive Matrices ( RPM ) ( Raven , 1936 ; Raven & Court , 1998 ) , an exemplar task for abstract spatial-temporal reasoning ( Santoro et al. , 2018 ; Zhang et al. , 2019a ) . In this task , an agent is given an incomplete 3ˆ3 matrix consisting of eight context panels with the last one missing , and asked to pick one answer from a set of eight choices that best completes the matrix . Human ’ s reasoning capability of solving this abstract reasoning task has been commonly regarded as an indicator of “ general intelligence ” ( Carpenter et al. , 1990 ) and “ fluid intelligence ” ( Spearman , 1923 ; 1927 ; Hofstadter , 1995 ; Jaeggi et al. , 2008 ) . In spite of the task being one that ideally requires abstraction , algebraization , induction , and generalization ( Raven , 1936 ; Raven & Court , 1998 ; Carpenter et al. , 1990 ) , recent endeavors unanimously propose pure connectionist models that attempt to circumvent such intrinsic cognitive requirements ( Santoro et al. , 2018 ; Zhang et al. , 2019a ; b ; Wang et al. , 2020 ; Zheng et al. , 2019 ; Hu et al. , 2020 ; Wu et al. , 2020 ) . However , these methods ’ inefficiency is also evident in systematic generalization ; they struggle to extrapolate to domains beyond training , as pointed out in ( Santoro et al. , 2018 ; Zhang et al. , 2019b ) and shown later in this paper . To address the issue , we introduce the ALgebra-Aware Neuro-Semi-Symbolic ( ALANS2 ) learner . At a high-level , the ALANS2 learner is embedded in a general neuro-symbolic architecture ( Yi et al. , 2018 ; Mao et al. , 2019 ; Han et al. , 2019 ; Yi et al. , 2020 ) but has on-the-fly operator learnability and hence semi-symbolic . Specifically , it consists of a neural visual perception frontend and an algebraic abstract reasoning backend . For each RPM instance , the neural visual perception frontend first slides a window over each panel to obtain the object-based representations ( Kansky et al. , 2017 ; Wu et al. , 2017 ) for every object . A belief inference engine latter aggregates all object-based representations in each panel to produce the probabilistic belief state . The algebraic abstract reasoning backend then takes the belief states of the eight context panels , treats them as snapshots on an algebraic structure , lifts them into a matrix-based algebraic representation built on the Peano Axiom and the representation theory ( Humphreys , 2012 ) , and induces the hidden operator in the algebraic structure by solving an inner optimization ( Colson et al. , 2007 ; Bard , 2013 ) . The algebraic representation for the answer is predicted by executing the induced operator : its corresponding set element is decoded by isomorphism established in the representation theory , and the final answer is selected as the one most similar to the prediction . The ALANS2 learner enjoys several benefits in abstract reasoning with an algebraic treatment : 1 . Unlike previous monolithic models , the ALANS2 learner offers a more interpretable account of the entire abstract reasoning process : the neural visual perception frontend extracts object-based representations and produces belief states of panels by explicit probability inference , whereas the algebraic abstract reasoning backend induces the hidden operator in the algebraic structure . The corresponding representation for the final answer is obtained by executing the induced operator , and the choice panel with minimum distance is selected . This process much resembles the topdown bottom-up strategy in human reasoning : humans reason by inducing the hidden relation , executing it to generate a feasible solution in mind , and choosing the most similar answer available ( Carpenter et al. , 1990 ) . Such a strategy is missing in recent literature ( Santoro et al. , 2018 ; Zhang et al. , 2019a ; b ; Wang et al. , 2020 ; Zheng et al. , 2019 ; Hu et al. , 2020 ; Wu et al. , 2020 ) . 2 . While keeping the semantic interpretability and end-to-end trainability in existing neurosymbolic frameworks ( Yi et al. , 2018 ; Mao et al. , 2019 ; Han et al. , 2019 ; Yi et al. , 2020 ) , ALANS2 is what we call semi-symbolic in the sense that the symbolic operator can be learned and concluded on-the-fly without manual definition for every one of them . Such an inductive ability also enables a greater extent of the desired generalizability . 3 . By decoding the predicted representation in the algebraic structure , we can also generate an answer that satisfies the hidden relation in the context . This work makes three major contributions : ( 1 ) We propose the ALANS2 learner . Compared to existing monolithic models , the ALANS2 learner adopts a neuro-semi-symbolic design , where the problem-solving process is decomposed into neural visual perception and algebraic abstract reasoning . ( 2 ) To demonstrate the efficacy of incorporating an algebraic treatment in abstract spatialtemporal reasoning , we show the superior systematic generalization ability of the proposed ALANS2 learner in various extrapolatory RPM domains . ( 3 ) We present analyses into both neural visual perception and algebraic abstract reasoning . We also show the generative potential of ALANS2 . 2 RELATED WORK . Quest for Symbolized Manipulation The idea to treat thinking as a mental language can be dated back to Augustine ( Augustine , 1876 ; Wittgenstein , 1953 ) . Since the 1970s , this school of thought has undergone a dramatic revival as the quest for a symbolized manipulation in cognitive modeling , such as “ language of thought ” ( Fodor , 1975 ) , “ physical symbol system ” ( Newell , 1980 ) , and “ algebraic mind ” ( Marcus , 2001 ) . In their study , connectionist ’ s task-specific superiority and inability to generalize beyond training ( Kansky et al. , 2017 ; Chollet , 2019 ; Santoro et al. , 2018 ; Zhang et al. , 2019a ) have been hypothetically linked to a lack of such symbolized algebraic manipulation ( Lake & Baroni , 2018 ; Chollet , 2019 ; Marcus , 2020 ) . With evidence that an algebraic treatment adopted in early human development ( Marcus et al. , 1999 ) can potentially address the issue ( Bahdanau et al. , 2019 ; Mao et al. , 2019 ; Marcus , 2020 ) , classicist ( Fodor et al. , 1988 ) approaches for generalizable reasoning used in programs ( McCarthy , 1960 ) and blocks world ( Winograd , 1971 ) have resurrected . As a hybrid approach to bridge connectionist and classicist , recent developments lead to neuro-symbolic architectures . In particular , Yi et al . ( 2018 ) demonstrate a neuro-symbolic prototype for visual question answering , where a perception module and a language parsing module are separately trained , and the predefined logic operators associated with language tokens are chained to process the visual information . Mao et al . ( 2019 ) soften the predefined operators to afford end-to-end training with only question answers . Han et al . ( 2019 ) and Yi et al . ( 2020 ) use the hybrid architecture for metaconcept learning and temporal causal learning , respectively . ALANS2 follows the classicist ’ s call but adopts a neuro-semi-symbolic architecture : it is end-to-end trainable as opposed to Yi et al . ( 2018 ; 2020 ) and the operator can be learned and concluded on-the-fly without manual specification ( Yi et al. , 2018 ; Mao et al. , 2019 ; Han et al. , 2019 ; Yi et al. , 2020 ) . Abstract Visual Reasoning Recent works by Santoro et al . ( 2018 ) and Zhang et al . ( 2019a ) arouse the community ’ s interest in abstract visual reasoning , where the task of Raven ’ s Progressive Matrices ( RPM ) is introduced as such a measure for intelligent agents . Initially proposed as an intelligence quotient test for humans ( Raven , 1936 ; Raven & Court , 1998 ) , RPM is believed to be strongly correlated with human ’ s general intelligence ( Carpenter et al. , 1990 ) and fluid intelligence ( Spearman , 1923 ; 1927 ; Hofstadter , 1995 ; Jaeggi et al. , 2008 ) . Early RPM-solving systems employ symbolic representations based on hand-designed features and assume access to the underlying logics ( Carpenter et al. , 1990 ; Lovett et al. , 2009 ; 2010 ; Lovett & Forbus , 2017 ) . Another stream of research on RPM recruits similarity-based metrics to select the most similar answer from the choices ( Little et al. , 2012 ; McGreggor & Goel , 2014 ; McGreggor et al. , 2014 ; Mekik et al. , 2018 ; Shegheva & Goel , 2018 ) . However , their hand-defined visual features are unable to handle uncertainty from imperfect perception , and directly assuming access to the logic operations simplifies the problem . Recently proposed data-driven approaches arise from the availability of large datasets : Santoro et al . ( 2018 ) extend a pedagogical RPM generation method ( Wang & Su , 2015 ) , whereas Zhang et al . ( 2019a ) use a stochastic image grammar ( Zhu et al. , 2007 ) and introduce structural annotations in it , which Hu et al . ( 2020 ) further refine to avoid shortcut solutions by statistics in candidate panels . Despite the fact that RPM intrinsically requires one to perform abstraction , algebraization , induction , and generalization , existing methods bypass such cognitive requirements using a single feedforward pass in connectionist models : Santoro et al . ( 2018 ) use a relational module ( Santoro et al. , 2017 ) , Steenbrugge et al . ( 2018 ) augment it with a VAE ( Kingma & Welling , 2013 ) , Zhang et al . ( 2019a ) assemble a dynamic tree , Hill et al . ( 2019 ) arrange the data in a contrasting manner , Zhang et al . ( 2019b ) propose a contrast module , Zheng et al . ( 2019 ) formulate it in a student-teacher setting , Wang et al . ( 2020 ) build a multiplex graph network , Hu et al . ( 2020 ) aggregate features from a hierarchical decomposition , and Wu et al . ( 2020 ) apply a scattering transformation to learn objects , attributes , and relations . In contrast , ALANS2 attempts to fulfill the cognitive requirements in a neuro-semi-symbolic framework : the perception frontend abstracts out visual information , and the reasoning backend induces the hidden operator in an algebraic structure . 3 THE ALANS2 LEARNER In this section , we introduce the ALANS2 learner for the RPM problem . In each RPM instance , an agent is given an incomplete 3ˆ 3 panel matrix with the last entry missing and asked to induce the operator hidden in the matrix and choose from eight choice panels one that follows it . Formally , let the answer variable be denoted as y , the context panels as tIo , iu8i “ 1 , and choice panels as tIc , iu8i “ 1 . Then the problem can be formulated as estimating P py | tIo , iu8i “ 1 , tIc , iu8i “ 1q . According to the common design ( Santoro et al. , 2018 ; Zhang et al. , 2019a ; Carpenter et al. , 1990 ) , there is one operator that governs each panel attribute . Hence , by assuming independence among attributes , we propose to factorize the probability as P py “ n | tIo , iu8i “ 1 , tIc , iu8i “ 1q9 ź a ÿ T a P pya “ n | T a , tIo , iu8i “ 1 , tIc , iu8i “ 1qP pT a | tIo , iu8i “ 1q , ( 1 ) where ya denotes the answer selection based only on attribute a and T a the operator on a. Overview As shown in Fig . 1 , the ALANS2 learner decomposes the process into perception and reasoning : the neural visual perception frontend extracts the belief states from each of the sixteen panels , whereas the algebraic abstract reasoning backend views an instance as an example in an abstract algebra structure , transforms belief states into algebraic representations by representation theory , induces the hidden operators , and executes the operators to predict the representation of the answer . Therefore , in Eq . ( 1 ) , the operator distribution is modeled by the fitness of an operator and the answer distribution by the distance between the predicted representation and that of a candidate .
This work proposes a new learner bridging the gap between connectionists and classicists in the task of Raven’s Progressive Matrices (RPM). It relies on a CNN to extract visual features and then uses an algebraic abstract reasoning module to infer the operators of an RPM instance, which allows applying the inferred operator on the RPM instance to predict potential solutions according to various attributes. The most likely solution according to the ensemble of the attributes is then selected as an answer.
SP:258fe1091f7ce89bff79cd8377ee5faad84e9315
CTRLsum: Towards Generic Controllable Text Summarization
1 INTRODUCTION . Neural summarization systems aim to compress a document into a short paragraph or sentence while preserving key information . There are largely two categories of summarization systems : extractive summarization that extracts important portions of a document ( Cheng & Lapata , 2016 ; Nallapati et al. , 2017 ; Narayan et al. , 2018 ) , and abstractive summarization that freely generates novel sentences ( Rush et al. , 2015 ; See et al. , 2017 ; Paulus et al. , 2018 ) which can produce coherent and fluent summaries more flexibly . In this paper we focus on abstractive summarization . Typically abstractive summarization methods take a document as input and yield a generic summary to cover certain information identified by the model . However , content of interest is user-dependent . Summaries should select information with respect to preferences of a user . For example , Figure 1 shows an NBA basketball news article , and the reference summary describes several match results . However , fans of certain basketball stars in these teams such as Lebron James or Stephen Curry might only be interested in the matches they played and would like to know the player ’ s scores as well . Motivated by this , we focus on controllable summarization which allows the users to manipulate the summaries from the model . We propose CTRLsum , a framework to control summaries through control tokens in the form of a set of keywords or descriptive prompts . At training time , the model learns to predict summaries conditioned on both the source document and keywords that serve as external guidance . During inference , keywords and optional prompts , which are the target prefix to constrain decoding , are combined as control tokens to convey user preferences as shown in Figure 1 . Keywords and prompts are complementary . Prompts do not perform well in many cases such as entity or length controlled summarization as our preliminary experiments imply , but keywords can achieve those goals in a flexible way , for example , by using entity as keywords or varying the number of keywords to control entities and length respectively . However , keywords struggle in more open-ended scenarios like summarizing a list of contributions of scientific papers , while constraining the decoding with prompt “ the main contributions of this paper are : ( 1 ) ” is possibly sufficient to achieve the goal . 1Code and model checkpoints will be public after the review period . CTRLsum is trained using only keywords as additional input which can be easily identified from training summaries . It requires neither extra human annotations nor pre-defining control aspects for training , yet is quite flexible to achieve a broad scope of text manipulation as we will show in this paper . In contrast , prior work primarily rely on pre-defined “ control codes ” ( Fan et al. , 2018 ; Liu et al. , 2018 ; Keskar et al. , 2019 ) , thus need to collect annotations for training and can not generalize to unseen control aspects easily at test time . We use pretrained BART ( Lewis et al. , 2019 ) as the underlying architecture and perform experiments on three datasets in three distinct domains : CNN/Dailymail news articles ( Hermann et al. , 2015 ) , arXiv scientific papers ( Cohan et al. , 2018 ) , and BIGPATENT patent documents ( Sharma et al. , 2019 ) . We quantitatively evaluate CTRLsum on five control aspects : ( 1 ) entity-centric ( §4.2 ) and ( 2 ) length-controllable summarization ( §4.3 ) , ( 3 ) summarizing the contributions of scientific papers , ( 4 ) summarizing the purpose of an invention ( §4.4 ) , and ( 5 ) summarizing answers to given questions in a zero-shot reading comprehension setting ( §4.5 ) . Notably , our approach also achieves comparable or superior performance to the strong BART summarization model on all datasets in a standard , uncontrolled setting ( §4.6 ) , leading to state-of-the-art results on the CNN/Dailymail dataset . 2 CTRLSUM . 2.1 OVERVIEW . Unconstrained neural summarization methods are trained to learn the conditional distribution p ( y|x ) , where x and y represent the source document and summary respectively . The generated summaries depend solely on the document x without human involvement . To control the output summaries , we propose using additional control tokens z to represent user preferences and training a summarization model that predicts the conditional distribution p ( y|x , z ) . The control tokens z include keywords as extra inputs during training and inference . They can also optionally include prompts at test time to further constrain the decoding process . As shown in Figure 1 , control tokens – in the form of keywords , prompts , or a combination of both – act as an interface between users and an otherwise black-box neural model , providing a flexible way for users to explicitly control automatic summarization . Next we describe how to obtain automatic keywords for training as well as potential applications at test time . 2.2 AUTOMATIC KEYWORD EXTRACTION . In addition to extracting keywords from training data to train the model , CTRLsum also features an automatic keywords extraction mechanism at test time , which can be used to suggest automatic keywords according to user preferences , or perform uncontrolled summarization without user signals . Next we describe the keywords extraction methods at training and inference time respectively . Training . For training , we use the ground-truth summary to identify keywords in the source document . Specifically , we first greedily select sentences from the document that maximize the ROUGE scores ( Lin , 2004 ) with the reference summary . This step constrains keywords to those found in important sentences . Then , we identify all the longest sub-sequences in the extracted sentences that have matched sub-sequences in the ground-truth summary , similar to the copying word recognition method in ( Gehrmann et al. , 2018 ) . Finally , we remove duplicate words and stop words and keep the remaining tokens as keywords . Compared to other keywords extraction methods ( Riloff & Lehnert , 1994 ; Mihalcea & Tarau , 2004 ) which output only a few salient words , our extraction retains most content words found in the summary . This encourages dependence on the given keywords by building a reliable correlation between their presence in the input and the target . It in turn ensures that user-provided keywords are not ignored by the model at test time , which is catastrophic for a controllable summarization system . Inference . We formulate the keyword extraction problem at test time as a sequence labeling task . Concretely , we train a BERT-based sequence tagger ( Devlin et al. , 2018 ) on the keywords and documents from training dataset . This tagger then computes the selection probability qj for each token in the test document . Similar to training time extraction , we first select ns sentences with the highest average token selection probability . Within these sentences words with qj > are selected as keywords up to a maximum number of mmax . The three hyperparameters ns , , mmax are selected based on the uncontrolled summarization performance on validation datasets . The results are reasonably robust to different settings ( see Appendix D for details ) . 2.3 SUMMARIZATION : TRAINING DETAILS . Format . At training time we prepend the keyword sequence to the source document separated with a special token . The summarization model is then trained to maximize p ( y|x , z ) in an end-to-end fashion . The keyword sequence maintains the order of the keywords as they were in the source document , but we observe that the model often ignores this ordering as it frequently differs between source and target summary . We also separate keywords from different source sentences with the special token ( “ | ” ) . In applications where the sentence boundary is unknown , as when users propose their own keywords , the “ | ” token can be ignored as in some of our experiments . Keyword Dropout . As mentioned in §2.2 , our keyword extraction strategy retains most words from the summary found in the source document . Without regularization , the dependence on such keywords is strong enough that the model rarely generates novel words in the summary . To remedy this , we randomly drop keywords at training time so that the model learns to rely on keywords that are present in the input , while also learning to still carry over key information from the source document that is not present in the keywords . Note that keywords dropout is applied at training time only . Next we are going to introduce the five control aspects that we study in this paper as example use cases of CTRLsum . Qualitative examples of them are shown in Table 1 . 2.4 SUMMARIZATION : INFERENCE WITH KEYWORDS .. The keywords provide a generic interface to control multiple aspects of summaries , which allows the user to optionally rely on automatically extracted keywords , user provided keywords , or a combination of both . This method provides clean separation of test-time user control and the training process , including pretraining . Consequently , CTRLsum can be adapted to new use cases without changing model parameters . For example , though nothing during training specifically focuses on controlling entities or length , examples below demonstrate the general applicability of keyword control to entity and length manipulation . Entity Control . The goal of entity control is to produce summaries that focus on entities of interest . Figure 1 exemplifies summarization with respect to different players when those player names are included as keywords directly influencing the summary . Length Control . Users may have different preferences as to the length of summaries . We allow such manipulation of the summary length through a user-specified length parameter . Specifically , we first separate the training data into 5 buckets by summary length so that each bucket has the same number of examples . Then we compute the average number of keywords Kl for each bucket on the training data . At test time , a user can specify length parameter l ∈ { 0 , 1 , 2 , 3 , 4 } to include the Kl keywords with the highest selection probability computed by the sequence tagger . This is similar to ( Saito et al. , 2020a ) , which uses the number of “ guiding words ” to control summary length . 2.5 SUMMARIZATION : INFERENCE WITH KEYWORDS AND PROMPTS . Prompts are pre-defined text sequences used as the target prefix to constrain decoding . They have been utilized to perform multi-purpose text generation with a single unified model ( Radford et al. , 2019 ; Brown et al. , 2020 ) . In the CTRLsum framework , prompts are a kind of control token sequence , and we always use such tokens as both the target prefix and keywords ( ablation results on using prompts as keywords or prefix alone can be found in Appendix C ) . We find that using prompts as keywords besides prefix helps focus on prompt-related content and mitigate the over-generation issue of vanilla summarization models , as we will show in §4.4 . To the best of our knowledge , we are the first to evaluate such a prompt-based control method for summarization systems . Summarizing Contributions . Existing datasets about scientific papers such as arXiv ( Cohan et al. , 2018 ) collect paper abstracts as the summaries , which often include extra background context and lack detailed contribution descriptions for the associated paper . In many cases , readers would benefit from an explicit list of contributions in order to understand the novelty and value of the paper . For these cases , we propose using control tokens – “ the main contributions of this paper are : ( 1 ) ” . This prompt then triggers generation of a summary focused on contributions . Summarizing Invention Purpose . Patent article summaries in existing datasets such as BIGPATENT ( Sharma et al. , 2019 ) can be over-complicated , often covering core method details . Yet for a non-technical reader it would be preferred to provide a one-sentence summary that states the purpose of the invention while ignoring technical details . To apply CTRLsum in this scenario , we use the control tokens , “ the purpose of the present invention is ” . This triggers a concise summary focused on patent purpose . Question-guided summarization . Human summarization can be constrained by questions ( Kryściński et al. , 2019 ) that require answers to be found in the summary . This points to an important connection between summarization and reading comprehension that we further explore . We hypothesize that a summarization model can directly answer some questions about the article if guided properly . This suggests the possibility of subsuming reading comprehension as a form of summarization . To verify this hypothesis , we use the control tokens “ Q : question text ? A : ” to trigger reading comprehension behaviour . We note that prompts- and keywords-based control are complementary in practice – while prompts could theoretically achieve any type of control , empirically they often do not work well for many aspects and the model is very sensitive to the precise wording of the prompt . For example , we found that using prompts such as “ a summary focused on [ entity ] is : ” or “ a short summary is : ” does not work as well as explicitly using keywords for entity or length control ( details can be found in Appendix C ) .
This paper proposes a two-stage summarization system where a document is provided along with (optionally) keywords or a prompt. This supplemental information helps to guide the summarization and possibly make it more user-specific. The keywords and prompt can also be guessed automatically by a BERT-base model, which seems to improve automatic metrics on CNN/daily mail.
SP:a50de9e3cf34fd189763ee172fcff026cbc679dc
Provable Robustness by Geometric Regularization of ReLU Networks
1 INTRODUCTION . Neural networks have been very successful in tasks such as image classification and speech recognition . However , recent work ( Szegedy et al. , 2014 ; Goodfellow et al. , 2015 ) has demonstrated that neural networks classifiers can be arbitrarily fooled by small , adversarially-chosen perturbations of their inputs . Notably , Su et al . ( 2017 ) demonstrated that neural network classifiers which can correctly classify “ clean ” images may be vulnerable to targeted attacks , e.g. , misclassify those same images when only a single pixel is changed . Previous work demonstrating this fragility of neural network classifiers to adversarial noise has motivated the development of many heuristic defenses including adversarial training ( Madry et al. , 2018 ) as well as certifiably robust classifiers such as randomized smoothing ( Cohen et al. , 2019 ; Salman et al. , 2019 ) which characterize the robustness of a classifier according to its smoothness . The intrinsic relationship between smoothness , or Lipschitz continuity—and their corresponding local variants—and robustness has motivated a variety of techniques to encourage uniform and local smoothness through the explicit regularization of approximations of the global and local Lipschitz constants ( Zhang et al. , 2018 ; Weng et al. , 2018a ; b ) . Recently , Lecuyer et al . ( 2019 ) ; Li et al . ( 2018 ) ; Cohen et al . ( 2019 ) ; Salman et al . ( 2019 ) proposed and extended a simple , scalable technique—randomized smoothing—to transform arbitrary functions ( e.g . neural network classifiers ) into certifiably and robust classifiers on ` 2 perturbations . Alternatively , previous work has also addressed adversarial robustness in the context of piecewiselinear classifiers ( e.g. , feedforward neural networks with ReLU activations ) . Wong & Kolter ( 2018 ) ; Jordan et al . ( 2019 ) propose to certify the robustness of a network f at an example x by considering a bound on the radius of the maximum ` p-norm ball contained within a union of polytopes over which f predicts the same class . Related to our work , Croce et al . ; Liu et al . ( 2020 ) propose maximum margin regularizers ( MMR ) which quantifies robustness of a network at a point according to the local region in which it lies and the distance to the classification boundary . Recent work also includes recovery and analysis of the piecewise linear function learned by an ReLU neural network during a training process ( Arora et al. , 2018 ; Montúfar et al. , 2014 ; Croce & Hein , 2019 ) . Typically , work in this area centers around studying the complexity , interpretation , and improvement of stability and robustness of neural networks . For example , Montúfar et al . ( 2014 ) ; Serra et al . ( 2017 ) studied piecewise linear representations of neural networks and proposed the “ activation profile ” to characterize the linear regions . In this work , we propose a novel regularizer for feedforward piecewise-linear neural networks , including convolutional neural networks , to increase their robustness to adversarial perturbations . Our Geometric Regularization ( GR ) method is based on the fact that ReLU networks define continuous piecewise affine functions and is inspired by classical techniques from convex geometry and linear programming . We provide a novel robustness certificate based on the local polytope geometry of a point and show that our regularizer provably maximizes this certificate . We evaluate the efficacy of our method on three datasets . Notably , our method works regardless of the perturbation model and relies on fewer hyperparameters compared with related approaches . We demonstrate that our regularization term leads to classifiers that are empirically robust and are comparable to the state of the art algorithms with respect to clean and robust test accuracy under ` 1 and ` ∞-norm adversarial perturbations . 2 PRELIMINARIES . In this section , we briefly present background terminology pertaining to polytopes and their characterizations , adversarially robust classification , and the polytope decomposition of the domain induced by an ReLU network and its linearization over a given polytope . 2.1 PIECEWISE-LINEAR NETWORKS . An ReLU network is a neural network such that all nonlinear activations are ReLU functions , where we denote the ReLU activation by σ : R → R , σ ( x ) = max { 0 , x } . Informally , we define σ : Rd → Rd by σ ( x ) = [ σ ( x1 ) , . . . , σ ( xd ) ] . Let f : Rd → [ 0 , 1 ] k be a feedforward ReLU network with L hidden layers ; for example , f may map from a d-dimensional image to a k-dimensional vector corresponding to likelihoods for k classes . Let nl be the number of hidden units at layer l , the input layer is of size n0 = d , and let W ( l ) ∈ Rnl−1×nl and b ( l ) ∈ Rnl denote the weight matrix and bias vector at layer l , respectively . Since f may be represented as the composition of L+ 1 linear transformations and L continuous piecewise-affine functions , f must necessarily be continuous and piecewise-affine ( for brevity , we will say piecewise-linear ) . The half-space representation , orH-representation , of convex polytopes is defined as follows : Definition 2.1 ( Convex polytope ) . A convex polytope K is the convex hull of finitely many points . Alternatively , a convex polytope may be expressed as an intersection of m half-spaces . The Hrepresentation of a polytope is defined as the solution set to a system of linear inequalities Ax ≤ b : K = { x : ∀j ∈ [ m ] , aj · x ≤ bj } Following definition 3.1 from Croce et al. , a function is piecewise-linear if there exists a finite set of convex polytopes { Qr } mr=1 ( referred to as linear regions of f ) such that ∪mr=1Qr = Rd and f is affine when restricted to each Qr , i.e. , can be expressed on Qr as f ( x ) = V x+ a . Given a feedforward ReLU network f and an input x ∈ Rd , we intend to recover the polytope Q conditioned on x and the linear restriction of f on Q . Therefore , we need to find A and b such that Ax ≤ b , where A and b define the intersection of k half-spaces , i.e . a polytope , and V and a corresponding to the linearization of f within this polytope such that f ( x ) = V x+ a when restricted to Q . We follow the formulation and notations of Croce et al .. If x ∈ Rd and g ( 0 ) ( x ) = x we recursively define the pre- and post-activation output of every layer : f ( l ) ( x ) = W ( l ) g ( l−1 ) ( x ) + b ( l ) g ( l−1 ) ( x ) = σ ( f ( l ) ( x ) ) The resulting classifier is then : f ( L+1 ) = W ( L+1 ) g ( L ) ( x ) + b ( L+1 ) . By rewriting σ as an affine function , we can write f ( l ) formally as a composition of affine functions : f ( l ) ( x ) = W ( l ) Σ ( l−1 ) ( x ) ( . . . ( W ( 1 ) x+ b ( 1 ) ) . . . ) + b ( h ) , where we define ∆ ( l ) , Σ ( l ) ∈ Rnl×nl conditioned on x and defined elementwise as : ∆ ( l ) i , j = { sign ( f ( l ) i ( x ) ) if i = j 0 otherwise , Σ ( l ) i , j = { 1 if i = j and f ( l ) i ( x ) > 0 0 otherwise We now derive the polytope of f at x and the linear restriction of f on polytope Q . By expanding the composition , we can concisely write f ( l ) ( x ) = V ( l ) x+ a ( l ) , where V ( l ) = W ( l ) ( l−l∏ h=1 Σ ( l−h ) ( x ) W ( l−h ) ) , a ( l ) = b ( l ) + l−1∑ h=1 ( l−1∏ m=1 W ( l+1−m ) Σ ( l−m ) ( x ) ) b ( h ) , ( 1 ) and characterize the polytope Q where x lies as the intersection of N = ∑L l=1 nl half-spaces : Γl , i = { z ∈ Rd|∆ ( l ) ( x ) ( V ( l ) z + a ( l ) ) ≥ 0 } . 2.2 POLYTOPE CENTERS . There are various definitions of the “ center ” of a polytope . Notably , the Chebyshev center of a polytope K is the center of the largest inscribed ball of K , or equivalently , the interior point of K that maximizes the minimum distance between itself and the boundary of K. More formally , Definition 2.2 ( Chebyshev center ) . Let K be a convex polytope . The Chebyshev center of K with respect to an ` p distance is the point x ∈ Rd which satisfies the following min-max problem : arg min x̂ max x∈K ||x− x̂||2p Previous work explored the Chebyshev center in the context of adversarial machine learning ( Croce et al . ; Jordan et al. , 2019 ) . For example , Croce & Hein ( 2019 ) propose to include the minimum distance to the boundary in a non-smooth regularization term in their Maximum Margin Regularizer ( MMR ) to encourage samples to lie close to the Chebyshev centers of their respective polytopes . In contrast , we explore the application of an alternative polytope center : the analytic center . The analytic center of a convex polytope K expressed via theH-representation Ax ≤ b is canonically defined as an element of K that maximizes the product of the distances to the hyperplanes characterized by the rows of A and the elements of b . Definition 2.3 ( Analytic center ) . Let K be a convex polytope expressed via the H-representation : Ax ≤ b . The analytic center of K is the point x ∈ Rd which satisfies the following objectives : xac = arg max x m∏ i=1 ( bi − d∑ j=1 aijxj ) = arg min x − m∑ i=1 log ( bi − d∑ j=1 aijxj ) ( 2 ) s.t . x ∈ K s.t . x ∈ K , where the second objective is canonically known as the logarithmic barrier potential ( Nesterov & Nemirovskii , 1994 ) . It naturally follows that when boundary-planes of the polytope are symmetric about the analytic center ( e.g . for polytopes that satisfy a central symmetry property ) , it exactly corresponds to the Chebyshev center . A polytope K ⊂ Rd is centrally symmetric if K = −K ; that is , x ∈ K if and only if there is a unique point y such that the reflection of x about y is in K : 2y − x ∈ K. The analytic center , namely a weighted analytic center , has been extensively used in interior point ( IP ) methods for linear programming ( Boyd & Vandenberghe , 2004 ) . In general , the measure of closeness to the analytic center is an important factor for the convergence of center-following algorithms . The properties of the log barrier potential that make it a popular choice for interior point methods ( including being twice continuously differentiable and convex ) suggest we might use it as a regularizer to encourage robustness during learning . Note , however , that the analytic center depends on how the set of particular inequalities is defined . The addition of redundant inequalities could feasibly push the analytic center arbitrarily close to the boundary of the polytope . We discuss this further in Sec . 3 .
The authors exploit the piecewise linear nature of ReLU neural networks to design a new regularizer that improves the robustness of the neural network. It can be viewed as a alternative to the regularizer proposed in Croce et al. (2018) -- the current regularizer uses the analytic center, whereas the previous work (named MMR) guarantees that are straightforward consequences of the geometric interpretation. The experimental setup is similar to the one in Croce et al. (2018), which compares the result of different adversarial defense methods on MNIST, F-MNIST, and CIFAR10 on small shallow networks. These computational results generally slightly outperform MMR on MNIST.
SP:77ff356f24bca397a8f89706e0f89ff14b6b81be
One Vertex Attack on Graph Neural Networks-based Spatiotemporal Forecasting
1 INTRODUCTION . Spatiotemporal traffic forecasting has been a long-standing research topic and a fundamental application in intelligent transportation systems ( ITS ) . For instance , with better prediction of future traffic states , navigation apps can help drivers avoid traffic congestion , and traffic signals can manage traffic flows to increase network capacity . Essentially , traffic forecasting can be modeled as a multivariate time series prediction problem for a network of connected sensors based on the topology of road networks . Given the complex spatial and temporal patterns governed by traffic dynamics and road network structure ( Roddick & Spiliopoulou , 1999 ) , recent studies have developed various Graph Neural Networks-based traffic forecasting models ( Yu et al. , 2018 ; Wu et al. , 2019 ; Li et al. , 2017 ; Guo et al. , 2019 ) . These deep learning models have achieved superior performance compared with traditional multivariate time series forecasting models such as vector autoregression ( VAR ) . However , recent research has shown that deep learning frameworks are very vulnerable to carefully designed attacks ( Kurakin et al. , 2016b ; Goodfellow et al. , 2014 ; Papernot et al. , 2016a ; Tramèr et al. , 2017 ; Kurakin et al. , 2016a ) . This raises a critical concern about the application of spatiotemporal GNNbased models for real-world traffic forecasting , in which robustness and reliability are of ultimate importance . For example , with a vulnerable forecasting model , a hacker can manipulate the predicted traffic states . Feeding these manipulated values into the downstream application can cause severe problems such as traffic congestion and even city-scale breakdown . However , it remains unclear how vulnerable these GNN-based spatiotemporal forecasting models are . Particularly , previous adversarial works can not be directly applied to fool GNN-based spatiotemporal forecasting models because of their causality and spatiotemporal mechanism , which is detailed in Section 2 . The goal of this paper is to understand and examine the vulnerability and robustness of GNN-based spatiotemporal forecasting models . In doing so , we design a One Vertex Attack ( OVA ) framework to break these forecasting models by manipulating only one vertex in the graph . We first propose a universal attack method against spatiotemporal GNNs by applying the inverse estimation to avoid using future ground truth . Then , we utilize the genetic algorithm , whose evaluation function is composed of the proposed universal attack method , to locate the “ weakest ” vertex . Here the weakest vertex refers to the vertex where attacking it will cause maximum damage to the forecasting models . Finally , we generate perturbations by solving an optimization problem . It should be noted that poisoning all vertices even multiple vertices in real-world applications is impossible , because the large scale of graph . For instance , the graph of traffic forecasting applications generally covers 1000 square kilometers , and it is unrealistic to organize Harker vehicles to poison all vertices in such a large scale road network . Hence , the proposed one-vertex attack is a realistic solution to evaluate the robustness and vulnerability of spatiotemporal forecasting models deployed in real-world applications . To prove the effectiveness of the proposed OVA method , we test it in two spatiotemporal traffic datasets with three different Spatiotemporal GNNs . The proposed method can cause at least 15 % accuracy drop , and there are about 10 % vertices severely impacted with the boundary of speed variation limited to 15km/h . The contribution of this paper can be summarized as follows . • First , to the best of our knowledge , this is the first study on attacking Spatiotemporal GNNs by poisoning only one vertex . • Second , we proposed a novel OVA method that is able to find the weakest vertex and generate optimal adversarial perturbations . • Third , we empirically study the effectiveness of the proposed method with multiple experiments on real-world datasets . 2 RELATED WORK . Adversarial Attacks against Time Series Analysis . Some previous works ( Chen et al. , 2019 ; Zhou et al. , 2019 ; Alfeld et al. , 2016 ; Karim et al. , 2019 ) proposed adversarial attack methods against Autoregressive models or time series classification models . The above works only consider univariate time series . Different from these works , we focus on complex spatiotemporal domains . The input of spatiotemporal GNNs is the temporal dynamic graph rather than regular matrices or sequences . We take the spatial correlation into consideration while the above works didn ’ t . Adversarial Attacks against Graph Neural Networks . Many studies ( Dai et al. , 2018 ; Zugner & Gunnemann , 2019 ; Chang et al. , 2020 ; Tang et al. , 2020 ) utilized Reinforcement Learning ( RL ) , meta learning , or genetic algorithm to fool GNNs in node , edge , and graph classification domains by tuning the graph topology . All these studies involve no temporal variation in their graphs , and they mainly focus on the spatial pattern . These can not be applied to fool spatiotemporal forecasting models because of the lack of temporal correlation . Particularly , attacking spatiotemporal forecasing models deployed in real-world applications by graph topology-based attack methods ( Zugner & Gunnemann , 2019 ; Chang et al. , 2020 ) are unrealistic , because tuning the graph topology represents tuning the sensor network that collects spatiotemporal data continuously and any modification on sensors can be easily sensed by the sensor network manager . Adversarial Attacks against Recurrent Neural Network . Recent studies ( Rosenberg et al. , 2019 ; Papernot et al. , 2016b ; Hu & Tan , 2017 ) demonstrated RNN classifiers were vulnerable to adversarial sequences . These adversarial works require the ground truth to compute adversarial sequences . Because of the forecasting applications ’ causality , the future ground truth is unavailable . Besides , these works focus on regular vectors or matrices , rather than irregular graphs . Hence these adversarial sequence generation models can not be directly applied to attack spatiotemporal GNN-based forecasting models . One Pixel Attack for Fooling Deep Neural Networks . Su et al . ( 2019 ) utilized Differential Evolution ( DE ) to generate the perturbation to poison one pixel in images , and then fool CNNs . Similar to one pixel attack , we only poison one vertex in graphs . However , images are regular-structured , and Su et al . ( 2019 ) consider no temporal variation . In addition , one pixel attack requires the ground truth to compute perturbations . In forecasting applications , the ground truth is the future traffic state , and it is inaccessible . The above features prevents one pixel attack from poisoning spatiotemporal forecasting models . 3 METHODOLOGY . 3.1 SPATIOTEMPORAL SEQUENCE FORECASTING AND SPATIOTEMPORAL GNNS . Because of the impossibility of deploying sensors as a regular grid in real-world applications , the form of spatiotemporal data is generally irregular . Consequently , to better mine the spatial information , the spatiotemporal sequence is represented as a temporally varied graph rather than a regular grid . The spatiotemporal sequence can be represented as Gt = { Vt , E , W } , where E is the set of edges in the graph , W is the weighted adjacency matrix whose every element describe the spatial relationship between different variates , Vt = { v1 , t , . . . , vn , t } is the set of condition values ( e.g . traffic speed and traffic volume ) collected from sensors on timestamp t , and n is the number of sensors ( Shuman et al. , 2013 ) . Multistep spatiotemporal sequence forecasting can be formulated as Equation 1 . Previous conditions from timestamp t−N + 1 to t are fed into a forecasting model F that outputs predictions of future conditions from t + 1 to t + M . In general , M ≤ N . The above process is customarily called sequence-to-sequence ( seq2seq ) forecasting . { G∗t+M , ... , G∗t+1 } = F ( { Gt , ... , Gt−N+1 } ) ( 1 ) where G∗i denotes the prediction of the condition on timestamp i . Most state-of-art spatiotemporal sequence forecasting models output a single future condition , which will be in turn fed as input into the model to forecast the next condition . This process is named as the recursive multistep forecasting , which can be represented as Equation 2 . G∗t+1 = F ( { Gt , Gt−1 , ... , Gt−N+1 } ) G∗t+2 = F ( { G∗t+1 , Gt , ... , Gt−N+2 } ) ... G∗t+M = F ( { G∗t+M−1 , G∗t+M−2 , ... , Gt−N+M } ) ( 2 ) Most state-of-art forecasting models , F , are constructed based on spatiotemporal GNNs ( Li et al. , 2017 ; Wu et al. , 2019 ; Yu et al. , 2018 ; Guo et al. , 2019 ) . Spatiotemporal GNNs are composed of both spatial layers and temporal layers . In general , gated linear unit ( GLU ) or Gated-CNN ( Bai et al. , 2018 ) works as the temporal layer to capture the temporal patterns embedded in the spatiotemporal sequence , and the Graph-CNN ( Shuman et al. , 2013 ; Bruna et al. , 2014 ) works as spatial layers to capture the spatial patterns . In this paper , we focus on adversarial studies towards recursive multistep spatiotemporal sequence forecasting . Our studies can be easily extended to seq2seq multistep forecasting . 3.2 UNIVERSAL ADVERSARIAL ATTACK AGAINST SPATIOTEMPORAL GNNS . In this section , we point out the form of adversarial attack against the spatiotemporal forecasting , and outline the gap between attacking spatiotemporal GNNs and attacking CNNs or GNNs . Then we propose the inverse estimation to fill the gap . Finally , we design the universal adversarial attack against spatiotemporal GNNs . 3.2.1 ADVERSARIAL ATTACKS AGAINST SPATIOTEMPORAL FORECASTING . Adversarial attacking against recursive multistep forecasting can be formed as Equation 3 . The goal is to mislead spatiotemporal GNNs to generate false forecasting by adding perturbations . F ( { Gt , ... , Gt−N+1 } + { ρt , ... , ρt−N+1 } ) 6= Gt+1 s.t . ‖ρi‖p ≤ ξ ∀ i ∈ { t , ... t−N + 1 } ( 3 ) where ρi denotes perturbations on timestamp i , ‖·‖p denotes ` p-norm , and ξ denotes the pre-defined constant to constrain the perturbation scale . In real-world traffic applications , ξ control the hacker ’ s driving behavior to balance the attack performance and detection avoidance . Because of spatiotemporal sequence ’ s causality , we can not access the future condition that works as the ground truth of forecasting models . In other words , Gt+1 in Equation 3 is not available on timestamp t. Previous adversarial studies against CNNs , RNNs , and GNNs ( Dai et al. , 2018 ; Papernot et al. , 2016b ; Kurakin et al. , 2016b ; Alfeld et al. , 2016 ) almost all involve the ground truth in the perturbation computation . In fooling spatiotemporal GNNs as Equation 3 , the ground truth , Gt+1 , is still inevitable . As we mentioned above , the future condition is unavailable , and thus we can not generate adversarial perturbations directly as Equation 3 . 3.2.2 INVERSE ESTIMATION . We propose Inverse Estimation to avoid using the future ground truth in fooling spatiotemporal GNNs . First , Equation 3 is transformed to Equation 4 , which represents our goal is to fool spatiotemporal GNNs to generate opposite forecasting . arg min { ρt , ... , ρt−N+1 } ‖F ( { Gt , ... , Gt−N+1 } + { ρt , ... , ρt−N+1 } ) −G̃t+1‖2+α· t∑ i=t−N+1 max ( 0 , ρ2i−ξ ) ( 4 ) where G̃t+1 denotes the opposite condition of Gt+1 , α denotes the penalty factor . The constrain in Equation 3 is replaced with a regularization term in Equation 4 to constrain the perturbation scale . The penalty factor α is set as 100 to make sure the scale penalty term is much larger than the first term in Equation 4 so that the scale of the computed perturbation is strictly forced . The above idea is similar to targeted attacks ( Akhtar & Mian , 2018 ) . However , classical targeted attacks still utilize the ground truth in perturbation computations . To use no future information , the opposite of future condition , G̃t+1 , is estimated by computing the opposite of the most recent condition , which is represented as Equation 5 . G̃t+1 ← G̃t = { Ṽt , E , W } ( 5 ) where Ṽt = { ṽ1 , t , ... , ṽn , t } denotes a collection of condition values opposite to these collected from sensors . Take the traffic condition for instance , when the condition is “ congested/low speed ” , its opposite is “ free/high speed ” , and vice versa . ṽi , t , the opposite of vi , t , is computed as Equation 6. ṽi , t = { max ( V ) , vi , t < mid min ( V ) , vi , t ≥ mid ( 6 ) where mid , max ( V ) , and min ( V ) represent the mean , maximum , and minimum value of the spatiotemporal dataset , respectively . Inverse Estimation outperforms directly estimating the future ground truth . The error of the estimation on the opposite of ground truth is smaller than errors of any direct estimation . To validate the above assumption , we carry out a test on PeMS dataset . We compare the proposed inverse estimation with three types of ground truth estimation methods , namely estimating by the most recent traffic condition ( MR ) , spatiotemporal graph convolution neural network ( STGCN ) , and AutoRegressive Integrated Moving Average ( ARIMA ) . The experiment result is shown as Table 1 . The proposed Inverse Estimation ’ s performance , including mean absolute error ( MAE ) , mean absolute percent error ( MAPE ) , root mean square error ( RMSE ) , and perfect estimation ratio ( PER ) , is better than others ’ . It should be noted 99.56 % IE ’ s estimations are exactly equal to the opposite of ground truth .
This paper studies the problem of attacking graph neural networks for spatio-temporal prediction problems (e.g., traffic speed prediction). The input of the problem is a spatio-temporal sequence represented as graphs at time t-N+1 to t, where a graph neural network is trained to predict the graph sequence for time t+1 to t+M. The aim is to add perturbations to the input graph sequence, such that the predicted graph sequence varies from the ground truth as much as possible.
SP:a26ff5fe208e5a7a24775d3823d886fc68b89997
Understanding Classifiers with Generative Models
1 INTRODUCTION . Machine learning algorithms have shown remarkable success in challenging supervised learning tasks such as object classification ( He et al. , 2016 ) and speech recognition ( Graves et al. , 2013 ) . Deep neural networks in particular , have gained traction because of their ability to learn a hierarchical feature representation of their inputs . Neural networks , however , are also known to be brittle . As they require a large number of parameters compared to available data , deep neural networks have a tendency to latch onto spurious statistical dependencies to make their predictions . As a result , they are prone to overfitting and can be fooled by imperceptible adversarial perturbations of their inputs ( Szegedy et al. , 2013 ; Kurakin et al. , 2016 ; Madry et al. , 2017 ) . Additionally , modern neural networks are poorly calibrated and do not capture model uncertainty well ( Gal & Ghahramani , 2016 ; Kuleshov & Ermon , 2017 ; Guo et al. , 2017 ) . They produce confidence scores that do not represent true probabilities and consequently , often output predictions that are over-confident even when fed with out-of-distribution inputs ( Liang et al. , 2017 ) . These limitations of neural networks are problematic as they become ubiquitous in applications where safety and reliability is a priority ( Levinson et al. , 2011 ; Sun et al. , 2015 ) . Fully probabilistic , generative models could mitigate these issues by improving uncertainty quantification and incorporating prior knowledge ( e.g , physical properties ( Wu et al. , 2015 ) ) into the classification process . While great progress has been made towards designing generative models that can capture high-dimensional objects such as images ( Oord et al. , 2016a ; Salimans et al. , 2017 ) , accurate probabilistic modeling of complex , high-dimensional data remains challenging . Our work aims at providing an understanding of these failure modes under the lens of probabilistic modelling . Instead of directly modeling the inputs , we rely on the ability of neural networks to extract features from high-dimensional data and build a generative model of these low-dimensional features . Because deep neural networks are trained to extract features from which they output classification predictions , we make the assumption that it is possible to detect failure cases from the learned representations . Given a neural network trained for image classification , we capture the distribution of the learned feature space with a Gaussian Mixture Model ( GMM ) and use the predicted likelihoods to detect inputs on which the model can not produce reliable classification results . We show that we are able to not only detect adversarial and out-of-distribution samples , but surprisingly also identify inputs from the test set on which a model is likely to make a mistake . We experiment on state-of-the-art neural networks trained on CIFAR-10 and CIFAR-100 ( Krizhevsky , 2009 ) and show , through statistical hypothesis testing , that samples leading to classification failures tend to correspond to features that lie in a low probability region of the feature space . Contributions Our contributions are as follows : • We provide a probabilistic explanation to the brittleness of deep neural networks and show that classifiers tend to make mistakes on inputs with low-probability features . • We demonstrate that a simple modeling by a GMM of the feature space learned by a deep neural network is enough to model the probability space . Other state-of-the-art methods for probabilistic modelling such as VAEs ( Kingma & Welling , 2013 ) and auto-regressive flow models ( Papamakarios et al. , 2017 ) fail in that regard . • We show that generative models trained on the feature space can be used as a single tool to reliably detect different sources of classification failures : test set errors due to poor generalization , adversarial samples and out-of-distribution samples . 2 RELATED WORK . An extensive body of work has been focused on understanding the behaviours of deep neural networks when they are faced with inputs on which they fail . We provide a brief overview below : Uncertainty quantification Uncertainty quantification for neural networks is crucial in order to detect when a model ’ s prediction can not be trusted . Bayesian approaches ( MacKay , 1992 ; Neal , 2012 ; Blundell et al. , 2015 ) , for example , seek to capture the uncertainty of a network by considering a prior distribution over the model ’ s weights . Training these networks is challenging because the exact posterior is intractable and usually approximated using a variety of methods for posterior inference . Closely related , Deep Ensembles ( Lakshminarayanan et al. , 2017 ) and Monte-Carlo Dropout ( Gal & Ghahramani , 2016 ) consider the outputs of multiple models as an alternative way to approximate the distribution . Model calibration ( Platt , 1999 ; Guo et al. , 2017 ) aims at producing confidence score that are representative of the likelihood of correctness . Uncertainty quantification may also be obtained by training the network to provide uncertainty measures . Prior Networks ( Malinin & Gales , 2018 ) model the implicit posterior distribution in the Bayesian approach , DeVries & Taylor ( 2018 ) ; Lee et al . ( 2017 ) have the network output an additional confidence output . These methods require a proxy dataset representing the out-of-distribution samples to train their confidence scores . Our method differs from the above as it seeks to give an uncertainty estimation based on a model trained with the usual cross-entropy loss . It does not require additional modelling assumptions , nor modifications to the model ’ s architecture or training procedure . As such , it relates closely to threshold-based methods . For example , Hendrycks & Gimpel ( 2016 ) use the logits outputs as a measure of the network ’ s confidence and can be improved using Temperature Scaling ( Guo et al. , 2017 ; Liang et al. , 2017 ) , a post-processing method that calibrates the model . Our work derives a confidence score by learning the probability distribution of the feature space and generalizes to adversarial samples ( Szegedy et al. , 2013 ) , another source of neural networks ’ brittleness . Adversarial samples Methods to defend against adversarial examples include explicitly training networks to be more robust to adversarial attacks ( Tramèr et al. , 2017 ; Madry et al. , 2017 ; Papernot et al. , 2015 ) . Another line of defense comes from the ability to detect adversarial samples at test time . Song et al . ( 2017 ) for example , use a generative model trained on the input images to detect and purify adversarial examples at test time using the observation that adversarial samples have lower predicted likelihood under the trained model . Closer to our work , Zheng & Hong ( 2018 ) and Lee et al . ( 2018 ) train a conditional generative model on the feature space learned by the classifier and derive a confidence score based on the Mahalanobis distance between a test sample and its predicted class representation . Our method makes the GMM class-agnostic , making it applicable to settings where labels are not available at inference time . We further show that the unsupervised GMM improves on the Mahalanobis score on the OOD detection task . 3 DETECTING MISTAKES . Detecting samples on which a trained classifier is likely to make a mistake is crucial when considering the range of applications in which these models are deployed . However , predicting in advance whether a sample will fail seems challenging , especially when the sample is drawn from the same distribution as the train set . To illustrate this , we show in Fig . 1 , samples from the CIFAR-100 training dataset and compare them to test samples and adversarial examples that our DenseNet model fails to classify properly . In both cases , it is not obvious to the human eye what fundamentally differs between correct and incorrect samples . Our main intuition is that a generative model trained on the feature space could capture these subtle differences . 3.1 BACKGROUND . We consider the problem of classification where we have access to a ( possibly partially ) labeled dataset D = { ( Xi , yi ) } Ni=1 where ( Xi , yi ) ∈ X × Y . Samples are assumed to be independently sampled from a distribution pdata ( X , y ) and we denote the marginal over X as pdata ( X ) . We will denote fθ : X −→ F = RD the feature extractor part of our neural network , where θ represents the parameters of the network and F is the feature space of dimension D. Given an input X , the predictions probabilities on the label space Y are then typically obtained using multivariate logistic regression on the extracted features . p ( y|X , θ , W , b ) = softmax ( Wfθ ( X ) + b ) ( 1 ) where ( W , b ) represent the weights and bias of the last fully-connected layer of the neural network . The model prediction is the class with the highest predicted probability : ŷ ( X ) = argmaxy∈Y p ( y|X , θ , W , b ) . The parameters ( θ , W , b ) are trained to minimize a crossentropy loss on the training set and performance is evaluated on the test set . Learning the data structure with Generative Models Understanding the data structure can greatly improve the ability of neural models to generalize . Recently , great progress has been made in designing powerful generative models that can capture high-dimensional complex data such as images . PixelCNN ( Salimans et al. , 2017 ; Oord et al. , 2016b ; a ) in particular , is a state-of-the-art deep generative model with tractable likelihood that represents the probability density of an image as a fully factorized product of conditionals over individual pixels of an image . pCNN ( X ) = n∏ i=1 pφ ( Xi|X1 : i−1 ) ( 2 ) Flow models such as the Masked Autogressive Flow ( MAF ) ( Papamakarios et al. , 2017 ) model provide similar tractability by parameterizing distributions with reversible functions which make that likelihood easily tractable through the change of variable formula . Another widely used class of generative models assumes the existence of unobserved latent variables . Gaussian Mixture Models , for example , assume discrete latents ( corresponding to the mixture component ) . Variational autoencoders ( Kingma & Welling , 2013 ) use continuous latent variables and parameterize the ( conditional ) distributions using neural networks . 3.2 MODELING THE FEATURE SPACE . We identify two main reasons why characterizing examples over which a classifier is likely to make a mistake is difficult . First , modeling the input data distribution pdata ( X ) , as done in Song et al . ( 2017 ) to detect adversarial examples , is challenging because of the high-dimensional , complex nature of the image space X . This approach also fails at detecting out-of-distribution samples , with state-of-the art models assigning higher likelihoods to samples that completely differ from their train set ( Nalisnick et al. , 2018 ) . Second , a model of pdata ( X ) doesn ’ t capture any information about the classifier itself . To overcome these difficulties , we propose to model the underlying distribution of the learned features F = fθ ( X ) , where X ∼ pdata ( X ) . Extracted features have lower dimension which makes them easier to model and they give access to some information on the classifier . Specifically , we are interested in comparing features Fc of samples that are correctly classified with features Fw of samples that are incorrectly classified by a trained neural network . Fc and Fw can be described as elements of the following sets : Fc ∈ C = { fθ ( X ) |ŷ ( X ) = y , ( X , y ) ∈ X × Y } ( 3 ) Fw ∈ W = { fθ ( X ) |ŷ ( X ) 6= y , ( X , y ) ∈ X × Y } ( 4 ) The distribution of the extracted features is modeled by : p ( F ) = K∑ k=1 πkN ( F ; µk , Σk ) ( 5 ) where K is the number of Gaussians in the mixture , πk , µk , Σk are the model parameters . We choose Σk to be diagonal in all our experiments . After training a neural network to convergence , we learn the parameters of the GMM using the EM algorithm . Our training set is built from the features extracted from the training image set by the trained classifier .
The authors provide a new method for detecting when deep networks are likely to fail and demonstrate through extensive experimentation its accuracy against generalization errors, out of distribution samples and adversarial attacks. The method builds on prior Mahalanobis metric of (Kimin Lee, et al., A unified framework for detecting out-of-distribution and adversarial samples. 2018) in two respects. First the authors use a single GMM fit to the model parameters that is class agnostic rather than a set of GMMs for each class, thus making it suitable for application in semi-supervised datasets. Second, the authors show ability to detect instances from a test set that are likely to cause a misclassification due to a failure to generalize. Surprisingly, the proposed approach performs better in most cases than the prior Mahalanobis approach even though it requires less information (no labels).
SP:6ae82744b305ffa175e482c92cc79137456bc2ee
Targeted VAE: Structured Inference and Targeted Learning for Causal Parameter Estimation
Undertaking causal inference with observational data is extremely useful across a wide range of domains including the development of medical treatments , advertisements and marketing , and policy making . There are two main challenges associated with undertaking causal inference using observational data : treatment assignment heterogeneity ( i.e. , differences between the treated and untreated groups ) , and an absence of counterfactual data ( i.e . not knowing what would have happened if an individual who did get treatment , were instead to have not been treated ) . We address these two challenges by combining structured inference and targeted learning . To our knowledge , Targeted Variational AutoEncoder ( TVAE ) is the first method to incorporate targeted learning into deep latent variable models . Results demonstrate competitive and state of the art performance . 1 INTRODUCTION . The estimation of the causal effects of interventions or treatments on outcomes is of the upmost importance across a range of decision making processes and scientific endeavours , such as policy making ( Kreif & DiazOrdaz , 2019 ) , advertisement ( Bottou et al. , 2013 ) , the development of medical treatments ( Petersen et al. , 2017 ) , the evaluation of evidence within legal frameworks ( Pearl , 2009 ; Siegerink et al. , 2016 ) and social science ( Vowels , 2020 ; Hernan , 2018 ; Grosz et al. , 2020 ) . Despite the common preference for Randomized Controlled Trial ( RCT ) data over observational data , this preference is not always justified . Besides the lower cost and fewer ethical concerns , observational data may provide a number of statistical advantages including greater statistical power and increased generalizability ( Deaton & Cartwright , 2018 ) . However , there are two main challenges when dealing with observational data . Firstly , the group that receives treatment is usually not equivalent to the group that does not ( treatment assignment heterogeneity ) , resulting in selection bias and confounding due to associated covariates . For example , young people may prefer surgery , older people may prefer medication . Secondly , we are unable to directly estimate the causal effect of treatment , because only the factual outcome for a given treatment assignment is available . In other words , we do not have the counterfactual associated with the outcome for a different treatment assignment to that which was given . Treatment effect inference with observational data is concerned with finding ways to estimate the causal effect by considering the expected differences between factual and counterfactual outcomes . We seek to address the two challenges by proposing a method that incorporates targeted learning techniques into a disentangled variational latent model , trained according to the approximate maximum likelihood paradigm . Doing so enables us to estimate the expected treatment effects , as well as individual-level treatment effects . Estimating the latter is especially important for treatments that interact with patient attributes , whilst also being crucial for enabling individualized treatment assignment . Thus , we propose the Targeted Variational AutoEncoder ( TVAE ) , undertake an ablation study , and compare our method ’ s performance against current alternatives on two benchmark datasets . 2 BACKGROUND . Problem Formulation : A characterization of the problem of causal inference with no unobserved confounders is depicted in the Directed Acyclic Graphs ( DAGs ) shown in Figs . 1 ( a ) and 1 ( b ) . Fig . 1 ( a ) is characteristic of observational data , where the assignment of treatment is related to the covariates . Fig . 1 ( b ) is characteristic of the ideal RCT , where the treatment is unrelated to the covariates . Here , xi ∼ p ( x ) ∈ Rm represents the m-dimensional , pre-treatment covariates for individual i assigned factual treatment ti ∼ p ( t|x ) resulting in factual outcome yti ∼ p ( y|x , t ) . Together , these constitute dataset D = { [ yi , ti , xi ] } Ni=1 where N is the sample size . The conditional average treatment effect for an individual with covariates xi may be estimated as τ̂i ( xi ) = E [ yi|xi , do ( t = 1 ) − yi|xi , do ( t = 0 ) ] , where the expectation accounts for the nondeterminism of the outcome ( Jesson et al. , 2020 ) . Alternatively , by comparing the post-intervention distributions when we intervene on treatment t , the Average Treatment Effect ( ATE ) is τ̂ ( x ) = Ex [ E [ y|x , do ( t = 1 ) ] − E [ y|x , do ( t = 0 ) ] ] . Here , do ( t ) indicates the intervention on t , setting all instances to a static value , dynamic value , or distribution and therefore removing any dependencies it originally had ( Pearl , 2009 ; van der Laan & Rose , 2018 ; 2011 ) . This scenario corresponds with the DAG in Fig . 1 ( b ) , where treatment t is no longer a function of the covariates x . Using an estimator for the conditional mean Q ( t , x ) = E ( y|t , x ) , we can calculate the Average Treatment Effect ( ATE ) and the empirical error for estimation of the ATE ( eATE ) .1 In order to estimate eATE we assume access to the ground truth treatment effect τ , which is only possible with synthetic or semi-synthetic datasets . The Conditional Average Treatment Effect ( CATE ) may also be calculated and the Precision in Estimating Heterogeneous Effect ( PEHE ) is one way to evaluate a model ’ s efficacy in estimating this quantity . See the appendix for the complete definitions of these terms . The Naive Approach : The DAG in Fig . 1 ( a ) highlights the problem with taking a naive approach to modeling the joint distribution p ( y , t , x ) . The structural relationship t ← x → y indicates both that the assignment of treatment t is dependent on the covariates x , and that a backdoor path exists through x to y . In addition to our previous assumptions , if we also assume linearity , adjusting for this backdoor path is a simple matter of adjusting for x by including it in a logistic regression . The naive method is an example of the uppermost methods depicted in Fig . 2 , and leads to the largest bias . The problem with the approach is ( a ) that the graph is likely misspecified such that the true relationships between covariates as well as the relationships between covariates and the outcome may be more complex . There is also problem ( b ) , that linearity is not sufficient to ‘ let the data speak ’ ( van der Laan & Rose , 2011 ) or to avoid biased parameter estimates . Using powerful nonparametric models ( e.g. , neural networks ) may solve the limitations associated with linearity and interactions to yield a consistent estimator for p ( y|x ) , and such a model is an example of the middlemost methods depicted in Fig . 2 . However , this estimator is not targeted to the estimation of the causal effect parameter τ , only predicting the outcome , and we require a means to reduce residual bias . Targeted Learning : Targeted Maximum Likelihood Estimation ( TMLE ) ( Schuler & Rose , 2016 ; van der Laan & Rose , 2011 ; 2018 ; van der Laan & Starmans , 2014 ) falls under the lowermost 1For a binary outcome variable y ∈ { 0 , 1 } , E ( y|t , x ) is the same as the conditional probability distribution p ( y|t , x ) . methods depicted in Fig . 2 and follows an approach involving three main steps : ( 1 ) estimation of the conditional mean E ( y|t , x ) with estimatorQ0 ( t , x ) , ( 2 ) estimation of the propensity scores with estimator g ( t|x ) , and ( 3 ) updating the conditional mean estimatorQ0 to getQ∗ using the propensity scores to attain an estimate for the causal parameter τ . The propensity score for individual i is defined as the conditional probability of being assigned treatment g ( ti , xi ) = p ( t = ti|x = xi ) , ∈ [ 0 , 1 ] ( Rosenbaum & Rubin , 1983 ) . The scores can be used to compensate for the relationship between the covariates and the treatment assignment using Inverse Probability of Treatment Weights ( IPTWs ) , reweighting each sample according to its propensity score . Step ( 3 ) is undertaken using ‘ clever covariates ’ which are similar to the IPTWs . They form an additional covariate variable H ( 1 , xi ) = g ( 1|xi ) −1 for individual i assigned treatment , and H ( 0 , xi ) = −g ( 1|xi ) −1 for individual i not assigned treatment . Note that when we condition on a single numeric value we imply an intervention ( e.g . g ( 1|xi ) ≡ g ( do ( t = 1 ) |xi ) ) . A logistic regression is then undertaken as y = σ−1 [ Q0 ( t , x ) ] + H ( t , x ) where σ−1 is the logit/inverse sigmoid function , Q0 ( t , x ) is set to be a constant , suppressed offset and represents a fluctuation parameter which is to be estimated from the regression . Once has been estimated , we acquire an updated estimator : Q1 ( do ( t = t ) , x ) = σ [ σ−1 [ Q0 ( t , x ) ] + H ( t , x ) ] ( 1 ) This equation tells us that our new estimator Q1 is equal to the old estimator balanced by the corrective H ( t , x ) term . This term adjusts for the bias associated with the propensity scores . When the parameter is zero , it means that there is no longer any influence from the ‘ clever covariates ’ H ( ) . The updated estimator Q1 can then be plugged into the estimator for τ̂ ( Q1 ; x ) . When the optimal solution is reached ( i.e . when = 0 ) , the estimator also satisfies what is known as the efficient Influence Curve ( IC ) , or canonical gradient equation ( Hampel , 1974 ; van der Laan & Rose , 2011 ; Kennedy , 2016 ) : N∑ i=1 IC∗ ( yi , ti , xi ) = 0 = N∑ i=1 [ H ( ti , xi ) ( yi −Q ( ti , xi ) ) +Q ( 1 , xi ) −Q ( 0 , xi ) − τ ( Q ; x ) ] ( 2 ) where IC ( yi , ti , xi ) represents the IC , and IC∗ ( yi , ti , xi ) represents the efficient IC for consistent Q and g. It can be seen from the right hand side Eq . 2 that at convergence , the estimator and its estimand are equal : yi = Q ( ti , xi ) and Q ( 1 , xi ) − Q ( 0 , xi ) = τ ( Q ; x ) . Over the whole dataset , all terms in Eq . 2 ‘ cancel ’ resulting in the mean ¯IC = 0 . As such , the logistic regression in Eq . 1 represents a solution to the IC via a parametric submodel . The TMLE method provides a doubly robust , asymptotically efficient estimate of the causal or ‘ target ’ parameter , and these theoretical guarantees make it attractive for adaptation into neural networks for causal effect estimation .
The proposed contribution of this work is to build of the existing literature which uses variational autoencoders for causal inference by (1) allowing an explicit mechanism for modeling irrelevant covariates and (2) incorporating targeted regularization into the latent variable nnet framework. Optimization of the model is done by minimizing the ELBO subject to a penalty term which the authors refer to as “targeted regularization”. This term is essentially an application of the TMLE model. Both of these proposals appear to improve the performance on what are now pretty standard benchmark datasets (jobs and ihdp).
SP:85919ada5493c7f63cbd171e7f9738fee02d8dfb
Why Convolutional Networks Learn Oriented Bandpass Filters: Theory and Empirical Support
It has been repeatedly observed that convolutional architectures when applied to image understanding tasks learn oriented bandpass filters . A standard explanation of this result is that these filters reflect the structure of the images that they have been exposed to during training : Natural images typically are locally composed of oriented contours at various scales and oriented bandpass filters are matched to such structure . We offer an alternative explanation based not on the structure of images , but rather on the structure of convolutional architectures . In particular , complex exponentials are the eigenfunctions of convolution . These eigenfunctions are defined globally ; however , convolutional architectures operate locally . To enforce locality , one can apply a windowing function to the eigenfunctions , which leads to oriented bandpass filters as the natural operators to be learned with convolutional architectures . From a representational point of view , these filters allow for a local systematic way to characterize and operate on an image or other signal . We offer empirical support for the hypothesis that convolutional networks learn such filters at all of their convolutional layers . While previous research has shown evidence of filters having oriented bandpass characteristics at early layers , ours appears to be the first study to document the predominance of such filter characteristics at all layers . Previous studies have missed this observation because they have concentrated on the cumulative compositional effects of filtering across layers , while we examine the filter characteristics that are present at each layer . 1 INTRODUCTION . 1.1 MOTIVATION . Convolutional networks ( ConvNets ) in conjunction with deep learning have shown state-of-the-art performance in application to computer vision , ranging across both classification ( e.g. , Krizhevsky et al . ( 2012 ) ; Tran et al . ( 2015 ) ; Ge et al . ( 2019 ) ) and regression ( e.g. , Szegedy et al . ( 2013 ) ; Eigen & Fergus ( 2015 ) ; Zhou et al . ( 2017 ) ) tasks . However , understanding of how these systems achieve their remarkable results lags behind their performance . This state of affairs is unsatisfying not only from a scientific point of view , but also from an applications point of view . As these systems move beyond the lab into real-world applications better theoretical understanding can help establish performance bounds and increase confidence in deployment . Visualization studies of filters that have been learned during training have been one of the key tools marshalled to lend insight into the internal representations maintained by ConvNets in application to computer vision , e.g. , Zeiler & Fergus ( 2014 ) ; Yosinski et al . ( 2015 ) ; Mahendran & Vedaldi ( 2015 ) ; Shang et al . ( 2016 ) ; Feichtenhofer et al . ( 2018 ) . Here , an interesting repeated observation is that early layers in the studied networks tend to learn oriented bandpass filters , both in two image spatial dimenstions , ( x , y ) > , in application to single image analysis as well as in three spatiotemporal dimensions , ( x , y , t ) > , in application to video . An example is shown in Fig . 1 . Emergence of such filters seems reasonable , because local orientation captures the first-order correlation structure of the data , which provides a reasonable building block for inferring more complex structure ( e.g. , local measurements of oriented structure can be assembled into intersections to capture corner structure , etc. ) . Notably , however , more rigorous analyses of exactly why oriented bandpass filters might be learned has been limited . This state of affairs motivates the current paper in its argument that the analytic structure of ConvNets constrains them to learn oriented bandpass filters . 1.2 RELATED RESEARCH . Visualization of receptive field profiles ( i.e. , pointspread functions Lim ( 1990 ) ) of the convolutional filters learned by contemporary ConvNets is a popular tool for providing insight into the image properties that are being represented by a network . A notable trend across these studies is that early layers appear to learn oriented bandpass filters in both two spatial dimensions , e.g. , Zeiler & Fergus ( 2014 ) ; Springenberg et al . ( 2015 ) ; Yosinski et al . ( 2015 ) ; Shang et al . ( 2016 ) , as well as three spatiotemporal dimensions , e.g. , Feichtenhofer et al . ( 2018 ) . Indeed , earlier studies with architectures that also constrained their filters to be convolutional in nature , albeit using a Hebbian learning strategy MacKay ( 2003 ) rather than the currently dominant back-propagation approach Rumelhart et al . ( 1986 ) , also yielded filters that visualized as having oriented bandpass filter characteristics Linsker ( 1986 ) . Interestingly , biological vision systems also are known to show the presence of oriented bandpass filters at their earlier layers of processing in visual cortex ; see Hubel & Wiesel ( 1962 ) for pioneering work along these lines and for more general review DeValois & DeValois ( 1988 ) . The presence of oriented bandpass filters in biological systems often has been attributed to their being well matched to the statistics of natural images Field ( 1987 ) ; Olshausen & Field ( 1996 ) ; Karklin & Lewicki ( 2009 ) ; Simoncelli & Olshausen ( 2001 ) , e.g. , the dominance of oriented contours at multiple scales . Similar arguments have been made regarding why such filters are learned by ConvNets . Significantly , however , studies have shown that even when trained with images comprised of random noise patterns , convolutional architectures still learn oriented bandpass filters Linsker ( 1986 ) . These latter results suggest that the emergence of such filter tunings can not be solely attributed to systems being driven to learn filters that were matched to their training data . Similarly , recent work showed that randomly initialized networks serve well in image restoration problems Ulyanov et al . ( 2018 ) . Some recent multilayer convolutional architectures have specified their earliest layers to have oriented bandpass characteristics , e.g. , Bruna & Mallat ( 2013 ) ; Jacobsen et al . ( 2016 ) ; Hadji & Wildes ( 2017 ) ; indeed , some have specified such filters across all layers Bruna & Mallat ( 2013 ) ; Hadji & Wildes ( 2017 ) . These design decisions have been variously motivated in terms of being well matched to primitive image structure Hadji & Wildes ( 2017 ) or providing useful building blocks for learning higher-order structures Jacobsen et al . ( 2016 ) and capturing invariances Bruna & Mallat ( 2013 ) . Other work has noted that purely mathematical considerations show that ConvNets are well suited to realizing filter designs for capturing multiscale , windowed spectra Bruna et al . ( 2016 ) ; however , it did not explicitly established the relationship to eigenfunctions of convolution nor offer an explanation for why deep-learning yields oriented bandpass filters when applied to ConvNets . It also did not provide empirical investigation of exactly what filter characteristics are learned at each convolutional layer of ConvNets . 1.3 CONTRIBUTIONS . In the light of previous research , the present work appears to be the first to offer an explanation of why ConvNets learn oriented bandpass filters , independently of the input , by appeal to the inherent properties of their architectures in terms of their eigenfunctions . By definition , the convolutional layers of a ConvNet are governed by the properties of convolution . For present purposes , a key property is that the eigenfunctions of convolution are complex exponentials . Imposing locality on the eigenfunctions leads to oriented bandpass filters , which therefore are the appropriate filters to be learned by a ConvNet . Indeed , these theoretical considerations suggest that oriented bandpass filters should be learned at all layers of a ConvNet , not just at early layers . We provide empirical support for this observation by examining filters across all convolutional layers of three standard ConvNets ( AlexNet Krizhevsky et al . ( 2012 ) , ResNet He et al . ( 2016 ) and VGG16 Simonyan & Zisserman ( 2014 ) ) and show that both numerically and visually they are well characterized as having learned oriented bandpass filters at all their convolutional layers . Our empirical study is distinct from earlier visualization efforts , which concentrate on the cumulative compositional results of filtering across layers that typically show emergence of complicated structures in the layerwise feature maps , while we focus on the complementary question of what primitive filter characteristics have been learned at each individual layer and offer both numerical as well as visualization analyses . 2 THEORY . This section details a novel explanation for why ConvNets learn oriented bandpass filters . The first two subsections largely review standard material regarding linear systems theory Oppenheim et al . ( 1983 ) and related topics Kaiser ( 2011 ) ; Kusse & Westwig ( 2006 ) , but are necessary to motivate properly our explanation . The final subsection places the material in the context of ConvNets . 2.1 EIGENFUNCTIONS OF CONVOLUTION . Let L be a linear operator on a function space . The set of eigenfunctions φn associated with this operator satisfy the condition Kusse & Westwig ( 2006 ) Lφn = λnφn . ( 1 ) That is , the operator acts on the eigenfunctions simply via multiplication with a constant , λn , referred to as the eigenvalue . It sometimes also is useful to introduce a ( positive definite ) weighting function , w , which leads to the corresponding constraint Lφn = λnwφn . ( 2 ) For cases where any function in the space can be expanded as a linear sum of the eigenfunctions , it is said that the collection of eigenfunctions form a complete set . Such a set provides a convenient and canonical spanning representation . Let x = ( x1 , x2 , . . . , xn ) > , a = ( a1 , a2 , . . . , an ) > and u = ( u1 , u2 , . . . , un ) > . For the space of convolutions , with the convolution of two functions , f ( x ) and h ( x ) defined as f ( x ) ∗ h ( x ) = ∫ ∞ −∞ f ( x− a ) h ( a ) da ( 3 ) it is well known that functions of the form f ( x ) = eiu > x are eigenfunctions of convolution Oppenheim et al . ( 1983 ) , i.e. , ∫ ∞ −∞ eiu > ( x−a ) h ( a ) da = eiu > x ∫ ∞ −∞ e−iu > ah ( a ) da ( 4 ) with the equality achieved via appealing to eiu > ( x−a ) = eiu > xe−iu > a and subsequently factoring eiu > x outside the integral as it is independent of a . The integral on the right hand side of ( 4 ) , ∫ ∞ −∞ e−iu > ah ( a ) da , ( 5 ) is the eigenvalue , referred to as the modulation transfer function ( MTF ) in signal processing Oppenheim et al . ( 1983 ) . Noting that eiu > x = cos ( u > x ) + i sin ( u > x ) leads to the standard interpretation of u in terms of frequency of the function ( e.g. , input signal ) . Given the eigenfunctions of convolution are parameterized in terms of their frequencies , it is useful to appeal to the Fourier transform of function f ( x ) , where we use the form Horn ( 1986 ) F ( u ) = ∫ ∞ −∞ f ( x ) e−iu > x dx , ( 6 ) because any convolution can be represented in terms of how it operates via simple multiplication of the eigenvalues , ( 5 ) , with the eigenfunctions , eiu > x , with u given by ( 6 ) . Thus , this decomposition provides a canonical way to decompose f ( x ) and explicate how a convolution operates on it .
This paper presents an explanation of why convolutional neural networks learn oriented bandpass filters - as has been commonly shown for early layers in various ConvNet architectures. The main argument is that oriented bandpass filters are the eigen-functions of localized convolution operators and in order to span the input signal space (regardless of its a structure) the network will always learn these functions as filters. Additionally, because this result is independent of input signal it should happen at all layers. These are demonstrated by examining filter of several trained neural network architectures and fitting them to Gabors - showing the fit is good with low residual error.
SP:00a28b287979b3cf803c21118f4e403a92e4f479
Discovering a set of policies for the worst case reward
1 INTRODUCTION . Reinforcement learning ( RL ) is concerned with building agents that can learn to act so as to maximize reward through trial-and-error interaction with the environment . There are several reasons why it can be useful for an agent to learn about multiple ways of behaving , i.e. , learn about multiple policies . The agent may want to achieve multiple tasks ( or subgoals ) in a lifelong learning setting and may learn a separate policy for each task , reusing them as needed when tasks reoccur . The agent may have a hierarchical architecture in which many policies are learned at a lower level while an upper level policy learns to combine them in useful ways , such as to accelerate learning on a single task or to transfer efficiently to a new task . Learning about multiple policies in the form of options ( Sutton et al. , 1999a ) can be a good way to achieve temporal abstraction ; again this can be used to quickly plan good policies for new tasks . In this paper we abstract away from these specific scenarios and ask the following question : what set of policies should the agent pre-learn in order to guarantee good performance under the worst-case reward ? A satisfactory answer to this question could be useful in all the scenarios discussed above and potentially many others . There are two components to the question above : ( i ) what policies should be in the set , and ( ii ) how to compose a policy to be used on a new task from the policies in the set . To answer ( ii ) , we propose the concept of a set improving policy ( SIP ) . Given any set of n policies , a SIP is any composition of these policies whose performance is at least as good as , and generally better than , that of all of the constituent policies in the set . We present two policy composition ( or improvement ) operators that lead to a SIP . The first is called set-max policy ( SMP ) . Given a distribution over states , a SMP chooses from n policies the one that leads to the highest expected value . The second SIP operator is generalized policy improvement ( Barreto et al. , 2017 , GPI ) . Given a set of n policies and their associated action-value functions , GPI is a natural extension of regular policy improvement in which the agent acts greedily in each state with respect to the maximum over the set of action-values ∗tomzahavy @ google.com functions . Although SMP provides weaker guarantees than GPI ( we will show this below ) , it is more amenable to analysis and thus we will use it exclusively for our theoretical results . However , since SMP ’ s performance serve as a lower bound to GPI ’ s , the results we derive for the former also apply to the latter . In our illustrative experiments we will show this result empirically . Now that we have fixed the answer to ( ii ) , i.e. , how to compose pre-learned policies for a new reward function , we can leverage it to address ( i ) : what criterion to use to pre-learn the policies . Here , one can appeal to heuristics such as the ones advocating that the set of pre-learned policies should be as diverse as possible ( Eysenbach et al. , 2018 ; Gregor et al. , 2016 ; Grimm et al. , 2019 ; Hansen et al. , 2019 ) . In this paper we will use the formal criterion of robustness , i.e. , we will seek a set of policies that do as well as possible in the worst-case scenario . Thus , the problem of interest to this paper is as follows : how to define and discover a set of n policies that maximize the worst possible performance of the resulting SMP across all possible tasks ? Interestingly , as we will discuss , the solution to this robustness problem naturally leads to a diverse set of policies . To solve the problem posed above we make two assumptions : ( A1 ) that tasks differ only in their reward functions , and ( A2 ) that reward functions are linear combinations of known features . These two assumptions allow us to leverage the concept of successor features ( SFs ) and work in apprenticeship learning . As our main contribution in this paper , we present an algorithm that iteratively builds a set of policies such that SMP ’ s performance with respect to the worst case reward provably improves in each iteration , stopping when no such greedy improvement is possible . We also provide a closed-form expression to compute the worst-case performance of our algorithm at each iteration . This means that , given tasks satisfying Assumptions A1 and A2 , we are able to provably construct a SIP that can quickly adapt to any task with guaranteed worst-case performance . Related Work . The proposed approach has interesting connections with hierarchical RL ( HRL ) ( Sutton et al. , 1999b ; Dietterich , 2000 ) . We can think of SMP ( and GPI ) as a higher-level policy-selection mechanism that is fixed a priori . Under this interpretation , the problem we are solving can be seen as the definition and discovery of lower-level policies that will lead to a robust hierarchical agent . There are interesting parallels between robustness and diversity . For example , diverse stock portfolios have less risk . In robust least squares ( El Ghaoui & Lebret , 1997 ; Xu et al. , 2009 ) , the goal is to find a solution that will perform well with respect to ( w.r.t ) data perturbations . This leads to a min-max formulation , and there are known equivalences between solving a robust ( min-max ) problem and the diversity of the solution ( via regularization ) ( Xu & Mannor , 2012 ) . Our work is also related to robust Markov decision processes ( MDPs ) ( Nilim & El Ghaoui , 2005 ) , but our focus is on a different aspect of the problem . While in robust MDPs the uncertainty is w.r.t the dynamics of the environment , here we focus on uncertainty w.r.t the reward and assume that the dynamics are fixed . More importantly , we are interested in the hierarchical aspect of the problem – how to discover and compose a set of policies . In contrast , solutions to robust MDPs are typically composed of a single policy . In Apprenticeship Learning ( AL ; Abbeel & Ng , 2004 ) the goal is also to solve a min-max problem in which the agent is expected to perform as well as an expert w.r.t any reward . If we ignore the expert , AL algorithms can be used to find a single policy that performs well w.r.t any reward . The solution to this problem ( when there is no expert ) is the policy whose SFs have the smallest possible norm . When the SFs are in the simplex ( as in tabular MDPs ) the vector with the smallest ` 2 norm puts equal probabilities on its coordinates , and is therefore `` diverse '' ( making an equivalence between the robust min-max formulation and the diversity perspective ) . In that sense , our problem can be seen as a modified AL setup where : ( a ) no expert demonstrations are available ( b ) the agent is allowed to observe the reward at test time , and ( c ) the goal is to learn a set of constituent policies . 2 PRELIMINARIES . We will model our problem of interest using a family of Markov Decision Processes ( MDPs ) . An MDP is a tuple M , ( S , A , P , r , γ , D ) , where S is the set of states , A is the set of actions , P = { P a | a ∈ A } is the set of transition kernels , γ ∈ [ 0 , 1 ] is the discount factor and D is the initial state distribution . The function r : S ×A× S 7→ R defines the rewards , and thus the agent ’ s objective ; here we are interested in multiple reward functions , as we explain next . Let φ ( s , a , s′ ) ∈ [ 0 , 1 ] d be an observable vector of features ( our analysis only requires the features to be bounded ; we use [ 0 , 1 ] for ease of exposition ) . We are interested in the set of tasks induced by all possible linear combinations of the features φ . Specifically , for any w ∈ Rd , we can define a reward function rw ( s , a , s′ ) = w · φ ( s , a , s′ ) . Given w , the reward rw is well defined and we will use the terms w and rw interchangeably to refer to the RL task induced by it . Formally , we are interested in the following set of MDPs : Mφ , { ( S , A , P , rw , γ , D ) |w ∈ W } . ( 1 ) In general , W is any convex set , but we will focus on the ` 2 d-dimensional ball denoted byW = B2 . This choice is not restricting , since the optimal policy in an MDP is invariant with respect to the scale of the rewards and the ` 2 ball contains all the directions . A policy in an MDP M ∈Mφ , denoted by π ∈ Π , is a mapping π : S → P ( A ) , where P ( A ) is the space of probability distributions over A . For a policy π we define the successor features ( SFs ) as ψπ ( s , a ) , ( 1− γ ) · E [ ∑∞ t=0 γtφ ( st , at , st+1 ) |P , π , st = s , at = a ] . ( 2 ) The multiplication by 1 − γ together with the fact that the features φ are in [ 0 , 1 ] assures that ψπ ( s , a ) ∈ [ 0 , 1 ] d for all ( s , a ) ∈ S ×A.1 We also define SFs that are conditioned on the initial state distribution D and the policy π as : ψπ , E [ ψπ ( s , a ) |D , π ] = Es∼D , a∼π ( s ) ψπ ( s , a ) . It should be clear that the SFs are conditioned on D and π whenever they are not written as a function of states and actions like in Eq . ( 2 ) . Note that , given a policy π , ψπ is simply a vector in [ 0 , 1 ] d. Since we will be dealing with multiple policies , we will use superscripts to refer to them—that is , we use πi to refer to the i-th policy . To keep the notation simple , we will refer to the SFs of policy πi as ψi . We define the action-value function ( or Q-function ) of policy π under reward rw as Qπw ( s , a ) , ( 1− γ ) E [ ∑∞ t=0 γtφ ( st , at , st+1 ) ·w|P , π , st = s , at = a ] = ψπ ( s , a ) ·w . We define the value of a policy π as vπw , ( 1− γ ) E [ ∑∞ t=0 γ tw · φ ( st ) |π , P , D ] = ψπ ·w . Note that vπw is a scalar , corresponding to the expected value of policy π under the initial state distribution D , given by vπw = E [ Qπw ( s , a ) |D , π ] = Es∼D , a∼π ( s ) Qπw ( s , a ) . ( 3 )
Given a rewardless environment MDP, the authors want to find a set of policies for the worst case reward function. Their process involves two steps: first to select the right set of policies and second to combine them to generate a new policy. The policy selection is made with the only goal to maximize the expected return of highest achieving policy of the set in the worst-case reward function (Equation (7)).
SP:41065df46326876b201c82ec287033ff43e9bcc8
Implicit Regularization of SGD via Thermophoresis
A central ingredient in the impressive predictive performance of deep neural networks is optimization via stochastic gradient descent ( SGD ) . While some theoretical progress has been made , the effect of SGD in neural networks is still unclear , especially during the early phase of training . Here we generalize the theory of thermophoresis from statistical mechanics and show that there exists an effective force from SGD that pushes to reduce the gradient variance in certain parameter subspaces . We study this effect in detail in a simple two-layer model , where the thermophoretic force functions to decreases the weight norm and activation rate of the units . The strength of this effect is proportional to squared learning rate and inverse batch size , and is more effective during the early phase of training when the model ’ s predictions are poor . Lastly we test our quantitative predictions with experiments on various models and datasets . 1 INTRODUCTION . Deep neural networks have achieved remarkable success in the past decade on tasks that were out of reach prior to the era of deep learning . Yet fundamental questions remain regarding the strong performance of over-parameterized models and optimization schemes that typically involve only first-order information , such as stochastic gradient descent ( SGD ) and its variants . In particular , optimization via SGD is known in many cases to result in models that generalize better than those trained with full-batch optimization . To explain this , much work has focused on how SGD navigates towards so-called flat minima , which tend to generalize better than sharp minima ( Hochreiter & Schmidhuber , 1997 ; Keskar et al. , 2017 ) . This has been argued by nonvacuous PACBayes bounds ( Dziugaite & Roy , 2017 ) and Bayesian evidence ( Smith & Le , 2018 ) . More recently , Wei & Schwab ( 2019 ) discuss how optimization via SGD pushes models to flatter regions within a minimal valley by decreasing the trace of the Hessian . However , these perspectives apply to models towards the end of training , whereas it is known that proper treatment of hyperparameters during the early phase is vital . In particular , when training a deep network one typically starts with a large learning rate and small batch size if possible . After training has progressed , the learning rate is annealed and decreased so that the model can be further trained to better fit the training set ( Krizhevsky et al. , 2012 ; Simonyan & Zisserman , 2015 ; He et al. , 2016b ; a ; You et al. , 2017 ; Vaswani et al. , 2017 ) . Crucially , using a small learning rate during the first phase of training usually leads to poor generalization and also result in large gradient variance practically ( Jastrzebski et al. , 2020 ; Faghri et al. , 2020 ) . However , limited theoretical work has been done to understand the effect of SGD on the early phase of training . Jastrzebski et al . ( 2020 ) argue for the existence of a “ break-even ” point on an SGD trajectory . This point depends strongly on the hyperparameter settings . They argue that the breakeven point with large learning rate and small batch size tends to have a smaller leading eigenvalue of the Hessian spectrum , and this eigenvalue sets an upper bound for the leading eigenvalue beyond this point . They also present experiments showing that large learning rate SGD will reduce the variance of the gradient . However their analysis focuses only on the leading eigenvalue of the Hessian spectrum and requires the strong assumption that the loss function in the leading eigensubspace is quadratic . Meanwhile Li et al . ( 2020 ) studied the simple setting of two-layer neural networks . They demonstrate that in this model , training with large learning rate in the early phase tends to result in better generalization than training with small learning rate . To explain this , they hypothesize a separation of features in the data : easy-to-generalize yet hard-to-fit features , and hard-to-generalize , easierto-fit features . They argue that a model trained with small learning rate will memorize easy-togeneralize , hard-to-fit patterns during phase one , and then generalize worse on hard-to-generalize , easier-to-fit patterns , while the opposite scenario occurs when training with large learning rate . However , this work relies heavily on the existence of these two distinct types of features in the data and the specific network architecture . Moreover , their analysis focuses mainly on learning rate instead of the effect of SGD . In this paper , we study the dynamics of model parameter motion during SGD training by borrowing and generalizing the theory of thermophoresis from physics . With this framework , we show that during SGD optimization , especially during the early phase of training , the activation rate of hidden nodes is reduced as is the growth of parameter weight norm . This effect is proportional to squared learning rate and inverse batch size . Thus , thermophoresis in deep learning acts as an implicit regularization that may improve the model ’ s ability to generalize . We first give a brief overview of the theory of thermophoresis in physics in the next section . Then we generalize this theory to models beyond physics and derive particle mass flow dynamics microscopically , demonstrating the existence of thermophoresis and its relation to relevant hyperparameters . Then we focus on a simple two-layer model to study the effect of thermophoresis in detail . Notably , we find the thermophoretic force is strongest during the early phase of training . Finally , we test our theoretical predictions with a number of experiments , finding strong agreement with the theory . 2 THERMOPHORESIS IN PHYSICS . Thermophoresis , also known as the Soret effect , describes particle mass flow in response to both diffusion and a temperature gradient . The effect was first discovered in electrolyte solutions ( Ludwig , 1859 ; Soret , 1897 ; Chipman , 1926 ) . However it was discovered in other systems such as gases , colloids , and biological fluids and solid ( Janek et al. , 2002 ; Köhler & Morozov , 2016 ) . Thermophoresis typically refers to particle diffusion in a continuum with a temperature gradient . In one method of analysis , the non-uniform steady-state density ρ is given by the ” Soret Equilibrium ” ( Eastman , 1926 ; Tyrell & Colledge , 1954 ; Wurger , 2014 ) , ∇ρ+ ρST∇T = 0 , ( 1 ) where T is temperature and ST is called the Soret coefficient . In other work by de Groot & Mazur ( 1962 ) , mass flow was calculated by non-equilibrium theory . They considered two types of processes for entropy balance : a reversible process stands for the entropy transfer and an irreversible process corresponds to the entropy production , or dissipation . The resulting mass flow induced by diffusion and temperature gradient was found to be J = −D∇ρ− ρDT∇T , ( 2 ) where D is the Einstein diffusion coefficient and DT is defined as thermal diffusion coefficient . Comparing the steady state in 1 and setting the flow to be zero , the Soret coefficient is simply ST = DT D . ( 3 ) The Soret coefficient can be calculated from molecular interaction potentials based on specific molecular models ( Wurger , 2014 ) . 3 THERMOPHORESIS IN GENERAL . In this section , we first study a kind of generalized random walk that has evolution equations for a particle state with coordinate q = { qi } i=1 , ... , n as qt+1 = qt − ηγf ( qt , ξ ) , ( 4 ) where f is a vector function , γ and ξ are random variables , and η is a small number controlling the step size . Notice that this is a generalized inhomogeneous random walk for the particle . Before further analysis , it is noted that the evolution equations 4 is similar to SGD updates in machine learning and we will show this in the next section . To isolate the effect of thermophoresis , we assume the random walk is unbiased , in which case P ( γf ( q , ξ ) = a ) = P ( γf ( q , ξ ) = −a ) , ( 5 ) for an arbitrary vector a . Thus there is no explicit force exerted on the particle . This simplification was used to demonstrate a residual thermophoretic force in the absence of a gradient . Including gradients is straightforward and corresponds to an external field that creates a bias term . We also denote the probability density , which we also call the mass density , as ρ ( q ) and gi ( q ) : = √∫ γ2f2i ( q , ξ ) dµ ( γ , ξ ) , ( 6 ) so that ηgi ( q ) is the standard deviation of the random walk in the ith direction . From a position q , we consider a subset of coordinate indices , U ⊆ { 1 , . . . , n } , wherein sign ( fi ( q , x ) ) = sign ( fj ( q , x ) ) and ∂igj ( q ) ≥ 0 ( 7 ) for all i , j ∈ U . We note here that indices will correspond to parameters when we study learning dynamics . The first property is necessary for our derivation . The second condition will be used at the end to conclude that each gi decreases . In order to study the dynamics of the particle and its density function , we focus on the probability mass flow induced by the inhomogeneous random walk . We will show that there is always a flow from regions with larger gi ( q ) to those with smaller gi ( q ) for i ∈ U , which is a generalization of thermophoresis in physics . Since η 1 , the movement of the particle will have a mean free path of gi ( q ) in ith direction . Therefore the random walk equation 4 becomes qi = qi − ηgi ( q ) ζi , ( 8 ) where i = 1 , . . . , n and ζi is a binary random variable with P ( ζi = −1 ) = P ( ζi = 1 ) = 0.5 . Moreover , from Eq . 7 , we also have that ζi = ζj for all i and j ∈ U . Next we will show that the flow projecting on the subspace U is always toward smaller gi ( q ) . Notice that although U can be multi-dimensional , the degree of freedom of the particle dynamics is 1 within U due to the sharing of the ζs , and therefore the mass flow projecting on it is also 1-dimensional . For each i ∈ U , we define the average flow in this dimension to be the mass that enters qi from q−i minus the mass from the opposite direction q+i . From Eq . 8 and the assumption that η 1 , only mass close to qi will move across qi at each step . We let the farthest mass that will flow across qi in step i be qi + ∆+i and qi − ∆ − i , where ∆ + i and ∆ + i are positive . ∆ + i and ∆ − i are thus defined implicitly by the equations : ∆+i = ηgi ( q+∆ + ) and ∆−i = ηgi ( q−∆− ) , respectively . Notice that if the random walk were homogeneous , we would have ∆+i = ∆ − i . In our inhomogeneous case , we have ∆+i ∼ ∆ − i ∼ ηgi ( q ) up to leading order of η , and the next to leading order will be calculated in order to compute the difference between ∆+i and ∆ − i . Now we are ready to calculate the mass flow through q . The mass flow projecting onto the subspace U is calculated by the mass through q from q + ∆+ minus the mass from q−∆− where ∆+i and ∆−i are as above for i ∈ U . It is straightforward to show that1 ∆+i −∆ − i = 2η 2 ∑ j∈U gj ( q ) ∂jgi ( q ) +O ( η 3 ) . ( 9 ) With this , we can compute the flow density , J , through q , finding J = −η2 √∑ i∈U g2i ( q ) ∑ i∈U gi ( q ) ∂iρ ( q ) − η2 ∑ i , j∈U gi ( q ) gj ( q ) ∂jgi ( q ) √∑ i∈U g 2 i ( q ) ρ ( q ) +O ( η3 ) , ( 10 ) where the derivation can be found in Appendix A.3 . This can be understood as described in Diagram 1 . Notice that this probability mass flow consists of two terms at order η2 . The first represents diffu- sion and the second corresponds to our goal in this section , namely the flow due to thermophoresis . By the second property of the gi in Eq . 7 , we find that the coefficient of thermophoresis ( Soret coefficient ) , which is defined as c : = −η2 ∑ i , j∈U gi ( q ) gj ( q ) ∂jgi ( q ) 2 √∑ i∈U g 2 i ( q ) ( 11 ) ≤ 0 , ( 12 ) is negative . This means that there is an effective force exerted on a particle at position q towards the smaller variance regime ( by analogy , the colder area ) . The coefficient is proportional to η2 .
This paper proposes that SGD has the implicitly bias of reducing gradient variance via the phenomenon of thermophoresis that masses tend to flow from regions with higher temperature / variance of random walk to regions with lower temperature / variance of random walk. In the setup of two-layer neural networks trained by SGD for binary classification, the authors show the analogous phenomenon that the model is biased towards smaller activation rate and the norm of its second layer weight. The dependence of the rate at which this phenomenon happens on the learning rate and batch size are verified in the experiments.
SP:b7704e25b5f177afa8f8d85636d652b5079afc0e
End-to-End on-device Federated Learning: A case study
1 INTRODUCTION . With the development of computation capability in devices , Machine Learning and Deep Learning arouse great interests by companies who are eager to utilize ML/DL methods to improve their service quality . However , with the explosive growth of data generated on edge devices , the traditional centralized Machine Learning approaches have shown its weakness , such as data communication overhead , model compatibility , training efficiency , etc . ( L ’ heureux et al. , 2017a ) Figure 1 illustrate a traditional Machine Learning approach with the centralized learning framework . The diagram contains four stages : 1 ) data collection from multiple distributed edge devices 2 ) model training in a central server 3 ) model validation based on existing testing data 4 ) model deployment to edge devices . However , the data collected from edge devices need to be transmitted to a central server and perform model training on that enormous data set , which turns out to be inefficient and expensive . In order to solve these challenges , Federated Learning has been introduced as an efficient approach which can distribute learning tasks to the edge devices and avoid massive data transmission . Furthermore , due to the characteristics of Federated Learning , on-device training becomes possible and the local model quality can be continuously improved . Although the concept of Federated Learning has significant benefits and potential in AI engineering fields , it is hard for industries and companies to build a reliable and applicable on-device Federated Learning system . Some previous research identified the challenges of deploying AI/ML components into a real-world industrial context . As defined in ” Engineering AI Systems : A Research Agenda ” ( Bosch et al. , 2020 ) , AI engineering refers to AI/ML-driven software development and deployment in production contexts . We found that the transition from prototype to the production-quality deployment of ML models proves to be challenging for many companies ( L ’ heureux et al. , 2017b ) ( Lwakatare et al. , 2019 ) . The contribution of this paper is threefold . First , we utilize Federated Learning , a distributed machine learning technique , and validate it on an important industrial use case , steering wheel prediction in the field of autonomous driving , which is also a classic end-to-end learning problem . Second , we describe an end-to-end on-device Federated Learning approach to efficiently train Machine Learning models in a distributed context . Third , we empirically evaluate our approach on the real-world autonomous driving data sets . Based on our results , we demonstrate the strength of Federated Learning compared to traditional centralized learning methods . The remainder of this paper is structured as follows . Section 2 we introduce the background of this study . Section 3 details our research method , including the simulation testbed , the utilized machine learning method and the evaluation metrics . Section 4 presents the end-to-end Federated Learning approach utilized in this paper . Sections 5 evaluates proposed learning approach to empirical data sets . Section 6 outlines the discussion on our observed results . Finally , Section 7 presents conclusions and future work . 2 BACKGROUND . The first Federated Learning framework was proposed by Google in 2016 Konečnỳ et al . ( 2016 ) , The major objective of Federated Learning is to learn a global statistical model from numerous edge devices . Particularly , the problem is to minimize the following finite-sum objective function 1 : min w f ( w ) , where f ( w ) : = n∑ i=1 λifi ( w ) ( 1 ) Here , w represents model parameters , n is the total number of edge devices , and fi ( w ) is the local objective function which is defined by high dimensional tensor w of the ith device . λi ( λi ≥ 0 and ∑ i λi = 1 ) gives the impact of ith remote device and is defined by users . This formula is also applied throughout this research . With the development of the concept of cloud computing and decentralized data storage , there has been increasing interest in how to utilize this technique to improve Machine Learning procedure . There are two classic applications which were realized by Hard et al . ( 2018 ) and Ramaswamy et al . ( 2019 ) . Authors applied Federated Learning techniques on the Google Keyboard platform to improve virtual keyboard search suggestion quality and emoji prediction . Their results show feasibility and benefit of applying federated learning to train models while preventing to transfer user ’ s data . However , authors in previous research didn ’ t discuss the impact of model training time and the communication cost when deploying and training models on edge devices . Furthermore , due to the system environment and troubles encountered when deploying Federated Learning into different cases , we propose an end-to-end approach and validate the on-device Federated Learning into a completely different industrial scenario , the steering wheel angle prediction . With the inspiration of the work by Bojarski et al . ( 2016 ) , we designed and developed a deep convolutional neural network to directly predict the steering wheel angle and control the steer based on the prediction . The training data is collected from single images sampled from video and the ground truth is recorded directly from real-time human behavior . In order to improve the model prediction performance , a two-stream model was first proposed in Simonyan & Zisserman ( 2014 ) and applied in Fernandez ( 2018 ) due to its robustness and lower training cost compared with other networks such as 3D-CNN ( Du et al. , 2019 ) , RNN ( Eraqi et al. , 2017 ) and LSTM ( Valiente et al. , 2019 ) . However , the previous research for this use case is mainly focusing on training model in a single vehicle . In this paper , we will apply Federated Learning to accelerate model training speed and improve the model quality by forming a global knowledge of all participating edge vehicles . 3 METHOD . In this research , the empirical method and learning procedure described in Zhang & Tsai ( 2003 ) was applied to make a quantitative measurement and comparison between Federated Learning and traditional centralized learning methods . In the following sections , we present the mathematical notations used in this paper , our testbed , data traces and the convolutional neural network architecture utilized for solving the problem of steering wheel angle prediction . 3.1 MATHEMATICAL NOTATIONS . We first introduce the mathematical notations that will be used in the rest of the paper : At An image frame matrix at time t Ot = f ( At , At−1 ) An optical-flow matrix at time t θt Steering wheel angle at time t 3.2 DATA TRACES AND TESTBED . The datasets used in this paper is SullyChen collection of labeled car driving data sets , which is available on Github ( SullyChen , 2018 ) . In this collection , there are two datasets ( Dataset 2017 and Dataset 2018 ) which record different driving information on different routes . Dataset 2017 contains approximately 45,500 images , 2.2 GB . The dataset records a trajectory of approximately 4km around the Rolling Hills in LA , USA in 2017 . 2017 dataset is used for pretraining the model . ( The model will be used to initialize edge models before Federated Learning ) Dataset 2018 contains approximately 63,000 images , 3.1 GB . This dataset records a trajectory of approximately 6km along the Palos Verdes in LA . 2018 dataset is used for end-to-end Federated Learning and model validation . In order to provide fruitful evaluation , we conducted experiment on 4 , 8 , 16 , 32 and 64 edge vehicles . The data were divided into corresponding number of parts and distributed to edge vehicles . Besides , in each edge vehicle , 70 % of local dataset were training set while 30 % were acted as the testing set . In each edge vehicle , the first 70 % data are regarded as the previously recorded driving information while the rest 30 % are future information . The models were continuously trained based on the recorded information and perform prediction and validation on the steering wheel angle information by using future driving data . Table 1 provides the hardware information for all of the servers . In order to simulate aggregation and edge functions , one server is adopted as the aggregation server while the rest are acted as edge vehicles . 3.3 MACHINE LEARNING METHOD . A two-stream deep Convolutional Neural Network ( CNN ) ( Simonyan & Zisserman , 2014 ) ( Fernandez , 2018 ) is utilized to perform angle prediction . Figure 2 gives the detailed information about the architecture . In our implementation , each stream has two convolutional layers and a max-pooling layer . After concatenating , there are two fully-connected layers which are activated by ReLU function . The model contains two different neural branches which consume spatial information and temporal information as the inputs of two streams and then output the predicted steering angle . For the first stream the model consumes 3 frames of RGB images , which can be denoted as { At−2 , At−1 , At } . The second stream is the two-frame optical flow calculated by two consecutive frames Ot−1 = f ( { At−2 , At−1 } ) and Ot = f ( { At−1 , At } ) . Optical flow is a common temporal representation in video streams , which captures the motion changes between two frames ( Horn & Schunck , 1981 ) . The method of calculating optical flow applied in this paper is based on Gunnar Farneback ’ s algorithm implemented in OpenCV ( Farnebäck , 2003 ) . Figure 3 demonstrate an example optical flow matrix produced by two consecutive image frame . The process of training an local CNN network is to find the best model parameters which cause the minimum difference between the predicted angle and the ground truth steering angle . Therefore , in this case , we choose mean square error as the local model training loss function : Loss = 1 N N∑ t=1 ( θt − θ̂t ) 2 ( 2 ) Here , N represents the batch size while θt and θ̂t represent the ground truth and the predicted steering wheel angle value at time t. During the process of model training in each edge vehicles , all the image frames will be firstly normalized to [ −1 , 1 ] . The batch size is 16 while the learning rate is set to 1e − 5 . The optimizer utilized here is Adam ( Kingma & Ba , 2014 ) , with parameters β1 = 0.6 , β2 = 0.99 and = 1e− 8 . 3.4 EVALUATION METRICS AND BASELINE MODEL . In order to provide fruitful results and evaluation , we selected three metrics and two baseline models . The three metrics includes angle prediction performance , model training time and bandwidth cost : • Angle prediction performance : We use root mean square error ( RMSE ) , a common metric , to measure the difference between prediction results and ground truth . The metrics can provide good estimation about the quality of trained model in each edge vehicles . • Model training time : This metric is defined as the time cost for training a model at the edge vehicles . The result is the average of four edge vehicles during one training round . This metric demonstrates the speed of local edge devices updating their knowledge which is crucial and important for those systems which need to quickly evolve to adapt to the rapidly-changed environment . The metrics was measured in all the vehicles by checking model deployment timestamp . • Bandwidth cost : This metric is defined as the total number of bytes transmitted during the whole training procedure . This metric demonstrate the total communication resources cost of achieving an applicable CNN model . The two baseline models includes model trained by applying traditional centralized learning approach and the locally trained model without model sharing : • Traditional Centralized Learning model ( ML ) : This baseline model is trained under the traditional centralized learning approach . Before model training , all the data from edge vehicles are firstly collected to a single server . The hyper-parameter of this model training is the same as Federated Learning which is mentioned in section 3.3 . The performance can be then compared with the model trained by Federated Learning approach . • Locally trained model without model sharing ( Local ML ) : This baseline models are trained directly on each edge vehicles . However , different from Federated Learning , there will be no model exchange during the training procedure . The prediction performance can be compared with Federated Learning model to see how Federated Learning can outperform those independently trained local models .
This paper applies federated learning to steering wheel prediction for autonomous driving. "Federated learning" in this draft mainly refers to an on-device distributed training algorithm where each edge device hosts its private data and performs local updates (model training) and send the updates back to a central server to aggregate. More specifically, this paper uses the most well-known algorithm in federated learning, FedAvg (McMahan et al. 2017).
SP:f0bf4f7a726d20e1ebf8d45033a61e3034ede044
Self-Supervised Multi-View Learning via Auto-Encoding 3D Transformations
1 INTRODUCTION . 3D object representation has become increasingly prominent for a wide range of applications , such as 3D object recognition and retrieval ( Maturana & Scherer , 2015 ; Qi et al. , 2016 ; Brock et al. , 2016 ; Qi et al. , 2017a ; b ; Klokov & Lempitsky , 2017 ; Su et al. , 2015 ; Feng et al. , 2018 ; Yu et al. , 2018 ; Yang & Wang , 2019 ) . Recent advances in Convolutional Neural Network ( CNN ) based methods have shown their success in 3D object recognition and retrieval ( Su et al. , 2015 ; Feng et al. , 2018 ; Yu et al. , 2018 ; Yang & Wang , 2019 ) . One important family of methods are view-based methods , which project a 3D object into multiple views and learn compact 3D representation by fusing the feature maps of these views for downstream tasks . Feature learning of multiple views in existing approaches are mostly trained in a supervised fashion , hinging on a large amount of data labels that prevents the wide applicability . Hence , self-supervised learning is in demand to alleviate the dependencies on labels by exploring unlabeled data for the training of multi-view feature representations in an unsupervised or ( semi- ) supervised fashion . Many attempts have been made to explore self-supervisory signals at various levels of visual structures for representation learning . The self-supervised learning framework requires only unlabeled data in order to formulate a pretext learning task ( Kolesnikov et al. , 2019 ) , where a target objective can be computed without any supervision . These pretext tasks can be summarized into four categories ( Jing & Tian , 2019 ) : generation-based ( Zhang et al. , 2016 ; Pathak et al. , 2016 ; Srivastava et al. , 2015 ) , context-based , free semantic label-based ( Faktor & Irani , 2014 ; Stretcu & Leordeanu , 2015 ; Ren & Jae Lee , 2018 ) , and cross modal-based ( Sayed et al. , 2018 ; Korbar et al. , 2018 ) . Among them , context-based pretext tasks include representation learning from image transformations , which is well connected with transformation equivariant representations as they transform equivalently as the transformed images . Transformation Equivariant Representation learning assumes that representations equivarying to transformations are able to encode the intrinsic structures of data such that the transformations can be reconstructed from the representations before and after transformations ( Qi , 2019 ) . Learning transformation equivariant representations has been advocated in Hinton ’ s seminal work on learning transformation capsules ( Hinton et al. , 2011 ) . Following this , a variety of approaches have been proposed to learn transformation equivariant representations ( Kivinen & Williams , 2011 ; Sohn & Lee , 2012 ; Schmidt & Roth , 2012 ; Skibbe , 2013 ; Lenc & Vedaldi , 2015 ; Gens & Domingos , 2014 ; Dieleman et al. , 2015 ; 2016 ; Zhang et al. , 2019 ; Qi et al. , 2019 ; Gao et al. , 2020 ; Wang et al. , 2020 ) . Nevertheless , these works focus on transformation equivariant representation learning of a single modality , such as 2D images or 3D point clouds . In this paper , we propose to learn Multi-View Transformation Equivariant Representations ( MVTER ) by decoding the 3D transformations from multiple 2D views . This is inspired by the equivariant transformations of a 3D object and its projected multiple 2D views . That is , when we perform 3D transformations on a 3D object , the 2D views projected from the 3D object via fixed viewpoints will transform equivariantly . In contrast to previous works where 2D/3D transformations are decoded from the original single image/point cloud and transformed counterparts , we exploit the equivariant transformations of a 3D object and the projected 2D views . We propose to decode 3D transformations from multiple views of a 3D object before and after transformation , which is taken as self-supervisory regularization to enforce the learning of intrinsic 3D representation . By estimating 3D transformations from the fused feature representations of multiple original views and those of the equivariantly transformed counterparts from the same viewpoints , we enable the accurate learning of 3D object representation even with limited amount of labels . Specifically , we first perform 3D transformation on a 3D object ( e.g. , point clouds , meshes ) , and render the original and transformed 3D objects into multiple 2D views with fixed camera setup . Then , we feed these views into a representation learning module to infer representations of the multiple views before and after transformation respectively . A decoder is set up to predict the applied 3D transformation from the fused representations of multiple views before and after transformation . We formulate multi-view transformation equivariant representation learning as a regularizer along with the loss of a specific task ( e.g. , classification ) to train the entire network end-to-end . Experimental results demonstrate that the proposed method significantly outperforms the state-of-the-art view-based models in 3D object classification and retrieval tasks . Our main contributions are summarized as follows . • We propose Multi-View Transformation Equivariant Representations ( MV-TER ) to learn 3D object representations from multiple 2D views that transform equivariantly with the 3D transformation in a self-supervised fashion . • We formalize the MV-TER as a self-supervisory regularizer to learn the 3D object representations by decoding 3D transformation from fused features of projected multiple views before and after the 3D transformation of the object . • Experiments demonstrate the proposed method outperforms the state-of-the-art view-based methods in 3D object classification and retrieval tasks in a self-supervised fashion . 2 RELATED WORKS . In this section , we review previous works on transformation equivariant representations and multiview based neural networks . 2.1 TRANSFORMATION EQUIVARIANT REPRESENTATIONS . Many approaches have been proposed to learn equivariant representations , including transforming auto-encoders ( Hinton et al. , 2011 ) , equivariant Boltzmann machines ( Kivinen & Williams , 2011 ; Sohn & Lee , 2012 ) , equivariant descriptors ( Schmidt & Roth , 2012 ) , and equivariant filtering ( Skibbe , 2013 ) . Lenc & Vedaldi ( 2015 ) prove that the AlexNet ( Krizhevsky et al. , 2012 ) trained on ImageNet learns representations that are equivariant to flip , scaling and rotation transformations . Gens & Domingos ( 2014 ) propose an approximately equivariant convolutional architecture , which utilizes sparse and high-dimensional feature maps to deal with groups of transformations . Dieleman et al . ( 2015 ) show that rotation symmetry can be exploited in convolutional networks for effectively learning an equivariant representation . Dieleman et al . ( 2016 ) extend this work to evaluate on other computer vision tasks that have cyclic symmetry . Cohen & Welling ( 2016 ) propose group equivariant convolutions that have been developed to equivary to more types of transformations . The idea of group equivariance has also been introduced to the capsule nets ( Lenssen et al. , 2018 ) by ensuring the equivariance of output pose vectors to a group of transformations . To generalize to generic transformations , Zhang et al . ( 2019 ) propose to learn unsupervised feature representations via Auto-Encoding Transformations ( AET ) by estimating transformations from the learned feature representations of both the original and transformed images . Qi et al . ( 2019 ) extend AET by introducing a variational transformation decoder , where the AET model is trained from an information-theoretic perspective by maximizing the lower bound of mutual information . Gao et al . ( 2020 ) extend transformation equivariant representations to graph data that are irregularly structured , and formalize graph transformation equivariant representation learning by auto-encoding node-wise transformations in an unsupervised manner . Wang et al . ( 2020 ) extend the AET to Generative Adversarial Networks ( GANs ) for unsupervised image synthesis and representation learning . 2.2 MULTI-VIEW LEARNING . Recently , many view-based approaches have been proposed for 3D object learning . These methods project 3D objects ( e.g. , point clouds , meshes ) into multiple views and extract view-wise features receptively via CNNs , and then fuse these features as the descriptor of 3D objects . Su et al . ( 2015 ) first propose a multi-view convolutional neural network ( MVCNN ) to learn a compact descriptor of an object from multiple views , which fuses view-wise features via a max pooling layer . Qi et al . ( 2016 ) introduce a new multi-resolution component into MVCNNs , and improve the classification performance . However , max pooling only retains the maximum elements from views , which leads to information loss . In order to address this problem , many subsequent works have been proposed to fuse multiple view-wise features into an informative descriptor for 3D objects . Feng et al . ( 2018 ) propose a group-view convolutional neural network ( GVCNN ) framework , which produces a compact descriptor from multiple views using a grouping strategy . Yu et al . ( 2018 ) propose a multi-view harmonized bilinear network ( MHBN ) , which learns 3D object representation by aggregating local convolutional features through the proposed bilinear pooling . To take advantage of the spatial relationship among views , Han et al . ( 2018 ) and Han et al . ( 2019 ) propose to aggregate the global features of sequential views via attention-based RNN and CNN , respectively . Kanezaki et al . ( 2018 ) propose to learn global features by treating pose labels as latent variables which are optimized to self-align in an unsupervised manner . Yang & Wang ( 2019 ) propose a relation network to connect corresponding regions from different viewpoints , and reinforce the information of individual view . Jiang et al . ( 2019 ) propose a Multi-Loop-View Convolutional Neural Network ( MLVCNN ) for 3D object retrieval by introducing a novel loop normalization to generate loop-level features . Wei et al . ( 2020 ) design a view-based GCN framework to aggregate multi-view features by investigating relations of views . 3 MV-TER : THE PROPOSED METHOD . In this section , we first define multi-view equivariant transformation in Section 3.1 . Then we formulate the MV-TER model and introduce the MV-TER framework in Section 3.2 and Section 3.4 , respectively . 3.1 MULTI-VIEW EQUIVARIANT TRANSFORMATION . 2D views are projections of a 3D object from various viewpoints , which transform in an equivariant manner as the 3D object transforms . Formally , given a 3D object M ∈ Rn×3 consisting of n points and a 3D transformation distribution T , we sample a transformation t ∼ T and apply it to M : M̃ = t ( M ) . ( 1 ) We project M onto 2D views from m viewpoints , denoted as V = { V1 , ... , Vm } , i.e. , Vi = pi ( M ) , ( 2 ) where pi : R3 7→ R2 is a projection function for the ith view . Subsequent to the transformation on M , the m views transform equivariantly , leading to Ṽ = { Ṽ1 , ... , Ṽm } . We have Ṽi = pi ( M̃ ) = pi ( t ( M ) ) = fi , t ( Vi ) , i = 1 , ... , m , ( 3 ) where fi , t ’ s are 2D transformations that are equivariant under the same 3D transformation t. Though Vi and Ṽi are projected along the same viewpoint i ( i.e. , the same camera setup ) , they are projections of the original 3D object and its transformed counterpart , thus demonstrating different perspectives of the same 3D object . Our goal is to learn the representations of 3D objects from their multiple 2D views by estimating the 3D transformation t as a pretext task from sampled multiple views before and after the transformation , i.e. , V and Ṽ .
This paper proposed a self-supervised learning method of 3D shape descriptors for 3D recognition through multi-view 2D image representation learning. To represent the 3D shape, the authors first project the object to a group of 2D project images, which helps apply deep learning due to the image's matrix data format. The Unsupervised Learning of Transformation Equivariant 2D Representations by Autoencoding Variational Transformations is used for 3D shape descriptor learning, which the authors claimed as "self-supervised" learning. The key idea of transformation equivariant representations is directly borrowed from existing works [1][2]. The method designed is almost the same as [1] except for the encoding network.
SP:475921dfd2c656b69172acf8d3ac49ecde54639d
Does injecting linguistic structure into language models lead to better alignment with brain recordings?
1 INTRODUCTION . Recent advances in deep neural networks for natural language processing ( NLP ) have generated excitement among computational neuroscientists , who aim to model how the brain processes language . These models are argued to better capture the complexity of natural language semantics than previous computational models , and are thought to represent meaning in a way that is more similar to how it is hypothesized to be represented in the human brain . For neuroscientists , these models provide possible hypotheses for how word meanings compose in the brain . Previous work has evaluated the plausibility of such candidate models by testing how well representations of text extracted from these models align with brain recordings of humans during language comprehension tasks ( Wehbe et al. , 2014 ; Jain & Huth , 2018 ; Gauthier & Ivanova , 2018 ; Gauthier & Levy , 2019 ; Abnar et al. , 2019 ; Toneva & Wehbe , 2019 ; Schrimpf et al. , 2020 ; Caucheteux & King , 2020 ) , and found some correspondences . However , modern NLP models are often trained without explicit linguistic supervision ( Devlin et al. , 2018 ; Radford et al. , 2019 ) , and the observation that they nevertheless learn some linguistic structure has been used to question the relevance of symbolic linguistic theories . Whether injecting such symbolic structures into language models would lead to even better alignment with cognitive measurements , however , has not been studied . In this work , we address this gap by training BERT ( §3.1 ) with structural bias , and evaluate its alignment with brain recordings ( §3.2 ) . Structure is derived from three formalisms—UD , DM and UCCA ( §3.3 ) —which come from different linguistic traditions , and capture different aspects of syntax and semantics . Our approach , illustrated in Figure 1 , allows for quantifying the brain alignment of the structurallybiased NLP models in comparison to the base models , as related to new information about linguistic structure learned by the models that is also potentially relevant to language comprehension in the brain . More specifically , in this paper , we : ( a ) Employ a fine-tuning method utilising structurally guided attention for injecting structural bias into language model ( LM ) representations . ( b ) Assess the representational alignment to brain activity measurements of the fine-tuned and non-fine-tuned LMs . ( c ) Further evaluate the LMs on a range of targeted syntactic probing tasks and a semantic tagging task , which allow us to uncover fine-grained information about their structuresensitive linguistic capabilities . ( d ) Present an analysis of various linguistic factors that may lead to improved or deteriorated brain alignment . 2 BACKGROUND : BRAIN ACTIVITY AND NLP . Mitchell et al . ( 2008 ) first showed that there is a relationship between the co-occurrence patterns of words in text and brain activation for processing the semantics of words . Specifically , they showed that a computational model trained on co-occurrence patterns for a few verbs was able to predict fMRI activations for novel nouns . Since this paper was introduced , many works have attempted to isolate other features that enable prediction and interpretation of brain activity ( Frank et al. , 2015 ; Brennan et al. , 2016 ; Lopopolo et al. , 2017 ; Anderson et al. , 2017 ; Pereira et al. , 2018 ; Wang et al. , 2020 ) . Gauthier & Ivanova ( 2018 ) however , emphasize that directly optimizing for the decoding of neural representation is limiting , as it does not allow for the uncovering of the mechanisms that underlie these representations . The authors suggest that in order for us to better understand linguistic processing in the brain , we should also aim to train models that optimize for a specific linguistic task and explicitly test these against brain activity . Following this line of work , Toneva & Wehbe ( 2019 ) present experiments both predicting brain activity and evaluating representations on a set of linguistic tasks . They first show that using uniform attention in early layers of BERT ( Devlin et al. , 2018 ) instead of pretrained attention leads to better prediction of brain activity . They then use the representations of this altered model to make predictions on a range of syntactic probe tasks , which isolate different syntactic phenomena ( Marvin & Linzen , 2019 ) , finding improvements against the pretrained BERT attention . Gauthier & Levy ( 2019 ) present a series of experiments in which they fine-tune BERT on a variety of tasks including language modeling as well as some custom tasks such as scrambled language modeling and part-of-speechlanguage modeling . They then perform brain decoding , where a linear mapping is learnt from fMRI recordings to the fine-tuned BERT model activations . They find that the best mapping is obtained with the scrambled language modelling fine-tuning . Further analysis using a structural probe method confirmed that the token representations from the scrambled language model performed poorly when used for reconstructing Universal Dependencies ( UD ; Nivre et al. , 2016 ) parse trees . When dealing with brain activity , many confounds may lead to seemingly divergent findings , such as the size of fMRI data , the temporal resolution of fMRI , the low signal-to-noise ratio , as well as how the tasks were presented to the subjects , among many other factors . For this reason , it is essential to take sound measures for reporting results , such as cross-validating models , evaluating on unseen test sets , and conducting a thorough statistical analysis . 3 APPROACH . Figure 1 shows a high-level outline of our experimental design , which aims to establish whether injecting structure derived from a variety of syntacto-semantic formalisms into neural language model representations can lead to better correspondence with human brain activation data . We utilize fMRI recordings of human subjects reading a set of texts . Representations of these texts are then derived from the activations of the language models . Following Gauthier & Levy ( 2019 ) , we obtain LM representations from BERT1 for all our experiments . We apply masked language model fine-tuning with attention guided by the formalisms to incorporate structural bias into BERT ’ s hidden-state representations . Finally , to compute alignment between the BERT-derived representations—with and without structural bias—and the fMRI recordings , we employ the brain decoding framework , where a linear decoder is trained to predict the LM derived representation of a word or a sentence from the corresponding fMRI recordings . 3.1 LM-DERIVED REPRESENTATIONS . BERT uses wordpiece tokenization , dividing the text to sub-word units . For a sentence S made up of P wordpieces , we perform mean-pooling over BERT ’ s final layer hidden-states [ h1 , ... , hP ] , obtaining a vector representation of the sentence Smean = 1P ∑ p hp ( Wu et al. , 2016 ) . In initial experiments , we found that this leads to a closer match with brain activity measurements compared to both max-pooling and the special [ CLS ] token , which is used by Gauthier & Levy ( 2019 ) . Similarly , for a word W made up of P wordpieces , to derive word representations , we apply mean-pooling over hidden-states [ h1 , ... , hP ] , which correspond to the wordpieces that make upW : Wmean = 1P ∑ p hp . For each dataset , DLM ∈ Rn×dH denotes a matrix of n LM-derived word or sentence representations where dH is BERT ’ s hidden layer dimensionality ( dH = 1024 in our experiments ) . 3.2 NEUROIMAGING DATASETS . We utilize two fMRI datasets , which differ in the granularity of linguistic cues to which human responses were recorded . The first , collected in Pereira et al . ( 2018 ) ’ s experiment 2 , comprises a single brain image per entire sentence . In the second , more fine-grained dataset , recorded by Wehbe et al . ( 2014 ) , each brain image corresponds to 4 words . We conduct a sentence-level analysis for the former and a word-level one for the latter.2 Pereira2018 consists of fMRI recordings from 8 subjects . The subjects were presented with stimuli consisting of 96 Wikipedia-style passages written by the authors , consisting of 4 sentences each . The subjects read the sentences one by one and were instructed to think about their meaning . The resulting data for each subject consists of 384 vectors of dimension 200,000 ; a vector per sentence . These were reduced to 256 dimensions using PCA by Gauthier & Levy ( 2019 ) . These PCA projections explain more than 95 % of the variance among sentence responses within each subject . We use this reduced version in our experiments . Wehbe2014 consists of fMRI recordings from 8 subjects as they read a chapter from Harry Potter and the Sorcerer ’ s Stone . For the 5000 word chapter , subjects were presented with words one by one for 0.5 seconds each . An fMRI image was taken every 2 seconds , as a result , each image corresponds 1Specifically : bert-large-uncased trained with whole-word masking . 2Even though the images are recorded at the 4-gram level of granularity , a word-level analysis is applied , as in Schwartz et al . ( 2019 ) . to 4 words . The data was further preprocessed ( i.e . detrended , smoothed , trimmed ) and released by Toneva & Wehbe ( 2019 ) . We use this preprocessed version to conduct word-level analysis , for which we use PCA to reduce the dimensions of the fMRI images from 25,000 to 750 , explaining at least 95 % variance for each participant . 3.3 FORMALISMS AND DATA . To inject linguistic structure into language models , we experiment with three distinct formalisms for representation of syntactic/semantic structure , coming from different linguistic traditions and capturing different aspects of linguistic signal : UD , DM and UCCA . An example graph for each formalism is shown in Figure 2 . Although there are other important linguistic structured formalisms , including meaning representations such as AMR ( Banarescu et al. , 2013 ) , DRS ( Kamp & Reyle , 1993 ; Bos et al. , 2017 ) and FGD ( Sgall et al. , 1986 ; Hajic et al. , 2012 ) , we select three relatively different formalisms as a somewhat representative sample . All three have manually annotated datasets , which we use for our experiments . UD ( Universal Dependencies ; Nivre et al. , 2020 ) is a syntactic bi-lexical dependency framework ( dependencies are denoted as arcs between words , with one word being the head and another the dependent ) , which represents grammatical relations according to a coarse cross-lingual scheme . For UD data , we use the English Web Treebank corpus ( EWT ; Silveira et al. , 2014 ) , which contains 254,830 words and 16,622 sentences , taken from five genres of web media : weblogs , newsgroups , emails , reviews , and Yahoo ! answers . DM ( DELPH-IN MRS Bi-Lexical Dependencies ; Ivanova et al. , 2012 ) is derived from the underspecified logical forms computed by the English Resource Grammar ( Flickinger et al. , 2017 ; Copestake et al. , 2005 ) , and is one of the frameworks targeted by the Semantic Dependency Parsing SemEval Shared Tasks ( SDP ; Oepen et al. , 2014 ; 2015 ) . We use the English SDP data for DM ( Oepen et al. , 2016 ) , annotated on newspaper text from the Wall Street Journal ( WSJ ) , containing 802,717 words and 35,656 sentences . UCCA ( Universal Cognitive Conceptual Annotation ; Abend & Rappoport , 2013 ) is based on cognitive linguistic and typological theories , primarily Basic Linguistic Theory ( Dixon , 2010/2012 ) . We use UCCA annotations over web reviews text from the English Web Treebank , and from English Wikipedia articles on celebrities . In total , they contain 138,268 words and 6,572 sentences . For uniformity with the other formalisms , we use bi-lexical approximation to convert UCCA graphs , which have a hierarchical constituency-like structure , to bi-lexical graphs with edges between words . This conversion keeps about 91 % of the information ( Hershcovich et al. , 2017 ) .
of paper: the authors explore adding a soft structural attention constraint to BERT, by penalizing attention weights that are substantially different from a head–dependent "adjacency" matrix derived from dependency parses. BERT is then fine-tuned with and without ("domain-finetuned") this constraint on corpus data for which fMRI recordings from participants during reading are available. A linear classifier from the final layer of BERT's embedding (mean-pooled) is then learned to the fMRI data. Within this pipeline, domain-finetuned models are not an improvement over unfinetuned BERT, but fine-tuning with the structural attention constraint improves decoding to fMRI data, especially for word-level data (the Wehbe2014 dataset).
SP:38e84c7dbf88091348af8b84192d8383c4b37b5b
Hopfield Networks is All You Need
We introduce a modern Hopfield network with continuous states and a corresponding update rule . The new Hopfield network can store exponentially ( with the dimension of the associative space ) many patterns , retrieves the pattern with one update , and has exponentially small retrieval errors . It has three types of energy minima ( fixed points of the update ) : ( 1 ) global fixed point averaging over all patterns , ( 2 ) metastable states averaging over a subset of patterns , and ( 3 ) fixed points which store a single pattern . The new update rule is equivalent to the attention mechanism used in transformers . This equivalence enables a characterization of the heads of transformer models . These heads perform in the first layers preferably global averaging and in higher layers partial averaging via metastable states . The new modern Hopfield network can be integrated into deep learning architectures as layers to allow the storage of and access to raw input data , intermediate results , or learned prototypes . These Hopfield layers enable new ways of deep learning , beyond fully-connected , convolutional , or recurrent networks , and provide pooling , memory , association , and attention mechanisms . We demonstrate the broad applicability of the Hopfield layers across various domains . Hopfield layers improved state-of-the-art on three out of four considered multiple instance learning problems as well as on immune repertoire classification with several hundreds of thousands of instances . On the UCI benchmark collections of small classification tasks , where deep learning methods typically struggle , Hopfield layers yielded a new state-ofthe-art when compared to different machine learning methods . Finally , Hopfield layers achieved state-of-the-art on two drug design datasets . The implementation is available at : https : //github.com/ml-jku/hopfield-layers 1 INTRODUCTION . The deep learning community has been looking for alternatives to recurrent neural networks ( RNNs ) for storing information . For example , linear memory networks use a linear autoencoder for sequences as a memory ( Carta et al. , 2020 ) . Additional memories for RNNs like holographic reduced representations ( Danihelka et al. , 2016 ) , tensor product representations ( Schlag & Schmidhuber , 2018 ; Schlag et al. , 2019 ) and classical associative memories ( extended to fast weight approaches ) ( Schmidhuber , 1992 ; Ba et al. , 2016a ; b ; Zhang & Zhou , 2017 ; Schlag et al. , 2021 ) have been suggested . Most approaches to new memories are based on attention . The neural Turing machine ( NTM ) is equipped with an external memory and an attention process ( Graves et al. , 2014 ) . Memory networks ( Weston et al. , 2014 ) use an arg max attention by first mapping a query and patterns into a space and then retrieving the pattern with the largest dot product . End to end memory networks ( EMN ) make this attention scheme differentiable by replacing arg max through a softmax ( Sukhbaatar et al. , 2015a ; b ) . EMN with dot products became very popular and implement a key-value attention ( Daniluk et al. , 2017 ) for self-attention . An enhancement of EMN is the transformer ( Vaswani et al. , 2017a ; b ) and its extensions ( Dehghani et al. , 2018 ) . The transformer has had a great impact on the natural language processing ( NLP ) community , in particular via the BERT models ( Devlin et al. , 2018 ; 2019 ) . Contribution of this work : ( i ) introducing novel deep learning layers that are equipped with a memory via modern Hopfield networks , ( ii ) introducing a novel energy function and a novel update rule for continuous modern Hopfield networks that are differentiable and typically retrieve patterns after one update . Differentiability is required for gradient descent parameter updates and retrieval with one update is compatible with activating the layers of deep networks . We suggest using modern Hopfield networks to store information or learned prototypes in different layers of neural networks . Binary Hopfield networks were introduced as associative memories that can store and retrieve patterns ( Hopfield , 1982 ) . A query pattern can retrieve the pattern to which it is most similar or an average over similar patterns . Hopfield networks seem to be an ancient technique , however , new energy functions improved their properties . The stability of spurious states or metastable states was sensibly reduced ( Barra et al. , 2018 ) . The largest and most impactful successes are reported on increasing the storage capacity of Hopfield networks . In a d-dimensional space , the standard Hopfield model can store d uncorrelated patterns without errors but only Cd/ log ( d ) random patterns with C < 1/2 for a fixed stable pattern or C < 1/4 if all patterns are stable ( McEliece et al. , 1987 ) . The same bound holds for nonlinear learning rules ( Mazza , 1997 ) . Using tricks-of-trade and allowing small retrieval errors , the storage capacity is about 0.138d ( Crisanti et al. , 1986 ; Hertz et al. , 1991 ; Torres et al. , 2002 ) . If the learning rule is not related to the Hebb rule , then up to d patterns can be stored ( Abu-Mostafa & StJacques , 1985 ) . For Hopfield networks with non-zero diagonal matrices , the storage can be increased to Cd log ( d ) ( Folli et al. , 2017 ) . In contrast to the storage capacity , the number of energy minima ( spurious states , stable states ) of Hopfield networks is exponential in d ( Tanaka & Edwards , 1980 ; Bruck & Roychowdhury , 1990 ; Wainrib & Touboul , 2013 ) . The standard binary Hopfield network has an energy function that can be expressed as the sum of interaction functions F with F ( x ) = x2 . Modern Hopfield networks , also called “ dense associative memory ” ( DAM ) models , use an energy function with interaction functions of the form F ( x ) = xn and , thereby , achieve a storage capacity proportional to dn−1 ( Krotov & Hopfield , 2016 ; 2018 ) . The energy function of modern Hopfield networks makes them robust against adversarial attacks ( Krotov & Hopfield , 2018 ) . Modern binary Hopfield networks with energy functions based on interaction functions of the form F ( x ) = exp ( x ) even lead to storage capacity of 2d/2 , where all stored binary patterns are fixed points but the radius of attraction vanishes ( Demircigil et al. , 2017 ) . However , in order to integrate Hopfield networks into deep learning architectures , it is necessary to make them differentiable , that is , we require continuous Hopfield networks ( Hopfield , 1984 ; Koiran , 1994 ) . Therefore , we generalize the energy function of Demircigil et al . ( 2017 ) that builds on exponential interaction functions to continuous patterns and states and obtain a new modern Hopfield network . We also propose a new update rule which ensures global convergence to stationary points of the energy ( local minima or saddle points ) . We prove that our new modern Hopfield network typically retrieves patterns in one update step ( -close to the fixed point ) with an exponentially low error and has a storage capacity proportional to c d−1 4 ( reasonable settings for c = 1.37 and c = 3.15 are given in Theorem 3 ) . The retrieval of patterns with one update is important to integrate Hopfield networks in deep learning architectures , where layers are activated only once . Surprisingly , our new update rule is also the key-value attention as used in transformer and BERT models ( see Fig . 1 ) . Our modern Hopfield networks can be integrated as a new layer in deep learning architectures for pooling , memory , prototype learning , and attention . We test these new layers on different benchmark datasets and tasks like immune repertoire classification . 2 MODERN HOPFIELD NETS WITH CONTINUOUS STATES . New energy function for continuous state Hopfield networks . In order to integrate modern Hopfield networks into deep learning architectures , we have to make them continuous . To allow for continuous states , we propose a new energy function that is a modification of the energy of modern Hopfield networks ( Demircigil et al. , 2017 ) . We also propose a new update rule which can be proven to converge to stationary points of the energy ( local minima or saddle points ) . We have N stored ( key ) patterns xi ∈ Rd represented by the matrix X = ( x1 , . . . , xN ) with the largest pattern M = maxi ‖xi‖ . The state ( query ) pattern is ξ ∈ Rd . For exponential interaction functions , we need the log-sum-exp function ( lse ) for 0 < β lse ( β , x ) = β−1 log ( N∑ i=1 exp ( βxi ) ) , ( 1 ) which is convex ( see appendix Eq . ( 461 ) , and Lemma A22 ) . The energy function E of the modern Hopfield networks for binary patterns xi and a binary state pattern ξ is E = − ∑N i=1 F ( ξTxi ) ( Krotov & Hopfield , 2016 ) . Here , F ( x ) = xn is the interaction function , where n = 2 gives the classical Hopfield network . The storage capacity is proportional to dn−1 ( Krotov & Hopfield , 2016 ) . This model was generalized by Demircigil et al . ( 2017 ) to exponential interaction functions F ( x ) = exp ( x ) which gives the energy E = − exp ( lse ( 1 , XT ξ ) ) . This energy leads to an exponential storage capacity of N = 2d/2 for binary patterns . Furthermore , with a single update , the fixed point is recovered with high probability for random patterns . However , still this modern Hopfield network has binary states . We generalize this energy function to continuous-valued patterns while keeping the properties of the modern Hopfield networks like the exponential storage capacity and the extremely fast convergence ( see Fig . 1 ) . For the new energy we take the logarithm of the negative energy of modern Hopfield networks and add a quadratic term of the current state . The quadratic term ensures that the norm of the state vector ξ remains finite and the energy is bounded . Classical Hopfield networks do not require to bound the norm of their state vector , since it is binary and has fixed length . We define the novel energy function E as E = − lse ( β , XT ξ ) + 1 2 ξT ξ + β−1 logN + 1 2 M2 . ( 2 ) We have 0 6 E 6 2M2 ( see appendix Lemma A1 ) . Using p = softmax ( βXT ξ ) , we define a novel update rule ( see Fig . 1 ) : ξnew = f ( ξ ) = Xp = Xsoftmax ( βXT ξ ) . ( 3 ) The next theorem states that the update rule Eq . ( 3 ) converges globally . The proof uses the ConcaveConvex Procedure ( CCCP ) ( Yuille & Rangarajan , 2002 ; 2003 ) , which is equivalent to Legendre minimization ( Rangarajan et al. , 1996 ; 1999 ) algorithms ( Yuille & Rangarajan , 2003 ) . Theorem 1 . The update rule Eq . ( 3 ) converges globally : For ξt+1 = f ( ξt ) , the energy E ( ξt ) → E ( ξ∗ ) for t→∞ and a fixed point ξ∗ . Proof . The update rule in Eq . ( 3 ) is the CCCP for minimizing the energy E , which is the sum of the convex 1/2ξT ξ and concave −lse ( see details in appendix Theorem 1 ) . Theorem 2 in Yuille & Rangarajan ( 2002 ) yields the global convergence property . Also , in Theorem 2 in Sriperumbudur & Lanckriet ( 2009 ) the global convergence of CCCP is proven via a rigorous analysis using Zangwill ’ s global convergence theory of iterative algorithms . The global convergence theorem only assures that for the energy E ( ξt ) → E ( ξ∗ ) for t→∞ but not ξt → ξ∗ . The next theorem strengthens Zangwill ’ s global convergence theorem ( Meyer , 1976 ) and gives convergence results similar to those known for expectation maximization ( Wu , 1983 ) . Theorem 2 . For the iteration Eq . ( 3 ) we have E ( ξt ) → E ( ξ∗ ) = E∗ as t → ∞ , for some stationary point ξ∗ . Furthermore , ∥∥ξt+1 − ξt∥∥ → 0 and either { ξt } ∞t=0 converges or , in the other case , the set of limit points of { ξt } ∞t=0 is a connected and compact subset of L ( E∗ ) , where L ( a ) = { ξ ∈ L | E ( ξ ) = a } and L is the set of stationary points of the iteration Eq . ( 3 ) . If L ( E∗ ) is finite , then any sequence { ξt } ∞t=0 generated by the iteration Eq . ( 3 ) converges to some ξ∗ ∈ L ( E∗ ) . For a proof , see appendix Theorem 2 . Therefore , all the limit points of any sequence generated by the iteration Eq . ( 3 ) are stationary points ( local minima or saddle points ) of the energy function E. Either the iteration converges or , otherwise , the set of limit points is a connected and compact set . The next theorem gives the results on the storage capacity of our new continuous state modern Hopfield network . We first define what we mean by storing and retrieving patterns using a modern Hopfield network with continuous states . Definition 1 ( Pattern Stored and Retrieved ) . We assume that around every pattern xi a sphere Si is given . We say xi is stored if there is a single fixed point x∗i ∈ Si to which all points ξ ∈ Si converge , and Si ∩ Sj = ∅ for i 6= j . We say xi is retrieved for a given if iteration ( update rule ) Eq . ( 3 ) gives a point x̃i that is at least -close to the single fixed point x∗i ∈ Si . The retrieval error is ‖x̃i − xi‖ . As with classical Hopfield networks , we consider patterns on the sphere , i.e . patterns with a fixed norm . For randomly chosen patterns , the number of patterns that can be stored is exponential in the dimension d of the space of the patterns ( xi ∈ Rd ) . Theorem 3 . We assume a failure probability 0 < p 6 1 and randomly chosen patterns on the sphere with radius M : = K √ d− 1 . We define a : = 2d−1 ( 1 + ln ( 2βK 2p ( d− 1 ) ) ) , b : = 2K 2β 5 , and c : = bW0 ( exp ( a+ln ( b ) ) , where W0 is the upper branch of the Lambert W function ( Olver et al. , 2010 , ( 4.13 ) ) , and ensure c ≥ ( 2√ p ) 4 d−1 . Then with probability 1− p , the number of random patterns that can be stored is N ≥ √p c d−1 4 . ( 4 ) Therefore it is proven for c ≥ 3.1546 with β = 1 , K = 3 , d = 20 and p = 0.001 ( a+ ln ( b ) > 1.27 ) and proven for c ≥ 1.3718 with β = 1 , K = 1 , d = 75 , and p = 0.001 ( a+ ln ( b ) < −0.94 ) . For a proof , see appendix Theorem A5 . The next theorem states that the update rule typically retrieves patterns after one update . Retrieval of a pattern xi for fixed point x∗i and query ξ is defined via an by ‖f ( ξ ) − x∗i ‖ < , that is , the update is -close to the fixed point . Retrieval with one update is crucial to integrate modern Hopfield networks into deep learning architectures , where layers are activated only once . First we need the concept of separation of a pattern . For pattern xi we define its separation ∆i to other patterns by : ∆i : = min j , j 6=i ( xTi xi − xTi xj ) = xTi xi − max j , j 6=i xTi xj . ( 5 ) The update rule retrieves patterns with one update for well separated patterns , that is , patterns with large ∆i . Theorem 4 . With query ξ , after one update the distance of the new point f ( ξ ) to the fixed point x∗i is exponentially small in the separation ∆i . The precise bounds using the Jacobian J = ∂f ( ξ ) ∂ξ and its value Jm in the mean value theorem are : ‖f ( ξ ) − x∗i ‖ 6 ‖Jm‖2 ‖ξ − x ∗ i ‖ , ( 6 ) ‖Jm‖2 6 2 β N M 2 ( N − 1 ) exp ( − β ( ∆i − 2 max { ‖ξ − xi‖ , ‖x∗i − xi‖ } M ) ) . ( 7 ) For given and sufficient large ∆i , we have ‖f ( ξ ) − x∗i ‖ < , that is , retrieval with one update . See proof in appendix Theorem A8 . At the same time , the retrieval error decreases exponentially with the separation ∆i . Theorem 5 ( Exponentially Small Retrieval Error ) . The retrieval error ‖f ( ξ ) − xi‖ of pattern xi is bounded by ‖f ( ξ ) − xi‖ 6 2 ( N − 1 ) exp ( − β ( ∆i − 2 max { ‖ξ − xi‖ , ‖x∗i − xi‖ } M ) ) M ( 8 ) and for ‖xi − x∗i ‖ 6 12 β M together with ‖xi − ξ‖ 6 1 2 β M by ‖xi − x∗i ‖ 6 2 e ( N − 1 ) M exp ( − β ∆i ) . ( 9 ) See proof in appendix Theorem A9 . Metastable states and one global fixed point . So far , we considered patterns xi that are well separated and the iteration converges to a fixed point which is near a pattern xi . If no pattern xi is well separated from the others , then the iteration converges to a global fixed point close to the arithmetic mean of the vectors . In this case the softmax vector p is close to uniform , that is , pi = 1/N . If some vectors are similar to each other and well separated from all other vectors , then a metastable state near the similar vectors exists . Iterations that start near the metastable state converge to this metastable state , also if initialized by one of the similar patterns . For convergence proofs to one global fixed point and to metastable states see appendix Lemma A7 and Lemma A12 , respectively . Hopfield update rule is attention of the transformer . The Hopfield network update rule is the attention mechanism used in transformer and BERT models ( see Fig . 1 ) . To see this , we assume N stored ( key ) patterns yi and S state ( query ) patterns ri that are mapped to the Hopfield space of dimension dk . We set xi = W TKyi , ξi = W T Q ri , and multiply the result of our update rule withWV . The matrices Y = ( y1 , . . . , yN ) T and R = ( r1 , . . . , rS ) T combine the yi and ri as row vectors . We define the matricesXT = K = YWK , ΞT = Q = RWQ , and V = YWKWV = XTWV , where WK ∈ Rdy×dk , WQ ∈ Rdr×dk , WV ∈ Rdk×dv . If β = 1/ √ dk and softmax ∈ RN is changed to a row vector , we obtain for the update rule Eq . ( 3 ) multiplied byWV : Z = softmax ( 1/ √ dk QK T ) V = softmax ( β RWQW T KY T ) Y WKWV . ( 10 ) The left part of Eq . ( 10 ) is the transformer attention . In the transformer self-attentionR = Y , and WKWV replaced by justWV . Besides the attention mechanism , Hopfield networks allow for other functionalities in deep network architectures , which we introduce via specific layers in the next section . The right part of Eq . ( 10 ) serves to explain these specific layers .
This work extends the binary Hopfield network (Demircigil et al., 2017) to continuous patterns and states. Connections are drawn between the result model to the attention layers of the transformers, the pooling operation of LSTM, similarity search, and fully connected layers. Experimental results are briefly described for analyzing the attention of Bert models, multiple instance learning, and small UCI classification tasks.
SP:1387491705ff05c21b119fad95ef3e63beaa57c9
Revisiting Dynamic Convolution via Matrix Decomposition
1 INTRODUCTION . Dynamic convolution ( Yang et al. , 2019 ; Chen et al. , 2020c ) has recently become popular for the implementation of light-weight networks ( Howard et al. , 2017 ; Zhang et al. , 2018b ) . Its ability to achieve significant performance gains with negligible computational cost has motivated its adoption for multiple vision tasks ( Su et al. , 2020 ; Chen et al. , 2020b ; Ma et al. , 2020 ; Tian et al. , 2020 ) . The basic idea is to aggregate multiple convolution kernels dynamically , according to an input dependent attention mechanism , into a convolution weight matrix W ( x ) = K∑ k=1 πk ( x ) Wk s.t . 0 ≤ πk ( x ) ≤ 1 , K∑ k=1 πk ( x ) = 1 , ( 1 ) where K convolution kernels { Wk } are aggregated linearly with attention scores { πk ( x ) } . Dynamic convolution has two main limitations : ( a ) lack of compactness , due to the use ofK kernels , and ( b ) a challenging joint optimization of attention scores { πk ( x ) } and static kernels { Wk } . Yang et al . ( 2019 ) proposed the use of a sigmoid layer to generate attention scores { πk ( x ) } , leading to a significantly large space for the convolution kernel W ( x ) that makes the learning of attention scores { πk ( x ) } difficult . Chen et al . ( 2020c ) replaced the sigmoid layer with a softmax function to compress the kernel space . However , small attention scores πk output by the softmax make the corresponding kernels Wk difficult to learn , especially in early training epochs , slowing training convergence . To mitigate these limitations , these two methods require additional constraints . For instance , Chen et al . ( 2020c ) uses a large temperature in the softmax function to encourage nearuniform attention . In this work , we revisit the two limitations via matrix decomposition . To expose the limitations , we reformulate dynamic convolution in terms of a set of residuals , re-defining the static kernels as Wk = W0 + ∆Wk , k ∈ { 1 , . . . , K } ( 2 ) where W0 = 1K ∑K k=1 Wk is the average kernel and ∆Wk = Wk −W0 a residual weight matrix . Further decomposing the latter with an SVD , ∆Wk = UkSkV Tk , leads to W ( x ) = K∑ k=1 πk ( x ) W0 + K∑ k=1 πk ( x ) UkSkV T k = W0 + UΠ ( x ) SV T , ( 3 ) where U = [ U1 , . . . , UK ] , S = diag ( S1 , . . . , SK ) , V = [ V1 , . . . , VK ] , and Π ( x ) stacks attention scores diagonally as Π ( x ) = diag ( π1 ( x ) I , . . . , πK ( x ) I ) , where I is an identity matrix . This decomposition , illustrated in Figure 1 , shows that the dynamic behavior of W ( x ) is implemented by the dynamic residual UΠ ( x ) SV T , which projects the input x to a higher dimensional space SV Tx ( fromC toKC channels ) , applies dynamic attention Π ( x ) over channel groups , and reduces the dimension back to C channels , through multiplication by U . This suggests that the limitations of vanilla dynamic convolution are due to the use of attention over channel groups , which induces a high dimensional latent space , leading to small attention values that may suppress the learning of the corresponding channels . To address this issue , we propose a dynamic convolution decomposition ( DCD ) , that replaces dynamic attention over channel groups with dynamic channel fusion . The latter is based on a full dynamic matrix Φ ( x ) , of which each element φi , j ( x ) is a function of input x . As shown in Figure 1- ( right ) , the dynamic residual is implemented as the product PΦ ( x ) QT of Φ ( x ) and two static matrices P , Q , such that Q compresses the input into a low dimensional latent space , Φ ( x ) dynamically fuses the channels in this space , and P expands the number of channels to the output space . The key innovation is that dynamic channel fusion with Φ ( x ) enables a significant dimensionality reduction of the latent space ( QTx ∈ RL , L C ) . Hence the number of parameters in P , Q is significantly reduced , when compared to U , V of Eq . 3 , resulting in a more compact model . Dynamic channel fusion also mitigates the joint optimization challenge of vanilla dynamic convolution , as each column of P , Q is associated with multiple dynamic coefficients of Φ ( x ) . Hence , a few dynamic coefficients of small value are not sufficient to suppress the learning of static matrices P , Q . Experimental results show that DCD both significantly reduces the number of parameters and achieves higher accuracy than vanilla dynamic convolution , without requiring the additional constraints of ( Yang et al. , 2019 ; Chen et al. , 2020c ) . 2 RELATED WORK . Efficient CNNs : MobileNet ( Howard et al. , 2017 ; Sandler et al. , 2018 ; Howard et al. , 2019 ) decomposes k × k convolution into a depthwise and a pointwise convolution . ShuffleNet ( Zhang et al. , 2018b ; Ma et al. , 2018 ) uses group convolution and channel shuffle to further simplify pointwise convolution . Further improvements of these architectures have been investigated recently . EfficientNet ( Tan & Le , 2019a ; Tan et al. , 2020 ) finds a proper relationship between input resolution and width/depth of the network . Tan & Le ( 2019b ) mix up multiple kernel sizes in a single convolution . Chen et al . ( 2020a ) trades massive multiplications for much cheaper additions . Han et al . ( 2020 ) applies a series of cheap linear transformations to generate ghost feature maps . Zhou et al . ( 2020 ) flips the structure of inverted residual blocks to alleviate information loss . Yu et al . ( 2019 ) and Cai et al . ( 2019 ) train one network that supports multiple sub-networks of different complexities . Matrix Decomposition : Lebedev et al . ( 2014 ) and Denton et al . ( 2014 ) use Canonical Polyadic decomposition ( CPD ) of convolution kernels to speed up networks , while Kim et al . ( 2015 ) investigates Tucker decompositions for the same purpose . More recently , Kossaifi et al . ( 2020 ) combines tensor decompositions with MobileNet to design efficient higher-order networks for video tasks , while Phan et al . ( 2020 ) proposes a stable CPD to deal with degeneracies of tensor decompositions during network training . Unlike DCD , which decomposes a convolutional kernel dynamically by adapting the core matrix to the input , these works all rely on static decompositions . Dynamic Neural Networks : Dynamic networks boost representation power by adapting parameters or activation functions to the input . Ha et al . ( 2017 ) uses a secondary network to generate parameters for the main network . Hu et al . ( 2018 ) reweights channels by squeezing global context . Li et al . ( 2019 ) adapts attention over kernels of different sizes . Dynamic convolution ( Yang et al. , 2019 ; Chen et al. , 2020c ) aggregates multiple convolution kernels based on attention . Ma et al . ( 2020 ) uses grouped fully connected layer to generate convolutional weights directly . Chen et al . ( 2020b ) extends dynamic convolution from spatial agnostic to spatial specific . Su et al . ( 2020 ) proposes dynamic group convolution that adaptively selects input channels to form groups . Tian et al . ( 2020 ) applies dynamic convolution to instance segmentation . Chen et al . ( 2020d ) adapts slopes and intercepts of two linear functions in ReLU ( Nair & Hinton , 2010 ; Jarrett et al. , 2009 ) . 3 DYNAMIC CONVOLUTION DECOMPOSITION . In this section , we introduce the dynamic convolution decomposition proposed to address the limitations of vanilla dynamic convolution . For conciseness , we assume a kernel W with the same number of input and output channels ( Cin = Cout = C ) and ignore bias terms . We focus on 1 × 1 convolution in this section and generalize the procedure to k×k convolution in the following section . 3.1 REVISITING VANILLA DYNAMIC CONVOLUTION . Vanilla dynamic convolution aggregates K convolution kennels { Wk } with attention scores { πk ( x ) } ( see Eq . 1 ) . It can be reformulated as adding a dynamic residual to a static kernel , and the dynamic residual can be further decomposed by SVD ( see Eq . 3 ) , as shown in Figure 1 . This has two limitations . First , the model is not compact . Essentially , it expands the number of channels by a factor of K and applies dynamic attention over K channel groups . The dynamic residual UΠ ( x ) SV T is a C × C matrix , of maximum rank C , but sums KC rank-1 matrices , since W ( x ) = W0 + UΠ ( x ) SV T = W0 + KC∑ i=1 πdi/Ce ( x ) uisi , iv T i , ( 4 ) where ui is the ith column vector of matrix U , vi is the ith column vector of matrix V , si , i is the ith diagonal entry of matrix S and d·e is ceiling operator . The static basis vectors ui and vi are not shared across different rank-1 matrices ( πdi/Ce ( x ) uisi , ivTi ) . This results in model redundancy . Second , it is difficult to jointly optimize static matrices U , V and dynamic attention Π ( x ) . This is because a small attention score πdi/Ce may suppress the learning of corresponding columns ui , vi in U and V , especially in early training epochs ( as shown in Chen et al . ( 2020c ) ) . 3.2 DYNAMIC CHANNEL FUSION . We propose to address the limitations of the vanilla dynamic convolution with a dynamic channel fusion mechanism , implemented with a full matrix Φ ( x ) , where each element φi , j ( x ) is a function of input x. Φ ( x ) is a L × L matrix , dynamically fusing channels in the latent space RL . The key idea is to significantly reduce dimensionality in the latent space , L C , to enable a more compact model . Dynamic convolution is implemented with dynamic channel fusion using W ( x ) = W0 + PΦ ( x ) Q T = W0 + L∑ i=1 L∑ j=1 piφi , j ( x ) q T j , ( 5 ) where Q ∈ RC×L compresses the input into a low dimensional space ( QTx ∈ RL ) , the resulting L channels are fused dynamically by Φ ( x ) ∈ RL×L and expanded to the number of output channels by P ∈ RC×L . This is denoted as dynamic convolution decomposition ( DCD ) . The dimension L of the latent space is constrained by L2 < C. The default value of L in this paper is empirically set to b C 2blog2 √ Cc c , which means dividing C by 2 repeatedly until it is less than √ C. With this new design , the number of static parameters is significantly reduced ( i.e . LC parameters in P or Q v.s . KC2 parameters in U or V , L < √ C ) , resulting in a more compact model . Mathematically , the dynamic residual PΦ ( x ) QT sums L2 rank-1 matrices piφi , j ( x ) qTj , where pi is the ith column vector of P , and qj is the jth column vector of Q . The constraint L2 < C , guarantees that this number ( L2 ) is much smaller than the counterpart ( KC ) of vanilla dynamic convolution ( see Eq . 4 ) . Nevertheless , due to the use of a full matrix , dynamic channel fusion Φ ( x ) retains the representation power needed to achieve good classification performance . DCD also mitigates the joint optimization difficulty . Since each column of P ( or Q ) is associated with multiple dynamic coefficients ( e.g . pi is related to φi,1 , . . . , φi , L ) , it is unlikely that the learning of pi is suppressed by a few dynamic coefficients of small value . In summary , DCD performs dynamic aggregation differently from vanilla dynamic convolution . Vanilla dynamic convolution uses a shared dynamic attention mechanism to aggregate unshared static basis vectors in a high dimensional latent space . In contrast , DCD uses an unshared dynamic channel fusion mechanism to aggregate shared static basis vectors in a low dimensional latent space .
This paper proposes a technique to reduce parameter count and improve training stability for dynamic convolutions using matrix decomposition. It looks at prior work (CondConv, DyConv) which aggregate multiple convolutional kernels via an attention score, and suggests this vanilla formulation is redundant since it sums $KC$ rank-1 matrices to create a rank-$C$ residual. The technique proposed in the paper (dynamic convolution decomposition) reduces the number of parameters via dimension reduction in the intermediate space, instead summing $L^2$ rank-1 matrices where $L^2 < C$. The authors provide experimental results on MobileNetV2 and ResNet comparing to prior works, as well as several ablations and possible extensions on their approach.
SP:66b06c7dee715568ea863831c610f1e6ebca05be
Local Clustering Graph Neural Networks
1 INTRODUCTION . Recent emergence of the Graph Neural Networks ( GNNs ) , exemplified by models like ChebyNet ( Defferrard et al. , 2016 ) , GCN ( Kipf & Welling , 2017 ) , GraphSAGE ( Hamilton et al. , 2017 ) , GAT ( Veličković et al. , 2018 ) , and GIN ( Xu et al. , 2019 ) , has drastically reshaped the landscape of the graph learning research . These methods generalize traditional deep learning algorithms to model graph-structured data by combining graph propagation and neural networks . Despite its conceptual simplicity , GNNs have reestablished the new state-of-the-art methods in various graph learning tasks , such as node classification , link prediction , and graph classification ( Hu et al. , 2020 ; Dwivedi et al. , 2020 ) , also served as key contributors to many real-world applications , such as recommendation system ( Ying et al. , 2018 ) , smart transportation ( Luo et al. , 2020 ) , visual question answering ( Teney et al. , 2017 ) and molecular de-novo design ( You et al. , 2018 ) . With the growth of real-world social and information networks ( Leskovec et al. , 2005 ) , there is an urgent need to scale GNNs to massive graphs . For example , the recommendation systems in Alibaba ( Zhu et al. , 2019 ) and Pinterest ( Ying et al. , 2018 ) require training and inferring GNNs on graphs with billions of edges . Building such large-scale GNNs , however , is a notoriously expensive process . For instance , the GNN models in Pinterest are trained on a 500GB machine with 16 Tesla K80 GPUs , and served on a Hadoop cluster with 378 d2.8xlarge Amazon AWS machines . Although one may think model parameters are the main contributors to the huge resource consumption of GNNs , previous work ( Ma et al. , 2019 ) suggests the main bottleneck actually comes from the entanglement between graph propagation and neural networks , which leads to a large and irregular computation graph for GNNs . This problem is further exacerbated by the small-world phenomenon ( Watts & Strogatz , 1998 ) , i.e. , even a relatively small number of graph propagation can involve full-graph computation . For example , in Facebook college graphs of John Hopkins ( Traud et al. , 2012 ) , the 2-hop neighbors of node 1 , as shown in Fig . 1a , covers 74.5 % of the whole graph . A common strategy to reduce the overhead of GNNs is to make the graph smaller but may bring side effects . For instance , graph sampling techniques , such as neighborhood sampling in GraphSAGE ( Hamilton et al. , 2017 ) , may lead to the high variance issue ( Chen et al. , 2018a ) . Alternatively , graph partition techniques , such as METIS ( Karypis & Kumar , 1998 ) that adopted by Cluster-GCN ( Chiang et al. , 2019 ) and AliGraph ( Zhu et al. , 2019 ) , essentially involves extra full- graph computation for preprocessing . Besides reducing graph size , a recent attempt ( Wu et al. , 2019 ) to scale up GNNs is to decouple graph propagation and neural networks . However , such simplification may sacrifice certain performances . In this work , we explore a theoretically guaranteed strategy , local clustering ( Spielman & Teng , 2013 ; Andersen et al. , 2006 ) , intending to design a lightweight , effective and scalable GNN framework . We establish a connection between GNNs and local clustering theory , showing that the graph propagation in GNNs ( i.e. , short random-walk ) has a high probability to be stuck at a local cluster ( a.k.a , community ) , and the escaping probability is proportional to the conductance of the local cluster . We propose Local Clustering Graph Neural Networks ( LCGNN ) , which utilizes local clustering algorithms to seek local and dense subgraphs ( e.g. , Fig . 1b ) for GNN training and inference . Different from full-batch and graph partition-based methods , LCGNN does not incur full-graph processing and can be conducted locally . Compared to various baselines , LCGNN achieves stateof-the-art results in four Open Graph Benchmark ( Hu et al. , 2020 ) datasets . Moreover , the locality nature of LCGNN allows it to scale to graphs with 100M nodes and 1B edges on a single GPU . The rest of the paper is organized as follows . Section 2 gives a brief background summary followed by a survey of related works in section 3 . In section 4 and section 5 , we establish the connection between GNNs and local clustering , and then describe our LCGNN framework . Section 6 presents the experimental results and ablation study . Finally , we concludes this work in section 7 . 2 BACKGROUND . In this section , we bring the necessary background about graph , graph convolutional networks ( GCN ) , ( lazy ) random walk on graphs , and graph conductance . Graph Notations The graph G = ( V , E , A ) consists of |V | = n nodes and |E| = m edges . A ∈ Rn×n+ is the adjacency matrix where its entry A ( i , j ) , if nonzero , denote there is an edge between node i and j with edge weight Aij . In this work , we assume the input graph is undirected and unweighted , and our analysis can be generalized to the weighted graph case easily . For undirected graph , the degree matrix D , diag ( d ( 1 ) , · · · , d ( n ) ) is a diagonal matrix where d ( i ) , ∑ jA ( i , j ) is the degree of node i . Moreover , each node inG is associated with a F -dimensional feature vector , denoted by xi ∈ RF . The entire feature matrix X ∈ Rn×F is the concatenation of node feature vectors . There are two matrices that play importance roles in the design and analysis of GCN ( Kipf & Welling , 2017 ) — the normalized graph Laplacian L , D−1/2AD−1/2 and the random walk transition probability matrix P , AD−1 . Note that the entry P ( i , j ) indicates the probability that the random walk goes from node j to node i. Graph Convolutional Networks ( GCN ) GCN ( Kipf & Welling , 2017 ) initializes the node representation as the input feature matrix H ( 0 ) ←X , and iteratively apply non-linear transformation and graph propagation on node representation : H ( k ) ← ReLU ( LH ( k−1 ) W ( k ) ) , where left multiplying H ( k−1 ) by normalized graph Laplacian L acts as the graph propagation , and right multiplying H ( k−1 ) by W as well as the ReLU ( Glorot et al. , 2011 ) activation acts as the non-linear transformation . For the node classification task , a K-layer GCN predicts node labels Y with a softmax classifier : Y ← softmax ( LH ( K−1 ) W ( K ) ) . Take a two-layer GCN ( K = 2 ) as a running exam- ple , the predicted node labels Y is defined as Y ← softmax ( LReLU ( LH ( 0 ) W ( 1 ) ) W ( 2 ) ) . Lazy Random Walk In practice , many GNNs add ( weighted ) self-loops to the graphs ( A ← A+αI , Kipf & Welling ( 2017 ) ; Xu et al . ( 2019 ) ) or create residual connections ( He et al. , 2016 ) in neural networks ( Li et al. , 2019 ; Dehmamy et al. , 2019 ) . Such techniques can be viewed as variants of lazy random walk on graphs — at every step , with probability 1/2 the walker stays at the current node ( through a self-loop ) and with probability 1/2 the walker travels to a neighbor . The transition matrix of a lazy random walk is M , ( I + AD−1 ) /2 . In this work , we mainly consider lazy random walk . Because it has several desired properties and it is consistent with the actual situation . Graph Conductance For an undirected unweighted graph G = ( V , E , A ) , the graph volume of any non-empty node set S ⊂ V is defined as vol ( S ) , ∑ i∈S d ( i ) , which measures the total number of edges incident from S. The conductance of a non-empty node set S ⊂ V is defined as Φ ( S ) , ∑ i∈S ∑ j∈V−S A ( i , j ) min ( vol ( S ) , vol ( V−S ) ) . Roughly speaking , conductance Φ ( S ) is the ratio of the number of edges across S and V − S to the number of edges incident from S , measuring the clusterability of a subset S. Low conductance indicates a good cluster because its internal connections are significantly richer than its external connections . Although it is NP-hard to minimize conductance ( Šı́ma & Schaeffer , 2006 ) , there have been theoretically-guaranteed approximation algorithms that identify clusters near a given node that satisfy a target conductance condition , such as Spielman & Teng ( 2013 ) ; Andersen et al . ( 2006 ) ; Chung ( 2007 ) . 3 RELATED WORK . The design of scalable GNNs has attracted wide attention from the machine learning community . We review related work from three perspectives : ( 1 ) full-batch GNNs with co-design of systems and algorithms ; ( 2 ) sampling-based GNNs ; ( 3 ) graph partition-based GNNs . Full-batch GNNs A full-batch GNN takes a whole graph as input for forward and backward . Consequently , its computational cost is proportional to the graph size . Earlier GNN models ( Kipf & Welling , 2017 ; Veličković et al. , 2018 ) evaluated on relatively small graphs , thus can be trained in a full-batch manner . Scaling full-batch GNNs to large graphs requires the co-design of ML systems and ML algorithms ( Jiang et al. , 2020 ; Zhang et al. , 2020 ; Ma et al. , 2019 ) . For example , NeuGraph ( Ma et al. , 2019 ) runs full-batch GNN models on a graph with 8.6M nodes and 231.6M edges on an eight-P100-GPU server . SGC ( Wu et al. , 2019 ) is another attempt at full-batch GNN . It simplifies GCN by conducting graph propagation and classification separately and efficiently . However , such simplification may sacrifice performance in some downstream tasks . GNNs based on Graph Sampling GraphSAGE ( Hamilton et al. , 2017 ) first proposed the idea of neighborhood sampling , and later it was applied in a real-world recommendation system by PinSAGE ( Ying et al. , 2018 ) . At each GNN layer , GraphSAGE computes node representation by first down-sampling its neighborhoods and then aggregating the sampled ones . As a randomized algorithm , Neighborhood Sampling was further improved by FastGCN ( Chen et al. , 2018b ) , Stochastic GCN ( Chen et al. , 2018a ) and Adaptive Sampling ( Huang et al. , 2018 ) for variance reduction . A recent work about sampling-based GNN is GraphSAINT ( Zeng et al. , 2020 ) , which samples subgraphs ( Leskovec & Faloutsos , 2006 ) and run full-batch GNN on sampled subgraphs . GNNs based on Graph Partition Cluster-GCN ( Chiang et al. , 2019 ) is the most related work to ours . Cluster-GCN adopts global graph partition algorithms , METIS ( Karypis & Kumar , 1998 ) , to partition the input graph into subgraphs , and run a GNN on each subgraph . A similar idea was also proposed in AliGraph ( Zhu et al. , 2019 ) . However , global graph partition algorithms involve additional whole graph computation . Moreover , global graph partition algorithms are vulnerable to dynamic and evolving graphs ( Xu et al. , 2014 ; Vaquero et al. , 2014 ) , with nodes and edges being constantly added and removed , which are very common in real-world applications .
In this paper, the authors study the connection between GNNs and local clustering, and find that short random-walks in GNNs have a high probability to be stuck at a local cluster. Based on this, they propose a light and scalable GNN learning framework called LCGNN, which first adopts the local clustering method PPR-Nibble to partition full graph into subgraphs, then use GNN modules on subgraphs for training and inference. The authors evaluate LCGNN on six OGB datasets, and the proposed approach outperforms the competitors on node classification and link prediction tasks.
SP:8f15ab1eb05ed48f21dd35a118eb299040960074
AT-GAN: An Adversarial Generative Model for Non-constrained Adversarial Examples
1 INTRODUCTION . In recent years , Deep Neural Networks ( DNNs ) have been found vulnerable to adversarial examples ( Szegedy et al. , 2014 ) , which are well-crafted samples with tiny perturbations imperceptible to humans but can fool the learning models . Despite the great success of the deep learning empowered applications , many of them are safety-critical , for example under the scenario of self-driving cars ( Eykholt et al. , 2018 ; Cao et al. , 2019 ) , raising serious concerns in academy and industry . Numerous works of adversarial examples have been developed on adversarial attacks ( Goodfellow et al. , 2015 ; Carlini & Wagner , 2017 ; Madry et al. , 2018 ) , adversarial defenses ( Goodfellow et al. , 2015 ; Kurakin et al. , 2017 ; Song et al. , 2019 ) and exploring the property of adversarial examples ( He et al. , 2018 ; Shamir et al. , 2019 ) . For adversarial attacks , most studies focus on the perturbation-based adversarial examples constrained by input images , which is also the generally accepted conception of adversarial examples . Generative models are also adopted recently to generate adversarial perturbations from an input noise ( Reddy Mopuri et al. , 2018 ; Omid et al. , 2018 ) or from a given image ( Xiao et al. , 2018 ; Bai et al. , 2020 ) , and such perturbations are added to the original image to craft adversarial examples . Song et al . ( 2018 ) propose to search a neighborhood noise around the input noise of a Generative Adversarial Net ( GAN ) ( Goodfellow et al. , 2014 ) such that the output is an adversarial example , which they denoted as unrestricted adversarial example as there is no original image in their method . However , their output is still constrained by the input noise , and the search is time-consuming . In this work , we propose an adversarial generative model called AT-GAN ( Adversarial Transfer on Generative Adversarial Net ) , which aims to learn the distribution of adversarial examples . Unlike previous works that constrain the adversaries in the neighborhood of input image or input noise , including the prominent work of Song et al . ( 2018 ) that searches over the neighborhood of the input noise of a pre-trained GAN in order to find a noise whose output image is misclassified by the target classifier , AT-GAN is an adversarial generative model that could produce semantically meaningful adversarial examples directly from any input noise , and we call such examples the non-constrained adversarial examples . Specifically , we first develop a normal GAN to learn the distribution of benign data so that it can produce plausible images that the classifier and a human oracle will classify in the same way . Then we transfer the pre-trained GAN into an adversarial GAN called AT-GAN that can fool the target classifier while being still well recognized by the human oracle . AT-GAN is a conditional GAN that has learned to estimate the distribution of adversarial examples for the target classifier , so AT-GAN can directly generate adversarial examples from any random noise , leading to high diversity and efficiency . We implement AT-GAN by adopting AC-GAN ( Odena et al. , 2017 ) and WGAN-GP ( Gulrajani et al. , 2017 ) in the pre-training stage , then do transfer learning for the adversary generation . Here we develop AT-GAN on three benchmark datasets , namely MNIST , Fashion-MNIST and CelebA , and apply typical defense methods to compare AT-GAN with existing search-based attacks . Empirical results show that the non-constrained adversarial examples generated by AT-GAN yield higher attack success rates , and state-of-the-art adversarially trained models exhibit little robustness against ATGAN , indicating the high diversity of our adversaries . In addition , AT-GAN , as a generation-based adversarial attack , is more efficient than the search-based adversarial attacks . Note that all conditional GANs that can craft realistic examples could be used for the implementation of AT-GAN . For another demonstration , we adopt StyleGAN2-ada ( Karras et al. , 2020a ) and develop AT-GAN on CIFAR-10 benchmark dataset using wide ResNet w32-10 ( Zagoruyko & Komodakis , 2016 ) as the target classifier . Empirical results show that AT-GAN can produce plausible adversarial images , and yield higher attack success rates on the adversarially trained models . 2 PRELIMINARIES . In this section , we provide definitions on several types of adversarial examples and adversarial attacks , and give a brief overview of adversarial attacks using GAN . Other related works on typical adversarial attacks and defenses ( Goodfellow et al. , 2015 ; Madry et al. , 2018 ; Tramèr et al. , 2018 ) , as well as some typical GANs ( Goodfellow et al. , 2014 ; Radford et al. , 2016 ; Odena et al. , 2017 ; Arjovsky et al. , 2017 ; Gulrajani et al. , 2017 ) are introduced in Appendix A . 2.1 DEFINITIONS ON ADVERSARIES . Let X be the set of all digital images under consideration for a learning task , Y ∈ R be the output label space and pz ∈ Rm be an arbitrary probability distribution ( e.g . Gaussian distribution ) where m is the dimension of pz . A deep learning classifier f : X → Y takes an image x ∈ X and predicts its label f ( x ) . Suppose px and padv are the distributions of benign images and adversarial examples , respectively . Assume we have an oracle classifier o : X → Y , which could always predict the correct label for any image x ∈ X , we define several types of adversarial examples as follows . For perturbation-based adversarial examples ( Szegedy et al. , 2014 ; Goodfellow et al. , 2015 ; MoosaviDezfooli et al. , 2016 ) , tiny perturbations are added to the input images , which are imperceptible to humans but can cause the target classifier to make wrong predictions . Definition 1 . Perturbation-based Adversarial Examples . Given a subset ( trainset or testset ) images T ⊂ X and a small constant > 0 , the perturbation-based adversarial examples can be defined as : Ap = { xadv ∈ X |∃x ∈ T , ‖x− xadv‖p < ∧ f ( xadv ) 6= o ( xadv ) = f ( x ) = o ( x ) } . Song et al . ( 2018 ) define a new type of adversarial examples called unrestricted adversarial examples , which is not related to the subset ( trainset or testset ) images , by adding adversarial perturbation to the input noise of a mapping , such as GAN , so that the output of the perturbed noise is an adversary to the target classifier . Definition 2 . Unrestricted Adversarial Examples . Given a mappingG from z ∼ pz toG ( z , y ) ∼ pθ , where pθ is an approximated distribution of px , and a small constant > 0 , the unrestricted adversarial examples can be defined as : Au = { G ( z∗ , ys ) ∈ X |∃z ∼ pz , z∗ ∼ pz , ‖z − z∗‖p < ∧ f ( G ( z∗ , ys ) ) 6= o ( G ( z∗ , ys ) ) = f ( G ( z , ys ) ) = o ( G ( z , ys ) ) = ys } where ys is the source label . In this work , we train a conditional GAN to learn the distribution of adversarial examples and output the corresponding adversary directly from any input noise . To clarify the difference with Song et al . ( 2018 ) , we call our generated adversaries the non-constrained adversarial examples . Definition 3 . Non-constrained Adversarial Examples . If there is a mapping G∗ from z ∼ pz to G∗ ( z , y ) ∼ qθ , where qθ is an approximated distribution of padv , the non-constrained adversarial examples can be defined as An = { G∗ ( z , ys ) ∈ X |f ( G∗ ( z , ys ) ) 6= o ( G∗ ( z , ys ) ) = ys } where ys is the source label . Here we need to find a mapping G∗ , e.g . a generative model , such that for z ∼ pz , G∗ ( z , y ) is an image in X and the output distribution is an approximated distribution of padv , for example using the Kullback-Leibler divergence ( Kullback & Leibler , 1951 ) , KL ( qθ||padv ) < for a small constant . In summary , perturbation-based adversarial examples are based on perturbing an image x ∈ X , and unrestricted adversarial examples ( Song et al. , 2018 ) perturbs an input noise z ∼ pz for an existing mapping G. Most perturbation-based adversarial attacks and Song et al . ( 2018 ) fall into the search-based adversarial attack . Definition 4 . Search-based Adversarial Attack . Given an input vector v ∈ V ( either benign image x or random vector z ) , the search-based adversarial attack searches a vector v′ : ‖v− v′‖p < where v′ leads to an adversarial example for the target classifier . In contrast , non-constrained adversarial examples are more generalized so that we need to learn a mapping G∗ such that for any input noise sampled from distribution pz , the output is an adversarial image . Such a mapping to be learned is called an adversarial generative model , and our method falls into the generation-based adversarial attack . Definition 5 . Generation-based Adversarial Attack . Given an input vector v ∈ V ( either benign image x or random vector z ) , the generation-based adversarial attack generates adversarial perturbation or adversarial example directly from v , usually adopting generative models . 2.2 GENERATIVE MODELS FOR ADVERSARIAL ATTACK . Generative models have been adopted for adversarial attack in recent works ( Baluja & Fischer , 2017 ) . Reddy Mopuri et al . ( 2018 ) propose a Network for Adversary Generation ( NAG ) that models the distribution of adversarial perturbations for a target classifier so that their NAG can craft adversarial perturbations from any given random noise , which will be added to the natural image to fool the target classifier . Omid et al . ( 2018 ) propose to generate universal or image-dependent adversarial perturbations using U-Net ( Ronneberger et al. , 2015 ) or ResNet Generator ( He et al. , 2016 ) from any given random noise . Xiao et al . ( 2018 ) propose to train AdvGAN that takes an original image as the input and generate adversarial perturbation for the input to craft an adversarial example . Bai et al . ( 2020 ) further propose AI-GAN that adopts projected gradient descent ( PGD ) ( Madry et al. , 2018 ) in the training stage to train a GAN to generate target adversarial perturbation for the input image and target class . The above attack methods all fall into the generation-based adversarial attack , and their crafted examples fall into the perturbation-based adversarial examples . Another recent work called PS-GAN ( Liu et al. , 2019 ) pre-processes an input seed patch ( a small image ) to adversarial patch that will be added to a natural image to craft an adversarial example , and an attention model is used to locate the attack area on the natural image . Different from the above methods that generate adversarial perturbations or patches , Song et al . ( 2018 ) propose to search a random noise z∗ around the input noise z of AC-GAN ( Odena et al. , 2017 ) such that the corresponding output of AC-GAN is an adversarial example for the target classifier . Their method falls into the search-based adversarial attack , and their crafted examples fall into the unrestricted adversarial examples as there is no original image in their method . AT-GAN falls into the generation-based adversarial attack , and the crafted examples fall into the non-constrained adversarial examples . To clearly distinguish our work , we highlight the differences with most related works as follows : NAG , AdvGAN and AI-GAN vs. AT-GAN . NAG ( Reddy Mopuri et al. , 2018 ) , AdvGAN ( Xiao et al. , 2018 ) and AI-GAN ( Bai et al. , 2020 ) focus on crafting adversarial perturbations by GANs . NAG takes random noise as input and crafts image-agnostic adversarial perturbation . AdvGAN and AI-GAN both use natural images as inputs , and generate the corresponding adversarial perturbations for the input image . AI-GAN uses adversarial examples generated by PGD for the training . In contrast , AT-GAN does not use any natural image as the input , and generates adversarial examples directly from any random noise . Further , compared with AI-GAN , we do not use any adversarial examples for the training . Song ’ s vs. AT-GAN . Song ’ s method ( Song et al. , 2018 ) searches over the neighborhood of the input noise for the pre-trained AC-GAN in order to find a noise whose output image is misclassified by the target classifier . They define such adversaries as the unrestricted adversarial examples , however , their adversaries are still constrained by the original input noise . Their method is essentially based on search , while AT-GAN is trained as an adversarial generative model , and our output is not constrained by any neighborhood .
The paper proposes AT-GAN (Adversarial Transfer on Generative Adversarial Net) to train an adversarial generative model that can directly produce adversarial examples. Different from previous works, the study aims to learn the distribution of adversarial examples so as to generate semantically meaningful adversaries. AT-GAN achieves this goal by first learning a generative model for real data, followed by transfer learning to obtain the desired generative model. Once trained and transferred, AT-GAN could generate adversarial examples directly for any input noise, denoted as non-constrained adversarial examples. Some experiments and visualizations show that AT-GAN can generate some diverse adversarial examples that are realistic to human perception, and yields higher attack success rates against adversarially trained models.
SP:e9d2702f8ac6f04fd5429fc1236aa163d179a0aa
FMix: Enhancing Mixed Sample Data Augmentation
1 INTRODUCTION . Recently , a plethora of approaches to Mixed Sample Data Augmentation ( MSDA ) have been proposed which obtain state-of-the-art results , particularly in classification tasks ( Chawla et al. , 2002 ; Zhang et al. , 2017 ; Tokozume et al. , 2017 ; 2018 ; Inoue , 2018 ; Yun et al. , 2019 ; Takahashi et al. , 2019 ; Summers and Dinneen , 2019 ) . MSDA involves combining data samples according to some policy to create an augmented data set on which to train the model . The policies so far proposed can be broadly categorised as either combining samples with interpolation ( e.g . MixUp ) or masking ( e.g . CutMix ) . Traditionally , augmentation is viewed through the framework of statistical learning as Vicinal Risk Minimisation ( VRM ) ( Vapnik , 1999 ; Chapelle et al. , 2001 ) . Given some notion of the vicinity of a data point , VRM trains with vicinal samples in addition to the data points themselves . This is the motivation for MixUp ( Zhang et al. , 2017 ) ; to provide a new notion of vicinity based on mixing data samples . In the classical theory , validity of this technique relies on the strong assumption that the vicinal distribution precisely matches the true distribution of the data . As a result , the classical goal of augmentation is to maximally increase the data space , without changing the data distribution . Clearly , for all but the most simple augmentation strategies , the data distribution is in some way distorted . Furthermore , there may be practical implications to correcting this , as is demonstrated in Touvron et al . ( 2019 ) . In light of this , three important questions arise regarding MSDA : What is good measure of the similarity between the augmented and the original data ? Why is MixUp so effective when the augmented data looks so different ? If the data is distorted , what impact does this have on trained models ? To construct a good measure of similarity , we note that the data only need be ‘ perceived ’ similar by the model . As such , we measure the mutual information between representations learned from the real and augmented data , thus characterising how well learning from the augmented data simulates learning from the real data . This measure clearly shows the data-level distortion of MixUp by demonstrating that learned representations are compressed in comparison to those learned from the un-augmented data . To address the efficacy of MixUp , we look to the information bottleneck theory of deep learning ( Tishby and Zaslavsky , 2015 ) . This theory uses the data processing inequality , summarised as ‘ post-processing can not increase information ’ , to suggest that deep networks progressively discard information about the input whilst preserving information about the targets . Through this lens , we posit that the distortion and subsequent compression induced by MixUp promotes generalisation by preventing the network from learning about highly sample-specific features in the data . Regarding the impact on trained models , and again armed with the knowledge that MixUp distorts learned functions , we show that MixUp acts as a kind of adversarial training ( Good- fellow et al. , 2014 ) , promoting robustness to additive noise . This accords with the theoretical result of Perrault-Archambault et al . ( 2020 ) and the robustness results of Zhang et al . ( 2017 ) . However , we further show that MSDA does not generally improve adversarial robustness when measured as a worst case accuracy following multiple attacks as suggested by Carlini et al . ( 2019 ) . In contrast to our findings regarding MixUp , we show that CutMix causes learned models to retain a good knowledge of the real data , which we argue derives from the fact that individual features extracted by a convolutional model generally only derive from one of the mixed data points . At the same time CutMix limits the ability of the model to over-fit by dramatically increasing the number of observable data points , in keeping with the original intent of VRM . We go on to argue that by restricting to only masking a square region , CutMix imposes an unnecessary limitation . Indeed , it should be possible to construct an MSDA which uses masking similar to CutMix whilst increasing the data space much more dramatically . Motivated by this , we introduce FMix , a masking MSDA that uses binary masks obtained by applying a threshold to low frequency images sampled from Fourier space . Using our mutual information measure , we show that learning with FMix simulates learning from the real data even better than CutMix . We subsequently demonstrate performance of FMix for a range of models and tasks against a series of augmented baselines and other MSDA approaches . FMix obtains a new state-of-the-art performance on CIFAR-10 ( Krizhevsky et al. , 2009 ) without external data and Fashion MNIST ( Xiao et al. , 2017 ) and improves the performance of several state-of-the-art models ( ResNet , SE-ResNeXt , DenseNet , WideResNet , PyramidNet , LSTM , and Bert ) on a range of problems and modalities . In light of our analyses , and supported by our experimental results , we go on to suggest that the compressing qualities of MixUp are most desirable when data is limited and learning from individual examples is easier . In contrast , masking MSDAs such as FMix are most valuable when data is abundant . We finally suggest that there is no reason to see the desirable properties of masking and interpolation as mutually exclusive . In light of these observations , we plot the performance of MixUp , FMix , a baseline , and a hybrid policy where we alternate between batches of MixUp and FMix , as the number of CIFAR-10 training examples is reduced . This experiment confirms our above suggestions and shows that the hybrid policy can outperform both MixUp and FMix . 2 RELATED WORK . In this section , we review the fundamentals of MSDA . Let pX ( x ) denote the input data distribution . In general , we can define MSDA for a given mixing function , mix ( X1 , X2 , Λ ) , where X1 and X2 are independent random variables on the data domain and Λ is the mixing coefficient . Synthetic minority over-sampling ( Chawla et al. , 2002 ) , a predecessor to modern MSDA approaches , can be seen as a special case of the above where X1 and X2 are dependent , jointly sampled as nearest neighbours in feature space . These synthetic samples are drawn only from the minority class to be used in conjunction with the original data , addressing the problem of imbalanced data . The mixing function is linear interpolation , mix ( x1 , x2 , λ ) = λx1+ ( 1−λ ) x2 , and pΛ = U ( 0 , 1 ) . More recently , Zhang et al . ( 2017 ) , Tokozume et al . ( 2017 ) , Tokozume et al . ( 2018 ) and Inoue ( 2018 ) concurrently proposed using this formulation ( as MixUp , Between-Class ( BC ) learning , BC+ and sample pairing respectively ) on the whole data set , although the choice of distribution for the mixing coefficients varies for each approach . We refer to this as interpolative MSDA , where , following Zhang et al . ( 2017 ) , we use the symmetric Beta distribution , that is pΛ = Beta ( α , α ) . Recent variants adopt a binary masking approach ( Yun et al. , 2019 ; Summers and Dinneen , 2019 ; Takahashi et al. , 2019 ) . Let M = mask ( Λ ) be a random variable with mask ( λ ) ∈ { 0 , 1 } n and µ ( mask ( λ ) ) = λ , that is , generated masks are binary with average value equal to the mixing coefficient . The mask mixing function is mix ( x1 , x2 , m ) = m x1 + ( 1 −m ) x2 , where denotes point-wise multiplication . A notable masking MSDA which motivates our approach is CutMix ( Yun et al. , 2019 ) . CutMix is designed for two dimensional data , with mask ( λ ) ∈ { 0 , 1 } w×h , and uses mask ( λ ) = rand rect ( w √ 1− λ , h √ 1− λ ) , where rand rect ( rw , rh ) ∈ { 0 , 1 } w×h yields a binary mask with a shaded rectangular region of size rw × rh at a uniform random coordinate . CutMix improves upon the performance of MixUp on a range of experiments . For the remainder of the paper we focus on the development of a better input mixing function . Appendix A provides a discussion of the importance of the mixing ratio of the labels . For the typical case of classification with a cross entropy loss , the objective function is simply the interpolation between the cross entropy against each of the ground truth targets . 3 ANALYSIS . We now analyse both interpolative and masking MSDAs with a view to distinguishing their impact on learned representations . We summarise previous analyses and theories ( Zhang et al. , 2017 ; Liang et al. , 2018 ; Guo et al. , 2019 ; He et al. , 2019 ; Verma et al. , 2019 ; Yun et al. , 2019 ) in Appendix G. For our analysis , we desire a measure which captures the extent to which learning about the augmented data simulates learning about the original data . To achieve this , we propose training unsupervised models on real data and augmented data and then measuring the mutual information , the reduction in uncertainty about one variable given knowledge of another , between the representations they learn . In particular , we propose using Variational Auto-Encoders ( VAEs ) ( Kingma and Welling , 2013 ) , which provide a rich depiction of the salient or compressible information in the data ( Higgins et al. ) . Denoting the latent space of a VAE trained on the original data as ZX and on some candidate augmentation A as ZA , in Appendix B we show that we can obtain a tractable lower bound , I ( ZA ; X ) , and upper bound , I ( ZA ; X̂ ) where X̂ is the original data as reconstructed by a baseline VAE , for the intractable quantity I ( ZA ; ZX ) . Table 1 gives these quantities for MixUp , CutMix , and a baseline . The results show that MixUp consistently reduces the amount of information that is learned about the original data . In contrast , CutMix manages to induce greater mutual information with the data than is obtained from just training on the un-augmented data . Crucially , the results present concrete evidence that interpolative MSDA differs fundamentally from masking MSDA in how it impacts learned representations . Having shown this is true for VAEs , we now wish to understand whether the finding also holds for trained classifiers . To this end , in Figure 4 in the appendix we visualise the decisions made by a classifier using Gradient-weighted Class Activation Maps ( Grad-CAMs ) ( Selvaraju et al. , 2017 ) . Grad-CAM finds the regions in an image that contribute the most to the network ’ s prediction by taking the derivative of the model ’ s output with respect to the activation maps and weighting them according to their contribution . If MixUp prevents the network from learning about highly specific features in the data we would expect more of the early features to contribute to the network output . Clearly , it is difficult to ascertain whether this is the case from the examples in the figure , although there is some indication that it may be true . To verify empirically we compute the average sum of Grad-CAM heatmaps over the CIFAR-10 test set for 5 repeats ( independently trained PreActResNet18 models ) . We obtain the following scores : baseline - 146±5 , MixUp - 162±3 , CutMix - 131±6 . It is clear that on average more of the early features contribute to the decisions made by MixUp trained models and that this result is consistent across independent runs . Following on from these observations , it is now pertinent to ask whether these different representations learned from MixUp give rise to practical differences other than just improved generalisation . Since it is our assessment that models trained with MixUp have an altered ‘ perception ’ of the data distribution , we suggest an analysis based on adversarial attacks , which involve perturbing images outside of the perceived data distribution to alter the given classification . We perform fast gradient sign method , standard gradient descent , projected gradient descent , additive uniform noise , and DeepFool ( Moosavi-Dezfooli et al. , 2016 ) attacks over the whole CIFAR-10 test set on PreAct-ResNet18 models subject to ` ∞ constraints using the Foolbox library ( Rauber et al. , 2020 ; 2017 ) . The plots for the additive uniform noise and DeepFool attacks , given in Figure 1 , show that MixUp provides an improvement over CutMix and the augmented baseline in this setting . This is because MixUp acts as a form of adversarial training ( Goodfellow et al. , 2014 ) , equipping the models with valid classifications for images of a similar nature to those generated by the additive noise and DeepFool attacks . In Figure 1 , we additionally plot the worst case robustness following all attacks as suggested by Carlini et al . ( 2019 ) . These results show that the adversarial training effect of MixUp is limited and does not correspond to a general increase in robustness . We provide an enhanced depiction of these results in Appendix C .
This paper proposes an advanced masking strategy for CutMix augmentation based on the low-pass filter. The authors provide an interesting mutual information analysis for different augmentation strategies to describe their motivation. The experiments include many vision tasks (CIFAR-10, CIFAR-100, Fashion-MNIST, Tiny-ImageNet, ImageNet, Bengali datasets) and language tasks (Toxic, IMDb, Yelp).
SP:02ad24f0c92d8f6203be90ff0c173036f76c9959
Neural gradients are near-lognormal: improved quantized and sparse training
1 INTRODUCTION . Neural gradients are used in the training process of deep networks to backpropagate the error-gradient throughout the model , thus allowing to compute the required weight updates . As these neural gradients are needed for a substantial ratio of the underlying computations ( about 23 ) , compressing them can alleviate data-throughput requirements and accelerate the training process . Compression of neural gradients reduce the memory footprint for the intermediate calculation and the bandwidth of data transfer inside the HW accelerator . Moreover , in term of distributed training in model parallelism the neural gradients are one of the main bottlenecks that need to be transferred between devices ( Rong et al. , 2020 ; Gupta et al. , 2020 ) . Many previous works ( Banner et al. , 2019 ; Fang et al. , 2020 ) compress tensors such as weights and activations by approximating their distributions using an analytically tractable density . These works often assume a bell-shaped distribution such as Gaussian or Laplace distributions , which have been reported to fail for neural gradients ( Ye et al. , 2019 ) . One key observation in this paper is that neural gradient distributions are heavy-tailed , fundamentally different from the light-tailed distributions of weights and activations . Further statistical and distributional tests reveal gradient magnitudes follow a lognormal distribution . Adopting this lognormal observation , our paper suggests two main applications — quantization and pruning , used to reduce the computational and memory burden of neural gradients . To tackle these challenges , we first formalize the problems and find closed-form expressions that enable us to predict the optimal quantization and pruning policies . These measures are easy to use and depend only on the estimated lognormal parameters . ∗Equal contribution . In Figure 1 we summarize these applications and their derivation . The first application uses the lognormal prior to enabling low-precision floating-point ( FP ) quantization of the gradients . Here we optimize two tasks . The first task is to find a partition between mantissa and exponent bit-widths that minimizes quantization noise for a given n bit FP gradient representation . The second task is to scale these gradients so that they would be properly represented within a limited dynamic range ( distance between the maximum and minimum that FP format can represent ) . We provide useful insights that make empirically-based heuristics such as loss scaling ( Micikevicius et al. , 2018 ) a more grounded approach with a theoretical basis . Optimizing both tasks we obtain state-of-the-art results for FP quantization of the neural gradients . The second application performs accurate and predictable stochastic pruning of gradients on the fly , which results in two state-of-the-art pruning schemes . The first translates the desired sparsity level into an accurate threshold , and the other enables combined use of different sparsity levels at different layers ( heterogeneous sparsity ) . 2 RELATED WORK . Quantization and pruning of neural networks have seen a tremendous amount of works ( e.g. , Nahshan et al . ( 2019 ) ; Choi et al . ( 2018 ) ; Baskin et al . ( 2018 ) ; Louizos et al . ( 2018 ) ; Frankle & Carbin ( 2018 ) ; Cambier et al . ( 2020 ) ) aiming to reduce both bandwidth and memory footprint , as well as computation time . Most of these methods focus on the quantization or pruning of the weights / activations in the forward path ( Banner et al. , 2019 ; Nahshan et al. , 2019 ) or the weight gradients ( Bernstein et al. , 2018 ; Alistarh et al. , 2016 ) in the backward path . So far , neural gradients got less attention . Some of these methods ( Banner et al. , 2019 ; Ye et al. , 2019 ; Fang et al. , 2020 ) use a systemic and rigorous statistical approach to optimize various distortion measures . For example , Banner et al . ( 2019 ) used the normal distributional assumption ( of weights and activations ) to analytically minimize the mean-squared quantization error . Our work follows a similar line to rigorously optimize similar performance measures for quantization and pruning of gradient distributions , which are different from that of the weights and activations . Gradient Quantization . While a lot of research focused on the quantization of weights and activations for inference ( Krishnamoorthi , 2018 ; Choi et al. , 2018 ; Jain et al. , 2020 ) , there were also major advances in quantization during training , many of them faced difficulty trying to represent the high dynamic range of the gradients ( Banner et al. , 2018 ; Wu et al. , 2018 ) . Cambier et al . ( 2020 ) suggests keeping for each tensor shift and scale in full precision numbers to make them fit in FP8 format dynamic range . Mantissa vs exponent allocation of the available bits has proven crucial in deep learning workloads , where for example , BF16 ( 1-8-7 : sign-exponent-mantissa ) has shown greater success compared to traditional FP16 ( 1-5-10 ) format due to wider dynamic range ( Henry et al. , 2019 ; Kalamkar et al. , 2019 ) . Research over required format and trade-offs in exponent versus mantissa is on-going with growing interest over lower precision representations such as FP8 . Some works have explored using different FP8 formats : Wang et al . ( 2018 ) has used ( 1-5-2 ) , while ( Sun et al. , 2019 ) suggests using one type of FP8 format for the forward ( 1-4-3 ) , and a different FP8 format ( 1-5-2 ) for the backward pass , after empirically assessing the different possible formats . Additionally , with the growing usage of FP16 mixed-precision training , researchers and practitioners faced the need to use loss scaling ( Micikevicius et al. , 2018 ) , adjusting the tensor distribution to avoid over/under-flow . This procedure required , in some cases , an intensive parameter search and was not guaranteed to succeed in all cases . Gradient pruning . Focusing on the computationally-intensive back-propagation , ” meProp ” ( Sun et al. , 2017 ) prunes the K smallest absolute-valued entries of the neural gradients on the fly , using the top-k algorithm . Works following it , replaced pruning with quantization to induce sparsity ( Wiedemann et al. , 2020 ) , or used top-k pruning as well on the copies of weights and activations used in back-prop ( Aamir Raihan & Aamodt , 2020 ) . Ye et al . ( 2019 ) , inspired by conventional unbiased estimators like stochastic rounding , suggested ” stochastic pruning ” , reaching higher sparsity levels . Yet , the authors assumed the gradients are normally distributed , leading to incorrect estimation of the threshold and a large difference between the required sparsity and the one obtained . As we shall see later , using the correct statistical distribution model is essential to determine the proper threshold . 3 NEURAL GRADIENTS DISTRIBUTION . Many prior works ( Banner et al. , 2019 ; Bernstein et al. , 2018 ) take the assumption that tensor data e.g. , weights ( W ) and activations ( A ) is sampled from a Gaussian distribution . Recently , Ye et al . ( 2019 ) ; Wiedemann et al . ( 2020 ) used the same assumption for the distribution of neural gradients∇A . In the section , we discuss this assumption . We show that neural gradients are better approximated by lognormal distributions , i.e. , the gradient logarithm values are normally distributed , as opposed to the gradients themselves . In Fig . 2 , we plot the histogram of neural gradient magnitudes at linear and log scales in one layer of ResNet18 - ImageNet dataset . At a linear scale , the distribution has a few gradients of huge magnitude and a great many gradients of small magnitudes ( Fig 2a ) . Plotting the histogram on a logarithmic scale reveals a distribution close to a symmetric normal ( Gaussian ) distribution ( Fig 2b ) . This is the hallmark of the lognormal distribution . Finally , when plotting the theoretical quantiles of the normal distribution against the quantiles of the gradient distribution ( Q-Q plot ) , we see that the points follow a strongly nonlinear pattern in Fig 2c , suggesting that the data is not distributed as a standard normal distribution . Note that in the Q-Q plot for lognormal distribution ( Fig 2d ) , almost all points lie on a straight line . We further estimate the goodness of fit of the neural gradients to normal and lognormal distributions . To that end , we measure the static distance ( largest vertical line ) between the cumulative distribution function ( CDF ) of the empirically observed distribution and the CDF of the reference distribution ( also known as Kolmogorov-Smirnov test ( Smirnov , 1948 ) ) . For each model and dataset in Table 1 , we calculate the average ( across all layers ) of the static distance to normal and lognormal distributions . The analysis is performed on the absolute value of the gradients , excluding the zero-valued entries . Note that lognormal distribution gets a better fit . Additional statistical distributions in Appendix A.1 . 4 APPLICATION I - OPTIMAL FLOATING-POINT QUANTIZATION . Floating-point ( FP ) representations can cover a very wide dynamic range with a relatively small number of digits . The mantissa-exponent tradeoff control the balance between the dynamic range of numbers that can be represented ( exponent ) to the precision of these numbers ( mantissa ) . This dynamic range is especially important for the heavy-tailed distributions that characterize neural gradients . In this section , we study the optimal characteristics of the FP quantizer . 4.1 PROBLEM FORMULATION . We can decompose any positive real value x ∈ R+ as follows : x = 2ln x = M∈ [ 1,2 ) ︷ ︸︸ ︷ 2ln x−bln xc ·2 E∈Z︷ ︸︸ ︷ blnxc , ( 1 ) where M ∈ [ 1 , 2 ) is the mantissa and E ∈ Z the exponent . Given N bits , we allocate 1 bit for the sign and seek the optimal allocation of n1 bits to M and n2 bits to E , such that n1 + n2 = N − 1 . Accordingly , we define the quantized xq as : xq = { 2Emax E ≥ Emax Mq · 2E −Emax ≤ E ≤ Emax 0 E ≤ −Emax ( 2 ) where Emax = 2n2−1 and Mq is the quantized mantissa with the range [ 1 , 2 ) divided into 2n1 quantization levels with a spacing of ∆ = 12n1 . Finally , we measure the relative error between the FP number xq and the real number x , which is simply the difference between the two numbers divided by the real number ( Widrow & Kollár , 2008 ) : η ( n1 , n2 ) = ∣∣∣∣xq − xx ∣∣∣∣ ( 3 ) 4.2 ANALYTICAL DERIVATION OF THE RELATIVE ERROR . We assume that x ∼ Lognormal ( µ , σ2 ) . Note thatE = blnxc ≈ lnx ∼ N ( µ , σ2 ) . In Appendix A.4 we split the range into three parts according to E : ( i ) −Emax ≤ E ≤ Emax ; ( ii ) E ≥ Emax ; ( iii ) E ≤ −Emax , and calculate the expected contribution for each term . A closed-form formula for the expected relative error could be obtained as follows : E [ η ( n1 , n2 ) ] = 2Φ ( Emax σ ) − 1 8 · ln ( 2 ) · ( 2n1 − 1 ) + 2Emax−1e σ2 ln2 ( 2 ) 2 ( erf ( σ ln 2√ 2 + Emax√ 2σ ) − 1 ) − 1 2 erf ( Emax√ 2σ ) + 3 2 − Φ ( Emax σ ) ( 4 ) where Φ ( x ) is the CDF of N ( 0 , 1 ) . In Fig . 3a we show that analytical results stated by Eq . ( 4 ) are in good agreement with simulations for FP8 with various number of exponent bits . Simulations were obtained by quantizing 10,000 values , generated from a lognormal distribution with σ = 1 , 3 , 5 .
This work proposed a very interesting idea that the back-propagated errors have log-normal distributions. The authors could extend this intriguing observation into computation efficient algorithms; reduced-precision floating-point quantization or the pruning of the back-prop error, which are very interesting. The authors also provide details of derivations as well as the data analysis along with several small ideas (in Appendix) to strongly support their ideas.
SP:56f796be21ad1e4a563138ba70053071cc419e8c
Privacy Preserving Recalibration under Domain Shift
1 INTRODUCTION . Machine learning classifiers are currently deployed in high stakes applications where ( 1 ) the cost of failure is high , so prediction uncertainty must be accurately calibrated ( 2 ) the test distribution does not match the training distribution , and ( 3 ) data is subject to privacy constraints . All three of these challenges must be addressed in applications such as medical diagnosis ( Khan et al. , 2001 ; Chen et al. , 2018 ; Kortum et al. , 2018 ) , financial decision making ( Berestycki et al. , 2002 ; Rasekhschaffe & Jones , 2019 ; He & Antón , 2003 ) , security and surveillance systems ( Sun et al. , 2015 ; Patel et al. , 2015 ; Agre , 1994 ) , criminal justice ( Berk , 2012 ; 2019 ; Rudin & Ustun , 2018 ) , and mass market autonomous driving ( Kendall & Gal , 2017 ; Yang et al. , 2018 ; Glancy , 2012 ) . While much prior work has addressed these challenges individually , they have not been considered simultaneously . The goal of this paper is to propose a framework that formalizes challenges ( 1 ) - ( 3 ) jointly , introduce benchmark problems , and design and compare new algorithms under the framework . A standard approach for addressing challenge ( 1 ) is uncertainty quantification , where the classifier outputs its confidence in every prediction to indicate how likely it is that the prediction is correct . These confidence scores must be meaningful and trustworthy . A widely used criterion for good confidence scores is calibration ( Brier , 1950 ; Cesa-Bianchi & Lugosi , 2006 ; Guo et al. , 2017 ) — i.e . among the data samples for which the classifier outputs confidence p ∈ ( 0 , 1 ) , exactly p fraction of the samples should be classified correctly . Several methods ( Guo et al. , 2017 ) learn calibrated classifiers when the training distribution matches the test distribution . However , this classical assumption is always violated in real world applications , and calibration performance can significantly degrade under even small domain shifts ( Snoek et al. , 2019 ) . To address this challenge , several methods have been proposed to re-calibrate a classifier on data from the test distribution ( Platt et al. , 1999 ; Guo et al. , 2017 ; Kuleshov et al. , 2018 ; Snoek et al. , 2019 ) . These methods make small adjustments to the classifier to minimize calibration error on a validation dataset drawn from the test distribution , but they are typically only applicable when they have ( unrestricted ) access to data from this validation set . Additionally , high stakes applications often require privacy . For example , it is difficult for hospitals to share patient data with machine learning providers due to legal privacy protections ( Centers for Medicare & Medicaid Services , 1996 ) . When the data is particularly sensitive , provable differential privacy becomes necessary . Differential privacy ( Dwork et al. , 2014 ) provides a mathematically rigorous definition of privacy along with algorithms that meet the requirements of this definition . For instance , the hospital may share only certain statistics of their data , where the shared statistics must have bounded mutual information with respect to individual patients . The machine learning provider can then use these shared statistics — possibly combining statistics from many different hospitals — to recalibrate the classifier and provide better confidence estimates . In this paper , we present a framework to address all three challenges – calibration , domain shift , and differential privacy – and introduce a benchmark to standardize performance and compare algorithms . We show how to modify modern recalibration techniques ( e.g . ( Zadrozny & Elkan , 2001 ; Guo et al. , 2017 ) ) to satisfy differential privacy using this framework , and compare their empirical performance . This framework can be viewed as performing federated learning for recalibration , with the constraint that each party ’ s data must be kept differentially private . We also present a novel recalibration technique , accuracy temperature scaling , that is particularly effective in this framework . This new technique requires private data sources to share only two statistics : the overall accuracy and the average confidence score for a classifier . We adjust the classifier until the average confidence equals the overall accuracy . Because only two numbers are revealed by each private data source , it is much easier to satisfy differential privacy . In our experiments , we find that without privacy requirements the new recalibration algorithm performs on par with algorithms that use the entire validation dataset , such as ( Guo et al. , 2017 ) ; with privacy requirements the new algorithm performs 2x better than the second best baseline . In summary , the contributions of our paper are as follows . ( 1 ) We introduce the problem of “ privacy preserving calibration under domain shift ” and design a framework for adapting existing recalibration techniques to this setting . ( 2 ) We introduce accuracy temperature scaling , a novel recalibration method designed with privacy concerns in mind , that requires only the overall accuracy and average confidence of the model on the validation set . ( 3 ) Using our framework , we empirically evaluate our method on a large set of benchmarks against state-of-the-art techniques and show that it performs well across a wide range of situations under differential privacy . 2 BACKGROUND AND RELATED WORK . 2.1 CALIBRATION . Description of Calibration Consider a classification task from input domain ( e.g . images ) X to a finite set of labels Y = { 1 , · · · , m } . We assume that there is some joint distribution P ∗ on X × Y . This could be the training distribution , or the distribution from which we draw test data . A classifier is a pair ( φ , p̂ ) where φ : X → Y maps each input x ∈ X to a label y ∈ Y and p̂ : X → [ 0 , 1 ] maps each input x to a confidence value c. We say that the classifier ( φ , p̂ ) is perfectly calibrated ( Brier , 1950 ; Gneiting et al. , 2007 ) with respect to the distribution P ∗ if ∀c ∈ [ 0 , 1 ] Pr P∗ ( x , y ) [ φ ( x ) = y | p̂ ( x ) = c ] = c. ( 1 ) Note that calibration is a property not only of the classifier ( φ , p̂ ) , but also of the distribution P ∗ . A classifier ( φ , p̂ ) can be calibrated with respect to one distribution ( e.g . the training distribution ) but not another ( e.g . the test distribution ) . To simplify notation we drop the dependency on P ∗ . To numerically measure how well a classifier is calibrated , the commonly used metric is Expected Calibration Error ( ECE ) ( Naeini et al. , 2015 ) defined by ECE ( φ , p̂ ) : = ∫ c∈ [ 0,1 ] Pr [ p̂ ( x ) = c ] · |Pr [ φ ( x ) = y | p̂ ( x ) = c ] − c| . ( 2 ) In other words , ECE measures average deviation from Eq . 1 . In practice , the ECE is approximated by binning — partitioning the predicted confidences into bins , and then taking a weighted average of the difference between the accuracy and average confidence for each bin ( see Appendix A.1 for details . ) Recalibration Methods Several methods apply a post-training adjustment to a classifier ( φ , p̂ ) to achieve calibration ( Platt et al. , 1999 ; Niculescu-Mizil & Caruana , 2005 ) . The one most relevant to our paper is temperature scaling ( Guo et al. , 2017 ) . On each input x ∈ X , a neural network typically first computes a logit score l1 ( x ) , l2 ( x ) , · · · , ln ( x ) for each of the n labels , then computes a confidence score or probability estimate p̂ ( x ) with a softmax function . Temperature scaling adds a temperature parameter T ∈ R+ to the softmax function p̂ ( x ; T ) = max i eli ( x ) /T∑ j e lj ( x ) /T . ( 3 ) A higher temperature reduces the confidence , and vice versa . T is trained to minimize the standard cross entropy objective on the validation dataset , which is equivalent to maximizing log likelihood . Despite its simplicity , temperature scaling performs well empirically in classification calibration for deep neural networks . Alternative methods for classification calibration have also been proposed . Histogram binning ( Zadrozny & Elkan , 2001 ) partitions confidence scores ∈ [ 0 , 1 ] into bins { [ 0 , ) , [ , 2 ) , · · · , [ 1− , 1 ] } and sorts each validation sample into a bin based on its confidence p̂ ( x ) . The algorithm then resets the confidence level of each bin to match the average classification accuracy of data points in that bin . Isotonic regression methods ( Kuleshov et al. , 2018 ) learn an additional layer on top of the softmax output layer . This additional layer is trained on a validation dataset to fit the output confidence scores to the empirical probabilities in each bin . Other methods include Platt scaling ( Platt et al. , 1999 ) and Gaussian process calibration ( Wenger et al. , 2019 ) . 2.2 ROBUSTNESS TO DOMAIN SHIFT . Preventing massive performance degradation of machine learning models under domain shift has been a long-standing problem . There are several approaches developed in the literature . Unsupervised domain adaptation ( Ganin & Lempitsky , 2014 ; Shu et al. , 2018 ) learns a joint representation between the source domain ( original data ) and target domain ( domain shifted data ) . Invariance based methods ( Cissé et al. , 2017 ; Miyato et al. , 2018 ; Madry et al. , 2017 ; Lakshminarayanan et al. , 2017 ; Cohen et al. , 2019 ) prevent the classifier output from changing significantly given small perturbations to the input . Transfer learning methods ( Pan & Yang , 2009 ; Bengio , 2012 ; Dai et al. , 2007 ) fine-tune the classifier on labeled data in the target domain . We classify our method in this category because we also fine-tune on the target domain , but with minimal data requirements ( we only need the overall classifier accuracy ) . 2.3 DIFFERENTIAL PRIVACY . Differential privacy ( Dwork et al. , 2014 ) is a procedure for sharing information about a dataset to the public while withholding critical information about individuals in the dataset . Informally , it guarantees that an attacker can only learn a limited amount of new information about an individual . Differentially private approaches are critical in privacy sensitive applications . For example , a hospital may wish to gain medical insight or calibrate its prediction models by releasing diagnostic information to outside experts , but it can not release information about any particular patient . One common notion of differential privacy is -differential privacy ( Dwork et al. , 2014 ) . Let us define a database D as a collection of data points in a universe X , and represent it by its histogram : D ∈ N|X | , where each entry Dx represents the number of elements in the database that takes the value x ∈ X . A randomized algorithmM is one that takes in input D ∈ N|X | and ( stochastically ) outputs some valueM ( D ) = b for b ∈ Range ( M ) . Definition 1 . Let M be a randomized function M : N|X | → Range ( M ) . We say that M is - differentially private if for all S ⊆ Range ( M ) and for any two databases D , D′ ∈ N|X | that differ by only one element , i.e . ‖D −D′‖1 ≤ 1 , we have Pr [ M ( D ) ∈ S ] Pr [ M ( D′ ) ∈ S ] ≤ e Intuitively , the output ofM should not change much if a single data point is added or removed . An attacker that learns the output ofM gains only limited information about any particular data point . Given a deterministic real valued function f : N|X | → Rz , we would like to design a functionM that remains as close as possible to f but satisfies Definition 1 . This can be achieved by the Laplace mechanism ( McSherry & Talwar , 2007 ; Dwork , 2008 ) . Let us define the L1 sensitivity of f : ∆f = max D , D′∈N|X| ‖D−D′‖1=1 ‖f ( D ) − f ( D′ ) ‖1 Then the Laplace mechanism adds Laplacian random noise as in ( 4 ) : ML ( D ; f , ) = f ( D ) + ( Y1 , . . . , Yz ) ( 4 ) where Yi are i.i.d . random variables drawn from the Laplace ( loc = 0 , scale = ∆f/ ) distribution . The functionML satisfies -differential privacy , and we reproduce the proof in Appendix A.2 .
The paper studies the problem of classifier recalibration under differential privacy constraints. They propose a framework with a calibrator and several private data sources, and it works as follows. At each iteration, the calibrator queries each source, and the data source sends back the private answer, which will be used to optimize the calibration. They also provide a recalibration technique, accuracy temperature scaling, which is effective under the privacy constraint for the reason of low sensitivity. Rigorous experimental results are provided.
SP:30332615c0031634abb0108b91caad1657a5e8be
Transformer-QL: A Step Towards Making Transformer Network Quadratically Large
1 INTRODUCTION . Since its introduction in Vaswani et al . ( 2017 ) , Transformer networks have overtaken its predecessor Recurrent Neural Networks ( RNN ) in almost every natural language processing task . However , one limitation of Transformer network is its high requirement of memory and computational power . In a vanilla Transformer network , the memory and computational requirement grows quadratically with the sequence length , and thus with context length . In an effort to overcome the above limitation , Transformer-XL ( Dai et al. , 2019 ) and Compressive Transformer ( Rae et al. , 2020 ) have been recently proposed . However , in both the network , the context length can grow at best linearly with the memory and computation usage . An alternative strategy have been explored in Li et al . ( 2019 ) ; Ye et al . ( 2019 ) ; Child et al . ( 2019 ) ; Zaheer et al . ( 2020 ) ; Beltagy et al . ( 2020 ) ; Wang et al . ( 2020b ) ; Kitaev et al . ( 2020 ) ; Katharopoulos et al . ( 2020 ) ; Choromanski et al . ( 2020 ) ; Wang et al . ( 2020a ) . All these works have proposed to replace the vanilla self-attention network by a different one with linear or log-linear memory and computation complexity leading to novel transformer architectures with overall linear or log-linear cost . Although , they provide an improvement over the quadratic cost of the vanilla transformer network , the achieved cost is still , at best , linear . Besides , since those techniques are based on either sparsification or compression of the self attention mechanism , they struggle to accumulate long distance information ( Gupta & Berant , 2020 ) . Several works such as Burtsev & Sapunov ( 2020 ) ; Ainslie et al . ( 2020 ) ; Gupta & Berant ( 2020 ) have proposed to increase the context length by introducing a global attention which attains to every input token , thus capable of capturing long distance dependency . However , capturing long distance dependency using those approaches involves extreme compression of state space by the global attention mechanism . Moreover , even though , they perform well on several tasks , their performance on language modeling task have not been tested . Another line of work ( Zhang et al. , 2019 ; Pappagari et al. , 2019 ) have suggested to use hierarchical arrangement of transformer network to capture document-wide dependency . However , applicability of those networks requires hierarchical structure in the data itself . Moreover , those techniques have been proposed for document compression rather than language modeling . In this paper , we propose a class of transformer architectures , namely Transformer-QL ( Quadratically Large ) , to alleviate the problem of capturing long distance dependency . Similar to multi-scale transformer networks ( Donahue et al. , 2019 ; Subramanian et al. , 2020 ; Zhao et al. , 2020 ; Dai et al. , 2020 ) , Transformer-QL captures the contextual information in multiple temporal scales - finer scales to capture recent past information and coarser scales to capture distance past information . Additionally like Transformer-XL , it keeps the hidden states of a past segment in memory and use it to process future segments causing the context length to grow beyond the current segment . Overall , the context length in Transformer-QL can grow up to quadratically with the memory/computational usage . The contributions of the work are as follows : • We have proposed a novel class of transformer architectures , namely Transformer-QL , in which , the context length can be made to grow linearly with memory and computation cost . Further , employing a linear cost self attention layer like Wang et al . ( 2020b ) ; Katharopoulos et al . ( 2020 ) , the context length of Transformer-QL can be made to grow quadratically in both memory and computational cost . • We have empirically evaluated a Transformer-QL model on three long range language modeling datasets . The results show significant improvement in perplexity score over Transformer-XL and Compressive Transformer . The organization of the paper is as follows . In section 2 , the proposed Transformer-QL architecture along with its background has been introduced . Section 3 provides empirical evaluation of Transformer-QL . The section also studies the sensitivity of Transformer-QL to several hyperparameters . Finally , in Section 4 , the conclusion has been drawn and future directions of the work have been suggested . 2 METHOD . 2.1 TERMINOLOGY AND NOTATIONS . In a transformer network , the input sequence are partitioned into smaller segments of fixed length . Each segment is processed independently of other segments . We refer to the number of tokens in each segment as segment length . In a transformer network with recurrent memory like TransformerXL , the hidden states of the recent past segments are preserved in a fixed length memory . We refer to the number of tokens in each layer of the memory unit as memory length . For an output state ( i.e . the output states of the last layer ) , we use the term context length to refer to the number of past tokens on which the output state depends . In transformer network , different output states might have different context length . We respectively refer the minimum and maximum of the context lengths of all the output states in a network as minimum context length and maximum context length of the network . We refer the sum of segment length and the memory length using the term window length . We denote the segment length , memory length , window length and model dimension by ns , nm , nw and dm respectively . Thus , we have nw = ns + nm . We also use the notations slt and m l t to denote the output and memory of l-th layer at time step t for l = 1 , 2 , · · · , L where L is the total number of Layers . The output and memory of embedding layer at time step t have been denoted by s0t and m0t respectively . The number of heads in the self attention layers has been denoted by H . 2.2 BACKGROUND . Transformer A transformer network consists of stacked collection of multiple transformer layers . Each transformer layer contains a multi-head self-attention layer followed by a position-wise feed forward layer . Though the memory and computational cost of position-wise feed forward layer is linear in the length of input sequence , the multi-head self attention layer has a quadratic cost . The transformer network tackles the quadratic memory and computational cost by dividing the input sequence into smaller segments and applying the transformer network on each segment independently . However , such method limits the context lengths to the segment length . Dai et al . ( 2019 ) has named this problem as context fragmentation problem . Transformer-XL Dai et al . ( 2019 ) has proposed Transformer-XL to solve the context fragmentation problem . In Transformer-XL , instead of discarding the hidden states after the computation of a segment , they are saved in memory ( please refer to Figure 3 ) . During the computation of the following segments , the self attention is applied over the hidden states of both the current segment and the memory , thus has an increased context length without quadratic increase in the memory and computational cost . In fact , the memory/computational cost of the self-attention layer of Transformer-XL grows only quadratically only with the segment size ns and linearly with the memory length nm . On the other hand , the context lengths get increased by a length of nm per layer . By keeping ns small and making nm large enough , the memory and computational cost of Transformer-XL can be made close to linear with respect to the context lengths . Rae et al . ( 2020 ) has proposed to improved the memory/computational cost of Transformer-XL further by keeping the part of the memory states in a compressed form . However , even with this improvement , the memory and computational cost can be at best linear in the context length . 2.3 THE MODEL . Overview In this paper , we explore to increase the context length by compressing the hidden states hierarchically . The high level view of our architecture is shown in Figure 1 . As shown in the figure , the model processes the input sequence in several scales of temporal granularity . Each scale consists of several transformer layers with recurrent memory . The output of the last layer of one scale is compressed causing the temporal granularity as well as the segment length to reduce . As the segment length reduces , we also simultaneously increase the memory length to keep the total length ( i.e . segment length + memory length ) of the layer constant . Then the new segment and memory is fed as the input to the first layer of the next scale . The resulting architecture is similar to the multiscale transformer architectures ( Donahue et al. , 2019 ; Subramanian et al. , 2020 ; Zhao et al. , 2020 ) . Additionally , Transformer-QL keeps recurrent memory to store hidden states of previous segments . Therefore , in Transformer-QL , the layers belonging to a finer scale process contextual information in fine-grained manner , but have a smaller context length . On the other hand , a layer belonging to a coarser scale process information in coarse-grained manner , but have a longer context length ( please refer to Figure 5 for a detailed illustration of the context lengths of Transformer-QL layers ) . To get the final output of the network , we causally combine the ( possibly over-sampled ) outputs of the last layer of each scale and pass those through several transformer layers ( following Subramanian et al . ( 2020 ) ; Zhao et al . ( 2020 ) ) to learn deep representation of the output . The Compression Function For compression , we use one of average pooling and max pooling with pool size and stride both equal to c where c is the rate by which we compress the states while transitioning from one scale to the next . Let slt and m l t be the output and memory states of l-th layer with length nls and n l m respectively . We apply the compression function on the concatenation of m l t and slt to get the output s l+1 t of length n l+1 s = ( n l s + n l m ) /c ( for simplicity assume that n l s + n l m is divisible by c ) . If nl+1s > n l s , we take the last n l s elements of s l+1 t to form the output of the compression layer . Finally , we keep a recurrent memory ml+1t of length n l s + n l m − nl+1s making nls + n l m = n l+1 s + n l+1 m to hold . The Memory Updates In Transformer-XL with segment length ns and memory length nm , the segment of length ns is get shifted into the memory . In other words , the memory for the next time step is computed as mlt+1 = concat ( m l t , s l t ) [ −nm : ] for all layer l. However , in Transformer-QL , the granularity of layers belonging to different scales are different . More precisely , a segment of length n0s belonging to scale 1 is compressed into a segment of length n 0 s/c i−1 at a layer belonging to scale i . Thus , in Transformer-QL , we update the memory of a layer l belonging to scale i as mlt+1 = concat ( m l t , s l t [ : n i h ] ) [ −nim : ] where nih = n0s/ci−1 and nim are the shift length and the memory length at scale i for i = 0 , 1 , · · · respectively . The complete algorithm of Transformer-QL is shown in Figure 2 . Droppath Regularization Since the output of the last layer of every scale is summed in the accumulation layer , the path through a higher scale forms to a deeper network while the path through a lower scale forms to a shallower network . Consequently , layers in the higher scales might remain under-fitted due to lack of gradient flow through the deeper network while the layers in the lower scales get over-fitted . To alleviate this problem , we have introduced droppath regularization . In the accumulation layer , let each output be computed as so = 1l ∑l i=1 s i where si represents the ( possibly over-sampled ) output of scale i and l is the total number of scales . In droppath regularization with droppath probability p , we drop the output of all the scales below j with a probability p/ ( l − 1 ) for j = 2 , 3 , · · · , l from the accumulated output . More precisely , we generate a random number u from uniform probability distribution and compute the output as so = 1l−j+1 ∑l i=j s i if u ∈ [ ( j−2 ) p l−1 , ( j−1 ) p l−1 ] . For u ≥ p , no droppath is applied .
The work introduces the Transformer-QL, a transformer-based model that aims to capture long distance dependencies in the input. The network processes the information defining multiple temporal scales, with finer scales for nearby elements, and coarser scales for distant information. It also includes the recurrent memory extension from Transformer-XL from Dai et al. The model is tested in a long range language modeling task.
SP:5e5fb9699cfc3ee5368b83d473e2e6289e372714
Hierarchical Meta Reinforcement Learning for Multi-Task Environments
1 INTRODUCTION . With great breakthrough of deep reinforcement learning ( DRL ) methods ( Mnih et al. , 2015 ; Silver et al. , 2016 ; Mnih et al. , 2016 ; Schulman et al. , 2015 ; Lillicrap et al. , 2015 ) , it is an urgent need to use DRL methods to solve more complex decision-making problems . The practical problem in real world is often a subtle combination of multiple sub-tasks , which may happen simultaneously and hard to disentangle by time series . For instance , in StarCraft games ( Pang et al. , 2019 ) , agents need to consider building units and organizing battles , sub-tasks may change rapidly over the whole game process ; sweeping robots tradeoff between navigating and collecting garbage ; shooting agents should move to appropriate positions and launch attacks , etc . The relationship between sub-tasks is complex and subtle . Sometimes they compete with each other and need to focus on one task to gain key advantages ; at other times , they need to cooperate with each other to maintain the possibility of global exploration . It is often time consuming and ineffective to learn simply by collecting experience and rewarding multiple objectives for different sub-tasks . A reasonable idea is to utilize deep hierarchical reinforcement learning ( DHRL ) methods ( Vezhnevets et al. , 2017 ; Igl et al. , 2020 ) , where the whole system is divided into a high-level agent and several low-level agents . Low-level agents learn sub-policies , which select atomic actions for corresponding sub-tasks . The high-level agent is responsible for a meta task in the abstract logic or coarser time granularity , guiding low-level agents by giving a goal , or directly selecting among subpolicies . However , DHRL methods face some inherent problems : due to the complex interaction between multi-level agents , there is no theoretical guarantee of convergence , and it shows unstable experimental performance . Most DHRL methods require heavy manual design , and end-to-end system lacks reasonable semantic interpretation . In addition , these agents are often constrained by specific tasks and are easy to overfit . Even transferring between similar tasks , they perform poorly and need a lot of additional adjustments . We introduce a first-person shooting ( FPS ) environment with random spatial structures . The game contains a 3D scene from human perspective . When the player defeats all enemies , the player wins the game . When the player drops to the ground or losses all health points , the player loses the game . It is very risky for the player to drop to the ground , thus environment contains two key tasks : navigation and combat . The terrain and enemies in the game are randomly generated . This ensures : 1 ) the agent can not learn useful information by memorizing coordinates ; 2 ) the possibility of overfitting is restrained and the generalization ability of learned policy is enhanced . The state information is expressed in the way of raycast . This representation of environment information requires much less computing resources than the raw image representation . It can be trained and tested even with only CPU machines , which makes us pay more attention to the reinforcement learning algorithm itself rather than the computing ablity related to image processing . For this environment , we propose a Meta Soft Hierarchical reinforcement learning framework ( MeSH ) . The high-level policy is a differentiable meta parameter generator , and the low-level policy contains several sub-policies , which are in the same form and differentiated automatically in the training procedure . The high-level policy selects and combines sub-policies through the meta parameter and interacts with the environment . We find that the meta generator can adaptively combines sub-policies with the process of the task , and have strong interpretability in semantics . Compared with a series of baselines , the agent has achieved excellent performance in FPS environment . The main contributions of this work are as follows : • clarifying the complex relationship between multi-task composition . • a novel meta soft hierarchical reinforcement learning framework , MeSH , which uses differentiable meta generator to adaptively select sub-policies and shows strong interpretability . • a series of comparison experiments to show the effectiveness of the framework . • an open-sourced environment and code to encourage further research on multi-task RL 1 . In this paper , we discuss the related work in Section 2 . We introduce the details of the implemented environment in Section 3 . We show our proposed framework in Section 4 . We demonstrate details of our experiments in Section 5 . At last , we conclude in Section 6 . 2 RELATED WORK . In decision-making problems with high-dimensional continuous state space , the agent often needs to complete tasks that contain multiple sub-tasks . To complete taxi agent problem ( Dietterich , 2000 ) , the agent needs to complete sub-tasks such as pickup , navigate , putdown . Menashe & Stone ( 2018 ) proposed Escape Room Domain , which is a testbed for HRL . The agent leaves the room from the starting point and needs to press four buttons of different colors to leave the room . In these environments , the agent needs to optimize several sub-tasks and minimize the mutual negative influence between them . However , sub-tasks in these environments are timing dependent . The proposed methods above are helpless in a multi-task environment that needs to fulfill multiple tasks simultaneously . Architectural solutions use hierarchical structure to decompose tasks into action primitives . Sutton et al . ( 1999 ) models temporal abstraction as an option on top of extended actions , Bacon et al . ( 2017 ) proposes an actor-critic option method based on it . Henderson et al . ( 2017 ) extend the options framework to learn joint reward-policy options . Besides , Jiang et al . ( 2019 ) construct a compositional structure with languages as abstraction or instruction . Due to specific structure design of these methods , high-level agent is unable to execute multiple sub-policies simultaneously in any form . Recent HRL works learn intra-goals to instruct sub-policies . Vezhnevets et al . ( 2017 ) proposes a manager-worker model , manager abstracts goals and instructs worker . This architecture uses directional goal rather than absolute update goal . Oh et al . ( 2017 ) learns a meta controller to instruct implementation and update of sub-tasks . Igl et al . ( 2020 ) presents a new soft hierarchy method based on option , it learns with shared prior and hierarchical posterior policies . Yu et al . ( 2020 ) proposes a method that projects the conflict gradient onto the normal plane to avoid some task gradients dominating others . Compared with the hard hierarchy methods , these methods use the state ’ s natural features to update the upper-level policy , avoiding the timing constraints of handcrafted sub-tasks . Due to the lack of meaningful learning goals of sub-policies , the low-level policies fail to focus on explainable sub-tasks . 1https : //github.com/MeSH-ICLR/MEtaSoftHierarchy.git HRL has been recently combined with meta-learning . Frans et al proposes Meta-Learning Shared Hierarchies ( MLSH ) ( Frans et al. , 2017 ) , which updates master policy and sub-policy by metalearning . Zou et al . ( 2019 ) uses meta-learning to learn reward shaping . Rakelly et al . ( 2019 ) extends the idea of disentangling task inference and control to help agents leverage knowledges between tasks . Although these methods reduced the limitation of policy structures , it is difficult to learn multi-tasks in parallel due to the fixed time steps selected by the master policy for every sub-policy . It is also reasonable to learn sub-tasks based on decomposition of rewards . Saxe et al . ( 2017 ) expresses behaviors as different weighted task blends by the communication between layers so that can maintain a parallel distributed representation of tasks , but the structure is hard to abstract the relationship between different sub-tasks . Grimm & Singh ( 2019 ) and Lin et al . ( 2019 ) allocate each state with one sub-reward function , which is a non-overlapping decomposition of spatial space . In contrast to these approaches , our method can represent complex and subtle relationship between multiple sub-tasks and perform them simultaneously with explainable sub-goals . 3 ENVIRONMENT . To better understand multi-task decision-making problems , we firstly introduce a first-person shooting environment with random terrain , as shown in Figure 1 . The game contains a 3D scene , which analogy to human perspective . This makes the behavior of trained agent similar to human intelligence . The real-time information is shown in Table 1 . The condition of winning the game is to defeat all the enemies in the game . When the player drops to the ground or losses all health points , the game will be judged as failed . This game is very risky as it ’ s easy to drop . Thus the environment contains two key tasks : navigation and combat . The terrain and enemies in the game are randomly generated . This ensures : 1 ) the agent can not learn useful information by memorizing coordinates ; 2 ) the possibility of over-fitting is restrained and the generalization ability of learned policy is enhanced . The state information of the agent is expressed in the way of raycast , as shown in Figure 2 . This representation of environment information requires much less computing resources than raw image representation . It can be trained and tested even with only CPU machines , which makes us pay more attention to the reinforcement learning algorithm itself rather than the computing ability related to image processing . The generation rules of random terrain are as follows . The maximum generated height of random terrain is set to 5 . In the initial state , there is only one parcel , which is also the place where the player is born . We add this parcel to the parcel queue . If the parcel queue is not empty , the parcel at the head of the queue will be taken out . When the maximum height is not reached , we expand the parcel to four directions of the higher level with equal probability . If there is no new parcel in the corresponding position of the higher level , a new parcel is generated . A ramp is established between the new parcel and the current parcel and a random number of enemy is created at the random position of the new parcel , and then the new parcel is added to the parcel queue . If there are new parcels in the corresponding position of the higher level , the new parcels are not generated repeatedly , and only the ramp between the two parcels is added . Repeat adding parcels until the parcel queue is empty , then terrain generation is completed . The FPS environment is typically a combination of two sub-tasks : navigation and combat . The relationship between these two sub-tasks is subtle and complex . Sometimes they compete with each other , but at other times , they cooperate for a common objective . For instance , in navigation missions , in order to explore more unseen terrain , sometimes we need to fight to clear enemies along the way ; but at other times , we have to focus on navigation to pass through narrow terrain . Similarly , in combat missions , sometimes we need to move to get a better position to shoot ; but at other times , we need to focus on shooting to kill the enemy quickly . This environment is very representative of practical problems , since a large number of them can be divided into several parts which are contradictory and unified . In addition , each sub-task in this environment is simple and clear , but the combination of them greatly increases the difficulty of solving the problem . This forces the RL algorithm to focus more on dealing with these complex relationships , rather than the specific techniques for solving a single problem .
This paper considers a FPS game that can be decomposed into two sub-tasks, navigation and shooting. A hierarchical meta RL method is introduced and the updating rules for sub-policies and meta parameters are provided. Experiments focus on this specific environment and hence the hierarchical structure is also specified as a meta controller over two sub-policies defined for navigation and shooting explicitly.
SP:1d1f110bbf38b9ed8faeefa13e59367e2945206c
Generalizing and Tensorizing Subgraph Search in the Supernet
1 INTRODUCTION . Deep learning ( Goodfellow et al. , 2017 ) has been successfully applied in many applications , such as image classification for computer vision ( CV ) ( LeCun et al. , 1998 ; Krizhevsky et al. , 2012 ; He et al. , 2016 ; Huang et al. , 2017 ) and language modeling for natural language processing ( NLP ) ( Mikolov et al. , 2013 ; Devlin et al. , 2018 ) . While the architecture design is of great importance to deep learning , manually designing proper architectures for a certain task is hard and requires lots of human efforts or sometimes even impossible ( Zoph & Le , 2017 ; Baker et al. , 2016 ) . Recently , neural architecture search ( NAS ) techniques ( Elsken et al. , 2019 ) have been developed to alleviate this issue , which mainly focuses on CV and NLP tasks . Behind existing NAS methods , a multi-graph ( Skiena. , 1992 ) structure , i.e. , supernet ( Zoph et al. , 2017 ; Pham et al. , 2018 ; Liu et al. , 2018 ) , where nodes are connected by edges with multiple choices , has played a central role . In such context , the choices on each edge are different operations , and the subgraphs correspond to different neural architectures . The objective here is to find a suitable subgraph in this supernet , i.e . better neural architectures for a given task . However , the supernet does not only arise in CV/NLP field and we find it also emerge in many other deep learning areas ( see Table 1 ) . An example is logical chain inference on knowledge graphs ( Yang et al. , 2017 ; Sadeghian et al. , 2019 ; Qu & Tang , 2019 ) , where the construction logical rules can be modeled by a supernet . Another example is meta-path discovery in heterogeneous information networks ( Yun et al. , 2019 ; Wan et al. , 2020 ) , where the discovery of meta-paths can also be modeled by a supernet . Therefore , we propose to broaden the horizon of NAS , i.e. , generalize it to many deep learning fields and solve the new NAS problem under a unified framework . Since subgraphs are discrete objects ( choices on each edge are discrete ) , it has been a common approach ( Liu et al. , 2018 ; Sadeghian et al. , 2019 ; Yun et al. , 2019 ) to transform it into a continuous optimization problem . Previous methods often introduce continuous parameters separately for each edge . However , this formulation can not generalize to different supernets as the topological structures of supernets are highly task-dependent and diverse . Therefore , it will fail to capture the supernet ’ s topology and hence be ineffective . In this paper , we propose a novel method TRACE to introduce a continuous parameter for each subgraph ( all these parameters will form a tensor ) . Then , we propose to construct a tensor network ( TN ) ( andrzej . et al. , 2016 ; 2017 ) based on the topological structure of supernet . For different tensor networks , we introduce an efficient algorithm for optimization on supernets . Extensive experiments are conducted on diverse deep learning tasks . Empirical results demonstrate that TRACE performs better than the state-of-the-art methods in each domain . As a summary , our contributions are as follows : • We broaden the horizon of existing supernet-based NAS methods . Specifically , we generalize the concept of subgraph search in supernet from NAS to other deep learning tasks that have graph-like structures and propose to solve them in a unified framework by tensorizing the supernet . • While existing supernet-based NAS methods ignore the topological structure of the supernet , we encode the supernet in a topology-aware manner based on the tensor network and propose an efficient algorithm to solve the search problem . • We conduct extensive experiments on various learning tasks , i.e. , architecture design for CV , logical inference for KG , and meta-path discovery for HIN . Empirical results demonstrate that our method can find better architectures , which lead to state-of-the-art performance on various applications . 2 RELATED WORKS . 2.1 SUPERNET IN NEURAL ARCHITECTURE SEARCH ( NAS ) . There have been numerous algorithms proposed to solve the NAS problem . The first NAS work , NASRL ( Zoph & Le , 2017 ) , models the NAS problem as a multiple decision making problem and proposes to use reinforcement learning ( RL ) ( Sutton & Barto , 2018 ) to solve this problem . However , this formulation does not consider the repetitively stacked nature of neural architectures and is very inefficient as it has to train many different networks to converge . To alleviate this issue , NASNet ( Zoph et al. , 2017 ) first models NAS as an optimization problem on supernet . The supernet formulation enables searching for transferrable architectures across different datasets and improves the searching efficiency . Later , based on the supernet formulation , ENAS ( Pham et al. , 2018 ) proposes weight-sharing techniques , which shares the weight of each subgraph in a supernet . This technique further improves searching efficiency and many different methods have been proposed under this framework ( see Table 1 ) , including DARTS ( Liu et al. , 2018 ) , SNAS ( Xie et al. , 2018 ) , and NASP ( Yao et al. , 2020 ) . DARTS is the first to introduce deterministic formulation to NAS field , and SNAS uses a similar parametrized method with DARTS under stochastic formulation . NASP improves upon DARTS by using proximal operator ( Parikh & Boyd , 2014 ) and activates only one subgraphs in each iteration to avoid co-adaptation between subgraphs . 2.2 TENSOR METHODS IN MACHINE LEARNING . A tensor ( Kolda & Bader , 2009 ) is a multi-dimensional array as an extension to a vector or matrix . Tensor methods have found wide applications in machine learning , including network compression ( Novikov et al. , 2015 ; Wang et al. , 2018 ) and knowledge graph completion ( Liu et al. , 2020 ) . Recently , andrzej . et al . ( 2016 ; 2017 ) have proposed a unified framework called tensor network ( TN ) , which uses an undirected graph to represent tensor decomposition methods . By using different graphs , TN can cover many tensor decomposition methods as a special case , e.g. , CP ( Bro , 1997 ) , Tucker ( Tucker , 1966 ) , tensor train ( Oseledets , 2011 ) , and tensor ring decomposition ( Zhao et al. , 2016 ) . However , it is not an easy task to construct a tensor network for a given problem , as the topological structure of tensor network is hard to design ( Li & Sun , 2020 ) . 3 PROPOSED METHOD . Here , we describe our method for the supernet search problem . Section 3.1-3.2 introduce how we tensorize the supernets . Section 3.3 propose an optimization algorithm for the search problem which can be utilized for both stochastic and deterministic objectives . Finally , how supernet appears beyond existing NAS works and can be generalized to these new tasks are presented in Section 3.4 . Notations . In this paper , we will use S to denote a supernet , and P to denote a subgraph in supernet . For a supernet S with T edges , we let all edges be indexed by e1 , . . . , eT , and define Ct to be the number of choices on edge et with t ∈ { 1 , . . . , T } . With subscript i1 , . . . , iT denoted by i− for short , we use Si− to denote the subgraph with choices i1 ∈ { 1 , . . . , C1 } , . . . , iT ∈ { 1 , . . . , CT } . And we use softmax ( oi ) = exp ( oi ) / ∑n j=1 exp ( oj ) to denote the softmax operation over a vector oi ∈ Rn . 3.1 A TENSOR FORMULATION FOR SUPERNET . While existing works ( Liu et al. , 2018 ; Zoph et al. , 2017 ; Pham et al. , 2018 ) introduce parameters separately for each edge et , since edges may correlate with each other , a more general and natural approach is to introduce a continuous parameter directly for each subgraph P ∈ S. Note that a subgraph P can be distinguished by its choices on each edge , we propose to encode all possible choices into a tensor T ∈ RC1×···×CT and take these choices as indices , i.e. , i− , to the tensor T . As a consequence , the architecture of the subgraph P is indexed as Si− , and Ti− ∈ [ 0 , 1 ] represent how “ good ” P can be . Let f ( w , P ) stand for a learning model with the parameter w and subgraph P ∈ T , L be the loss of f on the training dataset Dtr , and J measure the performance of f on the validation set Dval . Under above tensor formulation , the search objective here is : max P∈T J ( f ( w∗ ( P ) , P ) ; Dval ) , s.t . { w∗ ( P ) = arg minw L ( f ( w , P ) ; Dtr ) ∑ i− Ti− = 1 , ( 1 ) Same as existing supernet search works , the subgraph P is searched in the upper-level , while the network weight w is trained in the lower-level . Dtr is the training set and Dval is the validation set . However , we have the extra constraint ∑ i− Ti−=1 here , which is to ensure that the sum of probabilities for all subgraphs is one . Next , we show how P and T can be parameterized with topological information from the supernet in Section 3.2 . Then , a gradient-based algorithm which can effectively handle the constrained bi-level optimization problem ( 1 ) is proposed in Section 3.3 . 3.2 ENCODING SUPERNET TOPOLOGY BY TENSOR NETWORK ( TN ) . Existing methods consider each edge separately and can be seen as rank-1 factorization of the full tensor T ( see Table 1 ) under ( 1 ) , i.e . Ti− = θ1i1 . . . θ T iT where θtit ∈ R is the continuous parameter for choice it on edge t. However , this formulation ignores the topological structure of different supernets , as it uses the same decomposition method for all supernets . Motivated by such limitation , we propose to introduce tensor network ( TN ) to better encode the topological structure of supernet . Our encoding process is described in Algorithm 1 , where N ( S ) to denotes the set of nodes in this supernet and N ′ ( S ) ⊆ N ( S ) denotes the set of nodes that are connected to more than one edge . Specifically , we introduce a third-order tensor αt for each edge , which is based on previous methods ( e.g. , DARTS and SNAS ) , but uses tensors instead of vectors to allow more flexibility . And we introduce hyper-parametersRN1 ( t ) andRN2 ( t ) , which are corresponding to the rank of tensor network . Then , we use index summation to reflect the topological structure ( common nodes ) between different edges , i.e. , Ti− = ∑Rn rn , n∈N ′ ( S ) ∏T t=1 αtrN1 ( t ) , it , rN2 ( t ) , ( 2 ) We also give two examples in 1Figure 2 to illustrate our tensorizing process for two specific supernets . Algorithm 1 Supernet encoding process ( a step-by-step and graphical illustration is in Appendix.G ) . Input : Supernet S ; 1 : Introduce αt ∈ RRN1 ( t ) ×Ct×RN2 ( t ) for edge et which connects nodes N1 ( t ) and N2 ( t ) ; 2 : Remove isolated nodes and obtain N ′ ( S ) ; 3 : Compute Ti− by ( 2 ) ; 4 : return encoded supernet Ti− ; The reason of using N ′ ( S ) instead of N ( S ) is 2Proposition 1 , which shows that using N ′ ( S ) will not restrict the expressive power but allows the usage of less parameters . Proposition 1 . Any tensors that can be expressed by Ti− = ∑Rn rn , n∈N ( S ) ∏T t=1 α t rN1 ( t ) , it , rN2 ( t ) can also be expressed by Ti− = ∑Rn rn , n∈N ′ ( S ) ∏T t=1 α t rN1 ( t ) , it , rN2 ( t ) .
+ This paper generalizes the supernet search problem on a broader horizon. Specifically, some of the current NAS methods use supernet to co-training different neural architectures for further architecture search. This paper does not just consider supernet as a tool for NAS, but also consider supernet as a graphical model and extend supernet to several general tasks in the form of graph data. (+)
SP:1f7be784b1ff0491f0d78b5eefe1a7706036feeb
$i$-Mix: A Domain-Agnostic Strategy for Contrastive Representation Learning
1 INTRODUCTION . Representation learning ( Bengio et al. , 2013 ) is a fundamental task in machine learning since the success of machine learning relies on the quality of representation . Self-supervised representation learning ( SSL ) has been successfully applied in several domains , including image recognition ( He et al. , 2020 ; Chen et al. , 2020a ) , natural language processing ( Mikolov et al. , 2013 ; Devlin et al. , 2018 ) , robotics ( Sermanet et al. , 2018 ; Lee et al. , 2019 ) , speech recognition ( Ravanelli et al. , 2020 ) , and video understanding ( Korbar et al. , 2018 ; Owens & Efros , 2018 ) . Since no label is available in the unsupervised setting , pretext tasks are proposed to provide self-supervision : for example , context prediction ( Doersch et al. , 2015 ) , inpainting ( Pathak et al. , 2016 ) , and contrastive learning ( Wu et al. , 2018b ; Hjelm et al. , 2019 ; He et al. , 2020 ; Chen et al. , 2020a ) . SSL has also been used as an auxiliary task to improve the performance on the main task , such as generative model learning ( Chen et al. , 2019 ) , semi-supervised learning ( Zhai et al. , 2019 ) , and improving robustness and uncertainty ( Hendrycks et al. , 2019 ) . Recently , contrastive representation learning has gained increasing attention by showing state-ofthe-art performance in SSL for large-scale image recognition ( He et al. , 2020 ; Chen et al. , 2020a ) , which outperforms its supervised pre-training counterpart ( He et al. , 2016 ) on downstream tasks . However , while the concept of contrastive learning is applicable to any domains , the quality of learned representations rely on the domain-specific inductive bias : as anchors and positive samples are obtained from the same data instance , data augmentation introduces semantically meaningful variance for better generalization . To achieve a strong , yet semantically meaningful data augmentation , domain knowledge is required , e.g. , color jittering in 2D images or structural information in video understanding . Hence , contrastive representation learning in different domains requires an effort to develop effective data augmentations . Furthermore , while recent works have focused on largescale settings where millions of unlabeled data is available , it would not be practical in real-world applications . For example , in lithography , acquiring data is very expensive in terms of both time and cost due to the complexity of manufacturing process ( Lin et al. , 2018 ; Sim et al. , 2019 ) . Meanwhile , MixUp ( Zhang et al. , 2018 ) has shown to be a successful data augmentation for supervised learning in various domains and tasks , including image classification ( Zhang et al. , 2018 ) , generative model learning ( Lucas et al. , 2018 ) , and natural language processing ( Guo et al. , 2019 ; Guo , 2020 ) . In this paper , we explore the following natural , yet important question : is the idea of MixUp useful for unsupervised , self-supervised , or contrastive representation learning across different domains ? To this end , we propose instance Mix ( i-Mix ) , a domain-agnostic regularization strategy for contrastive representation learning . The key idea of i-Mix is to introduce virtual labels in a batch and mix data instances and their corresponding virtual labels in the input and label spaces , respectively . We first introduce the general formulation of i-Mix , and then we show the applicability of i-Mix to state-ofthe-art contrastive representation learning methods , SimCLR ( Chen et al. , 2020a ) and MoCo ( He et al. , 2020 ) , and a self-supervised learning method without negative pairs , BYOL ( Grill et al. , 2020 ) . Through the experiments , we demonstrate the efficacy of i-Mix in a variety of settings . First , we show the effectiveness of i-Mix by evaluating the discriminative performance of learned representations in multiple domains . Specifically , we adapt i-Mix to the contrastive representation learning methods , advancing state-of-the-art performance across different domains , including image ( Krizhevsky & Hinton , 2009 ; Deng et al. , 2009 ) , speech ( Warden , 2018 ) , and tabular ( Asuncion & Newman , 2007 ) datasets . Then , we study i-Mix in various conditions , including when 1 ) the model and training dataset is small or large , 2 ) domain knowledge is limited , and 3 ) transfer learning . Contribution . In summary , our contribution is three-fold : • We propose i-Mix , a method for regularizing contrastive representation learning , motivated by MixUp ( Zhang et al. , 2018 ) . We show how to apply i-Mix to state-of-the-art contrastive representation learning methods ( Chen et al. , 2020a ; He et al. , 2020 ; Grill et al. , 2020 ) . • We show that i-Mix consistently improves contrastive representation learning in both vision and non-vision domains . In particular , the discriminative performance of representations learned with i-Mix is on par with fully supervised learning on CIFAR-10/100 ( Krizhevsky & Hinton , 2009 ) and Speech Commands ( Warden , 2018 ) . • We verify the regularization effect of i-Mix in a variety of settings . We empirically observed that i-Mix significantly improves contrastive representation learning when 1 ) the training dataset size is small , or 2 ) the domain knowledge for data augmentations is not enough . 2 RELATED WORK . Self-supervised representation learning ( SSL ) aims at learning representations from unlabeled data by solving a pretext task that is derived from self-supervision . Early works on SSL proposed pretext tasks based on data reconstruction by autoencoding ( Bengio et al. , 2007 ) , such as context prediction ( Doersch et al. , 2015 ) and inpainting ( Pathak et al. , 2016 ) . Decoder-free SSL has made a huge progress in recent years . Exemplar CNN ( Dosovitskiy et al. , 2014 ) learns by classifying individual instances with data augmentations . SSL of visual representation , including colorization ( Zhang et al. , 2016 ) , solving jigsaw puzzles ( Noroozi & Favaro , 2016 ) , counting the number of objects ( Noroozi et al. , 2017 ) , rotation prediction ( Gidaris et al. , 2018 ) , next pixel prediction ( Oord et al. , 2018 ; Hénaff et al. , 2019 ) , and combinations of them ( Doersch & Zisserman , 2017 ; Kim et al. , 2018 ; Noroozi et al. , 2018 ) often leverages image-specific properties to design pretext tasks . Meanwhile , alhough deep clustering ( Caron et al. , 2018 ; 2019 ; Asano et al. , 2020 ) is often distinguished from SSL , it also leverages unsupervised clustering assignments as self-supervision for representation learning . Contrastive representation learning has gained lots of attention for SSL ( He et al. , 2020 ; Chen et al. , 2020a ) . As opposed to early works on exemplar CNN ( Dosovitskiy et al. , 2014 ; 2015 ) , contrastive learning maximizes similarities of positive pairs while minimizes similarities of negative pairs instead of training an instance classifier . As the choice of negative pairs is crucial for the quality of learned representations , recent works have carefully designed them . Memory-based approaches ( Wu et al. , 2018b ; Hjelm et al. , 2019 ; Bachman et al. , 2019 ; Misra & van der Maaten , 2020 ; Tian et al. , 2020a ) maintain a memory bank of embedding vectors of instances to keep negative samples , where the memory is updated with embedding vectors extracted from previous batches . In addition , MoCo ( He et al. , 2020 ) showed that differentiating the model for anchors and positive/negative samples is effective , where the model for positive/negative samples is updated by the exponential moving average of the model for anchors . On the other hand , recent works ( Ye et al. , 2019 ; Misra & van der Maaten , 2020 ; Chen et al. , 2020a ; Tian et al. , 2020a ) showed that learning invariance to different views is important in contrastive representation learning . The views can be generated through data augmentations carefully designed using domain knowledge ( Chen et al. , 2020a ) , splitting input channels ( Tian et al. , 2020a ) , or borrowing the idea of other pretext tasks , such as creating jigsaw puzzles or rotating inputs ( Misra & van der Maaten , 2020 ) . In particular , SimCLR ( Chen et al. , 2020a ) showed that a simple memory-free approach with a large batch size and strong data augmentations has a comparable performance to memory-based approaches . InfoMin ( Tian et al. , 2020b ) further studied a way to generate good views for contrastive representation learning and achieved state-of-the-art performance by combining prior works . Different from other contrastive representation learning methods , BYOL ( Grill et al. , 2020 ) does not require negative pairs , where the proposed pretext task aims at predicting latent representations of one view from another . While prior works have focused on SSL on large-scale visual recognition tasks , our work focuses on contrastive representation learning in both small- and large-scale settings in different domains . Data augmentation is a technique to increase the diversity of data , especially when training data are not enough for generalization . Since the augmented data must be understood as the original data , data augmentations are carefully designed using the domain knowledge about images ( DeVries & Taylor , 2017b ; Cubuk et al. , 2019a ; b ; Zhong et al. , 2020 ) , speech ( Amodei et al. , 2016 ; Park et al. , 2019 ) , or natural languages ( Zhang et al. , 2015 ; Wei & Zou , 2019 ) . Some works have studied data augmentation with less domain knowledge : DeVries & Taylor ( 2017a ) proposed a domain-agnostic augmentation strategy by first encoding the dataset and then applying augmentations in the feature space . MixUp ( Zhang et al. , 2018 ) is an effective data augmentation strategy in supervised learning , which performs vicinal risk minimization instead of empirical risk minimization , by linearly interpolating input data and their labels on the data and label spaces , respectively . On the other hand , MixUp has also shown its effectiveness in other tasks and non-vision domains , including generative adversarial networks ( Lucas et al. , 2018 ) , improved robustness and uncertainty ( Hendrycks et al. , 2020 ) , and sentence classification in natural language processing ( Guo , 2020 ; Guo et al. , 2019 ) . Other variations have also been investigated by interpolating in the feature space ( Verma et al. , 2019 ) or leveraging domain knowledge ( Yun et al. , 2019 ) . MixUp would not be directly applicable to some domains , such as point clouds , but its adaptation can be effective ( Harris et al. , 2020 ) . i-Mix is a kind of data augmentation for better generalization in contrastive representation learning , resulting in better performances on downstream tasks . Concurrent works have leveraged the idea of MixUp for contrastive representation learning . As discussed in Section 3.3 , only input data can be mixed for improving contrastive representation learning ( Shen et al. , 2020 ; Verma et al. , 2020 ; Zhou et al. , 2020 ) , which can be considered as injecting data-driven noises . Kalantidis et al . ( 2020 ) mixed hard negative samples on the embedding space . Kim et al . ( 2020 ) reported similar observations to ours but focused on small image datasets .
The key idea of this paper is to apply MixUp-style regularization to self-supervised contrastive learning techniques (SimCLR, MoCo-v2, BYOL). This is combined with another form of MixUp that involves only the images (not the labels), but the precise nature of this component is unclear. For large networks trained on small datasets, the proposed method improves downstream classification performance by reducing overfitting (Table 1, Figure 2). The results are mixed for large-scale datasets (Table 2, Figure 3). The proposed method is also investigated as a potential domain-agnostic augmentation. Though much better than not using any augmentations at all, the results are not typically better than using standard augmentations (Table 3).
SP:f346cf947c90327e475698f0d0018064c2497b64
Stochastic Canonical Correlation Analysis: A Riemannian Approach
t ) convergence rate ( where d is the dimensionality ) or only extract the top 1 component with O ( 1t ) convergence rate . In contrast , our algorithm achieves O ( d2k ) runtime complexity per iteration for extracting top k canonical components with O ( 1t ) convergence rate . We present our theoretical analysis as well as experiments describing the empirical behavior of our algorithm , including a potential application of this idea for training fair models where the label of protected attribute is missing or otherwise unavailable . 1 INTRODUCTION . Canonical correlation analysis ( CCA ) is a popular method for evaluating correlations between two sets of variables . It is commonly used in unsupervised multi-view learning , where the multiple views of the data may correspond to image , text , audio and so on Rupnik & Shawe-Taylor ( 2010 ) ; Chaudhuri et al . ( 2009 ) ; Luo et al . ( 2015 ) . Classical CCA formulations have also been extended to leverage advances in representation learning , for example , Andrew et al . ( 2013 ) showed how the CCA can be interfaced with deep neural networks enabling modern use cases . Many results over the last few years have used CCA or its variants for problems including measuring representational similarity in deep neural networks Morcos et al . ( 2018 ) , speech recognition Couture et al . ( 2019 ) , etc . The goal in CCA is to find linear combinations within two random variables X and Y which have maximum correlation with each other . Formally , the CCA problem is defined in the following way . Given a pair of random variables , a dx-variate random variable X and a dy-variate random variable Y , with unknown joint probability distribution , find the projection matrices U ∈ Rdx×k and V ∈ Rdy×k , with k ≤ min { dx , dy } , such that the correlation is maximized : maximize trace ( UTEX , Y [ XTY ] V ) s.t . UTEX [ XTX ] U = Ik , V TEY [ Y TY ] V = Ik ( 1 ) Here , X , Y are samples of X and Y respectively . The objective function in ( 1 ) is the expected crosscorrelation in the projected space and the constraints specify that different canonical components should be decorrelated . Let CX = EX [ XTX ] and CY = EY [ Y TY ] be the covariance matrices , and CXY = E ( X , Y ) [ XTY ] denote cross-covariance . Let us define the whitened covariance T : = C −1/2 X CXY C −1/2 Y and Φk ( and Ψk ) contains the top-k left ( and right ) singular vectors of T . It is known Golub & Zha ( 1992 ) that the optimum of ( 1 ) is achieved at U∗ = C−1/2X Φk , V ∗ = C −1/2 Y Ψk . In practice , we may be given two views of N samples as X ∈ RN×dx and Y ∈ RN×dy . A natural approach to solving CCA is based on on the following sequence of steps . We first compute the empirical covariance and cross-covariance matrices , namely , C̃X = 1/NXTX , C̃Y = 1/NY TY and C̃XY = 1/NX TY . We then calculate the empirical whitened cross-covariance matrix T̃ , finally , compute U∗ , V ∗ by applying a k-truncated SVD to T̃ . Runtime and memory considerations . The above procedure is simple but is only feasible when the data matrices are small . But in most modern applications , not only are the datasets large but also the dimension d ( let d = max { dx , dy } ) of each sample can be quite high , especially if representations are being learned using deep neural network models . As a result , the computational footprint of the foregoing algorithm can be quite high . This has motivated the study of stochastic optimization routines for solving CCA . Observe that in contrast to the typical settings where stochastic optimization schemes are most effective , the CCA objective does not decompose over samples in the dataset . Many efficient strategies have been proposed in the literature : for example , Ge et al . ( 2016 ) ; Wang et al . ( 2016 ) present Empirical Risk Minimization ( ERM ) models which optimize the empirical objective . More recently , Gao et al . ( 2019 ) ; Bhatia et al . ( 2018 ) ; Arora et al . ( 2017 ) describe proposals that optimize the population objective . To summarize the approaches succinctly , if we are satisfied with identifying the top 1 component of CCA , effective schemes are available by utilizing either extensions of the Oja ’ s rule Oja ( 1982 ) to generalized eigenvalue problem Bhatia et al . ( 2018 ) or the alternating SVRG algorithm Gao et al . ( 2019 ) ) . Otherwise , a stochastic approach must make use of an explicit whitening operation which involves a cost of d3 for each iteration Arora et al . ( 2017 ) . Observation . Most approaches either directly optimize ( 1 ) or instead a reparametrized or regularized form Ge et al . ( 2016 ) ; Allen-Zhu & Li ( 2016 ) ; Arora et al . ( 2017 ) . Often , the search space for U and V corresponds to the entire Rd×k ( ignoring the constraints for the moment ) . But if the formulation could be cast in a form which involved approximately writing U and V as a product of several matrices with nicer properties , we may obtain specialized routines which are tailored to exploit those properties . Such a reformulation is not difficult to derive – where the matrices used to express U and V can be identified as objects that live in well studied geometric spaces . Then , utilizing the geometry of the space and borrowing relevant tools from differential geometry leads to an efficient approximate algorithm for top-k CCA which optimizes the population objective in a streaming fashion . Contributions . ( a ) First , we re-parameterize the top-k CCA problem as an optimization problem on specific matrix manifolds , and show that it is equivalent to the original formulation in equation 1 . ( b ) Informed by the geometry of the manifold , we derive stochastic gradient descent algorithms for solving the re-parameterized problem with O ( d2k ) cost per iteration and provide convergence rate guarantees . ( c ) This analysis provides a direct mechanism to obtain an upper bound on the number of iterations needed to guarantee an error w.r.t . the population objective for the CCA problem . ( d ) The algorithm works in a streaming manner so it easily scales to large datasets and we do not need to assume access to the full dataset at the outset . ( e ) We present empirical evidence for both the standard CCA model and the DeepCCA setting Andrew et al . ( 2013 ) , describing advantages and limitations . 2 STOCHASTIC CCA : REFORMULATION , ALGORITHM AND ANALYSIS . The formulation of Stochastic CCA and the subsequent optimization scheme will seek to utilize the geometry of the feasible set for computational gains . Specifically , we will use the following manifolds ( please see Absil et al . ( 2007 ) for more details ) : ( a ) Stiefel : St ( p , n ) . The manifold consists of n× p , with p < n , column orthonormal matrices , i.e. , St ( p , n ) = { X ∈ Rn×p|XTX = Ip } . ( b ) Grassmanian : Gr ( p , n ) . The manifold consists of p-dimensional subspaces in Rn , with p < n. ( c ) Rotations : SO ( n ) . the manifold/group consists of n × n special orthogonal matrices , i.e. , SO ( n ) = { X ∈ Rn×n|XTX = XXT = In , det ( X ) = 1 } . We summarize certain geometric properties/operations for these manifolds in the Appendix but have been leveraged in recent works for other problems also Li et al . ( 2020 ) ; Rezende et al . ( 2020 ) . Let us recall the objective function for CCA as given in ( 1 ) . We denote X ∈ RN×dx as the matrix consisting of the samples { xi } drawn from a zero mean random variable X ∼ X and Y ∈ RN×dy denotes the matrix consisting of samples { yi } drawn from a zero mean random variable Y ∼ Y . For notational and formulation simplicity , we assume that dx = dy = d in the remainder of the paper although the results hold for general dx and dy . Let CX , CY be the covariance matrices of X , Y . Also , let CXY be the cross-correlation matrix between X and Y . Then , we can write the CCA objective as max U , V F = trace ( UTCXY V ) subject to UTCXU = Ik V TCY V = Ik ( 2 ) Here , U ∈ Rd×k ( V ∈ Rd×k ) is the matrix consisting of { uj } ( { vj } ) , where ( { uj } , { vj } ) are the canonical directions . The constraints in equation 2 are called whitening constraints . Let us define matrices Ũ , Ṽ ∈ Rd×k which lie on the Stiefel manifold , St ( k , d ) . Also , let Su , Sv ∈ Rk×k denote upper triangular matrices and Qu , Qv ∈ SO ( k ) . We can rewrite the above equation and the constraint as follows . A Reformulation for CCA max Ũ , Ṽ , Su , Sv , Qu , Qv U=ŨQuSu ; V=Ṽ QvSv F̃ = trace ( UTCXY V ) ( 3a ) subject to UTCXU = Ik ; V TCY V = Ik ( 3b ) Ũ , Ṽ ∈ St ( k , d ) ; Qu , Qv ∈ SO ( k ) ; Su , Sv is upper triangular Here , we will maximize ( 3a ) with respect to Ũ , Ṽ , Su , Sv , Qu , and Qv satisfying equation 3b . Main adjustment from ( 2 ) to ( 3 ) : In ( 2 ) , while U and V should decorrelateCX andCY respectively , the optimization/search is unrestricted and treats them as arbitrary matrices . In contrast , equation 3 additionally decomposes U and V as U = ŨQuSu and V = Ṽ QvSv with the components as structured matrices . Hence , the optimization is regularized . The above adjustment raises two questions : ( i ) does there exist a non-empty feasible solution set for ( 3 ) ? ( ii ) if a solution to ( 3 ) can be found ( which we will describe later ) , how “ good ” is this solution for the CCA objective problem , i.e. , for ( 2 ) ? Existence of a feasible solution : We need to evaluate if the constraints in ( 3b ) can be satisfied at all . Observe that by using Ũ to be the top-k principal directions of X , Su to be the 1/ √ top-k eigen values of CX and Qu to be any orthogonal matrix , we can easily satisfy the “ whitening constraint ” and hence ŨQuSu is a feasible solution of U in ( 3 ) and similarly for V . From this starting point , we can optimize the objective while ensuring that we maintain feasibility . Is the solution for equation 3 a good approximation for equation 2 ? : We can show that under some assumptions , the estimator for canonical correlation , i.e. , solution of equation 3 , is consistent , i.e. , solves equation 2 . We will state this formally shortly . Before characterizing the properties of a solution for equation 3 , we first provide some additional intuition behind equation 3 and describe how it helps computationally . Intuition behind the decomposition U = ŨQuSu : A key observation is the following . Recall that by performing principal component analysis ( PCA ) , the resultant projection matrix will exactly satisfy the decorrelation condition needed for the “ whitening constraint ” in equation 2 ( projection matrix consists of the eigen-vectors of XTX ) . A natural question to ask is : Can we utilize streaming PCA algorithm to help us obtain an efficient streaming CCA algorithm ? Let us assume that our estimate for canonical correlation directions , i.e. , solutions of equation 3 , lies in the principal subspace calculated above . If so , we can use the decomposition U = ŨAu ( analogously for V ) , where Ũ contains the principal directions , i.e. , ∈ St ( k , d ) and Au is a full rank k × k matrix containing the coefficients of the span . But maintaining the full rank constraint during optimization is hard , so we further decompose Au into Au = QuSu with Qu ∈ SO ( k ) ; Su is upper triangular . Additionally , we ensure the diagonal of Su to be non-zero to maintain full-rank of Su . During optimization , we can maintain the non-zero diagonal entries by optimizing the log of the diagonal entries instead . Why equation 3 helps ? First , we note that CCA seeks to maximize the total correlation under the constraint that different components are decorrelated . The difficult part in the optimization is to ensure decorrelation , which leads to a higher complexity in existing streaming CCA algorithms . On the contrary , in equation 3 , we separate equation 2 into finding the PCs and finding the linear coefficients for the span of principal directions . Then , by utilizing an efficient streaming PCA algorithm , a lower complexity can be achieved . We will defer describing the specific details of the optimization itself until the next sub-section . First , we will show formally why substituting equation 2 with equation 3a–equation 3b is sensible under some assumptions .
The paper presents an approach to find canonical directions in a streaming fashion, i.e. without direct calculation of covariance matrices (which becomes hard when the number of examples is large). This solution to that task is not obvious, because the objective function of CCA, together with whitening constraints, does not allow simple additive decomposition.
SP:1355359d2a6ca8940e4c3fa3f858779f49156d49
Information Condensing Active Learning
1 Introduction . Machine learning models are widely used for a vast array of real world problems . They have been applied successfully in a variety of areas including biology ( Ching et al. , 2018 ) , chemistry ( SanchezLengeling and Aspuru-Guzik , 2018 ) , physics ( Guest et al. , 2018 ) , and materials engineering ( AspuruGuzik and Persson , 2018 ) . Key to the success of modern machine learning methods is access to high quality data for training the model . However such data can be expensive to collect for many problems . Active learning ( Settles , 2009 ) is a popular methodology to intelligently select the fewest new data points to be labeled while not sacrificing model accuracy . The usual active learning setting is pool-based active learning where one has access to a large unlabeled dataset DU and uses active learning to iteratively select new points from DU to label . Our goal in this paper is to develop an active learning acquisition function to select points that maximize the eventual test accuracy which is also one of the most popular criteria used to evaluate an active learning acquisition function . In active learning , an acquisition function is used to select which new points to label . A large number of acquisition functions have been developed over the years , mostly for classification ( Settles , 2009 ) . Acquisition functions use model predictions or point locations ( in input feature or learned representation space ) to decide which points would be most helpful to label to improve model accuracy . We then query for the labels of those points and add them to the training set . While the past focus for acquisition functions has been the acquisition of one point at a time , each round of label acquisition and retraining of the ML model , particularly in the case of deep neural networks , can be expensive . Furthermore in several applications like biology , it can be much faster to do acquisition of a fixed number of points in parallel versus sequentially . There have been several papers , particularly in the past few years , that try to avoid this issue by acquiring points in batch . As our goal is to apply AL in the context of modern ML models and data , we focus in this paper on batch-mode AL . Acquisition functions can be broadly thought of as belonging to two categories . The ones from the first category directly focus on minimizing the error rate post-acquisition . A natural choice of such an acquisition function might be to acquire labels for points with the highest uncertainty or points closest to the decision boundary ( Uncertainty sampling can be directly linked to minimizing error rate in the context of active learning Mussmann and Liang ( 2018 ) ) . In the other category , the goal is to get as close as possible to the true underlying model . Thus here , acquisition functions select points which give the most amount of knowledge regarding a model ’ s parameters where knowledge is defined as the statistical dependency between the parameters of the model and the predictions for the selected points . Mutual information ( MI ) is the usual choice for the dependency , though other choices are possible . For well-specified model spaces , e.g . in physics , such a strategy can identify the correct model . In machine learning , however , models are usually mis-specified , and thus the metric of evaluation even for model-identification acquisition functions is how successful they are at reducing test error . Given this reality , we follow the viewpoint of trying to minimize the error rate of the model post-acquisition . Our strategy is to select points that we expect would provide substantial information about the labels of the rest of the unlabeled set , thus reducing model uncertainty . We propose acquiring a batch of points B such that the model ’ s predictions on B have as high a statistical dependency as possible with the model ’ s predictions on the entire unlabeled set DU . Thus we want a batch B that condenses the most amount of information about the model ’ s predictions on DU . We call our method Information Condensing Active Learning ( ICAL ) . A key desideratum for our acquisition function is to be model agnostic . This is partly because the model distribution can be very heterogeneous . For example , ensembles which are often used as a model distribution can consist of just decision trees in a random forest or different architectures for a neural network . This means we can not assume any closed form for the model ’ s predictive distribution , and have to resort to Monte Carlo sampling of the predictions from the model to estimate the dependency between the model ’ s predictions on the query batch and the unlabeled set . MI , however , is known to be hard to approximate using just samples ( Song and Ermon , 2019 ) . Thus to scale the method to larger batch sizes , we use the Hilbert-Schmidt Independence Criterion ( HSIC ) , one of the most powerful extant statistical dependency measures for high dimensional settings . Another advantage of HSIC is that it is differentiable , which as we will discuss later , can allow applications of the acquisition function to areas where MI would be difficult to make work . To summarize , we introduce Information Condensing Active Learning ( ICAL ) which maximizes the amount of information being gained with respect to the model ’ s predictions on the unlabeled set of points . ICAL is a batch mode acquisition function that is model agnostic and can be applied to both classification and regression tasks . We then develop an algorithm that can scale ICAL to large batch sizes when using HSIC as the dependency measure between random variables . As our method only needs samples from the posterior predictive distribution which can be obtained for both regression and classification tasks , it is applicable to both . 2 Related work . A review of work on acquisition functions for active learning prior to the recent focus on deep learning is given by Settles ( 2009 ) . The BALD ( Bayesian Active Learning by Disagreement ) ( Houlsby et al. , 2011 ) acquisition function chooses a query point which has the highest mutual information about the model parameters . This turns out to be the point on which individual models sampled from the model distribution are confident about in their prediction but the overall predictive distribution for that point has high entropy . In other words this is the point on which the models are individually confident but disagree on the most . In Guo and Schuurmans ( 2008 ) which builds on Guo and Greiner ( 2007 ) , they formulate the problem as an integer program where they select a batch such that the post acquisition model is highly confident on the training set and has low uncertainty on the unlabeled set . While the latter aspect is related to what we do , they need to retrain their model for every candidate batch they search over in the course of trying to find the optimal batch . As the total number of possible batches is exponential in the size of the unlabeled set , this can get too computationally expensive for neural networks limiting the applicability of this approach . Thus as far as we know , Guo and Schuurmans ( 2008 ) has only been applied to logistic regression . BMDR ( Wang and Ye , 2015 ) queries points that are as close to the classifier decision boundary as possible while still being representative of the overall sample distribution . The representativeness is measured using the maximum mean discrepancy ( MMD ) ( Gretton et al. , 2012 ) of the input features between the query batch and the set of all points , with a lower MMD indicating a more representative query batch . However this approach is limited to classification problems , as it is based on a decision boundary . BMAL ( Hoi et al. , 2006 ) selects a batch such that the Fisher information matrices for the total unlabeled set and the selected batch are as close as possible . The Fisher information matrix is however quadratic in the number of parameters and thus infeasible to compute for modern deep neural networks . FASS ( Filtered Active Subset Selection ) ( Wei et al. , 2015 ) picks the most uncertain points and then selects a subset of those points that are as similar as possible to the whole candidate batch which favors points that can represent the diversity of the initial set of most uncertain points . Recently active learning methods have been extended to the deep learning setting . Gal et al . ( 2017 ) adapts BALD ( Houlsby et al. , 2011 ) to the deep learning setting by using Monte Carlo Dropout ( Gal and Ghahramani , 2016 ) to do inference for their Bayesian Neural Network . They extend BALD to the batch setting for neural networks with BatchBALD ( Kirsch et al. , 2019 ) . In Pinsler et al . ( 2019 ) , they adapt the Bayesian Coreset ( Campbell and Broderick , 2018 ) approach for active learning , though their approach requires a batch size that changes for every acquisition . As the neural network decision boundary is intractable , DeepFool ( Ducoffe and Precioso , 2018 ) uses the concept of adversarial examples ( Goodfellow et al. , 2014 ) to find points close to the decision boundary . However this approach is again limited to classification tasks . FF-Comp ( Geifman and El-Yaniv , 2017 ) , DAL ( Gissin and Shalev-Shwartz , 2019 ) , Sener and Savarese ( 2017 ) , and BADGE ( Ash et al. , 2019 ) operate on the learned representation , as that is the only way the methods incorporate feedback from the training labels into the active learning acquisition function , and they are thus not model-agnostic , as they are not extendable to any model distribution where it is difficult to have a notion of a common representation – as in a random forests or ensembles , etc . where the learned representation is a distribution and not a single point . This is also the case with the model distribution – MC-dropout – we use in this paper . There is also extensive prior work on exploiting Gaussian Processes ( GPs ) for Active Learning ( Houlsby et al. , 2011 ; Krause et al. , 2008 ) . However GPs are hard to scale especially for modern image datasets . 3 Background . Statistical background The entropy of a distribution is defined as HpY q “ ´ ř xPX px logppxq , where px is the probability of the x . Mutual information ( MI ) between two random variables is defined as IrX ; Y s “ ř xPX ř yPY ppx , yq logp ppx , yq ppxqppyq q , where ppx , yq is the joint probability of x , y . Note that IrX ; Y s “ HpY q´HpY |Xq “ HpXq´HpX|Y q . By posterior predictive distribution yx we mean ş θ ppy|x , θqppθ|Dqdθ where y is the prediction , x the input point , θ the model parameters , and D the training data . M is the distribution of models ( parametrized by θ ) we wish to choose from via active learning . As mentioned before , we use MC-dropout for our model distribution by sampling random dropout masks and use the same set of dropout masks across points to generate joint predictions . Hilbert-Schmidt Independence Criterion ( HSIC ) Suppose we have two ( possibly multivariate ) distributions X , Y and we want to measure the dependence between them . A well known way to measure it is using distance covariance which intuitively , measures the covariance between the distances of pairs of samples from the joint distribution PXY and the product of marginal distributions P pXq , P pY q ( Székely et al. , 2007 ) . HSIC can simply be thought of as distance covariance except in a kernel space ( Sejdinovic et al. , 2013b ) . A ( sample ) kernel matrix kX is a matrix whose ijth element is kpxi , xjq where k is the kernel function and xi , xj are the i , jth samples from X . Further details are in the Appendix . Acquisition Function Let the batch to acquire be denoted by B with B “ |B| . Given a model distribution M , training data Dtrain , unlabeled data DU , input space X , set of labels Y and an acquisition function αpx , Mq , we decide which batch of points to query next via : B˚ “ arg max B αpB , Mq
This paper proposes a way to do batch mode model agnostic active learning. In this task, the agent has to query a batch of data points from a set of unlabeled examples for which it will get labels. The paper puts an additional requirement that the algorithm is model-agnostic. The key idea here is to sample a batch of points that provide the most "information" about the remaining unlabeled examples. Authors argue that this will result in higher performance on the unlabeled examples. The proposed approach called ICAL (Information Condensing Active Learning) uses Hilbert-Schmidt Independence Criterion (HSIC) to measure dependence between a chosen batch and the unlabeled examples. The goal is to pick a batch with a maximum value of HSIC which should intuitively give us a batch which is representative of the unlabeled set. HSIC can be easily estimated unlike other dependence measures such as mutual information. Given a batch size $|B|$, a dataset of unlabeled examples $D_u$ and $m$ samples to estimate HSIC, the ICAL algorithm computes a batch for label acquisition in $O(|D_U|m^2|B|)$ steps, where a greedy strategy is used to search over batch. Results are presented over MNIST, variants of MNIST and CIFA and show improvements over five previous active learning approaches and a random acquisition baseline.
SP:7ee8acfa502077ecac20e98eb665697bf351407c
OFFER PERSONALIZATION USING TEMPORAL CONVOLUTION NETWORK AND OPTIMIZATION
Lately , personalized marketing has become important for retail/e-retail firms due to significant rise in online shopping and market competition . Increase in online shopping and high market competition has led to an increase in promotional expenditure for online retailers , and hence , rolling out optimal offers has become imperative to maintain balance between number of transactions and profit . In this paper , we propose our approach to solve the offer optimization problem at the intersection of consumer , item and time in retail setting . To optimize offer , we first build a generalized non-linear model using Temporal Convolutional Network to predict the item purchase probability at consumer level for the given time period . Secondly , we establish the functional relationship between historical offer values and purchase probabilities obtained from the model , which is then used to estimate offer-elasticity of purchase probability at consumer item granularity . Finally , using estimated elasticities , we optimize offer values using constraint based optimization technique . This paper describes our detailed methodology and presents the results of modelling and optimization across categories . 1 INTRODUCTION . In most retail settings , promotions play an important role in boosting the sales and traffic of the organisation . Promotions aim to enhance awareness when introducing new items , clear leftover inventory , bolster customer loyalty , and improve competitiveness . Also , promotions are used on a daily basis in most retail environments including online retailers , supermarkets , fashion retailers , etc . A typical retail firm sells thousands of items in a week and needs to design offer for all items for the given time period . Offer design decisions are of primary importance for most retail firms , as optimal offer roll out can significantly enhance the business ’ bottom line . Most retailers still employ a manual process based on intuition and past experience of the category managers to decide the depth and timing of promotions . The category manager has to manually solve the promotion optimization problem at consumer-item granularity , i.e. , how to select an optimal offer for each period in a finite horizon so as to maximize the retailer ’ s profit . It is a difficult problem to solve , given that promotion planning process typically involves a large number of decision variables , and needs to ensure that the relevant business constraints or offer rules are satisfied . The high volume of data that is now available to retailers presents an opportunity to develop machine learning based solutions that can help the category managers improve promotion decisions . In this paper , we propose deep learning with multi-obective optimization based approach to solve promotion optimization problem that can help retailers decide the promotions for multiple items while accounting for many important modelling aspects observed in retail data . The ultimate goal here is to maximize net revenue and consumer retention rate by promoting the right items at the right time using the right offer discounts at consumer-item level . Our contributions in this paper include a ) Temporal Convolutional Neural Network architecture with hyperparameter configurations to predict the item purchase probability at consumer level for the given time period . b ) Design and implementation of F1-maximization algorithm which optimises for purchase probability cut-off at consumer level . c ) Methodology to estimate offer elasticity of purchase probability at consumer item granularity . d ) Constraint based optimization technique to estimate optimal offers at consumer-item granularity . 2 RELATED WORK . There has been a significant amount of research conducted on offer-based revenue management over the past few decades . Multiple great works have been done to solve Promotion Optimization problem . One such work is Cohen et al . ( 2017 ) , where the author proposes general classes of demand functions ( including multiplicative and additive ) , which incorporates post-promotion dip effect , and uses Linear integer programming to solve Promotion Optimization problem . In one of the other work [ Cohen & Perakis ( 2018 ) ] , the author lays out different types of promotions used in retail , and then formulates the promotion optimization problem for multiple items . In paper Cohen & Perakis ( 2018 ) , the author shows the application of discrete linearization method for solving promotion optimization . Gathering learnings from the above papers , we create our framework for offer optimization . The distinguishing features of our work in this field include ( i ) the use of a nonparametric neural network based approach to estimate the item purchase probability at consumer level , ( ii ) the establishment of the functional relationship between historical offer values and purchase probabilities , and ( iii ) the creation of a new model and efficient algorithm to set offers by solving a multi-consumer-item promotion optimization that incorporates offer-elasticity of purchase probability at a reference offer value 3 METHODOLOGY . We built seperate models for each category , as we understand that consumer purchase pattern and personalized marketing strategies might vary with categories . 3.1 MODELLING . In our model setup , we treat each relevant consumer-item as an individual object and shape them into bi-weekly time series data based on historical transactions , where the target value at each time step ( 2 weeks ) takes a binary input , 1/0 ( purchased/non purchased ) . Relevancy of the consumeritem is defined by items transacted by consumer during training time window . Our Positive samples ( purchased/1 ) are time steps where consumer did transact the item , whereas Negative samples ( non purchased/0 ) are the time steps where the consumer did not buy that item . We apply sliding windows testing routine for generating out of time results . The time series is split into 3 parts - train ( 48 weeks ) , validation ( 2 weeks ) and test ( 2 weeks ) . All our models are built in a multi-object fashion for an individual category , which allows the gradient movement to happen across all consumer-item combinations split in batches . This enables cross-learning to happen across consumers/items . A row in time series is represented by ycit = h ( it , ct , .. , ct-n , ict , .. , ict-n , dt , .. , dt-n ) ( 1 ) where ycit is purchase prediction for consumer ’ c ’ for item ’ i ’ at time ’ t ’ . ’ n ’ is the number of time lags . it denotes attributes of item ’ i ’ like category , department , brand , color , size , etc at time ’ t ’ . ct denotes attributes of consumer ’ c ’ like age , sex and transactional attributes at time ’ t ’ . ct-n denotes the transactional attributes of consumer ’ c ’ at a lag of ’ t-n ’ time steps . ict denotes transactional attributes such as basket size , price , offer , etc . of consumer ’ c ’ towards item ’ i ’ at time ’ t ’ . dt is derived from datetime to capture trend and seasonality at time ’ t ’ . 3.1.1 FEATURE ENGINEERING . Based on available dataset , we generate multiple features for the modelling activity . Some of the feature groups we perform our experiments are : Datetime : We use transactional metrics at various temporal cuts like week , month , etc . Datetime related features capturing seasonality and trend are also generated . Consumer-Item Profile : We use transactional metrics at different granularities like consumer , item , and consumer-item . We also create features like Time since first order , Time since last order , time gap between orders , Reorder rates , Reorder frequency , Streak - user purchased the item in a row , Average position in the cart , Total number of orders . Price/Promotions : We use relative price and historical offer discount percentage to purchase propensity at varying price , and discount values . Lagged Offsets : We use statistical rolling operations like mean , median , variance , kurtosis and skewness over temporal regressors for different lag periods to generate offsets . 3.1.2 LOSS FUNCTION . Since we are solving Binary Classification problem , we believe that Binary Cross-Entropy should be the most appropriate loss function for training the models . We use the below formula to calculate Binary Cross-Entropy : Hp = − 1N ∑N i=1 y.log ( p ( y ) ) + ( 1− y ) .log ( 1− p ( y ) ) ( 2 ) here Hp represents computed loss , y is the target value ( label ) , and p ( y ) is the predicted probability against the target . The BCELoss takes non-negative values . We can infer from Equation 3 that Lower the BCELoss , better the Accuracy . 3.1.3 MODEL ARCHITECTURE . Traditional machine learning models may not be a suitable choice for modelling h ( Equation 1 ) due to non-linear interactions between the features . Sequence to Sequence [ Sutskever et al . ( 2014 ) ] neural network architectures seems to be sound choice for tackling our problem . Hence , we use Entity Embeddings [ Guo & Berkhahn ( 2016 ) ] + Temporal Convolutional Network ( TCN ) ( Figure 1 ) architecture for building all the models across categories . Originally proposed in [ Lea et al . ( 2016 ) ] , TCN can take a sequence of any length and map it to an output sequence of the same length . For this to accomplish , TCN uses a 1D fully-convolutional network ( FCN ) architecture , where each hidden layer is the same length as the input layer , and zero padding of length ( kernel size-1 ) is added to keep subsequent layers the same length as previous ones . Also , the convolutions in the architecture are causal , meaning that there is no information leakage from future to past . To achieve this , TCN uses causal convolutions [ Bai et al . ( 2018 ) ] , convolutions where an output at time t is convolved only with elements from time t and earlier in the previous layer . For 1-D sequence input x and filter f the dilated convolution operation DC on element k of the sequence is defined as : DC ( k ) = ( x ∗ df ) ( k ) = ∑n−1 i=0 f ( i ) · xk-di , where x ∈ Rn and f : { 0 , ... , n− 1 } → R ( 3 ) where d is the dilation factor , n is the filter size , and k-di accounts for the direction of the past . When d = 1 , a dilated convolution reduces to a regular convolution . Using larger dilation enables an output at the top level to represent a wider range of inputs , thus effectively expanding the receptive field of a ConvNet . As can be seen in Figure 1 , Our network architecture comprises of 3 dilated Convolutions combined with entity embeddings [ Guo & Berkhahn ( 2016 ) ] . Post Convolutions and concatenation with embedding tensor , the created tensor flows through 3 fully connected ReLU layers yielding to sigmoid dense layer . To seggregate static and temporal features , we group input tensor into 4 seperate tensors , as can be seen in 1 : Static Categorical : These are categorical features that do not vary with time . This includes consumer attributes like sex , marital status and location along with different item attributes like category , department and brand . Temporal Categorical : These are categorical features that vary with time . It includes all the datetime related features like week , month of year , etc . Static Continuous : These features are static but continuous . This includes certain consumer attributes like age and weight , item attributes like size , and certain derived features like target encoded features . Temporal Continuous : These are time varying continuous features . All consumer and item related traditional attributes like number of orders , add to cart order , etc . falls under this bucket .
This paper is about optimizing discount offers to individual customers to maximize business value. A temporal convolutional network (TCN) is used to model the customer's purchase probability. This network is then used to estimate the customer's offer-elasticity. Finally a linear program is used to optimize offers across all customers subject to a retention-rate constraint. The method is demonstrated on a public dataset and a detailed analysis is performed on its results.
SP:1b0eb87a5d014c94fb41b0e2322bb31ef2a11b78
Behavioral Cloning from Noisy Demonstrations
1 INTRODUCTION . Imitation learning ( IL ) has become a widely used approach to obtain autonomous robotics control systems . IL is often more applicable in real-world problems than reinforcement learning ( RL ) since expert demonstrations are often easier than designing appropriate rewards that RL requires . There have been several IL methods that involve RL ( Ziebart et al. , 2008 ; Ng et al. , 2000 ; Abbeel & Ng , 2004 ; Ho & Ermon , 2016 ) . Those IL methods inherit sample complexity from RL in terms of environment interactions during training . The complexity restricts applicabilities in real-world problems since a number of environment interactions in real-world settings often take a long time and cause damage to the robot or the environment . Therefore , we are interested in IL methods that do not require the environment interactions , such as behavioral cloning ( BC ) ( Pomerleau , 1991 ) which learns an expert policy in a supervised fashion . BC as well as popular IL methods , such as generative adversarial imitation learning ( GAIL ) ( Ho & Ermon , 2016 ) , assume the expert demonstration is optimal . Unfortunately , it is often difficult to obtain optimal demonstrations for many tasks in real-world problems because the expert who tries to operate the robot so that it can achieve tasks often makes mistakes due to various reasons , such as the difficulty of the task , difficulty in handling the controller , limited observability of the environment , or the presence of distraction . The mistakes include unnecessary and/or incorrect operations to achieve the tasks . Given such noisy expert demonstrations , which contain records of both optimal and non-optimal behavior , BC as well as the popular IL methods fails to imitate the optimal policy due to the optimal assumption on the demonstrations as shown in ( Wu et al. , 2019 ) . A naive solution to cope with the noisy demonstrations is discarding the non-optimal demonstrations among the ones that were already collected . This screening process is often impractical because it involves a significant human effort . Most of recent IL works suppose settings where a very limited number of clean expert demonstrations , which are composed of only the optimal behavior records , are available . Those methods are also vulnerable to the noisy demonstrations due to the optimal assumption on the demonstrations . Thus they implicitly suppose such impractical screening process if they were applied in real-world problems , where a number of the noisy demonstrations other than the clean ones can be easily obtained . There have been IL methods addressing the noisy demonstrations . Instead of the screening process , they require to annotate each demonstration with confidence scores ( Wu et al. , 2019 ) or rankings ( Brown et al. , 2019 ) . Even though they cope well with the noisy demonstrations to obtain the optimal behavior policies , such annotation costs a significant human effort as it is for the screening . Hence , we desire IL methods that can cope well with the noisy demonstrations , which can be easily obtained in real-world settings , without any screening and annotation processes associated with the non-optimal behaviors . In this paper , we propose a novel imitation learning algorithm to address the noisy demonstrations . The proposed algorithm does not require ( 1 ) any environment interactions during training , and ( 2 ) any screening and annotation processes associated with the non-optimality of the expert behaviors . Our algorithm learns ensemble policies with a generalized BC objective function where we exploit another policy already learned by BC . Experimental results show that the proposed algorithm can learn policies that are much closer to the optimal than ones learned by BC . 2 RELATED WORKS . A wide variety of IL methods have been proposed in these last few decades . BC ( Pomerleau , 1991 ) is the simplest IL method among those and thus BC could be the first IL option when enough clean demonstrations are available . Ross & Bagnell ( 2010 ) have theoretically pointed out a downside of the BC which is referred to as compounding error – the small errors of the learners trained by BC could compound over time and bring about the deterioration of their performance . On the other hand , experimental results in ( Sasaki et al. , 2018 ) show that BC given the clean demonstrations of sufficient amounts can easily obtain the optimal behavior even for complex continuous control tasks . Hence , the effect of the compounding error is negligible in practice if the amount of clean demonstrations is sufficient . However , even if the amount of the demonstrations is large , BC can not obtain the optimal policy given the noisy demonstrations due to the optimal assumption on the demonstrations . Another widely used IL approaches are inverse reinforcement learning ( IRL ) ( Ziebart et al. , 2008 ; Ng et al. , 2000 ; Abbeel & Ng , 2004 ) and adversarial imitation learning ( AIL ) ( Ho & Ermon , 2016 ) . Since those approaches also assume the optimality of the demonstrations , they are also not able to obtain the optimal policy given the noisy demonstrations , as shown in ( Wu et al. , 2019 ) . As we will show in Section 6 , our algorithm successfully can learn near-optimal policies if noisy demonstrations of sufficient amounts are given . There have been several works that address the noisy demonstrations ( Wu et al. , 2019 ; Brown et al. , 2019 ; Tangkaratt et al. , 2019 ; Kaiser et al. , 1995 ; Grollman & Billard , 2012 ; Kim et al. , 2013 ) . Those works address the noisy demonstrations by either screening the non-optimal demonstrations with heuristic non-optimal assessments ( Kaiser et al. , 1995 ) , annotations associated with the nonoptimality ( Wu et al. , 2019 ; Brown et al. , 2019 ; Grollman & Billard , 2012 ) , or training through the environment interactions ( Kim et al. , 2013 ; Wu et al. , 2019 ; Brown et al. , 2019 ; Tangkaratt et al. , 2019 ) . Our algorithm does not require any screening processes , annotations associated with the non-optimality , and the environment interactions during training . Offline RL methods ( Lange et al. , 2012 ; Fujimoto et al. , 2019 ; Kumar et al. , 2020 ) train the learner agents without any environment interactions , and allow the training dataset to have non-optimal trajectories as in our problem setting . A drawback of offline RL methods for the real-world applications is the requirement to design reward functions , which often involves a significant human efforts for its success , since those methods assume that the reward for each state-action pair is known . Our algorithm does not require to design reward functions as in standard IL methods . Disagreement regularized imitation learning ( DRIL ) ( Brantley et al. , 2019 ) is a state-of-the-art IL algorithm which employs an ensemble of policies as our algorithm does . The aims of employing the ensemble is different between DRIL and our algorithm . DRIL uses the disagreement in predictions made by policies in the ensemble to evaluate whether the states observed during training the learner are ones observed in the expert demonstrations . On the other hand , our algorithm uses the ensemble to encourage the learner to take optimal actions on each state as described in 5.3 . In addition , DRIL fundamentally requires the environment interactions during training whereas our algorithm does not . 3 PRELIMINARIES AND PROBLEM SETUP . In this work , we consider an episodic fixed-horizon Markov decision process ( MDP ) which is formalized as a tuple { S , A , P , R , d0 , T } , where S is a set of states , A is a set of possible actions agents can take , P : S×A×S → [ 0 , 1 ] is a transition probability , R : S×A→ [ 0 , 1 ] is a reward function , d0 : S → [ 0 , 1 ] is a distribution over initial states , and T is an episode horizon . The agent ’ s behavior is defined by a stochastic policy π : S×A→ [ 0 , 1 ] and Π denotes a set of the stochastic policies . The expected one-step immediate reward for a policy π given a state s is defined as Rπ ( s ) = Ea∼π ( ·|s ) [ R ( s , a ) ] . Let dπt and d π = 1T ∑T t=1 d π t denote the distribution over states at time step t and the average distribution over T time steps induced by π , respectively . The distributions dπ1 at the first step correspond to d0 for any π . When following a policy π throughout an episode , the expected one-step immediate reward at time step t and the expected T -step reward are defined as Rπt = Es∼dπt , a∼π ( ·|s ) [ R ( s , a ) ] = Es∼dπt [ Rπ ( s ) ] and J ( π , R ) = ∑T t=1R π t = TEs∼dπ [ Rπ ( s ) ] , respectively . We refer to J ( π , R ) as on-policy expected T -step reward . We also consider another T -step reward defined by Jβ ( π , R ) = TEs∼dβ [ Rπ ( s ) ] , which we call off-policy expected T -step reward , where β ∈ Π is a policy that can differ from π . In our problem setting , the functions R is not given . Instead , we observe noisy demonstrations . We refer to the agent that generates the noisy demonstrations as the noisy expert . The decision process turns to be MDP\ { R } as in the common imitation learning settings , and our problem can be formalized as to find an optimal policy in MDP\ { R } . Here we refer to the true expert policy π∗e as ones being able to take the optimal ( thus not noisy ) behavior in episodic tasks . We make the following four assumptions to further formalize our problem setting : Assumption 1 . The T -step expected reward of π∗e satisfies J ( π , R ) ≤ J ( π∗e , R ) ; Jβ ( π , R ) ≤ Jβ ( π∗e , R ) ; and Jβ ( π∗e , R ) ≤ J ( π∗e , R ) for any non-optimal policies π , β ∈ Π \ { π∗e } . Assumption 2 . With small probability , which we call non-optimal probability , the policies πe the noisy experts follow during demonstrations are sampled at each time step as πe = π ∼ pΠ if ≥ z ∼ U ( 0 , 1 ) , otherwise πe = π∗e , where pΠ is an unknown distribution over the set of policies , z is a random variable , and U ( 0 , 1 ) is a uniform distribution with range [ 0 , 1 ] . Assumption 3 . The rewardRπet is at least zero if the noisy expert has followed a policy π ∈ Π\ { π∗e } once or more so far , otherwise Rπet = Es∼dπet [ Eπ∼pΠ [ Rπ ( s ) ] + ( 1− ) Rπ ∗ e ( s ) ] . Assumption 4 . The sequence { Rπe1 , ... , R πe T } has monotonically decreasing property R πe t ≥ R πe t+1 . Assumption 1 indicates that both on-policy and off-policy expected T -step reward following π∗e are always greater than or equal to ones following any other policies . In other words , we assume the true expert policy is an optimal one in the MDP , and the agent following the policy is able to behave so that the expected immediate rewards at any states are maximized . Under Assumption 1 , the problem that we would like to solve in this work can be said to learn a parameterized policy πθ to maximize its on-policy expected T -step reward J ( πθ , R ) to J ( π∗e , R ) . Assumption 2 indicates that the noisy expert occasionally adopts non-optimal policies , which results in the noisy demonstrations , due to random events , such as the presence of distractions , associated with the random variable z . The noisy expert is going to visit states that would be never visited by the true expert if the noisy expert followed non-optimal policies even once . Assumption 3 indicates that those states are less rewarded and their rewards are at least zero . Assumption 3 also indicates that the noisy demonstrations have a number of episodes where the noisy expert has reached the same state s where the noisy expert has adopted both π∗e and π ∈ Π \ { π∗e } with the probability . Assumption 4 indicates that , since the probability the noisy expert consecutively follows π∗e decreases as time step increases according to Assumption 2 , the divergence between dπet and d π∗e t becomes greater as the number of time step t increases , and thus the one-step expected immediate reward Rπet = Es∼dπet , a∼πe ( ·|s ) [ R ( s , a ) ] decreases as t increases .
This paper studies the problem of imitation an expert from noisy demonstrations without interactions with the environment. It proposes an algorithm, which utilizes an ensemble of behavioral cloning policies and is analogous to the mean shift algorithm, to find the mode from noisy demonstrations. Experimentally, the proposed algorithm can almost recover the expert policy.
SP:072e0bcba8ff2c75ff0ff55576ae77943dada729
Cross-Attentional Audio-Visual Fusion for Weakly-Supervised Action Localization
1 INTRODUCTION . The goal of this paper is to temporally localize actions and events of interest in videos with weaksupervision . In the weakly-supervised setting , only video-level labels are available during the training phase to avoid expensive and time-consuming frame-level annotation . This task is of great importance for video analytics and understanding . Several weakly-supervised methods have been developed for it ( Nguyen et al. , 2018 ; Paul et al. , 2018 ; Narayan et al. , 2019 ; Shi et al. , 2020 ; Jain et al. , 2020 ) and considerable progress has been made . However , only visual information is exploited for this task and audio modality has been mostly overlooked . Both , audio and visual data often depict actions from different viewpoints ( Guo et al. , 2019 ) . Therefore , we propose to explore the joint audio-visual representation to improve the temporal action localization in videos . A few existing works ( Tian et al. , 2018 ; Lin et al. , 2019 ; Xuan et al. , 2020 ) have attempted to fuse audio and visual modalities to localize audio-visual events . These methods have shown promising results , however , these audio-visual events are essentially actions that have strong audio cues , such as playing guitar , and dog barking . Whereas , we aim to localize wider range of actions related to sports , exercises , eating etc . Such actions can also have weak audio aspect and/or can be devoid of informative audio ( e.g . with unrelated background music ) . Therefore , it is a key challenge to fuse audio and visual data in a way that leverages the mutually complementary nature while maintaining the modality-specific information . In order to address this challenge , we propose a novel multi-stage cross-attention mechanism . It progressively learns features from each modality over multiple stages . The inter-modal interaction is allowed at each stage only through cross-attention , and only at the last stage are the visuallyaware audio features and audio-aware visual features concatenated . Thus , an audio-visual feature representation is obtained for each snippet in videos . Separating background from actions/events is a common problem in temporal localization . To this end , we also propose : ( a ) foreground reliability estimation and classification via open-max classifier and ( b ) temporal continuity losses . First , for each video snippet , an open-max classifier predicts ∗Qualcomm AI Research is an initiative of Qualcomm Technologies , Inc. scores for action and background classes , which is composed of two parallel branches for action classification and foreground reliability estimation . Second , for precise action localization with weak supervision , we design temporal consistency losses to enforce temporal continuity of actionclass prediction and foreground reliability . We demonstrate the effectiveness of the proposed method for weakly-supervised localization of both audio-visual events and actions . Extensive experiments are conducted on two video datasets for localizing audio-visual events ( AVE1 ) and actions ( ActivityNet1.22 ) . To the best of our knowledge , it is the first attempt to exploit audio-visual fusion for temporal localization of unconstrained actions in long videos . 2 RELATED WORK . Our work relates to the tasks of localizing of actions and events in videos , as well as to the regime of multi-model representation learning . Weakly-supervised action localization : Wang et al . ( 2017 ) and Nguyen et al . ( 2018 ) employed multiple instance learning ( Dietterich et al. , 1997 ) along with attention mechanism to localize actions in videos . Paul et al . ( 2018 ) introduced a co-activity similarity loss that looks for similar temporal regions in a pair of videos containing a common action class . Narayan et al . ( 2019 ) proposed center loss for the discriminability of action categories at the global-level and counting loss for separability of instances at the local-level . To alleviate the confusion due to background ( nonaction ) segments , Nguyen et al . ( 2019 ) developed the top-down class-guided attention to model background , and ( Yu et al. , 2019 ) exploited temporal relations among video segments . Jain et al . ( 2020 ) segmented a video into interpretable fragments , called ActionBytes , and used them effectively for action proposals . To distinguish action and context ( near-action ) snippets , Shi et al . ( 2020 ) designed the class-agnostic frame-wise probability conditioned on the attention using conditional variational auto-encoder . Luo et al . ( 2020 ) proposed an expectation-maximization multi-instance learning framework where the key instance is modeled as a hidden variable . All these works have explored various ways to temporally differentiate action instances from the near-action background by exploiting only visual modality , whereas we additionally utilize audio modality for the same objective . Audio-visual event localization : The task of audio-visual event localization , as defined in the literature , is to classify each time-step into one of the event classes or background . This is different from action localization , where the goal is to determine the start and the end of each instance of the given action class . In ( Tian et al. , 2018 ) , a network with audio-guided attention was proposed , which showed prototypical results for audio-visual event localization , and cross-modality synchronized event localization . To utilize both global and local cues in event localization , Lin et al . ( 2019 ) conducted audio-visual fusion in both of video-level and snippet-level using multiple LSTMs . Assuming single event videos , Wu et al . ( 2019 ) detected the event-related snippet by matching the video-level feature of one modality with the snippet-level feature sequence of the other modality . Contrastingly , our cross-attention is over the temporal sequences from both the modalities and does not assume single-action videos . In order to address the temporal inconsistency between audio and visual modalities , Xuan et al . ( 2020 ) devised the modality sentinel , which filters out the eventunrelated modalities . Encouraging results have been reported , however , the localization capability of these methods has been shown only for the short fixed-length videos with distinct audio cues . Differently , we aim to fuse audio and visual modalities in order to also localize actions in long , untrimmed and unconstrained videos . Deep multi-modal representation learning : Multi-modal representation learning methods aim to obtain powerful representation ability from multiple modalities ( Guo et al. , 2019 ) . With the advancement of deep-learning , many deep multi-modal representation learning approaches have been developed . Several methods fused features from different modalities in a joint subspace by outerproduct ( Zadeh et al. , 2017 ) , bilinear pooling ( Fukui et al. , 2016 ) , and statistical regularization ( Aytar et al. , 2017 ) . The encoder-decoder framework has also been exploited for multi-modal learning for image-to-image translation ( Huang et al. , 2018 ) and to produce musical translations ( Mor et al. , 1https : //github.com/YapengTian/AVE-ECCV18 2http : //activity-net.org/download.html 2018 ) . Another category of approaches aim to disjointly learn the features of each modality under cross-modality constraints such as cross-modal ranking ( Frome et al. , 2013 ; Lazaridou et al. , 2015 ; Kiros et al. , 2014 ) or feature distance ( Pan et al. , 2016 ; Xu et al. , 2015 ; Liong et al. , 2016 ) . Our approach belongs to this category and uses cross-correlation as cross-modality constraint . Crosscorrelation has been exploited to generate visual features attended by text for visual question answering ( Kim et al. , 2017 ; Yu et al. , 2017 ) . It has also been used to obtain cross-attention for few-shot learning ( Hou et al. , 2019 ) and image-text matching ( Lee et al. , 2018 ; Wei et al. , 2020 ) . In our work , we adopt the cross-correlation to generate both of audio and visual features attended by each other . The most similar to our cross-attention mechanism is the cross-attention module of Hou et al . ( 2019 ) , which computes cross-correlation spatially between features maps of two images ( sample and query ) . Whereas , our cross-attention is designed for video and is computed between two temporal sequences of different modalities . 3 METHODOLOGY . In this section , we introduce the proposed framework for weakly-supervised action and event localization . Fig . 1 illustrates the complete framework . We first present the multi-stage cross-attention mechanism to generate the audio-visual features in Sec . 3.1 . Then , we explain open-max classification to robustly distinguish the actions3 from unknown background in 3.2 . Finally , in Sec . 3.3 , we describe the training loss including two consistency losses designed to enforce temporal continuity of the actions and background . Problem statement : We suppose that a set of videos only with the corresponding video-level labels are given for training . For each video , we uniformly sample L non-overlapping snippets , and then extract the audio features U = ( ul ) Ll=1 ∈ Rdu×L with a pre-trained network , where ul is the du dimensional audio feature representation of the snippet l. Similarly , the snippet-wise visual features V = ( vl ) Ll=1 ∈ Rdv×L are also extracted . The video-level label is represented as c ∈ { 0 , 1 , . . . , C } , where C is the number of action classes and 0 denotes the background class . Starting from the audio and visual features , our approach learns to categorize each snippet into C + 1 classes and hence localizes actions in weakly-supervised manner . 3.1 MULTI-STAGE CROSS-ATTENTION MECHANISM . While multiple modalities can provide more information than a single one , the modality-specific information may be reduced while fusing different modalities . To reliably fuse the two modalities , 3For brevity we refer both action and event as action . we develop the multi-stage cross-attention mechanism where features are separately learned for each modality under constraints from the other modality . In this way , the learned features for each modality encodes the inter-modal information , while preserving the exclusive and meaningful intramodal characteristics . As illustrated in Fig . 1 , we first encode the input features U and V to Xu = ( xlu ) L l=1 and Xv = ( xlv ) L l=1 via the modality-specific fully-connected ( FC ) layers fu and fv , where x l u and x l v are in Rdx . After that , we compute the cross-correlation of Xu and Xv to measure inter-modal relevance . To reduce the gap of the heterogeneity between the two modalities , we use a learnable weight matrix W ∈ Rdx×dx and compute the cross-correlation as Λ = XTuWXv ( 1 ) where Λ ∈ RL×L . Note that xlu and xlv are l2-normalized before computing the cross-correlation . In the cross-correlation matrix , a high correlation coefficient means that the corresponding audio and visual snippet features are highly relevant . Accordingly , the lth column of Λ corresponds to the relevance of xlv to L audio snippet features . Based on this , we generate the cross-attention weights Au and Av by the column-wise soft-max of Λ and ΛT , respectively . Then , for each modality , the attention weights are used to re-weight the snippet features to make them more discriminative given the other modality . Formally , the attention-weighted features X̃u and X̃v are obtained by X̃u = XuAu and X̃v = XvAv . ( 2 ) Note that each modality guides the other one through the attention weights . This is to ensure the meaningful intra-modal information is well-preserved while applying the cross-attention . To extensively delve into cross-modal information , we repeatedly apply the cross-attention multiple times . However , during the multi-stage cross-attention , the original modality-specific characteristics may be over-suppressed . To prevent this , we adopt the dense skip connection ( Huang et al. , 2017 ) . More specifically , at stage t , we obtain the attended audio features by X ( t ) att , u = tanh ( t−1∑ i=0 X ( i ) att , u + X̃ ( t ) u ) ( 3 ) where X ( 0 ) att , u is Xu , and tanh ( · ) denotes the hyperbolic tangent activation function . Similar to X ( t ) att , u , the attended visual features X ( t ) att , v are generated for the visual modality . At the last stage te , we concatenate the attended audio and visual features to yield audio-visual features , Xatt = [ X ( te ) att , u ; X ( te ) att , v ] ( 4 ) where te is empirically set to 2 which will be discussed in the ablation studies in Section 4.3 . Discussion Applying the cross-attention ( Eq . 2 ) brings the audio and visual embeddings closer , while the skip connections ( Eq . 3 ) enforce modality specific information , more so with dense skip connections . Using both the cross-attention and the dense skip connections alternatively over multiple stages , we progressively learn optimal embeddings for fusion . Learning in this way , we aim to achieve right amount of compatibility between the two embeddings while preserving the modality specific information , in order to optimize for the training objective .
The authors propose to mix the independent embeddings of audio and visual data by a set of cross-attention layers to the task of audio-visual event localization. They weigh the features based on the correlation between the representations of both modalities to obtain the output representation. After several layers like these, combined with dense skip connections, the final output is a multimodal representation of the input where the features have been individually learned for each modality based on information from the other one. The final features are concatenated and passed through an open-max classifier. Finally, they design different losses to help enforce coherence and continuity among the proposed labels throughout the video.
SP:32798b2b132f08f55733c163090f097aa0b384bf
EqCo: Equivalent Rules for Self-supervised Contrastive Learning
In this paper , we propose a method , named EqCo ( Equivalent Rules for Contrastive Learning ) , to make self-supervised learning irrelevant to the number of negative samples in the contrastive learning framework . Inspired by the InfoMax principle , we point that the margin term in contrastive loss needs to be adaptively scaled according to the number of negative pairs in order to keep steady mutual information bound and gradient magnitude . EqCo bridges the performance gap among a wide range of negative sample sizes , so that we can use only a few negative pairs ( e.g . 16 per query ) to perform self-supervised contrastive training on large-scale vision datasets like ImageNet , while with almost no accuracy drop . This is quite a contrast to the widely used large batch training or memory bank mechanism in current practices . Equipped with EqCo , our simplified MoCo ( SiMo ) achieves comparable accuracy with MoCo v2 on ImageNet ( linear evaluation protocol ) while only involves 16 negative pairs per query instead of 65536 , suggesting that large quantities of negative samples might not be a critical factor in contrastive learning frameworks . 1 INTRODUCTION AND BACKGROUND . Self-supervised learning has recently received much attention in the field of visual representation learning ( Hadsell et al . ( 2006 ) ; Dosovitskiy et al . ( 2014 ) ; Oord et al . ( 2018 ) ; Bachman et al . ( 2019 ) ; Hénaff et al . ( 2019 ) ; Wu et al . ( 2018 ) ; Tian et al . ( 2019 ) ; He et al . ( 2020 ) ; Misra & Maaten ( 2020 ) ; Grill et al . ( 2020 ) ; Cao et al . ( 2020 ) ; Tian et al . ( 2020 ) ) , as its potential to learn universal representations from unlabeled data . Among various self-supervised methods , one of the most promising research paths is contrastive learning ( Oord et al . ( 2018 ) ) , which has been demonstrated to achieve comparable or even better performances than supervised training for many downstream tasks such as image classification , object detection , and semantic segmentation ( Chen et al. , 2020c ; He et al. , 2020 ; Chen et al. , 2020a ; b ) . The core idea of contrastive learning is briefly summarized as follows : first , extracting a pair of embedding vectors ( q ( I ) , k ( I ) ) ( named query and key respectively ) from the two augmented views of each instance I ; then , learning to maximize the similarity of each positive pair ( q ( I ) , k ( I ) ) while pushing the negative pairs ( q ( I ) , k ( I ′ ) ) ( i.e. , query and key extracted from different instances accordingly ) away from each other . To learn the representation , an InfoNCE loss ( Oord et al . ( 2018 ) ; Wu et al . ( 2018 ) ) is conventionally employed in the following formulation ( slightly modified with an additional margin term ) : LNCE = E q∼D , k0∼D′ ( q ) , ki∼D′ [ −log e ( q > k0−m ) /τ e ( q > k0−m ) /τ + ∑K i=1 e q > ki/τ ] , ( 1 ) where q and ki ( i = 0 , . . . , K ) stand for the query and keys sampled from the two ( augmented ) data distributions D and D′ respectively . Specifically , k0 is associated to the same instance as q ’ s while other kis not ; hence we name k0 and ki ( i > 0 ) positive sample and negative samples respectively in the remaining text , in which K is the number of negative samples ( or pairs ) for each query . The temperature τ and the margin m are hyper-parameters . In most previous works , m is trivially set to zero ( e.g . Oord et al . ( 2018 ) ; He et al . ( 2020 ) ; Chen et al . ( 2020a ) ; Tian et al . ( 2020 ) ) or some handcraft values ( e.g . Xie et al . ( 2020 ) ) . In the following text , we mainly study contrastive learning frameworks with InfoNCE loss as in Eq . 1 unless otherwise specified . 1 In contrastive learning research , it has been widely believed that enlarging the number of negative samples K boosts the performance ( Hénaff et al . ( 2019 ) ; Tian et al . ( 2019 ) ; Bachman et al . ( 2019 ) ) . For example , in MoCo ( He et al . ( 2020 ) ) the ImageNet accuracy rises from 54.7 % to 60.6 % under linear classification protocol when K grows from 256 to 65536 . Such observation further drives a line of studies how to effectively optimize under a number of negative pairs , such as memory bank methods ( Wu et al . ( 2018 ) ; He et al . ( 2020 ) ) and large batch training ( Chen et al . ( 2020a ) ) , either of which empirically reports superior performances when K becomes large . Analogously , in the field of supervised metric learning ( Deng et al . ( 2019 ) ; Wang et al . ( 2018 ) ; Sun et al . ( 2020 ) ; Wang et al . ( 2020 ) ) , loss in the similar form as Eq . 1 is often applied on a lot of negative pairs for hard negative mining . Besides , there are also a few theoretical studies supporting the viewpoint . For instance , Oord et al . ( 2018 ) points out that the mutual information between the positive pair tends to increase with the number of negative pairs K ; Wang & Isola ( 2020 ) find that the negative pairs encourage features ’ uniformity on the hypersphere ; Chuang et al . ( 2020 ) suggests that large K leads to more precise estimation of the debiased contrastive loss ; etc . Despite the above empirical or theoretical evidence , however , we point out that the reason for using many negative pairs is still less convincing . First , unlike the metric learning mentioned above , in self-supervised learning , the negative terms ki in Eq . 1 include both “ true negative ” ( whose underlying class label is different from the query ’ s , similarly hereinafter ) and “ false negative ” samples , since the actual ground truth label is not available . So , intuitively large K should not always be beneficial because the risk of false negative samples also increases ( known as class collision problem ) . Arora et al . ( 2019 ) thus theoretically concludes that a large number of negative samples could not necessarily help . Second , some recent works have proven that by introducing new architectures ( e.g. , a predictor network in BYOL ( Grill et al. , 2020 ) ) , or designing new loss functions ( e.g. , Caron et al . ( 2020a ) ; Ermolov et al . ( 2020 ) ) , state-of-the-art performance can still be obtained even without any explicit negative pairs . In conclusion , it is still an open question whether large quantities of negative samples are essential to contrastive learning . After referring to the above two aspects , we rise a question : is a large K really essential in the contrastive learning framework ? We propose to rethink the question from a different view : note that in Eq . 1 , there are three hyper-parameters : the number of negative samples K , temperature τ , and margin m. In most of previous empirical studies ( He et al . ( 2020 ) ; Chen et al . ( 2020a ) ) , only K is changed while τ and m are usually kept constant . Do the optimal hyper-parameters of τ and m varies with K ? If so , the performance gains observed from larger Ks may be a wrong interpretation – merely brought by suboptimal hyper-parameters ’ choices for small Ks , rather than much of an essential . In the paper , we investigate the relationship among three hyper-parameters and suggest an equivalent rule : m = τ log α K , where α is a constant . We find that if the margin m is adaptively adjusted based on the above rule , the performance of contrastive learning is irrelevant to the size of K , in a very large range ( e.g . K ≥ 16 ) . For example , in MoCo framework , by introducing EqCo the performance gap between K = 256 and K = 65536 ( the best configuration reported in He et al . ( 2020 ) ) almost disappears ( from 6.1 % decrease to 0.2 % ) . We call this method “ Equivalent Rules for Contrastive learning ” ( EqCo ) . For completeness , as the other part of EqCo we point that adjusting the learning rate according to the conventional linear scaling rule satisfies the equivalence for different number of queries per batch . Theoretically , following the InfoMax principle ( Linsker ( 1988 ) ) and the derivation in CPC ( Oord et al . ( 2018 ) ) , we prove that in EqCo , the lower bound of the mutual information keeps steady under various numbers of negative samples K. Moreover , from the back-propagation perspective , we further prove that in such configuration the upper bound of the gradient norm is also free of 1Recently , some self-supervised learning algorithms achieve new state-of-the-art results using different frameworks instead of conventional InfoNCE loss as in Eq . 1 , e.g . mean teacher ( in BYOL Grill et al . ( 2020 ) ) and online clustering ( in SWAV Caron et al . ( 2020b ) ) . We will investigate them in the future . K ’ s scale . The proposed equivalent rule implies that , by assigning α = K0 , it can “ mimic ” the optimization behavior underK0 negative samples even if the physical number of negativesK 6= K0 . The “ equivalent ” methodology of EqCo follows the well-known linear scaling rule ( Krizhevsky ( 2014 ) ; Goyal et al . ( 2017 ) ) , which suggests scaling the learning rate proportional to the batch size if the loss satisfies with the linear averaged form : L = 1N ∑N i=1 f ( xi ; θ ) . However , linear scaling rule can not be directly applied on InfoNCE loss ( Eq . 1 ) , which is partially because InfoNCE loss includes two batch sizes ( number of queries and keys respectively ) while linear scaling rule only involves one , in addition to the nonlinearity of the keys in InfoNCE loss . In the experiments of SimCLR ( Chen et al . ( 2020a ) ) , learning rates under different batch sizes are adjusted with linear scaling rule , but the accuracy gap is still very large ( 57.5 % @ batch=256 vs. 64+ % @ batch=8192 , 100 epochs training ) . EqCo challenges the belief that self-supervised contrastive learning requires large quantities of negative pairs to obtain competitive performance , making it possible to design simpler algorithms . We thus present SiMo , a simplified contrastive learning framework based on MoCo v2 ( Chen et al . ( 2020c ) ) . SiMo is elegant , efficient , free of large batch training and memory bank ; moreover , it can achieve superior performances over state-of-the-art even if the number of negative pairs is extremely small ( e.g . 16 ) , without bells and whistles . The contributions of our paper are summarized as follows : • We challenge the widely accepted belief that on large-scale vision datasets like ImageNet , large size of negative samples is critical for contrastive learning . We interpret it from a different view : it may be because the hyper-parameters are not set to the optimum . • We propose EqCo , an equivalent rule to adaptively set hyper-parameters between small and large numbers of negative samples , which proves to bridge the performance gap . • We present SiMo , a simpler but stronger baseline for contrastive learning .
This paper focuses on self-supervised contrastive learning. Previous contrastive learning methods heavily rely on a large number of negative samples. This paper proposed a novel method with an additional margin term, and mathematically investigate the relationship among the margin term, the temperature, and the number of negative samples. The number of negative samples can be significantly reduced by tuning the margin term, while the performance remains more stable compared to previous contrastive learning methods. Furthermore, this paper proposed a MoCo-based strong baseline that can achieve comparable results with an extremely small number of negative samples.
SP:c477e488dfaa82ea6698a52c6677b74135fecd12
Demystifying Learning of Unsupervised Neural Machine Translation
1 INTRODUCTION . Unsupervised Neural Machine Translation or UNMT have grown from its infancy ( Artetxe et al. , 2018 ; Lample et al. , 2018a ) to close-to-supervised performance recently on some translation scenarios ( Lample & Conneau , 2019 ; Song et al. , 2019 ) . Early UNMT works ( Artetxe et al. , 2017 ; Lample et al. , 2018a ; Yang et al. , 2018 ) adopt complex training strategies including model initialization , synthetic parallel data for warming up the model , adversarial loss for making encoder universal , different weight sharing mechanisms etc . Then Lample et al . ( 2018b ) simplifies all these and establishes a two-components framework , involving an initialization strategy followed by iterative training on two tasks , i.e . denoising auto-encoding with the DAE loss and online back-translation with the BT loss . Works afterwards mainly focus on developing better initialization strategies ( Lample & Conneau , 2019 ; Ren et al. , 2019 ; Song et al. , 2019 ; Liu et al. , 2020 ) . Although obtaining impressive performance , it is unclear why this standard training protocol is possible to be successful . Kim et al . ( 2020 ) and Marchisio et al . ( 2020 ) consider the standard training as a black-box and empirically analyze its success or failure regarding different data settings ( i.e . text domains and language pairs ) . Unfortunately , due to the lack of theoretical guidelines , some fundamental questions are still remained unknown : what standard training tries to minimize under the general unsupervised training paradigm ( Ghahramani , 2004 ) and when a certain training protocol can work for training UNMT ? In this paper , we attempt to open the back-box training of UNMT and understand its theoretical essence from two angles : i ) a marginal likelihood maximization view ; and ii ) an information-theoretic view by ablating standard training protocol with other variants . Our contributions are as follows . A . By making an analogy of standard training protocol with marginal likelihood or Evidence Lower BOund ( ELBO ) optimization , we visualize the learning curves of the two terms in ELBO objective , and found that optimizing ELBO is not sufficient for training a successful UNMT model , indicating that specific regularization design i.e . the DAE loss , quite matters . B . By leveraging information theory , we present a formal definition on what does it mean to successfully train an UNMT model , and then readily derive a sufficient condition and a necessary condition for successfully training UNMT in principle . In addition , we validate both sufficient and necessary conditions through empirical experiments , and find that both conditions indeed explain why standard training protocol works while others suffer from degeneration to learning sub-optimal tasks . C. Based on explanations for those failed protocols , we continue experiments to settle the role played by DAE and BT . Firstly , BT is the main task while DAE is a critical auxiliary . Then we clarify that DAE has more important role than just learning word order , accepted as common knowledge in almost all previous works , but also preserving the mutual information between encoder input and encoder output , which is necessary for successful training . Furthermore , DAE also functions as a behavior regularizer for decoding with online BT , and prevents BT from yielding degenerated data . 2 UNDERSTANDING UNMT FROM TWO PERSPECTIVES . In this section , we first introduce background about the standard training protocol proposed in Lample et al . ( 2018b ) , which is adopted by almost all later works . Then we introduce the basic concept of two perspectives on which we rely for analyzing the learning of different training protocol variants . Due to the space limit , please refer to appendix A.1 for a timely literature review of recent advance . 2.1 STANDARD TRAINING PROTOCOL . The standard training protocol involves standard initialization strategy and standard iterative training procedure , and they both are built upon a specific design of encoder-decoder parameterization . Parameterization and initialization UNMT model adopts a shared embedding matrix for a shared vocabulary with joint BPE ( Sennrich et al. , 2016 ) , and the two languages share the same encoder and decoder with only a language embedding for distinguishing the input from different languages . As a result , unconstrained decoding might generate tokens from the same language as the input . Standard initialization means using fastTEXT ( Bojanowski et al. , 2017 ) to initialize the embedding matrix , denoted as JointEmb . XLM ( Lample & Conneau , 2019 ) uses a trained encoder to initialize both encoder and decoder of the UNMT model . We also consider random initialization for completeness . Iterative training strategy The iterative training strategy involves optimization of two critical losses by turns , i.e . the DAE loss and the BT loss as defined in Eq . 1 and Eq . 2 , where s and t denote the two languages . DAE loss is constructed through sampling a monolingual sentence x ( or y ) , construct its noisy version C ( x ) ( C ( y ) ) and minimize the reconstruction error or RecErr : Ldae = − log ps→s ( x|C ( x ) ) + [ − log pt→t ( y|C ( y ) ) ] , ( 1 ) BT loss is constructed through sampling a monolingual sentence x ( or y ) , construct its corresponding translation via the current modelM ( x ) ( M ( y ) ) through back-translation and minimize the RecErr : Lbt = Eŷ∼M ( x ) [ − log pt→s ( x|ŷ ) ] + Ex̂∼M ( y ) [ − log ps→t ( y|x̂ ) ] , ( 2 ) The online BT process involved in the iterative training strategy can be seen as Co-Training ( Blum & Mitchell , 1998 ) , where two models ( with shared weights ) constructed on two views ( source/target sentence ) generate pseudo labels as the other view ( pseudo translation ) for training the corresponding dual model . We summarize the whole standard training protocol in Algorithm 1 in appendix A.2 . Constrained decoding Besides the basics , we further introduce the concept of constrained decoding where the model should be constrained to decode tokens only in the target language regardless of the shared embedding parameterization . This could give us a simple definition of cross-lingual RecErr beyond naive RecErr in Eq . 2 . Details of the algorithm and the definition are shown in appendix A.3 . 2.2 A MARGINAL MAXIMIZATION VIEW . The standard training of UNMT model takes advantage of sole monolingual corpora Ds , Dt , which is similar to the generative modeling setting where only unlabeled data is available ( Ghahramani , 2004 ) . Here we take an analogy of the standard UNMT training as implicitly maximizing marginal of the monolingual data . Due to the duality of translation ( He et al. , 2016 ) , the target sentence not only plays the role of label , but also the input in reverse translation direction . So in essence the standard UNMT training can be seen as maximizing the marginal log likelihood ofDs andDt simultaneously . However , since marginals involve infinite summation over a certain view ( target/source ) , a lower bound is often optimized via Monte Carlo approximation ( Kingma & Welling , 2014 ) . In the following derivation of ELBO ( Kingma & Welling , 2019 ) , qφ ( y|x ) is the posterior distribution of y when taking y as the latent variable . Here we only derive the bound for x ∈ Ds . A detailed analogy of the standard UNMT objective and the ELBO objective is presented in Table 1 . As you can see , both objectives have the same reconstruction error terms but different regularization terms : for ELBO , the model is optimized to stay close with the language model via the KL loss . Worth noting that , we are not the first to make a connection between marginal maximization and the standard UNMT training . In He et al . ( 2020 ) , they have already proposed an ELBO formulation for unsupervised sequence transduction task . However , they tend to focus on replacing the standard UNMT-training-style objective function with the ELBO objective , and propose several critical tricks such as Gumbel softmax and self-reconstruction for making ELBO really work . Instead , we leverage ELBO mainly as an anology to the standard UNMT training objective , and through comparative study with other protocol variants , we can further understand why standard objective and its variants work or not , even though they all tend to have similar ELBO values . Details are in appendix A.4 . 2.3 AN INFORMATION-THEORETIC VIEW . If we denote Y ′ =M ( X ) as the random variable ( r.v . ) generated by the modelM over X . Therefore , if ( Y ′ , X ) gradually contains more and more bilingual knowledge , the model will be able to generate better translations , eventually leading to the success of UNMT training . Suppose c is a constant predefined by users which controls the satisfactory level for translation performance , we give a definition to formalize the success of UNMT training from an information-theoretic viewpoint . Definition 2.1 . If I ( Y ′ , X ) > c after training , we say that UNMT training is successful ; otherwise , we say that UNMT training fails . ( Caveat , c is concetual quantity , we never instantiate its value . ) Suppose p ( x , y′ ) is the true distribution of 〈x , y′〉 , and pt→s ( x | y′ ) is an estimator of p ( x | y′ ) . We obtain the following two conditions for success of training UNMT based on the above definition 2.1 . Proposition 1 . ( Sufficient condition ) If Ep ( x , y′ ) log pt→s ( x|y′ ) ≥ c − H ( X ) , then UNMT training will be successful . Proof . Based on Definition 2.1 and the definition of mutual information ( MI ) and Jensen ’ s inequality , we can derive the following inequality ( Pimentel et al. , 2020 ) : I ( X , Y ′ ) = H ( X ) −H ( X | Y ′ ) ≥ H ( X ) −Hpt→s ( X | Y ′ ) = H ( X ) + Ep ( x , y′ ) log pt→s ( x | y′ ) ≥ c ( 4 ) Since the sufficient condition relies on true distribution p ( x , y′ ) which is unknown in practice , we sample ( x , y′ ) from the empirical distribution ofX and ps→t ( y′|x ) as approximation . Then the ideal sufficient condition is reduced to a practical one : If ∑ x Eps→t ( y′|x ) log pt→s ( x|y′ ) ≥ c − H ( X ) , then UNMT training will be successful . Since MI is symmetric , we can also have similar formula regarding s→ t direction with Ep ( x′ , y ) log ps→t ( y|x′ ) ≥ c−H ( Y ) . They together connect success of training to the BT loss in Eq . 2 : a lower BT loss is more likely to make UNMT training successful . Furthermore , if we denote the encoder output as a r.v. , Z = enc ( X ) , we can obtain the following necessary condition : Proposition 2 . ( Necessary condition ) . If UNMT training is successful , then I ( X , Z ) ≥ c. Proof . Following the Data Processing Inequality ( Cover & Thomas , 1991 ) , we have the following inequality that holds all the time : I ( X , Z ) ≥ I ( X , Y ′ ) ≥ c , ( 5 ) with the Markov chain ( or data processing order ) X enc−−→ Z dec−−→ Y ′ . In subsequent experiments , we follow Pimentel et al . ( 2020 ) and estimate I ( X , Z ) = H ( X ) − H ( X|Z ) by calculating H ( X ) through a statistical 1-gram language model and H ( X|Z ) through probing ( Conneau et al. , 2018 ) respectively . For estimating I ( X , Y ′ ) , we use the token-by-token point-wise mutual information ( PMI ) over some pseudo bitext as a surrogate to the sentence-bysentence MI . The detailed estimation methods are presented in appendix A.5 .
This paper performs an ablative study on the two components involved in training unsupervised MT systems: 1) back-translation loss, 2) denoising autoencoding loss. It links the reconstruction loss to ELBO (where the q distribution is a back-translation model). It shows that the original loss with both the components is important for unsupervised MT and ELBO needs to be augmented with denoising autoencoding loss to be effective at training unsupervised MT models.
SP:4b87425197bb556af13c6aee324bc5ea2b82fc45
Large Scale Image Completion via Co-Modulated Generative Adversarial Networks
1 INTRODUCTION . Generative adversarial networks ( GANs ) have received a great amount of attention in the past few years , during which a fundamental problem emerges from the divergence of development between image-conditional and unconditional GANs . Image-conditional GANs have a wide variety of computer vision applications ( Isola et al. , 2017 ) . As vanilla U-Net-like generators can not achieve promising performance especially in free-form image completion ( Liu et al. , 2018 ; Yu et al. , 2019 ) , a multiplicity of task-specific approaches have been proposed to specialize GAN frameworks , mostly focused on hand-engineered multi-stage architectures , specialized operations , or intermediate structures like edges or contours ( Altinel et al. , 2018 ; Ding et al. , 2018 ; Iizuka et al. , 2017 ; Jiang et al. , 2019 ; Lahiri et al. , 2020 ; Li et al. , 2020 ; Liu et al. , 2018 ; 2019a ; 2020 ; Nazeri et al. , 2019 ; Ren et al. , 2019 ; Wang et al. , 2018 ; Xie et al. , 2019 ; Xiong et al. , 2019 ; Yan et al. , 2018 ; Yu et al. , 2018 ; 2019 ; Yu et al. , 2019 ; Zeng et al. , 2019 ; Zhao et al. , 2020a ; Zhou et al. , 2020 ) . These branches of works have made significant progress in reducing the generated artifacts like color discrepancy and blurriness . However , a serious challenge remains that all existing algorithms tend to fail when handling large-scale missing regions . This is mainly due to their lack of the underlying generative capability — one can never learn to complete a large proportion of an object so long as it does not have the capability of generating a completely new one . We argue that the key to overcoming this challenge is to bridge the gap between image-conditional and unconditional generative architectures . ∗Corresponding author Recently , the performance of unconditional GANs has been fundamentally advanced , chiefly owing to the success of modulation approaches ( Chen et al. , 2019 ; Karras et al. , 2019a ; b ) with learned style representations produced by a latent vector . Researchers also extend the application of modulation approaches to image-conditional GANs with the style representations fully determined by an input image ( Park et al. , 2019 ; Huang et al. , 2018 ; Liu et al. , 2019b ) ; however , the absence of stochasticity makes them hardly generalizable to the settings where only limited conditional information is available . This limitation is fatal especially in large scale image completion . Although some multi-modal unpaired image-to-image translation methods propose to encode the style from another reference image ( Huang et al. , 2018 ; Liu et al. , 2019b ) , this unreasonably assumes that the style representations are entirely independent of the conditional input and hence compromises the consistency . Therefore , we propose co-modulated generative adversarial networks , a generic approach that leverages the generative capability from unconditional modulated architectures , embedding both conditional and stochastic style representations via co-modulation . Co-modulated GANs are thus able to generate diverse and consistent contents and generalize well to not only small-scale inpainting but also extremely large-scale image completion , supporting both regular and irregular masks even with only little conditional information available . See Fig . 1 for qualitative examples . Due to the effectiveness of co-modulation , we do not encounter any problem suffered in the image completion literature ( Liu et al. , 2018 ; Yu et al. , 2019 ) , successfully bridging the long-existing divergence . Another major barrier in the image completion literature is the lack of good quantitative metrics . The vast majority of works in this literature seek to improve their performance in terms of similarity-based metrics that heavily prefer blurry results , e.g. , L1 , L2 , PSNR , and SSIM , among which many state that there are yet no good quantitative metrics for image completion ( Liu et al. , 2018 ; Yu et al. , 2018 ; 2019 ) . The only gold standard in this literature is the user study , which conducts real vs. fake test giving a pair of images to subjects ( i.e. , the users ) . However , the user study is subject to large variance and costly , therefore lacking reproducibility . Inspired by the user study , we propose the new Paired/Unpaired Inception Discriminative Score ( P-IDS/U-IDS ) . Besides its intuitiveness and scalability , we demonstrate that P-IDS/U-IDS is robust to sampling size and effective of capturing subtle differences and further correlates well with human preferences . Our contributions are summarized as follows : • We propose co-modulated GANs , a generic approach that bridges the gap between imageconditional and recent modulated unconditional generative architectures . • We propose the new P-IDS/U-IDS for robust assessment of the perceptual fidelity of GANs . • Experiments demonstrate superior performance in terms of both quality and diversity in free-form image completion and easy generalization to image-to-image translation . 2 RELATED WORK . Image-Conditional GANs . Image-conditional GANs can be applied to a variety of image-to-image translation tasks ( Isola et al. , 2017 ) . The unpaired setting is also investigated when paired training data is not available ( Choi et al. , 2018 ; Huang et al. , 2018 ; Kim et al. , 2019 ; Lazarow et al. , 2017 ; Liu et al. , 2017 ; Yi et al. , 2017 ; Zhao et al. , 2020b ; Zhu et al. , 2017a ) . Recent works exploit normalization layers with learned style representations embedded from the conditional input or another reference image to enhance the output fidelity ( Huang et al. , 2018 ; Kim et al. , 2019 ; Liu et al. , 2019b ; Park et al. , 2019 ) . They can be regarded as a set of conditional modulation approaches , but still lack stochastic generative capability and hence poorly generalize when limited conditional information is available . Isola et al . ( 2017 ) initially find that the generator tends to ignore the noise input although they try to feed it , in contrast to unconditional or class-conditional GANs . A branch of works aims to enforce the intra-conditioning diversity using VAE-based latent sampling strategies ( Zhu et al. , 2017b ) or imposing distance-based loss terms ( Huang et al. , 2018 ; Mao et al. , 2019 ; Qin et al. , 2018 ) . Wang et al . ( 2019b ) also propose to decompose the convolution kernels into stochastic basis . However , the enforcement of diversity conversely results in the deterioration of image quality . Our co-modulation approach not only learns the stochasticity inherently but also makes the trade-off easily controllable . Image Completion . Image completion , also referred to as image inpainting when incapable of completing large-scale missing regions , has received a significant amount of attention . It is a constrained image-to-image translation problem but exposes more serious challenges . Traditional methods ( Ballester et al. , 2001 ; Barnes et al. , 2009 ; Darabi et al. , 2012 ; Efros & Freeman , 2001 ; Efros & Leung , 1999 ) utilize only low-level features and fail to generate semantically consistent contents . Then , ( Köhler et al. , 2014 ; Ren et al. , 2015 ; Xie et al. , 2012 ) adopt deep neural networks for image completion ; ( Pathak et al. , 2016 ) first exploits conditional GANs . Numerous follow-up works focus on the semantic context and texture , edges and contours , or hand-engineered architectures ( Altinel et al. , 2018 ; Ding et al. , 2018 ; Iizuka et al. , 2017 ; Jiang et al. , 2019 ; Jo & Park , 2019 ; Lahiri et al. , 2017 ; Liu et al. , 2019a ; Nazeri et al. , 2019 ; Ren et al. , 2019 ; Sagong et al. , 2019 ; Wang et al. , 2018 ; Xie et al. , 2019 ; Xiong et al. , 2019 ; Yan et al. , 2018 ; Yang et al. , 2017 ; 2019a ; Yu et al. , 2018 ; Yu et al. , 2019 ; Zeng et al. , 2019 ; Lahiri et al. , 2020 ; Zhao et al. , 2020a ; Li et al. , 2020 ; Zhou et al. , 2020 ) , among which ( Liu et al. , 2018 ; Yu et al. , 2019 ) introduce partial convolution and gated convolution to address free-form image completion . The lack of stochasticity is also observed in image completion ( Cai & Wei , 2019 ; Ma et al. , 2019 ; Zheng et al. , 2019 ) . Other works address the so-called outpainting subtasks ( Sabini & Rusak , 2018 ; Wang et al. , 2019a ; Yang et al. , 2019b ) . To our knowledge , none of these methods produce promising results in the presence of free-form large-scale missing regions . Evaluation Metrics . Great research interest has been drawn on the evaluation of GANs ( DeVries et al. , 2019 ; Gurumurthy et al. , 2017 ; Sajjadi et al. , 2018 ; Snell et al. , 2017 ; Xiang & Li , 2017 ) . Inception Score ( IS ) ( Salimans et al. , 2016 ) , and some other metrics like FCN-Score ( Isola et al. , 2017 ) , are specialized to the pre-trained task thus can not generalize . While FID ( Heusel et al. , 2017 ) is generally acceptable , few promising metrics for image completion exist . Previous works heavily rely on similarity-based metrics such as L1 , L2 , PSNR , and SSIM , which fail to capture stochastic Published as a conference paper at ICLR 2021 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formula : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 const uncondit ional modulat ion Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 For ula : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formula : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 ( a ) Fo mulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue ong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formula : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 3 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formula : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 ( b ) condit ional modulat ion Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 0 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Form las : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 0 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 3 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 0 2017011407 x y z D E M E ( y ) ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Form la : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on N v , 4 2019 Yue Dong YaoClass 70 2 17 1407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 3 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011 07 x y z D E M E ( y ) ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 ( c ) co-modulat ion Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 201 011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 201 011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Form la : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 3 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Form las : Instructed by Due n Nov , 4 2019 Yue Dong Ya Class 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Form la : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instruct d by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on N v , 4 2019 Yue Dong YaoClass 70 2 17 1407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 3 5 Formulas : Instructed by Due on Nov , 4 2019 Yue ong YaoClass 70 2017011 07 x y z D E M E ( y ) ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) M ( z ) s s′ A ψ = 1 3 5 Formulas : Instructed by Due on Nov , 4 2019 Yue Dong YaoClass 70 2017011407 x y z D E M E ( y ) ( z ) s s′ A ψ = 1 ψ = 3 ψ = 5 ( d ) Figure 2 : Illustration from modulation to co-modulation : ( a ) unconditional modulated generator ; ( b ) vanilla image-conditional generator ; ( c ) conditional modulated generator ; and ( d ) co-modulated generator . y , z represent the conditional input and the latent vector respectively ; E , D , M represent the conditional encoder , the generative decoder , and the mapping network , respectively . regions and are ill-fitted for GANs . Our proposed metric is also related to the classifier-based tests ( Blau & Michaeli , 2018 ; Lopez-Paz & Oquab , 2016 ) . However , previous classifier-based metrics require separate sets for training and testing the classifier , making them sensitive to the underlying generalizability of the trained classifier . We formulate the discriminability as a simple scalable metric for both the paired and unpaired ver ions without relying on the generalizability .
In this paper, the authors propose a general approach for image completion with large-scale missing regions. The key is to combine image-conditional and modulated unconditional generative architectures via co-modulation. The presented approach has demonstrated strong performance in the image painting with large-scale missing pixels and some image-to-image translation tasks. A new metric P-IDS/U-IDS is proposed to evaluate the perceptual fidelity of inpainted images.
SP:df623838a4d93f4a6c518f23424d5d2ce2cbf704
Learning Robust State Abstractions for Hidden-Parameter Block MDPs
1 INTRODUCTION A key open challenge in AI research that remains is how to train agents that can learn behaviors that generalize across tasks and environments . When there is common structure underlying the tasks , we have seen that multi-task reinforcement learning ( MTRL ) , where the agent learns a set of tasks simultaneously , has definite advantages ( in terms of robustness and sample efficiency ) over the singletask setting , where the agent independently learns each task . There are two ways in which learning multiple tasks can accelerate learning : the agent can learn a common representation of observations , and the agent can learn a common way to behave . Prior work in MTRL has also leveraged the idea by sharing representations across tasks ( D ’ Eramo et al. , 2020 ) or providing pertask sample complexity results that show improved sample efficiency from transfer ( Brunskill & Li , 2013 ) . However , explicit exploitation of the shared structure across tasks via a unified dynamics has been lacking . Prior works that make use of shared representations use a naive unification approach that posits all tasks lie in a shared domain ( Figure 1 , left ) . On the other hand , in the single-task setting , research on state abstractions has a much richer history , with several works on improved generalization through the aggregation of behaviorally similar states ( Ferns et al. , 2004 ; Li et al. , 2006 ; Luo et al. , 2019 ; Zhang et al. , 2020b ) . In this work , we propose to leverage rich state abstraction models from the single-task setting , and explore their potential for the more general multi-task setting . We frame the problem as a structured super-MDP with a shared state space and universal dynamics model conditioned on a task-specific hidden parameter ( Figure 1 , right ) . This additional structure gives us better sample efficiency , both ∗Corresponding author : amy.x.zhang @ mail.mcgill.ca theoretically , compared to related bounds ( Brunskill & Li , 2013 ; Tirinzoni et al. , 2020 ) and empirically against relevant baselines ( Yu et al. , 2020 ; Rakelly et al. , 2019 ; Chen et al. , 2018 ; Teh et al. , 2017 ) . We learn a latent representation with smoothness properties for better few-shot generalization to other unseen tasks within this family . This allows us to derive new value loss bounds and sample complexity bounds that depend on how far away a new task is from the ones already seen . We focus on multi-task settings where dynamics can vary across tasks , but the reward function is shared . We show that this setting can be formalized as a hidden-parameter MDP ( HiP-MDP ) ( DoshiVelez & Konidaris , 2013 ) , where the changes in dynamics can be defined by a latent variable , unifying dynamics across tasks as a single global function . This setting assumes a global latent structure over all tasks ( or MDPs ) . Many real-world scenarios fall under this framework , such as autonomous driving under different weather and road conditions , or even different vehicles , which change the dynamics of driving . Another example is warehouse robots , where the same tasks are performed in different conditions and warehouse layouts . The setting is also applicable to some cases of RL for medical treatment optimization , where different patient groups have different responses to treatment , yet the desired outcome is the same . With this assumed structure , we can provide concrete zero-shot generalization bounds to unseen tasks within this family . Further , we explore the setting where the state space is latent and we have access to only high-dimensional observations , and we show how to recover robust state abstractions in this setting . This is , again , a highly realistic setting in robotics when we do not always have an amenable , Lipschitz low-dimensional state space . Cameras are a convenient and inexpensive way to acquire state information , and handling pixel observations is key to approaching these problems . A block MDP ( Du et al. , 2019 ) provides a concrete way to formalize this observation-based setting . Leveraging this property of the block MDP framework , in combination with the assumption of a unified dynamical structure of HiP-MDPs , we introduce the hidden-parameter block MDP ( HiP-BMDP ) to handle settings with high-dimensional observations and structured , changing dynamics . Key contributions of this work are a new viewpoint of the multi-task setting with same reward function as a universal MDP under the HiP-BMDP setting , which naturally leads to a gradientbased representation learning algorithm . Further , this framework allows us to compute theoretical generalization results with the incorporation of a learned state representation . Finally , empirical results show that our method outperforms other multi-task and meta-learning baselines in both fast adaptation and zero-shot transfer settings . 2 BACKGROUND . In this section , we introduce the base environment as well as notation and additional assumptions about the latent structure of the environments and multi-task setup considered in this work . A finite1 , discrete-time Markov Decision Process ( MDP ) ( Bellman , 1957 ; Puterman , 1995 ) is a tuple 〈S , A , R , T , γ〉 , where S is the set of states , A is the set of actions , R : S × A → R is the reward function , T : S × A → Dist ( S ) is the environment transition probability function , and γ ∈ [ 0 , 1 ) is the discount factor . At each time step , the learning agent perceives a state st ∈ S , takes an action at ∈ A drawn from a policy π : S ×A → [ 0 , 1 ] , and with probability T ( st+1|st , at ) enters next state st+1 , receiving a numerical reward Rt+1 from the environment . The value function of policy π is defined as : Vπ ( s ) = Eπ [ ∑∞ t=0 γ tRt+1|S0 = s ] . The optimal value function V ∗ is the maximum value function over the class of stationary policies . Hidden-Parameter MDPs ( HiP-MDPs ) ( Doshi-Velez & Konidaris , 2013 ) can be defined by a tuple M : 〈S , A , Θ , Tθ , R , γ , PΘ〉 where S is a finite state space , A a finite action space , Tθ describes the transition distribution for a specific task described by task parameter θ ∼ PΘ , R is the reward function , γ is the discount factor , and PΘ the distribution over task parameters . This defines a family of MDPs , where each MDP is described by the parameter θ ∼ PΘ . We assume that this parameter θ is fixed for an episode and indicated by an environment id given at the start of the episode . Block MDPs ( Du et al. , 2019 ) are described by a tuple 〈S , A , X , p , q , R〉 with an unobservable state space S , action spaceA , and observable space X . p denotes the latent transition distribution p ( s′|s , a ) for s , s′ ∈ S , a ∈ A , q is the ( possibly stochastic ) emission mapping that emits the observations q ( x|s ) for x ∈ X , s ∈ S , and R the reward function . We are interested in the setting where this 1We use this assumption only for theoretical results , but our method can be applied to continuous domains . mapping q is one-to-many . This is common in many real world problems with many tasks where the underlying states and dynamics are the same , but the observation space that the agent perceives can be quite different , e.g . navigating a house of the same layout but different decorations and furnishings . Assumption 1 ( Block structure ( Du et al. , 2019 ) ) . Each observation x uniquely determines its generating state s. That is , the observation space X can be partitioned into disjoint blocks Xs , each containing the support of the conditional distribution q ( ·|s ) . Assumption 1 gives the Markov property inX , a key difference from partially observable MDPs ( Kaelbling et al. , 1998 ; Zhang et al. , 2019 ) , which has no guarantee of determining the generating state from the history of observations . This assumption allows us to compute reasonable bounds for our algorithm in k-order MDPs2 ( which describes many real world problems ) and avoiding the intractability of true POMDPs , which have no guarantees on providing enough information to sufficiently predict future rewards . A relaxation of this assumption entails providing less information in the observation for predicting future reward , which will degrade performance . We show empirically that our method is still more robust to a relaxation of this assumption compared to other MTRL methods . Bisimulation is a strict form of state abstraction , where two states are bisimilar if they are behaviorally equivalent . Bisimulation metrics ( Ferns et al. , 2011 ) define a distance between states as follows : Definition 1 ( Bisimulation Metric ( Theorem 2.6 in Ferns et al . ( 2011 ) ) ) . Let ( S , A , P , r ) be a finite MDP and met the space of bounded pseudometrics on S equipped with the metric induced by the uniform norm . Define F : met 7→ met by F ( d ) ( s , s′ ) = max a∈A ( |ras − ras′ |+ γW ( d ) ( P as , P as′ ) ) , where W ( d ) is the Wasserstein distance between transition probability distributions . Then F has a unique fixed point d̃ which is the bisimulation metric . A nice property of this metric d̃ is that difference in optimal value between two states is bounded by their distance as defined by this metric . Theorem 1 ( V ∗ is Lipschitz with respect to d̃ ( Ferns et al. , 2004 ) ) . Let V ∗ be the optimal value function for a given discount factor γ . Then V ∗ is Lipschitz continuous with respect to d̃ with Lipschitz constant 11−γ , |V ∗ ( s ) − V ∗ ( s′ ) | ≤ 1 1− γ d̃ ( s , s′ ) . Therefore , we see that bisimulation metrics give us a Lipschitz value function with respect to d̃ . For downstream evaluation of the representations we learn , we use Soft Actor Critic ( SAC ) ( Haarnoja et al. , 2018 ) , an off-policy actor-critic method that uses the maximum entropy framework for soft policy iteration . At each iteration , SAC performs soft policy evaluation and improvement steps . The policy evaluation step fits a parametric soft Q-function Q ( st , at ) using transitions sampled from the replay buffer D by minimizing the soft Bellman residual , J ( Q ) = E ( st , st , rt , st+1 ) ∼D [ ( Q ( st , at ) − rt − γV̄ ( xt+1 ) ) 2 ] . The target value function V̄ is approximated via a Monte-Carlo estimate of the following expectation , V̄ ( xt+1 ) = Eat+1∼π [ Q̄ ( xt+1 , at+1 ) − α log π ( at+1|st+1 ) ] , where Q̄ is the target soft Q-function parameterized by a weight vector obtained from an exponentially moving average of the Q-function weights to stabilize training . The policy improvement step then attempts to project a parametric policy π ( at|st ) by minimizing KL divergence between the policy and a Boltzmann distribution induced by the Q-function , producing the following objective , J ( π ) = Est∼D [ Eat∼π [ α log ( π ( at|st ) ) −Q ( st , at ) ] ] . 2Any k-order MDP can be made Markov by stacking the previous k observations and actions together .
This paper studies a family of Markov Decision Process (MDP) models with a low-dimensional unobserved state, called the block MDP. The authors assume that system dynamics of the underlying MDP is sufficiently summarized by a parameter $\theta$. This learning setting could be seen as a combination of Block MDP and the Hidden Parameter MDP; hence the name HiP-BMDP.
SP:9e72893f6675196c62be20b31e686364f690479a
Bayesian Learning to Optimize: Quantifying the Optimizer Uncertainty
1 INTRODUCTION . Computational models of many real-world applications involve optimizing non-convex objective functions . As the non-convex optimization problem is NP-hard , no optimization algorithm ( or optimizer ) could guarantee the global optima in general , and instead , their solutions ’ usefulness ( sometimes based on their proximity to the optima ) , when the optima are unknown , can be very uncertain . Being able to quantify such uncertainty is important to not only assessing the solution uncertainty after optimization but also enhancing the search efficiency during optimization . For instance , reliable and trustworthy machine learning models demand uncertainty awareness and quantification during training ( optimizing ) such models , whereas in reality deep neural networks without proper modeling of uncertainty suffer from overconfidence and miscalibration ( Guo et al. , 2017 ) . In another application example of protein docking , although there exists epistemic uncertainty of the objective function and the aleatoric uncertainty of the protein structure data ( Cao & Shen , 2020 ) , state-ofthe-art methods only predict several single solutions ( Porter et al. , 2019 ) without any associated uncertainty , which makes those predictions hard to be interpreted by the end users . Various optimization methods have been proposed in response to the need of uncertainty awareness . Stochastic optimization methods like random search ( Zhigljavsky , 2012 ) , simulated annealing ( Kirkpatrick et al. , 1983 ) , genetic algorithms ( Goldenberg , 1989 ) and particle swarm optimization ( Kennedy & Eberhart , 1995 ) injected the randomness into the algorithms in order to reduce uncertainties . However , these methods do not provide the uncertainty quantification ( UQ ) of solutions . Recently , there have been growing interests in applying inference-based methods to optimization problems ( Brochu et al. , 2010 ; Shapiro , 2000 ; Pelikan et al. , 1999 ) . Generally , they transfer the uncertainties within the data and model into the final solution by modelling the posterior distribution over the global optima . For instance , Bijl et al . ( 2016 ) uses sequential Monte Carlo to approximate the distribution over the optima with Thompson sampling as the search strategy . Hernández-Lobato et al . ( 2014 ) uses kernel approximation for modelling the posterior over the optimum under Gaussian process . Ortega et al . ( 2012 ) ; Cao & Shen ( 2020 ) directly model the posterior over the optimum as a Boltzmann distribution . They not only surpass the previous methods in accuracy and efficiency , but also provide easy-to-interpret uncertainty quantification . Despite progress in optimization with uncertainty-awareness , significant open questions remain . Existing methods consider uncertainty either within the data or the model ( including objective functions ) ( Kendall & Gal , 2017 ; Ortega et al. , 2012 ; Cao & Shen , 2020 ) . However , no attention was ever paid to the uncertainty arising from the optimizer that is directly responsible for deriving the end solutions with given data and models . The optimizer is usually pre-defined and fixed in the optimization algorithm space . For instance , there are several popular update rules in Bayesian optimization , such as expected improvement Vazquez & Bect ( 2010 ) or upper confidence bound Srinivas et al . ( 2009 ) , that are chosen and fixed for the entire process . For Bayesian neural networks training , the update rule is usually chosen off-the-shelf , such as Adam , SGD , or RMSDrop . The uncertainty in the optimizer is intrinsically defined over the optimizer space and important to the optimization and UQ solutions . However , such uncertainty is unwittingly ignored when the optimizer is treated as a fixed sample in the space . To fill the aforementioned gap , the core intellectual value of this work is to recognize and quantify a new form of uncertainty , that lies in the optimization algorithm ( optimizer ) , besides the classical data- or model- based uncertainties ( also known as epistemic and aleatoric uncertainties ) . The underlying innovation is to treat an optimizer as a random sample from the algorithmic space , rather than one of a few hand-crafted update rules . The key enabling technique is to consider the algorithmic space being parameterized by a neural network . We then leverage a Boltzmann-shaped posterior over the optimizers , and approximate the posterior locally as Gaussian distributions through variational inference . Our approach , Bayesian learning to optimize ( BL2O ) , for the first time addresses the modeling of the optimizer-based uncertainty . Extensive experiments on optimizing test functions , energy functions in a bioinformatics application , and loss functions in the image classification and data privacy attack demonstrate that compared to the start-of-art methods , BL2O substantially improves the performance of optimization and uncertainty quantification , as well as calibration and out-of-domain detection in classification . In the following sections , we first review related methods in details and reveal the remaining gap . We then formally define the problem of optimization with uncertainty quantification and point out the optimizer as a source of uncertainty . After formally defining the optimizer space , the optimal optimizer as a random vector in the space , and the optimizer uncertainty , we propose our novel model , BL2O . And lastly , we compare our BL2O with both Bayesian and non-Bayesian competing methods on extensive test functions and real-world applications . 2 RELATED WORK . Many works ( Wang & Jegelka , 2017 ; Hennig & Schuler , 2012 ) studied optimization with uncertainty quantification under the framework of Bayesian optimization ( Shahriari et al. , 2016 ; Brochu et al. , 2010 ) . In these studies , multiple objectives are sampled from the posterior over the objectives ( p ( f |D ) ) , where D is the observed data . Each sampled objective is optimized for obtaining samples of the global optima : w∗ so that the empirical distribution over w∗ can be built . Approximation is much needed since those approaches need optimization for every sample . For instance , Henrández-Lobato et al . ( 2014 ) uses kernel approximation to approximate the posterior distirbution . Another line of work uses various sampling schemes for estimating the density of posterior distributions . For instance , Bijl et al . ( 2016 ) uses sequential Monte Carlo sampling . De Bonet et al . ( 1997 ) designs a randomized optimization algorithm that directly samples global optima . These methods are much more efficient , but their performance heavily depends on the objective landscapes . Moreover , a few studies ( Ahmed et al. , 2016 ; Lizotte , 2008 ; Osborne et al. , 2009 ; Wu et al. , 2017 ) in Bayesian optimization utilize first-order information to boost the performance of optimization . For instance , Osborne et al . ( 2009 ) uses gradient information to improve the covariance matrix in Gaussian process . Wu et al . ( 2017 ) embeds the derivative knowledge into the acquisition function which is optimized in every iteration . Finally , there are approaches ( Ortega et al. , 2012 ; Cao & Shen , 2020 ) that directly model the shape of posterior as the Boltzmann distributions : p ( w∗|D ) ∝ exp ( −αf ( w∗ ) ) , where α is the scheduled temperature constant . They automatically adjust α during the search in order to balance the exploration-exploitation tradeoff . They beat previous work in terms of both efficiency and accuracy . However , as revealed earlier in the Introduction , none of the methods above consider the uncertainty within the optimizer . 3 METHODS . Notation . We use a bold-faced uppercase letter to denote a matrix ( e.g . W ) , a bold-faced lowercase letter to denote a vector ( e.g . w ) , and a normal lowercase letter to denote a scalar ( e.g . w ) . 3.1 PROBLEM STATEMENT . The goal of optimization is to find the global optimum for an objective function f ( w ) w.r.t . w : w∗ = arg min w f ( w ) . ( 1 ) w∗ is assumed unknown and treated as a random vector in this study . Once a optimizer obtains ŵ , its estimate of w∗ , it is important to assess the quality and the uncertainty of the solution . Considering that many real-world objective functions are nonconvex and noisy in ŵ , solution quality is often measured by ||ŵ−w∗|| , the proximity to the global optimum rather than that to the optimal function value . Examples include energy functions as the objective and RMSDs as the proximity measure in protein docking ( Lensink et al. , 2007 ) . Therefore , the goal of uncertainty quantification ( UQ ) here is the following : P ( ||ŵ −w∗|| 6 rσ|D ) = σ ( 2 ) where rσ is the upper bound of ||ŵ − w∗|| at σ confidence level , and D denotes samples during optimization . Such UQ results additionally provide confidence in the solution ŵ and improve model reliability for end users . To calculate the probability defined in Eq 2 and perform UQ , a direct albeit challenging way is to model the posterior over w∗ ( p ( w∗|D ) ) and then sample from the posterior . When the optimizer g is regarded fixed in existing literature , the posterior is actually p ( w∗|D , g ) . A central contribution of ours is to further consider the optimizer as a source of uncertainty , model it as a random vector in an optimizer space , and perform posterior estimation of p ( w∗|D ) . 3.2 OPTIMIZER UNCERTAINTY : A FRAMEWORK . An optimizer is directly responsible for optimization and thus naturally a source of solution uncertainty . To address this often-neglected uncertainty source , we first define the space of optimizers and then model an optimizer as a point in this space . Considering that many widely-used optimizers are iterative and using first-order derivatives , we restrict the optimizer space as follows : Definition 3.1 ( ( First-order Iterative ) Optimizer Space ) We define a first-order , iterative algorithmic space G , where each point g ∈ G is an iterative optimizer , that has the following mapping : g ( { ∇f ( wτ ) } tτ=1 ) = δwt , where ∇f ( w ) τ and δwt are the gradient and the update vector at τ th and tth iteration , respectively . Here we use g ( · ) to denote a pre-defined update rule and the resulting optimizer . For instance , in gradient descent , g ( { ∇f ( wτ ) } tτ=1 ) = −α∇f ( wt ) , where α is the step size . Now that the optimizer space is defined , we next define the ( unknown ) optimal optimizer and its uncertainty . Definition 3.2 ( Optimal Optimizer ) We define the optimal optimizer g∗ ∈ G as the optimizer that can obtain the lowest function value with a fixed budget T : g∗ = arg min g∈G ( T∑ t=1 f ( wtg ) ) ( 3 ) where wtg = w t−1 g + g ( { ∇f ( wτg ) } t−1τ=1 ) is the parameter value at tth iteration updated through the optimizer g. In practice the optimal optimizer g∗ is unknown so we treat g∗ as a random vector and formally define the optimizer uncertainty as follows : Definition 3.3 ( Optimizer Uncertainty ) Let G be the algorithmic space , where each point g ∈ G is an optimizer . We assume there is a prior distribution over the optimal optimizer g∗ as p ( g∗ ) . We also assume a likelihood distribution as p ( D|g∗ ) , whereD are the observed data ( sample trajectory ) given g∗ . Then we define the optimizer uncertainty through p ( g∗|D ) ∝ p ( D|g∗ ) p ( g∗ ) . To inject the optimizer uncertainty into p ( w∗|D ) , it is straightforward to have the following integration for posterior estimation : p ( w∗|D ) = ∫ p ( g∗|D ) p ( w∗|D , g∗ ) dg ( 4 )
The paper considers the question of quantifying the uncertainty that arises from the optimiser used to perform inference in a given model. Taking a Bayesian approach, the aim is to deduce the posterior over the space of optimisers. The form for the posterior is chosen to be a Boltzmann distribution which is then approximated with a multivariate Gaussian using a KL divergence. The parameterisation for the posterior is defined using an LSTM neural network.
SP:dc75166137ad902cb0b08966bc25914e0f141c63
Global optimality of softmax policy gradient with single hidden layer neural networks in the mean-field regime
1 INTRODUCTION . In recent years , deep reinforcement learning has revolutionized the world of Artificial Intelligence by outperforming humans in a multitude of highly complex tasks and achieving breakthroughs that were deemed unthinkable at least for the next decade . Spectacular examples of such revolutionary potential have appeared over the last few years , with reinforcement learning algorithms mastering games and tasks of increasing complexity , from learning to walk to the games of Go and Starcraft ( Mnih et al. , 2013 ; 2015 ; Silver et al. , 2016 ; 2017 ; 2018 ; Haarnoja et al. , 2018a ; Vinyals et al. , 2019 ) . In most cases , the main workhorse allowing artificial intelligence to pass such unprecedented milestones was a variation of a fundamental method to train reinforcement learning models : policy gradient ( PG ) algorithms ( Sutton et al. , 2000 ) . This algorithm has a disarmingly simple approach to the optimization problem at hand : given a parametrization of the policy , it updates the parameters in the direction of steepest ascent of the associated integrated value function . Impressive progress has been made recently in the understanding of the convergence and optimization properties of this class of algorithms in the tabular setting ( Agarwal et al. , 2019 ; Cen et al. , 2020 ; Bhandari & Russo , 2019 ) , in particular leveraging the natural tradeoff between exploration and exploitation offered for entropy-regularized rewards by softmax policies ( Haarnoja et al. , 2018b ; Mei et al. , 2020 ) . However , this simple algorithm alone is not sufficient to explain the multitude of recent breakthroughs in this field : in application domains such as Starcraft , robotics or movement planning , the space of possible states and actions are exceedingly large – or even continuous – and can therefore not be represented efficiently by tabular policies ( Haarnoja et al. , 2018a ) . Consequently , the recent impressive successes of artificial intelligence would be impossible without the natural choice of neural networks to approximate value functions and / or policy functions in reinforcement learning algorithms ( Mnih et al. , 2015 ; Sutton et al. , 2000 ) . While neural networks , in particular deep neural networks , provide a powerful and versatile tool to approximate high dimensional functions on continuous spaces ( Cybenko , 1989 ; Hornik , 1991 ; Barron , 1993 ) , their intrinsic nonlinearity poses significant obstacles to the theoretical understanding of their training and optimization properties . For instance , it is known that the optimization landscape of these models is highly nonconvex , preventing the use of most theoretical tools from classical optimization theory . For this reason , the unprecedented success of neural networks in artificial intelligence stands in contrast with the poor understanding of these methods from a theoretical perspective . Indeed , even in the supervised setting , which can be viewed as a special case of reinforcement learning , deep neural networks are still far from being understood despite having been an important and fashionable research focus in recent years . Only recently , a theory of neural network learning has started to emerge , including recent works on mean-field point of view of training dynamics ( Mei et al. , 2018 ; Rotskoff & Vanden-Eijnden , 2018 ; Rotskoff et al. , 2019 ; Wei et al. , 2018 ; Chizat & Bach , 2018 ) and on linearized dynamics in the over-parametrized regime ( Jacot et al. , 2018 ; Allen-Zhu et al. , 2018 ; Du et al. , 2018 ; 2019 ; Zou et al. , 2018 ; Allen-Zhu et al. , 2019 ; Chizat et al. , 2019 ; Oymak & Soltanolkotabi , 2020 ; Ghorbani et al. , 2019 ; Lee et al. , 2019 ) . More specifically to the context of reinforcement learning , some works focusing on value-based learning ( Agazzi & Lu , 2019 ; Cai et al. , 2019 ; Zhang et al. , 2020 ) , and others exploring the dynamics of policy gradient algorithms ( Zhang et al. , 2019 ) have recently appeared . Despite this progress , the theoretical understanding of deep reinforcement learning still poses a significant challenge to the theoretical machine learning community , and it is of crucial importance to understand the convergence and optimization properties of such algorithms to bridge the gap between theory and practice . CONTRIBUTIONS .. The main goal of this work is to investigate entropy-regularized policy gradient dynamics for wide , single hidden layer neural networks . In particular , we give the following contributions : • We give a mean-field formulation of policy gradient dynamics in parameter space , describing the evolution of neural network parameters in the form of a transport partial differential equation ( PDE ) . We prove convergence of the particle dynamics to their mean-field counterpart . We further explore the structure of this problem by showing that such PDE is a gradient flow in the Wasserstein space for the appropriate energy functional . • We investigate the convergence properties of the above dynamics in the space of measures . In particular , we prove that under some mild assumptions on the initialization of the neural network parameters and on the approximating power of the nonlinearity , all fixed points of the dynamics are global optima , i.e. , the approximate policy learned by the neural network is optimal , RELATED WORKS .. Recent progress in the understanding of the parametric dynamics of simple neural networks trained with gradient descent in the supervised setting has been made in ( Mei et al. , 2018 ; Rotskoff & Vanden-Eijnden , 2018 ; Wei et al. , 2018 ; Chizat , 2019 ; Chizat & Bach , 2020 ) . These results have further been extended to the multilayer setting in ( Nguyen & Pham , 2020 ) . In particular , the paper ( Chizat & Bach , 2018 ) proves optimality of fixed points for wide single layer neural networks leveraging a Wasserstein gradient flow structure and the strong convexity of the loss functional WRT the predictor . We extend these results to the reinforcement learning framework , where the convexity that is heavily leveraged in ( Chizat & Bach , 2018 ) is lost . We bypass this issue by requiring a sufficient expressivity of the used nonlinear representation , allowing to characterize global minimizer as optimal approximators . The convergence and optimality of policy gradient algorithms ( including in the entropy-regularized setting ) is investigated in the recent papers ( Bhandari & Russo , 2019 ; Mei et al. , 2020 ; Cen et al. , 2020 ; Agarwal et al. , 2019 ) . These references establish convergence estimates through gradient domination bounds . In ( Mei et al. , 2020 ; Cen et al. , 2020 ) such results are limited to the tabular case , while ( Agarwal et al. , 2019 ; 2020 ) also discuss neural softmax policy classes , but under a different algorithmic update and assuming certain well-conditioning assumptions along training . Furthermore , all these results heavily leverage the finiteness of action space . In contrast , this paper focuses on the continuous space and action setting with nonlinear function approximation . Further recent works discussing convergence properties of reinforcement learning algorithms with function approximation via neural networks include ( Zhang et al. , 2019 ; Cai et al. , 2019 ) . These results only hold for finite action spaces , and are obtained in the regime where the network behaves essentially like a linear model ( known as the neural or lazy training regime ) , in contrast to the results of this paper , which considers training in a nonlinear regime . We also note the work ( Wang et al. , 2019 ) where the action space is continuous but the training is again in an approximately linear regime . 2 MARKOV DECISION PROCESSES AND POLICY GRADIENTS . We denote a Markov Decision Process ( MDP ) by the 5-tuple ( S , A , P , r , γ ) , where S is the state space , A is the action space , P = P ( s , a , s′ ) s , s′∈S , a∈A a Markov transition kernel , r ( s , a , s′ ) s , s′∈S , a∈A is the realvalued , bounded and continuous immediate reward function and γ ∈ ( 0 , 1 ) is a discount factor . We will consider a probabilistic policy , mapping a state to a probability distribution on the action space , so that π : S → M1+ ( A ) , where M1+ ( A ) denotes the space of probability measures on A , and denote for any s ∈ S the corresponding density π ( s , · ) : A → R+ . The policy defines a state-to-state transition operator Pπ ( s , ds ′ ) = ∫ A P ( s , a , ds ′ ) π ( s , da ) , and we assume that Pπ is Lipschitz continuous as an operator M1+ ( S ) → M1+ ( S ) wrt the policy . We further encourage exploration by defining some ( relative ) entropy-regularized rewards ( Williams & Peng , 1991 ) Rτ ( s , a , s ′ ) = r ( s , a , s′ ) − τDKL ( π ( s , · ) ; π̄ ( · ) ) , where DKL denotes the relative entropy , π̄ is a reference measure and τ indicates the strength of regularization . Throughout , we choose π̄ to be the Lebesgue measure on A , which we assume , like S , to be a compact subset of the Euclidean space . This regularization encourages exploration and absolute continuity of the policy WRT Lebesgue measure . Consequently , with some abuse of notation , we use throughout the same notation for a distribution and its density in phase space . Note that the original , unregularized MDP can be recovered in the limit τ → 0 . In this context , given a policy π the associated value function Vπ : S → R maps each state to the infinite-horizon expected discounted reward obtained by following the policy π and the Markov process defined by P : Vπ ( s ) = Eπ [ ∞∑ t=0 γtRτ ( st , at , st+1 ) ∣∣∣s0 = s ] ( 1 ) = Eπ [ ∞∑ t=0 γt ( r ( st , at , st+1 ) − τDKL ( π ( st , · ) ; π̄ ( · ) ) ) ∣∣∣s0 = s ] , where Eπ [ · |s0 = s ] denotes the expectation of the stochastic process st starting at s0 = s and following the ( stochastic ) dynamics defined recursively by the transition operator Pπ ( s , ds′ ) = ∫ P ( s , a , ds′ ) π ( s , da ) . Correspondingly , we define the Q-function Qπ : S ×A → R as Qπ ( s , a ) = Eπ [ r ( s0 , a0 , s1 ) + ∞∑ t=1 γtRτ ( st , at , st+1 ) ∣∣∣s0 = s , a0 = a ] = r̄ ( s , a ) + γEπ [ Vπ ( s1 ) ∣∣∣s0 = s , a0 = a ] , ( 2 ) where r̄ ( s , a ) = E [ r ( s , a , s′ ) ] is the average reward from ( s , a ) . Conversely , from the definition , we have the identity for Vπ ( s ) = Eπ [ Qπ ( s0 , a0 ) |s0 = s ] − τDKL ( π ( s , · ) ; π̄ ( · ) ) . We are interested in learning the optimal policy π∗ of a given MDP ( S , A , P , r , γ ) , which satisfies for all s ∈ S Vπ∗ ( s ) = max π : S→M1+ ( A ) Vπ ( s ) . ( 3 ) More specifically we would like to estimate this function through a family of approximators πw : S →M1+ ( A ) parametrized by a vector w ∈ W : = Rp . Note that since we consider entropy-regularized rewards , the optimal policy will be a probabilistic policy ( given as a Boltzmann distribution ) instead of a deterministic one . A popular algorithm to solve this problem is given by policy gradient algorithm ( Sutton & Barto , 2018 ) . Starting from an initial condition w ( 0 ) ∈ W , this algorithm updates the parameters w of the predictor in the direction of steepest ascent of the average reward w ( t+ 1 ) : = w ( t ) + βt∇wẼs∼ % 0Vπ ( s ) , ( 4 ) for a fixed absolutely continuous initial distribution of initial states % 0 ∈ M1+ ( S ) and sequence of time steps { βt } t. Here Ẽ [ · ] denotes an approximation of the expected value operator . This work investigates the regime of asymptotically small constant step-sizes βt → 0 . In this adiabatic limit , the stochastic component of the dynamics is averaged before the parameters of the model can change significantly . This allows to consider the parametric update as a deterministic dynamical system emerging from the averaging of the underlying stochastic algorithm corresponding to the limit of infinite sample sizes . This is known as the ODE method ( Borkar , 2009 ) for analyzing stochastic approximation . We focus on the analysis of this deterministic system to highlight the core dynamical properties of policy gradients with nonlinear function approximation . The averaged , deterministic dynamics is given by the set of ODEs d dt w ( t ) = Es∼ % 0 [ ∇wVπ ( s ) ] = Es∼ % π , a∼πw [ ∇w log πw ( s , a ) ( Qπ ( s , a ) − τ log ( πw ( s , a ) ) ) ] , ( 5 ) where in the second equality we have applied the policy gradient theorem ( Sutton et al. , 2000 ; Sutton & Barto , 2018 ) , defining for a fixed % 0 ∈M1+ ( S ) % π ( s0 , s ) : = ∞∑ t=0 γtP tπ ( s0 , s ) , % π ( s ) = ∫ S % π ( s0 , s ) % 0 ( ds0 ) , ( 6 ) as the ( improper ) discounted empirical measure . For completeness , we include a derivation of ( 5 ) in Appendix A .
This paper studies the asymptotic convergence properties of (population-level) policy gradient methods with two-layer neural networks, softmax parametrization, and entropic regularization, in the mean-field regime. By modelling the hidden layer as a probability distribution over the parameter space, the training dynamics of policy gradient methods can be written as a partial differential equation. Under certain regularity conditions, the paper shows that if the training dynamics converge to a stationary point, this limiting point is a globally optimal policy. The paper also presents results for finite-time convergence of the training dynamics for neural networks to the mean-field limit.
SP:18121c6a208ea58c09b24e3af951a17b9ed3cbc3
Learning to Solve Multi-Robot Task Allocation with a Covariant-Attention based Neural Architecture
1 INTRODUCTION . In multi-robot task allocation ( MRTA ) problems , we study how to coordinate tasks among a team of cooperative robotic systems such that the decisions are free of conflict and optimize a quantity of interest ( Gerkey & Matarić , 2004 ) . The potential real-world applications of MRTA are immense , considering that multi-robotics is one of the most important emerging directions of robotics research and development , and task allocation is fundamental to most multi-robotic or swarm-robotic operations . Example applications include disaster response ( Ghassemi & Chowdhury , 2018 ) , last-mile delivery ( Aurambout et al. , 2019 ) , environment monitoring ( Espina et al. , 2011 ) , reconnaissance ( Olson et al. , 2012 ) and combat Behjat et al . ( 2021 ) . Although various approaches ( e.g. , graph-based methods ( Ghassemi et al. , 2019 ) , integer-linear programming ( ILP ) approaches ( Nallusamy et al. , 2009 ; Toth & Vigo , 2014 ) , and auction-based methods ( Dias et al. , 2006 ; Schneider et al. , 2015 ) ) have been proposed to solve the combinatorial optimization problem underlying MRTA operations , they usually do not scale well with number of robots and/or tasks , and do not readily adapt to complex problem characteristics without tedious hand-crafting of the underlying heuristics . In the recent years , a rich body of work has emerged on using learning-based techniques to model solutions or intelligent heuristics for combinatorial optimization ( CO ) problems over graphs . The existing methods are mostly limited to classical CO problems , such as multi-traveling salesman ( mTSP ) , vehicle routing ( VRP ) , and max-cut type of problems . We specifically focus on a class of MRTA problems that falls into the Single-task Robots , and Single-robot Tasks ( SR-ST ) class defined in ( Gerkey & Matarić , 2004 ; Nunes et al. , 2017 ) . Based on iTax taxonomoy as defined in Gerkey & Matarić ( 2004 ) , these problems fall into the In-schedule Dependencies ( ID ) category . Here , a feasible and conflict-free task allocation is defined as assigning any task to only one robot ( Ghassemi et al. , 2019 ) . For solving these problems , we propose a new covariant attention-based model ( aka CAM ) , a neural architecture for learning over graphs to construct the MRTA policies . This architecture builds upon the attention mechanism concept and innovatively integrates an equivariant embedding of the graph to capture graph structure while remaining agnostic to node ordering . We implement CAM on an original MRTA problem , a suite of benchmark MRTA problems and benchmark VRP problems to perform generalizability , scalability and comparative analyses of the new method . We also perform an analysis on the impact of the neighborhood size on the performance on the benchmark MRTA problem . 1.1 MULTI-ROBOT TASK ALLOCATION . In recent years , learning approaches based on Graph Neural Networks or GNN are being increasingly used to solve planning problems with a CO formulation , e.g. , TSP , VRP , Max-Cut , Min-Vertex , and MRTA Kool et al . ( 2019 ) ; Barrett et al . ( 2019 ) ; Khalil et al . ( 2017 ) ; Kaempfer & Wolf ( 2018 ) ; Mittal et al . ( 2019 ) ; Li et al . ( 2018 ) ; Nowak et al . ( 2017 ) ; Wang & Gombolay ( 2020 ) ; Tolstaya et al . ( 2020 ) ; Sykora et al . ( 2020 ) ; Dai et al . ( 2017 ) . Further details on these related learning-based studies can be found in Appendix A . Some of the conventional ILP , MILP , and INLP based methods for MRTA have been discussed in Appendix D.1 . GNNs provide the advantage of being able to capture both Euclidean features ( e.g. , task location ) , as well as non-Euclidean features such as task capacity , task deadline and the local structure of task neighborhoods . The latter serves as higher-level meaningful features that assist in generalized decision-making These existing studies are however limited in three key aspects : 1 ) They address simplified problems that often exclude common real-world factors such as resource and capacity constraints Kool et al . ( 2019 ) ; Kaempfer & Wolf ( 2018 ) ; Khalil et al . ( 2017 ) ; Tolstaya et al . ( 2020 ) ) . 2 ) They are mostly focused on smaller sized problems ( ≤ 100 tasks and 10 robots ) Paleja et al . ( 2020 ) ; Strens & Windelinckx ( 2005 ) ; Wang & Gombolay ( 2020 ) ; Sykora et al . ( 2020 ) , with their scalability remaining unclear . 3 ) They rarely provide evidence of generalizing to problem scenarios that are larger in size than those used for training . This capability would be particularly critical since real-world MRTA problems often involve simulating episodes whose costs scale with the number of tasks and robots , making re-training efforts burdensome . To address these gaps , here we propose a new learning framework that can solve large-sized MRTA problems ( SR-ST ) with commonly considered constraints – involving up to 1000+ tasks and 200+ robots – and generalize across even larger problem scenarios without the need to re-train . For most practical scenarios with larger number of locations , a highly optimal solution is not always desired , while a good feasible solution is the priority as pointed out by Cappart et al . ( 2021 ) . Therefore , to enable scalable policies , we design a novel encoder based on the concept of Covariant Compositional Networks ( CCN ) Hy et al . ( 2018 ) , which is hypothesized to effectively combine local structural information with permutation invariance . The encoder is followed by a decoder based on a Multi-head Attention mechanism Kool et al . ( 2019 ) ; Vaswani et al . ( 2017 ) which fuses the encoded information and problem/mission-specific information ( Context ) using simple matrix multiplication , in order to enable decentralized sequential decision-making . 1.2 CONTRIBUTIONS OF THIS PAPER . The primary contributions of this paper can thus be stated as follows : 1 ) We formulate the general SR-ST class of MRTA problems as a Markov Decision Process or MDP over graphs with the multirobot state information embedded as the context portion of the policy model , such that the ( task allocation ) policy can be learned using an RL approach . 2 ) We design the GNN that acts as the policy network as an encoder-decoder architecture , where the encoder is innovatively based on covariant compositional networks ( CCN ) , whose embedding capabilities significantly improve generalizability and scalability to larger task graphs and multi-robot teams . 3 ) We implement an attention based decoder ( inspired by Kool et al . ( 2019 ) ) to enable sequential decision-making , and specifically extend it to a multi-agent combinatorial optimization setting . The proposed CAM architecture is evaluated on a representative MRTA problem that involves coordinating a team of unmanned aerial vehicles ( UAVs ) to time-efficiently deliver flood relief . The results of this case study demonstrate how CAM clearly outperforms the state-of-the-art attention based method AM ( Kool et al. , 2019 ) , in terms of scalabilty and convergence , thereby emphasizing the effectiveness of the new encoder . Further case studies show that CAM continues to compare favorably to AM over benchmark MRTA problems ( with time and capacity constraints ) and CVRP problems . Comparisons to non-learning baselines for these benchmark problems demonstrate the significant online computation advantages of learnt policies , with the latter being 10-100 times faster . The remainder of the paper is organized as follows : Section 2 defines the MRTA problem and its formulation as an MDP over graphs . Section 3 presents our proposed new GNN architecture . Section 4 describes simulation settings and different case studies . Results are discussed in Section 5 . 2 MRTA : PROBLEM DEFINITION AND FORMULATIONS . The multi-robot task allocation ( MRTA ) problem is defined as the allocation of tasks and resources among several robots that act together without conflict in the same environment to accomplish a common mission . The optimum solution ( decision ) of the MRTA problem is a sequence of tasks for each robot ( conflict-free allocation ) that maximizes the mission outcome ( e.g. , fraction of tasks completed ) or minimize the mission cost ( e.g. , total distance travelled ) subject to the robots ’ range constraints . Here , the following assumptions are made : 1 ) All robots are identical and start/end at the same depot ; 2 ) There are no environmental uncertainties ; 3 ) The location ( xi , yi ) of task-i and its time deadline τi are known to all robots ; 4 ) Each robot can share its state and its world view with other robots ; and 5 ) There is a depot ( Task-0 ) , where each robot starts from and visits if no other tasks are feasible to be undertaken due to the lack of available range . Each tour is defined as departing from the depot , undertaking at least one task , and returning to the depot . 6 ) Motivated by the multi-UAV relief delivery problem , tasks are considered to be instantaneous , which means that reaching the waypoint associated with a task completes that task . This MRTA problem is a class of combinatorial optimization problems , which can be modeled in graph space . In order to learn policies that yield solutions to this CO problem , we express the MRTA problem as a Markov Decision Process ( MDP ) over a graph , described next . The optimization formulation of MRTA is then given in Section 2.2 . 2.1 MDP OVER A GRAPH . The MRTA problem involves a set of nodes/vertices ( V ) and a set of edges ( E ) that connect the vertices to each other , which can be represented as a complete graph G = ( V , E ) . Each node represents a task , and each edge connects a pair of nodes . Let Ω be a weight matrix where the weight of the edge ( ωij ∈ Ω ) represents the cost ( e.g. , distance ) incurred by a robot to take task-j after achieving task-i . For MRTA with N tasks , the number of vertices and the number of edges are N and N ( N − 1 ) /2 , respectively . Node i is assigned a 3-dimensional feature vector denoting the task location and time deadline , i.e. , di = [ xi , yi , τi ] where i ∈ [ 1 , N ] . Here , ωij can be computed as ωij = √ ( xi − xj ) 2 + ( yi − yj ) 2 , where i , j ∈ [ 1 , N ] . The MDP defined in a decentralized manner for each individual robot ( to capture its task selection process ) can be expressed as a tuple < S , A , Pa , R > . The components of the MDP can be defined as : State Space ( S ) : A robot at its decision-making instance uses a state s ∈ S , which contains the following information : 1 ) the current mission time , 2 ) its current location , 3 ) its remaining ferry-range ( battery state ) , 4 ) the planned ( allocated ) tasks of its peers , 5 ) the remaining ferry-range of its peers , and 6 ) the states of tasks . The states of tasks contain the location , the time deadline , and the task status – active , completed , and missed ( i.e. , deadline is passed ) . Here we assume that each robot can broadcast its information to its peers without the need for a centralized system for communication , as aligned with modern communication capabilities Sykora et al . ( 2020 ) . Action Space ( A ) : The set of actions is represented as A , where each action a is defined as the index of the selected task , { 0 , . . . , N } with the index of the depot as 0 . The task 0 ( the depot ) can be selected by multiple robots , but the other tasks are allowed to be chosen once if they are active ( not completed or missed tasks ) . Pa ( s′|s , a ) : A robot by taking action a at state s reaches the next state s′ in a deterministic manner ( i.e. , deterministic transition model is defined ) . Reward ( R ) : The reward function is defined as −fcost , and is calculated when there is no more active tasks ( all tasks has been visited once irrespective of it being completed or missed ) . Transition : The transition is an event-based trigger . An event is defined as the condition that a robot reaches its selected task or visits the depot location .
This paper presents an interesting idea of using neural-network-based RL to solve a type of vehicle routing problems, where the vehicles are tasked with visiting spatial locations to deliver items, and are subject to load capacity and delivery time constraints. In order to solve this problem, the authors propose an encoder-decoder architecture to decide for each robot, where to move next. The encoder is inspired from the Covariance Compositional Networks and the decoder utilizes an attention module, and the network is trained via REINFORCE. The results show that the proposed method outperforms the baseline in unseen test cases, in terms of task completion rate and the specified cost function.
SP:fbcb2bbd4ca1133e8ae2178e02d3a7393ec4e05d
A Simple and General Graph Neural Network with Stochastic Message Passing
Graph neural networks ( GNNs ) are emerging machine learning models on graphs.1 One key property behind the expressiveness of existing GNNs is that the learned2 node representations are permutation-equivariant . Though being a desirable prop-3 erty for certain tasks , however , permutation-equivariance prevents GNNs from4 being proximity-aware , i.e. , preserving the walk-based proximities between pairs5 of nodes , which is another critical property for graph analytical tasks . On6 the other hand , some variants of GNNs are proposed to preserve node prox-7 imities , but they fail to maintain permutation-equivariance . How to empower8 GNNs to be proximity-aware while maintaining permutation-equivariance re-9 mains an open problem . In this paper , we propose Stochastic Message Passing10 ( SMP ) , a general and simple GNN to maintain both proximity-awareness and11 permutation-equivariance properties . Specifically , we augment the existing GNNs12 with stochastic node representations learned to preserve node proximities . Though13 seemingly simple , we prove that such a mechanism can enable GNNs to preserve14 node proximities in theory while maintaining permutation-equivariance with cer-15 tain parametrization . Extensive experimental results demonstrate the effectiveness16 and efficiency of SMP for tasks including node classification and link prediction.17 1 INTRODUCTION18 Graph neural networks ( GNNs ) , as generalizations of neural networks in analyzing graphs , have19 attracted considerable research attention . GNNs have been widely applied to various applications20 such as social recommendation ( Ma et al. , 2019 ) , physical simulation ( Kipf et al. , 2018 ) , and protein21 interaction prediction ( Zitnik & Leskovec , 2017 ) .22 One key property of most existing GNNs is permutation-equivariance , i.e. , if we randomly permu-23 tate the IDs of nodes while maintaining the graph structure , the representations of nodes in GNNs24 are permutated accordingly . Mathematically , permutation-equivariance reflects one basic symmet-25 ric group of graph structures . Although it is a desirable property for tasks such as node or graph26 classification ( Keriven & Peyré , 2019 ; Maron et al. , 2019b ) , permutation-equivariance also prevents27 GNNs from being proximity-aware , i.e. , permutation-equivariant GNNs can not preserve walk-based28 proximities between nodes such as the shortest distance or high-order proximities ( see Theorem 1 ) .29 Pairwise proximities between nodes are crucial for graph analytical tasks such as link predic-30 tion ( Hu et al. , 2020 ; You et al. , 2019 ) . To enable a proximity-aware GNN , Position-aware GNN31 ( P-GNN ) ( You et al. , 2019 ) 1 proposes a sophisticated GNN architecture and shows better perfor-32 mance for proximity-aware tasks . But P-GNN needs to explicitly calculate the shortest distance be-33 tween nodes and its computational complexity is unaffordable for large graphs . Moreover , P-GNN34 completely ignores the permutation-equivariance property . Therefore , it can not produce satisfactory35 results when permutation-equivariance is helpful.36 In real-world scenarios , both proximity-awareness and permutation-equivariance are indispensable37 properties for GNNs . Firstly , different tasks may require different properties . For example , recom-38 mendation applications usually require the model to be proximity-aware ( Konstas et al. , 2009 ) while39 permutation-equivariance is a basic assumption in centrality measurements ( Borgatti , 2005 ) . Even40 1In ( You et al. , 2019 ) , the authors consider the special case of shortest distance between nodes and name such property as “ position-aware ” . In this paper , we consider a more general case of any walk-based proximity . for the same task , different datasets may have different requirements on these two properties . Taking41 link prediction as an example , we observe that permutation-equivariant GNNs such as GCN ( Kipf & 42 Welling , 2017 ) or GAT ( Velickovic et al. , 2018 ) show better results than P-GNN in coauthor graphs,43 but the opposite in biological graphs ( please see Section 5.2 for details ) . Unfortunately , in the current44 GNN frameworks , these two properties are contradicting , as we show in Theorem 1 . Whether there45 exists a general GNN to be proximity-aware while maintaining permutation-equivariance remains46 an open problem.47 In this paper , we propose Stochastic Message Passing ( SMP ) , a general and simple GNN to pre-48 serve both proximity-awareness and permutation-equivariance properties . Specifically , we augment49 the existing GNNs with stochastic node representations learned to preserve proximities . Though50 seemingly simple , we prove that our proposed SMP can enable GNNs to preserve walk-based prox-51 imities in theory ( see Theorem 2 and Theorem 3 ) . Meanwhile , SMP is equivalent to a permutation-52 equivariant GNN with certain parametrization and thus is at least as powerful as those GNNs in53 permutation-equivariant tasks ( see Remark 1 ) . Therefore , SMP is general and flexible in handling54 both proximity-aware and permutation-equivariant tasks , which is also demonstrated by our exten-55 sive experimental results . Besides , owing to the simple structure , SMP is computationally efficient,56 with a running time roughly the same as those of the most simple GNNs such as SGC ( Wu et al.,57 2019 ) and is at least an order of magnitude faster than P-GNN on large graphs . Ablation studies58 further show that a linear instantiation of SMP is expressive enough as adding extra non-linearities59 does not lift the performance of SMP on the majority of datasets . Our contributions are as follows.60 • We propose SMP , a simple and general GNN to handle both proximity-aware and permutation-61 equivariant graph analytical tasks.62 • We prove that SMP has theoretical guarantees in preserving walk-based proximities and is at63 least as powerful as the existing GNNs in permutation-equivariant tasks.64 • Extensive experimental results demonstrate the effectiveness and efficiency of SMP . We show65 that a linear instantiation of SMP is expressive enough on the majority of datasets.66 2 RELATED WORK67 We briefly review GNNs and their permutation-equivariance and proximity-awareness property.68 The earliest GNNs adopt a recursive definition of node states ( Scarselli et al. , 2008 ; Gori et al.,69 2005 ) or a contextual realization ( Micheli , 2009 ) . GGS-NNs ( Li et al. , 2016 ) replace the recursive70 definition with recurrent neural networks ( RNNs ) . Spectral GCNs ( Bruna et al. , 2014 ) defined graph71 convolutions using graph signal processing ( Shuman et al. , 2013 ; Ortega et al. , 2018 ) with Cheb-72 Net ( Defferrard et al. , 2016 ) and GCN ( Kipf & Welling , 2017 ) approximating the spectral filters us-73 ing a K-order Chebyshev polynomial and the first-order polynomial , respectively . MPNNs ( Gilmer74 et al. , 2017 ) , GraphSAGE ( Hamilton et al. , 2017 ) , and MoNet ( Monti et al. , 2017 ) are proposed75 as general frameworks by characterizing GNNs with a message-passing function and an updating76 function . More advanced variants such as GAT ( Velickovic et al. , 2018 ) , JK-Nets ( Xu et al. , 2018b ) ,77 GIN ( Xu et al. , 2018a ) , and GraphNets ( Battaglia et al. , 2018 ) follow these frameworks.78 Li et al . ( Li et al. , 2018 ) , Xu et al . ( Xu et al. , 2018a ) , Morris et al . ( Morris et al. , 2019 ) , and79 Maron et al . ( Maron et al. , 2019a ) show the connection between GNNs and the Weisfeiler-Lehman80 algorithm ( Shervashidze et al. , 2011 ) of graph isomorphism tests , in which permutation-equivariance81 holds a key constraint . Maron et al . ( Maron et al. , 2019b ) and Keriven et al . ( Keriven & Peyré , 2019 ) 82 analyze the permutation-equivariance property of GNNs more theoretically . To date , most of the83 existing GNNs are permutation-equivariant and thus are not proximity-aware . The only exception84 is P-GNN ( You et al. , 2019 ) , which proposes to capture the positions of nodes using the relative85 distance between the target node and some randomly chosen anchor nodes . However , P-GNN cannot86 satisfy permutation-equivariance and is computationally expensive.87 Very recently , motivated by enhancing the expressive power of GNNs in graph isomorphism tests88 and distributed computing literature ( Angluin , 1980 ; Linial , 1992 ; Naor & Stockmeyer , 1995 ) ,89 some studies suggest assigning unique node identifiers for GNNs ( Loukas , 2020 ) such as one-hot90 IDs ( Murphy et al. , 2019 ) or random numbers ( Dasoulas et al. , 2019 ; Sato et al. , 2020 ; Corso et al.,91 2020 ) . For example , Sato et al . ( Sato et al. , 2020 ) novelly show that random numbers can enhance92 GNNs in tackling two important graph-based NP problems with a theoretical guarantee , namely the93 minimum dominating set and the maximum matching problem , and Fey et al . ( Fey et al. , 2020 ) em-94 pirically show the effectiveness of random features in the graph matching problem . Our work differs95 in that we systematically study how to preserve permutation-equivariance and proximity-awareness96 simultaneously in a simple yet effective framework , which is a new topic different from these ex-97 isting works . Besides , we theoretically prove that our proposed method can preserve walk-based98 proximities by using the random projection literature . We also demonstrate the effectiveness of our99 method on various large-scale benchmarks for both node- and edge-level tasks , while no similar100 results are reported in the literature.101 The design of our method is also inspired by the random projection literature in dimensionality re-102 duction ( Vempala , 2005 ) and to the best of our knowledge , we are the first to study random projection103 in the scope of GNNs . More remotely , our definition of node proximities is inspired and inherited104 from graph kernels ( Gärtner et al. , 2003 ; Borgwardt & Kriegel , 2005 ) , network embedding ( Perozzi105 et al. , 2014 ; Grover & Leskovec , 2016 ) , and general studies of graphs ( Newman , 2018 ) .106 3 MESSAGE-PASSING GNNS107 We consider a graphG = ( V , E , F ) where V = { v1 , ... , vN } is the set ofN = |V| nodes , E ⊆ V×V108 is the set of M = |E| edges , and F ∈ RN×d0 is a matrix of d0 node features . The adjacency matrix109 is denoted as A , where its ith row , jth column and an element denoted as Ai , : , A : ,j , and Ai , j ,110 respectively . In this paper , we assume the graph is unweighted and undirected . The neighborhood111 of node vi is denoted as Ni and Ñi = Ni ∪ { vi } .112 The existing GNNs usually follow a message-passing framework ( Gilmer et al. , 2017 ) , where the lth113 layer adopts a neighborhood aggregation function AGG ( · ) and an updating function UPDATE ( · ) :114 m ( l ) i = AGG ( { h ( l ) j , ∀j ∈ Ñi } ) , h ( l+1 ) i = UPDATE ( [ h ( l ) i , m ( l ) i ] ) , ( 1 ) where h ( l ) i ∈ Rdl is the representation of node vi in the lth layer , dl is the dimensionality , and m ( l ) i115 are the messages . We also denote H ( l ) = [ h ( l ) 1 , ... , h ( l ) N ] and [ · , · ] is the concatenation operation . The116 node representations are initialized as node features , i.e. , H ( 0 ) = F. We denote a GNN following117 Eq . ( 1 ) with L layers as a parameterized function as follows2:118 H ( L ) = FGNN ( A , F ; W ) , ( 2 ) where H ( L ) are final node representations learned by the GNN and W denotes all the parameters.119 One key property of the existing GNNs is permutation-equivariance.120 Definition 1 ( Permutation-equivariance ) . Consider a graph G = ( V , E , F ) and any permutation121 P : V → V so that G′ = ( V , E ′ , F′ ) has an adjacency matrix A′ = PAPT and a feature matrix122 F′ = PF , where P ∈ { 0 , 1 } N×N is the permutation matrix corresponding to P , i.e. , Pi , j = 1 iff123 P ( vi ) = vj . A GNN satisfies permutation-equivariance if the node representations are equivariant124 with respect to P , i.e.,125 PFGNN ( A , F ; W ) = FGNN ( PAPT , PF ; W ) . ( 3 ) It is known that GNNs following Eq . ( 1 ) are permutation-equivariant ( Maron et al. , 2019b ) .126 Definition 2 ( Automorphism ) . A graph G is said to have ( non-trivial ) automorphism if there exists127 a non-identity permutation matrix P 6= IN so that A = PAPT and F = PF . We denote the128 corresponding automorphic node pairs as CG = ⋃ P6=IN { ( i , j ) |Pi , j 6= 0 , i 6= j } 129 Corollary 1 . Using Definition 1 and 2 , if a graph has automorphism , a permutation-equivariant130 GNN will produce identical node representations for automorphic node pairs:131 h ( L ) i = h ( L ) j , ∀ ( i , j ) ∈ CG . ( 4 ) Since the node representations are used for downstream tasks , the corollary shows that permutation-132 equivariant GNNs can not differentiate automorphic node pairs . A direct consequence of Corol-133 lary 1 is that permutation-equivariant GNNs can not preserve walk-based proximities between pairs134 of nodes . The formal definitions are as follows.135 2Since the final layer of GNNs is task-specific , e.g. , a softmax layer for node classification or a readout layer for graph classification , we only consider the GNN architecture to its last hidden layer . Definition 3 ( Walk-based Proximities ) . For a given graph G = ( V , E , F ) , we use a matrix S ∈136 RN×N to denote walk-based proximities between pairs of nodes defined as:137 Si , j = S ( { vi vj } ) , ( 5 ) where vi vj denotes walks from node vi to vj and S ( · ) is an arbitrary real-valued function . The138 length of a walk-based proximity is the maximum length of all the walks of the proximity.139 Typical examples of walk-based proximities include the shortest distance ( You et al. , 2019 ) , the high-140 order proximities ( a sum of walks weighted by their lengths ) ( Zhang et al. , 2018 ) , and random walk141 probabilities ( Klicpera et al. , 2019 ) . Next , we give a definition of preserving walk-based proximities.142 Definition 4 . For a given walk-based proximity , a GNN is said to be able to preserve the proximity143 if there exists a decoder function Fde ( · ) satisfying that for any graph G = ( V , E , F ) , there exist144 parameters WG so that ∀ > 0:145 ∣∣∣Si , j −Fde ( H ( L ) i , : , H ( L ) j , : ) ∣∣∣ < , ( 6 ) where146 H ( L ) = FGNN ( A , F ; WG ) . ( 7 ) Note that we do not constrain the GNN architecture as long as it follows Eq . ( 1 ) , and the decoder147 function is also arbitrary ( but notice that it can not take the graph structure as inputs ) . In fact , both148 the GNN and the decoder function can be arbitrarily deep and with sufficient hidden units.149 Theorem 1 . The existing permutation-equivariant GNNs can not preserve any walk-based proximity150 except the trivial solution that all node pairs have the same proximity.3151 The formulation and proof of the theorem are given in Appendix A.1 . Since walk-based proximities152 are rather general and widely adopted in graph analytical tasks such as link prediction , the theorem153 shows that the existing permutation-equivariant GNNs can not handle these tasks well.154 4 THE MODEL155 4.1 A GNN FRAMEWORK USING STOCHASTIC MESSAGE PASSING156 A major shortcoming of permutation-equivariant GNNs is that they can not differentiate automorphic157 node pairs . To solve that problem , we need to introduce some mechanism as “ symmetry breaking ” ,158 i.e. , to enable GNNs to distinguish these nodes . To achieve this goal , we sample a stochastic matrix159 E ∈ RN×d where each element follows an i.i.d . normal distribution N ( 0 , 1 ) . The stochastic matrix160 can provide signals in distinguishing the nodes because they are randomly sampled without being161 affected by the graph automorphism . In fact , we can easily calculate that the Euclidean distance162 between two stochastic signals divided by a constant √ 2 follows a chi distribution χd:163 1√ 2 |Ei , : −Ej , :| ∼ χd , ∀i , j . ( 8 ) When d is reasonably large , e.g. , d > 20 , the probability of two signals being close is very low.164 Then , inspired by the message-passing framework , we apply a GNN on the stochastic matrix so that165 nodes can exchange information of the stochastic signals:166 Ẽ = FGNN ( A , E ; W ) . ( 9 ) We call Ẽ the stochastic representation of nodes . Using the stochastic matrix and message-passing,167 Ẽ can be used to preserve node proximities ( see Theorem 2 and Theorem 3 ) . Then , to let our model168 still be able to utilize node features , we concatenate Ẽ with the node representations from another169 GNN with node features as inputs:170 H = Foutput ( [ Ẽ , H ( L ) ] ) Ẽ = FGNN ( A , E ; W ) , H ( L ) = FGNN′ ( A , F ; W′ ) , ( 10 ) 3Proposition 1 in ( You et al. , 2019 ) can be regarded as a special case of Theorem 1 using the shortest distance proximity . where Foutput ( · ) is an aggregation function such as a linear function or simply the identity mapping.171 In a nutshell , our proposed method augments the existing GNNs with a stochastic representation172 learned by message-passings to differentiate different nodes and preserve node proximities.173 There is also a delicate choice worthy mentioning , i.e. , whether the stochastic matrix E is fixed or174 resampled in each epoch . By fixing E , the model can learn to memorize the stochastic representation175 and distinguish different nodes , but with the cost of unable to handle nodes not seen during training.176 On the other hand , by resampling E in each epoch , the model can have a better generalization177 ability since the model can not simply remember one specific stochastic matrix . However , the node178 representations are not fixed ( but pairwise proximities are preserved ; see Theorem 2 ) . In these cases,179 Ẽ is more capable of handling pairwise tasks such as link prediction or pairwise node classification.180 In this paper , we use a fixed E for transductive datasets and resample E for inductive datasets.181 Time Complexity From Eq . ( 10 ) , the time complexity of our framework mainly depends on the182 two GNNs in learning the stochastic and permutation-equivariant node representations . In this paper,183 we instantiate these two GNNs using simple message-passing GNNs such as GCN ( Kipf & Welling,184 2017 ) and SGC ( Wu et al. , 2019 ) ( see Section 4.2 and Section 4.3 ) . Thus , the time complexity of185 our method is the same as these models , which is O ( M ) , i.e. , linear with respect to the number of186 edges . We also empirically compare the running time of different models in Appendix 5.5 . Besides,187 many acceleration schemes for GNNs such as sampling ( Chen et al. , 2018a ; b ; Huang et al. , 2018 ) 188 or partitioning the graph ( Chiang et al. , 2019 ) can be directly applied to our framework.189 4.2 A LINEAR INSTANTIATION190 Based on the general framework shown in Eq . ( 10 ) , we attempt to explore its minimum model191 instantiation , i.e. , a linear model . Specifically , inspired by Simplified Graph Convolution ( SGC ) ( Wu192 et al. , 2019 ) , we adopt a linear message-passing for both GNNs , i.e.,193 H = Foutput ( [ Ẽ , H ( L ) ] ) = Foutput ( [ ÃKE , ÃKF ] ) , ( 11 ) where à = ( D+ I ) − 1 2 ( A+ I ) ( D+ I ) − 1 2 is the normalized graph adjacency matrix with self-loops194 proposed in GCN ( Kipf & Welling , 2017 ) and K is the number of propagation steps . We also set195 Foutput ( · ) in Eq . ( 11 ) as a linear mapping or identity mapping.196 Though seemingly simple , we show that such an SMP instantiation possesses a theoretical guarantee197 in preserving the walk-based proximities.198 Theorem 2 . An SMP in Eq . ( 11 ) with the message-passing matrix à and the number of propagation199 stepsK can preserve the walk-based proximity ÃK ( ÃK ) T with high probability if the dimensional-200 ity of the stochastic matrix d is sufficiently large , where the superscript T denotes matrix transpose.201 The theorem is regardless of whether E are fixed or resampled.202 The mathematical formulation and proof of the theorem are given in Appendix A.2 . In addition , we203 show that SMP is equivalent to a permutation-equivariant GNN with certain parametrization.204 Remark 1 . Suppose we adopt Foutput ( · ) as a linear function with the output dimensionality the205 same as FGNN′ . Then , Eq . ( 10 ) is equivalent to the permutation-equivariant FGNN′ ( A , F ; W′ ) if the206 parameters in Foutput ( · ) are all-zeros for Ẽ and an identity matrix for H ( L ) .207 The result is straightforward from the definition . Then , we have the following corollary.208 Corollary 2 . For any task , Eq . ( 10 ) with the aforementioned linear Foutput ( · ) is at least as powerful209 as the permutation-equivariant FGNN′ ( A , F ; W′ ) , i.e. , the minimum training loss of using H in210 Eq . ( 10 ) is equal to or smaller than using H ( L ) = FGNN′ ( A , F ; W′ ) .211 In other words , SMP will not hinder the performance4 even the tasks are permutation-equivariant212 since the stochastic representations are concatenated with the permutation-equivariant GNNs fol-213 lowed by a linear mapping . In these cases , the linear SMP is equivalent to SGC ( Wu et al. , 2019 ) .214 Combining Theorem 2 and Corollary 2 , the linear SMP instantiation in Eq . ( 11 ) is capable of han-215 dling both proximity-aware and permutation-equivariant tasks.216 4Similar to previous works such as ( Hamilton et al. , 2017 ; Xu et al. , 2018a ) , we only consider the minimum training loss because the optimization landscapes and generalization gaps are difficult to analyze analytically . 4.3 NON-LINEAR EXTENSIONS217 One may question whether a more sophisticated variant of Eq . ( 10 ) can further improve the expres-218 siveness of SMP . There are three adjustable components in Eq . ( 10 ) : two GNNs in propagating the219 stochastic matrix and node features , respectively , and an output function . In theory , adopting non-220 linear models as either component is able to enhance the expressiveness of SMP . Indeed , if we use221 a sufficiently expressive GNN in learning Ẽ instead of linear propagations , we can prove a more222 general version of Theorem 2 as follows.223 Theorem 3 . An SMP variant following Eq . ( 10 ) with FGNN ( A , E ; W ) containing L layers can224 preserve any length-L walk-based proximity if the message-passing and updating functions in the225 GNN are sufficiently expressive . In this theorem , we also assume the Gaussian random vectors E226 are rounded to machine precision so that E is drawn from a countable subspace of R.227 The proof of the theorem is given in Appendix A.3 . Similarly , we can adopt more advanced methods228 for Foutput ( · ) such as gating or attention so that the two GNNs are more properly integrated.229 Although non-linear extensions of SMP can , in theory , increase the model expressiveness , they also230 take a higher risk of over-fitting due to model complexity , not to mention that the computational cost231 will also increase . In practice , we find in ablation studies that the linear SMP instantiation in Eq . ( 11 ) 232 works reasonably well on most of the datasets ( please refer to Section 5.4 for further details ) .233 5 EXPERIMENTS234 5.1 EXPERIMENTAL SETUPS235 Datasets We conduct experiments on the following ten datasets : two simulation datasets , Grid236 and Communities ( You et al. , 2019 ) , a communication dataset Email ( You et al. , 2019 ) , two coau-237 thor networks , CS and Physics ( Shchur et al. , 2018 ) , two protein interaction networks , PPI ( Hamil-238 ton et al. , 2017 ) and PPA ( Hu et al. , 2020 ) , and three GNN benchmarks , Cora , CiteSeer , and239 PubMed ( Yang et al. , 2016 ) . We only report the results of three benchmarks for the node classi-240 fication task and the results for other tasks are shown in Appendix B due to the page limit . More241 details of the datasets including their statistics are provided in Appendix C.1 . These datasets cover242 a wide spectrum of domains , sizes , and with or without node features . Since Email and PPI contain243 more than one graph , we conduct experiments in an inductive setting on these two datasets , i.e. , the244 training , validation , and testing set are split with respect to different graphs.245 Baselines We adopt two sets of baselines . The first set is permutation-equivariant GNNs including246 GCN ( Kipf & Welling , 2017 ) , GAT ( Velickovic et al. , 2018 ) , and SGC ( Wu et al. , 2019 ) , which are247 widely adopted GNN architectures . The second set contains P-GNN ( You et al. , 2019 ) , the only248 proximity-aware GNN to date . We use the P-GNN-F version.249 In comparing with the baselines , we mainly evaluate two variants of SMP with different Foutput ( · ) :250 SMP-Identity , i.e. , Foutput ( · ) as an identity mapping , and SMP-Linear , i.e. , Foutput ( · ) as a linear251 mapping . Note that both variants adopt linear message-passing functions as SGC . We conduct more252 ablation studies with different SMP variants in Section 5.4.253 For fair comparisons , we adopt the same architecture and hyper-parameters for all the methods254 ( please refer to Appendix C.2 for the details ) . For datasets without node features , we adopt a con-255 stant vector as the node features . We experiment on two tasks : link prediction and node classifica-256 tion . Additional experiments on graph reconstruction , pairwise node classification , and running time257 comparison are provided in Appendix B . We repeat the experiments 10 times for datasets except for258 PPA and 3 times for PPA , and report the average results.259 5.2 LINK PREDICTION260 Link prediction aims to predict missing links of a graph . Specifically , we split the edges into 80 % -261 10 % -10 % and use them for training , validation , and testing , respectively . Besides adopting those real262 edges as positive samples , we obtain negative samples by randomly sampling an equal number of263 node pairs that do not have edges . For all the methods , we set a simple classifier : Sigmoid ( HTi Hj ) ,264 i.e. , use the inner product to predict whether a node pair ( vi , vj ) forms a link , and use AUC ( area265 under the curve ) as the evaluation metric . One exception to the aforementioned setting is that on the266 PPA dataset , we follow the splits and evaluation metric ( i.e. , Hits @ 100 ) provided by the dataset ( Hu267 et al. , 2020 ) . The results except PPA are shown in Table 2 . We make the following observations.268 • Our proposed SMP achieves the best results on five out of the six datasets and is highly compet-269 itive ( the second-best result ) on the other ( Physics ) . The results demonstrate the effectiveness of270 our proposed method on link prediction tasks . We attribute the strong performance of SMP to its271 capability of maintaining both proximity-awareness and permutation-equivariance properties.272 • On Grid , Communities , Email , and PPI , both SMP and P-GNN outperform the permutation-273 equivariant GNNs , proving the importance of preserving node proximities . Although SMP is274 simpler and more computationally efficient than P-GNN , SMP reports even better results.275 • When node features are available ( CS , Physics , and PPI ) , SGC can outperform GCN and GAT.276 The results re-validate the experiments in SGC ( Wu et al. , 2019 ) that the non-linearity in GNNs is277 not necessarily indispensable . Some plausible reasons include that the additional model complex-278 ity brought by non-linear operators makes the models tend to overfit and also difficult to train ( see279 Appendix B.6 ) . On those datasets , SMP retains comparable performance on two coauthor graphs280 and shows better performance on PPI , possibly because node features on protein graphs are less281 informative than node features on coauthor graphs for predicting links , and thus preserving graph282 structure is more beneficial on PPI.283 • As Email and PPI are conducted in an inductive setting , i.e. , using different graphs for train-284 ing/validation/testing , the results show that SMP can handle inductive tasks as well.285 Table 1 : The results of link prediction on the PPA dataset . The best result and the second-best result are in bold and underlined , respectively . Model Hits @ 100 SGC 0.1187±0.0012 GCN 0.1867±0.0132 GraphSAGE 0.1655±0.0240 P-GNN Out of Memory Node2vec 0.2226±0.0083 Matrix Factorization 0.3229±0.0094 SMP-Identity 0.2018±0.0148 SMP-Linear 0.3582±0.0070 The results on PPA are shown in Table 1 . SMP286 again outperforms all the baselines , showing that287 it can handle large-scale graphs with millions of288 nodes and edges . PPA is part of a recently re-289 leased Open Graph Benchmark ( Hu et al. , 2020 ) .290 The superior performance on PPA further demon-291 strates the effectiveness of our proposed method292 in the link prediction task.293 5.3 NODE CLASSIFICATION294 Next , we conduct experiments of node classifica-295 tion , i.e. , predicting the labels of nodes . Since296 we need ground-truths in the evaluation , we only297 adopt datasets with node labels . Specifically , for298 CS and Physics , following ( Shchur et al. , 2018 ) , we adopt 20/30 labeled nodes per class for train-299 ing/validation and the rest for testing . For Communities , we adjust the number as 5/5/10 labeled300 nodes per class for training/validation/testing . For Cora , CiteSeer , and PubMed , we use the default301 splits that came with the datasets . We do not adopt Email because some graphs in the dataset are too302 small to show stable results and exclude PPI as it is a multi-label dataset.303 5The results of PGNN are slightly different compared to the paper because we adopt a more practical and common setting that negative samples in the data are not known apriori but randomly sampled in each epoch . We use a softmax layer on the learned node representations as the classifier and adopt accuracy,304 i.e. , how many percentages of nodes are correctly classified , as the evaluation criteria . We omit the305 results of SMP-Identity for this task since the node representations in SMP-Identity have a fixed306 dimensionality that does not match the number of classes.307 The results are shown in Table 3 . From the table , we observe that SMP reports nearly perfect results308 on Communities . Since the node labels are generated by graph structures on Communities and there309 are no node features , the model needs to be proximity-aware to handle it well . P-GNN , which shows310 promising results in the link prediction task , also fails miserably here.311 On the other five graphs , SMP reports highly competitive performance . These graphs are commonly-312 used benchmarks for GNNs . P-GNN , which completely ignores permutation-equivariance , performs313 poorly as expected . In contrast , SMP can manage to recover the permutation-equivariant GNNs314 and avoid being misled , as proven in Remark 1 . In fact , SMP even shows better results than its315 counterpart , SGC , indicating that preserving proximities is also helpful for these datasets.316 5.4 ABLATION STUDIES317 We conduct ablation studies by comparing different SMP variants , including SMP-Identity , SMP-318 Linear , and the additional three variants as follows:319 • SMP-MLP : we set Foutput ( · ) as a fully-connected network with 1 hidden layer.320 • SMP-Linear-GCNfeat : we set FGNN′ ( A , F ; W′ ) in Eq . ( 10 ) to be a GCN ( Kipf & Welling,321 2017 ) , i.e. , induce non-linearity in message passing for features . Foutput ( · ) is still linear.322 • SMP-Linear-GCNboth : we set both FGNN ( A , E ; W ) and FGNN′ ( A , F ; W′ ) to be a GCN ( Kipf323 & Welling , 2017 ) , i.e. , induce non-linearity in message passing for both features and stochastic324 representations . Foutput ( · ) is linear.325 We show the results for link prediction tasks in Table 4 . The results for node classification and326 pairwise node classification , which imply similar conclusions , are provided in Table 10 and Table 11327 in Appendix B.5 . We make the following observations.328 • In general , SMP-Linear shows good-enough performance , achieving the best or second-best re-329 sults on six datasets and highly competitive on the other ( Communities ) . SMP-Identity , which330 does not have parameters in the output function , performs slightly worse . The results demon-331 strate the importance of adopting a learnable linear layer in the output function , which is con-332 sistent with Remark 1 . SMP-MLP does not lift the performance in general , showing that adding333 extra complexities in Foutput ( · ) brings no gain in those datasets.334 • SMP-Linear-GCNfeat reports the best results on Communities , PPI , and PPA , indicating that335 adding extra non-linearities in propagating node features are helpful for some graphs.336 • SMP-Linear-GCNboth reports the best results on Gird with a considerable margin . Recall that337 Grid has no node features . The results indicate that inducing non-linearities can help the stochas-338 tic representations capture more proximities , which is more helpful for featureless graphs.339 5.5 EFFICIENCY COMPARISON340 To compare the efficiency of different methods quantitatively , we report the running time of different341 methods in Table 5 . The results are averaged over 3,000 epochs on an NVIDIA TESLA M40 GPU342 with 12 GB of memory . The results show that SMP is computationally efficient , i.e. , only marginally343 slower than SGC and comparable to GCN . P-GNN is at least an order of magnitude slower except344 for the extremely small graphs such as Grid , Communities , or Email with no more than a thousand345 nodes . In addition , the expensive memory cost makes P-GNN unable to work on large-scale graphs.346 5.6 MORE EXPERIMENTAL RESULTS347 Besides the aforementioned experiments , we also conduct experiments on the following tasks : graph348 reconstruction ( Appendix B.1 ) , pairwise node classification ( Appendix B.2 ) , and comparing with349 one-hot IDs ( Appendix B.3 ) . Please refer to the Appendix for experimental results and correspond-350 ing analyses.351 6 CONCLUSION352 In this paper , we propose SMP , a general and simple GNN to maintain both proximity-awareness353 and permutation-equivariance properties . We propose to augment the existing GNNs with stochastic354 node representations learned to preserve node proximities . We prove that SMP can enable GNN to355 preserve node proximities in theory and is equivalent to a permutation-equivariant GNN with certain356 parametrization . Experimental results demonstrate the effectiveness and efficiency of SMP . Ablation357 studies show that a linear SMP instantiation works reasonably well on most of the datasets.358 REFERENCES359 Dana Angluin . Local and global properties in networks of processors . In Proceedings of the twelfth360 annual ACM symposium on Theory of computing , pp . 82–93 , 1980.361 Peter W Battaglia , Jessica B Hamrick , Victor Bapst , Alvaro Sanchez-Gonzalez , Vinicius Zambaldi,362 Mateusz Malinowski , Andrea Tacchetti , David Raposo , Adam Santoro , Ryan Faulkner , et al.363 Relational inductive biases , deep learning , and graph networks . arXiv:1806.01261 , 2018.364 Stephen P Borgatti . Centrality and network flow . Social networks , 27 ( 1 ) :55–71 , 2005.365 Karsten M Borgwardt and Hans-Peter Kriegel . Shortest-path kernels on graphs . In Fifth IEEE366 international conference on data mining ( ICDM ’ 05 ) , pp . 8–pp . IEEE , 2005.367 Joan Bruna , Wojciech Zaremba , Arthur Szlam , and Yann Lecun . Spectral networks and locally368 connected networks on graphs . In International Conference on Learning Representations , 2014.369 Jianfei Chen , Jun Zhu , and Le Song . Stochastic training of graph convolutional networks with370 variance reduction . In International Conference on Machine Learning , pp . 942–950 , 2018a.371 Jie Chen , Tengfei Ma , and Cao Xiao . Fastgcn : Fast learning with graph convolutional networks via372 importance sampling . In International Conference on Learning Representations , 2018b.373 Wei-Lin Chiang , Xuanqing Liu , Si Si , Yang Li , Samy Bengio , and Cho-Jui Hsieh . Cluster-gcn : An374 efficient algorithm for training deep and large graph convolutional networks . In Proceedings of375 the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining , pp.376 257–266 , 2019.377 Gabriele Corso , Luca Cavalleri , Dominique Beaini , Pietro Liò , and Petar Veličković . Principal378 neighbourhood aggregation for graph nets . arXiv preprint arXiv:2004.05718 , 2020.379 George Dasoulas , Ludovic Dos Santos , Kevin Scaman , and Aladin Virmaux . Coloring graph neural380 networks for node disambiguation . arXiv preprint arXiv:1912.06058 , 2019.381 Michaël Defferrard , Xavier Bresson , and Pierre Vandergheynst . Convolutional neural networks on382 graphs with fast localized spectral filtering . In Advances in neural information processing systems,383 pp . 3844–3852 , 2016.384 Matthias Fey , Jan E Lenssen , Christopher Morris , Jonathan Masci , and Nils M Kriege . Deep graph385 matching consensus . In International Conference on Learning Representations , 2020.386 Thomas Gärtner , Peter Flach , and Stefan Wrobel . On graph kernels : Hardness results and efficient387 alternatives . In Learning theory and kernel machines , pp . 129–143 . Springer , 2003.388 Justin Gilmer , Samuel S Schoenholz , Patrick F Riley , Oriol Vinyals , and George E Dahl . Neural389 message passing for quantum chemistry . In International Conference on Machine Learning , pp.390 1263–1272 , 2017.391 Marco Gori , Gabriele Monfardini , and Franco Scarselli . A new model for learning in graph domains.392 In Proceedings . 2005 IEEE International Joint Conference on Neural Networks , 2005. , volume 2,393 pp . 729–734 . IEEE , 2005.394 Aditya Grover and Jure Leskovec . node2vec : Scalable feature learning for networks . In Proceedings395 of the 22nd ACM SIGKDD international conference on Knowledge discovery and data mining,396 pp . 855–864 , 2016.397 Will Hamilton , Zhitao Ying , and Jure Leskovec . Inductive representation learning on large graphs.398 In Advances in neural information processing systems , pp . 1024–1034 , 2017.399 Xiangnan He , Kuan Deng , Xiang Wang , Yan Li , YongDong Zhang , and Meng Wang . Lightgcn:400 Simplifying and powering graph convolution network for recommendation . In Proceedings of401 the 43rd International ACM SIGIR Conference on Research and Development in Information402 Retrieval , pp . 639–648 , 2020.403 Weihua Hu , Matthias Fey , Marinka Zitnik , Yuxiao Dong , Hongyu Ren , Bowen Liu , Michele Catasta,404 and Jure Leskovec . Open graph benchmark : Datasets for machine learning on graphs . arXiv405 preprint arXiv:2005.00687 , 2020.406 Wenbing Huang , Tong Zhang , Yu Rong , and Junzhou Huang . Adaptive sampling towards fast graph407 representation learning . In Advances in neural information processing systems , 2018.408 Nicolas Keriven and Gabriel Peyré . Universal invariant and equivariant graph neural networks . In409 Advances in Neural Information Processing Systems , pp . 7090–7099 , 2019.410 Thomas Kipf , Ethan Fetaya , Kuan-Chieh Wang , Max Welling , and Richard Zemel . Neural relational411 inference for interacting systems . In International Conference on Machine Learning , pp . 2688–412 2697 , 2018.413 Thomas N Kipf and Max Welling . Semi-supervised classification with graph convolutional net-414 works . In Proceedings of the 6th International Conference on Learning Representations , 2017.415 Johannes Klicpera , Aleksandar Bojchevski , and Stephan Günnemann . Predict then propagate:416 Graph neural networks meet personalized pagerank . In International Conference on Learning417 Representations , 2019.418 Ioannis Konstas , Vassilios Stathopoulos , and Joemon M Jose . On social networks and collaborative419 recommendation . In Proceedings of the 32nd international ACM SIGIR conference on Research420 and development in information retrieval , pp . 195–202 , 2009.421 Qimai Li , Zhichao Han , and Xiao-Ming Wu . Deeper insights into graph convolutional networks for422 semi-supervised learning . In Thirty-Second AAAI Conference on Artificial Intelligence , 2018.423 Yujia Li , Daniel Tarlow , Marc Brockschmidt , and Richard Zemel . Gated graph sequence neural424 networks . In International Conference on Learning Representations , 2016.425 Nathan Linial . Locality in distributed graph algorithms . SIAM Journal on computing , 21 ( 1 ) :193–426 201 , 1992.427 Andreas Loukas . What graph neural networks can not learn : depth vs width . In International Con-428 ference on Learning Representations , 2020.429 Jianxin Ma , Chang Zhou , Peng Cui , Hongxia Yang , and Wenwu Zhu . Learning disentangled repre-430 sentations for recommendation . In Advances in Neural Information Processing Systems 32 , pp.431 5712–5723 . 2019.432 Haggai Maron , Heli Ben-Hamu , Hadar Serviansky , and Yaron Lipman . Provably powerful graph433 networks . In Advances in Neural Information Processing Systems , pp . 2156–2167 , 2019a.434 Haggai Maron , Heli Ben-Hamu , Nadav Shamir , and Yaron Lipman . Invariant and equivariant graph435 networks . In International Conference on Learning Representations , 2019b.436 Alessio Micheli . Neural network for graphs : A contextual constructive approach . IEEE Transactions437 on Neural Networks , 20 ( 3 ) :498–511 , 2009.438 Federico Monti , Davide Boscaini , Jonathan Masci , Emanuele Rodola , Jan Svoboda , and Michael M439 Bronstein . Geometric deep learning on graphs and manifolds using mixture model cnns . In440 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition , pp . 5115–441 5124 , 2017.442 Christopher Morris , Martin Ritzert , Matthias Fey , William L Hamilton , Jan Eric Lenssen , Gaurav443 Rattan , and Martin Grohe . Weisfeiler and leman go neural : Higher-order graph neural networks.444 In Proceedings of the AAAI Conference on Artificial Intelligence , 2019.445 Ryan Murphy , Balasubramaniam Srinivasan , Vinayak Rao , and Bruno Ribeiro . Relational pooling446 for graph representations . In International Conference on Machine Learning , 2019.447 Moni Naor and Larry Stockmeyer . What can be computed locally ? SIAM Journal on Computing,448 24 ( 6 ) :1259–1277 , 1995.449 Mark Newman . Networks . Oxford university press , 2018.450 Antonio Ortega , Pascal Frossard , Jelena Kovačević , José MF Moura , and Pierre Vandergheynst.451 Graph signal processing : Overview , challenges , and applications . Proceedings of the IEEE , 106452 ( 5 ) :808–828 , 2018.453 Bryan Perozzi , Rami Al-Rfou , and Steven Skiena . Deepwalk : Online learning of social repre-454 sentations . In Proceedings of the 20th ACM SIGKDD international conference on Knowledge455 discovery and data mining , pp . 701–710 , 2014.456 Ryoma Sato , Makoto Yamada , and Hisashi Kashima . Random features strengthen graph neural457 networks . arXiv preprint arXiv:2002.03155 , 2020.458 Franco Scarselli , Marco Gori , Ah Chung Tsoi , Markus Hagenbuchner , and Gabriele Monfardini.459 The graph neural network model . IEEE Transactions on Neural Networks , 20 ( 1 ) :61–80 , 2008.460 Kakade Sham and Shakhnarovich Greg . Random projections . CMSC 35900 ( Spring 2009 ) Large461 Scale Learning , 2020 . URL https : //ttic.uchicago.edu/˜gregory/courses/462 LargeScaleLearning/lectures/jl.pdf . [ Online ; accessed 4-September-2020 ] .463 Oleksandr Shchur , Maximilian Mumme , Aleksandar Bojchevski , and Stephan Günnemann . Pitfalls464 of graph neural network evaluation . Relational Representation Learning Workshop , NeurIPS465 2018 , 2018.466 Nino Shervashidze , Pascal Schweitzer , Erik Jan van Leeuwen , Kurt Mehlhorn , and Karsten M Borg-467 wardt . Weisfeiler-lehman graph kernels . Journal of Machine Learning Research , 12 ( Sep ) :2539–468 2561 , 2011.469 David I Shuman , Sunil K Narang , Pascal Frossard , Antonio Ortega , and Pierre Vandergheynst . The470 emerging field of signal processing on graphs : Extending high-dimensional data analysis to net-471 works and other irregular domains . IEEE signal processing magazine , 30 ( 3 ) :83–98 , 2013.472 Jian Tang , Meng Qu , Mingzhe Wang , Ming Zhang , Jun Yan , and Qiaozhu Mei . Line : Large-scale473 information network embedding . In Proceedings of the 24th international conference on world474 wide web , pp . 1067–1077 , 2015.475 Petar Velickovic , Guillem Cucurull , Arantxa Casanova , Adriana Romero , Pietro Lio , and Yoshua476 Bengio . Graph attention networks . In Proceedings of the 7th International Conference on Learn-477 ing Representations , 2018.478 Santosh S Vempala . The random projection method , volume 65 . American Mathematical Soc.,479 2005.480 Daixin Wang , Peng Cui , and Wenwu Zhu . Structural deep network embedding . In Proceedings of481 the 22nd ACM SIGKDD international conference on Knowledge discovery and data mining , pp.482 1225–1234 , 2016.483 Duncan J Watts . Networks , dynamics , and the small-world phenomenon . American Journal of484 sociology , 105 ( 2 ) :493–527 , 1999.485 Felix Wu , Amauri Souza , Tianyi Zhang , Christopher Fifty , Tao Yu , and Kilian Weinberger . Sim-486 plifying graph convolutional networks . In International Conference on Machine Learning , pp.487 6861–6871 , 2019.488 Keyulu Xu , Weihua Hu , Jure Leskovec , and Stefanie Jegelka . How powerful are graph neural489 networks ? In International Conference on Learning Representations , 2018a.490 Keyulu Xu , Chengtao Li , Yonglong Tian , Tomohiro Sonobe , Ken-ichi Kawarabayashi , and Stefanie491 Jegelka . Representation learning on graphs with jumping knowledge networks . In International492 Conference on Machine Learning , pp . 5453–5462 , 2018b.493 Zhilin Yang , William W Cohen , and Ruslan Salakhutdinov . Revisiting semi-supervised learning494 with graph embeddings . In Proceedings of the 33rd International Conference on International495 Conference on Machine Learning-Volume 48 , pp . 40–48 , 2016.496 Jiaxuan You , Rex Ying , and Jure Leskovec . Position-aware graph neural networks . In International497 Conference on Machine Learning , pp . 7134–7143 , 2019.498 Ziwei Zhang , Peng Cui , Xiao Wang , Jian Pei , Xuanrong Yao , and Wenwu Zhu . Arbitrary-order499 proximity preserved network embedding . In Proceedings of the 24th ACM SIGKDD International500 Conference on Knowledge Discovery & Data Mining , pp . 2778–2786 , 2018.501 Marinka Zitnik and Jure Leskovec . Predicting multicellular function through multi-layer tissue502 networks . Bioinformatics , 33 ( 14 ) : i190–i198 , 2017.503 A THEOREMS AND PROOFS504 A.1 THEOREM 1505 Here we formulate and prove Theorem 1.506 Theorem 1 . For any walk-based proximity function S ( · ) , a permutation-equivariant GNN cannot507 preserve S ( · ) , except the trivial solution that all node pairs have the same proximity , i.e. , Si , j =508 c , ∀i , j , where c is a constant.509 Proof . We prove the theorem by contradiction . Assume there exists a non-trivial S ( · ) which a510 permutation-equivariant GNN can preserve . Consider any graph G = ( V , E , F ) and denote N =511 |V| . We can create G′ = ( V ′ , E ′ , F′ ) with |V ′| = 2N so that:512 E ′i , j = Ei , j if i ≤ N , j ≤ N Ei−N , j−N if i > N , j > N 0 else , F′i , : = { Fi , : if i ≤ N Fi−N , : if i > N . ( 12 ) Basically , we generate two “ copies ” of the original graph , one indexing from 1 to N , and the other513 indexing from N +1 to 2N . By assumption , there exists a permutation-equivariant GNN which can514 preserve S ( · ) in G′ and we denote the node representations as H′ ( L ) = FGNN ( A′ , F′ ; WG′ ) . It is515 easy to see that node v′i and v ′ i+N in G ′ form an automorphic node pair . Using Corollary 1 , their516 representations will be identical in any permutation-equivariant GNN , i.e.,517 H ′ ( L ) i , : = H ′ ( L ) i+N , : , ∀i ≤ N. ( 13 ) Also , note that there exists no walk from the two copies , i.e . { v′i v ′ j } = { v′j v ′ i } = ∅ , ∀i ≤518 N , j > N . As a result , for ∀i ≤ N , j ≤ N , ∀ > 0 , we have:519 |Si , j − S ( ∅ ) | ≤ ∣∣∣Si , j −Fde ( H′ ( L ) i , : , H′ ( L ) j , : ) ∣∣∣+ ∣∣∣S ( ∅ ) −Fde ( H′ ( L ) i , : , H′ ( L ) j , : ) ∣∣∣ = ∣∣∣Si , j −Fde ( H′ ( L ) i , : , H′ ( L ) j , : ) ∣∣∣+ ∣∣∣Si , j+N −Fde ( H′ ( L ) i , : , H′ ( L ) j+N , : ) ∣∣∣ < 2 . ( 14 ) We can prove the same for ∀i > N , j > N . The equation naturally holds if i ≤ N , j > N or520 i > N , j ≤ N since { v′i v ′ j } = ∅ . Combining the results , we have ∀ > 0 , ∀i , j , |Si , j − S ( ∅ ) | < 521 2 . Since can be arbitrarily small , the equation shows that all node pairs have the same proximity522 c = S ( ∅ ) , which leads to a contraction and finishes our proof.523 Notice that in our proof , G′ can be constructed for any graph , so rather than designing one specific524 counter-example , we have shown that there always exists an infinite number of counter-examples by525 constructing automorphisms in the graph.526 Some may find that our counter-examples in the above proof will lead to multiple connected com-527 ponents . Next , we give an alternative proof maintaining one connected component ( assuming the528 original graph is connected ) under the assumption that the walk-based proximity is of finite length.529 Proof . Similar to the previous proof , we assume there exists a non-trivial S ( · ) which a permutation-530 equivariant GNN can preserve . Besides , we assume the length of S ( · ) is upper bounded by lmax,531 where lmax is any finite number , i.e. , ∀i , j,532 Si , j = S ( { vi vj } ) = S ( { vi vj |len ( vi vj ) ≤ lmax } ) . ( 15 ) Then , for a connected graph G = ( V , E , F ) , we create G′ = ( V ′ , E ′ , F′ ) similar to Eq . ( 12 ) . Specif-533 ically , denoting Ñ = N + lmax , we let G′ have 3Ñ nodes so that:534 E ′i , j = Ei , j if i , j ≤ N 1 if N ≤ i , j ≤ Ñ + 1 , |j − i| = 1 Ei−Ñ , j−Ñ if Ñ < i , j ≤ Ñ +N 1 if Ñ +N ≤ i , j ≤ 2Ñ + 1 , |j − i| = 1 Ei−2Ñ , j−2Ñ if 2Ñ < i , j ≤ 2Ñ +N 1 if 2Ñ +N ≤ i , j , |j − i| = 1 1 if i = 3Ñ , j = 1 or j = 3Ñ , i = 1 0 else , F′i , : = Fi , : if i ≤ N 0 if N < i ≤ Ñ Fi−Ñ , : if Ñ < i ≤ Ñ +N 0 if Ñ +N < i ≤ 2Ñ Fi−2Ñ , : if 2Ñ < i ≤ 2Ñ +N 0 if 2Ñ +N < i . ( 16 ) Intuitively , we create three “ copies ” of G and three “ bridges ” to connect the copies and thus make535 G′ also connected . It is also easy to see that nodes v′i , v ′ i+Ñ , and v′ i+2Ñ all form automorphic node536 pairs and thus we have:537 H ′ ( L ) i , : = H ′ ( L ) i+Ñ , : = H ′ ( L ) i+ ˜2N , : , ∀i ≤ Ñ . ( 17 ) Next , we can see that the nodes in G′ are divided into six parts ( three copies and three bridges ) ,538 which we denote as V ′1 = { v1 , ... , vN } , V ′2 = { vN+1 , ... , vÑ } , V ′3 = { vÑ+1 , ... , vÑ+N } , V ′4 =539 { vÑ+N+1 , ... , v2Ñ } , V ′5 = { v2Ñ+1 , ... , v2Ñ+N } , and V ′6 = { v2Ñ+N+1 , ... , v3Ñ } . Since V ′2 , V ′4 , V ′6540 are bridges with length lmax , any walk crosses these bridges will have a length large than lmax . For541 example , let us focus on vi ∈ V ′1 , i.e. , i ≤ N . If vj is in V ′3 , V ′4 , or V ′5 ( i.e. , Ñ < j ≤ 2Ñ +N ) , any542 walk vi vj will either pass the bridge V ′2 or V ′6 and thus has a length larger than lmax . As a result,543 we have:544 Si , j = S ( { vi vj } ) = S ( { vi vj |len ( vi vj ) ≤ lmax } ) = S ( ∅ ) . ( 18 ) If vj ∈ V ′1 or vj ∈ V ′2 , i.e. , j ≤ Ñ , we can use the fact that vj and vj+Ñ forms an automorphic node545 pair similar to Eq . ( 14 ) , i.e. , ∀ > 0 , we have546 |Si , j − S ( ∅ ) | ≤ ∣∣∣Si , j −Fde ( H′ ( L ) i , : , H′ ( L ) j , : ) ∣∣∣+ ∣∣∣S ( ∅ ) −Fde ( H′ ( L ) i , : , H′ ( L ) j , : ) ∣∣∣ = ∣∣∣Si , j −Fde ( H′ ( L ) i , : , H′ ( L ) j , : ) ∣∣∣+ ∣∣∣Si , j+Ñ −Fde ( H′ ( L ) i , : , H′ ( L ) j+Ñ , : ) ∣∣∣ < 2 . ( 19 ) Similarly , if vj ∈ V ′6 , i.e. , 2Ñ +N < j , we can use the fact that vj and vj−Ñ forms an automorphic547 node pair to prove the same inequality . Thus , we prove that if i ≤ N , ∀ > 0 , ∀j , |Si , j − S ( ∅ ) | < 2 .548 The same proof strategy can be applied to i > N . Since can be arbitrarily small , the results show549 that all node pairs have the same proximity S ( ∅ ) , which leads to a contraction and finishes our550 proof.551 A.2 THEOREM 2552 Here we formulate and prove Theorem 2 . Note that some notations and definitions are introduced in553 Appendix A.1.554 Theorem 2 . For the walk-based proximity S = ÃK ( ÃK ) T , SMP can preserve the proximity with555 high probability if the dimensionality of the stochastic matrix is sufficiently large , i.e. , ∀ > 0 , ∀δ > 556 0 , there ∃d0 so that any d > d0:557 P ( |Si , j −Fde ( Hi , : , Hj , : ) | < ) > 1− δ , ( 20 ) where H are the node representation obtained from SMP in Eq . ( 11 ) . The result holds for any558 stochastic matrix and thus is regardless of whether E is fixed or resampled during each epoch.559 Proof . Our proof is mostly based on the standard random projection theory . Firstly , since we have560 proven in Theorem 1 that the permutation-equivariant representations can not preserve any walk-561 based proximity , here we prove that we can preserve the proximity only using Ẽ , which can be562 easily achieved by ignoring H ( L ) in Foutput ( [ Ẽ , H ( L ) ] ) , e.g. , if we set Foutput as a linear function , the563 model can learn to set the corresponding weights for H ( L ) as all-zeros.564 We set the decoder function as a normalized inner product:565 Fde ( Hi , : , Hj , : ) = 1 d Hi , :H T j , : . ( 21 ) Then , denoting ai = ÃKi , : and recalling Ẽ = à KE , we have:566 |Si , j −Fde ( Hi , : , Hj , : ) | = |aiaTj − 1 d Ẽi , :Ẽ T j , :| = |aiaTj − ai 1 d EETaTj | . ( 22 ) Since E is a Gaussian random matrix , from the Johnson-Lindenstrauss lemma ( Vempala , 2005 ) ( in567 the inner product preservation forum , e.g. , see Corollary 2.1 and its proof in ( Sham & Greg , 2020 ) ) ,568 ∀0 < ′ < 12 , we have:569 P ( |aiaTj − ai 1 d EETaTj | ≤ ′ 2 ( ‖ai‖+ ‖aj‖ ) ) > 1− 4e− ( ′2− ′3 ) d 4 . ( 23 ) By setting ′ = maxi‖ai‖ , we have > ′ 2 ( ‖ai‖+ ‖aj‖ ) and:570 P ( |Si , j −Fde ( Hi , : , Hj , : ) | < ) > 1− 4e− ( maxi‖ai‖ 2− maxi‖ai‖ 3 ) d 4 , ( 24 ) which leads to the theorem by solving and setting d0 as follows:571 4e− ( maxi‖ai‖ 2− maxi‖ai‖ 3 ) d0 4 = δ ⇒ d0 = 4 log 4δ ( maxi ‖ai‖ ) 3 2 maxi ‖ai‖ − 3 . ( 25 ) 572 A.3 THEOREM 3573 Here we formulate and prove Theorem 3 . Note that some notations and definitions are introduced in574 Appendix A.1.575 Theorem 3 . For any length-L walk-based proximity , i.e. , Si , j = S ( { vi vj } ) = S ( { vi vj |len ( vi vj ) ≤ L } ) , where len ( · ) is the length of a walk , there exists an SMP variant in Eq . ( 10 ) with FGNN ( A , E ; W ) 576 containing L layers ( including the input layer ) to preserve that proximity if the following conditions577 hold : ( 1 ) The stochastic matrix E contains unique signals for different nodes , i.e . Ei , : 6= Ej , : , ∀i 6=578 j . ( 2 ) The message-passing and updating functions in learning Ẽ are bijective . ( 3 ) The decoder579 function Fde ( · ) also takes E as inputs and is universal approximation.580 Proof . Similar as Theorem 2 , we only utilize Ẽ during our proof . We use e ( l ) i , 0 ≤ l < L to581 denote the node representations in the lth layer of FGNN ( A , E ; W ) , i.e. , e ( 0 ) i = Ei , : and e ( L−1 ) i =582 Ẽi , : . Our proof strategy is to show that the stochastic node representations can remember all the583 information about the walks.584 Firstly , as the message-passing and updating function are bijective by assumption , we can recover585 from the node representations in each layer all their neighborhood representations in the previous586 layer . Specifically , there exist F ( l ) ( · ) , 1 ≤ l < L such that:587 F ( l ) ( e ( l ) i ) = [ e ( l−1 ) i , { e ( l−1 ) j , j ∈ Ni } ] 6 . ( 26 ) For notation conveniences , we split the function into two parts , one for the node itself and the other588 for its neighbors:589 F ( l ) self ( e ( l ) i ) = e ( l−1 ) i , F ( l ) neighbor ( e ( l ) i ) = { e ( l−1 ) j , j ∈ Ni } . ( 27 ) 6To let F ( l ) ( · ) output a set with arbitrary lengths , we can adopt sequence-based models such an LSTM . For the first function , if we successively apply such functions from the lth layer to the input layer , we590 can recover the input features of the GNN , i.e. , E. Since the stochastic matrix E contains a unique591 signal for different nodes , we can decode the node ID from e ( 0 ) i , i.e. , there existsF ( 0 ) self ( e ( 0 ) i ; E ) = i.592 For brevity , we denote applying such l + 1 functions to get the node ID as593 F ( 0 : l ) self ( e ( l ) i ) = F ( 0 ) self ( F ( 1 ) self ( ... ( F ( l ) self ( e ( l ) i ) ) ) ; E ) = i . ( 28 ) For the second function , we can apply F ( l−1 ) neighbor to the decoded vector set so that we can recover their594 neighborhood representations in the ( l − 2 ) th layer , etc.595 Next , we show that for e ( l−1 ) j , there exists a length-l walk vi vj = ( va1 , va2 , ... , val ) , where596 va1 = vi , val = vj if and only if F ( 0 : l−1 ) self ( e ( l−1 ) j ) = al = j and there exists e ( l−2 ) , ... , e ( 0 ) such597 that:598 e ( l−2 ) ∈ F ( l−1 ) neighbor ( e ( l−1 ) j ) , F ( 0 : l−2 ) self ( e ( l−2 ) ) = al−1 , e ( l−3 ) ∈ F ( l−2 ) neighbor ( e ( l−2 ) ) , F ( 0 : l−3 ) self ( e ( l−3 ) ) = al−2 , ... e ( 0 ) ∈ F ( 1 ) neighbor ( e ( 1 ) ) , F ( 0:0 ) self ( e ( 0 ) ) = a1 = i . ( 29 ) This result is easily verified as:599 ( va1 , va2 , ... , val ) is a walk⇔ Eai , aj = Eaj , ai = 1⇔ ai ∈ Nai+1 , ∀1 ≤ i < l ⇔ ∃e ( i−1 ) ∈ F ( i ) neighbor ( e ( i ) ) , F ( 0 : i−1 ) self ( e ( i−1 ) ) = ai , ∀1 ≤ i < l. ( 30 ) Note that all the information is encoded in Ẽ , i.e. , we can decode { vi vj |len ( vi vj ) ≤ L } from600 e ( L−1 ) j by successively applying F ( l ) self ( · ) , F ( l ) neighbor ( · ) . We can also apply F ( 0 : L−1 ) self to e ( L−1 ) i to get601 the start node ID i . Putting it together , we have:602 F ( e ( L−1 ) j , e ( L−1 ) i ) = { vi vj |len ( vi vj ) ≤ L } , ( 31 ) whereF ( · ) is composed ofF ( l ) self ( · ) , 0 ≤ l < L andF ( l ) neighbor ( · ) , 1 ≤ l < L. Applying the proximity603 function S ( · ) , we have:604 S ( F ( e ( L−1 ) j , e ( L−1 ) i ) ) = Si , j . ( 32 ) We finish the proof by setting the real decoder function Fde ( · ) to arbitrarily approximate this desired605 function S ( F ( · , · ) ) under the universal approximation assumption.606 B ADDITIONAL EXPERIMENTAL RESULTS607 B.1 GRAPH RECONSTRUCTION608 To verify that our proposed SMP can indeed preserve node proximities , we conduct experiments of609 graph reconstruction ( Wang et al. , 2016 ) , i.e. , using the node representations learned by GNNs to610 reconstruct the edges of the graph . Graph reconstruction corresponds to the first-order proximity611 between nodes , i.e. , whether two nodes directly have a connection , which is the most straight-612 forward node proximity ( Tang et al. , 2015 ) . Specifically , following Section 5.2 , we adopt the inner613 product classifier Sigmoid ( HTi Hj ) and use AUC as the evaluation metric . To control the impact614 of node features ( i.e. , since many graphs exhibit assortative mixing , even models only using node615 features can reconstruct the edges to a certain extent ) , we do not use node features for all the models.616 We report the results in Table 6 . The results show that SMP greatly outperforms permutation-617 equivariant GNNs such as GCN and GAT in graph reconstruction , clearly demonstrating that SMP618 can better preserve node proximities . PGNN shows highly competitive results as SMP . However,619 similar to other tasks , the intensive memory usage makes PGNN unable to handle medium-scale620 graphs such as Physics and PubMed.621 B.2 PAIRWISE NODE CLASSIFICATION622 Besides standard node classification experiments reported in Section 5.3 , we follow ( You et al.,623 2019 ) and experiment on pairwise node classification , i.e. , predicting whether two nodes have the624 same label . Compared with standard node classification , pairwise node classification focuses more625 on the relations between nodes and thus requires the model to be proximity-aware to perform well.626 Similar to link prediction , we split the positive samples ( i.e. , node pairs with the same label ) into an627 80 % -10 % -10 % training-validation-testing set with an equal number of randomly sampled negative628 pairs . For large graphs , since the possible positive samples are intractable ( i.e . O ( N2 ) ) , we use a629 random subset . Since we also need node labels as the ground-truth , we only conduct pairwise node630 classification on datasets when node labels are available . We also exclude the results of PPI since631 the dataset is multi-label and can not be used in a pairwise setting ( You et al. , 2019 ) . Similar to632 Section 5.2 , we adopt a simple inner product classifier and use AUC as the evaluation metric.633 The results are shown in Table 7 . We observe consistent results as link prediction in Section 5.2 , i.e.,634 SMP reports the best results on four datasets and the second-best results on the other three datasets.635 These results again verify that SMP can effectively preserve and utilize node proximities when636 needed while retaining comparable performance when the tasks are more permutation-equivariant637 like , e.g. , on CS and Physics.638 B.3 COMPARISON WITH USING IDS639 We further compare SMP with augmenting GNNs using a one-hot encoding of node IDs , i.e. , the640 identity matrix . Intuitively , since the IDs of nodes are unique , such a method does not suffer from the641 automorphism problem and should also enable GNNs to preserve node proximities . However , theo-642 retically speaking , using such a one-hot encoding has two major problems . Firstly , the dimensional-643 ity of the identity matrix is N ×N , and thus the number of parameters in the first message-passing644 layer is also on the order of O ( N ) . Therefore , the method will inevitably be computationally ex-645 pensive and may not be scalable to large-scale graphs . A large number of parameters will also more646 likely lead to the overfitting problem . Secondly , the node IDs are not transferable across different647 graphs , i.e. , the node v1 in one graph and the node v1 in another graph do not necessarily share a648 similar meaning . But as the parameters in the message-passings depend on the node IDs ( since they649 are input features ) , such a mechanism can not handle inductive tasks well.7650 7One may question whether SMP is transferable across different graphs since the stochastic features are independently drawn . Empirically , we find that SMP reports reasonably well results on inductive datasets such We also empirically compare such a method with SMP and report the results in Table 8 . The results651 show that SMP-Linear outperforms GCNonehot in most cases . Besides , GCNonehot fails to handle652 Physics , which is only a medium-scale graph , due to the heavy memory usage . One surprising result653 is that GCNonehot outperforms SMP-Linear on Grid , the simulated graph where nodes are placed on654 a 20 × 20 grid . A plausible reason is that since the edges in Grid follow a specific rule , using a655 one-hot encoding gives GCNonehot enough flexibility to learn and remember the rules , and the model656 does not overfit because the graph has a rather small scale.657 B.4 ADDITIONAL LINK PREDICTION RESULTS658 We further report the results of link prediction on three GNN benchmarks : Cora , CiteSeer , and659 PubMed . The results are shown in Table 9 . The results show similar trends as other datasets pre-660 sented in Section 5.2 , i.e. , SMP reports comparable results as other permutation-equivariant GNNs661 while PGNN fails to handle the task well.662 B.5 ADDITIONAL ABLATION STUDIES663 We report the ablation study results for the node classification task and pairwise node classification664 task in Table 10 and Table 11 , respectively . The results again show that SMP-Linear generally665 achieves good-enough results on the majority of the datasets and adding non-linearities does not666 necessarily lift the performance of SMP.667 We also compare whether the stochastic signals E are fixed or not during different training epochs668 for our proposed SMP . For brevity , we only report the results for the link prediction task in Table 12.669 The results show that fixing E usually leads to better results on transductive datasets ( recall that670 datasets except Email and PPI are transductive ) and resampling E leads to better results on inductive671 datasets in general . The results are consistent with our analysis in Section 4.1.672 as Email and PPI . One plausible reason is that since the proximities of nodes are preserved even the random features per se are different ( see Theorem 2 ) , all subsequent parameters based on proximities can be transferred . B.6 COMPARISON OF PERMUTATION-EQUIVARIANT GNNS FOR LINK PREDICTION673 To investigate the performance of linear and non-linear variants of permutation-equivariant GNNs674 for the link prediction task , we additionally report both the training accuracies and the testing accu-675 racies of SGC , GCN , and GAT in Table 13 . Notice that to ensure a fair comparison , we do not adopt676 the early stopping strategy here so that different models have the same number of training epochs677 ( otherwise , if a model tends to overfit , the early stopping strategy will terminate the training process678 when the number of training epochs is small and result in a spurious underfitting phenomena ) .679 The results show that non-linear variants of GNNs ( GCN and GAT ) are more likely to overfit , i.e.,680 the margins between the training accuracies and the testing accuracies are usually larger , than the681 linear variant SGC . Besides , though possessing extra model expressiveness , non-linear GNNs are682 also difficult to train , i.e. , the training accuracies of GCN and GAT are not necessarily higher than683 SGC . The results are consistent with the literature Wu et al . ( 2019 ) ; He et al . ( 2020 ) .684 C EXPERIMENTAL DETAILS FOR REPRODUCIBILITY685 C.1 DATASETS686 • Grid ( You et al. , 2019 ) : A simulated 2D grid graph with size 20× 20 and no node feature.687 • Communities ( You et al. , 2019 ) : A simulated caveman graph ( Watts , 1999 ) composed of 20688 communities with each community containing 20 nodes . The graph is perturbed by rewiring 1 % 689 edges randomly . It has no node feature and the label of each node indicates which community690 the node belongs to.691 • Email8 ( You et al. , 2019 ) : Seven real-world email communication graphs . Each graph has six692 communities and each node has an integer label indicating the community the node belongs to.693 • Coauthor Networks9 ( Shchur et al. , 2018 ) : Two networks from Microsoft academic graph in694 CS and Physics with their nodes representing authors and edges representing co-authorships695 between authors . The node features are embeddings of the paper keywords of the authors.696 • PPI8 ( Hamilton et al. , 2017 ) : 24 protein-protein interaction networks . Each node has a 50-697 dimensional feature vector.698 • PPA10 ( Hu et al. , 2020 ) : A network representing biological associations between proteins from699 58 different species . The node features are one-hot vectors of the species that the proteins are700 taken from.701 8https : //github.com/JiaxuanYou/P-GNN/tree/master/data 9https : //github.com/shchur/gnn-benchmark/tree/master/data/npz/ 10https : //snap.stanford.edu/ogb/data/linkproppred/ppassoc.zip • Cora , CiteSeer , PubMed11 ( Yang et al. , 2016 ) : Three citation graphs where nodes correspond702 to papers and edges correspond to citations between papers . The node features are bag-of-words703 and the node labels are the ground truth topics of the papers.704 We summarize the statistics of datasets in Table 14.705 C.2 HYPER-PARAMETERS706 We use the following hyper-parameters:707 • All datasets except PPA : we uniformly set the number of layers for all the methods as 2 , i.e. , 2708 message-passing steps , and set the dimensionality of hidden layers as 32 , i.e. , H ( l ) ∈ RN×32,709 for all 1 ≤ l ≤ L ( for GAT , we use 4 heads with each head containing 8 units ) . We use Adam710 optimizer with an initial learning rate of 0.01 and decay the learning rate by 0.1 at epoch 200.711 The weight decay is 5e-4 . We train the model for 1,000 epochs and evaluate the model every 5712 epochs . We adopt an early-stopping strategy by reporting the testing performance at the epoch713 which achieves the best validation performance . For SMP , the dimensionality of the stochastic714 matrix is d = 32 . For P-GNN , we use the P-GNN-F version , which uses the truncated 2-hop715 shortest path distance instead of the exact shortest distance.716 • PPA : as suggested in the original paper ( Hu et al. , 2020 ) , we set the number of GNN layers717 as 3 with each layer containing 256 hidden units and add a three-layer MLP after taking the718 Hadamard product between pair-wise node embeddings as the predictor , i.e. , MLP ( Hi Hj ) .719 We use Adam optimizer with an initial learning rate of 0.01 . We set the number of epochs for720 training as 40 , evaluate the results on validation sets every epoch , and report the testing results721 using the model with the best validation performance . We also found that the dataset had issues722 with exploding gradients and adopt a gradient clipping strategy by limiting the maximum p2-723 norm of gradients as 1.0 . The dimensionality of the stochastic matrix in SMP is d = 64.724 C.3 HARDWARE AND SOFTWARE CONFIGURATIONS725 All experiments are conducted on a server with the following configurations.726 • Operating System : Ubuntu 18.04.1 LTS727 • CPU : Intel ( R ) Xeon ( R ) CPU E5-2699 v4 @ 2.20GHz728 • GPU : NVIDIA TESLA M40 with 12 GB of memory729 11https : //github.com/kimiyoung/planetoid/tree/master/data • Software : Python 3.6.8 , PyTorch 1.4.0 , PyTorch Geometric 1.4.3 , NumPy 1.18.1 , Cuda 10.1730
This paper proposed a proximity-aware graph neural network while maintaining the permutation equivariance property. The proposed model, dubbed as stochastic message passing (SMP), arguments the existing GNNs with stochastic node representations. The author proved the proposed method can model proximity-aware representations based on random projection theory. The experimental results show that the SMP can be used for multiple graphs and tasks.
SP:45941e6abff2f79dd106783302095a6674da5f4a
DROPS: Deep Retrieval of Physiological Signals via Attribute-specific Clinical Prototypes
1 INTRODUCTION . Physiological data are being collected at a burgeoning rate . Such growth is driven by the digitization of previous patient records , the presence of novel health monitoring and recording systems , and the recent recommendation to facilitate the exchange of health records ( European Commission , 2019 ) . This engenders large-scale datasets from which the manual extraction of clinically-useful insight is non-trivial . Such insight can include , but is not limited to , medical diagnoses , prognoses , or treatment . In the presence of large-scale datasets , retrieving instances based on some user-defined criteria has been a longstanding goal within the machine learning community ( Manning et al. , 2008 ) . This information retrieval ( IR ) process typically consists of a query that is used to search through a large database and retrieve matched instances . Within healthcare , the importance of an IR system is threefold ( Hersh & Hickam , 1998 ; Hersh , 2008 ) . First , it provides researchers with greater control over which patients to choose for clinical trial recruitment . Second , IR systems can serve as an educational and diagnostic tool , allowing physicians to identify seemingly similar patients who exhibit different clinical parameters and vice versa . Lastly , if the query were to consist of sensitive attributes such as sex , age , and race , then such a system would allow researchers to more reliably evaluate the individual and counterfactual fairness of a particular model ( Verma & Rubin , 2018 ) . To illustrate this point , let us assume the presence of a query instance that corresponds to a patient with an abnormality of the heart , atrial fibrillation , who is male and under the age of 25 . To reliably determine the sensitivity of a model with respect to sex , one would observe its response when exposed to a counterfactual instance , namely the exact same instance but with a different sex label ( Kusner et al. , 2017 ) . At present , deep-learning based IR systems within the healthcare domain fail to incorporate such patient-specific attributes . Existing IR systems which retrieve instances from the electronic health records ( Wang et al. , 2019 ; Chamberlin et al. , 2019 ) do not incorporate an attribute-specific search and do not trivially extend to physiological signals . In this paper , we propose to learn embeddings , referred to as clinical prototypes ( CPs ) . CPs are efficient descriptors of a combination of patient-specific attributes , such as disease , sex , and age . We learn these embeddings via contrastive learning whereby representations of instances are encouraged to be similar to their corresponding clinical prototype and dissimilar to the others . To the best of our knowledge , we are the first to design a supervised contrastive learning based large-scale retrieval system for electrocardiogram ( ECG ) signals . Contributions . Our contributions are the following : • Attribute-specific clinical prototypes - we propose a supervised contrastive learning framework to learn embeddings , referred to as clinical prototypes ( CPs ) , that are efficient descriptors of a set of patient attributes , e.g. , disease , sex , and age . • Deep retrieval and clustering - we exploit CPs to retrieve instances corresponding to a specific patient-attribute combination and assign instances to various clusters . 2 RELATED WORK . Clinical representation learning involves meaningfully representing clinical data for solving tasks . Most research attempts to learn representations of electronic health records ( EHRs ) ( Miotto et al. , 2016 ; Gee et al. , 2019 ; Liu et al. , 2019 ; Li et al. , 2020b ; Biswal et al. , 2020 ; Darabi et al. , 2020 ) in a generative manner . For example , Landi et al . ( 2020 ) and Huang et al . ( 2019 ) implement an autoencoder to learn patient representations . These representations are then clustered either in a hierarchical manner or via K-means . Other methods involve learning prototypes . For example , Li et al . ( 2020a ) propose to do so via the ProtoNCE loss . Our approach , unlike theirs , exploits readily-available patient-attribute data and is not dependent upon the K-means algorithm . Moreover , Van Looveren & Klaise ( 2019 ) learn to perturb prototypes to derive interpretable counterfactual instances . Most similar to our work is that of Kiyasseh et al . ( 2020 ) , which learns patient-specific representations while pre-training via contrastive learning , and Garnot & Landrieu ( 2020 ) where the distance between class prototypes learned in an end-to-end manner is regularized based on a predefined tree hierarchy . In contrast , we learn attribute-specific prototypes via supervised contrastive learning and capture their semantic relationships via distance-based regularization . Clinical information retrieval whereby instances similar to a query are retrieved was first introduced in 1990 ( Hersh & Greenes , 1990 ) . Most research in this domain revolves around text ( Gurulingappa et al. , 2016 ; Wang et al. , 2017 ; Rhine , 2017 ; Wallace et al. , 2016 ) . For example , D ’ Avolio et al . ( 2010 ) map text to SNOMED concepts to retrieve clinical documents . More recently , IR has been performed with biomedical images , and is referred to as content-based image retrieval ( Saritha et al. , 2019 ; Chittajallu et al. , 2019 ) . Others have extended this concept to EHR data ( Goodwin & Harabagiu , 2018 ; Wang et al. , 2019 ; Chamberlin et al. , 2019 ) . For example , Chamberlin et al . ( 2019 ) implement rudimentary IR methods such as divergence from randomness on the UPMC and MIMIC III ( Johnson et al. , 2016 ) datasets with the aim of discovering patient cohorts . In contrast to such methods , we implement a deep-learning based clinical information retrieval system for physiological signals . 3 METHODS . 3.1 ATTRIBUTE-SPECIFIC CLINICAL PROTOTYPES . Information retrieval systems typically necessitate a query of some sort that is exploited to search through a large database and retrieve instances that satisfy criteria outlined by the initial query . Such a query can take on a multitude of forms ( e.g. , text , image , audio , etc . ) depending on the modality of instances in the database . As we are primarily interested in large databases comprising physiological signals , we design a query that is based on such signals . Moreover , the type and specificity of instances that are retrieved highly depend on the criteria outlined by a query . In our context , these criteria comprise patient attribute information such as disease class , sex , and age . As a result , our query should be capable of retrieving physiological instances that are associated with the aforementioned patient attributes . To achieve this , we propose to learn a set of query embeddings , P , analogous to word embeddings in natural language processing , where |P | = M , representing each of the M possible patient-attribute combinations within a dataset . Each embedding , pA ∈ P , is an efficient descriptor of a set of attributes A = { α1 , α2 , α3 } where α1 = disease class , α2 = sex and α3 = age . Given this attribute-specific interpretation , we refer to such embeddings as attributespecific clinical prototypes or CPs . We propose to learn such CPs , in an end-to-end manner , via contrastive learning , as explained next . 3.2 LEARNING ATTRIBUTE-SPECIFIC CLINICAL PROTOTYPES . We assume the presence of a learner , fθ : x ∈ RD −→ v ∈ RE parameterized by θ , that maps a D-dimensional input , x , to an E-dimensional representation , v. In information retrieval systems , a reliable query should accurately retrieve instances that satisfy certain criteria . When dealing with representations , such reliability can be designed for by ensuring that the query embedding is in a similar subspace , and thus in proximity , to the representations of instances that satisfy said criteria . To achieve this proximity , we can attract query embeddings to representations in the database which share patient attribute information and repel them from those which do not . More specifically , we attract each representation of an instance associated with a set of attributes , A , to the clinical prototype , pA , that describes that same set . This can be achieved in two ways . Hard assignment . We encourage each representation , vi = fθ ( xi ) , of an instance , xi , associated with a particular set of attributes , A , to be similar to the single clinical prototype , pA , that describes the exact same set of attributes , and dissimilar to the remaining clinical prototypes , pj , where j 6= A . We quantify this similarity , s ( vi , pA ) , using the cosine similarity , with a temperature parameter , τs . By mapping each representation to a single CP , we refer to this as a hard assignment . To encourage this behaviour , one would optimize the following objective function for a mini-batch of size , B : Lcontra−hard = − 1 B B∑ i=1 log ( es ( vi , pA ) ∑M j e s ( vi , pj ) ) ( 1 ) s ( vi , pA ) = vi · pA ‖vi‖‖pA‖ · 1 τs ( 2 ) The hard assignment approach assumes a bijective relationship between each representation , vi , and each clinical prototype , pA . This many-to-one mapping implies that CPs without a perfect attribute match ( i.e. , a near miss ) do not leverage potentially useful information from representations that exhibit some , albeit imperfect , overlap in patient attributes . Soft assignment . To overcome the limitations of a hard assignment , we propose a soft assignment approach whereby each representation , vi , is attracted to a subset of disease class-specific clinical prototypes , L ⊂ P . We opted for this class-specific setup to avoid erroneously attracting representations to CPs from a different class . This attraction would hinder retrievals based on disease class . Recall , though , that the CPs in L still describe different sets of non-class attributes . By attracting each representation to these CPs uniformly , CPs within a class will collapse to a single point , and thus be unable to distinguish between various patient attributes . We support this claim in Fig . 1a where we illustrate the t-SNE projection of the CPs for five different disease classes . To avoid such collapse , we modulate the attraction between each representation , vi , associated with the attribute set , Ai , and each clinical prototype , pk , associated with the attribute set , Ak . More specifically , we introduce a weight , wik , that is dependent on the discrepancy between the respective attribute sets , d ( Ai , Ak ) . This formulation , characterized by greater attraction between CPs and representations with more similar attribute sets , results in the CPs shown in Fig . 1b . Formally , we optimize the following objective function . Lcontra−soft = − 1 B B∑ i=1 [ M∑ k=1 ωik log ( es ( vi , pk ) ∑M j e s ( vi , pj ) ) ] ( 3 ) ωik = { ed ( Ai , Ak ) ∑|L| j e d ( Ai , Aj ) if disease classi = disease classk 0 otherwise ( 4 ) d ( Ai , Ak ) = [ δ ( disease classi = disease classk ) + δ ( sexi = sexk ) + δ ( agei = agek ) ] · 1 τω ( 5 ) where δ is the Kronecker delta function that evaluates to one if the argument is true and zero otherwise and τω is a temperature parameter that determines how soft the assignment is . For example , as τω −→ 0 , the loss-term approaches the hard assignment formulation . Arrangement of clinical prototypes . Clinical prototypes , learned in an end-to-end manner , as presented will exhibit a high and desirable degree of inter-class separability . However , prototypes within a class are still at risk of collapsing to a select few points . This would decrease their utility for attribute-based querying of instances . We would prefer to learn CPs that not only distinguish between different sets of attributes , but also reflect the semantic relationships between one another , as is done with word embeddings in natural language processing . Capturing semantic relationships is desirable as it allows for improved interpretability of the retrieval process . For example , representations that are equidistant from two CPs can indicate a graded difference in a particular attribute such as age . In Fig . 2 ( left ) , we illustrate the desired arrangement of 16 CPs for two arbitrary classes . To arrive at this arrangement , we propose a distance-based regularization term , derived as follows . First , we use the L2 norm to normalize all CPs in the set , P , and calculate the empirical pairwise Euclidean distance between them . As a result , we generate the matrix D̂ ∈ RM×M ( Fig . 2 right ) . As we are only interested in the pairwise distances for prototypes within the same class , we focus on the sub-matrices , D̂c ∈ RM/C×M/C with c ∈ [ 1 , . . . , C ] where C is the number of class-specific clusters . Each class ’ corresponding ground-truth sub-matrix , Dc , is populated with distances , dE , that reflect the semantic relationships between CPs . We choose dE = β × S where β ∈ R is a user-defined distance and S ∈ Z+ is the integer distance between attributes . For example , a pair of CPs that differ according to sex with A1 = { AFIB , M , < 25 } and A2 = { AFIB , F , < 25 } , results in S = 1 and dE = β × 1 . We then calculate the mean-squared error between D̂c and Dc ∀c ∈ [ 1 , . . . , C ] . Our final objective function thus includes the soft contrastive loss ( Eq . 3 ) and the regression loss . Lreg = C M2 C∑ c=1 ( D̂c −Dc ) 2 ( 6 ) Lcomb = Lcontra−soft + Lreg ( 7 )
This paper proposes to tackle the problem of retrieving and clustering physiological signals by learning clinical prototypes via supervised contrastive learning. Three readily available patient attributes, disease, age, and sex, are used to assist the learning. A hard assignment of samples to prototype is proposed, and further relaxed to a soft one to utilize the samples that do not have exactly matched attribute set. A regularization term is also proposed to encourage intra-cluster distances. Two ECG datasets are used to evaluate the proposed model.
SP:f64ed00548580d2d06e5d8e529894144940ed630
Rao-Blackwellizing the Straight-Through Gumbel-Softmax Gradient Estimator
1 INTRODUCTION . Models with discrete latent variables are common in machine learning . Discrete random variables provide an effective way to parameterize multi-modal distributions , and some domains naturally have latent discrete structure ( e.g , parse trees in NLP ) . Thus , discrete latent variable models can be found across a diverse set of tasks , including conditional density estimation , generative text modelling ( Yang et al. , 2017 ) , multi-agent reinforcement learning ( Mordatch & Abbeel , 2017 ; Lowe et al. , 2017 ) or conditional computation ( Bengio et al. , 2013 ; Davis & Arel , 2013 ) . The majority of these models are trained to minimize an expected loss using gradient-based optimization , so the problem of gradient estimation for discrete latent variable models has received considerable attention over recent years . Existing estimation techniques can be broadly categorized into two groups , based on whether they require one loss evaluation ( Glynn , 1990 ; Williams , 1992 ; Bengio et al. , 2013 ; Mnih & Gregor , 2014 ; Chung et al. , 2017 ; Maddison et al. , 2017 ; Jang et al. , 2017 ; Grathwohl et al. , 2018 ) or multiple loss evaluations ( Gu et al. , 2016 ; Mnih & Rezende , 2016 ; Tucker et al. , 2017 ) per estimate . These estimators reduce variance by introducing bias or increasing the computational cost with the overall goal being to reduce the total mean squared error . Because loss evaluations are costly in the modern deep learning age , single evaluation estimators are particularly desirable . This family of estimators can be further categorized into those that relax the discrete randomness in the forward pass of the model ( Maddison et al. , 2017 ; Jang et al. , 2017 ; Paulus et al. , 2020 ) and those that leave the loss computation unmodified ( Glynn , 1990 ; Williams , 1992 ; Bengio et al. , 2013 ; Chung et al. , 2017 ; Mnih & Gregor , 2014 ; Grathwohl et al. , 2018 ) . The ones that do not modify the loss computation are preferred , because they avoid the accumulation of errors in the forward direction and they allow the model to exploit the sparsity of discrete computation . Thus , there is a particular need for single evaluation estimators that do not modify the loss computation . ∗Work done partly at the Institute for Advanced Study , Princeton , NJ . In this paper we introduce such a method . In particular , we propose a Rao-Blackwellization scheme for the straight-through variant of the Gumbel-Softmax estimator ( Jang et al. , 2017 ; Maddison et al. , 2017 ) , which comes at a minimal cost , and does not increase the number of function evaluations . The straight-through Gumbel-Softmax estimator ( ST-GS , Jang et al. , 2017 ) is a lightweight stateof-the-art single-evaluation estimator based on the Gumbel-Max trick ( see Maddison et al. , 2014 , and references therein ) . The ST-GS uses the argmax over Gumbel random variables to generate a discrete random outcome in the forward pass . It computes derivatives via backpropagation through a tempered softmax of the same Gumbel sample . Our Rao-Blackwellization scheme is based on the key insight that there are many configurations of Gumbels corresponding to the same discrete random outcome and that these can be marginalized over with Monte Carlo estimation . By design , there is no need to re-evaluate the loss and the additional cost of our estimator is linear only in the number of Gumbels needed for a single forward pass . As we show , the Rao-Blackwell theorem implies that our estimator has lower mean squared error than the vanilla ST-GS . We demonstrate the effectiveness of our estimator in unsupervised parsing on the ListOps dataset ( Nangia & Bowman , 2018 ) and on a variational autoencoder loss ( Kingma & Welling , 2013 ; Rezende et al. , 2014 ) . We find that in practice our estimator trains faster and achieves better test set performance . The magnitude of the improvement depends on several factors , but is particularly pronounced at small batch sizes and low temperatures . 2 BACKGROUND . For clarity , we consider the following simplified scenario . Let D ∼ pθ be a discrete random variable D ∈ { 0 , 1 } n in a one-hot encoding , ∑ Di = 1 , with distribution given by pθ ( D ) ∝ exp ( DT θ ) where θ ∈ Rn . Given a continuously differentiable f : R2n → R , we wish to minimize , min θ E [ f ( D , θ ) ] , ( 1 ) where the expectation is taken over all of the randomness . In general θ may be computed with some neural network , so our aim is to derive estimators of the total derivative of the expectation with respect to θ for use in stochastic gradient descent . This framework covers most simple discrete latent variable models , including variational autoencoders ( Kingma & Welling , 2013 ; Rezende et al. , 2014 ) . The REINFORCE estimator ( Glynn , 1990 ; Williams , 1992 ) is unbiased ( under certain smoothness assumptions ) and given by : ∇REINF : = f ( D , θ ) ∂ log pθ ( D ) ∂θ + ∂f ( D , θ ) ∂θ . ( 2 ) Without careful use of control variates ( Mnih & Gregor , 2014 ; Tucker et al. , 2017 ; Grathwohl et al. , 2018 ) , the REINFORCE estimator tends to have prohibitively high variance . To simplify exposition we assume henceforth that f ( D , θ ) = f ( D ) does not depend on θ , because the dependence of f ( D , θ ) on θ is accounted for in the second term of ( 2 ) , which is shared by most estimators and generally has low variance . One strategy for reducing the variance is to introduce bias through a relaxation ( Jang et al. , 2017 ; Maddison et al. , 2017 ) . Define the tempered softmax softmaxτ : Rn → Rn by softmaxτ ( x ) i = exp ( xi/τ ) / ∑n j=1 exp ( xj/τ ) . The relaxations are based on the observation that the sampling of D can be reparameterized using Gumbel random variables and the zero-temperature limit of the tempered softmax under the coupling : D = lim τ→0 Sτ ; Sτ = softmaxτ ( θ +G ) ( 3 ) where G is a vector of i.i.d . Gi ∼ Gumbel random variables . At finite temperatures Sτ is known as a Gumbel-Softmax ( GS ) ( Jang et al. , 2017 ) or concrete ( Maddison et al. , 2017 ) random variable , and the relaxed loss E [ f ( Sτ , θ ) ] admits the following reparameterization gradient estimator for τ > 0:1 ∇GS : = ∂f ( Sτ ) ∂Sτ d softmaxτ ( θ +G ) dθ . ( 4 ) 1For a function f ( x1 , x2 ) , ∂f ( z1 , z2 ) /∂x1 is the partial derivative ( e.g. , a gradient vector ) of f in the first variable evaluated at z1 , z2 . For a function g ( θ ) , dg/dθ is the total derivative of g in θ . For example , d softmaxτ ( θ +G ) /dθ is the Jacobian of the tempered softmax evaluated at the random variable θ +G . This is an unbiased estimator of the gradient of E [ f ( Sτ , θ ) ] , but a biased estimator of our original problem ( 1 ) . For this to be well-defined f must be defined on the interior of the simplex ( where Sτ sits ) . This estimator has the advantage that it is easy to implement and generally low-variance , but the disadvantage that it modifies the forward computation of f and is biased . Henceforth , we assume D , Sτ , and G are coupled almost surely through ( 3 ) . Another popular family of estimators are the so-called straight-through estimators ( c.f. , Bengio et al. , 2013 ; Chung et al. , 2017 ) . In this family , the forward computation of f is unchanged , but backpropagation is computed “ through ” a surrogate . One popular variant takes as a surrogate the tempered probabilities of D , resulting in the slope-annealed straight-through estimator ( ST ) : ∇ST : = ∂f ( D ) ∂D d softmaxτ ( θ ) dθ . ( 5 ) For binary D , a lower bias variant of this estimator ( FouST ) was proposed in Pervez et al . ( 2020 ) . The most popular straight-through estimator is known as the straight-through Gumbel-Softmax ( STGS , Jang et al. , 2017 ) . The surrogate for ST-GS is Sτ , whose Gumbels are coupled to D through ( 3 ) : ∇STGS : = ∂f ( D ) ∂D d softmaxτ ( θ +G ) dθ . ( 6 ) The straight-through family has the advantage that they tend to be low-variance and f need not be defined on the interior of the simplex ( although f must be differentiable at the corners ) . This family has the disadvantage that they are not known to be unbiased estimators of any gradient . These estimators are quite popular in practice , because they preserve the forward computation of f , which prevents the forward propagation of errors and maintains sparsity ( Choi et al. , 2017 ; Chung et al. , 2017 ; Bengio et al. , 2013 ) . All of the estimators discussed in this paper can be computed by any of the standard automatic differentiation software packages using a single evaluation of f on a realization of D or some underlying randomness . We present implementation details for these and our Gumbel-Rao estimator in the Appendix , emphasizing the surrogate loss framework ( Schulman et al. , 2015 ; Weber et al. , 2019 ) and considering the multiple stochastic layer case not covered by ( 1 ) . 3 GUMBEL-RAO GRADIENT ESTIMATOR . 3.1 RAO-BLACKWELLIZATION OF ST-GUMBEL-SOFTMAX . We now derive our Rao-Blackwelization scheme for the ST-GS estimator . Our approach is based on the observation that there is a many-to-one relationship between realizations of θ + G and D in the coupling described by ( 3 ) and that the variance introduced by θ + G can be marginalized out . The resulting estimator , which we call the Gumbel-Rao ( GR ) estimator , is guaranteed by the Rao-Blackwell theorem to have lower variance than ST-GS . In the next subsection we turn to the practical question of carrying out this marginalization . In the Gumbel-max trick ( 3 ) , D is a one-hot indicator of the index of arg maxi { θi +Gi } . Because this argmax operation is non-invertible , there are many configurations of θ +G that correspond to a single D outcome . Consider an alternate factorization of the joint distribution of ( θ +G , D ) : first sample D ∼ pθ , and then θ +G given D. In this view , the Gumbels are auxillary random variables , at which the Jacobian of the tempered softmax is evaluated and which locally increase the variance of the estimator . This local variance can be removed by marginalization . This is the key insight of our GR estimator , which is given by , ∇GR : = ∂f ( D ) ∂D E [ d softmaxτ ( θ +G ) dθ ∣∣∣∣D ] . ( 7 ) It is not too difficult to see that∇GR = E [ ∇STGS|D ] . By the tower rule of expectation , GR has the same expected value as ST-GS and is an instance of a Rao-Blackwell estimator ( Blackwell , 1947 ; Rao , 1992 ) . Thus , it has the same mean as ST-GS , but a lower variance . Taken together , these facts imply that GR enjoys a lower mean squared error ( not a lower bias ) than ST-GS . Proposition 1 . Let ∇STGS and ∇GR be the estimators defined in ( 6 ) and ( 7 ) . Let ∇θ : = dE [ f ( D ) ] /dθ be the true gradient that we are trying to estimate . We have E [ ‖∇GR −∇θ‖2 ] ≤ E [ ‖∇STGS −∇θ‖2 ] . ( 8 ) Proof . The proposition follows from Jensen ’ s inequality and the linearity of expectations , see C.1 . While GR is only guaranteed to reduce the variance of ST-GS , Proposition 1 guarantees that , as a function of τ , the MSE of GR is a pointwise lower bound on ST-GS . This means GR can be used for estimation at temperatures , where ST-GS has low bias but prohibitively high variance . Thus , GR extends the region of suitable temperatures over which one can tune . This allows a practitioner to explore an expanded set when trading-off of bias and variance . Empirically , lower temperatures tend to reduce the bias of ST-GS , but we are not aware of any work that studies the convergence of the derivative in the temperature limit . In our experiments , we observe that our estimator facilitates training at lower temperatures to improve in both bias and variance over ST-GS . Thus , our estimator retains the favourable properties of ST-GS ( single , unmodified evaluation of f ) while improving its performance .
The paper presents a new way algorithm to compute the straight-through variant of the Gumbel Softmax gradient estimator. The method does not change the estimator's bias, but provably reduces its variance (with a small overhead, using Rao-blackwellization). The new estimator shows good performance on different tasks, and appears to lead to more efficient optimization for lower temperatures (lower bias).
SP:8351823091c5320244dec89c71d3319a103cd6a4
Consensus Clustering with Unsupervised Representation Learning
1 INTRODUCTION . Supervised learning algorithms have shown great progress recently , but generally require a lot of labeled data . However , in many domains ( e.g. , advertising , social platforms , etc . ) , most of the available data are not labeled and manually labeling it is a very labor , time , and cost intensive task ( Xiao et al. , 2015 ; Deshmukh , 2019 ; Mintz et al. , 2009 ; Blum & Mitchell , 1998 ) . On the other hand , clustering algorithms do not need labeled data to group similar data points into clusters . Some popular clustering algorithms include k-means , hierarchical clustering , DBSCAN ( Ester et al. , 1996 ) , spectral clustering , etc. , and the usefulness of each algorithm varies with the application . In this work , we deal with the clustering of images . Traditional clustering approaches focus on hand crafted features on which out of the box clustering algorithms are applied . However , hand crafted features may not be optimal , and are not scalable to large scale real word datasets ( Wu et al. , 2019 ) . Advancements in deep learning techniques have enabled end-to-end learning of rich representations for supervised learning . On the other hand , simultaneously learning the feature spaces while clustering leads to degenerate solutions , which until recently limited end to end implementations of clustering with representation learning approaches ( Caron et al. , 2018 ) . Recent deep clustering works take several approaches to address this issue such as alternating pseudo cluster assignments and pseudo supervised training , comparing the predictions with their own high confidence assignments ( Caron et al. , 2018 ; Asano et al. , 2019 ; Xie et al. , 2016 ; Wu et al. , 2019 ) , and maximizing mutual information between predictions of positive pairs ( Ji et al. , 2019 ) . Although these methods show impressive performance on challenging datasets , we believe taking advantage of rich ideas from ensemble learning for clustering with representation learning will enhance the performance of deep clustering methods . Ensemble learning methods train a variety of learners and build a meta learner by combining the predictions of individual learners ( Dietterich , 2000 ; Breiman , 1996 ; Freund et al. , 1996 ) . In practice they have been heavily used in supervised learning setting . Ensemble learning methods have also found their place in clustering i.e . knowledge reuse framework ( Strehl & Ghosh , 2002 ) where a consensus algorithm is applied on constituent cluster partitions to generate an updated partition that clusters the data better than any component partition individually . However , the knowledge reuse framework and much of the consensus clustering literature that followed ( Fern & Brodley , 2003 ; Fred & Jain , 2005 ; Topchy et al. , 2005 ) do not make use of the underlying features used to generate the ensemble . We propose the use of consensus clustering as a way to extend ensemble methods to unsupervised representation learning . In particular , we define a ’ disagreement ’ measure among the constituents of the ensemble . The key motivation for this is that the diversity of the ensemble drives the minimization of the disagreement measure in a synergistic way , thereby leading to better representations . We propose Consensus Clustering with Unsupervised Representation Learning ( ConCURL ) and following are our main contributions : 1 . A novel ensemble learning algorithm which learns representations by creating a consensus on multiple clustering outputs generated by applying random transformations on the embeddings . 2 . Our method outperforms the current state of the art clustering algorithms on popular computer vision datasets based on clustering metrics ( A.4 ) . 3 . Even though there is no labeled data available while learning representations , clustering may still be prone to be overfitting to the “ training data. ” As stated in Bubeck & Von Luxburg ( 2007 ) , in clustering , we generally assume that the finite data set has been sampled from some underlying space and the goal is to find the true approximate partition of the underlying space rather than the best partition in a given finite data set . Hence , to check generalizability of the method proposed we also evaluate our models on the “ test data ” - data that was not available during training/representation learning . Our method is more generalizable compared to state of the art methods ( i.e . it outperforms the other algorithms when evaluated on the test set ) . 2 RELATED WORK . Clustering is a ubiquitous task and it has been actively used in many different scientific and practical pursuits such as detecting genes from microarray data ( Frey & Dueck , 2007 ) , clustering faces ( Rodriguez & Laio , 2014 ) , and segmentation in medical imaging to support diagnosis ( Masulli & Schenone , 1999 ) . We refer interested readers to these excellent sources for a survey of these uses Jain et al . ( 1999 ) ; Liao ( 2005 ) ; Xu & Wunsch ( 2005 ) ; Nugent & Meila ( 2010 ) . Clustering with Deep Learning : In their influential work , Caron et al . ( 2018 ) show that it is possible to train deep convolutional neural networks with pseudo labels that are generated by a clustering algorithm ( DeepCluster ) . More precisely , in DeepCluster , previous versions of representations are used to assign pseudo labels to the data using an out of the box clustering algorithm such as k-means . These pseudo labels are used to improve the learned representation of the data by minimizing a supervised loss . Along the same lines , several more methods have been proposed . For example , Gaussian ATtention network for image clustering ( GATCluster ) ( Niu et al. , 2020 ) comprises four self-learning tasks with the constraints of transformation invariance , separability maximization , entropy analysis and attention mapping . Training is performed in two distinct steps , similar to Caron et al . ( 2018 ) where the first step is to compute pseudo targets for a large batch of data and the second step is to train the model in a supervised way using the pseudo targets . Both DeepCluster and GATCluster use k-means to generate pseudo labels which may not scale well . Wu et al . ( 2019 ) propose Deep Comprehensive Correlation Mining ( DCCM ) , where discriminative features are learned by taking advantage of the correlations of the data using pseudo-label supervision and triplet mutual information among features . However , DCCM may be susceptible to trivial solutions ( Niu et al. , 2020 ) . Invariant Information Clustering ( IIC ) ( Ji et al. , 2019 ) maximizes mutual information between the class assignments of two different views of the same image ( paired samples ) in order to learn representations that preserve what is common between the views while discarding instance specific details . Ji et al . ( 2019 ) argue that the presence of an entropy term in mutual information plays an important role in avoiding the degenerate solutions . However a large batch size is needed for the computation of mutual information in IIC , which may not be scalable for larger image sizes which are common in popular datasets ( Ji et al. , 2019 ; Niu et al. , 2020 ) . Huang et al . ( 2020 ) extend the traditional maximal margin clustering idea to the deep learning paradigm , by learning the most semantically plausible clustering through minimizing a proposed partition uncertainty index . Their algorithm PICA uses a stochastic version of the index , thereby facilitating mini-batch training . PICA fails to assign a sample-correct cluster when that sample either has high foreground or background similarity to samples in other clusters . SCAN ( Van Gansbeke et al. , 2020 ) uses the learnt representations from a pretext task to find semantically closest images to the given image using nearest neighbors . SCAN achieves state-of-the-art results on CIFAR-10 , CIFAR-100 , STL-10 , however using such priors from existing pretext tasks deviates from the main idea of our paper of end-to-end learning . We believe however that we can benefit by using SCAN on top of the features learnt using our algorithm to improve the clustering accuracy . Our proposed approach ConCURL is scalable to large datasets , does not suffer from trivial solutions and shows superior performance on a challenging set of image data sets . As shown in the experimental results , our proposed method also generalizes well to data points that were not available during training , when compared to the above approaches . Self-supervised Representation Learning : Self-supervised learning is a sub-field of unsupervised learning in which the main goal is to learn general purpose representations by exploiting userdefined sub-tasks such as the relationship between different views of the same data . Although self-supervised learning methods show impressive performance on a variety of problems , it is not clear whether learned representations are good for clustering . There are many different flavors of self supervised learning such as Instance Recognition tasks ( Wu et al. , 2018 ) , contrastive techniques ( Chen et al. , 2020 ) , etc . In instance recognition tasks , each image is considered as its own category so that the learnt embeddings are well separated . Zhuang et al . ( 2019 ) propose a novel Local Aggregation method based on non-parametric instance discrimination tasks . They use a robust clustering objective ( using multiple runs of k-means ) to move statistically similar data points closer in the representation space and dissimilar data points further away . However , instance recognition tasks usually require a large memory bank which is memory intensive . In contrastive learning ( Tian et al. , 2019 ; He et al. , 2020 ; Hénaff et al. , 2019 ; Hjelm et al. , 2018 ; Chen et al. , 2020 ) , representations are learned by maximizing agreement between different augmented views of the same data example ( known as positive pairs ) and minimizing agreement between augmented views of different examples ( known as negative pairs ) . SimCLR ( Chen et al. , 2020 ) achieves state-of-the-art-results without specialized architectures or a memory bank of negative pairs ( usually required by contrastive learning techniques ) . However , it still requires negative examples and , as it applies to instance classification , it has to compare every pair of images . These issues are addressed by Bootstrap your own latent ( BYOL ) ( Grill et al. , 2020 ) and Swapping Assignments between multiple Views ( SwAV ) ( Caron et al. , 2020 ) . BYOL does not require negative examples and SwAV does not need to compare every pair of images . For the main study in this paper we use BYOL as a representation learning block and adapt the soft clustering loss which was used in SwAV to learn prototypes , thereby addressing both the issues of negative samples and need for comparing every pair of images . Note that our proposed algorithm can use any representation learning block like SimCLR , BYOL , & SwAV and can also use other soft clustering loss formulations . Consensus Clustering : Strehl & Ghosh ( 2002 ) propose a knowledge reuse framework ; to build an unsupervised ensemble by using several distinct clusterings of the same data and assuming that the underlying features that are used to compute the clustering are not available and fixed . Fern & Brodley ( 2003 ) build on the cluster ensemble framework based on random projections . In this framework , Fern & Brodley ( 2003 ) show that a single run of clustering ( random projection + Expectation Maximization ) is highly unstable . They perform multiple runs of clustering and compute an aggregated similarity matrix which is used to cluster the data using an agglomerative clustering algorithm . Fred & Jain ( 2005 ) propose a voting approach to map the cluster assignments in the ensemble into a new similarity measure between clusterings . The co-association matrix thus formed can be used with any clustering algorithm to result in a new data partition . Weighted cluster ensembles ( Domeniconi & Al-Razgan , 2009 ) uses Locally Adaptive Clustering ( LAC ) ( Domeniconi et al. , 2004 ) as a base algorithm which assigns weights to each feature of the sample according to the local variance of data along each dimension . Authors use LAC with different hyperparameters and propose three different partitioning algorithms to generate consensus among LAC clusterings . Huang et al . ( 2017 ) argues that most ensemble based methods treat all base clusterings equally and a few which weigh the base clusterings give those weights globally . Authors propose an ensemble clustering approach based on cluster uncertainty ( calculated by entropic criterion ) and a local weighting strategy . There are also survey papers which have in depth analysis and details of various methods used in consensus clusteringVega-Pons & Ruiz-Shulcloper ( 2011 ) ; Ghosh & Acharya ( 2011 ) . It is not clear how any of these methods can be adapted when one needs to do representation learning along with clustering . It is also not clear if one can come up with end-to-end learning architecture with any of the above methods . In contrast , our proposed consensus clustering method ConCURL can easily be integrated into any deep learning architecture for clustering and trained end-to-end .
The authors propose a learning-based approach for image clustering. In particular, similarly to recent algorithms fro unsupervised representation learning, such a DeepCluster, they propose to iterate between clustering the images in the feature space of the network and updating the network weights to respect the clusters. Two main differences with respect to DeepCluster-like algorithms is that they target the task of clustering itself, and do not evaluate the generalizability of the leaned representations for other tasks, and that they propose to use cluster ensembles to improve training robustness. In particular, they generate 2 clusterings of the images at every iteration by applying different sets of data augmentations and feature transformations to the input images. The objective is then not only to respect these clusterings but also to enforce consistency between them over time, thus improving representation invariance to irrelevant image details. In an experimental evaluation on a set of standard image clustering benchmarks they outperform prior work in most scenarios.
SP:ba35b6f0d26b7a9d982a99116326047f496e5a03
DJMix: Unsupervised Task-agnostic Augmentation for Improving Robustness
1 INTRODUCTION CNNs are the de facto standard components of image recognition tasks and achieve excellent performance . However , CNNs are vulnerable to unseen noise on input images . Such harmful noise includes not only adversarially generated noise ( Szegedy et al. , 2014 ; Goodfellow et al. , 2014 ) , but also naturally possible noise such as blur by defocusing and artifacts generated by JPEG compression ( Vasiljevic et al. , 2016 ; Hendrycks & Dietterich , 2019 ) . Natural noise on input images is inevitable in the real world ; therefore , making CNNs robust to natural noise is crucial for practitioners . A simple approach to solving this problem is adding noise to training images , but this does not make models generalize to unseen corruptions and perturbations ( Vasiljevic et al. , 2016 ; Geirhos et al. , 2018 ; Gu et al. , 2019 ) . For example , even if Gaussian noise of a certain variance is added during training , models fail to generalize to Gaussian noise of other variances . Nonetheless , some data augmentation methods are effective for improving robustness . For example , Yin et al . reported that extensive augmentation , such as AutoAugment ( Cubuk et al. , 2019 ) , improves the robustness . Similarly , Hendrycks et al . proposed to mix differently augmented images during training to circumvent the vulnerability . We will further review previous approaches in Section 2 . Despite the effectiveness of these data augmentation and mixing approaches , these methods require handcrafted image transformations , such as rotation and solarizing . Particularly when geometrical transformations are used , the mixed images can not have trivial targets in non classification tasks , for instance , semantic segmentation and detection . This lack of applicability to other tasks motivates us to introduce robust data augmentation without such transformations . In this paper , we propose Discretizing and Joint Mixing ( DJMix ) which mixes original and discretized training images to improve the robustness . The difference between the original and obtained images is nearly imperceptible , as shown in Figure 1 , which enables the use of DJMix in various image recognition tasks . In Section 3 , we will introduce DJMix and analyze it empirically and theoretically . We show that DJMix reduces mutual information between inputs and internal representations to ignore harmful features and improve CNNs ’ resilience to test-time noise . To benchmark the robustness of CNNs to unseen noise , Hendrycks & Dietterich ( 2019 ) introduced ImageNet-C as a corrupted counterpart of the ImageNet validation set ( Russakovsky et al. , 2015 ) . CNN models are evaluated using this dataset on the noisy validation set , whereas they are trained without any prior information on the corruptions on the original training set . Similarly , Geirhos et al . created noisy ImageNet and compared different behaviors between humans and CNN models with image noise . In addition to these datasets designed for classification , we cre- ated Segmentation-C and Detection-C datasets , which are corrupted counterparts of the PASCAL-VOC validation sets ( Everingham et al. , 2015 ) . We demonstrate the robustness of CNN models trained with DJMix on various tasks using these benchmark datasets in Section 4 . Additionally , we perform experimental analyses , including ablation studies , to verify DJMix in Section 5 . In summary , our contributions are summarized as follows : 1 . We introduce DJMix , a simple task-agnostic data augmentation method for improving robustness . DJMix mixes the original and discretized training images and can be straightforwardly adapted to various image recognition tasks . We empirically demonstrate the effectiveness of this approach . 2 . We analyze DJMix theoretically from the Information Bottleneck perspective , which could help analyze other robust methods . We also investigate DJMix from the Fourier sensitivity perspective . 3 . We create datasets , Segmentation-C and Detection-C , to benchmark the robustness of CNN models on semantic segmentation and detection tasks . 2 RELATED WORK Small corruptions or perturbations on images can drastically change the predictions of CNN models . While adversarially generated noise , i.e. , adversarial examples ( Szegedy et al. , 2014 ; Goodfellow et al. , 2014 ) , can be thought of as the worst case , natural noise also harms the performance of CNNs . Such natural noise includes blurs and artifacts generated by JPEG compression ( Vasiljevic et al. , 2016 ; Hendrycks & Dietterich , 2019 ) . Because of this vulnerability , CNN models sometimes predict inconsistently among adjacent video frames ( Gu et al. , 2019 ; Hendrycks & Dietterich , 2019 ) . For the real-world application of CNNs , this vulnerability needs to be overcome . A strong defense against adversarial examples is adversarial training , where CNN models are trained with adversarial examples ( Goodfellow et al. , 2014 ; Madry et al. , 2018 ) . Unfortunately , this approach fails in natural noise , because CNNs trained on a specific type of noise do not generalize to other types of noise ( Geirhos et al. , 2018 ; Vasiljevic et al. , 2016 ) . Instead , we need robust methods that are agnostic to test-time noise a priori ( Hendrycks & Dietterich , 2019 ) . Data augmentation is a practical approach to improving the generalization ability on clean data , e.g. , by randomly flipping and cropping ( Krizhevsky et al. , 2012 ; He et al. , 2016 ) , mixing different images ( Zhang et al. , 2018 ; Tokozume et al. , 2018 ) , or erasing random regions ( DeVries & Taylor ; Zhong et al. , 2020 ) . Some types of data augmentation are also reported to improve robustness . For example , strong data augmentation , namely , AutoAugment ( Cubuk et al. , 2019 ) , can improve the robustness ( Yin et al. , 2019 ) . Similarly , AugMix is a data augmentation method to alleviate the problem by mixing images that are differently augmented from each input image . CNNs exploit the texture or higher-frequency domains of images ( Jo & Bengio , 2017 ; Ilyas et al. , 2019 ; Wang et al. , 2020 ) , and thus , CNNs trained on detextured ImageNet images by style transfer show robustness to noise on input images ( Geirhos et al. , 2019 ) . Orthogonal to manipulating input images , enhancing CNN architectures or components is also a possible direction . Larger CNN models with feature aggregation used in DenseNet ( Huang et al. , 2017 ) and ResNeXt ( Xie et al. , 2017 ) show better robustness to natural noise ( Gu et al. , 2019 ; Hendrycks & Dietterich , 2019 ) . MaxBlur has been proposed to improve the shift invariance of subsampling operations used in pooling operations , e.g. , MaxPooling , and enhance the robust performance ( Zhang , 2019 ) . Our approach , DJMix , belongs to the first ones , which use data augmentation to enhance robustness . Unlike previous methods , DJMix applies imperceptible and task-agnostic augmentation to images . This property allows us to use DJMix for various image recognition tasks . 3 DJMIX FOR ROBUST DATA AUGMENTATION A CNN model fθ : RD → RD ′ is usually trained to minimize the task loss ℓ ( fθ ( x ) , y ) , where x ∈ RD is an input image , and y ∈ RD′ is its target . When the task is a D′-category classification task , y is a one-hot vector and ℓ is cross-entropy . DJMix uses a pair of loss functions , the task loss ℓ ( fθ ( x̂ ) , y ) and the consistency loss d ( fθ ( x̂ ) , fθ ( x ) ) . Then , CNN models are trained to minimize ℓ ( fθ ( x̂ ) , y ) + γd ( fθ ( x̂ ) , fθ ( x ) ) , ( 1 ) where γ is a positive coefficient . x̂ ∈ RD is a discretized image of an input image x , which we will describe in Section 3.1 , and d is a divergence , such as the Jensen–Shannon divergence ( Section 3.2 ) . We will discuss why DJMix improves robustness in Sections 3.3 and 3.4 , both theoretically and empirically . 3.1 DISCRETIZATION OF IMAGES DJMix discretizes each input image x into g ( x ) , where g : RD → RD is a discretizing autoencoder ( DAE ) , whose bottleneck is discretized . Specifically , we used the Vector-Quantized Variational AutoEncoder used by van den Oord et al . ( 2017 ) and Razavi et al . ( 2019 ) . This DAE g has a bottleneck of dimension C and discretizes the features by vector quantization with the codebook size of 2K . DAE is pretrained on training data to minimize Ex‖g ( x ) − x‖22 in an unsupervised manner . As we will show in Section 5 , mixing each input image and its discretized one improves the robustness . More precisely , instead of using x̂ = g ( x ) , we use x̂ = βx+ ( 1− β ) g ( x ) , ( 2 ) where β ∈ [ 0 , 1 ] is sampled from a random distribution . Following Zhang et al . ( 2018 ) , we adopt Beta distribution . Although this mixing strategy is similar to that of AugMix , some differences exist . A major difference is the discrepancy between x and x̂ . Because AugMix applies geometric and color-enhancing operations to obtain x̂ , its appearance is different from x , whereas DJMix yields a nearly identical x̂ from x . A minor difference is the task loss : DJMix uses ℓ ( fθ ( x̂ ) , y ) , whereas AugMix uses ℓ ( fθ ( x ) , y ) . We will analyze this difference in Section 5 . 3.2 CONSISTENCY LOSS The consistency loss d ( fθ ( x̂ ) , fθ ( x ) ) forces a CNN model to map x and x̂ closely and make these representations indistinguishable . Following Hendrycks et al . ( 2020 ) , we use the Jensen–Shannon ( JS ) divergence as the divergence d. We compare other divergences and distances with the JS divergence in Section 5 . DJMix appears similar to AugMix ( Hendrycks et al. , 2020 ) , as both use the mixing of images and the consistency loss . However , the details of the mixing processes are different : whereas AugMix yields a different looking x̂ from x , DJMix augments a similar x̂ to x. Owing to this property , DJMix can be used in various image recognition tasks , as we will show in Section 4 . Additionally , the task loss of DJMix uses mixed images as ℓ ( fθ ( x̂ ) , y ) , whereas that of AugMix uses the original image as ℓ ( fθ ( x ) , y ) . Empirically , we found that ℓ ( fθ ( x̂ ) , y ) improves the robustness compared with ℓ ( fθ ( x ) , y ) , which we will show in Section 5.1 . 3.3 FROM INFORMATION BOTTLENECK PERSPECTIVE The Information Bottleneck objective ( Tishby et al. , 2000 ) can be written with an intermediate feature z of a model fθ as maxθ I ( z , y ; θ ) s.t . I ( x , z ; θ ) ≤ I , where I ( w , v ) : = DKL ( p ( w , v ) ||p ( w ) p ( v ) ) is mutual information between w and v , and I is a positive constraint . Supervised training is expected to maximize I ( z , y ; θ ) . However , without the constraint , z highly likely contains unnecessary details of the input ; then the models learn vulnerable representation ( Alemi et al. , 2017 ; Fisher & Alemi , 2020 ) . Importantly , DJMix introduces this constraint to improve the robustness by ignoring task-irrelevant details . For the following theorem , we assume that β in Equation ( 2 ) is 0 , and fθ and g have enough capacities to achieve training losses being 0 . Theorem 1 . Let z be fθ ( x ) . After convergence of the model fθ trained with DJMix , mutual information is constrained by the logarithm of the codebook size , i.e. , I ( x , z ; θ ) ≤ K. ( 3 ) Proof . After convergence , d ( fθ ( x̂ ) , fθ ( x ) ) becomes 0 , or equivalently , fθ ( x̂ ) = fθ ( x ) from the assumption . x is quantized into a codeword x̂ ∈ { 1 , 2 , . . . , 2K } in the DAE g. Therefore , we obtain K = H ( Uniform { 1 , 2 , . . . , 2K } ) ( H : entropy ) = H ( x̂ ) ≥ H ( x̂ ) −H ( x̂ | fθ ( x̂ ) ) = I ( fθ ( x̂ ) , x̂ ) ≥ I ( fθ ( x ) , x ) ( from Data Processing Inequality ) = I ( x , z ) 3.4 FROM FOURIER SENSITIVITY PERSPECTIVE Figure 2 presents the sensitivity of CNN models trained with and without DJMix to additive noise of Fourier-basis vectors ( Yin et al. , 2019 ) . Here , we used WideResNet trained on CIFAR10 . As can be seen , DJMix improves robustness to a wide range of frequencies : from lower frequencies , depicted in the center area , to higher frequencies , which appearing in the edges . These results imply why CNN models trained with DJMix show robustness to input images with noise . The experiments discussed in Section 4 further demonstrate more empirical robustness of DJMix . 4 EXPERIMENTS AND RESULTS In this section , we present experimental results . We first introduce experimental settings and new datasets , Segmentation-C , and Detection-C , whose input images are artificially corrupted to measure the robustness . Then , we present empirical results and comparisons with other methods in Section 4.1 for classification , Section 4.2 for semantic segmentation , and Section 4.3 for detection . We conducted the experiments three times with different random seeds for each setting and reported the averaged values , except for ImageNet experiments . We describe the additional details of the experiments in Appendix B . IMPLEMENTATION We implemented DJMix as well as CNN models using PyTorch ( Paszke et al. , 2019 ) and used FAISS ( Johnson et al. , 2017 ) to make the nearest neighbor search in DAE faster . We used classification models used by Hendrycks et al . ( 2020 ) 1 . For segmentation and detection tasks , we used DeepLab-v3 and Faster-RCNN from torchvision2 , whose backbone networks are ResNet-50 ( He et al. , 2016 ) pretrained on ImageNet ( Russakovsky et al. , 2015 ) . DAE is pretrained on each dataset for the classification task and on ImageNet for other tasks . We set a dictionary size to 512 , i.e. , K = 9 , following Razavi et al . ( 2019 ) . We set the parameters of Beta distribution ( β0 , β1 ) for mixing in Equation ( 2 ) to ( 1.0 , 0.5 ) , and the coefficient for the consistency loss γ to 1.0 . DJMix is a task-agnostic method and can improve robustness by itself . Additionally , DJMix can be incorporated with task-specific data augmentation . We introduce a DJMix variant that applies random data augmentation ( DJMix+RA ) , consisting of AugMix ’ s augmentation operations . We describe more details of RA in Appendix B.5 . DATASETS For classification , we used three datasets , CIFAR10 , CIFAR100 ( Krizhevsky , 2009 ) , and ImageNet ( Russakovsky et al. , 2015 ) , consisting of 10 , 100 , and 1,000 categories , respectively . We trained CNN models on clean training sets and evaluated the models using the accompanying clean test sets . We also evaluated the models on corrupted test sets ( CIFAR10-C , CIFAR100-C , and ImageNet-C ) proposed by Hendrycks & Dietterich ( 2019 ) , which are created to measure the behavior of CNN models with 15 common corruptions . To benchmark the robustness in segmentation and detection tasks , we created Segmentation-C and Detection-C datasets from PASCAL VOC-2012 ( Everingham et al. , 2015 ) . Namely , we degenerated images of the test set of PASCAL VOC-2012 for segmentation and the validation set of PASCAL VOC-2012 for detection using 10 degeneration operations used in ImageNet-C : gaussian_noise , shot_noise , impulse_noise , snow , frost , fog , brightness , contrast , pixelate , and jpeg_compression . We omitted five blur operations , namely defocus_blur , glass_blur , motion_blur , zoom_blur , and gaussian_blur , because the expected outputs for segmentation and detection under corruption are not trivial . Examples of Segmentation-C are presented in Figure 3 . Following the convention , we trained models on the augmented dataset of PASCAL-VOC ( Hariharan et al. , 2011 ) for segmentation and the union of train and validation datasets of VOC-2007 and VOC-2012 for detection . Similar to 1https : //github.com/google-research/augmix 2https : //github.com/pytorch/vision/tree/v0.7.0 . Detection-C , Michaelis et al . ( 2019 ) also created corrupted test images of detection datasets for autonomous driving . METRICS For the classification task , we use the error rates as the metric on the original test sets . On the corrupted data , we measure the corrupted error rate Ec , s , where c is the corruption type , e.g. , Gaussian noise , and s is the severity level , and report the statistics . Precisely , we use the averaged scores Ec , sEc , s for CIFAR10-C and CIFAR100-C , and Corruption Error EsEc , s/EsEAlexNetc , s for ImageNet-C , following Hendrycks & Dietterich ( 2019 ) , where EAlexNetc , s is the error rate of AlexNet ( Krizhevsky et al. , 2012 ) . For the segmentation task , we report the mean intersection over union ( mIoU ) on the clean data . On Segmentation-C , we use corrupted mIoU Ic , s and report averaged mIoU EsIc , s . Similarly , for the detection task , we report mean average precision ( mAP ) on the clean data and averaged corrupted mAP EsAc , s of corrupted mAP Ac , s on Detection-C. 4.1 CLASSIFICATION We trained models on CIFAR10 , CIFAR100 , and ImageNet . For CIFAR10 and CIFAR100 , we used DenseNet-BC ( k = 12 , d = 100 ) ( Huang et al. , 2017 ) , WideResNet-28-2 ( Zagoruyko & Komodakis , 2016 ) , and ResNeXt-29 ( Xie et al. , 2017 ) . For ImageNet , we used ResNet-50 ( He et al. , 2016 ) . The results on CIFAR10 and CIFAR100 are presented in Table 1 with comparison with the baseline , mixup ( Zhang et al. , 2018 ) , AugMix , and AugMix without geometric transformations ( GT ) . Table 1 shows that AugMix without GTs degenerates performance both on clean and corrupted data from AugMix , indicating that the robustness of AugMix heavily depends on GTs . DJMix shows balanced performance between clean and corrupted data , without such GTs . DJMixwith RA further decreases error rates on corrupted datasets , as well as on clean datasets . We present the results on ImageNet in Table 2 . Again , DJMix decreases Corruption Errors , particularly when strong data augmentation is introduced ( DJMix+RA ) . 4.2 SEMANTIC SEGMENTATION We trained DeepLab-v3 ( Chen et al. , 2017 ) on PASCAL-VOC . The logits before upsampling are used for the consistency loss . Table 3 shows the mIoU comparison of baseline , AugMix without GTs ( AugMix∗ ) , DJMix , and DJMixwith random augmentation without GTs ( DJMix+RA∗ ) . We omitted GTs , because defining the targets for mixed images that differently applied GTs are not trivial for segmentation and detection tasks . AugMix w/o GT uses pairs of original and augmented images , i.e. , the width is set to 2 . As can be seen , DJMix improves the robustness , especially when combined with extra data augmentation . In some cases , such as Gaussian noise , shot noise , and impulse noise , DJMix+RA markedly enhances the performance from DJMix and AugMix w/o GT , which implies the importance of the combination of task-specific and task-agnostic augmentation in practice . 4.3 DETECTION We trained Faster-RCNN ( Ren et al. , 2015 ) on PASCAL-VOC . The consistency loss between the output logits of the backbone network is used for training . Table 4 shows that DJMix yields better performance on almost all corruption types . As semantic segmentation , we compare baseline , AugMix∗ , DJMix , and DJMix+RA∗ . Similarly to semantic segmentation , DJMix markedly improves the robustness in the detection task . 5 ANALYSIS 5.1 ABLATION STUDIES DESIGN OF TASK LOSS : The task loss of DJMix presented in Equation ( 1 ) is ℓ ( fθ ( x̂ ) , y ) , but ℓ ( fθ ( x ) , y ) , as AugMix , is also a possible choice . We compare these choices in Table 5 ( a , b ) . ℓ ( fθ ( x̂ ) , y ) improves the robustness compared with ℓ ( fθ ( x ) , y ) . CHOICE OF CONSISTENCY LOSS : DJMix uses JS divergence as the consistency loss , but other divergences can also be used as the loss function . Here , we compare the performance when JS divergence is replaced with KL divergence and L2 distance . As can be seen from Table 5 ( a , c ) , JS and KL show similar performance , whereas L2 shows performance degeneration on corrupted data . EFFECT OF DISCRETIZATION : We verify the effect of the discretization of DJMix using DAE by substituting the standard autoencoder for DAE . Namely , we removed vector quantization modules of DAE and pretrained the AE on the training data to minimize the reconstruction error as DAE . Table 5 ( a , d ) shows that discretization improves CNNs ’ robustness as expected from the Information Bottleneck perspective presented in Section 3.3 . EFFECT OF MIXING : Table 5 ( e ) shows test error rates of DJMix without mixing , i.e. , β = 0 in Equation ( 2 ) where only discretized images are used . The results show that mixing is indispensable to retain the performance on clean data . We present further experiments on betas in Appendix B . 5.2 COMPUTATIONAL OVERHEAD OF DJMIX We find that the computational overhead by the DAE is negligible . However , the number of forward passes affects the training time . For instance , the standard training on CIFAR10 using WideResNet for 200 epoch requires approximately 1 hour in our environment . DJMix with two forward passes per update takes about 2 hours , and AugMix with three forward passes per update takes about 3 hours . Importantly , DJMix does not modify the components of CNNs as AugMix ; therefore , these methods do not affect the test-time speed , which is preferable for the real-world applications . 6 CONCLUSION In this paper , we have proposed DJMix , a novel task-agnostic approach to make CNN models robust to test-time corruption . To achieve task-agnostic robustness , we have used an autoencoder with a discretization bottleneck . Unlike previous approaches , the image modification of DJMix does not affect the appearance of images , which is useful for non classification tasks . Experiments have shown that DJMix improves the robustness of CNN models to input noise in semantic segmentation and detection , in addition to classification . We have found that combining task-specific and taskagnostic augmentation methods further improves performance on noisy images . We hope that data augmentation for robustness , including DJMix , bridges research and the real-world practice of deep learning . REFERENCES Alexander A. Alemi , Ian Fischer , Joshua V. Dillon , and Kevin Murphy . Deep variational information bottleneck . In ICLR , 2017 . Liang-Chieh Chen , George Papandreou , Florian Schroff , and Hartwig Adam . Rethinking Atrous Convolution for Semantic Image Segmentation . arXiv , 2017 . Ekin D. Cubuk , Barret Zoph , Dandelion Mane , Vijay Vasudevan , and Quoc V. Le . Autoaugment : Learning augmentation strategies from data . In CVPR , 2019 . Terrance DeVries and Graham W. Taylor . Improved Regularization of Convolutional Neural Networks with Cutout . arXiv . M Everingham , S M A Eslami , L VanGool , C K I Williams , J Winn , and A Zisserman . The Pascal Visual Object Classes Challenge : A Retrospective . In ICCV , 2015 . Ian Fisher and Alexander A. Alemi . Ceb improves model robustness . In ICLR , 2020 . Robert Geirhos , Heiko H. Schütt , Carlos R. Medina Temme , Matthias Bethge , Jonas Rauber , and Felix A. Wichmann . Generalisation in humans and deep neural networks . In NeurIPS , 2018 . Robert Geirhos , Claudio Michaelis , Felix A. Wichmann , Patricia Rubisch , Matthias Bethge , and Wieland Brendel . Imagenet-trained CNNs are biased towards texture ; increasing shape bias improves accuracy and robustness . In ICLR , 2019 . Ian J. Goodfellow , Jonathon Shlens , and Christian Szegedy . Explaining and Harnessing Adversarial Examples . arXiv , 2014 . Keren Gu , Brandon Yang , Jiquan Ngiam , Quoc Le , and Jonathon Shlens . Using Videos to Evaluate Image Model Robustness . arXiv , 2019 . B Hariharan , P Arbeláez , L Bourdev , S Maji , and J Malik . Semantic contours from inverse detectors . In ICCV , 2011 . Kaiming He , Xiangyu Zhang , Shaoqing Ren , and Jian Sun . Deep Residual Learning for Image Recognition . In CVPR , 2016 . Dan Hendrycks and Thomas Dietterich . Benchmarking neural network robustness to common corruptions and perturbations . In ICLR , 2019 . Dan Hendrycks , Norman Mu , Ekin D. Cubuk , Barret Zoph , Justin Gilmer , and Balaji Lakshminarayanan . AugMix : A Simple Data Processing Method to Improve Robustness and Uncertainty . In ICLR , 2020 . Gao Huang , Zhuang Liu , Kilian Q. Weinberger , and Laurens van der Maaten . Densely Connected Convolutional Networks . In CVPR , 2017 . Andrew Ilyas , Shibani Santurkar , Dimitris Tsipras , Logan Engstrom , Brandon Tran , and Aleksander Madry . Adversarial examples are not bugs , they are features . In NeurIPS , 2019 . Jason Jo and Yoshua Bengio . Measuring the tendency of cnns to learn surface statistical regularities . arXiv , 2017 . Jeff Johnson , Matthijs Douze , and Hervé Jégou . Billion-scale similarity search with GPUs . arXiv , 2017 . Alex Krizhevsky . Learning Multiple Layers of Features from Tiny Images . Technical report , 2009 . Alex Krizhevsky , Ilya Sutskever , and Geoffrey E Hinton . ImageNet Classification with Deep Convolutional Neural Networks . In NIPS , 2012 . Ilya Loshchilov and Frank Hutter . SGDR : Stochastic Gradient Descent with Warm Restarts . In ICLR , 2016 . Aleksander Madry , Aleksandar Makelov , Ludwig Schmidt , Dimitris Tsipras , and Adrian Vladu . Towards Deep Learning Models Resistant to Adversarial Attacks . In ICLR , 2018 . Claudio Michaelis , Benjamin Mitzkus , Robert Geirhos , Evgenia Rusak , Oliver Bringmann , Alexander S. Ecker , Matthias Bethge , and Wieland Brendel . Benchmarking robustness in object detection : Autonomous driving when winter is coming . arXiv , 2019 . Adam Paszke , Sam Gross , Francisco Massa , Adam Lerer , James Bradbury , Gregory Chanan , Trevor Killeen , Zeming Lin , Natalia Gimelshein , Luca Antiga , Alban Desmaison , Andreas Kopf , Edward Yang , Zachary DeVito , Martin Raison , Alykhan Tejani , Sasank Chilamkurthy , Benoit Steiner , Lu Fang , Junjie Bai , and Soumith Chintala . PyTorch : An Imperative Style , High-Performance Deep Learning Library . In NeurIPS , 2019 . Ali Razavi , Aäron van den Oord , and Oriol Vinyals . Generating diverse high-fidelity images with VQ-VAE-2 . In NeurIPS , 2019 . Shaoqing Ren , Kaiming He , Ross Girshick , and Jian Sun . Faster R-CNN : Towards Real-Time Object Detection with Region Proposal Networks . In NIPS , 2015 . Olga Russakovsky , Jia Deng , Hao Su , Jonathan Krause , Sanjeev Satheesh , Sean Ma , Zhiheng Huang , Andrej Karpathy , Aditya Khosla , Michael Bernstein , Alexander C. Berg , and Li Fei-Fei . ImageNet Large Scale Visual Recognition Challenge . IJCV , 2015 . Christian Szegedy , Wojciech Zaremba , Ilya Sutskever , Joan Bruna , Dumitru Erhan , Ian Goodfellow , and Rob Fergus . Intriguing properties of neural networks . In ICLR , 2014 . Naftali Tishby , Fernando C Pereira , and William Bialek . The information bottleneck method . In The 37th Annual Allerton Conference on Communication , Control , and Computing , 2000 . Yuji Tokozume , Yoshitaka Ushiku , and Tatsuya Harada . Between-class Learning for Image Classification . In ICLR , 2018 . Aaron van den Oord , Oriol Vinyals , and Koray Kavukcuoglu . Neural Discrete Representation Learning . In NIPS , 2017 . Igor Vasiljevic , Ayan Chakrabarti , and Gregory Shakhnarovich . Examining the Impact of Blur on Recognition by Convolutional Networks . arXiv , 2016 . URL http : //arxiv.org/abs/ 1611.05760 . Haohan Wang , Xindi Wu , Zeyi Huang , and Eric P. Xing . High-frequency component helps explain the generalization of convolutional neural networks . In CVPR , June 2020 . Saining Xie , Ross Girshick , and Piotr Doll . Aggregated Residual Transformations for Deep Neural Networks . In CVPR , 2017 . Dong Yin , Raphael Gontijo Lopes , Jon Shlens , Ekin Dogus Cubuk , and Justin Gilmer . A fourier perspective on model robustness in computer vision . In NeurIPS , 2019 . Sergey Zagoruyko and Nikos Komodakis . Wide Residual Networks . In BMVC , 2016 . Hongyi Zhang , Moustapha Cisse , Yann N. Dauphin , and David Lopez-Paz . mixup : Beyond Empirical Risk Minimization . In ICLR , 2018 . Richard Zhang . Making convolutional networks shift-invariant again . In ICML , 2019 . Zhun Zhong , Liang Zheng , Guoliang Kang , Shaozi Li , and Yi Yang . Random erasing data augmentation . In AAAI , 2020 . A ADDITIONAL ABLATION STUDIES A.1 THE EFFECT OF BETA DISTRIBUTION PARAMETERS Main experiments used ( β0 , β1 ) = ( 1.0 , 0.5 ) of Beta distribution for mixing x̂ = βx + ( 1 − β ) g ( x ) , where β ∼ Beta ( β0 , β1 ) . Figure 5 shows test error rates on different combinations of the parameters using WideResNet . Larger β0 and smaller β1 yield x̂ close to x , and vice versa , which is reflected in the results on CIFAR10 , i.e. , clean data . We used ( β0 , β1 ) = ( 1.0 , 0.5 ) , which balances performance on clean and corrupted data . B EXPERIMENTAL SETTINGS DETAILS This section describes additional experimental settings . B.1 DISCRETIZING AUTOENCODER We trained the autoencoder for 200 epochs to minimize the reconstruction error , and its codebook is updated by exponential moving average . The hyperparameters are identical to Razavi et al . ( 2019 ) . B.2 CLASSIFICATION We trained models on CIFAR10 , CIFAR100 , and ImageNet . For CIFAR10 and CIFAR100 , we used DenseNet-BC ( k = 12 , d = 100 ) ( Huang et al. , 2017 ) , WideResNet-28-2 ( Zagoruyko & Komodakis , 2016 ) and ResNeXt-29 ( Xie et al. , 2017 ) . We trained these networks for 200 epochs using stochastic gradient descent with a momentum of 0.9 and setting an initial learning rate to 0.1 that decays by cosine annealing with warm restart ( Loshchilov & Hutter , 2016 ) . We set a weight decay to 1× 10−4 and a batch size to 128 . We used data augmentation of random horizontal flipping , random cropping , and random erasing ( Zhong et al. , 2020 ) by default . For ImageNet , we used ResNet-50 ( He et al. , 2016 ) and trained it for 100 epochs using SGD with a momentum of 0.9 and a weight decay of 1 × 10−4 . We set the batch size to 1,024 and an initial learning rate to 0.4 that decays at 30 , 60 , and 90th epochs . We used random cropping and horizontal flipping as the base data augmentation . When training ResNet-50 on ImageNet , we used automatic mixed precision ( AMP ) implemented in PyTorch v1.6 to save the GPU memory consumption . We also used AMP for semantic segmentation and detection tasks . B.3 SEMANTIC SEGMENTATION We trained DeepLab-v3 ( Chen et al. , 2017 ) for 30 epochs with a batch size of 32 and a learning rate of 1.0×10−3 . We used SGD with a momentum of 0.9 and set its initial learning rate to 0.02 . The learning rate is multiplied by a factor of ( 1 − iterationtotal iteration ) 0.9 as Chen et al . ( 2017 ) . See https : // github.com/pytorch/vision/tree/master/references/segmentation for further details . B.4 DETECTION We trained Faster-RCNN ( Ren et al. , 2015 ) for 26 epochs with a batch size of 32 and a learning rate of 1.0× 10−3 . The learning rate is divided by 10 at 16th and 22nd epochs , while the first 1,000 iterations are the warmup period . See https : //github.com/pytorch/vision/tree/ master/references/detection for further details . B.5 RANDOM AUGMENTATION We used random augmentation ( RA ) as task-specific data augmentation , which is orthogonal to DJMix . Basically , we followed the data augmentation module of AugMix , and the only difference is the width . Whereas AugMix sets the width to 3 , DJMix uses the width of 1 , i.e. , only a single stream of operations is applied to each input image . Each image augmented by RA is used as an input x to DJMix .
This paper proposes an alternative data augmentation method for robust image classification. Training on augmented data has been shown to improve robustness. The proposed method mixes discretized images with real images and uses a consistency loss to enforce smoothness among those predictions. Experimental results include classification, detection and segmentation. Section 5 includes ablation studies on the choice of consistency loss and choice of discretization.
SP:150de466f594e7fede616959fe98956e300dfefe
LLBoost: Last Layer Perturbation to Boost Pre-trained Neural Networks
In this work , we present LLBoost , a theoretically-grounded , computationallyefficient method to boost the validation accuracy of pre-trained overparameterized models without impacting the original training accuracy . LLBoost adjusts the last layer of a neural network by adding a term that is orthogonal to the training feature matrix , which is constructed by applying all layers but the last to the training data . We provide an efficient implementation of LLBoost on the GPU and demonstrate that LLBoost , run using only 1 GPU , improves the test/validation accuracy of pre-trained models on CIFAR10 , ImageNet32 , and ImageNet . In the over-parameterized linear regression setting , we prove that LLBoost reduces the generalization error of any interpolating solution with high probability without affecting training error . 1 INTRODUCTION . Over the past decade , deep networks have produced a number of state-of-the-art results including surpassing human performance on the ImageNet classification task ( 26 ; 14 ) . However , tuning hyperparameters to produce the best possible neural network in a given application remains a computationally expensive task . State-of-the-art results often involve selecting the best model using multiple random seeds ( 14 ; 27 ; 12 ; 28 ) or ensembling ( 15 ) , and training even a single model can take several days even when using multiple GPUs . Hence , it is critical to identify computationally efficient approaches to improve the performance of pre-trained models without the need of re-training them . In this work , we present LLBoost , a theoretically-grounded , computationally-efficient method to boost the validation accuracy of pre-trained , over-parameterized models without impacting the training accuracy . Figure 1 provides an overview of our method as well as the main results . As shown in Figure 1A , our method adjusts the last fully-connected layer of a neural network by selecting the best performing perturbation out of several orthogonal to the training feature matrix , which is constructed by applying all but the last layer to the training data . In Figure 1B , we provide an example showing how our method applied to a model trained under a poorly chosen random seed can boost validation accuracy comparable to that of a model trained under a better seed . Lastly , Figure 1C shows that our method can significantly improve the validation accuracy of pre-trained neural networks on large datasets using a fraction of the training time . The intuition for our method is based on characterizing the benefit of random initialization in overparameterized linear regression . In particular , consider a dataset ( X , y ) ⊂ Rd×n×R1×n with n < d for which there exists w∗ ∈ R1×d such that y = w∗X . In order to estimate w∗ from the data , we use gradient descent with learning rate η and initialization w ( 0 ) to minimize the squared loss , i.e . to solve : arg min w∈Rd 1 2 ‖y − wX‖2 . It is well-known ( 8 ) that gradient descent converges to the following closed-form solution : wr = w ( 0 ) ( I −X ( XTX ) †XT ) + yX† , where A† is the pseudo-inverse of A ( see Appendix A for a proof ) . In this work , we prove that when n < d , sampling w ( 0 ) on a hyper-sphere leads to wr with lower generalization error than the minimum norm solution yX† with constant probability . Since the last layer of modern deep networks is usually linear , we apply this result from regression to the last layer of networks to arrive at our method , LLBoost . We end the introduction with a summary of our main contributions : 1 . We present LLBoost , a computationally efficient method for boosting the validation accuracy of pre-trained neural networks without affecting training accuracy . Additionally , we provide an efficient implementation of LLBoost on the GPU . 2 . We provide a wealth of empirical evidence that LLBoost improves the validation accuracy of pre-trained neural networks and prove that it does not affect training accuracy for overparameterized models . 3 . We provide evidence that LLBoost yields a computational advantage over random seed search for training neural networks . 4 . In the over-parameterized linear regression setting , we prove that LLBoost reduces the test error of any interpolating solution with high probability without affecting training error . 2 RELATED WORK . Understanding the benefits of over-parameterization is a recent topic of major interest in machine learning . ( 2 ) introduced the double descent curve showing that when increasing model capacity past the interpolation threshold , test error can drop a second time . ( 20 ) noted that this phenomenon had been noticed empirically several decades prior to the work of ( 2 ) . A line of recent work have provided a theoretical analysis of double descent in linear regression ( 13 ; 3 ; 1 ; 22 ; 5 ; 21 ) . In particular , ( 13 ; 3 ) analyzed the generalization error for the minimum norm solution in over-parameterized linear models . These works proved that the minimum norm solution can yield lower generalization error in the over-parameterized regime than in the under-parameterized regime . Our theoretical analysis primarily builds on that of ( 3 ) , but we analyze the generalization error of random-initialization interpolating solutions instead of the minimum-norm solution . Various methods , including random seed search and ensembling , are standardly used to improve the performance of machine learning models through training . ( 4 ) recommends using 5-10 random seeds if computational power is available , and this is typically done in state-of-the-art models ; for example , ( 14 ) considered 5 random seeds for ResNet-110 and ( 12 ) considered at least 2 random seeds on CIFAR10 ( 17 ) . ( 9 ) rigorously analyzed the impact of random seeds on model performance by considering between 50-400 random seeds for models of varying depth on MNIST ( 18 ) . Figure 1 from their work demonstrates that random seeds can affect the validation accuracy of models by up to a few percentage points on MNIST . Since this comes at a significant computational price , it is critical to identify methods that can obtain such boosts without having to perform random seed search , which is the topic of this paper . Another popular approach to improving neural network performance is ensembling , for example via bagging ( 6 ) or boosting ( 10 ) . Recently , ( 15 ) presented an approach to ensembling , which involved training a single network and saving the model parameters each time training stopped at a local minimum . ( 15 ) built upon ( 30 ) , which introduced horizontal and vertical voting to ensemble a model across training epochs . LLBoost can be used in combination with all the above approaches to further boost their performance , since it only adjusts the last layer of a pre-trained model without requiring any training . 3 PRELIMINARIES AND METHOD . We now present the preliminaries relevant for formally introducing LLBoost . Since our method is derived from over-parameterized linear regression , we first describe this problem setting . Noiseless Regression . Let ( X , y ) ⊂ Rd×n×R1×n denote the training dataset where d is the number of dimensions and n is the number of samples . In noiseless linear regression there exists w∗ ∈ R1×d such that y = w∗X . In order to estimate w∗ from the data , we use gradient descent to minimize the squared loss . Formally , we solve : arg min w∈Rd 1 2 ‖y − wX‖2 ( 1 ) using gradient descent with learning rate η , which proceeds according to the updates : w ( t+1 ) = w ( t ) + η ( y − w ( t ) X ) XT . The following well-known theorem ( 8 ) gives the solution , w ( ∞ ) , for the objective ( 1 ) given by gradient descent . Theorem 1 . Let ( X , y ) ⊂ Rd×n × R1×n with X of rank r < d , let λmax denote the largest eigenvalue ofXXT , and letA† denote the pseudo-inverse of a matrixA . Given initializationw ( 0 ) ∈ Rd , gradient descent used to solve : arg min w∈Rd 1 2 ‖y − wX‖2 with learning rate η < λ−1max converges to w ( ∞ ) = w ( 0 ) ( I −X ( XTX ) †XT ) + yX† . When w ( 0 ) = 0 ( zero initialization ) , w ( ∞ ) is the minimum ` 2-norm solution for solving the linear system wX = y . The following property of w ( ∞ ) is used to demonstrate that LLBoost does not impact training error . Lemma 1 . Let w ( ∞ ) = w ( 0 ) ( I−X ( XTX ) †XT ) + yX† . Then , w ( 0 ) ( I−X ( XTX ) †XT ) ⊥ yX† . The proof follows directly by substituting inX = UΣV T given by the singular value decomposition ( SVD ) . Lemma 1 implies that LLBoost does not affect training predictions since it only ever adds a component orthogonal to the span of the training feature matrix . We primarily focus on the noiseless regression setting , but we note that our theory directly extends to the Gaussian model from ( 3 ) and ( 7 ) . We now present a result from random matrix theory , which is at the basis of our results . The proof of the following lemma relies on the rotation invariance of the multivariate Gaussian distribution and is presented in Appendix B. Lemma 2 . If X ∈ Rd×n with columns x ( i ) ∼ N ( 0 , Id×d ) , then the singular vectors of X are uniformly distributed on the unit sphere Sd−1 . In particular , if x ∼ N ( 0 , Id×d ) , then x‖x‖ is uniformly distributed on the unit sphere Sd−1 . Method Overview . Given the above preliminaries , we present LLBoost in Algorithm 1 . LLBoost takes in the following inputs : ( 1 ) the training feature matrix X ; ( 2 ) the validation feature matrix Xt ; ( 3 ) the validation labels yt ; ( 4 ) the last layer weights w ; ( 5 ) the number of samples to consider T ; and ( 6 ) the radius of the hyper-sphere to sample from γ. LLBoost begins by constructing the projection matrix P = I −X ( XTX ) †XT . Then , LLBoost samples z ∼ N ( 0 , I ) , normalizes z and adds the perturbation γzP to w. LLBoost repeats this process and returns the perturbation that most improves the validation accuracy . Remarks . As shown in Figure 1A , X and Xt are constructed by applying all but the last layer of the neural network to the training/test data . If X is not full rank ( as is the case for neural networks that are not over-parameterized ) , we can create a low rank X by truncating the lower singular values of X . This correction only mildly affects training error as is shown in Section 4 . For classification settings , yt should be converted to 1-hot vectors . When the last layer has a bias , one can simply append a 1 to w and append an extra row of 1 ’ s to X and Xt . In most of our experiments , we consider up to T = 100 , 000 samples . When selecting γ , one can utilize a binary search approach starting with γ = 1√ d and either doubling or halving γ depending on whether the validation accuracy increased or decreased respectively . However , as a simple heuristic one can start with γ = 1√ d ‖w‖ ( as is recommended by Theorem 3 ) . Lastly , when the network has multiple outputs ( as in multiclass problems ) , we let the entries of the weight matrix be i.i.d . standard normal variables and then normalize by the Frobenius norm . LLBoost does not impact training error/accuracy . Since the perturbations constructed by LLBoost are always projected into the space orthogonal to the training features X , Lemma 1 implies that LLBoost does not alter the training predictions . This is an important aspect of our algorithm since otherwise , LLBoost could just overfit the test data . Algorithm 1 LLBoost ( X , Xt , yt , w , T , γ ) Input : X : = rank r training feature matrix ; Xt : = val . feature matrix ; yt : = val . labels ; w : = last layer weights ; T : = number of samples ; γ : = radius of hyper-sphere Output : wbest : = adjusted last layer weights 1 : wbest = None 2 : accbest = 0 ; ( 1 , d ) = w.shape ; U , Σ , V T ← SVD ( X ) 3 : P ← Id×d − UIr×rUT 4 : for t← 1 to T do 5 : z ← N ( 0 , Id×d ) 6 : z ← z‖z‖ 7 : wr ← γzP + w 8 : acc = GetV alAcc ( Xt , yt , wr ) 9 : if acc > accbest then 10 : wbest = wr ; accbest = acc 11 : end if 12 : end for 13 : return wbest GPU Implementation . We can easily remove the loop in Algorithm 1 by using the GPU since the dominating computations are vector-matrix products . A full implementation is provided using PyTorch ( 25 ) and NumPy ( 23 ; 29 ) in the footnote below1 . In practice , computing the validation accuracy for each sample of wr is the limiting factor in LLBoost . For large datasets , the functions used to compute the SVD and the projection matrix P need to be selected carefully . Note that with respect to SVD , the reduced SVD is sufficient for our algorithm . While for the ImageNet training features from FixResNext-101 the full SVD would require constructing a matrix with roughly 1012 entries , the reduced SVD only requires 108 entries .
This paper proposes LLBoost that enables adjusting the last linear layer without impacting the training accuracy under the assumption that the last linear layer is in an over-parametrized situation. When the last layer is not over-parametrized, LLBoost first applies the low rank approximation to the training feature matrix through the SVD decomposition, which may affect the original training accuracy. The reason why LLBoost does not change the training accuracy is explained as follows: In an over-parametrized noiseless linear regression, a solution of a linear system $y = wX$ obtained by the gradient descent with an initial value of $w^{(0)}$ is given in a closed form of $\hat{w} = w^{(0)} (I - X(X^\top X)^\dagger X^\top) + yX^\dagger$. Therefore, we can compute a solution of $y = wX$ by simply generating $w^{(0)}$ randomly and applying this formula. It is also experimentally verified that LLBoost can adjust the last linear layer without impacting the training accuracy (after appriximated with SVD when necessary). The authors also present theoretical results that sampling $w^{(0)}$ uniformly on the hyper-shpere of appropriate radius leads to a solution that is better than the minimum norm solution ($yX^\dagger$) with constant probability.
SP:470fdc4e61564e09d538f7ecd1225494e08416f2
3D Scene Compression through Entropy Penalized Neural Representation Functions
1 INTRODUCTION . The ability to render 3D scenes from arbitrary viewpoints can be seen as a big step in the evolution of digital multimedia , and has applications such as mixed reality media , graphic effects , design , and simulations . Often such renderings are based on a number of high resolution images taken of some original scene , and it is clear that to enable many applications , the data will need to be stored and transmitted efficiently over low-bandwidth channels ( e.g. , to a mobile phone for augmented reality ) . Traditionally , the need to compress this data is viewed as a separate need from rendering . For example , light field images ( LFI ) consist of a set of images taken from multiple viewpoints . To compress the original views , often standard video compression methods such as HEVC ( Sullivan et al. , 2012 ) are repurposed ( Jiang et al. , 2017 ; Barina et al. , 2019 ) . Since the range of views is narrow , light field images can be effectively reconstructed by “ blending ” a smaller set of representative views ( Astola & Tabus , 2018 ; Jiang et al. , 2017 ; Zhao et al. , 2018 ; Bakir et al. , 2018 ; Jia et al. , 2019 ) . Blending based approaches , however , may not be suitable for the more general case of arbitrary-viewpoint 3D scenes , where a very diverse set of original views may increase the severity of occlusions , and thus would require storage of a prohibitively large number of views to be effective . A promising avenue for representing more complete 3D scenes is through neural representation functions , which have shown a remarkable improvement in rendering quality ( Mildenhall et al. , 2020 ; Sitzmann et al. , 2019 ; Liu et al. , 2020 ; Schwarz et al. , 2020 ) . In such approaches , views from a scene are rendered by evaluating the representation function at sampled spatial coordinates and then applying a differentiable rendering process . Such methods are often referred to as implicit representations , since they do not specify explicitly the surface locations and properties within the scene , which would be required to apply some conventional rendering techniques like rasterization ( Akenine-Möller et al. , 2019 ) . However , finding the representation function for a given scene requires training a neural network . This makes this class of methods difficult to use as a rendering method in the existing framework , since it is computationally infeasible on a low-powered end device like a mobile phone , which are often on the receiving side . Due to the data processing inequality , it may also be inefficient to compress the original views ( the training data ) rather than the trained Entropy Poses Views of 3D scene Neural representation function Loss Radiance field Sender Receiver Images Pose 11000010 ... + length ( 11000010 ... ) Reconstruction error Rate Novel rendering Radiance field ? Figure 1 : Overview of cNeRF . The sender trains an entropy penalized neural representation function on a set of views from a scene , minimizing a combination of rate and distortion . The receiver can use the compressed model to render novel views . representation itself , because the training process may discard some information that is ultimately not necessary for rendering ( such as redundancy in the original views , noise , etc. ) . In this work , we propose to apply neural representation functions to the scene compression problem by compressing the representation function itself . We use the NeRF model ( Mildenhall et al. , 2020 ) , a method which has demonstrated the ability to produce high-quality renders of novel views , as our representation function . To reduce redundancy of information in the model , we build upon the model compression approach of Oktay et al . ( 2020 ) , applying an entropy penalty to the set of discrete reparameterized neural network weights . The compressed NeRF ( cNeRF ) describes a radiance field , which is used in conjunction with a differentiable neural renderer to obtain novel views ( see Fig . 1 ) . To verify the proposed method , we construct a strong baseline method based on the approaches seen in the field of light field image compression . cNeRF consistently outperforms the baseline method , producing simultaneously superior renders and lower bitrates . We further show that cNeRF can be improved in the low bitrate regime when compressing multiple scenes at once . To achieve this , we introduce a novel parameterization which shares parameters across models and optimize jointly across scenes . 2 BACKGROUND . We define a multi-view image dataset as a set of tuplesD = { ( Vn , Xn ) } Nn=1 , where Vn is the camera pose and Xn is the corresponding image from this pose . We refer to the 3D ground truth that the views capture as the scene . In what follows , we first provide a brief review of the neural rendering and the model compression approaches that we build upon while introducing the necessary notation . Neural Radiance Fields ( NeRF ) The neural rendering approach of Mildenhall et al . ( 2020 ) uses a neural network to model a radiance field . The radiance field itself is a learned function gθ : R5 → ( R3 , R+ ) , mapping a 3D spatial coordinate and a 2D viewing direction to a RGB value and a corresponding density element . To render a view , the RGB values are sampled along the relevant rays and accumulated according to their density elements . The learned radiance field mapping gθ is parameterized with two multilayer perceptrons ( MLPs ) , which Mildenhall et al . ( 2020 ) refer to as the “ coarse ” and “ fine ” networks , with parameters θc and θf respectively . The input locations to the coarse network are obtained by sampling regularly along the rays , whereas the input locations to the fine network are sampled conditioned on the radiance field of the coarse network . The networks are trained by minimizing the distance from their renderings to the ground truth image : L = N∑ n=1 ∥∥X̂cn ( θc ; Vn ) −Xn∥∥22︸ ︷︷ ︸ Lc ( θc ) + N∑ n=1 ∥∥X̂fn ( θf ; Vn , θc ) −Xn∥∥22︸ ︷︷ ︸ Lf ( θf ; θc ) ( 1 ) Where || · ||2 is the Euclidean norm and the X̂n are the rendered views . Note that the rendered view from the fine network X̂fn relies on both the camera pose Vn and the coarse network to determine the spatial locations to query the radiance field . We drop the explicit dependence of Lf on θc in the rest of the paper to avoid cluttering the notation . During training , we render only a minibatch of pixels rather than the full image . We give a more detailed description of the NeRF model and the rendering process in Appendix Sec . A . Model Compression through Entropy Penalized Reparameterization The model compression work of Oktay et al . ( 2020 ) reparameterizes the model weights Θ into a latent space as Φ . The latent weights are decoded by a learned function F , i.e . Θ = F ( Φ ) . The latent weights Φ are modeled as samples from a learned prior q , such that they can be entropy coded according to this prior . To minimize the rate , i.e . length of the bit string resulting from entropy coding these latent weights , a differentiable approximation of the self-information I ( φ ) = − log2 ( q ( φ ) ) of the latent weights is penalized . The continuous Φ are quantized before being applied in the model , with the straight-through estimator ( Bengio et al. , 2013 ) used to obtain surrogate gradients of the loss function . Following Ballé et al . ( 2017 ) , uniform noise is added when learning the continuous prior q ( φ + u ) where ui ∼ U ( − 12 , 1 2 ) ∀ i . This uniform noise is a stand-in for the quantization , and results in a good approximation for the self-information through the negative log-likelihood of the noised continuous latent weights . After training , the quantized weights Φ̃ are obtained by rounding , Φ̃ = bΦe , and transmitted along with discrete probability tables obtained by integrating the density over the quantization intervals . The continuous weights Φ and any parameters in q itself can then be discarded . 3 METHOD . To achieve a compressed representation of a scene , we propose to compress the neural scene representation function itself . In this paper we use the NeRF model as our representation function . To compress the NeRF model , we build upon the model compression approach of Oktay et al . ( 2020 ) and jointly train for rendering as well as compression in an end-to-end trainable manner . We subsequently refer to this approach as cNeRF . The full objective that we seek to minimize is : L ( Φ , Ψ ) = Lc ( Fc ( Φ̃c ) ) + Lf ( Ff ( Φ̃f ) ) ︸ ︷︷ ︸ Distortion +λ ∑ φ∈Φ I ( φ ) ︸ ︷︷ ︸ Rate ( 2 ) where Ψ denotes the parameters of F as well any parameters in the prior distribution q , and we have explicitly split Φ into the coarse Φc and fine Φf components such that Φ = { Φc , Φf } . λ is a trade-off parameter that balances between rate and distortion . A rate–distortion ( RD ) plot can be traced by varying λ to explore the performance of the compressed model at different bitrates . Compressing a single scene When training cNeRF to render a single scene , we have to choose how to parameterize and structure F and the prior distribution q over the network weights . Since the networks are MLPs , the model parameters for a layer l consist of the kernel weights and biases { Wl , bl } . We compress only the kernel weights Wl , leaving the bias uncompressed since it is much smaller in size . The quantized kernel weights W̃l are mapped to the model weights by Fl , i.e . Wl = Fl ( W̃l ) . Fl is constructed as an affine scalar transformation , which is applied elementwise to W̃l : Fl ( W̃l , ij ) = αlW̃l , ij + βl ( 3 ) We take the prior to be factored over the layers , such that we learn a prior per linear kernel ql . Within each kernel , we take the weights in W̃l to be i.i.d . from the univariate distribution ql , parameterized by a small MLP , as per the approach of Ballé et al . ( 2017 ) . Note that the parameters of this MLP can be discarded after training ( once the probability mass functions have been built ) . Compressing multiple scenes While the original NeRF model is trained for a single scene , we hypothesize that better rate–distortion performance can be achieved for multiple scenes , especially if they share information , by training a joint model . For a dataset of M scenes , we parameterize the kernel weights of model m , layer l as : Wml = Fml ( W̃ml , S̃l ) = αml W̃ m l + β m l + γlS̃l ( 4 ) Compared to Eqn . 3 , we have added a shift , parameterized as a scalar linear transformation of a discrete shift S̃l , that is shared across all models m ∈ { 1 , ... , M } . S̃l has the same dimensions as the kernel Wml , and as with the discrete latent kernels , S̃l is coded by a learned probability distribution . The objective for the multi-scene model becomes : L ( Φ , Ψ ) = M∑ m=1 [ Lmc ( Fmc ( Φ̃mc , Φ̃sc ) ) + Lmf ( Fmf ( Φ̃mf , Φ̃sf ) ) + λ ∑ φ∈Φm I ( φ ) ] + λ ∑ φ∈Φs I ( φ ) ( 5 ) where Φs is the set of all discrete shift S̃ parameters , and the losses , latent weights and affine transforms are indexed by scene and model m. Note that this parameterization has more parameters than the total of the M single scene models , which at first appears counter-intuitive , since we wish to reduce the overall model size . It is constructed as such so that the multi-scene parameterization contains the M single scene parameterizations - they can be recovered by setting the shared shifts to zero . If the shifts are set to zero then their associated probability distributions can collapse to place all their mass at zero . So we expect that if there is little benefit to using the shared shifts then they can be effectively ignored , but if there is a benefit to using them then they can be utilized . As such , we can interpret this parameterization as inducing a soft form of parameter sharing .
This paper proposes to compress nerf models with entropy loss, where instead of directly training nerf model parameters, it trains a new function F which takes some compressed information and decodes to the nerf models. Then it did the same things as nerf, which render scenes in novel views. The authors show that the function F could largely compress the original nerf models while keeping similar PSNR.
SP:a044379a14bccab23cf617ef66896ecd78edb6ea
Latent Space Semi-Supervised Time Series Data Clustering
1 INTRODUCTION . Time series data can be defined as any data which contains multiple sequentially ordered measurements . Real world examples of time series data are abundant throughout many domains , including finance , weather , and medicine . One common learning task is to partition a set of time series into clusters . This unsupervised learning task can be used to learn more about the underlying structure of a dataset , without the need for a supervised learning objective or ground-truth labels . Clustering time series data is a challenging problem because time series data may be high-dimensional , and is not always segmented cleanly , leading to issues with alignment and noise . The most basic methods for time series clustering apply general clustering algorithms to raw time series data . Familiar clustering algorithms like hierarchical clustering or k-Means clustering algorithms may be applied using Euclidean Distance ( ED ) for comparisons . Although ED can perform well in some cases , it is susceptible to noise and temporal shifting . The improved Dynamic Time Warping ( DTW ) ( Berndt & Clifford , 1994 ) metric provides invariance to temporal shifts , but is expensive to compute for clustering tasks . A more scalable alternative to DTW exists in k-Shape , a measure based on the shape-based distance ( SBD ) metric for comparing whole time series ( Paparrizos & Gravano , 2017 ) . Shapelet-based approaches such as Unsupervised Shapelets ( Zakaria et al. , 2012 ) can mitigate issues with shifting and noise but are limited to extracting a single pattern/feature from each time series . One alternative approach for clustering time series data is to apply dimensionality reduction through the use of an autoencoder . Autoencoders are capable of learning low-dimensional projections of high-dimensional data . Both LSTM and convolutional autoencoders have been shown to be successful at learning latent representations of time series data . These models can extract a large number of features at each time step . After training an autoencoder model , the learned low-dimensional latent representation can then be fed to an arbitrary clustering algorithm to perform the clustering task . Because autoencoder models reduce the dimensionality of the data , they naturally avoid issues with noise , and provide a level of invariance against temporal shifting . Recently , the field of semi-supervised learning has shown great success at boosting the performance of unsupervised models using small amounts of labeled data . Dau et al . ( 2016 ) proposes a solution for semi-supervised clustering using DTW . However , this solution is still based on DTW , and as such suffers from scalability issues . He et al . ( 2019 ) proposes a constraint-propagation approach for semi-supervised clustering , which may ( but is not required to ) be used in conjunction with DTW . However , this solution still performs time series comparisons within the raw data space , which may cause issues with scalability for large datasets . In this paper , we present a semi-supervised deep learning model based on a convolutional autoencoder ( CAE ) , which may be used to perform clustering on time series datasets . We also present new semi-supervised learning objectives , adapted from well-known internal clustering metrics , which can significantly improve clustering performance when provided with a small number of labeled time series . We perform experiments to show that our semi-supervised model can improve performance relative to an unsupervised model when applied for clustering tasks . We also implement a lightly modified batch-based version of the semi-supervised learning solution shown presented in Ren et al . ( 2018 ) , and show that our proposed solutions are competitive . In the best case , our model semi-supervised model shows a best-case improvement in ARI of 140 % over an unsupervised CAE model when applying k-Means clustering , and a best-case improvement of 44 % over a similar model . In the remainder of this paper , Section 2 reviews the related work on time series clustering , Section 3 presents our proposed method for semi-supervised time series clustering , and in Section 4.1 we discuss our experimental methodology and present our experimental results . Finally , Section 5 details our conclusions and avenues for future research . 2 RELATED WORK . One of the most common ways to perform time series clustering is to apply the k-Means algorithm . By default , k-Means uses Euclidean Distance ( ED ) . ED is efficient to calculate , and in many cases shows good results ( Ding et al. , 2008 ) . However , ED comparison will fail when two similar time series are shifted temporally relative to one another . Additionally , ED comparisons are sensitive to noisy data . The Dynamic Time Warping ( DTW ) metric ( Berndt & Clifford , 1994 ) improves on ED by computing a warping path between a pair of time series . This approach solves issues with temporal shifting , but requiresO ( N2 ) time to compute for two time series of lengthN . Recent work has provided bounds for this computation ( Keogh & Ratanamahatana , 2005 ) , ( Lemire , 2009 ) , but the scalability of DTW remains an issue for large datasets and long time series . The k-Shape algorithm ( Paparrizos & Gravano , 2015 ) is a scalable and performant alternative to DTW , and offers similar performance to DTW at a lower computational cost . The Unsupervised Shapelets ( Zakaria et al. , 2012 ) clustering method operates by forming clusters around common subsequnces extracted from the data . This approach provides invariance against shifts since the shapelet may appear anywhere within each time series , and also provides some invariance against noise or outliers within the data , since elementwise comparisons only occur between shapelets , rather than the full time series . In this regard , the UShapelet algorithm has some advantages over DTW and k-Shape . However , this method is constrained to extracting a single shapelet/feature from each time series . Recently , semi-supervised learning has shown the benefit of augmenting a large unlabeled dataset with a small amount of labeled data . There is some existing work for applying semi-supervised learning to time series clustering . The semi-supervised time series clustering solution presented in Dau et al . ( 2016 ) proposes a modified version of DTW , which operates in a semi-supervised manner using supervised constraints . However , this method still relies on performing DTW comparison within the original data space , and as such is not a scalable solution for large datasets or long time series . Another methodology for semi-supervised time series clustering is He et al . ( 2019 ) which is a graph-based approach using supervised examples to generate positive and negative constraints between points . This approach does not rely on DTW , but the algorithm still performs comparisons in the original data space , which can be problematic as the length of the time series grows . Popular deep learning frameworks such as LSTMs and CNNs may also be applied to time series data . Both LSTM and CNN networks may be arranged as autoencoders , allowing for unsupervised feature learning for clustering , compression , or anomaly detection tasks . Holden et al . ( 2015 ) use a Convolutional Autoencoder ( CAE ) model to learn a featurized representation of gait data . Autoencoder architectures may also be applied for anomaly detection , as is shown in Bao et al . ( 2017 ) , where the authors use autoencoders for anomaly detection . Performing comparisons on embedded samples avoids many of the issues of direct pairwise comparisons . Since autoencoders reduce di- mensionality of the data , distance comparisons will be performed in a lower-dimensional space than the original data , which improves scalability . Embedding the data before comparison also reduces sensitivity to noise , since raw data are not compared directly . One work that takes advantage of this approach is McConville et al . ( 2019 ) , which learns a manifold for clustering on the trained latent space of an autoencoder . Recent work in the generative model field has produced the Variational Autoencoder ( VAE ) architecture ( Kingma & Welling , 2013 ) , which learns probability distributions for latent features within the data and may also be applied for clustering as in Dilokthanakul et al . ( 2016 ) . This architecture has also been successfully applied in Fortuin et al . ( 2018 ) , which uses a VAE based method to learn feature representations of time series . We base our model on a CAE , as the CAE architecture is simple and well-known , and provides a good platform for evaluating the performance of our proposed objective functions . 3 SEMI-SUPERVISED LEARNING OF LATENT SPACE . Our proposed framework is a semi-supervised CAE model , which combines an unsupervised reconstruction loss Lrc with a semi-supervised loss Lsup , as shown in Figure 3.1 . We show how an existing semi-supervised learning objective function may be adapted to fit into our model , and also propose two new objective functions based on well-known internal clustering metrics . We focus on optimizing the autoencoder ’ s latent space for distance-based clustering algorithms , and specifically perform our experimentation using the k-Means algorithm . The spherical , centroid-based clusters generated by k-Means are a good fit for the proposed semi-supervised losses , which encourage each cluster to converge around a single high-density point . 3.1 CAE MODEL ARCHITECTURE . We base our model off of a two-layer Convolutional Autoencoder ( CAE ) architecture . The CAE uses two 1-D convolutional layers to featurize the time series . The filter widths for both layers are calculated at runtime from the length of the time series . Each layer of the encoder contains a 1D convolution operation , followed by a non-linear activation . These layers are paired with transpose convolution layers in the decoder . After each convolution layer in the encoder , we also apply a max-pooling operation to further reduce the length of the featurized sequence . Each max-pooling operation is “ reversed “ using a nearest-neighbor upsampling operation in the decoder . Alternatively , large strides in the convolutional layer may be used instead of pooling operations . This accomplishes the same goal of reducing the length of the featurized sequence , but does not require any up-sampling operations in the decoder , since the transpose convolution operation with a stride will perform the upsampling . We found that the max-pooling and large stride methods produced similar results in practice . 3.2 SEMI-SUPERVISED LOSS FUNCTIONS . 3.2.1 PROTOTYPE LOSS . Snell et al . ( 2017 ) present a system for performing few-shot learning , where a small number of labeled examples for each class in the dataset are embedded using an encoder network . These points are divided into two sets , query examples and support examples . In the latent space , the support embeddings are averaged to determine a centroid or ” prototype ” for each class . Training occurs by measuring the distance from each query example to the support centroid for the class . Each query point is labeled with the class of the closest support prototype . The probability of a query point i belonging to Class J is calculated as : pij = e−d ( i , Cj ) ∑ j′ e −d ( i , Cj′ ) ( 1 ) In Equation 1 , −d ( i , j ) is the negative distance between query point i and the support prototype for Class J . Any distance metric may be used for d , but for the remainder of this paper , we treat d as the squared euclidean distance . Training proceeds by minimizing the cross entropy between the labels for the query points and the probability distribution p. The objective of this approach is to learn a latent space where similarities between examples are quantifiable using a distance metric like Euclidean distance . Examples from the same class will be close to one another in the embedded space , while examples from separate classes will have larger distances . In addition to the few-shot learning scenario , a later work by Ren et al . ( 2018 ) demonstrates that the prototypical network objective can be modified to support semi-supervised few-shot classification as well . The first objective function proposed in Section 3.1.1 of Ren et al . ( 2018 ) is calculated in a two-stage process . In the first stage , the labeled data prototypes are calculated as the centroid of the Nj embedded labeled data points h ( x ) for each class J , as shown in Equation 2a . The second stage assigns each unlabeled point a soft cluster weighting , based on the distances to each of the calculated prototypes Cj , shown in Equation 2b . Finally , the original prototypes are updated to include the unlabeled data using the soft cluster assignments from Equation 2b . In Equation 2c , the final prototype calculation is performed by adding the embedded values for the labeled class J along with the weighted unlabeled values from set U . This sum is then divided by the sum of Nj and ∑ j wi , j which capture the number of labeled examples , and the sum of weights for class J , respectively . Cj = 1 Nj ∑ i∈J h ( xi ) wij = e−||h ( xi ) −Cj || 2∑ j′ e −||h ( xi ) −C′j ||2 Ĉj = ∑ i∈J h ( xi ) + ∑ i∈U h ( xi ) wij Nj + ∑ j wij ( 2a , b , c ) We extend our vanilla CAE model into a semi-supervised learning context by calculating refined prototypes from the labeled and unlabeled embeddings within the CAE ’ s embedded space . The semi-supervised loss objective Lproto can be written as Equation 3 . In Equation 3 , N represents the total number of samples in the batch ( unlabeled and labeled ) , yij is the ground truth indicator for Class j , and p̂ij is probability that sample i belongs to class J by performing the calculation in Equation 1 using the refined prototypes from Equation 2c . Figure 1 presents the full architecture of our model . Lproto = 1 N N∑ i K∑ j yij ∗ log ( p̂ij ) ( 3 )
This paper proposes a semi-supervised architecture for clustering time-series data based on Convolutional Autoencoders (AEs). The model combines the regular reconstruction loss usually employed in AEs with two new losses based on the intrinsic clustering evaluation metrics, Silhouette and DBIndex. The experiments show that this setup can achieve good clustering results (ARI) even when very few labeled examples of each class (4-28) are provided.
SP:f9b9968f2228687032c18ac27887a3c70cdfbc1d
A Learning Theoretic Perspective on Local Explainability
1 INTRODUCTION . There has been a growing interest in interpretable machine learning , which seeks to help people better understand their models . While interpretable machine learning encompasses a wide range of problems , it is a fairly uncontroversial hypothesis that there exists a trade-off between a model ’ s complexity and general notions of interpretability . This hypothesis suggests a seemingly natural connection to the field of learning theory , which has thoroughly explored relationships between a function class ’ s complexity and generalization . However , formal connections between interpretability and learning theory remain relatively unstudied . Though there are several notions of conveying interpretability , one common and flexible approach is to use local approximations . Formally , local approximation explanations ( which we will refer to as “ local explanations ” ) provide insight into a model ’ s behavior as follows : for any black-box model f ∈ F and input x , the explanation system produces a simple function , gx ( x′ ) ∈ Glocal , which approximates f in a chosen neighborhood , x′ ∼ Nx . Crucially , the freedom to specify both Glocal andNx grants local explanations great versatility . In this paper , we provide two connections between learning theory and how well f can be approximated locally ( i.e . the fidelity of local explanations ) . Our first result studies the standard problem of performance generalization by relating test-time predictive accuracy to a notion of local explainability . As it turns out , our focus on local explanations leads us to unique tools and insights from a learning theory point of view . Our second result identifies and addresses an unstudied – yet important – question regarding explanation generalization . This question pertains to a growing class of explanation systems , such as MAPLE ( Plumb et al. , 2018 ) and RL-LIM ( Yoon et al. , 2019 ) , which we call finite sample-based local explanations1 . These methods learn their local approximations using a common finite sample drawn from data distribution D ( in contrast to canonical local approximation methods such as LIME ( Ribeiro et al. , 2016 ) ) and , as a result , run the risk of overfitting to this finite sample . In light of this , we answer the following question : for these explanation-learning systems , how well do the quality of local explanations generalize to data not seen during training ? ∗Denotes equal contribution 1This terminology is not to be confused with “ example-based explanations ” where the explanation itself is in the form of data instances rather than a function . We address these questions with two bounds , which we outline now . Regarding performance generalization , we derive our first main result , Theorem 1 , which bounds the expected test mean squared error ( MSE ) of any f in terms of its MSE over the m samples in the training set , S = { ( xi , yi ) } mi=1 : E ( x , y ) ∼D [ ( f ( x ) − y ) 2 ] ︸ ︷︷ ︸ Test MSE ≤ Õ ( 1 m m∑ i=1 ( f ( xi ) − yi ) 2︸ ︷︷ ︸ Train MSE +E x∼D , x′∼Nx [ ( gx′ ( x ) − f ( x ) ) 2 ] ︸ ︷︷ ︸ Interpretability Term ( MNF ) + ρSR̂S ( Glocal ) ︸ ︷︷ ︸ Complexity Term ) Regarding explanation generalization for finite sample-based explanation-learning systems , we apply a similar proof technique to obtain Theorem 2 , which bounds the quality of the system ’ s explanations on unseen data in terms of their quality on the data on which the system was trained : E x∼D , x′∼Nx [ ( gx′ ( x ) − f ( x ) ) 2 ] ︸ ︷︷ ︸ Test MNF ≤ 1 m m∑ i=1 Ex′∼Nxi [ ( f ( xi ) − gx′ ( xi ) ) 2 ] ︸ ︷︷ ︸ Train MNF + Õ ( ρSR̂S ( Glocal ) ) ︸ ︷︷ ︸ Complexity Term Before summarizing our contributions , we discuss the key terms and their relationships . • Interpretability terms : The terms involving MNF correspond to Mirrored Neighborhood Fidelity , a metric we use to measure local explanation quality . As we discuss in Section 3 , this is a reasonable modification of the commonly used Neighborhood Fidelity ( NF ) metric ( Ribeiro et al. , 2016 ; Plumb et al. , 2018 ) . Intuitively , we generally expect MNF to be larger when the neighborhood sizes are larger since each gx′ is required to extrapolate farther . • Complexity term : This term measures the complexity of the local explanation system g in terms of ( a ) the complexity of the local explanation class Glocal and ( b ) ρS , a quantity that we define and refer to as the neighborhood disjointedness factor . As we discuss in Section 4 , ρS is a value in [ 1 , √ m ] ( where m = |S| ) that is proportional to the level of disjointedness of the neighborhoods for points in the sample S. Intuitively , we expect ρS to be larger when the neighborhoods sizes are smaller since smaller neighborhoods will overlap less . Notably , both our bounds capture the following key trade-off : as neighborhood widths increase , MNF increases but ρS decreases . As such , our bounds are non-trivial only if the neighborhoods Nx can be chosen such that MNF remains small but ρS grows slower than Õ ( √ m ) ( since R̂S ( Glocal ) typically decays as Õ ( 1/ √ m ) ) . We summarize our main contributions as follows : ( 1 ) We make a novel connection between performance generalization and local explainability , arriving at Theorem 1 . Given the relationship between MNF and ρS , this bound roughly captures that an easier-to-interpret f enjoys better generalization guarantees , a potentially valuable result when reasoning about F is difficult ( e.g . for neural networks ) . Further , our proof technique may be of independent theoretical interest as it provides a new way to bound the Rademacher complexity of a particular class of randomized functions ( see Section 4 ) . ( 2 ) We motivate and explore an important generalization question about expected explanation quality . Specifically , we arrive at Theorem 2 , a bound for test MNF in terms of train MNF . This bound suggests that practitioners can better guarantee good local explanation quality ( measured by MNF ) using methods which encourage the neighborhood widths to be wider ( see Section 5 ) . ( 3 ) We verify empirically on UCI Regression datasets that our results non-trivially reflect the two types of generalization in practice . First , we demonstrate that ρS can indeed exhibit slower than Õ ( √ m ) growth without significantly increasing the MNF terms . Also , for Theorem 2 , we show that the generalization gap indeed improves with larger neighborhoods ( see Section 6 ) . ( 4 ) Primarily to aid in our theoretical results , we propose MNF as a novel yet reasonable measure of local explainability . Additionally , we argue that this metric presents a promising avenue for future study , as it may naturally complement NF and offer a unique advantage when evaluating local explanations on “ realistic ” on-distribution data ( see Section 3 ) . 2 RELATED WORK . Interpretability meets learning theory . Semenova et al . ( 2020 ) study the performance generalization of models learned from complex classes when they can be globally well-approximated by simpler ( e.g . interpretable ) classes . In such cases , their theory argues that if the complex class has many models that perform about as optimally on training data , generalization from the complex class can be more closely bounded using the simpler class ’ s complexity . In our corresponding results , we similarly aim to avoid involving the larger class ’ s complexity . However , we directly study generalization via a model ’ s local explainability , rather than instantiate ” complex ” and “ simple ” classes for global approximations . The two are fundamentally different technical problems ; standard learning theory results can not be directly applied as they are done for single-function global approximations . Statistical localized regression . ( Fan , 1993 ; Fan & Gijbels , 1996 ) are canonical results which bound the squared error of a nonparametric function defined using locally fit models . These local models are both simple ( e.g . linear ) and similarly trained by weighting real examples with a kernel ( i.e . an implied neighborhood ) . However , each local model is only used to make a prediction at its source point and the theory requires shrinking the kernel width towards 0 as the sample size grows . We instead fit local models as explanations for a trained model ( i.e . which is considered the “ true regression function ” ) and more importantly , care about the fidelity of each local model over whole ( non-zero ) neighborhoods . Unlike localized regression , this allows us to use uniform convergence to bound test error with empirical and generalization terms . While the previous results do not have empirical terms , the learning rates are exponential in the number of samples . Learning Theory . Another line of related work also studies how to explain generalization of overparameterized classes . As standard uniform convergence on these classes often leads to vacuous bounds , a general approach that has followed from ( Nagarajan & Kolter , 2019 ; Zhang et al. , 2017 ; Neyshabur et al. , 2014 ) has been to study implications of different biases placed on learned models . We study what would happen if an overparameterized model had an unexplored type of bias , one that is inspired by local explainability . Additionally , our work ’ s technical approach parallels another line of existing results which likewise try to apply uniform convergence on separate surrogate classes . This includes PAC-Bayesian bounds , a large family of techniques that come from looking at a stochastic version of a model in parameter space ( McAllester , 1998 ; 2003 ; Langford & Caruana , 2002 ; Langford & Shawe-Taylor , 2003 ) . In a different vein , some results in deep learning look at compressed , sparsified , or explicitly regularized surrogates of neural networks ( Arora et al. , 2018 ; Dziugaite & Roy , 2017 ) . In our case , the surrogate class is a collection of local explanations . 3 MIRRORED NEIGHBORHOOD FIDELITY . In order to connect local explanations to generalization , recall that we study a measure of local interpretability which we call “ mirrored neighborhood fidelity ” ( MNF ) . As we explain below , this quantity comes from a slight modification to an existing metric for local approximation explanations , namely , that of neighborhood fidelity ( NF ) . To define these quantities , we use the following notation . Let X be an input space and D be a distribution over X × Y where Y ⊆ R. Then , let F be a class of functions f : X → Y . For our theoretical results , we specifically assume that Y is bounded as Y = [ −B , B ] for some B > 0 ( though this does not matter for the remainder of this section ) . In order to provide local explanations , we need to fix a nearby region around each x ∈ X . To this end , for any x , letNx correspond to some distribution denoting a local neighborhood at x ( e.g . typically chosen to be a distribution centered at x ) . For any distribution N , we use pN ( x ) to denote its density at x . Finally , let G be a class of local explainers g : X × X → Y such that for each x ∈ X , the local explanation g ( x , · ) : X → Y belongs to a class of ( simple ) functions ( e.g . linear ) , Glocal . For convenience , we denote g ( x , · ) as gx ( · ) and use it to locally approximate f in the neighborhood defined by Nx . The accuracy of the local explanation system g is usually quantified by a term called “ neighbhorhood fidelity ” which is defined as follows ( Ribeiro et al. , 2016 ; 2018 ; Plumb et al. , 2018 ; 2020 ) : NF ( f , g ) : = Ex∼D [ Ex′∼Nx [ ( f ( x′ ) − gx ( x′ ) ) 2 ] ] . To verbally interpet this , let us call x as the “ source ” point which gives rise to a local explanation gx ( · ) and x′ the “ target ” points that we try to fit using g. To compute NF ( f , g ) , we need to do the following : for each source point x , we first compute the average error in the fit of gx ( · ) over draws of nearby target points x′ ∼ Nx ; then , to get a more overall measure of g ’ s quality , we globally average this error across draws of the source point x ∼ D. Now , to define MNF , we take the same expression as for NF but swap x and x′ within the innermost expectation ( without modifying how each variable is distributed ) . In other words , we now sample a target point x from D and sample source points x′ from a distribution over points near a given x . Since this local distribution is over source points rather than target points , just for the sake of distinguishing , we ’ ll refer to this as a mirrored neighborhood distribution and denote it as Nmirx . We define MNF more formally below , following which we explain how to better understand it : Definition 3.1 . ( Mirrored Neighborhood Fidelity ) We define MNF : F × G → R as MNF ( f , g ) : = Ex∼D [ Ex′∼Nmirx [ ( f ( x ) − gx′ ( x ) ) 2 ] ] . and with an abuse of notation , we let MNF ( f , g , x ) : = Ex′∼Nmirx [ ( f ( x ) − gx′ ( x ) ) 2 ] . Understanding MNF . It is helpful to parse the expression for MNF in two different ways . First , we can think of it as measuring the error in approximating every target point x ∈ X through a randomized locally-approximating function gx′ ( · ) , where x′ is randomly drawn from the neighborhood Nmirx . A second way to parse this is in a manner similar to how we parsed NF . To do this , first we note that the expectations in MNF can be swapped around and rewritten as : MNF ( f , g ) = Ex′∼D† [ Ex∼N† x′ [ ( f ( x ) − gx′ ( x ) ) 2 ] ] , where D† and N†x′ are suitably defined distributions ( derived in Appendix A ) that can be thought of as modified counterparts of D and Nmirx′ respectively . With this rewritten expression , one can read MNF like NF : for each source point ( now x′ ) , we compute the average error in the fit of the corresponding local function ( gx′ ( · ) ) over target points ( x ) drawn from the source ’ s local neighborhood ( N†x′ ) ; this error is then globally averaged over different draws of the source point ( x ′ ∼ D† ) . Why MNF ? While both NF and MNF are closely related measures of local explanation quality on f , studying MNF allows us to make connections between local explainability and different notions of generalization ( Sections 4 and 5 ) . At a high-level , our results don ’ t apply to NF because the overall distribution of the points that are “ fit ” to calculate NF ( i.e. , the target points ) is not the same as the test data distribution D , instead being D perturbed by Nx . Rather , we prefer this target distribution to be D , which is the case for MNF , for us to be able to neatly bound test-time quantities via a local explainability term . Otherwise , we would have to end up introducing many cumbersome terms . Furthermore , MNF may also be of practical interest to the interpretability community , as it potentially offers a unique advantage over NF when the intended usage of local explanations is centered around understanding how f works on the specific learning task it was trained on . Specifically , we present as an exploratory argument that selecting the target point distribution to be D rather than D perturbed byNx ( as for NF ) may better emphasize the ability of g to approximate f at realistic input points . This is relevant for ML ( and deep learning especially ) because ( a ) high-dimensional datasets often exhibit significant feature dependencies and adherence to lower dimensional manifolds ; ( b ) f can often be highly unpredictable and unstable when extrapolating beyond training data . Thus , when one measures NF with standard neighborhood choices that ignore feature dependencies ( e.g . most commonly Nx = N ( x , σI ) ) , the resulting target distribution may concentrate significantly on regions that are non-relevant to the original learning task at hand . As we illustrate in a toy example , this can lead to overemphasis on fitting noisy off-manifold behavior , deteriorating the fit of explanations relative to task-relevant input regions ( we defer a more detailed discussion of this point and of other trade-offs between NF and MNF to Appendix A ) . 4 GENERALIZATION OF MODEL PERFORMANCE VIA MNF The generalization error of the function f is typically bounded by some notion of the representational complexity of F . While standard results bound complexity in terms of parameter count , there is theoretical value in deriving bounds involving other novel terms . By doing so , one might understand how regularizing for those terms can affect the representation capacity , and in turn , the generalization error of f . Especially when f ’ s complexity may be intractable to bound on its own , introducing these terms provides a potentially useful new way to understand f ’ s generalization . Here specifically , we are interested in establishing a general connection between the representation complexity and the local explainability of any f . This naturally requires coming up with a notion that appropriately quantifies the complexity of G , which we discuss in the first part of this section . As we shall see , G ’ s complexity can be expressed in terms of Glocal , which is generally less complex and more amenable to standard analysis than F in practical settings where interpretability is desired . In the second part , we then relate this quantity to the generalization of f to derive our first main result . Key technical challenge : bounding the complexity of G. The overall idea behind how one could tie the notions of generalization and local explainability is fairly intuitive . For example , consider a simplified setting where we approximate f by dividingX intoK disjoint pieces , i.e . neighborhoods , and then approximating each neighborhood via a simple ( say , linear ) model . Then , one could bound the generalization error of f as the sum of two quantities : first , the error in approximating f via the piecewise linear model , and second , a term involving the complexity of said piecewise model . It is straightforward to show that this complexity term grows polynomially with the piece-count , K , and also the complexity of the simple local approximator ( see Appendix C.0.1 ) . Similarly , one could hope to bound the generalization error of f in terms of MNF ( f , g ) and the complexity of G. However , the key challenge here is that the class G is a much more complex class than the above class of piecewise linear models . For example , a straightforward piece-count-based complexity bound would be infinitely large since there are effectively infinitely many unique pieces in g. Our core technical contribution here is to bound the ( Rademacher ) complexity of G in this more flexible local explanation setting . At a high level , the resulting bound ( to be stated shortly ) grows inversely with “ the level of overlap ” between the neighborhoods { Nmirx |x ∈ X } , quantified as : Definition 4.1 . ( Neighborhood disjointedness factor ) Given a dataset S ∈ ( X × Y ) m , we define the neighborhood disjointedness factor ρS as ρS : = ∫ x′∈X √√√√ 1 m m∑ i=1 ( pNmirxi ( x′ ) ) 2dx′ Understanding the disjointedness factor . ρS can be interpreted as bounding the “ effective number ” of pieces induced by the set of neighborhood distributions { Nmirx |x ∈ X } . This turns out to be a quantity that lies in [ 1 , √ m ] ( shown formally in Appendix Fact B.1 ) . To reason more intuitively about this quantity , it is helpful to consider its behavior in extreme scenarios . First , consider the case where Nmirx is the same distribution ( say N ) regardless of x ; i.e. , neighborhoods are completely overlapping . Then , ρS = ∫ x′∈X ( pN ( x ′ ) ) dx′ = 1 . In the other extreme , consider if neighborhoods centered on the training data are all disjoint with supports X1 , . . . , X|S| . Here , the integral splits into m summands as : ρS = ∑m i=1 ∫ x′∈Xi 1√ m pNmirxi ( x′ ) dx′ = √ m. Thus , ρS grows from 1 to √ m as the level of overlap between the neighborhoods Nmirx1 , . . . , N mir x|S| reduces . For intuition at non-extreme values , we show in Appendix B.2 that in a simple setting , ρ = √ m1−k ( where 0 ≤ k ≤ 1 ) if every neighborhood is just large enough to encompass a 1/m1−k fraction of the mass of D. Rademacher complexity of G. We now use ρS to bound the empirical Rademacher complexity of G. Recall that the empirical Rademacher complexity of a function classH consisting of h : X → R is defined as R̂S ( H ) : = E~σ [ 1 m suph∈H σih ( xi ) ] , where the σi ’ s are i.i.d . and drawn uniformly from { −1 , 1 } . Roughly , this captures the complexity ofH by measuring how well it can fit random labels . Standard results allow us to then use R̂S ( H ) to bound the generalization error for h ∈ H. Now , in order to define the Rademacher complexity of G ( which consists of a different kind of functions whose domain is X ×X instead of X ) , it is useful to think of g as a randomized function . Specifically , at any target point x , the output of g is a random variable gx′ ( x ) where the randomness comes from x′ ∼ Nmirx . Then , in Lemma 4.1 , we take this stochasticity into account to define and bound the complexity of G. To keep our statement general , we consider a generic loss function L : R×R→ R ( e.g. , the squared error loss is L ( y , y′ ) = ( y − y′ ) 2 ) . Indeed , whenever L satisfies a standard Lipschitz assumption , we can bound the complexity of G ( composed with the loss function L ) in terms of ρS , the complexity of Glocal , and the Lipschitzness of L : Lemma 4.1 . ( see Appendix Lemma D.1 for full , precise statement ) Let L ( · , y′ ) be a c-Lipschitz function w.r.t . y′ in that for all y1 , y2 ∈ [ −B , B ] , |L ( y1 , y′ ) − L ( y2 , y′ ) | ≤ c|y1 − y2| . Then , the empirical Rademacher complexity of G under the loss function L is defined and bounded as : R̂S ( L ◦ G ) : = E~σ [ sup g∈G 1 m m∑ i σiEx′∼Nmirxi [ L ( gx′ ( xi ) , yi ) ] ] ≤ O ( cρSR̂S ( Glocal ) · lnm ) where ~σ is uniformly distributed over { −1 , 1 } m. We note that the proof technique employed here may be of independent theoretical interest as it provides a novel way to bound the complexity of a ( particular type of ) randomized function . Although techniques like PAC-Bayes provide ways to bound the complexity of randomized functions , they only apply to functions where the randomization comes from stochasticity in the parameters , which is not the case here . Main result . With the above key lemma in hand , we are now ready to prove our main result , which bounds the generalization error of f in terms of the complexity of G , thereby establishing a connection between model generalization and local explainability . Theorem 1 . ( see Appendix Theorem 3 for full , precise statement ) With probability over 1 − δ over the draws of S = { ( x1 , y1 ) , . . . , ( xm , ym ) } ∼ Dm , for all f ∈ F and for all g ∈ G , we have ( ignoring ln 1/δ factors ) : E ( x , y ) ∼D [ ( f ( x ) − y ) 2 ] ≤ 4 m m∑ i=1 ( f ( xi ) − yi ) 2 + 2Ex∼D [ Ex′∼Nmirx [ ( f ( x ) − gx′ ( x ) ) 2 ] ] ︸ ︷︷ ︸ MNF ( f , g ) + 4 m m∑ i=1 Ex′∼Nmirx [ ( f ( xi ) − gx′ ( xi ) ) 2 ] ︸ ︷︷ ︸ MNF ( f , g , xi ) +O ( BρSR̂S ( Glocal ) lnm ) . This result decomposes the test error of f into four quantities . The first quantity corresponds to the training error of f on the training set S. The second and the third correspond to the MNF of f with respect to g , computed on test and training data respectively . The fourth and final quantity corresponds to a term that bounds the complexity of G in terms of the “ disjointedness factor ” ρS and the complexity of the local function class Glocal . Takeaway . A key aspect of this bound is the trade-off that it captures when varying neighborhood widths . Consider shrinking the neighborhood widths to smaller and smaller values , in turn creating less and less overlap between the neighborhoods of the training examples in S. Then , on the one hand , we ’ d observe that the complexity term ( the fourth term on the R.H.S ) increases . Specifically , since R̂S ( Glocal ) typically scales as O ( 1/ √ m ) , as we go from the one extreme of full overlap to the other extreme of complete disjointedness , the complexity term increases from O ( 1/ √ m ) to O ( 1 ) . At this upper extreme , the bound becomes trivial , as such a constant upper bound would directly follow from just theO ( 1 ) bounds assumed on Y . On the other hand , as the widths decrease , the fidelity terms ( the second and third terms ) would likely decrease – this is because the simple functions in Glocal would find it increasingly easier to approximate f on the shrinking neighborhoods . This trade-off is intuitive . A function f that is hardly amenable to being fit by local explanations would require extremely tiny neighborhoods for Glocal to locally approximate it ( i.e . make the MNF terms small ) . For example , in an extreme case , when the neighborhoodsNmirx are set be point masses at x , it is trivially easy to find gx′ ( · ) ∈ Glocal with no approximation error . Thus , the complexity term would be too large in this case , implying that a hard-to-interpret f results in bad generalization . On the other hand , when f is easier to interpret , then we ’ d expect it to be well-approximated by Glocal even with wider neighborhoods . This allows one to afford smaller values for both the complexity and MNF terms . In other words , an easy-to-interpret f enjoys better generalization guarantees . Caveats . Our bound has two limitations worth noting . First , for high-dimensional datasets ( like image datasets ) , practical choices of Nmirx can lead to almost no overlap between neighborhoods , rendering the bound trivial in practice . This potentially poor dimension-dependence is a caveat similarly shared by bounds for non-parametric local regression , whereby increasing d results in an exponential increase in the required sample size ( Fan , 1993 ; Fan & Gijbels , 1996 ) . Nevertheless , we show later in our experiments that for lower-dimensional datasets and for practical choices of Nmirx , there can be sufficient neighborhood overlap to achieve values of ρS that are o ( √ m ) . A second caveat is that the second quantity , MNF ( f , g ) , requires unlabeled test data to be computed , which may be limiting if one is interested in numerically computing this bound in practice . It is however possible to get a bound without this dependence , although only on the test error of g rather than f ( see Appendix Theorem 4 ) . Nevertheless , we believe that the above bound has theoretical value in how it establishes a connection between the interpretability of f and its generalization .
This paper presents two main theoretical results as its main contributions. First, the authors provide a bound on the model generalization in terms its local explainability. This bound relates the model generalization, the training accuracy, local explainability, and the complexity of the explanations. Second the authors provide a bound on local explainability generalization. This bound describes the relation between training local explainability and test time local explainability. Both these bounds make concrete intuitive notions around local explainability generalization --- for instance, as we increase the size of the local explanation, generalization will decrease. Last, the authors provide short empirical evaluation to demonstrate the properties they describe in their bounds appear in practice.
SP:d15b10f7790bd3370607b620d28b13b790abd1ec
Benefit of deep learning with non-convex noisy gradient descent: Provable excess risk bound and superiority to kernel methods
√ n ) that is obtained by usual Rademacher complexity analysis . This discrepancy is induced by the non-convex geometry of the model and the noisy gradient descent used for neural network training provably reaches a near global optimal solution even though the loss landscape is highly non-convex . Although the noisy gradient descent does not employ any explicit or implicit sparsity inducing regularization , it shows a preferable generalization performance that dominates linear estimators . 1 INTRODUCTION . In the deep learning theory literature , clarifying the mechanism by which deep learning can outperform shallow approaches has been gathering most attention for a long time . In particular , it is quite important to show that a tractable algorithm for deep learning can provably achieve a better generalization performance than shallow methods . Towards that goal , we study the rate of convergence of excess risk of both deep and shallow methods in a setting of a nonparametric regression problem . One of the difficulties to show generalization ability of deep learning with certain optimization methods is that the solution is likely to be stacked in a bad local minimum , which prevents us to show its preferable performances . Recent studies tackled this problem by considering optimization on overparameterized networks as in neural tangent kernel ( NTK ) ( Jacot et al. , 2018 ; Du et al. , 2019a ) and mean field analysis ( Nitanda & Suzuki , 2017 ; Chizat & Bach , 2018 ; Rotskoff & Vanden-Eijnden , 2018 ; 2019 ; Mei et al. , 2018 ; 2019 ) , or analyzing the noisy gradient descent such as stochastic gradient Langevin dynamics ( SGLD ) ( Welling & Teh , 2011 ; Raginsky et al. , 2017 ; Erdogdu et al. , 2018 ) . The NTK analysis deals with a relatively large scale initialization so that the model is well approximated by the tangent space at the initial solution , and eventually , all analyses can be reduced to those of kernel methods ( Jacot et al. , 2018 ; Du et al. , 2019b ; Allen-Zhu et al. , 2019 ; Du et al. , 2019a ; Arora et al. , 2019 ; Cao & Gu , 2019 ; Zou et al. , 2020 ) . Although this regime is useful to show its global convergence , the obtained estimator looses large advantage of deep learning approaches because the estimation ability is reduced to the corresponding kernel methods . To overcome this issue , there are several “ beyond-kernel ” type analyses . For example , Allen-Zhu & Li ( 2019 ; 2020 ) showed benefit of depth by analyzing ResNet type networks . Li et al . ( 2020 ) showed global optimality of gradient descent by reducing the optimization problem to a tensor decomposition problem for a specific regression problem , and showed the “ ideal ” estimator on a linear model has worse dependency on the input dimensionality . Bai & Lee ( 2020 ) considered a second order Taylor expansion and showed that the sample complexity of deep approaches has better dependency on the input dimensionality than kernel methods . Chen et al . ( 2020 ) also derived a similar conclusion by considering a hierarchical representation . The analyses mentioned above actually show some superiority of deep learning , but all of these bounds are essentially Ω ( 1/ √ n ) where n is the sample size , which is not optimal for regression problems with squared loss ( Caponnetto & de Vito , 2007 ) . The reason why only such a sub-optimal rate is considered is that the target of their analyses is mostly the Rademacher complexity of the set in which estimators exist for bounding the generalization gap . However , to derive a tight excess risk bound instead of the generalization gap , we need to evaluate so called local Rademacher complexity ( Mendelson , 2002 ; Bartlett et al. , 2005 ; Koltchinskii , 2006 ) ( see Eq . ( 2 ) for the definition of excess risk ) . Moreover , some of the existing analyses should change the target function class as the sample size n increases , for example , the input dimensionality is increased against the sample size , which makes it difficult to see how the rate of convergence is affected by the choice of estimators . Another promising approach is the mean field analysis . There are also some work that showed superiority of deep learning against kernel methods . Ghorbani et al . ( 2019 ) showed that , when the dimensionality d of input is polynomially increasing with respect to n , the kernel methods is outperformed by neural network approaches . Although the situation of increasing d explains well the modern high dimensional situations , this setting blurs the rate of convergence . Actually , we can show the superiority of deep learning even in a fixed dimension setting . There are several studies about approximation abilities of deep and shallow models . Ghorbani et al . ( 2020 ) showed adaptivity of kernel methods to the intrinsic dimensionality in terms of approximation error and discuss difference between deep and kernel methods . Yehudai & Shamir ( 2019 ) showed that the random feature method requires exponentially large number of nodes against the input dimension to obtain a good approximation for a single neuron target function . These are only for approximation errors and estimation errors are not compared . Recently , the superiority of deep learning against kernel methods has been discussed also in the nonparametric statistics literature where the minimax optimality of deep learning in terms of excess risk is shown . Especially , it is shown that deep learning achieves better rate of convergence than linear estimators in several settings ( Schmidt-Hieber , 2020 ; Suzuki , 2019 ; Imaizumi & Fukumizu , 2019 ; Suzuki & Nitanda , 2019 ; Hayakawa & Suzuki , 2020 ) . Here , the linear estimators are a general class of estimators that includes kernel ridge regression , k-NN regression and Nadaraya-Watson estimator . Although these analyses give clear statistical characterization on estimation ability of deep learning , they are not compatible with tractable optimization algorithms . In this paper , we give a theoretical analysis that unifies these analyses and shows the superiority of a deep learning method trained by a tractable noisy gradient descent algorithm . We evaluate the excess risks of the deep learning approach and linear estimators in a nonparametric regression setting , and show that the minimax optimal convergence rate of the linear estimators can be dominated by the noisy gradient descent on neural networks . In our analysis , the model is fixed and no explicit sparse regularization is employed . Our contributions can be summarized as follows : • A refined analysis of excess risks for a fixed model with a fixed input dimension is given to compare deep and shallow estimators . Although several studies pointed out the curse of dimensionality is a key factor that separates shallow and deep approaches , we point out that such a separation appears in a rather low dimensional setting , and more importantly , the non-convexity of the model essentially makes the two regimes different . • A lower bound of the excess risk which is valid for any linear estimator is derived . The analysis is considerably general because the class of linear estimators includes kernel ridge regression with any kernel and thus it also includes estimators in the NTK regime . • All derived convergence rate is a fast learning rate that is faster than O ( 1/ √ n ) . We show that simple noisy gradient descent on a sufficiently wide two-layer neural network achieves a fast learning rate by using a fact that the solution converges to a Bayes estimator with a Gaussian process prior , and the derived convergence rate can be faster than that of linear estimators . This is much different from such existing work that compared only coefficients with the same rate of convergence with respect to the sample size n. Other related work Bach ( 2017 ) analyzed the model capacity of neural networks and its corresponding reproducing kernel Hilbert space ( RKHS ) , and showed that the RKHS is much larger than the neural network model . However , separation of the estimation abilities between shallow and deep is not proven . Moreover , the analyzed algorithm is basically the Frank-Wolfe type method which is not typically used in practical deep learning . The same technique is also employed by Barron ( 1993 ) . The Frank-Wolfe algorithm is a kind of sparsity inducing algorithm that is effective for estimating a function in a model with an L1-norm constraint . It has been shown that explicit or implicit sparse regularization such as L1-regularization is beneficial to obtain better performances of deep learning under certain situations ( Chizat & Bach , 2020 ; Chizat , 2019 ; Gunasekar et al. , 2018 ; Woodworth et al. , 2020 ; Klusowski & Barron , 2016 ) . For example , E et al . ( 2019b ; a ) showed that the approximation error of a linear model suffers from the curse of dimensionality in a setting where the target function is in the Barron class ( Barron , 1993 ) , and showed anL1-type regularization avoids the curse of dimensionality . However , our analysis goes in a different direction where a sparse regularization is not required . 2 PROBLEM SETTING AND MODEL . In this section , we give the problem setting and notations that will be used in the theoretical analysis . We consider the standard nonparametric regression problem where data are generated from the following model for an unknown true function fo : Rd → R : yi = f o ( xi ) + i ( i = 1 , . . . , n ) , ( 1 ) where xi is independently identically distributed from PX whose support is included in Ω = [ 0 , 1 ] d , and i is an observation noise that is independent of xi and satisfies E [ i ] = 0 and i ∈ [ −U , U ] almost surely . The n i.i.d . observations are denoted by Dn = ( xi , yi ) ni=1 . We want to estimate the true function fo through the training data Dn . To achieve this purpose , we employ the squared loss ` ( y , f ( x ) ) = ( y − f ( x ) ) 2 and accordingly we define the expected and empirical risks as L ( f ) : = EY , X [ ` ( Y , f ( X ) ) ] and L̂ ( f ) : = 1n ∑n i=1 ` ( yi , f ( xi ) ) respectively . Throughout this paper , we are interested in the excess ( expected ) risk of an estimator f̂ defined by ( Excess risk ) L ( f̂ ) − inf f : measurable L ( f ) . ( 2 ) Since the loss function ` is the squared loss , the infimum of inff : measurable L ( f ) is achieved by fo : inff : measurable L ( f ) = L ( fo ) . The population L2 ( PX ) -norm is denoted by ‖f‖L2 ( PX ) : =√ EX∼PX [ f ( X ) 2 ] and the sup-norm on the support of PX is denoted by ‖f‖∞ : = supx∈supp ( PX ) |f ( x ) | . We can easily check that for an estimator f̂ , the L2-distance ‖f̂ − f o‖2L2 ( PX ) between the estimator f̂ and the true function fo is identical to the excess risk : L ( f̂ ) − L ( fo ) = ‖f̂ − fo‖2L2 ( PX ) . Note that the excess risk is different from the generalization gap L ( f̂ ) − L̂ ( f̂ ) . Indeed , the generalization gap typically converges with the rate of O ( 1/ √ n ) which is optimal in a typical setting ( Mohri et al. , 2012 ) . On the other hand , the excess risk can be faster than O ( 1/ √ n ) , which is known as a fast learning rate ( Mendelson , 2002 ; Bartlett et al. , 2005 ; Koltchinskii , 2006 ; Giné & Koltchinskii , 2006 ) .
The paper shows that a two-layer neural network (although an extension to deeper models seem unproblematic) may outperform a class of linear functions in terms of the excess risk learning rate, and in a minimax optimality analysis, and when approximating a target function from the neural network class. The paper essentially shows that linear functions have a problem with the non-convexity of the neural network class, and approximate the slow rate of 1/(n)^(1/2) for increasing dimension. A neural network trained with noisy stochastic gradient descent on the other hand has a faster rate, depending on several parameters.
SP:f04f2cdfcdb5478771da0dc4f28df9f694739d3d
Spherical Motion Dynamics: Learning Dynamics of Neural Network with Normalization, Weight Decay, and SGD
1 INTRODUCTION AND BACKGROUND . Normalization techniques ( e.g . Batch Normalization ( Ioffe & Szegedy , 2015 ) or its variants ) are one of the most commonly adopted techniques for training deep neural networks ( DNN ) . A typical normalization can be formulated as following : consider a single unit in a neural network , the input is X , the weight of linear layer is w ( bias is included in w ) , then its output is y ( X ; w ; γ ; β ) = g ( Xw − µ ( Xw ) σ ( wX ) γ + β ) , ( 1 ) where g is a nonlinear activation function like ReLU or sigmoid , µ , σ are mean and standard deviation computed across specific dimension of Xw ( like Batch Normalization ( Ioffe & Szegedy , 2015 ) , Layer Normalization Ba et al . ( 2016 ) , Group Normalization ( Wu & He , 2018 ) , etc. ) . β , γ are learnable parameters to remedy for the limited range of normalized feature map . Aside from normalizing feature map , Salimans & Kingma ( 2016 ) normalizes weight by l2 norm instead : y ( X ; w ; γ ; β ) = g ( X w ||w||2 γ + β ) , ( 2 ) where || · ||2 denotes l2 norm of a vector . Characterizing evolving of networks during training . Though formulated in different manners , all normalization techniques mentioned above share an interesting property : the weight w affiliated with a normalized unit is scale-invariant : ∀α ∈ R+ , y ( X ; αW ; γ , β ) = y ( X ; w ; γ , β ) . Due to the scale-invariant property of weight , the Euclidean distance defined in weight space completely fails to measure the evolving of DNN during learning process . As a result , original definition of learning rate η can not sufficiently represent the update efficiency of normalized DNN . To deal with such issue , van Laarhoven ( 2017 ) ; Hoffer et al . ( 2018 ) ; Zhang et al . ( 2019 ) propose “ effective learning rate ” as a substitute for learning rate to measure the update efficiency of normalized neural network with stochastic gradient descent ( SGD ) , defined as ηeff = η ||w||22 . ( 3 ) Joint effects of normalization and weight decay . van Laarhoven ( 2017 ) explores the joint effect of normalization and weight decay ( WD ) , and obtains the magnitudes of weight by assuming the convergence of weight , i.e . if wt = wt+1 , the weight norm can be approximated as ||wt||2 = O ( 4 √ η/λ ) , where λ is WD coefficient . Combining with Eq . ( 3 ) , we have ηeff = √ ηλ . A more intuitive demonstration about relationship between normalization and weight decay is presented in Chiley et al . ( 2019 ) ( see Figure 1 ) : due to the fact that the gradient of scale invariant weight ∂L/∂w ( L is the loss function of normalized network without WD part ) is always perpendicular to weight w , one can infer that gradient component ∂L/∂w always tends to increase the weight norm , while the gradient component provided by WD always tends to reduce weight norm . Thus if weight norm remains unchanged , or “ equilibrium has been reached ” 1 , one can obtain wt −wt+1 ||wt||2 = √ 2ηλ ∂L/∂w E||∂L/∂w||2 . ( 4 ) Eq . ( 4 ) implies the magnitude of update is scale-invariant of gradients , and effective learning rate should be √ 2ηλ . Li & Arora ( 2020 ) manages to estimate the magnitude of update in SGDM , their result is presented in limit and accumulation manner : if both limT−→∞RT = 1/T ∑T t=0 ||wt|| and limT−→∞DT = 1/T ∑T t=0 ||wt −wt+1|| exist , then we have lim T−→∞ DT RT = 2ηλ 1 + α . ( 5 ) Though not rigorously , one can easily speculate from Eq . ( 5 ) the magnitude of update in SGDM cases should be √ 2ηλ/ ( 1 + α ) in equilibrium condition . But proof of Eq . ( 5 ) requires more strong assumptions : not only convergence of weight norm , but also convergence of update norm ‖wt+1 − wt‖2 ( both in accumulation manner ) . As discussed above , all previous qualitative results about “ effective learning rate ” ( van Laarhoven , 2017 ; Chiley et al. , 2019 ; Li & Arora , 2020 ) highly rely on equilibrium condition , but none of them explores why such equilibrium condition can be achieved . Only van Laarhoven ( 2017 ) simply interprets the occurrence of equilibrium as a natural result of convergence of optimization , i.e . when optimization is close to be finished , wt = wt+1 , resulting in equilibrium condition . However , this interpretation has an apparent contradiction : according to Eq . ( 4 ) and ( 5 ) , when equilibrium condition is reached , the magnitude of update is constant , only determined by hyper-parameters , which means optimization process has not converged yet . Li & Arora ( 2020 ) also notices the non-convergence of SGD with BN and WD , so they do not discuss reasonableness of assumptions adopted by Eq. ( 5 ) . In a word , previous results about “ effective learning rate ” in equilibrium condition can only provide vague insights , they are difficult to be connected with empirical observation . In this work , we comprehensively reveal the learning dynamics of normalized neural network using stochastic gradient descent without/with momentum ( SGD/SGDM ) and weight decay , named as Spherical Motion Dynamics ( SMD ) . Our investigation aims to answer the following question : 1 ” Weight norm remains unchanged ” means ||wt||2 ≈ ||wt+1||2 , Chiley et al . ( 2019 ) calls this condition as “ equilibrium ” , which will also be used in the following context of this paper . Note equilibrium condition is not mathematically rigorous , we only use it for intuitive analysis . Why and how equilibrium condition can be reached in Spherical Motion Dynamics ? Specifically , our contributions are • We introduce the assumptions that can lead to equilibrium condition in SMD , and justify their reasonableness by sufficient experiments . We also prove under given assumptions , equilibrium condition can be reached as weight norm approach to its theoretical value in a linear rate regime in SMD . Our assumptions show the equilibrium condition can occur long before the finish of the whole optimization ; • We define a novel index , angular update , to measure the change of normalized neural network in a single iteration , and derive its theoretical value under equilibrium condition in SMD . We also prove angular update can approach to its theoretical value in a linear regime along with behavior of weight norm . Our results imply that the update efficiency of SGD/SGDM on normalized neural network only depends on pre-defined hyper-parameters in both SGD and SGDM case ; • We verify our theorems on different computer vision tasks ( including one of most challenging datasets ImageNet ( Russakovsky et al. , 2015 ) and MSCOCO ( Lin et al. , 2014 ) ) with various networks structures and normalization techniques . Experiments show the theoretical value of angular update and weight norm agree well with empirical observation . Recently , a parallel work ( Li et al. , 2020b ) is published to analyze the equilibrium condition of normalized neural network with weight decay in SGD case . They model the learning dynamic of normalized network as a SDE , and propose the concept “ intrinsic learning rate ” ( λe = λη ) to measure the converge rate of weight norm and effective learning rate . Their main result , in which converging time to equilibrium in SGD case is O ( 1/ ( λη ) ) , is consistent with our theory . The major difference between Li et al . ( 2020b ) and our work is that all results from Li et al . ( 2020b ) are qualitatively results or conjectures limited on SGD case . While our work derives the quantitative results on both SGD/SGDM cases , our analysis allows us to precisely predict the value of weight norm/angular update in large scale data experiments , and clarify the difference of approaching rate between SGD and SGDM case . Besides , Li et al . ( 2020b ) conducts empirical study to discuss the connection between the equilibrium state and accuracy of trained model . Our work mainly focuses on the equilibrium condition itself , connection between equilibrium condition and performance of trained model is beyond our discussion in this paper . The experiments we present in main text are only for verification of our theory . Our theory on equilibrium condition in Spherical Motion Dynamics implies equilibrium condition mostly relies on the update rules of SGD/SGDM with WD , and scale-invariant property . The cause of equilibrium condition is independent of decrease of loss or trajectory of optimization , but equilibrium condition turns out to significantly affect update efficiency of normalized network by controlling the relative update ( Eq. ( 4 ) ) . We believe equilibrium condition is one of the key reason why learning dynamic of normalized neural network is not consistent with traditional optimization theory ( Li et al. , 2020b ) . We think it has great potential to study the leaning dynamic of normalized network or develop novel efficient learning strategy under the view of Spherical Motion Dynamics . 2 RELATED WORK . Normalization techniques Batch normalization ( BN ( Ioffe & Szegedy , 2015 ) ) is proposed to deal with gradient vanishing/explosion , and accelerate the training of DNN . Rapidly , BN has been widely used in almost all kinds of deep learning tasks . Aside from BN , more types of normalization techniques have been proposed to remedy the defects of BN ( Ioffe , 2017 ; Wu & He , 2018 ; Chiley et al. , 2019 ; Yan et al. , 2020 ) or to achieve better performance ( Ba et al. , 2016 ; Ulyanov et al. , 2016 ; Salimans & Kingma , 2016 ; Shao et al. , 2019 ; Singh & Krishnan , 2020 ) . Though extremely effective , the mechanism of BN still remains as a mystery . Existing works attempt to analyze the function of BN : Ioffe & Szegedy ( 2015 ) claims BN can reduce the Internal Covariance Shift ( ICS ) of DNN ; Santurkar et al . ( 2018 ) argue that the effectiveness of BN is not related to ICS , but the smoothness of normalized network ; Luo et al . ( 2019 ) shows BN can be viewed as an implicit regularization technique ; Cai et al . ( 2019 ) proves that with BN orthogonal least square problem can converge at linear rate ; Dukler et al . ( 2020 ) proves weight normalization can speed up training in a two-layer ReLU network . Weight decay Weight decay ( WD ) is well-known as l2 regularization , or ridge regression , in statistics . WD is also found to be extreme effective when applied in deep learning tasks . Krizhevsky & Geoffrey ( 2009 ) shows WD sometimes can even improve training accuracy not just generalization performance ; Zhang et al . ( 2019 ) show WD can regularize the input-output Jacobian norm and reduce the effective damping coefficient ; Li et al . ( 2020a ) discusses the disharmony between WD and weight normalization . A more recent work Lewkowycz & Gur-Ari ( 2020 ) empirically finds the number of SGD steps T until a model achieves maximum performance satisfies T ∝ 1λη , where λ , η are weight decay factor and learning rate respectively , they interpret this phenomenon under the view of Neural Tangent Kernel ( Jacot et al. , 2018 ) , showing that weight decay can accelerate the training process . Notice their result has no connection with equilibrium condition discussed in this work . Our results shows the cause of equilibrium condition can be reached long before neural network can get its highest performance . Effective learning rate Due to the scale invariant property caused by normalization , researchers start to study the behavior of effective learning rate . van Laarhoven ( 2017 ) ; Chiley et al . ( 2019 ) estimate the magnitude of effective learning rate under equilibrium assumptions in SGD case ; Hoffer et al . ( 2018 ) quantify effective learning rate without equilibrium assumptions , so their results are much weaker ; Arora et al . ( 2019 ) proves that without WD , normalized DNN can still converge with fixed/decaying learning rate in GD/SGD cases respectively ; Zhang et al . ( 2019 ) shows WD can increase effective learning rate ; Li & Arora ( 2020 ) proves standard multi-stage learning rate schedule with BN and WD is equivalent to an exponential increasing learning rate schedule without WD . As a proposition , Li & Arora ( 2020 ) quantifies the magnitude of effective learning rate in SGDM case . But none of them have ever discussed why equilibrium condition can be reached . A recent work Li et al . ( 2020b ) studies the convergence of effective learning rate by SDE , proving that the convergence time is of O ( 1/ ( λη ) ) , where λ , η are weight decay factor and learning rate respectively . Their result can only provide intuitive understanding , and is limited on SGD case .
The main goal of the paper is to establish theoretically some previous known results that for scale invariant networks the weight norm has a fixed point with ||w||^4=eta/lambda ||\tilde{g}|| . They also discuss the angular update, which because of scale invariance is basically equivalent to arccos (1-eta lambda) |w_t|^2/|w_t+1|^2 and it thus comes mainly from the gradient. They have some experiments which they compare with the predicted equilibrium values for the angular update/ weight norm.
SP:cc7b030c76352bfec247751d011c0a6d02c8147e
Watch-And-Help: A Challenge for Social Perception and Human-AI Collaboration
1 INTRODUCTION . Humans exhibit altruistic behaviors at an early age ( Warneken & Tomasello , 2006 ) . Without much prior experience , children can robustly recognize goals of other people by simply watching them act in an environment , and are able to come up with plans to help them , even in novel scenarios . In contrast , the most advanced AI systems to date still struggle with such basic social skills . In order to achieve the level of social intelligence required to effectively help humans , an AI agent should acquire two key abilities : i ) social perception , i.e. , the ability to understand human behavior , and ii ) collaborative planning , i.e. , the ability to reason about the physical environment and plan its actions to coordinate with humans . In this paper , we are interested in developing AI agents with these two abilities . Towards this goal , we introduce a new AI challenge , Watch-And-Help ( WAH ) , which focuses on social perception and human-AI collaboration . In this challenge , an AI agent needs to collaborate with a human-like agent to enable it to achieve the goal faster . In particular , we present a 2-stage framework as shown in Figure 1 . In the first , Watch stage , an AI agent ( Bob ) watches a human-like agent ( Alice ) performing a task once and infers Alice ’ s goal from her actions . In the second , Help stage , Bob helps Alice achieve the same goal in a different environment as quickly as possible ( i.e. , with the minimum number of environment steps ) . This 2-stage framework poses unique challenges for human-AI collaboration . Unlike prior work which provides a common goal a priori or considers a small goal space ( Goodrich & Schultz , 2007 ; Carroll et al. , 2019 ) , our AI agent has to reason about what the human-like agent is trying to achieve by watching a single demonstration . Furthermore , the AI agent has to generalize its acquired knowl- 1Code and documentation for the VirtualHome-Social environment are available at https : // virtual-home.org . Code and data for the WAH challenge are available at https : //github.com/ xavierpuigf/watch_and_help . A supplementary video can be viewed at https : //youtu.be/ lrB4K2i8xPI . edge about the human-like agent ’ s goal to a new environment in the Help stage . Prior work does not investigate such generalization . To enable multi-agent interactions in realistic environments , we extend an open source virtual platform , VirtualHome ( Puig et al. , 2018 ) , and build a multi-agent virtual environment , VirtualHomeSocial . VirtualHome-Social simulates realistic and rich home environments where agents can interact with different objects ( e.g , by opening a container or grabbing an object ) and with other agents ( e.g. , following , helping , avoiding collisions ) to perform complex tasks . VirtualHome-Social also provides i ) built-in agents that emulate human behaviors , allowing training and testing of AI agents alongside virtual humans , and ii ) an interface for human players , allowing evaluation with real humans and collecting/displaying human activities in realistic environments ( a functionality key to machine social intelligence tasks but not offered by existing multi-agent platforms ) . We plan to open source our environment . We design an evaluation protocol and provide a benchmark for the challenge , including a goal inference model for the Watch stage , and multiple planning and deep reinforcement learning ( DRL ) baselines for the Help stage . Experimental results indicate that to achieve success in the proposed challenge , AI agents must acquire strong social perception and generalizable helping strategies . These fundamental aspects of machine social intelligence have been shown to be key to humanAI collaboration in prior work ( Grosz & Kraus , 1996 ; Albrecht & Stone , 2018 ) . In this work , we demonstrate how we can systematically evaluate them in more realistic settings at scale . The main contributions of our work are : i ) a new social intelligence challenge , Watch-And-Help , for evaluating AI agents ’ social perception and their ability to collaborate with other agents , ii ) a multiagent platform allowing AI agents to perform complex household tasks by interacting with objects and with built-in agents or real humans , and iii ) a benchmark consisting of multiple planning and learning based approaches which highlights important aspects of machine social intelligence . 2 RELATED WORK . Human activity understanding . An important part of the challenge is to understand human activities . Prior work on activity recognition has been mostly focused on recognizing short actions ( Sigurdsson et al. , 2018 ; Caba Heilbron et al. , 2015 ; Fouhey et al. , 2018 ) , predicting pedestrian trajectories ( Kitani et al. , 2012 ; Alahi et al. , 2016 ) , recognizing group activities ( Shu et al. , 2015 ; Choi & Savarese , 2013 ; Ibrahim et al. , 2016 ) , and recognizing plans ( Kautz , 1991 ; Ramırez & Geffner , 2009 ) . We are interested in the kinds of activity understanding that require inferring other people ’ s mental states ( e.g. , intentions , desires , beliefs ) from observing their behaviors . Therefore , the Watch stage of our challenge focuses on the understanding of humans ’ goals in a long sequence of actions instead . This is closely related to work on computational Theory of Mind that aims at inferring humans ’ goals by observing their actions ( Baker et al. , 2017 ; Ullman et al. , 2009 ; Rabinowitz et al. , 2018 ; Shum et al. , 2019 ) . However , in prior work , activities were simulated in toy environments ( e.g. , 2D grid worlds ) . In contrast , this work provides a testbed for conducting Theory-of-Mind type of activity understanding in simulated real-world environments . Human-robot interaction . The helping aspect of the WAH challenge has been extensively studied in human-robot interaction ( HRI ) . However , prior work in HRI has been mainly restricted in lab environments ( Goodrich & Schultz , 2007 ; Dautenhahn , 2007 ; Nikolaidis et al. , 2015 ; Rozo et al. , 2016 ) , and the goals in the collaborative tasks were either shared by both agents or were defined in a small space . The setup in WAH is much more challenging – the goal is sampled from a large space , needs to be inferred from a single demonstration , and must be performed in realistic and diverse household environments through a long sequence of actions . Multi-agent virtual environments . There has been a large body of platforms for various multiagent tasks ( Jaderberg et al. , 2019 ; Samvelyan et al. , 2019 ; OpenAI , 2018 ; Lowe et al. , 2017 ; Resnick et al. , 2018 ; Shu & Tian , 2018 ; Carroll et al. , 2019 ; Suarez et al. , 2019 ; Baker et al. , 2019 ; Bard et al. , 2020 ) . However , these multi-agent platforms can only simulate simple or game-like environments and do not support for human-AI collaborations on real-life activities . Existing platforms for realistic virtual environments mainly focus on single agent settings for tasks such as navigation ( Savva et al. , 2019 ; Xia et al. , 2018 ; Brodeur et al. , 2017 ; Zhu et al. , 2017 ; Xia et al. , 2018 ) , embodied question answering ( Gordon et al. , 2017 ; Wijmans et al. , 2019 ; Das et al. , 2018 ) , or single agent task completion ( Puig et al. , 2018 ; Shridhar et al. , 2019 ; Misra et al. , 2018 ; Gao et al. , 2019 ) . In contrast , the proposed VirtualHome-Social environment allows AI agents to engage in multi-agent household activities by i ) simulating realistic and interactive home environments , ii ) incorporating humanoid agents with human-like behaviors into the system , iii ) providing a wide range of commands and animations for navigation and object manipulation , and iv ) allowing human participation . Because of these features , VirtualHome-Social can serve as a testbed for complex social perception and humanAI collaboration tasks , which is complementary to existing virtual environments . 3 THE WATCH-AND-HELP CHALLENGE . The Watch-And-Help challenge aims to study AI agents ’ ability to help humans in household activities . To do that , we design a set of tasks defined by predicates describing the final state of the environment . For each task , we first provide Bob a video that shows Alice successfully performing the activity ( Watch stage ) , and then place both agents in a new environment where Bob has to help Alice achieve the same goal with the minimum number of time steps ( Help stage ) . Figure 2 provides an overview of the system setup for the Watch-And-Help challenge . For this challenge , we build a multi-agent platform , VirtualHome-Social ( Section 4 ) , that i ) supports concurrent actions from multiple agents and ii ) provides observations for the agents . Alice represents a built-in agent in the system ; she plans her actions based on her own goal and a partial observation of the environment . Bob serves as an external AI agent , who does not know Alice ’ s ground-truth goal and only has access to a single demonstration of Alice performing the same task in the past . During the Help stage , Bob receives his observation from the system at each step and sends an action command back to control the avatar in the environment . Alice , on her part , updates her plan at each step based on her latest observation to reflect any world state change caused by Bob . We also allow a human to control Alice in our system . We discuss how the system and the built-in agent work in Section 4 . Problem Setup . Formally , each task in the challenge is defined by Alice ’ s goal g ( i.e. , a set of goal predicates ) , a demonstration of Alice taking actions to achieve that goalD = { stAlice , atAlice } Tt=1 ( i.e. , a sequence of states stAlice and actions a t Alice ) , and a new environment where Bob collaborates with Alice and help achieve the same goal as quickly as possible . During training , the ground-truth goal of Alice is shown to Bob as supervision ; during testing , Bob no longer has access to the ground-truth goal and thus has to infer it from the given demonstration . Goal Definitions . We define the goal of a task as a set of predicates and their counts , which describes the target state . Each goal has 2 - 8 predicates . For instance , “ ON ( plate , dinnertable ) :2 ; ON ( wineglass , dinnertable ) :1 ” means “ putting two plates and one wine glass onto the dinner table. ” The objects in a predicate refer to object classes rather than instances , meaning that any object of a specified class is acceptable . This goal definition reflects different preferences of agents ( when setting up a dinner table , some prefer to put water glasses , others may prefer to put wine glasses ) , increasing the diversity in tasks . We design five predicate sets representing five types of household activities : 1 ) setting up a dinner table , 2 ) putting groceries / leftovers to the fridge , 3 ) preparing a simple meal , 4 ) washing dishes , and 5 ) reading a book while having snacks or drinks . In total , there are 30 different types of predicates . In each task , the predicates of a goal are sampled from one of the five predicate sets ( as a single household activity ) . More details about the predicate sets and goal definitions are listed in Appendix B.1 .
The paper targets to demonstrate social perception and human-AI collaboration in common household activities. It shows the development of a multi-agent virtual environment that is used to test an AI agent’s ability to reason about other agents’ mental states and help them in unfamiliar scenarios. This is performed by presenting an experimental study over specifically selected scenarios which involve aspects of social intelligence.
SP:9afb51b717b926a92c9f2a1b3dc7aceb960ff80a
Deployment-Efficient Reinforcement Learning via Model-Based Offline Optimization
1 INTRODUCTION . Reinforcement learning ( RL ) algorithms have recently demonstrated impressive success in learning behaviors for a variety of sequential decision-making tasks ( Barth-Maron et al. , 2018 ; Hessel et al. , 2018 ; Nachum et al. , 2019 ) . Virtually all of these demonstrations have relied on highly-frequent online access to the environment , with the RL algorithms often interleaving each update to the policy with additional experience collection of that policy acting in the environment . However , in many real-world applications of RL , such as health ( Murphy et al. , 2001 ) , education ( Mandel et al. , 2014 ) , dialog agents ( Jaques et al. , 2019 ) , and robotics ( Gu et al. , 2017a ; Kalashnikov et al. , 2018 ) , the deployment of a new data-collection policy may be associated with a number of costs and risks . If we can learn tasks with a small number of data collection policies , we can substantially reduce them . Based on this idea , we propose a novel measure of RL algorithm performance , namely deployment efficiency , which counts the number of changes in the data-collection policy during learning , as illustrated in Figure 1 . This concept may be seen in contrast to sample efficiency or data efficiency ( Precup et al. , 2001 ; Degris et al. , 2012 ; Gu et al. , 2017b ; Haarnoja et al. , 2018 ; Lillicrap et al. , 2016 ; Nachum et al. , 2018 ) , which measures the amount of environment interactions incurred during training , without regard to how many distinct policies were deployed to perform those interactions . Even when the ∗Equal contribution . 1Codes and pre-trained models are available at https : //github.com/matsuolab/BREMEN . data efficiency is high , the deployment efficiency could be low , since many on-policy and off-policy algorithms alternate data collection with each policy update ( Schulman et al. , 2015 ; Lillicrap et al. , 2016 ; Gu et al. , 2016 ; Haarnoja et al. , 2018 ) . Such dependence on high-frequency policy deployments is best illustrated in the recent works in offline RL ( Fujimoto et al. , 2019 ; Jaques et al. , 2019 ; Kumar et al. , 2019 ; Levine et al. , 2020 ; Wu et al. , 2019 ) , where baseline off-policy algorithms exhibited poor performance when trained on a static dataset . These offline RL works , however , limit their study to a single deployment , which is enough for achieving high performance with data collected from a sub-optimal behavior policy , but often not from a random policy . In contrast to those prior works , we aim to learn successful policies from scratch in a manner that is both sample and deployment-efficient . Many existing model-free offline RL algorithms ( Levine et al. , 2020 ) are tuned and evaluated on massive datasets ( e.g. , one million transitions ) . In order to develop an algorithm that is both sample and deployment-efficient , each iteration of the algorithm between successive deployments has to work effectively on much smaller dataset sizes . We believe model-based RL is better suited to this setting due to its higher demonstrated sample efficiency than model-free RL ( Kurutach et al. , 2018 ; Nagabandi et al. , 2018 ) . Although the combination of model-based RL and offline or limiteddeployment settings seems straight-forward , we find this naïve approach leads to poor performance . This problem can be attributed to extrapolation errors ( Fujimoto et al. , 2019 ) similar to those observed in model-free methods . Specifically , the learned policy may choose sequences of actions which lead it to regions of the state space where the dynamics model can not predict properly , due to poor coverage of the dataset . This can lead the policy to exploit approximation errors of the dynamics model and be disastrous for learning . In model-free settings , similar data distribution shift problems are typically remedied by regularizing policy updates explicitly with a divergence from the observed data distribution ( Jaques et al. , 2019 ; Kumar et al. , 2019 ; Wu et al. , 2019 ) , which , however , can overly limit policies ’ expressivity ( Sohn et al. , 2020 ) . In order to better approach these problems arising in limited deployment settings , we propose Behavior-Regularized Model-ENsemble ( BREMEN ) , which learns an ensemble of dynamics models in conjunction with a policy using imaginary rollouts while implicitly regularizing the learned policy via appropriate parameter initialization and conservative trust-region learning updates . We evaluate BREMEN on standard offline RL benchmarks of high-dimensional continuous control tasks , where only a single static dataset is used . In this fixed-batch setting , our experiments show that BREMEN can not only achieve performance competitive with state-of-the-art when using standard dataset sizes but also learn with 10-20 times smaller datasets , which previous methods are unable to attain . Enabled by such stable and sample-efficient offline learning , we show that BREMEN can learn successful policies with only 5-10 deployments in the online setting , significantly outperforming existing off-policy and offline RL algorithms in deployment efficiency while keeping sample efficiency . 2 PRELIMINARIES . We consider a Markov Decision Process ( MDP ) setting , characterized by the tuple M = ( S , A , p , r , γ ) , where S is the state space , A is the action space , p ( s′|s , a ) is the transition probability distribution or dynamics , r ( s ) is the reward function and γ ∈ ( 0 , 1 ) is the discount factor . A policy π is a function that determines the agent behavior , mapping from states to probability distributions over actions . The goal is to obtain the optimal policy π∗ , which maximizes the expectation of discounted sum of rewards . The transition probability p ( s′|s , a ) is usually unknown , and estimated with a parameterized dynamics model fφ ( e.g . a neural network ) in model-based RL . For simplicity , we assume that the reward function r ( s ) is known , and the reward can be computed for any arbitrary state , but we may extend to the unknown setting and predict it using a parameterized function . On-policy vs Off-policy , Online vs Offline At a high-level , most RL algorithms alternate many times between collecting a batch of transitions ( deployments ) and optimizing the policy ( learning ) . If the algorithms discard data after each policy update , they are on-policy ( Schulman et al. , 2015 ; 2017 ) , while if they accumulate data in a buffer D , i.e . experience replay ( Lin , 1992 ) , they are off-policy ( Mnih et al. , 2015 ; Lillicrap et al. , 2016 ; Gu et al. , 2016 ; 2017b ; Haarnoja et al. , 2018 ; Fujimoto et al. , 2019 ; Fakoor et al. , 2019 ) because not all the data in buffer comes from the current policy . However , we consider all these algorithms to be online RL algorithms , since they involve many deployments during learning , ranging from hundreds to millions . On the other hand , in pure offline RL , one does not assume direct interaction and learns a policy from only a fixed dataset , which effectively corresponds to a single deployment allowed for learning . Classically , interpolating these two extremes were semi-batch RL algorithms ( Lange et al. , 2012 ; Singh et al. , 1995 ) , which improve the policy through repetitions of collecting a large batch of transitions D = { ( s , a , s′ , r ) } and performing many or full policy updates . While these semi-batch RL also realize good deployment efficiency , they have not been extensively studied with neural network function approximators or in off-policy settings with experience replay for scalable sample-efficient learning . In our work , we aim to have both high deployment efficiency and sample efficiency by developing an algorithm that can solve the tasks with minimal policy deployments as well as transition samples . 3 DEPLOYMENT EFFICIENCY . Deploying a new policy for data collection can be associated with a number of costs and risks for many real-world applications like medicine , dialogue systems , or robotic control ( Murphy et al. , 2001 ; Mandel et al. , 2014 ; Gu et al. , 2017a ; Kalashnikov et al. , 2018 ; Nachum et al. , 2019 ; Jaques et al. , 2019 ) . While there are abundant works on safety for RL ( Chow et al. , 2015 ; Eysenbach et al. , 2018 ; Chow et al. , 2018 ; Ray et al. , 2019 ; Chow et al. , 2019 ) , they often do not provide guarantees in practice when combined with neural networks and stochastic optimization . It is therefore necessary to verify each policy before deployment ( e.g . measuring the variance of rewards or checking out-of-bounds actions ) . Due to such costs associated with each deployment , it is desirable to minimize the number of distinct deployments needed during the learning process . Even ignoring safety considerations , frequent updates to a deployed policy can exacerbate communication bottlenecks in large-scale distributed RL systems , which are becoming more prevalent ( Nair et al. , 2015 ; Espeholt et al. , 2018 ; 2019 ) . We additionally discuss on the importance of the deployment efficiency in real-world applications . See Appendix C. In order to focus research on these practical bottlenecks , we propose a novel measure of RL algorithms , namely , deployment efficiency , which counts how many times the data-collection policy has been changed during improvement from random policy to solve the task . For example , if an RL algorithm operates by using its learned policy to collect transitions from the environment I times , each time collecting a batch of B new transitions , then the number of deployments is I , while the total number of samples collected is I × B . The lower I is , the more deployment-efficient the algorithm is ; in contrast , sample efficiency looks at I × B. Online RL algorithms , whether they are on-policy or off-policy , typically update the policy and acquire new transitions by deploying the newly updated policy at every iteration . This corresponds to performing hundreds to millions of deployments during learning on standard benchmarks ( Haarnoja et al. , 2018 ) , which is severely deployment inefficient . On the other hand , offline RL literature only studies the case of 1 deployment . A deployment-efficient algorithm would stand in the middle of these two extremes and ideally learn a successful policy from scratch while deploying only a few distinct policies , as illustrated in Figure 1 . Recent deep RL literature seldom emphasizes deployment efficiency , with few exceptions in specific applications ( Kalashnikov et al. , 2018 ) where such a learning procedure is necessary . Deploymentinefficient algorithms will fail in scenarios where the deployment of each new policy is exorbitantly expensive , such as safety-critical robotics or user-facing products . Although current state-of-the-art algorithms on continuous control have substantially improved sample or data efficiency , they have not optimized for deployment efficiency . For example , SAC ( Haarnoja et al. , 2018 ) , an efficient model-free off-policy algorithm , performs half a million to one million policy deployments during learning on MuJoCo ( Todorov et al. , 2012 ) benchmarks . ME-TRPO ( Kurutach et al. , 2018 ) , a model-based algorithm , performs a much lower 100-300 policy deployments , although this is still relatively high for practical settings.2 In our work , we demonstrate successful learning on standard benchmark environments with only 5-10 deployments .
This paper proposes a new approach to learning control policies with improved data efficiency and fewer number of data collection sessions (with each session using a different policy). Further, the authors proposed a new concept of “deployment efficiency”, with a new “deployment” referring to using a new policy to interact with the real environment, for example, for data collection. The new approach belongs to the family of model-based online reinforcement learning algorithms and seems to primarily augment a prior approach, called ME-TRPO, by using a helper policy trained by behavior cloning data collected after the most recent deployment of learner policy. The experiment results validate that the proposed approach achieves better data efficiency and deployment efficiency compared to prior approaches.
SP:bfe85369cfa71f6b26477f26d133751ac05b0536
Representation Learning for Sequence Data with Deep Autoencoding Predictive Components
1 INTRODUCTION . Self-supervised representation learning methods aim at learning useful and general representations from large amounts of unlabeled data , which can reduce sample complexity for downstream supervised learning . These methods have been widely applied to various domains such as computer vision ( Oord et al. , 2018 ; Hjelm et al. , 2018 ; Chen et al. , 2020 ; Grill et al. , 2020 ) , natural language processing ( Peters et al. , 2018 ; Devlin et al. , 2019 ; Brown et al. , 2020 ) , and speech processing ( Schneider et al. , 2019 ; Pascual et al. , 2019b ; Chung & Glass , 2020 ; Wang et al. , 2020 ; Baevski et al. , 2020 ) . In the case of sequence data , representation learning may force the model to recover the underlying dynamics from the raw data , so that the learnt representations remove irrelevant variability in the inputs , embed rich context information and become predictive of future states . The effectiveness of the representations depends on the self-supervised task which injects inductive bias into learning . The design of self-supervision has become an active research area . One notable approach for self-supervised learning is based on maximizing mutual information between the learnt representations and inputs . The most commonly used estimate of mutual information is based on contrastive learning . A prominant example of this approach is CPC ( Oord et al. , 2018 ) , where the representation of each time step is trained to distinguish between positive samples which are inputs from the near future , and negative samples which are inputs from distant future or other sequences . The performance of contrastive learning heavily relies on the nontrivial selection ∗Work done during an internship at Salesforce Research . †Work done while Weiran Wang was with Salesforce Research . 1Code is available at https : //github.com/JunwenBai/DAPC . of positive and negative samples , which lacks a universal principle across different scenarios ( He et al. , 2020 ; Chen et al. , 2020 ; Misra & Maaten , 2020 ) . Recent works suspected that the mutual information lower bound estimate used by contrastive learning might be loose and may not be the sole reason for its success ( Ozair et al. , 2019 ; Tschannen et al. , 2019 ) . In this paper , we leverage an estimate of information specific to sequence data , known as predictive information ( PI , Bialek et al. , 2001 ) , which measures the mutual information between the past and future windows in the latent space . The estimate is exact if the past and future windows have a joint Gaussian distribution , and is shown by prior work to be a good proxy for the true predictive information in practice ( Clark et al. , 2019 ) . We can thus compute the estimate with sample windows of the latent sequence ( without sampling negative examples ) , and obtain a well-defined objective for learning the encoder for latent representations . However , simply using the mutual information as the learning objective may lead to degenerate representations , as PI emphasizes simple structures in the latent space and a powerful encoder could achieve this at the cost of ignoring information between latent representations and input features . To this end , we adopt a masked reconstruction task to enforce the latent representations to be informative of the observations as well . Similar to Wang et al . ( 2020 ) , we mask input dimensions as well as time segments of the inputs , and use a decoder to reconstruct the masked portion from the learnt representations ; we also propose variants of this approach to achieve superior performance . Our method , Deep Autoencoding Predictive Components ( DAPC ) , is designed to capture the above intuitions . From a variational inference perspective , DAPC also has a natural probabilistic interpretation . We demonstrate DAPC on both synthetic and real datasets of different sizes from various domains . Experimental results show that DAPC can recover meaningful low dimensional dynamics from high dimensional noisy and nonlinear systems , extract predictive features for forecasting tasks , and obtain state-of-the-art accuracies for Automatic Speech Recognition ( ASR ) with a much lower cost , by pretraining encoders that are later finetuned with a limited amount of labeled data . 2 METHOD The main intuition behind Deep Autoencoding Predictive Components is to maximize the predictive information of latent representation sequence . To ensure the learning process is tractable and non-degenerate , we make a Gaussian assumption and regularize the learning with masked reconstruction . In the following subsections , we elaborate on how we estimate the predictive information and how we design the masked reconstruction task . A probabilistic interpretation of DAPC is also provided to show the connection to deep generative models . 2.1 PREDICTIVE INFORMATION . Given a sequence of observations X = { x1 , x2 , ... } where xi ∈ Rn , we extract the corresponding latent sequence Z = { z1 , z2 , ... } where zi ∈ Rd with an encoder function e ( X ) , e.g. , recurrent neural nets or transformers ( Vaswani et al. , 2017 ) .2 Let T > 0 be a fixed window size , and denote Zpastt = { zt−T+1 , ... , zt } , Z future t = { zt+1 , ... , zt+T } for any time step t. The predictive information ( PI ) is defined as the mutual information ( MI ) between Zpastt and Z future t : MI ( Zpastt , Z future t ) = H ( Z past t ) +H ( Z future t ) −H ( Z past t , Z future t ) ( 1 ) 2In this work , the latent sequence has the same length as the input sequence , but this is not an restriction ; one can have a different time resolution for the latent sequence , using sub-sampling strategies such as that of Chan et al . ( 2016 ) . where H is the entropy function . Intuitively , PI measures how much knowing Zpastt reduces the uncertainty about Zfuturet ( and vice versa ) . PI reaches its minimum value 0 if Z past t and Z future t are independent , and it is maximized if Zfuturet is a deterministic function of Z past t . Different from the MI estimate used by contrastive learning , which measures the MI between representation at each single time step and its future inputs , predictive information measures the MI between two windows of T time steps collectively . The window size T used in PI estimation reflects the time resolution for which the time series is more or less stationary . PI was designed as a general measure of the complexity of underlying dynamics which persists for a relatively long period of time ( Li & Vitányi , 2008 ) . Furthermore , PI is aware of temporal structures : different dynamics could lead PI to converge or diverge even if they look similar . These virtues of PI contribute to the versatility of this measure . The use of PI beyond a static complexity measure ( and as a learning objective ) is done only recently in machine learning by Clark et al . ( 2019 ) , which proposes to learn a linear dimensionality reduction method named Dynamical Component Analysis ( DCA ) to maximize the PI of the projected latent sequence . One approach for estimating PI is through estimating the joint density P ( Zpastt , Z future t ) , which can be done by density estimation methods such as k-NN and binning ( Dayan & Abbott , 2001 ; Kraskov et al. , 2004 ) . However , such estimates heavily rely on hyperparameters , and it is more challenging to come up with differentiable objectives based on them that are compatible with deep learning frameworks . Our approach for estimating PI is the same as that of DCA . Assume that every 2T consecutive time steps { zt−T+1 , ... , zt , ... , zt+T } in the latent space form a stationary , multivariate Gaussian distribution . Σ2T ( Z ) is used to denote the covariance of the distribution , and similarly ΣT ( Z ) the covariance of T consecutive latent steps . Under the stationarity assumption , H ( Z past t ) remains the same for any t so we can omit the subscript t , and H ( Zpast ) is equal to H ( Zfuture ) as well . Using the fact that H ( Zpast ) = 12 ln ( 2πe ) dT |ΣT ( Z ) | , PI for the time series z reduces to IT = MI ( Z past , Zfuture ) = ln |ΣT ( Z ) | − 1 2 ln |Σ2T ( Z ) | . ( 2 ) Detailed derivations can be found in Appendix A . It is then straightforward to collect samples of the consecutive 2T -length windows and compute the sample covariance matrix for estimating Σ2T ( Z ) . An empirical estimate of ΣT ( Z ) corresponds to the upper left sub-matrix of Σ2T ( Z ) . Recall that , under the Gaussian assumption , the conditional distribution P ( Zfuture|Zpast ) is again Gaussian , whose mean is a linear transformation of Zpast . Maximizing IT has the effect of minimizing the entropy of this conditional Gaussian , and thus reducing the uncertainty of future given past . Though our estimation formula for PI is exact only under the Gaussian assumption , it was observed by Clark et al . ( 2019 ) that the Gaussian-based estimate is positively correlated with a computationally intensive estimate based on non-parametric density estimate , and thus a good proxy for the full estimate . We make the same weak assumption , so that optimizing the Gaussian-based estimate improves the true PI . Our empirical results show that representations learnt with the Gaussian PI have strong predictive power of future ( see Sec 4.2 ) . Furthermore , we find that a probabilistic version of DAPC ( described in Sec 2.3 ) which models ( Zpast , Zfuture ) with a Gaussian distribution achieves similar performance as this deterministic version ( with the Gaussian assumption ) . We now describe two additional useful techniques that we develop for PI-based learning . Multi-scale PI One convenient byproduct of this formulation and estimation for IT is to reuse Σ2T ( Z ) for estimating IT/2 , IT/4 and so on , as long as the window size is greater than 1 . Since the upper left sub-matrix of Σ2T ( Z ) approximates ΣT ( Z ) , we can extract ΣT ( Z ) from Σ2T ( Z ) without any extra computation , and similarly for ΣT/2 ( Z ) . We will show that multi-scale PI , which linearly combines PI at different time scales , boosts the representation quality in ASR pretraining . Orthogonality penalty Observe that the PI estimate in ( 2 ) is invariant to invertible linear transformations in the latent space . To remove this degree of freedom , we add the penalty to encourage latent representations to have identity covariance , so that each of the d latent dimensions will have unit scale and different dimensions are linearly independent and thus individually useful . This penalty is similar to the constraint enforced by deep canonical correlation analysis ( Andrew et al. , 2013 ) , which was found to be useful in representation learning ( Wang et al. , 2015 ) . 2.2 MASKED RECONSTRUCTION AND ITS SHIFTED VARIATION . The PI objective alone can potentially lead to a degenerate latent space , when the mapping from input sequence to latent sequence is very powerful , as the latent representations can be organized in a way that increases our PI estimate at the cost of losing useful structure from the input . This is also observed empirically in our experiments ( see Sec 4.1 ) . To regularize PI-based learning , one simple idea is to force the learnt latent representations to be informative of the corresponding input observations . For this purpose , we augment PI-based learning with a masked reconstruction task . Masked reconstruction was first proposed in BERT ( Devlin et al. , 2019 ) , where the input text is fed to a model with a portion of tokens masked , and the task is to reconstruct the masked portion . Wang et al . ( 2020 ) extended the idea to continuous vector sequence data ( spectrograms ) . The authors found that randomly masking input dimensions throughout the sequence yields further performance gain , compared to masking only consecutive time steps . We adopt their formulation in DAPC to handle continuous time series data . Given an input sequence X of length L and dimensionality n , we randomly generate a binary mask M ∈ Rn×L , where Mi , j = 0 indicates Xi , j is masked with value 0 and Mi , j = 1 indicates Xi , j is kept the same . We feed the masked inputs to the encoder e ( · ) to extract representations ( in Rd ) for each time step , and use a feed-forward network g ( · ) to reconstruct the masked input observations . e ( · ) and g ( · ) are trained jointly . The masked reconstruction objective can be defined as R = || ( 1−M ) ( X − g ( e ( X M ) ) ) ||2fro . ( 3 ) Figure 1 gives an illustration for the masked spectrogram data . We randomly generate nT time masks each with width up to wT , and similarly nF frequency masks each with width up to wF . In our experiments , we observe that input dimension masking makes the reconstruction task more challenging and yields higher representation quality . Therefore , this strategy is useful for general time series data beyond audio . We introduce one more improvement to masked reconstruction . Standard masked reconstruction recovers the masked inputs for the same time step . Inspired by the success of Autoregressive Predictive Coding ( Chung & Glass , 2020 ) , we propose a shifted variation of masked reconstruction , in which the latent state zi is decoded to reconstruct a future frame xi+s ( than xi ) . Formally , the shifted masked reconstruction loss Rs is defined as Rs = || ( 1−M→s ) ( X→s − g ( e ( X M ) ) ) ||2fro ( 4 ) where → s indicates right-shifting s time frames while the input dimensions remain unchanged . When s = 0 , Rs reduces to the standard masked reconstruction objective , and in the ASR experiments we find that a nonzero s value helps . We ensure no information leakage by enforcing that the portion to be reconstructed is never presented in the inputs . As indicated by Chung et al . ( 2019b ) , predicting a future frame encourages more global structure and avoids the simple inference from local smoothness in domains like speech , and therefore helps the representation learning . To sum up , our overall loss function is defined as the combination of the losses described above : min e , g Ls , T ( X ) =− ( IT + αIT/2 ) + βRs + γRortho ( 5 ) where α , β , γ are tradeoff weights and Rortho = ||Σ1 − Id||2fro is the orthonormality penalty discussed in Sec . 2.1 , with Σ1 ∈ Rd×d corresponding to the top left sub-matrix of Σ2T estimated from the latent sequence Z = e ( X M ) . The whole framework of DAPC is illustrated in Figure 1 .
This paper proposes Deep Autoencoding Predictive Components (DAPC), a self-supervised representation learning approach for sequential data. In this approach, the model learns to maximize the predictive information, which is the mutual information between past and future time windows. In order to avoid degenerate solutions, the proposed approach relies on a second loss that optimizes masked reconstructions.
SP:1d642e5532adea5cd782f529fed197448e60c458
A Hypergradient Approach to Robust Regression without Correspondence
1 INTRODUCTION . Regression analysis has been widely used in various machine learning applications to infer the the relationship between an explanatory random variable ( i.e. , the input ) X ∈ Rd and a response random variable ( i.e. , the output ) Y ∈ Ro ( Stanton , 2001 ) . In the classical setting , regression is used on labeled datasets that contain paired samples { xi , yi } ni=1 , where xi , yi are realizations of X , Y , respectively . Unfortunately , such an input-output correspondence is not always available in some applications . One example is flow cytometry , which is a physical experiment for measuring properties of cells , e.g. , affinity to a particular target ( Abid & Zou , 2018 ) . Through this process , cells are suspended in a fluid and injected into the flow cytometer , where measurements are taken using the scattering of a laser . However , the instruments are unable to differentiate the cells passing through the laser , such that the correspondence between the cell proprieties ( i.e. , the measurements ) and the cells is unknown . This prevents us from analyzing the relationship between the instruments and the measurements using classical regression analysis , due to the missing correspondence . Another example is multi-object tracking , where we need to infer the motion of objects given consecutive frames in ∗Equal Contributions . †Yujia Xie , Simiao Zuo , Tuo Zhao are affiliated with Georgia Institute of Technology . Emails : { xieyujia , simiaozuo , tourzhao } @ gatech.edu . Yixiu Mao is affiliated with Shanghai Jiao Tong University . Email : 956986044myx @ gmail.com . Hongteng Xu is affiliated with Gaoling School of Artificial Intelligence , Renmin University of China , and Beijing Key Laboratory of of Big Data Management and Analysis Methods . Email : hongtengxu @ ruc.edu.cn . Xiaojing Ye is affiliated with Georgia State University . Email : xye @ gsu.edu . Hongyuan Zha is affiliated with School of Data Science , Shenzhen Institute of Artificial Intelligence and Robotics for Society , the Chinese University of Hong Kong , Shenzhen . Email : zhahy @ cuhk.edu.cn . a video . This requires us to find the correspondence between the objects in the current frame and those in the next frame . The two examples above can be formulated as a shuffled regression problem . Specifically , we consider a multivariate regression model Y = f ( X , Z ; w ) + ε , where X ∈ Rd , Z ∈ Re are two input vectors , Y ∈ Ro is an output vector , f : Rd+e → Ro is the unknown regression model with parameters w and ε is the random noise independent on X and Z . When we sample realizations from such a regression model , the correspondence between ( X , Y ) and Z is not available . Accordingly , we collect two datasets D1 = { xi , yi } ni=1 and D2 = { zj } nj=1 , and there exists a permutation π∗ such that ( xi , zπ ( i ) ) corresponds to yi in the regression model . Our goal is to recover the unknown model parameterw . Existing literature also refer to the shuffled regression problem as unlabeled sensing , homomorphic sensing , and regression with an unknown permutation ( Unnikrishnan et al. , 2018 ) . Throughout the rest of the paper , we refer to it as Regression WithOut Correspondence ( RWOC ) . A natural choice of the objective for RWOC is to minimize the sum of squared residuals with respect to the regression model parameter w up to the permutation π ( · ) over the training data , i.e. , minw , π L ( w , π ) = ∑n i=1 ‖yi − f ( xi , zπ ( i ) ; w ) ‖22 . ( 1 ) Existing works on RWOC mostly focus on theoretical properties of the global optima to equation 1 for estimating w and π ( Pananjady et al. , 2016 ; 2017b ; Abid et al. , 2017 ; Elhami et al. , 2017 ; Hsu et al. , 2017 ; Unnikrishnan et al. , 2018 ; Tsakiris & Peng , 2019 ) . The development of practical algorithms , however , falls far behind from the following three aspects : •Most of the works are only applicable to linear regression models . • Some of the existing algorithms are of very high computational complexity , and can only handle small number of data points in low dimensions ( Elhami et al. , 2017 ; Pananjady et al. , 2017a ; Tsakiris et al. , 2018 ; Peng & Tsakiris , 2020 ) . For example , Abid & Zou ( 2018 ) adopt an Expectation Maximization ( EM ) method where Metropolis-Hastings sampling is needed , which is not scalable . Other algorithms choose to optimize with respect to w and π in an alternating manner , e.g. , alternating minimization in Abid et al . ( 2017 ) . However , as there exists a strong interaction between w and π , the optimization landscape of equation 1 is ill-conditioned . Therefore , these algorithms are not effective and often get stuck in local optima . • Most of the works only consider the case where there exists an exact one-to-one correspondence between D1 and D2 . For many more scenarios , however , these two datasets are not necessarily well aligned . For example , consider D1 and D2 collected from two separate databases , where the users overlap , but are not identical . As a result , there exists only partial one-to-one correspondence . A similar situation also happens to multiple-object tracking : Some objects may leave the scene in one frame , and new objects may enter the scene in subsequent frames . Therefore , not all objects in different frames can be perfectly matched . The RWOC problem with partial correspondence is known as robust-RWOC , or rRWOC ( Varol & Nejatbakhsh , 2019 ) , and is much less studied in existing literature . To address these concerns , we propose a new computational framework – ROBOT ( Regression withOut correspondence using Bilevel OptimizaTion ) . Specifically , we propose to formulate the regression without correspondence as a continuous optimization problem . Then by exploiting the interaction between the regression model and the data correspondence , we propose to develop a hypergradient approach based on differentiable programming techniques ( Duchi et al. , 2008 ; Luise et al. , 2018 ) . Our hypergradient approach views the data correspondence as an operator of the regression , i.e. , for a given w , the optimal correspondence is π̂ ( w ) = arg minπ L ( w , π ) . ( 2 ) Accordingly , when applying gradient descent to ( 1 ) , we need to find the gradient with respect to w by differentiating through both the objective function L and the data correspondence π̂ ( w ) . For simplicity , we refer as such a gradient to “ hypergradient ” . Note that due to its discrete nature , π̂ ( w ) is actually not continuous inw . Therefore , such a hypergradient does not exist . To address this issue , we further propose to construct a smooth approximation of π̂ ( w ) by adding an additional regularizer to equation 2 , and then we replace π̂ ( w ) with our proposed smooth replacement when computing the hyper gradient of w. Moreover , we also propose an efficient and scalable implementation of hypergradient computation based on simple first order algorithms and implicit differentiation , which outperforms conventional automatic differentiation in terms of time and memory cost . ROBOT can also be extended to the robust RWOC problem , where D1 and D2 are not necessarily exactly aligned , i.e. , some data points inD1 may not correspond to any data point inD2 . Specifically , we relax the constraints on the permutation π ( · ) ( Liero et al. , 2018 ) to automatically match related data points and ignore the unrelated ones . At last , we conduct thorough numerical experiments to demonstrate the effectiveness of ROBOT . For RWOC ( i.e. , exact correspondence ) , we use several synthetic regression datasets and a real gated flow cytometry dataset , and we show that ROBOT outperforms baseline methods by significant margins . For robust RWOC ( i.e. , inexact correspondence ) , in addition to synthetic datasets , we consider a vision-based multiple-object tracking task , and then we show that ROBOT also achieves significant improvement over baseline methods . Notations . Let ‖·‖2 denote the ` 2 norm of vectors , 〈· , ·〉 the inner product of matrices , i.e. , 〈A , B〉 =∑ i , j AijBij for matrices A and B. ai : j are the entries from index i to index j of vector a . Let 1n denote an n-dimensional vector of all ones . Denote d ( · ) d ( · ) the gradient of scalars , and ∇ ( · ) ( · ) the Jacobian of tensors . We denote [ v1 , v2 ] the concatenation of two vectors v1 and v2 . N ( µ , σ2 ) is the Gaussian distribution with mean µ and variance σ2 . 2 ROBOT : A HYPERGRADIENT APPROACH FOR RWOC . We develop our hypergradient approach for RWOC . Specifically , we first introduce a continuous formulation equivalent to ( 1 ) , and then propose a smooth bi-level relaxation with an efficient hypergradient descent algorithm . 2.1 EQUIVALENT CONTINUOUS FORMULATION . We propose a continuous optimization problem equivalent to ( 1 ) . Specifically , we rewrite an equivalent form of ( 1 ) as follows , minw minS∈Rn×n L ( w , S ) = 〈C ( w ) , S〉 subject to S ∈ P , ( 3 ) where P denotes the set of all n× n permutation matrices , C ( w ) ∈ Rn×n is the loss matrix with Cij ( w ) = ‖yi − f ( xi , zj ; w ) ‖22 . Note that we can relax S ∈ P , which is the discrete feasible set of the inner minimization problem of ( 3 ) , to a convex set , without affecting the optimality , as suggested by the next theorem . Proposition 1 . Given any a ∈ Rn and b ∈ Rm , we define Π ( a , b ) = { A ∈ Rn×m : A1m = a , A > 1n = b , Aij ≥ 0 } . The optimal solution to the inner discrete minimization problem of ( 3 ) is also the optimal solution to the following continuous optimization problem , minS∈Rn×n〈C ( w ) , S〉 , s.t . S ∈ Π ( 1n,1n ) . ( 4 ) This is a direct corollary of the Birkhoff-von Neumann theorem ( Birkhoff , 1946 ; Von Neumann , 1953 ) , and please refer to Appendix A for more details . Theorem 1 allows us to replace P in ( 3 ) with Π ( 1n,1n ) , which is also known as the Birkhoff polytope1 ( Ziegler , 2012 ) . Accordingly , we obtain the following continuous formulation , minw minS∈Rn×n〈C ( w ) , S〉 subject to S ∈ Π ( 1n,1n ) . ( 5 ) Remark 1 . In general , equation 3 can be solved by linear programming algorithms ( Dantzig , 1998 ) . 2.2 CONVENTIONAL WISDOM : ALTERNATING MINIMIZATION . Conventional wisdom for solving ( 5 ) suggests to use alternating minimization ( AM , Abid et al . ( 2017 ) ) . Specifically , at the k-th iteration , we first update S by solving S ( k ) = arg minS∈Π ( 1n,1n ) L ( w ( k−1 ) , S ) , and then given S ( k ) , we update w using gradient descent or exact minimization , i.e. , w ( k ) = w ( k−1 ) − η∇wL ( w ( k−1 ) , S ( k ) ) . However , AM works poorly for solving ( 5 ) in practice . This is because w and S have a strong interaction throughout the iterations : A slight change to w may lead to significant change to S. Therefore , the optimization landscape is ill-conditioned , and AM can easily get stuck at local optima . 1This is a common practice in integer programming ( Marcus & Ree , 1959 ) .
The authors proposed a novel method for regression problems with outliers. The main idea is to first propose a mixed-integer optimization problem for the regression problem and then and the optimization procedure of finding the solutiuon of the problem differentiable, and the objective function of the problem are also be rephrased as a differentiable function. Based on this, an end-to-end learning approach can be established.
SP:d29300f18c72041296b43246711ffdfa1dc6681d
SoGCN: Second-Order Graph Convolutional Networks
1 INTRODUCTION . Deep localized convolutional filters have achieved great success in the field of deep learning . In image recognition , the effectiveness of 3 × 3 kernels as the basic building block in Convolutional Neural Networks ( CNNs ) is shown both experimentally and theoretically ( Zhou , 2020 ) . We are inspired to search for the maximally localized Graph Convolution ( GC ) kernel with full expressiveness power for Graph Convolutional Networks ( GCNs ) . Most existing GCN methods utilize localized GCs based on one-hop aggregation scheme as the basic building block . Extensive works have shown performance limitations of such design due to over-smoothing ( Li et al. , 2018 ; Oono & Suzuki , 2019 ; Cai & Wang , 2020 ) . In vanilla GCNs ( Kipf & Welling , 2017 ) the root cause of its deficiency is the lumping of the graph node self-connection with pairwise neighboring connections . Recent works of Xu et al . ( 2019 ) ; Dehmamy et al . ( 2019 ) ; Ming Chen et al . ( 2020 ) disentangle the effect of self-connection by adding an identity mapping ( so-called first-order GC ) . However , its lack of expressive power in filter representation remains ( Abu-El-Haija et al. , 2019 ) . The work of ( Ming Chen et al. , 2020 ) conjectured that the ability to express a polynomial filter with arbitrary coefficients is essential for preventing over-smoothing . A longer propagation distance in the graph facilitates GCNs to retain its expressive power , as pointed out by ( Liao et al. , 2019 ; Luan et al. , 2019 ; Abu-El-Haija et al. , 2019 ) . The minimum propagation distance needed to construct our building block of GCN remains the open question . We show that the minimum propagation distance is two : a two-hop graph kernel with the second-order polynomials in adjacency matrices is sufficient . We call our graph kernel Second-Order GC ( SoGC ) . We introduce a Layer Spanning Space ( LSS ) framework to quantify the expressive power of multilayer GCs for modeling a polynomial filter with arbitrary coefficients . By relating low-pass filtering on the graph spectrum ( Hoang & Maehara , 2019 ) with over-smoothing , one can see the lack of filter representation power ( Ming Chen et al. , 2020 ) can lead to the performance limitation of GCN . Using the LSS framework , we show that SoGCs can approximate any linear GCNs in channel-wise filtering . Furthermore , higher-order GCs do not contribute more expressiveness , and vanilla GCN or first-order GCs can not represent all polynomial filters in general . In this sense , SoGC is the maximally localized graph kernel with the full representation power . To validate our theory , we build Second-Order Graph Convolutional Networks ( SoGCN ) using SoGC kernels . Our SoGCN using simple graph topological features consistently achieves state- of-the-art performance on the GNN benchmark datasets ( Dwivedi et al. , 2020 ) , including citation networks , super-pixel classification , and molecule regression . To our best knowledge , this work is the first study that identifies the importance of the two-hop neighborhood in the context of GCNs ’ ability to express a polynomial filter with arbitrary coefficients . Our model is a special but non-trivial case of Defferrard et al . ( 2016 ) . Kipf & Welling ( 2017 ) conducted an ablation study with GC kernels of different orders but missed the effectiveness of the second-order relationships . The work of Abu-El-Haija et al . ( 2019 ) talked about muti-hop graph kernels ; however , they did not identify the critical importance of the second-order form . In contrast , we clarify the prominence of SoGCs in theories and experiments . Our research on graph convolution using pure topologically relationship is orthogonal to those uses geometric relations ( Monti et al. , 2017 ; Fey et al. , 2018 ; Pei et al. , 2020 ) , or those with expressive edge features ( Li et al. , 2016 ; Gilmer et al. , 2017 ; Corso et al. , 2020 ) , and hyper-edges ( Morris et al. , 2019 ; Maron et al. , 2018 ; 2019 ) . It is also independent with graph sampling procedures ( Rong et al. , 2019 ; Hamilton et al. , 2017 ; Li et al. , 2019 ) . 2 PRELIMINARIES . We begin by reformulating spectral GCNs and introducing our notation . We are interested in a finite graph set G = { G1 , · · · , G|G| } . Assume each graph G ∈ G is simple and undirected , associated with a finite vertex set V ( G ) , an edge set E ( G ) = { ( u , v ) : ∀u ↔ v } , and a symmetric normalized adjacency matrix A ( G ) ( Chung & Graham , 1997 ; Shi & Malik , 2000 ) . Without loss of generality and for simplicity , |V ( G ) | = N for every G ∈ G. Single-channel features x ∈ RN supported in graph G ∈ G is a vectorization of function V ( G ) → R. Graph Convolutions ( GCs ) is known as Linear Shift-Invariant ( LSI ) operators to adjacency matrices ( Sandryhaila & Moura , 2013 ) . By this definition , GCs can extract features regardless of where local structures fall . Given parameter space Ω ⊆ R , we write a single-channel GC ( Sandryhaila & Moura , 2013 ; Defferrard et al. , 2016 ) as a mapping fθ : G × RN → RN such that 1 : fθ ( G , x ) = K∑ k=0 θkA ( G ) kx , ( 1 ) where θ = [ θ0 · · · θK ] T ∈ ΩK+1 parameterizes the GC . K reflects the localization of fθ : a linear combination of features aggregated by A ( G ) k. Moreover , we reformulate two popular models , vanilla GC ( Figure 1a ) and first-order GC ( Figure 1b ) , as below : f0 ( G , x ) = θ ( A ( G ) + I ) x , f1 ( G , x ) = ( θ1A ( G ) + θ0I ) x . ( 2 ) The general spectral GCNs stack L layers of GCs ( Equation 1 ) with nonlinear activations . Let f ( l ) be GC layers with parameters θ ( l ) ∈ ΩK+1 , l ∈ [ L ] , the single-channel GCNs can be written as : F ( G , x ) = g ◦ f ( L ) ◦ σ ◦ f ( L−1 ) ◦ · · · ◦ σ ◦ f ( 1 ) ( G , x ) , ( 3 ) 1We can replace the Laplacian matrix L in Defferrard et al . ( 2016 ) with the normalized adjacency matrix A since L = I −A . where σ is an element-wise activation function , the superscripts denote the corresponding layer number , g is a task-specified readout function ( e.g. , softmax ) , the inputs are graph G ∈ G and signals x ∈ RN . The compositionality principle of deep learning suggests L being large , while K being small and localized ( LeCun et al. , 2015 ) . 3 OVERVIEW : SECOND-ORDER GRAPH CONVOLUTION . We are interested in the overall graph convolution network ’ s representation power of expressing a polynomial filter ( Equation 1 ) with arbitrary coefficients . A multi-layer GCN approximate a Korder polynomial filter ∑K k=0 θkA ( G ) k , θk ∈ Ω , k = 0 , · · ·K , by stacking basic building blocks of graph convolution ( GC ) layers ( Wu et al. , 2019 ; Ming Chen et al. , 2020 ) . We formally define the second-order GC ( SoGC ) using the second-order polynomials of adjacency matrices : f2 ( G , x ) = ( θ2A ( G ) 2 + θ1A ( G ) + θ0I ) x , ( 4 ) where θi ∈ R , i = 0 , 1 , 2 are trainable paremeters in the context of machine learning . Its vertexdomain interpretation is illustrated in Figure 1c . At first glance , it seems that we could stack two one-hop graph convolution ( GC ) kernels to approximate a SoGC . However , as shown in Section 4.3 , that is not the case . The critical insight is that graph filter approximation can be viewed as a polynomial factorization problem . It is known that any univariate polynomial can be factorized into sub-polynomials of degree two . Based on this fact , we show by stacking enough SoGCs ( and varying their parameters ) can achieve decomposition of any polynomial filters . In contrast , first-order GCs are not universal approximators ; two stacked one-hop GCs can not model every two-hop GC . Polynomial filter completeness of SoGC leads to better performance of GCNs . As shown in Figure 2 , networks built with SoGC can overcome over-smoothing and extract features on high-frequency bands . In the next section , we demonstrate our formal arguments on polynomial approximation . 4 REPRESENTATION POWER ANALYSIS . 4.1 LAYER SPANNING SPACE FRAMEWORK . To illustrate the representation power of GC layers , we establish a Layer Spanning Space ( LSS ) framework to study the graph filter space spanned by stacking multiple graph kernels . First , we present our mathematical devices in Definition 1 , 2 with Lemma 1 as below . Definition 1 . Suppose the parameter space Ω = R. The Linear Shift-Invariant ( LSI ) graph filter space of degree K > 0 with respect to a finite graph set G is defined as A = { fθ : G × RN → RN , ∀θ ∈ RK+1 } , where fθ follows the definition in Equation 1 . Definition 2 . Let spectrum set S ( G ) = { λ : λ ∈ S ( A ( G ) ) , ∀G ∈ G } , where S ( A ) denotes the eigenvalues of A . Define spectrum capacity Γ = |S ( G ) | . In particular , Γ = ( N − 1 ) |G| if every graph adjacency matrix has no common eigenvalues other than 1 . Lemma 1 . A of degree K > 0 has dimension min { K + 1 , Γ } as a vector space . Proof of Lemma 1 follows from Theorem 3 of Sandryhaila & Moura ( 2013 ) . The complete version can be found in Appendix C. Here , we induce a finite-dimension filter space by Lemma 1 . For simplicity , we will model the linear composition of filters to analyze its representation power . The nonlinear activation effects are beyond the scope of this work . Following Definition 1 , let A be the full filter space of degree Γ− 1 and B be the low-level filter space as a set of polynomials in adjacency matrices ( Equation 1 ) . Denote the GC at l-th layer by f ( l ) ∈ B , then we yield the LSS of stacking L layers as below : BL = { f : f ( G , x ) = f ( L ) ◦ · · · ◦ f ( 1 ) ( G , x ) = L∏ l=1 p ( l ) ( A ( G ) ) x } , ( 5 ) where p ( l ) ( x ) varies in a certain class of polynomials . We can assess the expressive capability of GC layers by comparing the LSS with A. Kernels in B have full representation power if A ⊆ BL . We are interested in BK , which denotes all localized filters of degree at most K. The LSS of BK is modeled as : BLK = { f : f ( G , x ) = L∏ l=1 K∑ k=0 θ ( l ) k A ( G ) kx , θ ( l ) k ∈ R } , ( 6 ) where the number of layers is bounded by L ≤ d ( Γ− 1 ) /Ke , according to Lemma 1 .
This is yet another paper on graph convolutional networks (GCNs). The investigated SoGCN is a second-order GCN, thus a special case of high-order GCNs (namely with multi-hop graph kernels), which have has been proposed earlier by many researchers, such as by Defferrard et al. (2016), by Kipf & Welling (2017) and by Abu-El-Haija et al. (2019).
SP:51c6ba2bd4d1dafe78e6da30e18577e16ba4fec9
Democratizing Evaluation of Deep Model Interpretability through Consensus
1 INTRODUCTION . Due to the over-parameterization nature ( Allen-Zhu et al. , 2019 ) , deep neural networks ( DNNs ) ( LeCun et al. , 2015 ) have been widely used to handle machine learning and artificial intelligence tasks , however it is often difficult to understand the prediction results of DNNs despite the very good performance . To interpret the DNN classifiers ’ behaviors , a number of interpretation tools ( Bau et al. , 2017 ; Ribeiro et al. , 2016 ; Smilkov et al. , 2017 ; Sundararajan et al. , 2017 ; Zhang et al. , 2019 ; Ahern et al. , 2019 ) have been proposed to recover or visualize the ways that DNNs make decisions . Preliminaries . For example , Network Dissection ( Bau et al. , 2017 ) uses a large computer vision dataset with a number of visual concepts identified/localized in every image . Given a convolutional neural network ( CNN ) model for interpretability evaluation , it recovers the visual features used by the model for the classification of every image via intermediate-layer feature maps , then matches the visual features with the labeled visual concepts to estimate the interpretability of the model as the intersection-over-union ( IoU ) between the activated feature maps and labeled locations of visual objects . Related tools that interpret CNNs through locating importation subregions of visual features in the feature maps have been proposed in ( Zhou et al. , 2016 ; Selvaraju et al. , 2020 ; Chattopadhay et al. , 2018 ; Wang et al. , 2020a ) . Apart from investigating the inside of complex deep networks , ( Ribeiro et al. , 2016 ; van der Linden et al. , 2019 ; Ahern et al. , 2019 ) proposed to use simple linear or tree-based models to surrogate the predictions made by the DNN model over the dataset through local or global approximations , so as to capture the variation of model outputs with the interpolation of inputs in feature spaces . Then , with the surrogate model , these methods interpret the DNN model as ways the model uses features for predictions , e.g. , ranking of feature importance , and compare the results with the ground truth labeled by human experts to evaluate interpretability . Besides the use of linear interpolation for surrogates , many algorithms , like SmoothGrad ( Smilkov et al. , 2017 ) , Integrated Gradients ( Sundararajan et al. , 2017 ) , DeepLIFT ( Shrikumar et al. , 2017 ) , and PatternNet ( Kindermans et al. , 2018 ) have been proposed to estimate the input feature importance as the way to interpret the models , so as to interpret the model predictions by highlighting the importation subregions in the input . In addition to the above methods , ( Zhang et al. , 2018a ; 2019 ) proposed to learn a graphical model to clarify the process of making decision at a semantic level . Note that obtaining the interpretation of a model is an algorithmic procedure to explain the model ( Samek et al. , 2017 ) . On the other hand , through the comparing the interpretation results with the human labeled ground truth , the interpretability evaluation aims at estimating the degree to which a human ( expert ) can consistently predict the model ’ s result ( Kim et al. , 2016 ; Doshi-Velez & Kim , 2017 ) . In summary , the ground truth of interpretation results ( usually labeled by human experts ) is indispensable to all above methods for interpretability evaluations and comparisons , no matter ways they interpret the models , e.g. , visual concepts detecting ( Bau et al. , 2017 ) , and feature importance ranking for either local ( Ribeiro et al. , 2016 ) or global ( Ahern et al. , 2019 ) interpretations . While the datasets with visual objects labeled/localized and/or the importance features ranked have offered in some specific areas , the unavailability of ground truths also limits the generalization of these methods to interpret brand new models on the new tasks/datasets ubiquitously . There is thus the need of a method being able to evaluate the interpretability of models on the datasets where the ground truth of interpretation results is not available . Our contributions . In this paper , we study the problem of evaluating the interpretability of DNN classifiers on the datasets without ground truth of interpretation results . The basic idea of Consensus is to leverage the interpretability of known models as reference to predict the interpretability of new models on new tasks/datasets . Especially , in terms of general purpose perception tasks , we have already obtained a number of reliable models with decent interpretability , such as ResNets , DenseNets and so on . With a new dataset , one could use interpretation tools ( Ribeiro et al. , 2016 ; Smilkov et al. , 2017 ) to obtain the interpretation results of these models , then aggregate interpretation results as the reference . Then for any model , one could evaluate interpretability of the model through comparing its interpretation results with the reference . Specifically , as illustrated in Figure 1 , we propose a novel framework named Consensus that uses a large number of known models as a committee for interpretability evaluation . Given any task/dataset , Consensus first obtains the interpretation results for every model in the committee using existing interpretation tools , e.g. , LIME ( Ribeiro et al. , 2016 ) , then aggregates the results from the entire committee and reaches the consensus of interpretations through voting . With the quasiground-truth , Consensus evaluates the interpretability of each model through matching its interpretation result and the approximated one , and ranks the matching scores of committee members , so as to pursue the absolute and relative interpretability evaluation results without the ground truth of interpretations labeled by human experts . More specifically , we make contributions as follows . • We study the problem of interpretability evaluation on the datasets without human labeled ground truth of interpretations . To the best of our knowledge , this work is the first to study the problem of evaluating the interpretability of DNNs while the ground truths of interpretation results are not available , by addressing the technical issues of voting and committees . • We design and implement Consensus , a novel interpretability evaluation framework that incorporates a wide range of alternating interpretation tools , such as LIME ( Ribeiro et al. , 2016 ) , SmoothGrad ( Smilkov et al. , 2017 ) , to interpret the model as the variation of outputs over the interpolations of inputs ( in feature spaces ) , from massive perspectives ( e.g. , local or global interpretation , tree-based or linear surrogate and so on ) , and carries out the interpretability evaluation through the voting based on interpretation results of models in the committee . • We carry out extensive experiments to validate Consensus on a wide range of models on new ubiquitous tasks/datasets that the ground truth is not available , and exploit the quantifiable metric of model interpretability to report the overall interpretability evaluation results ( Section 3 ) . Case studies ( Section 4 ) confirm the effectiveness of Consensus and show the closeness of Consensus based results to the ground truth of interpretations . Robustness analyses ( Section 5 ) further demonstrate the advantage of the committee that the factors including the use of basic interpretation algorithms , the types of networks in the committee , and the size of committee would have few affects on the Consensus based interpretability evaluation results . 2 CONSENSUS : A FRAMEWORK OF INTERPRETABILITY EVALUATION . In this section , we introduce our proposed framework , namely Consensus , which incorporates existing interpretations , such as LIME ( Ribeiro et al. , 2016 ) and SmoothGrad ( Smilkov et al. , 2017 ) , to enable DNN interpretability evaluation without the use of human labeled interpretation results as reference/ground truth . Specifically , Consensus generalizes a simple electoral system , and consists of three steps : ( 1 ) Committee Formation with Deep Models , ( 2 ) Committee Voting for Consensus Achievement1 , and ( 3 ) Consensus-based Interpretability Evaluation , as follow . Committee Formation with Deep Models . Given a number of deep neural networks ( which are well-known with decent performance on common perception tasks ) and a target task with a dataset ( potentially without ground truth of interpretation results ) , Consensus first trains the given neural networks ( from scratch or fine-tuned ) using the dataset . Then , Consensus forms the post-trained networks as a committee of models , noted as M , and considers the variety of interpretability of models in the committee that would establish the references for interpretability comparisons and evaluation . Note that while our research assumes the human labeled ground truth of interpretation results is not available in the given task/dataset for interpretability evaluation , the labels of samples are requested when handling classifications and regression tasks . Committee Voting for Consensus Achievement . With the committee of trained models and the target task/dataset for interpretation , Consensus first leverages an existing interpretation tool A , e.g. , A can be LIME ( Ribeiro et al. , 2016 ) or SmoothGrad ( Smilkov et al. , 2017 ) alternatively , to obtain the interpretation results of every model in the committee on every sample in the dataset . Given some sample di , we note the obtained interpretation results of all models as L. Then , Consensus proposes a voting procedure that aggregates L to achieve the consensus c as the quasiground-truth of the interpretation for the sample di . Specifically , ck = 1m ∑m i=1 L 2 ik ‖Li‖ for LIME and ck = 1 m ∑m i=1 Lik−min ( Li ) max ( Li ) −min ( Li ) for SmoothGrad . In summary , Consensus adopts a normalizationaveraging procedure to obtain the quasi-ground-truth of interpretations for the sample . To the end , the consensus has been achieved through obtaining the collections of quasi-ground-truth for every sample in the target dataset based on committee voting . Consensus-based Interpretability Evaluation . Given the quasi-ground-truths as the consensus of the whole committee , the proposed algorithm evaluates the interpretability of every model in the 1We are not intending to connect our work with the multi-agent research though we use the term “ consensus achievement ” . committee by considering the similarity between the interpretation result of each individual model and the consensus of the whole committee . Specifically , for the interpretations and consensus based on LIME , Consensus uses cosine similarity between the flattened vectors of interpretation of each model and the consensus . Then Consensus quantifies the interpretability of the model through the mean of similarity measures over all samples . For the results based on SmoothGrad ( visual feature importance in pixel levels ) , Consensus follows a similar procedure , where the proposed algorithm uses Radial Basis Function ( exp ( − 12 ( ||a− b||/σ ) 2 ) ) for the similarity measurement . We rank all models in the committee using their similarities to the consensus and consider the top/bottom models with good/bad interpretability in the committee . Algorithm 1 : Consensus Framework Pseudocode . The functions interpret ( ) , aggregate ( ) and sim ( ) are described in the main text and detained in Algorithm 2 in Appendix E. 1 function Consensus ( D , A ) Input : A dataset D containing n examples { di } i=1 , ··· , n and an interpretation algorithm A . Output : s ∈ Rm , where each element sj indicates the interpretability of each modelMj inM . / * Step 1 : Committee Formation with Deep Models M * / 2 PrepareM containing m models { Mj } j=1 , ··· , m , i.e. , the committee of deep models . 3 S = zeros ( n , m ) // Initialize an empty n×m matrix for storing the interpretability scores of m models on n data sample . 4 for i in 1 , · · · , n do 5 L = zeros ( m , pi ) 6 for j in 1 , · · · , m do 7 Lj = interpret ( A , Mj , di ) 8 end / * Step 2 : Committee Voting for Consensus Achievement at di * / 9 c = aggregate ( L ) // c ∈ Rpi , consensus as quasi-ground-truth / * Step 3 : Consensus-based Interpretability Evaluation at di * / 10 for j in 1 , · · · , m do 11 Sij = sim ( Lj , c ) // the score of Mj at di 12 end
The paper deals with explainable machine learning in the supervised setting and especially tackles the case where no ground truth data for evaluating the generate explanations, such as bounding boxes for objects, is available. The proposed "Concensus" approach retrains established architectures on the target dataset and averages their generated explanations from out-of-the-box explainers, such as LIME or SmoothGrad. The approach is evaluated for image classification on ImageNet and CUB-200-2011 by comparing the averaged explanations of the committee models when using LIME and SmoothGrad with the ground truth bounding box and segmentation, respectively. Minor evaluations are included for datasets Stanford Cars 196, Oxford Flowers 102 and Foods 101. The results show that the averaged explanations strongly correlate with the mean average precision with respect to the label distances.
SP:15122fcea632ba9f420bd8a538f708a7621c8323
Learning to Generate Noise for Multi-Attack Robustness
1 INTRODUCTION . Deep neural networks have demonstrated enormous success on multiple benchmark applications ( Amodei et al. , 2016 ; Devlin et al. , 2018 ) , by achieving super-human performance on certain tasks . However , to deploy them to safety-critical applications ( Shen et al. , 2017 ; Chen et al. , 2015 ; Mao et al. , 2019 ) , we need to ensure that the model is robust as well as accurate , since incorrect predictions may lead to severe consequences . Notably , it is well-known that the existing neural networks are highly susceptible to carefully crafted image perturbations which are imperceptible to humans but derail the predictions of these otherwise accurate networks . The emergence of adversarial examples has received significant attention in the research community , and several defense mechanisms have been proposed ( Madry et al. , 2017 ; Zhang et al. , 2019 ; Carmon et al. , 2019 ) . However , despite a large literature to improve upon the robustness of neural networks , most of the existing defenses leverage the knowledge of the adversaries and are based on the assumption of only a single type of perturbation . Consequently , many of the proposed defenses were circumvented by stronger attacks ( Athalye et al. , 2018 ; Uesato et al. , 2018 ; Tramer et al. , 2020 ) . Meanwhile , several recent works have ( Schott et al. , 2018 ; Tramèr & Boneh , 2019 ) demonstrated the vulnerability of existing defense methods against multiple perturbations . For the desired multi-attack robustness , Tramèr & Boneh ( 2019 ) ; Maini et al . ( 2020 ) proposed various strategies to aggregate multiple perturbations during training . However , training with multiple perturbations comes at an additional cost ; it increases the training cost by a factor of four over adversarial training , which is already an order of magnitude more costly than standard training . This slowdown factor hinders the research progress of robustness against multiple perturbations due to the large computation overhead incurred during training . Some recent works reduce this cost by reducing the complexity of generating adversarial examples ( Shafahi et al. , 2019 ; Wong et al. , 2020 ) , however , they are limited to ` ∞ adversarial training . To address the drawbacks of existing methods , we propose a novel training scheme , Meta Noise Generator with Adversarial Consistency ( MNG-AC ) , which learns instance-dependent noise to minimize the adversarial loss across multiple perturbations while enforcing label consistency between them , as illustrated in Figure 1 and explained in details below . First , we tackle the heavy computational overhead incurred by multi-perturbation training by proposing Stochastic Adversarial Training ( SAT ) , that samples from a distribution of perturbations during training , which significantly accelerates training for multiple perturbations1 . Then , based on the assumption that the model should output the same predictions for different perturbations of the same image , we introduce Adversarial Consistency ( AC ) loss that enforces label consistency across multiple perturbations . Finally , motivated by the noise regularization techniques ( Huang et al. , 2016 ; Srivastava et al. , 2014 ; Noh et al. , 2017 ; Lee et al. , 2020 ) which target generalization , we formulate a Meta Noise Generator ( MNG ) that learns to stochastically perturb a given sample in a meta-learning framework to explicitly improve the generalization and label consistency across multiple attacks . In particular , MNG-AC utilizes our generated samples to enforce label consistency across the generated samples from our model , adversarial samples , and clean samples . Consequently , it pushes the decision boundary ( see Figure 4 ) and enforces a smooth and robust network across multiple perturbations . We validate the efficacy and efficiency of our proposed method by comparing it against existing , state-of-the-art methods on CIFAR-10 , SVHN , and Tiny-ImageNet dataset . The experimental results show that our method obtains significantly superior performance over all the baseline methods trained with multiple perturbations , generalizes to diverse perturbations , and substantially reduces the computational cost incurred by training with multiple perturbations . In summary , the major contributions of this paper are as follows : • We introduce Adversarial Consistency ( AC ) loss that enforces label consistency across multiple perturbations to enforce smooth and robust networks . • We formulate Meta-Noise Generator that explicitly meta-learns an input-dependent noise generator , such that it outputs stochastic noise distribution to improve the model ’ s robustness and adversarial consistency across multiple types of adversarial perturbations . • We validate our proposed method on various datasets against diverse benchmark adversarial attacks , on which it achieves state-of-the-art performance , highlighting its practical impact . 2 RELATED WORK . Robustness against single adversarial perturbation . In the past few years , multiple defenses have been proposed to defend against a single type of attack ( Madry et al. , 2017 ; Xiao et al. , 2020 ; Zhang et al. , 2019 ; Carmon et al. , 2019 ) and have been consequently circumvented by subsequent attacks ( Athalye et al. , 2018 ; Brendel et al. , 2018 ; Tramer et al. , 2020 ) . Adversarial-training based 1By a factor of four on a single machine with four GeForce RTX 2080Ti on CIFAR-10 and SVHN dataset using Wide ResNet 28-10 ( Zagoruyko & Komodakis , 2016 ) architecture . defenses ( Madry et al. , 2017 ; Zhang et al. , 2019 ; Carmon et al. , 2019 ) have been the only exceptions that have withstood the intense scrutiny and have provided empirical gains in adversarial robustness . Generative models for adversarial robustness . There have been various attempts that leverage the representative power of generative models to improve model robustness . Samangouei et al . ( 2018 ) ; Jalal et al . ( 2017 ) project an image onto the generator manifold , which is then classified by the discriminator . Song et al . ( 2018 ) uses the sensitivity of generative models to defend against a single perturbation . Yin et al . ( 2020 ) proposed a detection method based on input space partitioning . However , Samangouei et al . ( 2018 ) ; Jalal et al . ( 2017 ) ; Song et al . ( 2018 ) were shown to be ineffective by stronger attacks ( Carlini & Wagner , 2017 ; Athalye et al. , 2018 ) . In contrast to learning the generative model to model the adversarial examples , we meta-learn the generator to explicitly learn an input-dependent optimal noise distribution to lower adversarial error across multiple perturbations , that does not necessarily correspond to any of the attack perturbations . Robustness against multiple adversarial perturbations . Schott et al . ( 2018 ) demonstrated that ` ∞ adversarial training is highly susceptible to ` 0/ ` 2-norm adversarial perturbations and used multiple VAEs to defend against multiple perturbations on the MNIST dataset . However , it was not scalable and limited to the MNIST dataset . Tramèr & Boneh ( 2019 ) investigated the theoretical/empirical trade-offs between multiple perturbations and introduced adversarial training with worst/average perturbations to defend against multiple perturbations . Maini et al . ( 2020 ) incorporated multiple perturbations into a single adversary to maximize the adversarial loss . However , computing all the perturbations is impractical for multiple perturbations and large scale datasets . On the other hand , our proposed framework overcomes this limitation , with improved performance over these methods and has a negligible increase in training cost over multi-perturbation adversarial training . 3 ROBUSTNESS AGAINST MULTIPLE PERTURBATIONS . We first briefly review single/multi-perturbation adversarial training and introduce Stochastic Adversarial Training ( SAT ) to reduce the computational cost incurred by training with multiple perturbations . We consider a dataset D over observations x ∈ Rd and labels y ∈ RC with C classes . Let fθ : Rd → RC be a L-layered classifier with parameters θ and classification loss Lcls . Given an attack procedure A ( x ) with norm-ball BA ( x , ε ) around x with radius ε for each example , which introduces a perturbation δ , we let xadv = x+ δ denote the corresponding adversarial examples . We consider the ` p norm distance under the additive threat model ( Laidlaw & Feizi , 2019 ) and adopt the projected-gradient descent ( PGD ) ( Madry et al. , 2017 ) for crafting the ` p perturbations : xadv ( t+1 ) = proj BA ( x , ε ) ( xadv ( t ) + argmax ||v||A≤αA vTAOxadv ( t ) Lcls ( fθ ( xadv ( t ) ) , y ) ) , ( 1 ) where xadv0 is chosen at random within BA ( x , ε ) , αA is the step size , proj is the projection operator projecting the input onto the norm ball BA ( x , ε ) , and xadv ( t+1 ) denotes the adversarial example at the t-th PGD step . We will refer the approximation of the maximum loss by an attack procedure A ( x ) , such that maxδ∈BA ( x , ε ) Lcls ( fθ ( x+ δ ) , y ) ≈ Lcls ( fθ ( A ( x ) ) , y ) for the rest of our paper . Single-perturbation adversarial training . In the standard single-perturbation adversarial training ( Kurakin et al. , 2016 ; Madry et al. , 2017 ) , the model optimizes the network using a min-max formulation . More formally , the inner maximization generates the adversarial perturbation by maximizing the loss , while the outer minimization minimizes the loss on the generated examples . min θ E ( x , y ) ∼D Lcls ( fθ ( A ( x ) ) , y ) . ( 2 ) The majority of existing single-perturbation defenses are primarily able to defend against a single category of adversarial perturbation . However , this limits the generalization of these methods to perturbations that are unseen during training ( Schott et al. , 2018 ; Tramèr & Boneh , 2019 ) , which has been referred to as overfitting on the particular type of training perturbation . Multi-perturbation adversarial training . Tramèr & Boneh ( 2019 ) extended the adversarial training to multiple perturbations by optimizing the outer objective in Eq . ( 2 ) on the strongest/union of adversarial perturbations for each input example . Their proposed strategies can more formally be defined as follows : 1 . The maximum over all perturbations : It optimizes the outer objective in Eq . ( 2 ) on the strongest adversarial perturbation from the whole set of additive adversarial perturbations min θ E ( x , y ) ∼D [ argmaxk Lcls ( fθ ( Ak ( x ) ) , y ) ] . ( 3 ) 2 . The average over all perturbations : It optimizes the outer objective in Eq . ( 2 ) on the whole set of n additive perturbations . min θ E ( x , y ) ∼D 1 n k=n∑ k=1 Lcls ( fθ ( Ak ( x ) , y ) ) . ( 4 ) Recently , Maini et al . ( 2020 ) proposed “ Multi Steepest Descent ” ( MSD ) by incorporating the different perturbations into the direction of steepest descent . However , the practicality of all these methods is limited due to an increased computational overhead for training . Stochastic Adversarial Training ( SAT ) . To overcome this limitation , we propose Stochastic Adversarial Training to defend against multiple adversarial perturbations . Specifically , we conjecture that it is essential to cover the threat model during training , not utilizing all the perturbations simultaneously . We formulate the threat model as a random attack A ( x ) sampled uniformly from a perturbation set S during each episode ( or batch ) of training which prevents overfitting on a particular adversarial perturbation . In this work , we consider the ` p-bounded perturbation set , and we sample the attack procedure A ( x ) with its corresponding norm-ball BA ( x , ε ) from the perturbation set S as follows : S = { A1 ( x ) , . . . , An ( x ) } , k ∼ Cat ( ( 1/n , . . . , 1/n ) ) , A ( x ) = Sk ( x ) , ( 5 ) where Cat is the categorical distribution and n is the number of attacks in the perturbation set S. Our proposed SAT optimizes the outer objective in Eq . ( 2 ) using the sampled attack procedure A ( x ) and is a drastic simplification of the average one in Eq . ( 4 ) , which makes it highly efficient for multiple perturbations . It is important to note that unlike the average and max strategy SAT can be applied to any perturbation set with a constant cost and it promotes generalization and convergence ( due to its stochasticity ) by preventing over-fitting on a single type of perturbation .
The authors propose a new method to improve robustness to adversarial examples under various norms (L1, L2 and LInf). Their method combines adversarial training with an adversarial noise generator. They improve upon adversarial training in a multi norm setting by choosing one norm at random for each sample, instead of computing an adversarial for all norms, thus significantly reducing the training time. They additionally improve robustness by regularizing model features between the standard image, the adversarially perturbed image and a perturbation of the image created with an adversarial noise generator.
SP:203a33205b1cacb84b4d31c5b1b3a5cbb4d93742
Modeling the Second Player in Distributionally Robust Optimization
1 INTRODUCTION . Machine learning models trained with empirical risk minimization ( ERM ) are able to achieve high aggregate performance on data sampled from their training distribution . However , they often exhibit drops in accuracy when confronted with data from domains that are under-represented in their training data , such as those of different topic ( Gururangan et al. , 2020 ) , sociolect ( Blodgett et al. , 2016 ) , accent ( Amodei et al. , 2016 ) or writer age ( Hovy & Søgaard , 2015 ) in language processing tasks , or skin color ( Grother et al. , 2019 ) or lighting ( Georghiades et al. , 2001 ) in image processing tasks . This is a particularly egregious issue in applications where higher error rates can have far reaching negative implications , such as the silencing of underrepresented minorities in toxicity detection systems ( Dixon et al. , 2018 ) or disparity amplifying feedback loops in credit rating models ( Fuster et al. , 2018 ) . This behaviour often arises from the objective function of ERM , where the parameters θ of the model are learned by minimizing the expectation of a loss function ` under a data distribution p ( or , specifically in practice , an associated empirical data distribution p̂ ) LERM ( θ ) = E ( x , y ) ∼p̂ ` ( x , y , θ ) . ( 1 ) When the model encounters data sampled from a different distribution qtest 6= p , performance can suffer significantly . Distributionally robust optimization ( DRO ) ( Ben-Tal et al. , 2013b ) provides a natural solution to this issue by replacing the expected risk under a single distribution p with the worst expected risk over a pre-determined family of distributions Q ( the “ uncertainty set ” ) LDRO ( θ ) = max q∈Q E ( x , y ) ∼q ` ( x , y , θ ) . ( 2 ) 1Code to reproduce our experiments can be found at https : //github.com/pmichel31415/P-DRO If Q contains qtest , the DRO objective upper bounds the expected risk under qtest . However , a priori knowledge of possible test distributions is not always available or easy to acquire . For example , training a model to be robust to some demographic attributes ( Q = { qdemographic 1 , qdemographic 2 , . . . } ) requires collecting and annotating data with the necessary information , an expensive and ethically fraught endeavour . In the absence of such information , one has to resort to defining the uncertainty set analytically , drawing on one ’ s intuition of what constitutes a possible test distribution given the observed training distribution , such as using moment constraints ( Delage & Ye , 2010 ; Nguyen et al. , 2020 ) , f -divergence ( Ben-Tal et al. , 2013a ; Hu & Hong , 2013 ; Faury et al. , 2020 ) , Wasserstein/IPM ( Sinha et al. , 2018 ; Husain , 2020 ) balls , or coarse-grained mixture models ( Oren et al. , 2019 ; Hu et al. , 2018 ) . However , the need for keeping the inner supremum in Eq . ( 2 ) tractable limits the possible choices . In this paper , we propose that the uncertainty set be instead defined as a family of parametric generative models . The resulting DRO objective ( §2 ) is a differentiable game with two players : the original model ` ( x , y ; θ ) and a model of its worst-case distribution qψ ( x , y ) , the titular “ second player ” which we hereafter refer to as the adversary . Using this formulation — which we call Parametric DRO ( P-DRO ) — allows for more flexibility in the choice of the adversary ’ s architecture ( and so the uncertainty set ) . Unfortunately , finding a solution of this game via direct application of simultaneous gradient descent ( Singh et al. , 2000 ) is difficult ( Balduzzi et al. , 2018 ) . In particular , direct gradient descent on the uncertainty set suffers from instability due to the large variance of the gradients ( Greensmith et al. , 2004 ) , and hyper-parameter selection is not straightforward . To address these challenges , we make two main contributions ( §3 ) : first , we propose a new relaxation of the DRO game ’ s inner maximization problem ( with KL constraints ) . The resulting objective is more amenable to simultaneous gradient update than the original zero-sum game and significantly improves training stability , while still yielding useful adversaries . Second , we develop a principled approach for selecting hyper-parameters : we leverage the learned adversaries to decide which of any two given models trained with P-DRO is more robust than the other . We do an in-depth set of experiments analyzing the effect of our proposed changes on both a toy task as well as a more realistic , yet still synthetic sentiment classification task ( §4 ) . Finally , we show that in the more realistic setting of toxicity detection , P-DRO yields models that are more robust to changes in demographic groups , even though these groups are unknown at training time , opening up applications in combatting dataset bias ( §5 ) . 2 PARAMETERIZING THE UNCERTAINTY SET . Consider a model parameterized by θ ∈ Rdmodel . Minimizing the DRO objective described in Eq . ( 2 ) over the uncertainty set Q turns the optimization problem into the min-max ( or zero-sum ) game min θ∈Rd max q∈Q E ( x , y ) ∼q ` ( x , y , θ ) . ( 3 ) The first player controls the parameters θ , whilst the second player controls the worst-case distribution q . In the absence of explicit information on groups of interest ( such as demographics , domain , etc . ) , an adequate choice of the uncertainty set Q is critical to the success of DRO . This is in fact very much an active area of research ( Sinha et al . ( 2018 ) ; Duchi & Namkoong ( 2018 ) ; Oren et al . ( 2019 ) , see Rahimian & Mehrotra ( 2019 ) for a survey ) . Q must be sufficiently large to contain test distributions of interest , but if it is too large it may contain “ adversarial ” distributions on which no model can perform well . Moreover , the design of Q is also circumscribed by the necessity of keeping the min-max problem tractable , particularly in the context of stochastic optimization . In Hu & Hong ( 2013 ) and Duchi et al . ( 2016 ) for example , the choice of f -divergence balls allows the use of duality arguments to reformulate ( 3 ) as a more manageable min-min problem . Others , like Hu et al . ( 2018 ) or Oren et al . ( 2019 ) , propose using mixture models , the simplicity of which enables them to solve the inner maximization problem efficiently . Instead , we propose to explicitly model the second player in the DRO game as a parametric model qψ of the data . Of course , not all parameterizations ψ ∈ Rdadv of a given generative model represent useful distributions , and we require that the adversary stay “ close ” to the underlying true data distribution p. As a measure of distance between qψ and p , we choose the KL ( Kullback & Leibler , 1951 ) divergence due to its wide acceptance in the machine learning community , as well as its appealing properties in the context of DRO.2 The KL upper bound , κ , is left as a parameter to be decided by the experimenter . We refer to the resulting DRO formulation as Parametric DRO min θ max ψ KL ( qψ‖p ) ≤κ E ( x , y ) ∼qψ ` ( x , y , θ ) ︸ ︷︷ ︸ LP-DRO ( θ , ψ ) . ( 4 ) 3 OPTIMIZING P-DRO . The min-max problem in Eq . ( 4 ) belongs to a class of games called “ differentiable games ” ( another famous representative being generative adversarial networks ( Goodfellow et al. , 2014 ) ) . We can search for a solution of this game with simultaneous gradient descent ( Singh et al. , 2000 ) , i.e . by simultaneously updating θ and ψ with −∇θ LP-DRO and ∇ψ LP-DRO respectively . Unfortunately , in general , there is no theoretical guarantee that simultaneous gradient descent will converge to a Nash equilibrium3 ( Balduzzi et al. , 2018 ) , nor that any such equilibrium even exists if the objective is nonconvex in θ ( or non-concave in ψ ) . The success of GANs and the follow-up literature ( Wang et al. , 2019 ) serves as an encouraging example that gradient based methods can yield useful solutions despite the pessimistic theoretical results . In this section , we discuss difficulties that arise when optimizing θ and ψ jointly , and propose modifications of the objective to address them . 3.1 TRAINING THE MODEL θ We could train the model θ by taking negative gradient steps on E ( x , y ) ∼qψ ` ( x , y ; θ ) . This gradient can be estimated by sampling examples from qψ and averaging the gradient of their losses . Unfortunately , this objective requires that qψ is well-behaved at all iterations , as it is the only source of supervision for θ . If qψ is initialized incorrectly or begins producing unrealistic ( x , y ) , the quality of θ degrades as it begins to learn a predictor on invalid training examples from qψ . As an alternative , we opt to compute the gradients for θ with importance sampling , i.e . rewriting L P-DRO as E ( x , y ) ∼p qψ ( x , y ) p ( x , y ) ` ( x , y ; θ ) , which ensures that all ( x , y ) samples will be derived from the training set itself . Unfortunately , the true density p is unknown to us . As an approximation , we replace qψ ( x , y ) p ( x , y ) with the likelihood ratio between qψ and the maximum likelihood estimate of p , qψ0 : = argmaxqψ E ( x , y ) ∼p log qψ ( x , y ) . This changes the min-max problem to min θ max ψ KL ( qψ‖p ) ≤κ E ( x , y ) ∼p qψ ( x , y ) qψ0 ( x , y ) ` ( x , y , θ ) ︸ ︷︷ ︸ Lmodel . ( 5 ) 2For instance : KL ( q‖p ) < +∞ implies that q stays within the support of p 3Nash equilibria ( Osborne & Rubinstein , 1994 ) can be thought of the game theoretic analog of global minima in optimization . This becomes a simple expected loss objective , which we can estimate by sampling from the empirical distribution p̂ . In experiments , we find that with this formulation we are able to train robust θ even when qψ is only a mediocre generative model ( see Appendix C.2 ) . To further stabilize training at the beginning of the optimization process , we initialize ψ with ψ0 , making the objective exactly the same as ERM for the first gradient step . 3.2 TRAINING THE ADVERSARY ψ According to Eq . ( 5 ) the adversary ψ must maximize E ( x , y ) ∼qψ p ( x , y ) qψ0 ( x , y ) ` ( x , y , θ ) within a KL ball of fixed radius . This is challenging for several reasons : first , enforcing the bound is intractable for complex families of adversaries where e.g . projecting onto the KL ball is another difficult optimization problem of its own . Second , maximizing the expectation with respect to the parameters of the distribution qψ is prone to instability due to large gradient variance ( Greensmith et al. , 2004 ) . Lagrangian Relaxation To address the first difficulty , we loosen the strict KL constraint and instead consider the Lagrangian relaxation L L ( ψ , τ ) = E ( x , y ) ∼qψ p ( x , y ) qψ0 ( x , y ) ` ( x , y , θ ) − τ ( KL ( qψ‖p ) − κ ) . ( 6 ) We fix the Lagrangian multiplier τ > 0 as treat it as a “ temperature ” hyper-parameter . With some reorganization ( which we develop in Appendix A.1 ) , we can show that L ( ψ , τ ) = −τKL ( qψ‖q∗τ , θ ) + C. ( 7 ) Where q∗τ , θ ∝ p ( x , y ) e p ( x , y ) qψ0 ( x , y ) ` ( x , y ; θ ) τ and C is a constant in ψ . In other words , maximizing L in ψ is equivalent to minimizing the KL divergence between qψ and q∗τ , θ . One difficulty with this objective is that q∗τ , θ depends upon the unknown probability density p ( x , y ) . We avoid this problem by treating the density ratio p ( x , y ) qψ0 ( x , y ) as a constant , which is closely related to assumptions that have been used successfully in past formulations of DRO ( Oren et al. , 2019 ) . Empirically , we find that incorporating qψ0 as a surrogate for p is a serviceable approximation , as demonstrated in Section 4 . Reversing the KL Minimizing the KL divergence in this direction is difficult for several reasons . First , it entails optimizing an expectation in qψ over ψ , which is difficult due to the large variance of the gradients ( Greensmith et al. , 2004 ) . Second , computing this KL necessitates access to the true theoretical density p ( x , y ) in order to compute q∗τ , θ ( x , y ) in the argument of the expectation , but this quantity is unknown in practice.4 To sidestep these issues , we elect to minimize the reverse direction KL ( q∗τ , θ‖qψ ) instead . Due to the KL divergence being non-symmetric , this is a rather crude approximation5 , the implications of which are discussed in Norouzi et al . ( 2016 ) . However , we find that this approach dramatically stabilizes the gradient dynamics while still yielding good adversaries , as observed empirically in Section 4.4 . Discarding the entropy term ( constant in ψ ) , the resulting problem is equivalent to minimizing Ladv ( ψ , τ ) : = − 1 Zτ , θ Ep e ` ( x , y ; θ ) τ log qψ ( x , y ) ( 8 ) in ψ , where Zτ , θ = Ep e ` ( x , y ; θ ) τ is the normalizer of q∗ . In this case , we can estimate this expectation by substituting the empirical distribution p̂ for p in the expectation . Computing the Normalizer Approximating the inverse normalizer 1Zτ , θ in a minibatch yields a biased estimator . On the other hand , computing Zτ , θ over the entire training data at each step is prohibitive since it requires computing the loss of every single example . As a middle ground , we keep a running normalizer Z̃k computed from the average of the normalizers over a fixed number 4Note that substituting the empirical distribution p̂ for p poses issues here , because qψ is not absolutely continuous with respect to p̂ . 5For instance , the optimum of the reverse KL doesn ’ t necessarily match that of the forward KL within the parametric confusion set Q k of consecutive minibatches . In other words , if Bi and θi denote the minibatch and adversary parameters at step i respectively , the normalizer at step t will be Z̃k = 1∑t i=t−k |Bi| t∑ i=t−k ∑ x , y∈Bi e ` ( x , y ; θi ) τ . ( 9 ) If k is too low , there is a risk of under-estimating the normalizer , especially if the distribution of weights contains infrequent high weight samples . On the other hand , if k is too high there is a risk of using “ stale ” weights in the normalizer . In experiments , we treat k as a hyper-parameter .
The paper proposes to define the uncertainty set in the DRO problem as a family of parametric generative models, which is to allow more flexibility in the choice of the uncertainty set architecture. To realize this idea, the paper first proposes a new relaxation of the DRO game's inner maximization problem (with KL constraints) so as to improve the training stability. It then develops a principled approach to select the hyper-parameters of the proposed method.
SP:a097bea86250950d5b3c5be7676c2b390663098e
Pseudo Label-Guided Multi Task Learning for Scene Understanding
1 INTRODUCTION . Scene understanding has become increasingly popular in both academia and industry as an essential technology for realizing a variety of vision-based applications such as robotics and autonomous driving . 3D geometric and semantic information of a scene often serve as a basic building block for high-level scene understanding tasks . Numerous approaches have been proposed for inferring a depth map ( Garg et al. , 2016 ; Godard et al. , 2019 ) or grouping semantically similar parts ( Chen et al. , 2017 ; Yuan et al. , 2019 ) from a single image . In parallel with such a rapid evolution for individual tasks , several approaches ( Chen et al. , 2019 ; Zhang et al. , 2018 ; Guizilini et al. , 2020b ; Liu et al. , 2019 ) have focused on boosting the performance through joint learning of the semantic segmentation and monocular depth estimation tasks by considering that the two tasks are highly correlated . For instance , pixels with the same semantic segmentation labels within an object are likely to have similar ( or smoothly-varying ) depth values . An abrupt change of depth values often implies the boundary of two objects containing different semantic segmentation labels . These properties have been applied to deep networks to enhance the semantic segmentation and monocular depth estimation tasks in a synergetic manner . In ( Chen et al. , 2019 ) , they proposed a joint learning model that learns semantic-aware representation to advance the monocular depth estimation with the aid of semantic segmentation . A depth map is advanced by making use of loss functions designed for the purpose of bonding geometric and semantic understanding . The method in ( Guizilini et al. , 2020b ) proposed a new architecture that improves the accuracy of monocular depth estimation through the pixel-adaptive convolution ( Su et al. , 2019 ) using semantic feature maps computed from pre-trained semantic segmentation networks . Despite the improved monocular depth accuracy over a single monocular depth network , the performance improvement of the semantic segmentation task by the aid of geometrical representation has not been verified ( Chen et al. , 2019 ) , or even the semantic segmentation network was fixed with pretrained parameters ( Guizilini et al. , 2020b ) . A generic computational approach for multi-task learning ( MTL ) was proposed in ( Zamir et al. , 2018 ) , which models the structure across twenty six tasks , including 2D , 2.5D , 3D , and semantic tasks , by finding first and higher-order transfer learning dependencies across them in a latent space to seamlessly reuse supervision among related tasks and/or solve them in a single network without increasing the complexity significantly . This was further extended by imposing a cross-task consis- tency based on inference-path invariance on a graph of multiple tasks ( Zamir et al. , 2020 ) . Though these approaches provide a generic and principled way for leveraging redundancies across multiple tasks , there may be limitations to improving the performance of individual tasks in that it is difficult to consider task-specific architectures and loss functions in such unified frameworks . With the same objective yet with a different methodology , the method in ( Liu et al. , 2019 ) proposes a novel MTL architecture consisting of task-shared and task-specific networks based on task-attention modules , aiming to learn both generalizable features for multiple tasks and features tailored to each task . They validated the performance in the joint learning of monocular depth and semantic segmentation . In this paper , we propose a novel MTL architecture for monocular depth estimation and semantic segmentation tasks , called pseudo label-guided multi-task learning ( Pseudo-MTL ) . The proposed architecture leverages geometrically- and semantically-guided representations by introducing pseudo ground truth labels . When a pair of stereo images is given as inputs , our method first generates pseudo ground truth left and right depth maps by using existing pre-trained stereo matching networks ( Pang et al. , 2017 ; Chang & Chen , 2018 ) . To prevent inaccurate depth values from being used , a stereo confidence map ( Poggi & Mattoccia , 2016 ) is used together as auxiliary data that measures the reliability of the pseudo depth labels . These are leveraged for supervising the monocular depth network , obtaining substantial performance gain over recent self-supervised monocular depth estimation approaches ( Godard et al. , 2017 ; 2019 ) . More importantly , the pseudo depth labels are particularly useful when imposing a cross-view consistency across left and right images . The estimated monocular depth and segmentation maps of two views are tied from a geometric perspective by minimizing the cross-view consistency loss , alleviating the mismatch problem incurred by inconsistent prediction across two views significantly . We will verify through an intensive ablation study that the proposed cross-consistency loss leads to a substantial improvement on both tasks . Experimental results also show that our approach achieves an outstanding performance over state-of-the-arts . In short , our novel contributions can be summarized as follows . • We propose a novel MTL approach that jointly performs monocular depth estimation and semantic segmentation through pseudo depth labels . • The cross-view consistency loss based on the pseudo depth labels and associated confidence maps is proposed to enable consistent predictions across two views . • An intensive ablation study is provided to quantify the contribution of the proposed items to performance improvement . 2 RELATED WORK . Monocular Depth Estimation While early works for monocular depth estimation are based on supervised learning , self-supervised learning has attracted increasing interest in recent approaches ( Godard et al. , 2017 ; 2019 ; Watson et al. , 2019 ) to overcome the lack of ground truth depth labels . Here , we review works mostly relevant to our method . Godard et al . ( Godard et al. , 2017 ; 2019 ) proposed the deep network that infers a disparity map using the image reconstruction loss and left-right consistency loss from a pair of stereo images or monocular videos . Chen et al . ( Chen et al. , 2019 ) infers both disparity and semantic segmentation maps by enforcing the cross consistency across stereo images to address the mismatch problem of ( Godard et al. , 2017 ) . Several approaches have focused on improving the monocular depth estimation through the aid of segmentation networks , e.g. , by stitching local depth segments from instance segmentation with respect to scale and shift ( Wang et al. , 2020 ) or leveraging pretrained semantic segmentation networks to guide the monocular depth estimation ( Guizilini et al. , 2020b ) . Semantic Segmentation A deep convolutional encoder-decoder architecture for semantic segmentation proposed in ( Badrinarayanan et al. , 2017 ) has been widely used as backbone . The pyramid pooling module was proposed for leveraging global context through aggregation of different regionbased contexts ( Zhao et al. , 2017 ) . Some segmentation works attempted to combine different tasks to improve segmentation performance . Gated-SCNN ( Takikawa et al. , 2019 ) refines segmentation results by fusing semantic-region features and boundary features . FuseNet ( Hazirbas et al. , 2016 ) proposed to fuse features from color and depth images for improving the segmentation performance . Multi-task learning In ( Chen et al. , 2019 ; Takikawa et al. , 2019 ; Zhang et al. , 2018 ) , they proposed to leverage task-specific loss functions to tie up two ( or more ) tasks within the MTL architecture . For instance , Chen et al . ( Chen et al. , 2019 ) attempted to improve a monocular depth accuracy by using the loss functions that measure the consistency between geometric and semantic predictions . The generic computational approach for MTL was proposed by leveraging redundancies across multiple tasks in a latent space in ( Zamir et al. , 2018 ; 2020 ) . The task-attention modules were introduced to extract features for individual tasks in ( Misra et al. , 2016 ; Liu et al. , 2019 ; Jha et al. , 2020 ) . In this work , we focus on improving the performance of the MTL architecture for monocular depth estimation and semantic segmentation tasks by using the cross-view consistency loss based on pseudo labels . 3 PROPOSED METHOD . 3.1 OVERVIEW AND ARCHITECTURE DESIGN . Our Pseudo-MTL approach focuses on improving the performance of the monocular depth estimation and semantic segmentation tasks through task-specific losses defined based on the pseudo depth labels generated by using pre-trained stereo matching networks ( Pang et al. , 2017 ) . The stereo confidence maps are used together as auxiliary data to compensate for estimation errors in the pseudo depth labels . These are effective in mitigating undesired artifacts of errors that may exist in the pseudo depth labels . In our work , we chose the CCNN ( Poggi & Mattoccia , 2016 ) for calculating the confidence map , but more advanced confidence estimation approaches can also be used . As shown in Figure 1 , the proposed Pseudo-MTL network is based on the encoder-decoder architecture , in which a single encoder takes an image and two decoders predict the monocular depth and semantic segmentation maps . The encoder network E consists of the convolutional layers of the VGG network ( Simonyan & Zisserman , 2015 ) . Two decoders , Dd for monocular depth estimation and Ds for monocular depth estimation , are designed symmetrically with the encoder . While two tasks share the encoder , the task-specific decoder branches are used for each task . The pseudo depth labels and the segmentation label maps of stereo images are used for supervising the proposed architecture . The monocular depth and segmentation maps of left and right images are estimated by passing each image to the proposed architecture , as shown in Figure 1 . The cross-view consistency loss is then imposed on the prediction results of two views . To be specific , the estimated monocular depth maps of left and right images are warped and tested using the pseudo depth labels for ensuring inference-view invariance on the monocular depth estimation , and a similar procedure is also applied to the semantic segmentation . Using the pseudo depth labels for training the proposed model is advantageous at various aspects . The pseudo depth labels of stereo images , filtered out by its confidence map , provides a better supervision ( Choi et al. , 2020 ) than recent self-supervised monocular depth estimation approaches . More importantly , the cross-view consistency based on the pseudo depth labels mitigates the mismatch problem by inconsistent prediction results of two views , leading to a substantial performance gain . Our method aims at advancing the two tasks via task-specific losses based on pseudo ground truth labels , and existing MTL architectures , e.g . based on task-specific attention modules and adaptive balancing ( Liu et al. , 2019 ; Jha et al. , 2020 ) , can be used complementarily with our loss functions . 3.2 LOSS FUNCTIONS . Loss functions are divided into two parts , 1 ) supervised loss for depth and segmentation networks and 2 ) pseudo depth-guided reconstruction loss for cross-view consistency . Note that the supervised loss used for monocular depth estimation relies on the pseudo depth labels generated from a pair of stereo images . 3.2.1 LOSS FOR MONOCULAR DEPTH AND SEMANTIC SEGMENTATION . Depth maps di for i = { l , r } , predicted by the decoder Dd for monocular depth estimation , are used for measuring the depth regression loss Ld as follows : Ld = ∑ i= { l , r } Lreg ( ci , di , d pgt i ) , where Lreg ( ci , di , d pgt i ) = 1 Zi ∑ p∈Φ ci ( p ) · |di ( p ) − dpgti ( p ) |1 , ( 1 ) where ci and d pgt i indicate the confidence map and pseudo ground truth depth map of left ( i = l ) or right ( i = r ) images , respectively . The loss is normalized with Zi = ∑ p ci ( p ) . Φ represents a set of all pixels . The confidence map serves to exclude inaccurate depth values of dpgti when calculating the depth regression loss Ld . This can be used in various ways , including the hard thresholding ( Cho et al. , 2019 ; Tonioni et al. , 2020 ) and the soft thresholding ( Choi et al. , 2020 ) . Among them , the soft thresholded confidence map ( Choi et al. , 2020 ) is shown to be effective in the monocular depth estimation . Our work chose to threshold the confidence map through the soft-thresholding of ( Choi et al. , 2020 ) . We found that the pretrained threshold network already provides satisfactory results , and thus it was fixed during our network training . A supervised loss for semantic segmentation is defined with the standard cross-entropy H : Ls = ∑ i= { l , r } H ( si , s gt i ) , ( 2 ) si and s gt i denote the segmentation map , predicted by the decoder Ds for semantic segmentation , and ground truth segmentation map , respectively . The supervised loss for both tasks is defined as LS = αdLd + αsLs with loss weights αd and αs .
The paper presents a joint learning strategy for simultaneous semantic segmentation and monocular depth estimation. The main idea is to exploit stereo pairs in training and introduce pseudo-depth label estimated from pre-trained stereo-matching networks. Given the pseudo-depth with confidence estimation, the method proposes a cross-view consistency loss for both depth and semantic predictions, which augments the standard segmentation loss. The proposed method is evaluated on KITTI and Cityscapes datasets with comparisons to prior work and ablative study.
SP:5ac6f67060ad4fa1470c5f87e8329ef293f2025c
Catastrophic Fisher Explosion: Early Phase Fisher Matrix Impacts Generalization
1 INTRODUCTION . Implicit regularization in gradient-based training of deep neural networks ( DNNs ) remains relatively poorly understood , despite being considered a critical component in their empirical success ( Neyshabur , 2017 ; Zhang et al. , 2016 ; Jiang et al. , 2020b ) . Recent work suggests that the early phase of training of DNNs might hold the key to understanding these implicit regularization effects . Golatkar et al . ( 2019 ) ; Keskar et al . ( 2017 ) ; Sagun et al . ( 2018 ) ; Achille et al . ( 2019 ) show that by introducing regularization later , a drop in performance due to lack of regularization in this phase is hard to recover from , while on the other hand , removing regularization after the early phase has a relatively small effect on the final performance . Other works show that the early phase of training also has a dramatic effect on the trajectory in terms of properties such as the local curvature of the loss surface or the gradient norm ( Jastrzebski et al. , 2020 ; Frankle et al. , 2020 ) . In particular , Achille et al . ( 2019 ) ; Jastrzębski et al . ( 2019 ) ; Golatkar et al . ( 2019 ) ; Lewkowycz et al . ( 2020 ) ; Leclerc & Madry ( 2020 ) independently suggest that rapid changes in the local curvature of the loss surface in the early phase critically affects the final generalization . Closely related to our work , Lewkowycz et al . ( 2020 ) ; Jastrzębski et al . ( 2019 ) show that using a large learning rate has a dramatic effect on the early optimization trajectory in terms of the loss curvature . These observations lead to a question : what is the mechanism by which regularization in the early phase impacts the optimization trajectory and generalization ? We investigate this question mainly through the lens of the Fisher Information Matrix ( FIM ) , a matrix that can be seen as approximating the local curvature of the loss surface in DNNs ( Martens , 2020 ; Thomas et al. , 2020 ) . Our main contribution is to show that the implicit regularization effect of using a large learning rate or a small batch size can be modeled as an implicit penalization of the trace of the FIM ( Tr ( F ) ) from the very beginning of training . We demonstrate on image classification tasks that the value of Tr ( F ) early in training correlates with the final generalization performance across settings with different learning rates or batch sizes . We then show evidence that explicitly regularizing Tr ( F ) ( which we call Fisher penalty ) significantly improves generalization in training with a sub-optimal learning rate . On the other hand , growth of Tr ( F ) early in training , which may occur in practice when using a relatively small learning rate , coincides with poor generalization . We call this phenomenon the catastrophic Fisher explosion . Figure 1 illustrates this effect on the TinyImageNet dataset ( Le & Yang , 2015 ) . Our second contribution is an analysis of why implicitly or explicitly regularizing Tr ( F ) impacts generalization . We reveal two effects of implicit or explicit regularization of Tr ( F ) : ( 1 ) penalizing Tr ( F ) discourages memorizing noisy labels , ( 2 ) small Tr ( F ) in the early phase of training biases optimization towards a flat minimum , as characterized by the trace of the Hessian . 2 IMPLICIT AND EXPLICIT REGULARIZATION OF THE FIM . Fisher Information Matrix Consider a probabilistic classification model pθ ( y|x ) , where θ denotes its parameters . Let ` ( x , y ; θ ) be the cross-entropy loss function calculated for input x and label y . Let g ( x , y ; θ ) = ∂∂θ ` ( x , y ; θ ) denote the gradient computed for an example ( x , y ) . The central object that we study is the Fisher Information Matrix F defined as F ( θ ) = Ex∼X , ŷ∼pθ ( y|x ) [ g ( x , ŷ ) g ( x , ŷ ) T ] , ( 1 ) where the expectation is often approximated using the empirical distribution X̂ induced by the training set . We denote its trace by Tr ( F ) . Later , we also look into the Hessian H ( θ ) = ∂ 2 ∂θ2 ` ( x , y ; θ ) . We denote its trace by Tr ( H ) . The FIM can be seen as an approximation to the Hessian ( Martens , 2020 ) . In particular , as p ( y|x ; θ ) → p̂ ( y|x ) , where p̂ ( y|x ) is the empirical label distribution , the FIM converges to the Hessian . Thomas et al . ( 2020 ) showed on image classifications tasks that Tr ( H ) ≈ Tr ( F ) along the optimization trajectory , which we also evidence in Appendix F. Fisher Penalty Several studies have presented evidence that the early phase has a drastic effect on the trajectory in terms of the local curvature of the loss surface ( Achille et al. , 2019 ; Jastrzębski et al. , 2019 ; Gur-Ari et al. , 2018 ; Lewkowycz et al. , 2020 ; Leclerc & Madry , 2020 ) . In particular , Lewkowycz et al . ( 2020 ) ; Jastrzębski et al . ( 2019 ) show that using a large learning rate in stochastic gradient descent biases training towards low curvature regions of the loss surface very early in training . For example , using a large learning rate in SGD was shown to result in a rapid decay of Tr ( H ) along the optimization trajectory Jastrzębski et al . ( 2019 ) . Our main contribution is to propose and investigate a specific mechanism by which using a large learning rate or a small batch size implicitly influences final generalization . Our first insight is to shift the focus from studying the Hessian , to studying properties of the FIM . Concretely , we hypothesize that using a large learning rate or a small batch size improves generalization by implicitly penalizing Tr ( F ) from the very beginning of training . The benefit of studying the FIM is that it can be directly and efficiently manipulated during training . In order to study the effect of implicit regularization of Tr ( F ) , we introduce a regularizer , which we refer to as Fisher penalty , explicitly penalizing Tr ( F ) . We derive this regularizer in the following way . First , we note that Tr ( F ) can be written as Tr ( F ) = Ex∼X , ŷ∼pθ ( y|x ) [ ‖ ∂∂θ ` ( x , ŷ ) ‖ 2 2 ] . To regularize Tr ( F ) , we add the following term to the loss function : ` ′ ( x1 : B , y1 : B ; θ ) = 1 B B∑ i=1 ` ( xi , yi ; θ ) + α ∥∥∥∥∥ 1B B∑ i=1 g ( xi , ŷi ) ∥∥∥∥∥ 2 , ( 2 ) where ( x1 : B , y1 : B ) is a mini-batch , ŷi is sampled from pθ ( y|xi ) , and α is a hyperparameter . We refer to this regularizer as Fisher penalty . The formulation is based on the empirical observation that ∥∥∥ 1B ∑Bi=1 g ( xi , ŷi ) ∥∥∥2 and Tr ( F ) correlate well during training . Crucially , this allows us to reduce the added computational cost of Fisher penalty to that of a single additional backpropagation call ( Drucker & Le Cun , 1992 ) . Finally , we compute the gradient of the second term only every 10 optimization steps , and in a given iteration use the most recently computed gradient . We discuss these approximations in detail in Appendix C. Catastrophic Fisher Explosion To illustrate the concepts mentioned in this section , we train a Wide ResNet model ( depth 44 , width 3 ) ( Zagoruyko & Komodakis , 2016 ) on the TinyImageNet dataset with SGD and two different learning rates . We illustrate in Figure 1 that the small learning rate leads to dramatic overfitting , which coincides with a sharp increase in Tr ( F ) in the early phase of training . We also show in Appendix D that these effects can not be explained by the difference in learning speed between runs with smaller and learning rates . We call this phenomenon the catastrophic Fisher explosion . 3 EARLY-PHASE Tr ( F ) CORRELATES WITH FINAL GENERALIZATION Using a large learning rate ( η ) or a small batch size ( S ) in SGD steers optimization to a lower curvature region of the loss surface . However , it remains a hotly debated topic whether this explains their strong regularization effect ( Dinh et al. , 2017 ; He et al. , 2019 ; Maddox et al. , 2020 ; Tsuzuku et al. , 2019 ; Yoshida & Miyato , 2017 ) . We begin by studying the connection between Tr ( F ) and generalization in experiments across which we vary η or S in SGD . Experimental setup We run our experiments in two settings : ( 1 ) ResNet-18 with Fixup He et al . ( 2015 ) ; Zhang et al . ( 2019 ) trained on the ImageNet dataset ( Deng et al. , 2009 ) , ( 2 ) ResNet-26 initialized with Arpit et al . ( 2019 ) trained on the CIFAR-10 and CIFAR-100 datasets ( Krizhevsky , 2009 ) . We train each architecture using SGD , with various values of η , S , and random seed . We define Tr ( Fi ) as Tr ( F ) during the initial phase of training . The early-phase Tr ( F ) is measured when the training loss crosses a task-specific threshold . For ImageNet , we use learning rates 0.001 , 0.01 , 0.1 , and = 3.5 . For CIFAR-10 , we use learning rates 0.007 , 0.01 , 0.05 , and = 1.2 . For CIFAR-100 , we use learning rates 0.001 , 0.005 , 0.01 , and = 3.5 . In all cases , training loss reaches between 2 and 7 epochs across different hyper-parameter settings . We repeat similar experiments for different batch sizes in Appendix A.1 . The remaining training details can be found in Appendix G.1 . Results Figure 2 shows the correlation between Tr ( Fi ) and test accuracy across runs with different learning rates . We show results for CIFAR-10 and CIFAR-100 when varying the batch size in Figure 7 in the Appendix . We find that Tr ( Fi ) correlates well with the final generalization in our setting , which provides initial evidence for the importance of Tr ( F ) . It also serves as a stepping stone towards developing a more granular understanding of the role of implicit regularization of Tr ( F ) in the following sections . 4 FISHER PENALTY . To better understand the significance of the identified correlation between Tr ( Fi ) and generalization , we now run experiments in which we directly penalize Tr ( F ) . We focus our attention on the identified effect of high learning rate on Tr ( F ) . Experimental setting We use a similar setting as in the previous section , but we include larger models . We run experiments using Wide ResNet ( Zagoruyko & Komodakis , 2016 ) ( depth 44 and width 3 , with or without BN layers ) , SimpleCNN ( without BN layers ) , DenseNet ( L=40 , K=12 ) ( Huang et al. , 2017 ) and VGG-11 ( Simonyan & Zisserman , 2015 ) . We train these models on either the CIFAR-10 or the CIFAR-100 datasets . Due to larger computational cost , we replace ImageNet with the TinyImageNet dataset ( Le & Yang , 2015 ) in these experiments . To investigate if the correlation of Tr ( Fi ) and final generalization holds more generally , we apply Fisher penalty in two settings . First , we use a learning rate 10-30x smaller than the optimal one , which both incur up to 9 % degradation in test accuracy and results in large value of Tr ( Fi ) . We also remove data augmentation from the CIFAR-10 and the CIFAR-100 datasets to ensure that training with small learning rate does not result in underfitting . In the second setting , we add Fisher penalty in training with an optimized learning rate using grid search ( η∗ ) and train with data augmentation . Fisher penalty penalizes the gradient norm computed using labels sampled from pθ ( y|x ) . We hypothesize that a similar , but weaker , effect can be introduced by other gradient norm regularizers . First , we compare FP to penalizing the input gradient norm ‖gx‖ = ∂∂x ` ( x , y ) , which we denote by GPx ( Varga et al. , 2018 ; Rifai et al. , 2011 ; Drucker & Le Cun , 1992 ) . We also experiment with penalizing the vanilla mini-batch gradient Gulrajani et al . ( 2017 ) , which we denote by GP . Finally , we experiment with penalizing the mini-batch gradient computed with random labels ‖gr‖ = ∂∂x ` ( x , ŷ ) where ŷ is sampled from a uniform distribution over the label set ( GPr ) . We are not aware of any prior work using GP or GPr in supervised training , with the exception of Alizadeh et al . ( 2020 ) where the authors penalized ` 1 norm of gradients to compress the network towards the end of training . We tune the hyperparameters on the validation set . More specifically for α , we test 10 different values spaced uniformly between 10−1×v to 101×v on a logarithmic scale with v ∈ R+ . For TinyImageNet we test 5 alternatives instead . To pick the optimal learning rate , we evaluate 5 values spaced equally on a logarithmic scale . We include the remaining experimental details in the Appendix G.2 . Fisher Penalty improves generalization Table 1 summarizes the results of the main experiment . First , we observe that a suboptimal learning rate ( 10-30x lower than the optimal ) leads to dramatic overfitting . We observe a degradation of up to 9 % in test accuracy , while achieving perfect training accuracy ( see Table 6 in the Appendix ) . Fisher penalty closes the gap in test accuracy between the small and optimal learning rate , and even achieves better performance than the optimal learning rate . A similar performance was observed when minimizing ‖gr‖ . We will come back to this observation in the next section . GP and GPx reduce the early value of Tr ( F ) ( see Table 4 in the Appendix ) . They , however , generally perform worse than Tr ( F ) or GPr and do not fully close the gap between small and optimal learning rate . We hypothesize they improve generalization by a similar but less direct mechanism than Tr ( F ) and GPr . In the second experimental setting , we apply FP to a network trained with the optimal learning rate η∗ . According to Table 2 , Fisher Penalty improves generalization in 4 out of 5 settings . The gap between the baseline and FP is small in 3 out of 5 settings ( below 1 % ) , which is natural given that we already regularize training implicitly by using the optimal η and data augmentation . Geometry and generalization in the early phase of training Here , we investigate the temporal aspect of Fisher Penalty on CIFAR-10 and CIFAR-100 . In particular , we study whether early penalization of Tr ( F ) matters for final generalization . First , we observe that all gradient-norm regularizers reduce the early value of Tr ( F ) closer to Tr ( F ) achieved when trained with the optimal learning rate η∗ . We show this effect with Wide ResNet and VGG-11 on CIFAR-100 in Figure 3 , and for other experimental settings in the Appendix . We also tabulate the maximum achieved values of Tr ( F ) over the optimization trajectory in Appendix A.2 . 0 50 100 Fisher Penalty onset 46 48 50 52 54 Va lid at io n Ac cu ra cy ( % ) ( a ) Wide ResNet CIFAR100 ( w/o aug. ) 0 20 40 60 Fisher Penalty onset 35.0 37.5 40.0 42.5 45.0 47.5 Va lid at io n Ac cu ra cy ( % ) ( b ) VGG-11 CIFAR-100 ( w/o aug. ) 0 50 100 Fisher Penalty onset 72 74 76 78 80 Va lid at io n Ac cu ra cy ( % ) ( c ) Simple CNN CIFAR10 ( w/o aug. ) 0 50 100 Fisher Penalty onset 60 62 64 66 Va lid at io n Ac cu ra cy ( % ) ( d ) DenseNet CIFAR-100 ( w/o aug. ) Figure 4 : Each subplot summarizes an experiment in which we apply Fisher Penalty starting from a certain epoch ( x axis ) and measure the final test accuracy ( y axis ) . Fisher Penalty has to be applied from the beginning of training to close the generalization gap to the optimal learning rate ( c.f . the red horizontal line to the blue horizontal line ) . To test the importance of explicitly penalizing Tr ( F ) early in training , we start applying it after a certain number of epoch E ∈ { 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 } . We use the best hyperparameter set from the previous experiments . Figure 4 summarizes the results . For both datasets , we observe a consistent pattern . When FP is applied starting from a later epoch , final generalization is significantly worse , and the generalization gap arising from a suboptimal learning rate is not closed .
This paper empirically investigates the effect of the trace of the Fisher Information Matrix (FIM) early in training has on the generalization of SGD. Authors demonstrate that the effect of optimally chosen learning rate and batch size for SGD can be modeled as an implicit penalty on the trace of FIM. They argue that explicitly penalizing the trace of FIM discourages memorizing noisy labels, thus leading to better generalization. Furthermore, they experimentally show that the early low value of the trace of FIM may bias the optimization towards a flat optimum which has been observed to correlate well with good generalization.
SP:8fb2da71029fc4096f279c5873a2c55e8afaa947