paper_name stringlengths 11 170 | text stringlengths 8.07k 307k | summary stringlengths 152 6.16k | paper_id stringlengths 43 43 |
|---|---|---|---|
Effective Regularization Through Loss-Function Metalearning | Loss-function metalearning can be used to discover novel , customized loss functions for deep neural networks , resulting in improved performance , faster training , and improved data utilization . A likely explanation is that such functions discourage overfitting , leading to effective regularization . This paper demonstrates theoretically that this is indeed the case for the TaylorGLO method : Decomposition of learning rules makes it possible to characterize the training dynamics and show that the loss functions evolved by TaylorGLO balance the pull to zero error , and a push away from it to avoid overfitting . This observation leads to an invariant that can be utilized to make the metalearning process more efficient in practice , and result in networks that are robust against adversarial attacks . Loss-function optimization can thus be seen as a well-founded new aspect of metalearning in neural networks . 1 INTRODUCTION . Regularization is a key concept in deep learning : it guides learning towards configurations that are likely to perform robustly on unseen data . Different regularization approaches originate from intuitive understanding of the learning process and have been shown to be effective empirically . However , the understanding of the underlying mechanisms , the different types of regularization , and their interactions , is limited . Recently , loss function optimization has emerged as a new area of metalearning , and shown great potential in training better models . Experiments suggest that metalearned loss functions serve as regularizers in a surprising but transparent way : they prevent the network from learning too confident predictions ( e.g . Baikal loss ; Gonzalez & Miikkulainen , 2020a ) . While it may be too early to develop a comprehensive theory of regularization , given the relatively nascent state of this area , it may be possible to make progress in understanding regularization of this specific type . That is the goal of this paper . Since metalearned loss functions are customized to a given architecture-task pair , there needs to be a shared framework under which loss functions can be analyzed and compared . The TaylorGLO ( Gonzalez & Miikkulainen , 2020b ) technique for loss function metalearning lends itself well to such analysis : It represents loss functions as multivariate Taylor polynomials , and leverages evolution to optimize a fixed number of parameters in this representation . In this framework , the SGD learning rule is decomposed to coefficient expressions that can be defined for a wide range of loss functions . These expressions provide an intuitive understanding of the training dynamics in specific contexts . Using this framework , mean squared error ( MSE ) , cross-entropy , Baikal , and TaylorGLO loss functions are analyzed at the null epoch , when network weights are similarly distributed ( Appendix C ) , and in a zero training error regime , where the training samples ’ labels have been perfectly memorized . For any intermediate point in the training process , the strength of the zero training error regime as an attractor is analyzed and a constraint on this property is derived on TaylorGLO parameters by characterizing how the output distribution ’ s entropy changes . In a concrete TaylorGLO loss function that has been metalearned , these attraction dynamics are calculated for individual samples at every epoch in a real training run , and contrasted with those for the cross-entropy loss . This comparison provides clarity on how TaylorGLO avoids becoming overly confident in its predictions . Further , the analysis shows ( in Appendix D.2 ) how label smoothing ( Szegedy et al. , 2016 ) , a traditional type of regularization , can be implicitly encoded by TaylorGLO loss functions : Any representable loss function has label-smoothed variants that are also representable by the parameterization . From these analyses , practical opportunities arise . First , at the null epoch , where the desired behavior can be characterized clearly , an invariant can be derived on a TaylorGLO loss function ’ s parameters that must hold true for networks to be trainable . This constraint is then applied within the TaylorGLO algorithm to guide the search process towards good loss functions more efficiently . Second , lossfunction-based regularization results in robustness that should e.g . make them more resilient to adversarial attacks . This property is demonstrated experimentally by incorporating adversarial robustness as an objective within the TaylorGLO search process . Thus , loss-function metalearning can be seen as a well-founded and practical approach to effective regularization in deep learning . 2 BACKGROUND . Regularization traditionally refers to methods for encouraging smoother mappings by adding a regularizing term to the objective function , i.e. , to the loss function in neural networks . It can be defined more broadly , however , e.g . as “ any modification we make to a learning algorithm that is intended to reduce its generalization error but not its training error ” ( Goodfellow et al. , 2015 ) . To that end , many regularization techniques have been developed that aim to improve the training process in neural networks . These techniques can be architectural in nature , such as Dropout ( Srivastava et al. , 2014 ) and Batch Normalization ( Ioffe & Szegedy , 2015 ) , or they can alter some aspect of the training process , such as label smoothing ( Szegedy et al. , 2016 ) or the minimization of a weight norm ( Hanson & Pratt , 1989 ) . These techniques are briefly reviewed in this section , providing context for loss-function metalearning . 2.1 IMPLICIT BIASES IN OPTIMIZERS . It may seem surprising that overparameterized neural networks are able to generalize at all , given that they have the capacity to memorize a training set perfectly , and in fact sometimes do ( i.e. , zero training error is reached ) . Different optimizers have different implicit biases that determine which solutions are ultimately found . These biases are helpful in providing implicit regularization to the optimization process ( Neyshabur et al. , 2015 ) . Such implicit regularization is the result of a network norm—a measure of complexity—that is minimized as optimization progresses . This is why models continue to improve even after training set has been memorized ( i.e. , the training error global optima is reached ) ( Neyshabur et al. , 2017 ) . For example , the process of stochastic gradient descent ( SGD ) itself has been found to provide regularization implicitly when learning on data with noisy labels ( Blanc et al. , 2020 ) . In overparameterized networks , adaptive optimizers find very different solutions than basic SGD . These solutions tend to have worse generalization properties , even though they tend to have lower training errors ( Wilson et al. , 2017 ) . 2.2 REGULARIZATION APPROACHES . While optimizers may minimize a network norm implicitly , regularization approaches supplement this process and make it explicit . For example , a common way to restrict the parameter norm explicitly is through weight decay . This approach discourages network complexity by placing a cost on weights ( Hanson & Pratt , 1989 ) . Generalization and regularization are often characterized at the end of training , i.e . as a behavior that results from the optimization process . Various findings have influenced work in regularization . For example , flat landscapes have better generalization properties ( Keskar et al. , 2017 ; Li et al. , 2018 ; Chaudhari et al. , 2019 ) . In overparameterized cases , the solutions at the center of these landscapes may have zero training error ( i.e. , perfect memorization ) , and under certain conditions , zero training error empirically leads to lower generalization error ( Belkin et al. , 2019 ; Nakkiran et al. , 2019 ) . However , when a training loss of zero is reached , generalization suffers ( Ishida et al. , 2020 ) . This behavior can be thought of as overtraining , and techniques have been developed to reduce it at the end of the training process , such as early stopping ( Morgan & Bourlard , 1990 ) and flooding ( Ishida et al. , 2020 ) . Both flooding and early stopping assume that overfitting happens at the end of training , which is not always true ( Golatkar et al. , 2019 ) . In fact , the order in which easy-to-generalize and hard-togeneralize concepts are learned is important for the network ’ s ultimate generalization . For instance , larger learning rates early in the training process often lead to better generalization in the final model ( Li et al. , 2019 ) . Similarly , low-error solutions found by SGD in a relatively quick manner—such as through high learning rates—often have good generalization properties ( Yao et al. , 2007 ) . Other techniques tackle overfitting by making it more difficult . Dropout ( Srivastava et al. , 2014 ) makes some connections disappear . Cutout ( DeVries & Taylor , 2017 ) , Mixup ( Zhang et al. , 2018 ) , and their composition , CutMix ( Yun et al. , 2019 ) , augment training data with a broader variation of examples . Notably , regularization is not a one-dimensional continuum . Different techniques regularize in different ways that often interact . For example , flooding invalidates performance gains from early stopping ( Ishida et al. , 2020 ) . However , ultimately all regularization techniques alter the gradients that result from the training loss . This observation suggests loss-function optimization might be an effective way to regularize the training process . 2.3 LOSS-FUNCTION METALEARNING . The idea of metalearning loss-functions has a deep history with many recent developments that have shown promise in practical settings . Prior work in reinforcement learning showed that metalearning various types of objectives is useful . For instance , in evolving policy gradients ( Houthooft et al. , 2018 ) , the policy loss is not represented symbolically , but rather as a neural network that convolves over a temporal sequence of context vectors . In reward function search ( Niekum et al. , 2010 ) , the task is framed as a genetic programming problem , leveraging PushGP ( Spector et al. , 2001 ) . Various actor-critic reinforcement learning approaches have tackled learning a meta-critic neural network that can generate losses ( Sung et al. , 2017 ; Zhou et al. , 2020 ) . Metalearned critic network techniques have also been applied outside of reinforcement learning to train better few-shot classifiers ( Antoniou & Storkey , 2019 ) . In unsupervised representation learning , weight update rules for semi-supervised learning have themselves been metalearned successfully ( Metz et al. , 2018 ) . The update rules were constrained to fit a biological neuron model and transferred well between tasks . Concrete loss-function metalearning for deep networks was first introduced by Gonzalez & Miikkulainen ( 2020a ) as an automatic way to find customized loss functions that aim to optimize a performance metric for a model . The technique , a genetic programming approach , named GLO , discovered one particular loss function , Baikal , that improves classification accuracy , training speed , and data utilization . Baikal appeared to achieve these properties through a form of regularization that ensured the model would not become overly confident in its predictions . That is , instead of monotonically decreasing the loss when the output gets closer to the correct value , Baikal loss increases rapidly when the output is almost correct , thus discouraging extreme accuracy . This paper shows how training dynamics are specifically impacted in this manner when training with the Baikal loss . Overall , GLO demonstrated that while learned loss functions ’ generalization effects transfer across datasets and models to some extent , they are most powerful when they are customized to individual tasks and architectures . Different loss functions can take advantage of the different characteristics of each such setting . Other techniques have advanced this new field further , for example by metalearning state-dependent loss functions for inverse dynamics models ( Morse et al. , 2020 ) , and using a trained network that is itself a metalearned loss function ( Bechtle et al. , 2019 ) . One particular technique , TaylorGLO ( Gonzalez & Miikkulainen , 2020b ) , lends itself well to analyzing what makes loss-function metalearning effective . TaylorGLO represents loss functions as parameterizations of multivariate Taylor polynomials . This parameterization allows it to scale to models with millions of trainable parameters , including a variety of deep learning architectures in image classification tasks . TaylorGLO loss functions have a tunable complexity based on the order of the polynomial ; third-order functions were identified to work best in practical settings . The third-order TaylorGLO loss function parameterization provides a fixed representation that can be used to analyze a large family of loss functions through a unified methodology . In prior work , TaylorGLO loss functions were shown to improve generalization empirically ( Gonzalez & Miikkulainen , 2020b ) . This paper complements that work , aiming to explain why that is the case by analyzing the dynamics of training theoretically . | Taylor polynomial based loss function metalearning acts as a regularizer that improves the networks adversarial attack robustness, performance, training time, and data utilization. The authors evolve weights, and so add arbitrary other factors to the loss, including adversarial robustness to learn a loss function parameterization which is more robust. They provide analysis of the attractor states under the optimization of a suite of loss functions. | SP:3021e8b74146a257b5befec014cd17d5d7bd3362 |
Implicit Under-Parameterization Inhibits Data-Efficient Deep Reinforcement Learning | 1 INTRODUCTION . Many pervasive deep reinforcement learning ( RL ) algorithms estimate value functions using bootstrapping , that is , by sequentially fitting value functions to target value estimates generated from the value function learned in the previous iteration . Despite high-profile achievements ( Silver et al. , 2017 ) , these algorithms are highly unreliable due to poorly understood optimization issues . Although a number of hypotheses have been proposed to explain these issues ( Achiam et al. , 2019 ; Bengio et al. , 2020 ; Fu et al. , 2019 ; Igl et al. , 2020 ; Liu et al. , 2018 ; Kumar et al. , 2020a ) , a complete understanding remains elusive . We identify an “ implicit under-parameterization ” phenomenon that emerges when value networks are trained using gradient descent combined with bootstrapping . This phenomenon manifests as an excessive aliasing of features learned by the value network across states , which is exacerbated with more gradient updates . While the supervised deep learning literature suggests that some feature aliasing is desirable for generalization ( e.g. , Gunasekar et al. , 2017 ; Arora et al. , 2019 ) , implicit under-parameterization exhibits more pronounced aliasing than in supervised learning . This over-aliasing causes an otherwise expressive value network to implicitly behave as an under-parameterized network , often resulting in poor performance . Implicit under-parameterization becomes aggravated when the rate of data re-use is increased , restricting the sample efficiency of deep RL methods . In online RL , increasing the number of gradient steps in between data collection steps for data-efficient RL ( Fu et al. , 2019 ; Fedus et al. , 2020b ) causes the problem to emerge more frequently . In the extreme case when no additional data is collected , referred to as offline RL ( Lange et al. , 2012 ; Agarwal et al. , 2020 ; Levine et al. , 2020 ) , implicit under-parameterization manifests consistently , limiting the viability of offline methods . We demonstrate the existence of implicit under-parameterization in common value-based deep RL methods , including Q-learning ( Mnih et al. , 2015 ; Hessel et al. , 2018 ) and actor-critic ( Haarnoja et al. , 2018 ) , as well as neural fitted-Q iteration ( Riedmiller , 2005 ; Ernst et al. , 2005 ) . To isolate the issue , we study the effective rank of the features in the penultimate layer of the value network ( Section 3 ) . We observe that after an initial learning period , the rank of the learned features drops steeply . As the rank decreases , the ability of the features to fit subsequent target values and the optimal value function generally deteriorates and results in a sharp decrease in performance ( Section 3.1 ) . ∗Equal Contribution . Correspondence to Aviral Kumar < aviralk @ berkeley.edu > and Rishabh Agarwal < rishabhagarwal @ google.com > . To better understand the emergence of implicit under-parameterization , we formally study the dynamics of Q-learning under two distinct models of neural net behavior ( Section 4 ) : kernel regression ( Jacot et al. , 2018 ; Mobahi et al. , 2020 ) and deep linear networks ( Arora et al. , 2018 ) . We corroborate the existence of this phenomenon in both models , and show that implicit underparameterization stems from a pathological interaction between bootstrapping and the implicit regularization of gradient descent . Since value networks are trained to regress towards targets generated by a previous version of the same model , this leads to a sequence of value networks of potentially decreasing expressivity , which can result in degenerate behavior and a drop in performance . The main contribution of this work is the identification of implicit under-parameterization in deep RL methods that use bootstrapping . Empirically , we demonstrate a collapse in the rank of the learned features during training , and show it typically corresponds to a drop in performance in the Atari ( Bellemare et al. , 2013 ) and continuous control Gym ( Brockman et al. , 2016 ) benchmarks in both the offline and data-efficient online RL settings . We verify the emergence of this phenomenon theoretically and characterize settings where implicit under-parameterization can emerge . We then show that mitigating this phenomenon via a simple penalty on the singular values of the learned features improves performance of value-based RL methods in the offline setting on Atari . 2 PRELIMINARIES . The goal in RL is to maximize long-term discounted reward in a Markov decision process ( MDP ) , defined as a tuple ( S , A , R , P , γ ) ( Puterman , 1994 ) , with state space S , action space A , a reward function R ( s , a ) , transition dynamics P ( s′|s , a ) and a discount factor γ ∈ [ 0 , 1 ) . The Q-function Qπ ( s , a ) for a policy π ( a|s ) , is the expected long-term discounted reward obtained by executing action a at state s and following π ( a|s ) thereafter , Qπ ( s , a ) : = E [ ∑∞ t=0 γ tR ( st , at ) ] . Qπ ( s , a ) is the fixed point of the Bellman operator T π , ∀s , a : T πQ ( s , a ) : = R ( s , a ) + γEs′∼P ( ·|s , a ) , a′∼π ( ·|s′ ) [ Q ( s′ , a′ ) ] , which can be written in vector form as : Qπ = R + γPπQπ . The optimal Q-function , Q∗ ( s , a ) , is the fixed point of the Bellman optimality operator T : T Q ( s , a ) : = R ( s , a ) + γEs′∼P ( ·|s , a ) [ maxa′ Q ( s′ , a′ ) ] . Practical Q-learning methods ( e.g. , Mnih et al. , 2015 ; Hessel et al. , 2018 ; Haarnoja et al. , 2018 ) convert the Bellman equation into an bootstrapping-based objective for training a Q-network , Qθ , via gradient descent . This objective , known as mean-squared temporal difference ( TD ) error , is given by : L ( θ ) = ∑ s , a ( R ( s , a ) + γQ̄θ ( s ′ , a′ ) −Q ( s , a ) ) 2 , where Q̄θ is a delayed copy of the Q-function , typically referred to as the target network . These methods train Q-networks via gradient descent and slowly update the target network via Polyak averaging on its parameters . We refer the output of the penultimate layer of the deep Q-network as the learned feature matrix Φ , such that Q ( s , a ) = wTΦ ( s , a ) , where w ∈ Rd and Φ ∈ R|S||A|×d . Algorithm 1 Fitted Q-Iteration ( FQI ) 1 : Initialize Q-network Qθ , buffer µ . 2 : for fitting iteration k in { 1 , . . . , N } do 3 : Compute Qθ ( s , a ) and target values yk ( s , a ) = r + γmaxa′ Qk−1 ( s ′ , a′ ) on { ( s , a ) } ∼ µ for training 4 : Minimize TD error for Qθ via t = 1 , · · · , T gradient descent updates , minθ ( Qθ ( s , a ) − yk ) 2 5 : end for For simplicity of analysis , we abstract deep Q-learning methods into a generic fitted Q-iteration ( FQI ) framework ( Ernst et al. , 2005 ) . We refer to FQI with neural nets as neural FQI ( Riedmiller , 2005 ) . In the k-th fitting iteration , FQI trains the Q-function , Qk , to match the target values , yk = R+γPπQk−1 generated using previous Q-function , Qk−1 ( Algorithm 1 ) . Practical methods can be instantiated as variants of FQI , with different target update styles , different optimizers , etc . 3 IMPLICIT UNDER-PARAMETERIZATION IN DEEP Q-LEARNING . In this section , we empirically demonstrate the existence of implicit under-parameterization in deep RL methods that use bootstrapping . We characterize implicit under-parameterization in terms of the effective rank ( Yang et al. , 2019 ) of the features learned by a Q-network . The effective rank of the feature matrix Φ , for a threshold δ ( we choose δ = 0.01 ) , denoted as srankδ ( Φ ) , is given by srankδ ( Φ ) = min { k : ∑k i=1 σi ( Φ ) ∑d i=1 σi ( Φ ) ≥ 1− δ } , where { σi ( Φ ) } are the singular values of Φ in decreasing order , i.e. , σ1 ≥ · · · ≥ σd ≥ 0 . Intuitively , srankδ ( Φ ) represents the number of “ effective ” unique components of the feature matrix Φ that form the basis for linearly approximating the Qvalues . When the network maps different states to orthogonal feature vectors , then srankδ ( Φ ) has high values close to d. When the network “ aliases ” state-action pairs by mapping them to a smaller subspace , Φ has only a few active singular directions , and srankδ ( Φ ) takes on a small value . Definition 1 . Implicit under-parameterization refers to a reduction in the effective rank of the features , srankδ ( Φ ) , that occurs implicitly as a by-product of learning deep neural network Q-functions . While rank decrease also occurs in supervised learning , it is usually beneficial for obtaining generalizable solutions ( Gunasekar et al. , 2017 ; Arora et al. , 2019 ) . However , we will show that in deep Q-learning , an interaction between bootstrapping and gradient descent can lead to more aggressive rank reduction ( or rank collapse ) , which can hurt performance . Experimental setup . To study implicit under-parameterization empirically , we compute srankδ ( Φ ) on a minibatch of state-action pairs sampled i.i.d . from the training data ( i.e. , the dataset in the offline setting , and the replay buffer in the online setting ) . We investigate offline and online RL settings on benchmarks including Atari games ( Bellemare et al. , 2013 ) and Gym environments ( Brockman et al. , 2016 ) . We also utilize gridworlds described by Fu et al . ( 2019 ) to compare the learned Q-function against the oracle solution computed using tabular value iteration . We evaluate DQN ( Mnih et al. , 2015 ) on gridworld and Atari and SAC ( Haarnoja et al. , 2018 ) on Gym domains . Data-efficient offline RL . In offline RL , our goal is to learn effective policies by performing Qlearning on a fixed dataset of transitions . We investigate the presence of rank collapse when deep Q-learning is used with broad state coverage offline datasets from Agarwal et al . ( 2020 ) . In the top row of Figure 2 , we show that after an initial learning period , srankδ ( Φ ) decreases in all domains ( Atari , Gym and the gridworld ) . The final value of srankδ ( Φ ) is often quite small – e.g. , in Atari , only 20-100 singular components are active for 512-dimensional features , implying significant underutilization of network capacity . Since under-parameterization is implicitly induced by the learning process , even high-capacity value networks behave as low-capacity networks as more training is performed with a bootstrapped objective ( e.g. , mean squared TD error ) . On the gridworld environment , regressing toQ∗ using supervised regression results in a much higher srankδ ( Φ ) ( black dashed line in Figure 2 ( left ) ) than when using neural FQI . On Atari , even when a 4x larger offline dataset with much broader coverage is used ( blue line in Figure 2 ) , rank collapse still persists , indicating that implicit under-parameterization is not due to limited offline dataset size . Figure 2 ( 2nd row ) illustrates that policy performance generally deteriorates as srank ( Φ ) drops , and eventually collapses simultaneously with the rank collapse . While we do not claim that implicit under-parameterization is the only issue in deep Q-learning , the results in Figure 2 show that the emergence of this under-parameterization is strongly associated with poor performance . To prevent confounding from the distribution mismatch between the learned policy and the offline dataset , which often affects the performance of Q-learning methods , we also study CQL ( Kumar et al. , 2020b ) , an offline RL algorithm designed to handle distribution mismatch . We find a similar degradation in effective rank and performance for CQL ( Figure A.3 ) , implying that underparameterization does not stem from distribution mismatch and arises even when the resulting policy is within the behavior distribution ( though the policy may not be exactly pick actions observed in the dataset ) . We provide more evidence in Atari and Gym domains in Appendix A.1 . Data-efficient online RL . Deep Q-learning methods typically use very few gradient updates ( n ) per environment step ( e.g. , DQN takes 1 update every 4 steps on Atari , n = 0.25 ) . Improving the sample efficiency of these methods requires increasing n to utilize the replay data more effectively . However , we find that using larger values of n results in higher levels of rank collapse as well as performance degradation . In the top row of Figure 3 , we show that larger values of n lead to a more aggressive drop in srankδ ( Φ ) ( red vs. blue/orange lines ) , and that rank continues to decrease with more training . Furthermore , the bottom row illustrates that larger values of n result in worse performance , corroborating Fu et al . ( 2019 ) ; Fedus et al . ( 2020b ) . We find similar results with the Rainbow algorithm ( Hessel et al. , 2018 ) ( Appendix A.2 ) . As in the offline setting , directly regressing to Q∗ via supervised learning does not cause rank collapse ( black line in Figure 3 ) . | This paper identifies a type of implicit under-parameterization phenomenon in deep RL methods that use bootstrapping. It is found that after an initial learning period, the effective rank of the feature matrix keeps decreasing. This implies that the representational power of the network is not fully utilized. The authors call it a type of implicit under-parameterization. Moreover, the emergence of this under-parameterization strongly correlates with the poor performance. Some preliminary theoretical analyses are provided to explain this phenomenon. | SP:22eafda74c0a1a8184893a5ed47a36cfab1c361e |
Implicit Under-Parameterization Inhibits Data-Efficient Deep Reinforcement Learning | 1 INTRODUCTION . Many pervasive deep reinforcement learning ( RL ) algorithms estimate value functions using bootstrapping , that is , by sequentially fitting value functions to target value estimates generated from the value function learned in the previous iteration . Despite high-profile achievements ( Silver et al. , 2017 ) , these algorithms are highly unreliable due to poorly understood optimization issues . Although a number of hypotheses have been proposed to explain these issues ( Achiam et al. , 2019 ; Bengio et al. , 2020 ; Fu et al. , 2019 ; Igl et al. , 2020 ; Liu et al. , 2018 ; Kumar et al. , 2020a ) , a complete understanding remains elusive . We identify an “ implicit under-parameterization ” phenomenon that emerges when value networks are trained using gradient descent combined with bootstrapping . This phenomenon manifests as an excessive aliasing of features learned by the value network across states , which is exacerbated with more gradient updates . While the supervised deep learning literature suggests that some feature aliasing is desirable for generalization ( e.g. , Gunasekar et al. , 2017 ; Arora et al. , 2019 ) , implicit under-parameterization exhibits more pronounced aliasing than in supervised learning . This over-aliasing causes an otherwise expressive value network to implicitly behave as an under-parameterized network , often resulting in poor performance . Implicit under-parameterization becomes aggravated when the rate of data re-use is increased , restricting the sample efficiency of deep RL methods . In online RL , increasing the number of gradient steps in between data collection steps for data-efficient RL ( Fu et al. , 2019 ; Fedus et al. , 2020b ) causes the problem to emerge more frequently . In the extreme case when no additional data is collected , referred to as offline RL ( Lange et al. , 2012 ; Agarwal et al. , 2020 ; Levine et al. , 2020 ) , implicit under-parameterization manifests consistently , limiting the viability of offline methods . We demonstrate the existence of implicit under-parameterization in common value-based deep RL methods , including Q-learning ( Mnih et al. , 2015 ; Hessel et al. , 2018 ) and actor-critic ( Haarnoja et al. , 2018 ) , as well as neural fitted-Q iteration ( Riedmiller , 2005 ; Ernst et al. , 2005 ) . To isolate the issue , we study the effective rank of the features in the penultimate layer of the value network ( Section 3 ) . We observe that after an initial learning period , the rank of the learned features drops steeply . As the rank decreases , the ability of the features to fit subsequent target values and the optimal value function generally deteriorates and results in a sharp decrease in performance ( Section 3.1 ) . ∗Equal Contribution . Correspondence to Aviral Kumar < aviralk @ berkeley.edu > and Rishabh Agarwal < rishabhagarwal @ google.com > . To better understand the emergence of implicit under-parameterization , we formally study the dynamics of Q-learning under two distinct models of neural net behavior ( Section 4 ) : kernel regression ( Jacot et al. , 2018 ; Mobahi et al. , 2020 ) and deep linear networks ( Arora et al. , 2018 ) . We corroborate the existence of this phenomenon in both models , and show that implicit underparameterization stems from a pathological interaction between bootstrapping and the implicit regularization of gradient descent . Since value networks are trained to regress towards targets generated by a previous version of the same model , this leads to a sequence of value networks of potentially decreasing expressivity , which can result in degenerate behavior and a drop in performance . The main contribution of this work is the identification of implicit under-parameterization in deep RL methods that use bootstrapping . Empirically , we demonstrate a collapse in the rank of the learned features during training , and show it typically corresponds to a drop in performance in the Atari ( Bellemare et al. , 2013 ) and continuous control Gym ( Brockman et al. , 2016 ) benchmarks in both the offline and data-efficient online RL settings . We verify the emergence of this phenomenon theoretically and characterize settings where implicit under-parameterization can emerge . We then show that mitigating this phenomenon via a simple penalty on the singular values of the learned features improves performance of value-based RL methods in the offline setting on Atari . 2 PRELIMINARIES . The goal in RL is to maximize long-term discounted reward in a Markov decision process ( MDP ) , defined as a tuple ( S , A , R , P , γ ) ( Puterman , 1994 ) , with state space S , action space A , a reward function R ( s , a ) , transition dynamics P ( s′|s , a ) and a discount factor γ ∈ [ 0 , 1 ) . The Q-function Qπ ( s , a ) for a policy π ( a|s ) , is the expected long-term discounted reward obtained by executing action a at state s and following π ( a|s ) thereafter , Qπ ( s , a ) : = E [ ∑∞ t=0 γ tR ( st , at ) ] . Qπ ( s , a ) is the fixed point of the Bellman operator T π , ∀s , a : T πQ ( s , a ) : = R ( s , a ) + γEs′∼P ( ·|s , a ) , a′∼π ( ·|s′ ) [ Q ( s′ , a′ ) ] , which can be written in vector form as : Qπ = R + γPπQπ . The optimal Q-function , Q∗ ( s , a ) , is the fixed point of the Bellman optimality operator T : T Q ( s , a ) : = R ( s , a ) + γEs′∼P ( ·|s , a ) [ maxa′ Q ( s′ , a′ ) ] . Practical Q-learning methods ( e.g. , Mnih et al. , 2015 ; Hessel et al. , 2018 ; Haarnoja et al. , 2018 ) convert the Bellman equation into an bootstrapping-based objective for training a Q-network , Qθ , via gradient descent . This objective , known as mean-squared temporal difference ( TD ) error , is given by : L ( θ ) = ∑ s , a ( R ( s , a ) + γQ̄θ ( s ′ , a′ ) −Q ( s , a ) ) 2 , where Q̄θ is a delayed copy of the Q-function , typically referred to as the target network . These methods train Q-networks via gradient descent and slowly update the target network via Polyak averaging on its parameters . We refer the output of the penultimate layer of the deep Q-network as the learned feature matrix Φ , such that Q ( s , a ) = wTΦ ( s , a ) , where w ∈ Rd and Φ ∈ R|S||A|×d . Algorithm 1 Fitted Q-Iteration ( FQI ) 1 : Initialize Q-network Qθ , buffer µ . 2 : for fitting iteration k in { 1 , . . . , N } do 3 : Compute Qθ ( s , a ) and target values yk ( s , a ) = r + γmaxa′ Qk−1 ( s ′ , a′ ) on { ( s , a ) } ∼ µ for training 4 : Minimize TD error for Qθ via t = 1 , · · · , T gradient descent updates , minθ ( Qθ ( s , a ) − yk ) 2 5 : end for For simplicity of analysis , we abstract deep Q-learning methods into a generic fitted Q-iteration ( FQI ) framework ( Ernst et al. , 2005 ) . We refer to FQI with neural nets as neural FQI ( Riedmiller , 2005 ) . In the k-th fitting iteration , FQI trains the Q-function , Qk , to match the target values , yk = R+γPπQk−1 generated using previous Q-function , Qk−1 ( Algorithm 1 ) . Practical methods can be instantiated as variants of FQI , with different target update styles , different optimizers , etc . 3 IMPLICIT UNDER-PARAMETERIZATION IN DEEP Q-LEARNING . In this section , we empirically demonstrate the existence of implicit under-parameterization in deep RL methods that use bootstrapping . We characterize implicit under-parameterization in terms of the effective rank ( Yang et al. , 2019 ) of the features learned by a Q-network . The effective rank of the feature matrix Φ , for a threshold δ ( we choose δ = 0.01 ) , denoted as srankδ ( Φ ) , is given by srankδ ( Φ ) = min { k : ∑k i=1 σi ( Φ ) ∑d i=1 σi ( Φ ) ≥ 1− δ } , where { σi ( Φ ) } are the singular values of Φ in decreasing order , i.e. , σ1 ≥ · · · ≥ σd ≥ 0 . Intuitively , srankδ ( Φ ) represents the number of “ effective ” unique components of the feature matrix Φ that form the basis for linearly approximating the Qvalues . When the network maps different states to orthogonal feature vectors , then srankδ ( Φ ) has high values close to d. When the network “ aliases ” state-action pairs by mapping them to a smaller subspace , Φ has only a few active singular directions , and srankδ ( Φ ) takes on a small value . Definition 1 . Implicit under-parameterization refers to a reduction in the effective rank of the features , srankδ ( Φ ) , that occurs implicitly as a by-product of learning deep neural network Q-functions . While rank decrease also occurs in supervised learning , it is usually beneficial for obtaining generalizable solutions ( Gunasekar et al. , 2017 ; Arora et al. , 2019 ) . However , we will show that in deep Q-learning , an interaction between bootstrapping and gradient descent can lead to more aggressive rank reduction ( or rank collapse ) , which can hurt performance . Experimental setup . To study implicit under-parameterization empirically , we compute srankδ ( Φ ) on a minibatch of state-action pairs sampled i.i.d . from the training data ( i.e. , the dataset in the offline setting , and the replay buffer in the online setting ) . We investigate offline and online RL settings on benchmarks including Atari games ( Bellemare et al. , 2013 ) and Gym environments ( Brockman et al. , 2016 ) . We also utilize gridworlds described by Fu et al . ( 2019 ) to compare the learned Q-function against the oracle solution computed using tabular value iteration . We evaluate DQN ( Mnih et al. , 2015 ) on gridworld and Atari and SAC ( Haarnoja et al. , 2018 ) on Gym domains . Data-efficient offline RL . In offline RL , our goal is to learn effective policies by performing Qlearning on a fixed dataset of transitions . We investigate the presence of rank collapse when deep Q-learning is used with broad state coverage offline datasets from Agarwal et al . ( 2020 ) . In the top row of Figure 2 , we show that after an initial learning period , srankδ ( Φ ) decreases in all domains ( Atari , Gym and the gridworld ) . The final value of srankδ ( Φ ) is often quite small – e.g. , in Atari , only 20-100 singular components are active for 512-dimensional features , implying significant underutilization of network capacity . Since under-parameterization is implicitly induced by the learning process , even high-capacity value networks behave as low-capacity networks as more training is performed with a bootstrapped objective ( e.g. , mean squared TD error ) . On the gridworld environment , regressing toQ∗ using supervised regression results in a much higher srankδ ( Φ ) ( black dashed line in Figure 2 ( left ) ) than when using neural FQI . On Atari , even when a 4x larger offline dataset with much broader coverage is used ( blue line in Figure 2 ) , rank collapse still persists , indicating that implicit under-parameterization is not due to limited offline dataset size . Figure 2 ( 2nd row ) illustrates that policy performance generally deteriorates as srank ( Φ ) drops , and eventually collapses simultaneously with the rank collapse . While we do not claim that implicit under-parameterization is the only issue in deep Q-learning , the results in Figure 2 show that the emergence of this under-parameterization is strongly associated with poor performance . To prevent confounding from the distribution mismatch between the learned policy and the offline dataset , which often affects the performance of Q-learning methods , we also study CQL ( Kumar et al. , 2020b ) , an offline RL algorithm designed to handle distribution mismatch . We find a similar degradation in effective rank and performance for CQL ( Figure A.3 ) , implying that underparameterization does not stem from distribution mismatch and arises even when the resulting policy is within the behavior distribution ( though the policy may not be exactly pick actions observed in the dataset ) . We provide more evidence in Atari and Gym domains in Appendix A.1 . Data-efficient online RL . Deep Q-learning methods typically use very few gradient updates ( n ) per environment step ( e.g. , DQN takes 1 update every 4 steps on Atari , n = 0.25 ) . Improving the sample efficiency of these methods requires increasing n to utilize the replay data more effectively . However , we find that using larger values of n results in higher levels of rank collapse as well as performance degradation . In the top row of Figure 3 , we show that larger values of n lead to a more aggressive drop in srankδ ( Φ ) ( red vs. blue/orange lines ) , and that rank continues to decrease with more training . Furthermore , the bottom row illustrates that larger values of n result in worse performance , corroborating Fu et al . ( 2019 ) ; Fedus et al . ( 2020b ) . We find similar results with the Rainbow algorithm ( Hessel et al. , 2018 ) ( Appendix A.2 ) . As in the offline setting , directly regressing to Q∗ via supervised learning does not cause rank collapse ( black line in Figure 3 ) . | This paper discusses a phenomenon wherein the feature vectors of the learned value function in reinforcement learning (RL) lose their diversity as training progresses. The paper analyzes the rank of the final hidden layer in the model parameterizing the value function and shows experimentally that for offline-RL and online-RL setups on Atari and Gym benchmarks, this rank collapse occurs with a drop in the average return. The paper further develops two models for understanding this phenomenon, (i) where the value function is modeled using the neural tangent kernel, and (ii) where the value function is modeled using a deep linear network. The paper argues that bootstrapping results in reduction of the rank of the feature matrix as training progresses for these models. A regularization term that equalizes the singular values of the feature matrix is used to mitigate this rank collapse and experimental results on Atari benchmarks are shown with this regularizer. | SP:22eafda74c0a1a8184893a5ed47a36cfab1c361e |
Certified Watermarks for Neural Networks | 1 INTRODUCTION . With the rise of deep learning , there has been an extraordinary growth in the use of neural networks in various computer vision and natural language understanding tasks . In parallel with this growth in applications , there has been exponential growth in terms of the cost required to develop and train state-of-the-art models ( Amodei & Hernandez , 2018 ) . For example , the latest GPT-3 generative language model ( Brown et al. , 2020 ) is estimated to cost around 4.6 million dollars ( Li , 2020 ) in TPU cost alone . This does not include the cost of acquiring and labeling data or paying engineers , which may be even greater . With up-front investment costs growing , if access to models is offered as a service , the incentive is strong for an adversary to try to steal the model , sidestepping the costly training process . Incentives are equally strong for companies to protect such a significant investment . Watermarking techniques have long been used to protect the copyright of digital multimedia ( Hartung & Kutter , 1999 ) . The copyright holder hides some imperceptible information in images , videos , or sound . When they suspect a copyright violation , the source and destination of the multimedia can be identified , enabling appropriate follow-up actions ( Hartung & Kutter , 1999 ) . Recently , watermarking has been extended to deter the theft of machine learning models ( Uchida et al. , 2017 ; Zhang et al. , 2018 ) . The model owner either imprints a predetermined signature into the parameters of the model ( Uchida et al. , 2017 ) or trains the model to give predetermined predictions ( Zhang et al. , 2018 ) for a certain trigger set ( e.g . images superimposed with a predetermined pattern ) . A strong watermark must also resist removal by a motivated adversary . Even though the watermarks in ( Uchida et al. , 2017 ; Zhang et al. , 2018 ; Adi et al. , 2018 ) initially claimed some resistance to various watermark removal attacks , it was later shown in ( Shafieinejad et al. , 2019 ; Aiken et al. , 2020 ) that these watermarks can in fact be removed with more sophisticated methods , using a combination of distillation , parameter regularization , and finetuning . To avoid the cat-and-mouse game of everstronger watermark techniques that are only later defeated by new adversaries , we propose the first certifiable watermark : unless the attacker changes the model parameters by more than a certain ` 2 distance , the watermark is guaranteed to remain . To the best of our knowledge , our proposed watermarking technique is the first to provide a certificate against an ` 2 adversary . Although the bound obtained by the certificate is relatively small , we see it as a first step towards developing watermarks with provable guarantees . Additionally we empirically find that our certified watermark is more resistant to previously proposed watermark removal attacks ( Shafieinejad et al. , 2019 ; Aiken et al. , 2020 ) compared to its counterparts – it is thus valuable even when a certificate is not required . 2 RELATED WORK . Watermark techniques ( Uchida et al. , 2017 ) proposed the first method of watermarking neural networks : they embed the watermark into the parameters of the network during training through regularization . However , the proposed approach requires explicit inspection of the parameters for ownership verification . Later , ( Zhang et al. , 2018 ; Rouhani et al. , 2018 ) improved upon this approach , such that the watermark can be verified through API-only access to the model . Specifically , they embed the watermark by forcing the network to deliberately misclassify certain “ backdoor ” images . The ownership can then be verified through the adversary ’ s API by testing its predictions on these images . In light of later and stronger watermark removal techniques ( Aiken et al. , 2020 ; Wang & Kerschbaum , 2019 ; Shafieinejad et al. , 2019 ) , several papers have proposed methods to improve neural network watermarking . ( Wang & Kerschbaum , 2019 ) propose an improved white-box watermark that avoids the detection and removal techniques from ( Wang & Kerschbaum , 2019 ) . ( Li et al. , 2019 ) propose using values outside of the range of representable images as the trigger set pattern . They show that their watermark is quite resistant to a finetuning attack . However , since their trigger set does not consist of valid images , their method does not allow for black-box ownership verification against a realistic API that only accepts actual images , while our proposed watermark is effective even in the black-box setting . ( Szyller et al. , 2019 ) proposed watermarking methods for models housed behind an API . Unlike our method , their method does not embed a watermark into the model weights itself , and so can not work in scenarios where the weights of the model may be stolen directly , e.g . when the model is housed on mobile devices . Finally , ( Lukas et al. , 2019 ) propose using a particular type of adversarial example ( “ conferrable ” adversarial examples ) to construct the trigger set . This makes the watermark scheme resistant even to the strongest watermark removal attack : ground-up distillation which , starting from a random initialization , trains a new network to imitate the stolen model ( Shafieinejad et al. , 2019 ) . However , for their approach to be effective , they need to train a large number of models ( 72 ) on a large amount of data ( e.g . requiring CINIC as opposed to CIFAR-10 ) . While our approach does not achieve this impressive resistance to ground-up distillation , it is also much less costly . Watermark removal attacks However , one concern for all these watermark methods is that a sufficiently motivated adversary may attempt to remove the watermark . Even though ( Zhang et al. , 2018 ; Rouhani et al. , 2018 ; Adi et al. , 2018 ; Uchida et al. , 2017 ) all claim that their methods are resistant to watermark removal attacks , such as finetuning , other authors ( Aiken et al. , 2020 ; Shafieinejad et al. , 2019 ) later show that by adding regularization , finetuning and pruning , their watermarks can be removed without compromising the prediction accuracy of the stolen model . Wang & Kerschbaum ( 2019 ) shows that the watermark signals embedded by ( Uchida et al. , 2017 ) can be easily detected and overwritten ; ( Chen et al. , 2019 ) shows that by leveraging both labeled and unlabeled data , the watermark can be more efficiently removed without compromising the accuracy . Even if the watermark appears empirically resistant to currently known attacks , stronger attacks may eventually come along , prompting better watermark methods , and so on . To avoid this cycle , we propose the first certifiably unremovable watermark : given that parameters are not modified more than a given threshold ` 2 distance , the watermark will be preserved . Certified defenses for adversarial robustness Our work is inspired by recent work on certified adversarial robustness , ( Cohen et al. , 2019 ; Chiang et al. , 2019 ; Wong & Kolter , 2017 ; Mirman et al. , 2018 ; Weng et al. , 2018 ; Zhang et al. , 2019 ; Eykholt et al. , 2017 ; Levine & Feizi , 2019 ) . Certified adversarial robustness involves not only training the model to be robust to adversarial attacks under particular threat models , but also proving that no possible attacks under a particular constraint could possibly succeed . Specifically , in this paper , we used the randomized smoothing technique first developed by ( Cohen et al. , 2019 ; Lecuyer et al. , 2019 ) for classifiers , and later extended by ( Chiang et al. , 2020 ) to deal with regression models . However , as opposed to defending against an ` 2-bounded threat models in the image space , we are now defending against an ` 2-bounded adversary in the parameter space . Surprisingly , even though the certificate holds only when randomized smoothing is applied , empirically , when our watermark is evaluated in a black-box setting on the non-smoothed model , it also exhibits stronger persistence compared to previous methods . 3 METHODS . Below , we introduce the formal model for neural network watermarking , and the watermark removal adversaries that we are concerned with . Then , we describe some background related to randomized smoothing , and show that by using randomized smoothing we can create a watermark that provably can not be removed by an ` 2 adversary . 3.1 WATERMARKING . White box vs black box We first introduce the distinction between black box and white box settings from the perspective of the owner of the model . In a white box setting , parameters are known . In a black box setting , the model parameters are hidden behind an API . We consider cases where the owner may have either black box or white box access to verify their watermarks . Black-box watermarking In backdoor-based watermarking , the owner employs a “ trigger set ” of specially chosen images that has disjoint distribution compared to the original dataset . If another model makes correct predictions on this trigger set , then this is evidence that the model has been stolen . A backdoor-based watermark can be verified in a black-box setting . The trigger set may be chosen in various ways . ( Zhang et al. , 2018 ) considered three different methods of generating the trigger set : embedded content , pre-specified noise , and abstract images . Embedded content methods embed text over existing datasets and assigns all examples with the text overlay the same fixed label . Pre-specified noise overlays Gaussian noise on top of existing dataset and again assigns the examples with the same fixed label . For abstract images , a set of images from a different domain is additionally used to train the network . For example , MNIST images could form the trigger set for a CIFAR-10 network , so if an adversary ’ s model performs exceedingly well on MNIST images , then the adversary must have used the stolen model . Examples of trigger set images are presented in Figure 1 . Our proposed method builds upon such backdoor-based watermarks , so our marked model can also naturally be verified in the black-box manner even though our certificate is only valid in the whitebox setting described in the next section . White-box watermarking White-box watermarks in general embed information directly into the parameters . Our proposed watermark does not directly embed information into parameters , but parameter access is required for verification , which makes our proposed method a white-box watermark . The rationale for using such a white-box watermark is detailed below . In the black-box setting , to verify model ownership , we generally check that the trigger set accuracy function from parameters to accuracy f ( θ ) is larger than a threshold ( Shafieinejad et al. , 2019 ) . The trigger set accuracy function takes in model parameter as input and outputs the accuracy on the trigger set . Since directly certifying the function is hard , we first convert the trigger set accuracy function f ( θ ) to its smoothed counterpart h ( θ ) , and then check that h ( θ ) is greater than the threshold t for ownership verification . Practically , one converts the base function to the smoothed function by injecting random noise into the parameters during multiple trigger set evaluations , and then taking the median trigger set accuracy as ĥ . Note that this verification process requires access to parameters , so ownership verification using ĥ is considered a white-box watermark . Watermark Removal Threat Model In our experiments , we consider three different threat models to the watermark verification : 1 ) distillation , 2 ) finetuning , and 3 ) an ` 2 adversary . In the distillation threat model ( 1 ) , we assume that the adversary initializes their model with our original model , and then trains their model with distillation using unlabeled data that comes from the same distribution . In other words , the adversary uses our original model to label the unlabeled data for finetuning . ( Shafieinejad et al. , 2019 ) propose first adding some regularization during the initial part of the attack to remove the watermark , and then later turning off the regularization to fully recover the test accuracy of the model . We experiment with this distillation attack both with and without regularization . In the finetuning threat model ( 2 ) , the adversary has its own labeled dataset from the original datagenerating distribution . This adversary is strictly stronger compared to the distillation threat model . In our experiments , we make the conservative assumption that the adversary has exactly the same amount of data as the model owner . The ` 2 adversary ( 3 ) obtains the original model parameters , and then is allowed to move the parameters at most a certain ` 2 distance to maximally decrease trigger set accuracy . Even though the ` 2 adversary is not a completely realistic threat model , we argue similarly to the adversarial robustness literature ( Carlini et al. , 2019 ) that being able to defend against a small ` 2 adversary is a requirement for defending against more sophisticated attacks . In our experiments , we empirically find that a large shift of parameters in ` 2 distance is indicative of the strength of the adversary . For example , training the models for more time , with a larger learning rate , or using ground truth labels as opposed to distillation are all stronger attacks , and as expected , they both remove the watermark faster and move the parameters by a greater ` 2 distance ( Table 2 ) . Additionally , given a local Lipschitz constant of L and a learning rate of r , the number of steps required to move outside of the - ` 2 ball can be upper bounded by / ( rL ) , and we think the number of steps is a good proxy to the computational budget of the adversary . | The proposed method exploits the randomized smoothing techniques for a certified watermark of neural networks. The idea itself is novel and interesting. To the best of the reviewer's knowledge, no one has ever used randomized smoothing for neural network watermark. Different from the defense against adversarial example, in the case of watermark detection, not only the detection accuracy but false detection of non-watermarked models should be considered. If my understanding is correct, the proposed method does not give certification on the false detection. Since the proposed method is quite close to adversarial training, one concern is that models trained with adversarial training might be falsely detected as the watermarked model. | SP:00a3a2ca6324e5f2db45bbad11bf97491037c26c |
Certified Watermarks for Neural Networks | 1 INTRODUCTION . With the rise of deep learning , there has been an extraordinary growth in the use of neural networks in various computer vision and natural language understanding tasks . In parallel with this growth in applications , there has been exponential growth in terms of the cost required to develop and train state-of-the-art models ( Amodei & Hernandez , 2018 ) . For example , the latest GPT-3 generative language model ( Brown et al. , 2020 ) is estimated to cost around 4.6 million dollars ( Li , 2020 ) in TPU cost alone . This does not include the cost of acquiring and labeling data or paying engineers , which may be even greater . With up-front investment costs growing , if access to models is offered as a service , the incentive is strong for an adversary to try to steal the model , sidestepping the costly training process . Incentives are equally strong for companies to protect such a significant investment . Watermarking techniques have long been used to protect the copyright of digital multimedia ( Hartung & Kutter , 1999 ) . The copyright holder hides some imperceptible information in images , videos , or sound . When they suspect a copyright violation , the source and destination of the multimedia can be identified , enabling appropriate follow-up actions ( Hartung & Kutter , 1999 ) . Recently , watermarking has been extended to deter the theft of machine learning models ( Uchida et al. , 2017 ; Zhang et al. , 2018 ) . The model owner either imprints a predetermined signature into the parameters of the model ( Uchida et al. , 2017 ) or trains the model to give predetermined predictions ( Zhang et al. , 2018 ) for a certain trigger set ( e.g . images superimposed with a predetermined pattern ) . A strong watermark must also resist removal by a motivated adversary . Even though the watermarks in ( Uchida et al. , 2017 ; Zhang et al. , 2018 ; Adi et al. , 2018 ) initially claimed some resistance to various watermark removal attacks , it was later shown in ( Shafieinejad et al. , 2019 ; Aiken et al. , 2020 ) that these watermarks can in fact be removed with more sophisticated methods , using a combination of distillation , parameter regularization , and finetuning . To avoid the cat-and-mouse game of everstronger watermark techniques that are only later defeated by new adversaries , we propose the first certifiable watermark : unless the attacker changes the model parameters by more than a certain ` 2 distance , the watermark is guaranteed to remain . To the best of our knowledge , our proposed watermarking technique is the first to provide a certificate against an ` 2 adversary . Although the bound obtained by the certificate is relatively small , we see it as a first step towards developing watermarks with provable guarantees . Additionally we empirically find that our certified watermark is more resistant to previously proposed watermark removal attacks ( Shafieinejad et al. , 2019 ; Aiken et al. , 2020 ) compared to its counterparts – it is thus valuable even when a certificate is not required . 2 RELATED WORK . Watermark techniques ( Uchida et al. , 2017 ) proposed the first method of watermarking neural networks : they embed the watermark into the parameters of the network during training through regularization . However , the proposed approach requires explicit inspection of the parameters for ownership verification . Later , ( Zhang et al. , 2018 ; Rouhani et al. , 2018 ) improved upon this approach , such that the watermark can be verified through API-only access to the model . Specifically , they embed the watermark by forcing the network to deliberately misclassify certain “ backdoor ” images . The ownership can then be verified through the adversary ’ s API by testing its predictions on these images . In light of later and stronger watermark removal techniques ( Aiken et al. , 2020 ; Wang & Kerschbaum , 2019 ; Shafieinejad et al. , 2019 ) , several papers have proposed methods to improve neural network watermarking . ( Wang & Kerschbaum , 2019 ) propose an improved white-box watermark that avoids the detection and removal techniques from ( Wang & Kerschbaum , 2019 ) . ( Li et al. , 2019 ) propose using values outside of the range of representable images as the trigger set pattern . They show that their watermark is quite resistant to a finetuning attack . However , since their trigger set does not consist of valid images , their method does not allow for black-box ownership verification against a realistic API that only accepts actual images , while our proposed watermark is effective even in the black-box setting . ( Szyller et al. , 2019 ) proposed watermarking methods for models housed behind an API . Unlike our method , their method does not embed a watermark into the model weights itself , and so can not work in scenarios where the weights of the model may be stolen directly , e.g . when the model is housed on mobile devices . Finally , ( Lukas et al. , 2019 ) propose using a particular type of adversarial example ( “ conferrable ” adversarial examples ) to construct the trigger set . This makes the watermark scheme resistant even to the strongest watermark removal attack : ground-up distillation which , starting from a random initialization , trains a new network to imitate the stolen model ( Shafieinejad et al. , 2019 ) . However , for their approach to be effective , they need to train a large number of models ( 72 ) on a large amount of data ( e.g . requiring CINIC as opposed to CIFAR-10 ) . While our approach does not achieve this impressive resistance to ground-up distillation , it is also much less costly . Watermark removal attacks However , one concern for all these watermark methods is that a sufficiently motivated adversary may attempt to remove the watermark . Even though ( Zhang et al. , 2018 ; Rouhani et al. , 2018 ; Adi et al. , 2018 ; Uchida et al. , 2017 ) all claim that their methods are resistant to watermark removal attacks , such as finetuning , other authors ( Aiken et al. , 2020 ; Shafieinejad et al. , 2019 ) later show that by adding regularization , finetuning and pruning , their watermarks can be removed without compromising the prediction accuracy of the stolen model . Wang & Kerschbaum ( 2019 ) shows that the watermark signals embedded by ( Uchida et al. , 2017 ) can be easily detected and overwritten ; ( Chen et al. , 2019 ) shows that by leveraging both labeled and unlabeled data , the watermark can be more efficiently removed without compromising the accuracy . Even if the watermark appears empirically resistant to currently known attacks , stronger attacks may eventually come along , prompting better watermark methods , and so on . To avoid this cycle , we propose the first certifiably unremovable watermark : given that parameters are not modified more than a given threshold ` 2 distance , the watermark will be preserved . Certified defenses for adversarial robustness Our work is inspired by recent work on certified adversarial robustness , ( Cohen et al. , 2019 ; Chiang et al. , 2019 ; Wong & Kolter , 2017 ; Mirman et al. , 2018 ; Weng et al. , 2018 ; Zhang et al. , 2019 ; Eykholt et al. , 2017 ; Levine & Feizi , 2019 ) . Certified adversarial robustness involves not only training the model to be robust to adversarial attacks under particular threat models , but also proving that no possible attacks under a particular constraint could possibly succeed . Specifically , in this paper , we used the randomized smoothing technique first developed by ( Cohen et al. , 2019 ; Lecuyer et al. , 2019 ) for classifiers , and later extended by ( Chiang et al. , 2020 ) to deal with regression models . However , as opposed to defending against an ` 2-bounded threat models in the image space , we are now defending against an ` 2-bounded adversary in the parameter space . Surprisingly , even though the certificate holds only when randomized smoothing is applied , empirically , when our watermark is evaluated in a black-box setting on the non-smoothed model , it also exhibits stronger persistence compared to previous methods . 3 METHODS . Below , we introduce the formal model for neural network watermarking , and the watermark removal adversaries that we are concerned with . Then , we describe some background related to randomized smoothing , and show that by using randomized smoothing we can create a watermark that provably can not be removed by an ` 2 adversary . 3.1 WATERMARKING . White box vs black box We first introduce the distinction between black box and white box settings from the perspective of the owner of the model . In a white box setting , parameters are known . In a black box setting , the model parameters are hidden behind an API . We consider cases where the owner may have either black box or white box access to verify their watermarks . Black-box watermarking In backdoor-based watermarking , the owner employs a “ trigger set ” of specially chosen images that has disjoint distribution compared to the original dataset . If another model makes correct predictions on this trigger set , then this is evidence that the model has been stolen . A backdoor-based watermark can be verified in a black-box setting . The trigger set may be chosen in various ways . ( Zhang et al. , 2018 ) considered three different methods of generating the trigger set : embedded content , pre-specified noise , and abstract images . Embedded content methods embed text over existing datasets and assigns all examples with the text overlay the same fixed label . Pre-specified noise overlays Gaussian noise on top of existing dataset and again assigns the examples with the same fixed label . For abstract images , a set of images from a different domain is additionally used to train the network . For example , MNIST images could form the trigger set for a CIFAR-10 network , so if an adversary ’ s model performs exceedingly well on MNIST images , then the adversary must have used the stolen model . Examples of trigger set images are presented in Figure 1 . Our proposed method builds upon such backdoor-based watermarks , so our marked model can also naturally be verified in the black-box manner even though our certificate is only valid in the whitebox setting described in the next section . White-box watermarking White-box watermarks in general embed information directly into the parameters . Our proposed watermark does not directly embed information into parameters , but parameter access is required for verification , which makes our proposed method a white-box watermark . The rationale for using such a white-box watermark is detailed below . In the black-box setting , to verify model ownership , we generally check that the trigger set accuracy function from parameters to accuracy f ( θ ) is larger than a threshold ( Shafieinejad et al. , 2019 ) . The trigger set accuracy function takes in model parameter as input and outputs the accuracy on the trigger set . Since directly certifying the function is hard , we first convert the trigger set accuracy function f ( θ ) to its smoothed counterpart h ( θ ) , and then check that h ( θ ) is greater than the threshold t for ownership verification . Practically , one converts the base function to the smoothed function by injecting random noise into the parameters during multiple trigger set evaluations , and then taking the median trigger set accuracy as ĥ . Note that this verification process requires access to parameters , so ownership verification using ĥ is considered a white-box watermark . Watermark Removal Threat Model In our experiments , we consider three different threat models to the watermark verification : 1 ) distillation , 2 ) finetuning , and 3 ) an ` 2 adversary . In the distillation threat model ( 1 ) , we assume that the adversary initializes their model with our original model , and then trains their model with distillation using unlabeled data that comes from the same distribution . In other words , the adversary uses our original model to label the unlabeled data for finetuning . ( Shafieinejad et al. , 2019 ) propose first adding some regularization during the initial part of the attack to remove the watermark , and then later turning off the regularization to fully recover the test accuracy of the model . We experiment with this distillation attack both with and without regularization . In the finetuning threat model ( 2 ) , the adversary has its own labeled dataset from the original datagenerating distribution . This adversary is strictly stronger compared to the distillation threat model . In our experiments , we make the conservative assumption that the adversary has exactly the same amount of data as the model owner . The ` 2 adversary ( 3 ) obtains the original model parameters , and then is allowed to move the parameters at most a certain ` 2 distance to maximally decrease trigger set accuracy . Even though the ` 2 adversary is not a completely realistic threat model , we argue similarly to the adversarial robustness literature ( Carlini et al. , 2019 ) that being able to defend against a small ` 2 adversary is a requirement for defending against more sophisticated attacks . In our experiments , we empirically find that a large shift of parameters in ` 2 distance is indicative of the strength of the adversary . For example , training the models for more time , with a larger learning rate , or using ground truth labels as opposed to distillation are all stronger attacks , and as expected , they both remove the watermark faster and move the parameters by a greater ` 2 distance ( Table 2 ) . Additionally , given a local Lipschitz constant of L and a learning rate of r , the number of steps required to move outside of the - ` 2 ball can be upper bounded by / ( rL ) , and we think the number of steps is a good proxy to the computational budget of the adversary . | This paper present the first certifiable neural network watermark method. By extending method proposed by Chiang et.al. [1] to the watermark embedding and extraction process, it is possible to ensure that the watermark is robust to watermark removal when the network parameters are modified by less than a certain calculated value. Specifically, the proposed method adds Gaussian noises to parameters instead of images. Overall, the idea of making a provable model watermark is novel. | SP:00a3a2ca6324e5f2db45bbad11bf97491037c26c |
A Geometric Analysis of Deep Generative Image Models and Its Applications | 1 BACKGROUND . Generative adversarial networks ( GANs ) learn patterns that characterize complex datasets , and subsequently generate new samples representative of that set . In recent years , there has been tremendous success in training GANs to generate high-resolution and photorealistic images ( Karras et al. , 2017 ; Brock et al. , 2018 ; Donahue & Simonyan , 2019 ; Karras et al. , 2020 ) . Well-trained GANs show smooth transitions between image outputs when interpolating in their latent input space , which makes them useful in applications such as high-level image editing ( changing attributes of faces ) , object segmentation , and image generation for art and neuroscience ( Zhu et al. , 2016 ; Shen et al. , 2020 ; Pividori et al. , 2019 ; Ponce et al. , 2019 ) . However , there is no systematic approach for understanding the latent space of any given GAN or its relationship to the manifold of natural images . Because a generator provides a smooth map onto image space , one relevant conceptual model for GAN latent space is a Riemannian manifold . To define the structure of this manifold , we have to ask questions such as : are images homogeneously distributed on a sphere ? ( White , 2016 ) What is the structure of its tangent space — do all directions induce the same amount of variance in image transformation ? Here we develop a method to compute the metric of this manifold and investigate its geometry directly , and then use this knowledge to navigate the space and improve several applications . To define a Riemannian geometry , we need to have a smooth map and a notion of distance on it , defined by the metric tensor . For image applications , the relevant notion of distance is in image space rather than code space . Thus , we can pull back the distance function from the image space onto the latent space . Differentiating this distance function on latent space , we will get a differential geometric structure ( Riemannian metric ) on the image manifold . Further , by computing the Riemannian metric at different points ( i.e . around different latent codes ) , we can estimate the anisotropy and homogeneity of this manifold . The paper is organized as follows : first , we review the previous work using tools from Riemannian geometry to analyze generative models in section 2 . Using this geometric framework , we introduce an efficient way to compute the metric tensor H on the image manifold in section 3 , and empirically investigate the properties of H in various GANs in section 4 . We explain the properties of this metric in terms of network architecture and training in section 5 . We show that this understanding provides a unifying principle behind previous methods for interpretable axes discovery in the latent space . Finally , we demonstrate other applications that this geometric information could facilitate , e.g . gradient-free searching in the GAN image manifold in section 6 . 2 RELATED WORK . Geometry of Deep Generative Model Concepts in Riemannian geometry have been recently applied to illuminate the structure of latent space of generative models ( i.e . GANs and variational autoencoders , VAEs ) . Shao et al . ( 2018 ) designed algorithms to compute the geodesic path , parallel transport of vectors and geodesic shooting in the latent space ; they used finite difference together with a pretrained encoder to circumvent the Jacobian computation of the generator . While promising , this method did not provide information of the metric directly and could not be applied to GANs without encoders . Arvanitidis et al . ( 2017 ) focused on the geometry of VAEs , deriving a formula for the metric tensor in order to solve the geodesic in the latent space ; this worked well with shallow convolutional VAEs and low-resolution images ( 28 x 28 pixels ) . Chen et al . ( 2018 ) computed the geodesic through minimization , applying their method on shallow VAEs trained on MNIST images and a low-dimensional robotics dataset . In the above , the featured methods could only be applied to neural networks without ReLU activation . Here , our geometric analysis is architecture-agnostic and it ’ s applied to modern large-scale GANs ( e.g . BigGAN , StyleGAN2 ) . Further , we extend the pixel L2 distance assumed in previous works to any differentiable distance metric . 3 METHODS . Formulation A generative network , denoted by G , is a mapping from latent code z to image I , G : Rn → I = RH×W×3 , z 7→ I . Borrowing the language of Riemannian geometry , G ( z ) parameterizes a submanifold in the image space with z ∈ Rn . Note for applications in image domain , we care about distance in the image space . Thus , given a distance function in image space D : I × I → R+ , ( I1 , I2 ) 7→ L , we can define the distance between two codes as the distance between the images they generate , i.e . pullback the distance function to latent space through G. d : Rn × Rn → R+ , d ( z1 , z2 ) : = D ( G ( z1 ) , G ( z2 ) ) . The Hessian matrix ( second order partial derivative ) of the squared distance function d2 can be seen as the metric tensor of the image manifold ( Palais , 1957 ) . The intuition behind this is as follows : consider the squared distance to a fixed reference vector z0 as a function of z , fz0 ( z ) = d 2 ( z0 , z ) . Obviously , z = z0 is a local minimum of fz0 ( z ) , thus fz0 ( z ) can be locally approximated by a positive semi-definite quadratic form H ( z0 ) as in Eq.1 . This matrix induces an inner product and defines a vector norm , ‖v‖2H = vTH ( z0 ) v. This squared vector norm approximates the squared image distance , d2 ( z0 , z0 + δz ) ≈ ‖δz‖2H = δTzH ( z0 ) δz . Thus , this matrix encodes the local distance information on the image manifold up to second order approximation . This is the intuition behind Riemannian metric . In this article , the terms ” metric tensor ” and ” Hessian matrix ” are used interchangeably . We will call αH ( v ) = vTHv/vTv the approximate speed of image change along v as measured by metric H . d2 ( z0 , z ) ≈ δzT ∂2d2 ( z0 , z ) ∂z2 |z0δz , H ( z0 ) : = ∂2d2 ( z0 , z ) ∂z2 |z0 ( 1 ) Numerical Method As defined above , the metric tensor H can be computed by doubly differentiating the squared distance function d2 . Here we use a convolutional neural network ( CNN ) -based distance metric , LPIPS ( Zhang et al. , 2018 ) , as it has been demonstrated to approximate human perceptual similarity judgements . The direct method to compute Hessian is by building a computational graph towards the gradient g ( z ) = ∂zd2|z=z0 and then computing the gradient towards each element in g ( z ) . This method computes H column by column , therefore its time complexity is proportional to the latent-space dimension n and the backpropagation time through this graph . For situations when direct backpropagation is too slow ( e.g . FC6GAN , StyleGAN2 ) , we developed an approximation method to compute the major eigen-dimensions of the Hessian more efficiently . These top eigen-pairs are useful in applications like optimization and exploration ; moreover , they form the best low-rank approximation to the Hessian . As we will later discover , the spectra of these Hessians have a fast decay , thus far less than n eigenvectors are required to approximate them , cf . Sec 4 . As a matrix , the Hessian is a linear operator , which could be defined as long as one can compute the Hessian vector product ( HVP ) . Since the gradient to z commutes with inner product with v , HVP can be rewritten as the gradient to vTg , or the directional derivative to the gradient vT∂zg ( Eq.2 ) . The first form ∂z ( vTg ) is easy to compute in reverse-mode auto-differentiation , and the directional derivative is easy to compute in forward-mode auto-differentiation ( or finite differencing ) . Then , Lanczos iteration is applied to the HVP operator defined in these two ways to solve the largest eigen pairs , which can reconstruct an approximate Hessian matrix . The iterative algorithm using the two HVP definitions are termed Backward Iteration and Forward Iteration respectively . For details and efficiency comparison , see Appendix A.2 . HV P : v 7→ Hv = ∂z ( vTg ( z ) ) = vT∂zg ( z ) ≈ ( g ( z + v ) − g ( z − v ) ) /2‖ v‖ ( 2 ) Note a similar computational method has been employed to understand the optimization landscape of deep neural networks recently ( Ghorbani et al. , 2019 ) , although it has not been applied towards the geometry of latent space of GANs before . Connection to Jacobian This formulation and computation of the Riemannian metric is generic to any mapping into a metric space . Consider a mapping φ ( z ) : Rn → RM , which could be the feature map of a layer in the GAN , or a CNN processing the generated image . We can pull back the squared L2 distance and metric from RM , d2φ ( z1 , z2 ) = 1 2‖φ ( z1 ) −φ ( z2 ) ‖ 2 2 , and define a manifold . The metric tensor Hφ of this manifold can be derived as Hessian of d2φ . Note , there is a simple relationship between the Hessian of d2φ , Hφ and the Jacobian of φ , Jφ ( Eq . 3 ) . Through this we know the eigenvalues and eigenvectors of the Hessian matrix Hφ correspond to the squared singular values and right singular vectors of the Jacobian Jφ . This allows us to examine the geometry of any representation throughout the GAN , and analyze how the geometry in the image space builds up . Hφ ( z0 ) = ∂2 ∂z2 1 2 ‖φ ( z0 ) − φ ( z ) ‖22|z0 = Jφ ( z0 ) TJφ ( z0 ) ( 3 ) vTHφ ( z0 ) v = ‖Jφ ( z0 ) v‖2 , Jφ ( z0 ) = ∂zφ ( z ) |z0 ( 4 ) In this work , we use LPIPS , which defines image distance based on the squared L2 distance of the first few layers of a pretrained CNN . If we concatenate the activations and denote this representational map by ϕ ( I ) : I → RF , then the metric tensor of the image manifold can be derived from the Jacobian of the composite of the generator and the representation map ϕ , H ( z ) = JTϕ◦GJϕ◦G , Jϕ◦G = ∂zϕ ( G ( z ) ) . This connection is crucial for understanding how geometry depends on the network architecture . 4 EMPIRICAL OBSERVATIONS . Using the above method , we analyzed the geometry of the latent space of the following GANs : DCGAN ( Radford et al. , 2015 ) , DeePSiM/FC6GAN ( Dosovitskiy & Brox , 2016 ) , BigGAN ( Brock et al. , 2018 ) , BigBiGAN ( Donahue & Simonyan , 2019 ) , Progressive Growing of GANs ( PGGAN ) ( Karras et al. , 2017 ) , StyleGAN 1 and 2 ( Karras et al. , 2019 ; 2020 ) - model specifications reviewed in Sec . A.3 . These GANs are progressively deeper and more complex , and some employ a style-based architecture instead of the conventional DCGAN architecture ( e.g . StyleGAN1,2 ) . This diverse set of models allowed us to test the broad applicability of this new approach . In the following sections , ” top ” and ” bottom ” eigenvectors refer to the eigenvectors with large and small eigenvalues . Top Eigenvectors Capture Significant Image Changes . In differential geometry , a metric tensor H captures an infinitesimal notion of distance . To determine whether this quantity represents evident image changes , we randomly picked a latent code z0 , then computed the metric tensorH ( z0 ) and its eigendecomposition H ( z0 ) = ∑ i λiviv T i . Then we explored linearly in the latent space 1along the eigenvectorsG ( z0 +µivi ) . We found that images changed much faster when moving along top than along bottom eigenvectors , both per visual inspection and LPIPS ( Fig.1 ) . More intriguingly , eigenvectors at different ranks encoded qualitatively different types of changes ; for example , in BigGAN noise space , the top eigenvectors encoded head direction , proximity and size ; while lower eigenvectors encoded background changes , shading or much more subtle pixel-wise changes . Moreover , PGGAN and StyleGANs trained on the face dataset ( celebA , FFHQ ) have top eigenvectors that represent similar interpretable transforms of faces , such as head direction , sex or age ( Fig.10 ) . These observations raised the possibility that top eigenvectors also captured perceptually relevant changes : we tested this directly with positive results in Sec . 6 . A B C DBigGAN Class Space BigGAN Noise Space StyleGAN2 Cat StyleGAN2 Face Spectrum Structure of GANs To explore how eigenvalues were distributed , for each GAN , we randomly sampled 100-1000 z in the latent space , used backpropagation to compute H ( z ) and then performed the eigendecomposition . In Fig . 2 , we plotted the mean and 90 % confidence interval of the spectra and found that they spanned 5-10 orders of magnitude , with fast decays ; each spectrum was dominated by a few eigenvectors with large eigenvalues . In other words , only a small fraction of dimensions were responsible for major image changes ( Table 2 ) , while most dimensions introduced nuanced changes ( e.g . shading , background ) — thus GAN latent spaces were highly anisotropic . We found this anisotropy in every GAN we tested , which raises the question of why it has not been discussed more frequently . One possibility is that the statistical properties of high dimensionality create an illusion of isotropy . When traveling along a random direction v in latent space , the approximate rate of image change αH ( v ) = vTHv/vTv is a weighted average of all eigenvalues as in Eq . 9 . In Sec A.6 , we show analytically that the variance of α ( v ) across random directions will be 2/ ( n+2 ) times smaller than the variance among eigenvalues . For example , in BigGAN latent space ( 256 dimensions ) , the eigenvalues span over six orders of magnitude , while the α ( v ) for random 1For some spaces , we used spherical linear exploration ( i.e . SLERP ) , where we restrict the vector to a sphere of certain norm . We project vi onto tangent space of z0 and travel on the big circle from z0 along vi . directions has a standard deviation less than one order of magnitude ( Figs . 2 , 6 ) . Further , the center of this distribution was closer to the top of the spectrum , and thus provided a reasonable rate of change , while masking the existence of eigendimensions of extremely large and small eigenvalues . Global Metric Structure Because the metric H ( z ) describes local geometry , the next question is how it varies at different positions in the latent space . We computed the metric H ( z ) at randomly selected z and examined their similarity using a statistic adopted from Kornblith et al . ( 2019 ) . In this statistic , we applied the eigenvectors Ui = [ u1 , ... un ] from a metric tensor Hi at position zi to the metric tensor Hj at zj , as uTi Hjui . These values formed a vector Λij , representing the effects of metric Hj on eigenvectors of Hi . Then we computed the Pearson correlation coefficient between Λij and the target eigenvalues , Λj , as corr ( Λj , Λij ) . This correlation measured the similarity of the action of metric tensors on eigenframes around different positions . As the spectrum usually spanned several orders of magnitude , we computed the correlation on the log scale CHlogij , where the eigenvalues distribute more uniformly . Λij = diag ( U T i H ( zj ) Ui ) ( 5 ) CHij = corr ( Λij , Λj ) , C Hlog ij = corr ( log ( Λij ) , log ( Λj ) ) ( 6 ) Using this correlation statistic , we computed the consistency of the metric tensor across hundreds of positions within each GAN latent space . As shown in Fig . 3C , the average correlation between eigenvalues and vHv values of two points CHlogij was 0.934 in BigGAN . For DCGAN-type architecture , mean correlations on the log scale ranged from 0.92-0.99 ; for StyleGAN-1,2 , 0.64-0.73 in the Z space , and 0.87-0.89 in the W space ( Fig . 3D , Tab.4 ) . Overall , this shows that the local directions that induce image changes of different orders of magnitude are highly consistent at different points in the latent space . Because of this , the notion of a ” global ” Hessian makes sense , and we estimated it for each latent space by averaging the Hessian matrices at different locations . Implication of the Null Space As the spectra have a large portion of small eigenvalues and the metric tensors are correlated in space , the bottom eigenvectors should create a global subspace , in which latent traversal will result in small or even imperceptible changes in the image . This is supported by our perceptual study , as over half of the subjects can not see any change in image when latent vector move in bottom eigenspace . ( Sec . 6 ) . This perceptually ” null ” space has implications about exploration in the GAN space and interpretable axes discovery . As G ( z + v ) ≈ G ( z ) , if one axis u encodes an interpretable transformG ( z ) → G ( z+u ) , then shifting this vector by a vector in the null space v will still result in an interpretable axis G ( z ) → G ( z + v + u ) ≈ G ( z + u ) . Thus , each interpretable axis have a family of ” equivalent ” axes which encode similar transforms , differing from each other by a vector in ” null ” space . However , adding component v in the null space will decrease the rate of image change along that axis . In this sense , the vectors using a smallest step size to achieve that transform should be the ” purest ” axes of the family . Further , the cosine angle between two interpretable axes may not represent the similarity of the transforms they encode . A large angle can be found between two axes of the same family but at different image traversal speed . We compared the axes from previous works in A.9 and observed that projecting out a large part of their axes did not affect the semantics it encoded ( Fig . 8 ) . | This work intends to explore the geometry of the latent space and proposes to define the distance in latent space as the distance between the corresponding generated images and use the Hessian of that squared distance as metric tensor to define the manifold. Using Learned Perceptual Image Patch Similarity (LPIPS), they show that the Hessian can either be computed through backpropagation or if that is not efficient, it is sufficient to iteratively compute the eigenvectors corresponding to the largest eigenvalues. With the proposed method, the empirical observations showed 1) the impact of those eigenvectors through examples, 2) consistent geometric local changes over different positions in the latent space, and 3) the impact of top eigenvectors on particular layers. Further, the authors discuss three areas of possible application (gradient-based GAN inversion, gradient-free image search, interpretable axes discovery). | SP:80d8f2ef8e3b7ad7f8407b80f29c70111d80e22e |
A Geometric Analysis of Deep Generative Image Models and Its Applications | 1 BACKGROUND . Generative adversarial networks ( GANs ) learn patterns that characterize complex datasets , and subsequently generate new samples representative of that set . In recent years , there has been tremendous success in training GANs to generate high-resolution and photorealistic images ( Karras et al. , 2017 ; Brock et al. , 2018 ; Donahue & Simonyan , 2019 ; Karras et al. , 2020 ) . Well-trained GANs show smooth transitions between image outputs when interpolating in their latent input space , which makes them useful in applications such as high-level image editing ( changing attributes of faces ) , object segmentation , and image generation for art and neuroscience ( Zhu et al. , 2016 ; Shen et al. , 2020 ; Pividori et al. , 2019 ; Ponce et al. , 2019 ) . However , there is no systematic approach for understanding the latent space of any given GAN or its relationship to the manifold of natural images . Because a generator provides a smooth map onto image space , one relevant conceptual model for GAN latent space is a Riemannian manifold . To define the structure of this manifold , we have to ask questions such as : are images homogeneously distributed on a sphere ? ( White , 2016 ) What is the structure of its tangent space — do all directions induce the same amount of variance in image transformation ? Here we develop a method to compute the metric of this manifold and investigate its geometry directly , and then use this knowledge to navigate the space and improve several applications . To define a Riemannian geometry , we need to have a smooth map and a notion of distance on it , defined by the metric tensor . For image applications , the relevant notion of distance is in image space rather than code space . Thus , we can pull back the distance function from the image space onto the latent space . Differentiating this distance function on latent space , we will get a differential geometric structure ( Riemannian metric ) on the image manifold . Further , by computing the Riemannian metric at different points ( i.e . around different latent codes ) , we can estimate the anisotropy and homogeneity of this manifold . The paper is organized as follows : first , we review the previous work using tools from Riemannian geometry to analyze generative models in section 2 . Using this geometric framework , we introduce an efficient way to compute the metric tensor H on the image manifold in section 3 , and empirically investigate the properties of H in various GANs in section 4 . We explain the properties of this metric in terms of network architecture and training in section 5 . We show that this understanding provides a unifying principle behind previous methods for interpretable axes discovery in the latent space . Finally , we demonstrate other applications that this geometric information could facilitate , e.g . gradient-free searching in the GAN image manifold in section 6 . 2 RELATED WORK . Geometry of Deep Generative Model Concepts in Riemannian geometry have been recently applied to illuminate the structure of latent space of generative models ( i.e . GANs and variational autoencoders , VAEs ) . Shao et al . ( 2018 ) designed algorithms to compute the geodesic path , parallel transport of vectors and geodesic shooting in the latent space ; they used finite difference together with a pretrained encoder to circumvent the Jacobian computation of the generator . While promising , this method did not provide information of the metric directly and could not be applied to GANs without encoders . Arvanitidis et al . ( 2017 ) focused on the geometry of VAEs , deriving a formula for the metric tensor in order to solve the geodesic in the latent space ; this worked well with shallow convolutional VAEs and low-resolution images ( 28 x 28 pixels ) . Chen et al . ( 2018 ) computed the geodesic through minimization , applying their method on shallow VAEs trained on MNIST images and a low-dimensional robotics dataset . In the above , the featured methods could only be applied to neural networks without ReLU activation . Here , our geometric analysis is architecture-agnostic and it ’ s applied to modern large-scale GANs ( e.g . BigGAN , StyleGAN2 ) . Further , we extend the pixel L2 distance assumed in previous works to any differentiable distance metric . 3 METHODS . Formulation A generative network , denoted by G , is a mapping from latent code z to image I , G : Rn → I = RH×W×3 , z 7→ I . Borrowing the language of Riemannian geometry , G ( z ) parameterizes a submanifold in the image space with z ∈ Rn . Note for applications in image domain , we care about distance in the image space . Thus , given a distance function in image space D : I × I → R+ , ( I1 , I2 ) 7→ L , we can define the distance between two codes as the distance between the images they generate , i.e . pullback the distance function to latent space through G. d : Rn × Rn → R+ , d ( z1 , z2 ) : = D ( G ( z1 ) , G ( z2 ) ) . The Hessian matrix ( second order partial derivative ) of the squared distance function d2 can be seen as the metric tensor of the image manifold ( Palais , 1957 ) . The intuition behind this is as follows : consider the squared distance to a fixed reference vector z0 as a function of z , fz0 ( z ) = d 2 ( z0 , z ) . Obviously , z = z0 is a local minimum of fz0 ( z ) , thus fz0 ( z ) can be locally approximated by a positive semi-definite quadratic form H ( z0 ) as in Eq.1 . This matrix induces an inner product and defines a vector norm , ‖v‖2H = vTH ( z0 ) v. This squared vector norm approximates the squared image distance , d2 ( z0 , z0 + δz ) ≈ ‖δz‖2H = δTzH ( z0 ) δz . Thus , this matrix encodes the local distance information on the image manifold up to second order approximation . This is the intuition behind Riemannian metric . In this article , the terms ” metric tensor ” and ” Hessian matrix ” are used interchangeably . We will call αH ( v ) = vTHv/vTv the approximate speed of image change along v as measured by metric H . d2 ( z0 , z ) ≈ δzT ∂2d2 ( z0 , z ) ∂z2 |z0δz , H ( z0 ) : = ∂2d2 ( z0 , z ) ∂z2 |z0 ( 1 ) Numerical Method As defined above , the metric tensor H can be computed by doubly differentiating the squared distance function d2 . Here we use a convolutional neural network ( CNN ) -based distance metric , LPIPS ( Zhang et al. , 2018 ) , as it has been demonstrated to approximate human perceptual similarity judgements . The direct method to compute Hessian is by building a computational graph towards the gradient g ( z ) = ∂zd2|z=z0 and then computing the gradient towards each element in g ( z ) . This method computes H column by column , therefore its time complexity is proportional to the latent-space dimension n and the backpropagation time through this graph . For situations when direct backpropagation is too slow ( e.g . FC6GAN , StyleGAN2 ) , we developed an approximation method to compute the major eigen-dimensions of the Hessian more efficiently . These top eigen-pairs are useful in applications like optimization and exploration ; moreover , they form the best low-rank approximation to the Hessian . As we will later discover , the spectra of these Hessians have a fast decay , thus far less than n eigenvectors are required to approximate them , cf . Sec 4 . As a matrix , the Hessian is a linear operator , which could be defined as long as one can compute the Hessian vector product ( HVP ) . Since the gradient to z commutes with inner product with v , HVP can be rewritten as the gradient to vTg , or the directional derivative to the gradient vT∂zg ( Eq.2 ) . The first form ∂z ( vTg ) is easy to compute in reverse-mode auto-differentiation , and the directional derivative is easy to compute in forward-mode auto-differentiation ( or finite differencing ) . Then , Lanczos iteration is applied to the HVP operator defined in these two ways to solve the largest eigen pairs , which can reconstruct an approximate Hessian matrix . The iterative algorithm using the two HVP definitions are termed Backward Iteration and Forward Iteration respectively . For details and efficiency comparison , see Appendix A.2 . HV P : v 7→ Hv = ∂z ( vTg ( z ) ) = vT∂zg ( z ) ≈ ( g ( z + v ) − g ( z − v ) ) /2‖ v‖ ( 2 ) Note a similar computational method has been employed to understand the optimization landscape of deep neural networks recently ( Ghorbani et al. , 2019 ) , although it has not been applied towards the geometry of latent space of GANs before . Connection to Jacobian This formulation and computation of the Riemannian metric is generic to any mapping into a metric space . Consider a mapping φ ( z ) : Rn → RM , which could be the feature map of a layer in the GAN , or a CNN processing the generated image . We can pull back the squared L2 distance and metric from RM , d2φ ( z1 , z2 ) = 1 2‖φ ( z1 ) −φ ( z2 ) ‖ 2 2 , and define a manifold . The metric tensor Hφ of this manifold can be derived as Hessian of d2φ . Note , there is a simple relationship between the Hessian of d2φ , Hφ and the Jacobian of φ , Jφ ( Eq . 3 ) . Through this we know the eigenvalues and eigenvectors of the Hessian matrix Hφ correspond to the squared singular values and right singular vectors of the Jacobian Jφ . This allows us to examine the geometry of any representation throughout the GAN , and analyze how the geometry in the image space builds up . Hφ ( z0 ) = ∂2 ∂z2 1 2 ‖φ ( z0 ) − φ ( z ) ‖22|z0 = Jφ ( z0 ) TJφ ( z0 ) ( 3 ) vTHφ ( z0 ) v = ‖Jφ ( z0 ) v‖2 , Jφ ( z0 ) = ∂zφ ( z ) |z0 ( 4 ) In this work , we use LPIPS , which defines image distance based on the squared L2 distance of the first few layers of a pretrained CNN . If we concatenate the activations and denote this representational map by ϕ ( I ) : I → RF , then the metric tensor of the image manifold can be derived from the Jacobian of the composite of the generator and the representation map ϕ , H ( z ) = JTϕ◦GJϕ◦G , Jϕ◦G = ∂zϕ ( G ( z ) ) . This connection is crucial for understanding how geometry depends on the network architecture . 4 EMPIRICAL OBSERVATIONS . Using the above method , we analyzed the geometry of the latent space of the following GANs : DCGAN ( Radford et al. , 2015 ) , DeePSiM/FC6GAN ( Dosovitskiy & Brox , 2016 ) , BigGAN ( Brock et al. , 2018 ) , BigBiGAN ( Donahue & Simonyan , 2019 ) , Progressive Growing of GANs ( PGGAN ) ( Karras et al. , 2017 ) , StyleGAN 1 and 2 ( Karras et al. , 2019 ; 2020 ) - model specifications reviewed in Sec . A.3 . These GANs are progressively deeper and more complex , and some employ a style-based architecture instead of the conventional DCGAN architecture ( e.g . StyleGAN1,2 ) . This diverse set of models allowed us to test the broad applicability of this new approach . In the following sections , ” top ” and ” bottom ” eigenvectors refer to the eigenvectors with large and small eigenvalues . Top Eigenvectors Capture Significant Image Changes . In differential geometry , a metric tensor H captures an infinitesimal notion of distance . To determine whether this quantity represents evident image changes , we randomly picked a latent code z0 , then computed the metric tensorH ( z0 ) and its eigendecomposition H ( z0 ) = ∑ i λiviv T i . Then we explored linearly in the latent space 1along the eigenvectorsG ( z0 +µivi ) . We found that images changed much faster when moving along top than along bottom eigenvectors , both per visual inspection and LPIPS ( Fig.1 ) . More intriguingly , eigenvectors at different ranks encoded qualitatively different types of changes ; for example , in BigGAN noise space , the top eigenvectors encoded head direction , proximity and size ; while lower eigenvectors encoded background changes , shading or much more subtle pixel-wise changes . Moreover , PGGAN and StyleGANs trained on the face dataset ( celebA , FFHQ ) have top eigenvectors that represent similar interpretable transforms of faces , such as head direction , sex or age ( Fig.10 ) . These observations raised the possibility that top eigenvectors also captured perceptually relevant changes : we tested this directly with positive results in Sec . 6 . A B C DBigGAN Class Space BigGAN Noise Space StyleGAN2 Cat StyleGAN2 Face Spectrum Structure of GANs To explore how eigenvalues were distributed , for each GAN , we randomly sampled 100-1000 z in the latent space , used backpropagation to compute H ( z ) and then performed the eigendecomposition . In Fig . 2 , we plotted the mean and 90 % confidence interval of the spectra and found that they spanned 5-10 orders of magnitude , with fast decays ; each spectrum was dominated by a few eigenvectors with large eigenvalues . In other words , only a small fraction of dimensions were responsible for major image changes ( Table 2 ) , while most dimensions introduced nuanced changes ( e.g . shading , background ) — thus GAN latent spaces were highly anisotropic . We found this anisotropy in every GAN we tested , which raises the question of why it has not been discussed more frequently . One possibility is that the statistical properties of high dimensionality create an illusion of isotropy . When traveling along a random direction v in latent space , the approximate rate of image change αH ( v ) = vTHv/vTv is a weighted average of all eigenvalues as in Eq . 9 . In Sec A.6 , we show analytically that the variance of α ( v ) across random directions will be 2/ ( n+2 ) times smaller than the variance among eigenvalues . For example , in BigGAN latent space ( 256 dimensions ) , the eigenvalues span over six orders of magnitude , while the α ( v ) for random 1For some spaces , we used spherical linear exploration ( i.e . SLERP ) , where we restrict the vector to a sphere of certain norm . We project vi onto tangent space of z0 and travel on the big circle from z0 along vi . directions has a standard deviation less than one order of magnitude ( Figs . 2 , 6 ) . Further , the center of this distribution was closer to the top of the spectrum , and thus provided a reasonable rate of change , while masking the existence of eigendimensions of extremely large and small eigenvalues . Global Metric Structure Because the metric H ( z ) describes local geometry , the next question is how it varies at different positions in the latent space . We computed the metric H ( z ) at randomly selected z and examined their similarity using a statistic adopted from Kornblith et al . ( 2019 ) . In this statistic , we applied the eigenvectors Ui = [ u1 , ... un ] from a metric tensor Hi at position zi to the metric tensor Hj at zj , as uTi Hjui . These values formed a vector Λij , representing the effects of metric Hj on eigenvectors of Hi . Then we computed the Pearson correlation coefficient between Λij and the target eigenvalues , Λj , as corr ( Λj , Λij ) . This correlation measured the similarity of the action of metric tensors on eigenframes around different positions . As the spectrum usually spanned several orders of magnitude , we computed the correlation on the log scale CHlogij , where the eigenvalues distribute more uniformly . Λij = diag ( U T i H ( zj ) Ui ) ( 5 ) CHij = corr ( Λij , Λj ) , C Hlog ij = corr ( log ( Λij ) , log ( Λj ) ) ( 6 ) Using this correlation statistic , we computed the consistency of the metric tensor across hundreds of positions within each GAN latent space . As shown in Fig . 3C , the average correlation between eigenvalues and vHv values of two points CHlogij was 0.934 in BigGAN . For DCGAN-type architecture , mean correlations on the log scale ranged from 0.92-0.99 ; for StyleGAN-1,2 , 0.64-0.73 in the Z space , and 0.87-0.89 in the W space ( Fig . 3D , Tab.4 ) . Overall , this shows that the local directions that induce image changes of different orders of magnitude are highly consistent at different points in the latent space . Because of this , the notion of a ” global ” Hessian makes sense , and we estimated it for each latent space by averaging the Hessian matrices at different locations . Implication of the Null Space As the spectra have a large portion of small eigenvalues and the metric tensors are correlated in space , the bottom eigenvectors should create a global subspace , in which latent traversal will result in small or even imperceptible changes in the image . This is supported by our perceptual study , as over half of the subjects can not see any change in image when latent vector move in bottom eigenspace . ( Sec . 6 ) . This perceptually ” null ” space has implications about exploration in the GAN space and interpretable axes discovery . As G ( z + v ) ≈ G ( z ) , if one axis u encodes an interpretable transformG ( z ) → G ( z+u ) , then shifting this vector by a vector in the null space v will still result in an interpretable axis G ( z ) → G ( z + v + u ) ≈ G ( z + u ) . Thus , each interpretable axis have a family of ” equivalent ” axes which encode similar transforms , differing from each other by a vector in ” null ” space . However , adding component v in the null space will decrease the rate of image change along that axis . In this sense , the vectors using a smallest step size to achieve that transform should be the ” purest ” axes of the family . Further , the cosine angle between two interpretable axes may not represent the similarity of the transforms they encode . A large angle can be found between two axes of the same family but at different image traversal speed . We compared the axes from previous works in A.9 and observed that projecting out a large part of their axes did not affect the semantics it encoded ( Fig . 8 ) . | The paper performs the analysis of the GAN latent spaces from the geometric perspective, inducing a metric tensor in the latent space from the LPIPS distance in the image space. The main authors' finding is that under such metric, the latent spaces of typical GANs are highly anisotropic, which can be exploited for more effective GAN inversion. Furthermore, the authors show that eigen vectors of the metric tensor often correspond to interpretable latent transformations. | SP:80d8f2ef8e3b7ad7f8407b80f29c70111d80e22e |
What are the Statistical Limits of Offline RL with Linear Function Approximation? | 1 INTRODUCTION . Offline methods ( also known as off-policy methods or batch methods ) are a promising methodology to alleviate the sample complexity burden in challenging reinforcement learning ( RL ) settings , particularly those where sample efficiency is paramount ( Mandel et al. , 2014 ; Gottesman et al. , 2018 ; Wang et al. , 2018 ; Yu et al. , 2019 ) . Off-policy methods are often applied together with function approximation schemes ; such methods take sample transition data and reward values as inputs , and approximate the value of a target policy or the value function of the optimal policy . Indeed , many practical deep RL algorithms find their prototypes in the literature of offline RL . For example , when running on off-policy data ( sometimes termed as “ experience replay ” ) , deep Q-networks ( DQN ) ( Mnih et al. , 2015 ) can be viewed as an analog of Fitted Q-Iteration ( Gordon , 1999 ) with neural networks being the function approximators . More recently , there are an increasing number of both model-free ( Laroche et al. , 2019 ; Fujimoto et al. , 2019 ; Jaques et al. , 2020 ; Kumar et al. , 2019 ; Agarwal et al. , 2020 ) and model-based ( Ross & Bagnell , 2012 ; Kidambi et al. , 2020 ) offline RL methods , with steady improvements in performance ( Fujimoto et al. , 2019 ; Kumar et al. , 2019 ; Wu et al. , 2020 ; Kidambi et al. , 2020 ) . However , despite the importance of these methods , the extent to which data reuse is possible , especially when off-policy methods are combined with function approximation , is not well understood . For example , deepQ-network requires millions of samples to solve certain Atari games ( Mnih et al. , 2015 ) . Also important is that in some safety-critical settings , we seek guarantees when offline- trained policies can be effective ( Thomas , 2014 ; Thomas et al. , 2019 ) . A basic question here is that if there are fundamental statistical limits on such methods , where sample-efficient offline RL is simply not possible without further restrictions on the problem . In the context of supervised learning , it is well-known that empirical risk minimization is sampleefficient if the hypothesis class has bounded complexity . For example , suppose the agent is given a d-dimensional feature extractor , and the ground truth labeling function is a ( realizable ) linear function with respect to the feature mapping . Here , it is well-known that a polynomial number of samples in d suffice for a given target accuracy . Furthermore , in this realizable case , provided the training data has a good feature coverage , then we will have good accuracy against any test distribution.1 In the more challenging offline RL setting , it is unclear if sample-efficient methods are possible , even under analogous assumptions . This is our motivation to consider the following question : What are the statistical limits for offline RL with linear function approximation ? Here , one may hope that value estimation for a given policy is possible in the offline RL setting under the analogous set of assumptions that enable sample-efficient supervised learning , i.e. , 1 ) ( realizability ) the features can perfectly represent the value functions and 2 ) ( good coverage ) the feature covariance matrix of our off-policy data has lower bounded eigenvalues . The extant body of provable methods on offline RL either make representational assumptions that are far stronger than realizability or assume distribution shift conditions that are far stronger than having coverage with regards to the spectrum of the feature covariance matrix of the data distribution . For example , Szepesvári & Munos ( 2005 ) analyze offline RL methods by assuming a representational condition where the features satisfy ( approximate ) closedness under Bellman updates , which is a far stronger representation condition than realizability . Recently , Xie & Jiang ( 2020a ) propose a offline RL algorithm that only requires realizability as the representation condition . However , the algorithm in ( Xie & Jiang , 2020a ) requires a more stringent data distribution condition . Whether it is possible to design a sample-efficient offline RL method under the realizability assumption and a reasonable data coverage assumption — an open problem in ( Chen & Jiang , 2019 ) — is the focus of this work . Our Contributions . Perhaps surprisingly , our main result shows that , under only the above two assumptions , it is information-theoretically not possible to design a sample-efficient algorithm to non-trivially estimate the value of a given policy . The following theorem is an informal version of the result in Section 4 . Theorem 1.1 ( Informal ) . In the offline RL setting , suppose the data distributions have ( polynomially ) lower bounded eigenvalues , and the Q-functions of every policy are linear with respect to a given feature mapping . Any algorithm requires an exponential number of samples in the horizon H to output a non-trivially accurate estimate of the value of any given policy π , with constant probability . This hardness result states that even if the Q-functions of all polices are linear with respect to the given feature mapping , we still require an exponential number of samples to evaluate any given policy . Note that this representation condition is significantly stronger than assuming realizability with regards to only a single target policy ; it assumes realizability for all policies . Regardless , even under this stronger representation condition , it is hard to evaluate any policy , as specified in our hardness result . This result also formalizes a key issue in offline reinforcement learning with function approximation : geometric error amplification . To better illustrate the issue , in Section 5 , we analyze the classical Least-Squares Policy Evaluation ( LSPE ) algorithm under the realizability assumption , which demonstrates how the error propagates as the algorithm proceeds . Here , our analysis shows that , if we only rely on the realizability assumption , then a far more stringent condition is required for sample-efficient offline policy evaluation : the off-policy data distribution must be quite close to the distribution induced by the policy to be evaluated . 1Specifically , if the features have a uniformly bounded norm and if the minimum eigenvalue of the feature covariance matrix of our data is bounded away from 0 , say by 1/poly ( d ) , then we have good accuracy on any test distribution . See Assumption 2 and the comments thereafter . Our results highlight that sample-efficient offline RL is simply not possible unless either the distribution shift condition is sufficiently mild or we have stronger representation conditions that go well beyond realizability . See Section 5 for more details . Furthermore , our hardness result implies an exponential separation on the sample complexity between offline RL and supervised learning , since supervised learning ( which is equivalent to offline RL with H = 1 ) is possible with polynomial number of samples under the same set of assumptions . A few additional points are worth emphasizing with regards to our lower bound construction : • Our results imply that Least-Squares Policy Evaluation ( LSPE , i.e. , using Bellman backups with linear regression ) will fail . Interestingly , while LSPE will provide an unbiased estimator , our results imply that it will have exponential variance in the problem horizon . • Our construction is simple and does not rely on having a large state or action space : the size of the state space is only O ( d ·H ) where d is the feature dimension and H is the planning horizon , and the size of the action space is only is 2 . This stands in contrast to other RL lower bounds , which typically require state spaces that are exponential in the problem horizon ( e.g . see ( Du et al. , 2020 ) ) . • We provide two hard instances , one with a sparse reward ( and stochastic transitions ) and another with deterministic dynamics ( and stochastic rewards ) . These two hard instances jointly imply that both the estimation error on reward values and the estimation error on the transition probabilities could be geometrically amplified in offline RL . • Of possibly broader interest is that our hard instances are , to our knowledge , the first concrete examples showing that geometric error amplification is real in RL problems ( even with realizability ) . While this is a known concern in the analysis of RL algorithms , there have been no concrete examples exhibiting such behavior under only a realizability assumption . 2 RELATED WORK . We now survey prior work on offline RL , largely focusing on theoretical results . We also discuss results on the error amplification issue in RL . Concurrent to this work , Xie & Jiang ( 2020a ) propose a offline RL algorithm under the realizability assumption , which requires stronger distribution shift conditions . We will discuss this work shortly . Existing Algorithms and Analysis . Offline RL with value function approximation is closely related to Approximate Dynamic Programming ( Bertsekas & Tsitsiklis , 1995 ) . Existing work ( Munos , 2003 ; Szepesvári & Munos , 2005 ; Antos et al. , 2008 ; Munos & Szepesvári , 2008 ; Tosatto et al. , 2017 ; Xie & Jiang , 2020b ; Duan & Wang , 2020 ) that analyze the sample complexity of approximate dynamic programming-based approaches usually make the following two categories of assumptions : ( i ) representation conditions that assume the function class approximates the value functions well and ( ii ) distribution shift conditions that assume the given data distribution has sufficient coverage over the state-action space . As mentioned in the introduction , the desired representation condition would be realizability , which only assumes the value function of the policy to be evaluated lies in the function class ( for the case of offline policy evaluation ) or the optimal value function lies in the function class ( for the case of finding near-optimal policies ) , and existing works usually make stronger assumptions . For example , Szepesvári & Munos ( 2005 ) ; Duan & Wang ( 2020 ) assume ( approximate ) closedness under Bellman updates , which is much stronger than realizability . Whether it is possible to design a sample-efficient offline RL method under the realizability assumption and reasonable data coverage assumption , is left as an open problem in ( Chen & Jiang , 2019 ) . To measure the coverage over the state-action space of the given data distribution , existing works assume the concentrability coefficient ( introduced by Munos ( 2003 ) ) to be bounded . The concentrability coefficient , informally speaking , is the largest possible ratio between the probability for a state-action pair ( s , a ) to be visited by a policy , and the probability that ( s , a ) appears on the data distribution . Since we work with linear function approximation in this work , we measure the distribution shift in terms of the spectrum of the feature covariance matrices ( see Assumption 2 ) , which is a well-known sufficient condition in the context of supervised learning and is much more natural for the case of linear function approximation . Concurrent to this work , Xie & Jiang ( 2020a ) propose an algorithm that works under the realizability assumption instead of other stronger representation conditions used in prior work . However , the algorithm in ( Xie & Jiang , 2020a ) requires a much stronger data distribution condition which assumes a stringent version of concentrability coefficient introduced by ( Munos , 2003 ) to be bounded . In contrast , in this work we measure the distribution shift in terms of the spectrum of the feature covariance matrix of the data distribution , which is more natural than the concentrability coefficient for the case of linear function approximation . Recently , there has been great interest in approaching offline policy evaluation ( Precup , 2000 ) via importance sampling . For recent work on this topic , see ( Dudı́k et al. , 2011 ; Mandel et al. , 2014 ; Thomas et al. , 2015 ; Li et al. , 2015 ; Jiang & Li , 2016 ; Thomas & Brunskill , 2016 ; Guo et al. , 2017 ; Wang et al. , 2017 ; Liu et al. , 2018 ; Farajtabar et al. , 2018 ; Xie et al. , 2019 ; Kallus & Uehara , 2019 ; Liu et al. , 2019 ; Uehara & Jiang , 2019 ; Kallus & Uehara , 2020 ; Jiang & Huang , 2020 ; Feng et al. , 2020 ) . Offline policy evaluation with importance sampling incurs exponential variance in the planning horizon when the behavior policy is significantly different from the policy to be evaluated . Bypassing such exponential dependency requires non-trivial function approximation assumptions ( Jiang & Huang , 2020 ; Feng et al. , 2020 ; Liu et al. , 2018 ) . Finally , Kidambi et al . ( 2020 ) provide a model-based offline RL algorithm , with a theoretical analysis based on hitting times . Hardness Results . Algorithm-specific hardness results have been known for a long time in the literature of Approximate Dynamic Programming . See Chapter 4 in ( Van Roy , 1994 ) and also ( Gordon , 1995 ; Tsitsiklis & Van Roy , 1996 ) . These works demonstrate that certain approximate dynamic programming-based methods will diverge on hard cases . However , such hardness results only hold for a restricted class of algorithms , and to demonstrate the fundamental difficulty of offline RL , it is more desirable to obtain information-theoretic lower bounds as initiated by Chen & Jiang ( 2019 ) . Existing ( information-theoretic ) exponential lower bounds ( Krishnamurthy et al. , 2016 ; Sun et al. , 2017 ; Chen & Jiang , 2019 ) usually construct unstructured MDPs with an exponentially large state space . Du et al . ( 2020 ) prove an exponential lower bound under the assumption that the optimal Qfunction is approximately linear . The condition that the optimal Q-function is only approximately linear is crucial for the hardness result in Du et al . ( 2020 ) . The techniques in ( Du et al. , 2020 ) are later generalized to other settings ( Kumar et al. , 2020 ; Wang et al. , 2020 ; Mou et al. , 2020 ) . Error Amplification In RL . Error amplification induced by distribution shift and long planning horizon is a known issue in the theoretical analysis of RL algorithms . See ( Gordon , 1995 ; 1996 ; Munos & Moore , 1999 ; Ormoneit & Sen , 2002 ; Kakade , 2003 ; Zanette et al. , 2019 ) for papers on this topic and additional assumptions that mitigate this issue . Error amplification in offline RL is also observed in empirical works ( see e.g . ( Fujimoto et al. , 2019 ) ) . In this work , we provide the first information-theoretic lower bound showing that geometric error amplification is real in offline RL . | The paper provides a theoretical analysis on the sample complexity of OPE with linear function approximation and assumptions on representation and distribution shift. The main results shows that realizability and feature coverage are not sufficient to guarantee a polynomial sample complexity. The paper also provides a performance guarantee for LSVI with a stronger assumption on the distribution shift. | SP:32d66326d021e4868f893849d6628d7c86da55a9 |
What are the Statistical Limits of Offline RL with Linear Function Approximation? | 1 INTRODUCTION . Offline methods ( also known as off-policy methods or batch methods ) are a promising methodology to alleviate the sample complexity burden in challenging reinforcement learning ( RL ) settings , particularly those where sample efficiency is paramount ( Mandel et al. , 2014 ; Gottesman et al. , 2018 ; Wang et al. , 2018 ; Yu et al. , 2019 ) . Off-policy methods are often applied together with function approximation schemes ; such methods take sample transition data and reward values as inputs , and approximate the value of a target policy or the value function of the optimal policy . Indeed , many practical deep RL algorithms find their prototypes in the literature of offline RL . For example , when running on off-policy data ( sometimes termed as “ experience replay ” ) , deep Q-networks ( DQN ) ( Mnih et al. , 2015 ) can be viewed as an analog of Fitted Q-Iteration ( Gordon , 1999 ) with neural networks being the function approximators . More recently , there are an increasing number of both model-free ( Laroche et al. , 2019 ; Fujimoto et al. , 2019 ; Jaques et al. , 2020 ; Kumar et al. , 2019 ; Agarwal et al. , 2020 ) and model-based ( Ross & Bagnell , 2012 ; Kidambi et al. , 2020 ) offline RL methods , with steady improvements in performance ( Fujimoto et al. , 2019 ; Kumar et al. , 2019 ; Wu et al. , 2020 ; Kidambi et al. , 2020 ) . However , despite the importance of these methods , the extent to which data reuse is possible , especially when off-policy methods are combined with function approximation , is not well understood . For example , deepQ-network requires millions of samples to solve certain Atari games ( Mnih et al. , 2015 ) . Also important is that in some safety-critical settings , we seek guarantees when offline- trained policies can be effective ( Thomas , 2014 ; Thomas et al. , 2019 ) . A basic question here is that if there are fundamental statistical limits on such methods , where sample-efficient offline RL is simply not possible without further restrictions on the problem . In the context of supervised learning , it is well-known that empirical risk minimization is sampleefficient if the hypothesis class has bounded complexity . For example , suppose the agent is given a d-dimensional feature extractor , and the ground truth labeling function is a ( realizable ) linear function with respect to the feature mapping . Here , it is well-known that a polynomial number of samples in d suffice for a given target accuracy . Furthermore , in this realizable case , provided the training data has a good feature coverage , then we will have good accuracy against any test distribution.1 In the more challenging offline RL setting , it is unclear if sample-efficient methods are possible , even under analogous assumptions . This is our motivation to consider the following question : What are the statistical limits for offline RL with linear function approximation ? Here , one may hope that value estimation for a given policy is possible in the offline RL setting under the analogous set of assumptions that enable sample-efficient supervised learning , i.e. , 1 ) ( realizability ) the features can perfectly represent the value functions and 2 ) ( good coverage ) the feature covariance matrix of our off-policy data has lower bounded eigenvalues . The extant body of provable methods on offline RL either make representational assumptions that are far stronger than realizability or assume distribution shift conditions that are far stronger than having coverage with regards to the spectrum of the feature covariance matrix of the data distribution . For example , Szepesvári & Munos ( 2005 ) analyze offline RL methods by assuming a representational condition where the features satisfy ( approximate ) closedness under Bellman updates , which is a far stronger representation condition than realizability . Recently , Xie & Jiang ( 2020a ) propose a offline RL algorithm that only requires realizability as the representation condition . However , the algorithm in ( Xie & Jiang , 2020a ) requires a more stringent data distribution condition . Whether it is possible to design a sample-efficient offline RL method under the realizability assumption and a reasonable data coverage assumption — an open problem in ( Chen & Jiang , 2019 ) — is the focus of this work . Our Contributions . Perhaps surprisingly , our main result shows that , under only the above two assumptions , it is information-theoretically not possible to design a sample-efficient algorithm to non-trivially estimate the value of a given policy . The following theorem is an informal version of the result in Section 4 . Theorem 1.1 ( Informal ) . In the offline RL setting , suppose the data distributions have ( polynomially ) lower bounded eigenvalues , and the Q-functions of every policy are linear with respect to a given feature mapping . Any algorithm requires an exponential number of samples in the horizon H to output a non-trivially accurate estimate of the value of any given policy π , with constant probability . This hardness result states that even if the Q-functions of all polices are linear with respect to the given feature mapping , we still require an exponential number of samples to evaluate any given policy . Note that this representation condition is significantly stronger than assuming realizability with regards to only a single target policy ; it assumes realizability for all policies . Regardless , even under this stronger representation condition , it is hard to evaluate any policy , as specified in our hardness result . This result also formalizes a key issue in offline reinforcement learning with function approximation : geometric error amplification . To better illustrate the issue , in Section 5 , we analyze the classical Least-Squares Policy Evaluation ( LSPE ) algorithm under the realizability assumption , which demonstrates how the error propagates as the algorithm proceeds . Here , our analysis shows that , if we only rely on the realizability assumption , then a far more stringent condition is required for sample-efficient offline policy evaluation : the off-policy data distribution must be quite close to the distribution induced by the policy to be evaluated . 1Specifically , if the features have a uniformly bounded norm and if the minimum eigenvalue of the feature covariance matrix of our data is bounded away from 0 , say by 1/poly ( d ) , then we have good accuracy on any test distribution . See Assumption 2 and the comments thereafter . Our results highlight that sample-efficient offline RL is simply not possible unless either the distribution shift condition is sufficiently mild or we have stronger representation conditions that go well beyond realizability . See Section 5 for more details . Furthermore , our hardness result implies an exponential separation on the sample complexity between offline RL and supervised learning , since supervised learning ( which is equivalent to offline RL with H = 1 ) is possible with polynomial number of samples under the same set of assumptions . A few additional points are worth emphasizing with regards to our lower bound construction : • Our results imply that Least-Squares Policy Evaluation ( LSPE , i.e. , using Bellman backups with linear regression ) will fail . Interestingly , while LSPE will provide an unbiased estimator , our results imply that it will have exponential variance in the problem horizon . • Our construction is simple and does not rely on having a large state or action space : the size of the state space is only O ( d ·H ) where d is the feature dimension and H is the planning horizon , and the size of the action space is only is 2 . This stands in contrast to other RL lower bounds , which typically require state spaces that are exponential in the problem horizon ( e.g . see ( Du et al. , 2020 ) ) . • We provide two hard instances , one with a sparse reward ( and stochastic transitions ) and another with deterministic dynamics ( and stochastic rewards ) . These two hard instances jointly imply that both the estimation error on reward values and the estimation error on the transition probabilities could be geometrically amplified in offline RL . • Of possibly broader interest is that our hard instances are , to our knowledge , the first concrete examples showing that geometric error amplification is real in RL problems ( even with realizability ) . While this is a known concern in the analysis of RL algorithms , there have been no concrete examples exhibiting such behavior under only a realizability assumption . 2 RELATED WORK . We now survey prior work on offline RL , largely focusing on theoretical results . We also discuss results on the error amplification issue in RL . Concurrent to this work , Xie & Jiang ( 2020a ) propose a offline RL algorithm under the realizability assumption , which requires stronger distribution shift conditions . We will discuss this work shortly . Existing Algorithms and Analysis . Offline RL with value function approximation is closely related to Approximate Dynamic Programming ( Bertsekas & Tsitsiklis , 1995 ) . Existing work ( Munos , 2003 ; Szepesvári & Munos , 2005 ; Antos et al. , 2008 ; Munos & Szepesvári , 2008 ; Tosatto et al. , 2017 ; Xie & Jiang , 2020b ; Duan & Wang , 2020 ) that analyze the sample complexity of approximate dynamic programming-based approaches usually make the following two categories of assumptions : ( i ) representation conditions that assume the function class approximates the value functions well and ( ii ) distribution shift conditions that assume the given data distribution has sufficient coverage over the state-action space . As mentioned in the introduction , the desired representation condition would be realizability , which only assumes the value function of the policy to be evaluated lies in the function class ( for the case of offline policy evaluation ) or the optimal value function lies in the function class ( for the case of finding near-optimal policies ) , and existing works usually make stronger assumptions . For example , Szepesvári & Munos ( 2005 ) ; Duan & Wang ( 2020 ) assume ( approximate ) closedness under Bellman updates , which is much stronger than realizability . Whether it is possible to design a sample-efficient offline RL method under the realizability assumption and reasonable data coverage assumption , is left as an open problem in ( Chen & Jiang , 2019 ) . To measure the coverage over the state-action space of the given data distribution , existing works assume the concentrability coefficient ( introduced by Munos ( 2003 ) ) to be bounded . The concentrability coefficient , informally speaking , is the largest possible ratio between the probability for a state-action pair ( s , a ) to be visited by a policy , and the probability that ( s , a ) appears on the data distribution . Since we work with linear function approximation in this work , we measure the distribution shift in terms of the spectrum of the feature covariance matrices ( see Assumption 2 ) , which is a well-known sufficient condition in the context of supervised learning and is much more natural for the case of linear function approximation . Concurrent to this work , Xie & Jiang ( 2020a ) propose an algorithm that works under the realizability assumption instead of other stronger representation conditions used in prior work . However , the algorithm in ( Xie & Jiang , 2020a ) requires a much stronger data distribution condition which assumes a stringent version of concentrability coefficient introduced by ( Munos , 2003 ) to be bounded . In contrast , in this work we measure the distribution shift in terms of the spectrum of the feature covariance matrix of the data distribution , which is more natural than the concentrability coefficient for the case of linear function approximation . Recently , there has been great interest in approaching offline policy evaluation ( Precup , 2000 ) via importance sampling . For recent work on this topic , see ( Dudı́k et al. , 2011 ; Mandel et al. , 2014 ; Thomas et al. , 2015 ; Li et al. , 2015 ; Jiang & Li , 2016 ; Thomas & Brunskill , 2016 ; Guo et al. , 2017 ; Wang et al. , 2017 ; Liu et al. , 2018 ; Farajtabar et al. , 2018 ; Xie et al. , 2019 ; Kallus & Uehara , 2019 ; Liu et al. , 2019 ; Uehara & Jiang , 2019 ; Kallus & Uehara , 2020 ; Jiang & Huang , 2020 ; Feng et al. , 2020 ) . Offline policy evaluation with importance sampling incurs exponential variance in the planning horizon when the behavior policy is significantly different from the policy to be evaluated . Bypassing such exponential dependency requires non-trivial function approximation assumptions ( Jiang & Huang , 2020 ; Feng et al. , 2020 ; Liu et al. , 2018 ) . Finally , Kidambi et al . ( 2020 ) provide a model-based offline RL algorithm , with a theoretical analysis based on hitting times . Hardness Results . Algorithm-specific hardness results have been known for a long time in the literature of Approximate Dynamic Programming . See Chapter 4 in ( Van Roy , 1994 ) and also ( Gordon , 1995 ; Tsitsiklis & Van Roy , 1996 ) . These works demonstrate that certain approximate dynamic programming-based methods will diverge on hard cases . However , such hardness results only hold for a restricted class of algorithms , and to demonstrate the fundamental difficulty of offline RL , it is more desirable to obtain information-theoretic lower bounds as initiated by Chen & Jiang ( 2019 ) . Existing ( information-theoretic ) exponential lower bounds ( Krishnamurthy et al. , 2016 ; Sun et al. , 2017 ; Chen & Jiang , 2019 ) usually construct unstructured MDPs with an exponentially large state space . Du et al . ( 2020 ) prove an exponential lower bound under the assumption that the optimal Qfunction is approximately linear . The condition that the optimal Q-function is only approximately linear is crucial for the hardness result in Du et al . ( 2020 ) . The techniques in ( Du et al. , 2020 ) are later generalized to other settings ( Kumar et al. , 2020 ; Wang et al. , 2020 ; Mou et al. , 2020 ) . Error Amplification In RL . Error amplification induced by distribution shift and long planning horizon is a known issue in the theoretical analysis of RL algorithms . See ( Gordon , 1995 ; 1996 ; Munos & Moore , 1999 ; Ormoneit & Sen , 2002 ; Kakade , 2003 ; Zanette et al. , 2019 ) for papers on this topic and additional assumptions that mitigate this issue . Error amplification in offline RL is also observed in empirical works ( see e.g . ( Fujimoto et al. , 2019 ) ) . In this work , we provide the first information-theoretic lower bound showing that geometric error amplification is real in offline RL . | This paper presents a impossibility result for value-function approximation in batch-mode RL. The chart below puts this work in context. This work essentially shows -- through a constructive example of an MDP -- that the amount of data needed for approximating Q values must increases exponentially with the horizon in episodic RL tasks even if we assume that the Q-values are realizable and that the features gathered by the behavior policy -- that collected the data -- are uncorrelated. This problem arises because the data gathering policy can fail to get data from all states even though the features themselves are uncorrelated. | SP:32d66326d021e4868f893849d6628d7c86da55a9 |
Dynamic Graph Representation Learning with Fourier Temporal State Embedding | 1 INTRODUCTION . Graph Representation Learning learns the graphs with low-dimensional vectors at nodes and graphs level . ( Perozzi et al. , 2014 ; Tang et al. , 2015 ; Wang et al. , 2016 ; Cao et al. , 2015 ; Ou et al. , 2016 ) In recent years , deep neural networks ( DNNs ) are extended to process graphical data and have been utilized in a plethora of real-time cases . ( Estrach et al. , 2014 ; Duvenaud et al. , 2015 ; Defferrard et al. , 2016 ; Li et al. , 2015 ; Gilmer et al. , 2017 ; Kipf & Welling , 2016 ; Hamilton et al. , 2017 ; Jin et al. , 2017 ; Chen et al. , 2018 ; Veličković et al. , 2018 ; Gao & Ji , 2019 ) . One of the most popular networks is Graph Convolution Neural Networks ( GCNs ) which originated from Spectral Graph Theory but developed into spatial-based varieties . GCNs are natural extensions of Convolution Neural Networks ( CNNs ) which has been widely studied and used in many applications in different fields of research . Traditional GCNs have achieved commendable performance on static graphs . However , many applications involved dynamic graphs where nodes and edges evolved steadily over time . For example , a social network is updated on a day-to-day basis as people developed new friends . The dynamic graph represented users ’ evolving social relationships . In financial networks , transactions between nodes naturally adopt time-stamps as temporal features . Transactions of different nature may perform differently in a financial network where our main focus is to find malicious parties . Learning the evolving nature of graphs is an important task where we predict future graphical features and classify nodes based on their past behaviors . Learning evolving graphs poses great challenges on traditional GCN as temporal features can not be easily incorporated into learning algorithms . The simple way of concatenating GCNs with RNNs is straight forward in handling dynamic graphs , but it suffered from many drawbacks . We can summarize them as three folds : Firstly , the embedding vector of each node is not static and will be evolving with time . Models need to be capable of capturing the evolving nature . Secondly , the memory and computation cost for batch training is huge to keep multiple graphs from different timesteps in the memory at the same time . Finally , the large number of timesteps within a single batch brings difficulties to high precision modeling . There is also a focus on using Deep Neural Networks to generate the graph embedding recently ( Trivedi et al. , 2018 ; Pareja et al. , 2020 ; Xu et al. , 2020 ) as another direction compared with traditional unsupervised dynamic graph embedding approaches ( Nguyen et al. , 2018 ; Li et al. , 2018 ; Goyal et al. , 2018 ; 2020 ) . Existing methods normally utilize Sequential Models ( e.g.Recurrent Neural Networks ( RNNs ) ) to learn temporal features . However , as the graph is a non-linear data structure , sequential model-based approaches are memory-costly to train and evaluate with the information from the whole graph as input . Meanwhile , pure GCN approaches built for static graphs are inefficient in capturing evolving features . Some approaches combining GCNs with RNNs ( Trivedi et al. , 2018 ; Pareja et al. , 2020 ) are costly to evaluate due to the high time complexity induced by repeated Graph Convolutions as well as high space complexity caused by a large number of network parameters . Meanwhile , the RNN-based method could only see through a fixed amount of history timesteps in training , which makes the prediction imprecise . We introduced Fourier temporal state embedding ( FTSE ) to address the above problem . Instead of using sequential models to model the evolving nature of edges , we formalize the existence of edges as a signal , transforming the original embedding problem into signal processing . We also designed a simple and efficient Edge-Convolution Network structure for FTSE and compared the complexity of it with RNN based approaches . Our main technique is Discrete-Time Fourier Transform ( DTFT for short ) , which transforms the discrete temporal signal into its continuous frequency domain . Therefore , we can embed history timesteps into a fixed-length vector , enlarging the receptive field in a single batch . Our empirical study shows that FTSE is an efficient method in modeling temporal graphs and a good approach to model the signal with high precision . We summarize the contribution of this work as follows : 1 . We proposed Fourier Temporal State Embedding ( FTSE ) to learn dynamic graph representation via transforming time-series signal into the frequency domain . FTSE directly modeled the harmonic component rather than timesteps . We also designed a simple but potent edge convolution network to model continuous-time dynamic graphs . FTSE is also the first GCN based approach capable of modeling continuous time dynamic graphs ( CTDGs ) . 2 . We studied the drawbacks of sequential-based methods in time and space complexity and justified that FTSE has much lower complexity and smaller parameter scale , making it a more efficient alternative to sequential-based approaches . This has also been proven with experiments . 3 . Extensive empirical study showed that FTSE significantly outperforms previous methods in convergence speed as well as model performance in Link Prediction , Node/Edge Classification , achieving more than 10 % improvement on some datasets . 2 RELATED WORK . Many static network embedding methods are proposed to map the nodes to low-dimensional vector representations while preserving network structure as well as node information . Both supervised and unsupervised techniques have been designed . Dynamic graph embedding methods are often extensions of their static counterparts . DANE ( Roweis & Saul , 2000 ; Belkin & Niyogi , 2002 ) used a matrix factorization-based approach to generate static node embeddings from eigenvectors of graph Laplacian matrix . This work was extended by ( Li et al. , 2017 ) by updating eigenvectors from previous ones to generate dynamic node embeddings . Random-walk based approaches ( Perozzi et al. , 2014 ; Grover & Leskovec , 2016 ) used normalized inner products of node embedding to model the transition probabilities in random-walk . These two approaches are extended by CTDANE ( Nguyen et al. , 2018 ) , which proposes to walk on the temporal order . Deep learning approaches are also popular in this area thanks to the flourishing new models . DynGEM ( Kamra et al. , 2017 ) used an autoencoding approach which minimizes the reconstruction loss as well as the distance of connected nodes in the embedding space . The point process-based approach is also popular in dynamic knowledge graph modeling . KnowEvolve ( Trivedi et al. , 2018 ) and DyRep ( Trivedi et al. , 2018 ) model the occurrence of edges as a point-process and model the intensity function with neural networks . DynamicTriad ( Zhou et al. , 2018 ) focuses on the basic ’ triad closure process ’ where a group of three vertices is developed from unconnected vertices . They proved that this process is fundamental in graph evolving thereby making their model able to predict network dynamics . HTNE ( Zhou et al. , 2018 ) used the Hawkes process with the attention mechanism to determine the influence of historical neighbors . Point process based approaches are especially good at event time prediction . Another set of approaches comes from the combination of Graph Neural Networks ( GNNs ) with Sequential Networks ( e.g . RNNs ) . GNNs are used to digest topological information and RNNs are used to handle dynamism . Graph Convolution Neural Networks ( GCNs ) is one of the most explored GNNs in this setting . GCRN ( Seo et al. , 2018 ) proposed two methods . The first one is doing GCN first and feed its output to an LSTM to capture dynamism . The second one put LSTM as an alternative for Fully Connected Layer in GCN and feed it with node features . STGCN ( Yu et al. , 2018 ) proposed ST-Conv block which was composed of a 1D convolution on the temporal dimension of node features followed by a Graph Convolution layer and another 1D convolution . STGCN is designed for spatio-temporal traffic data , which had a fixed graph structure but dynamic node embeddings . EvolveGCN ( Pareja et al. , 2020 ) combines the two models together to form EvolveGCN-Unit . They propose two versions of it . In the first one , the GCN parameters are hidden state of a recurrent architecture that takes node embeddings as input . In the second one , the GCN parameters are the input of recurrent architecture . 3 PROBLEM FORMULATION . The dynamic graph has two notable varieties as has been formally defined in ( Kazemi & Goel , 2020 ) . Continuous-time dynamic graph ( CTDG ) can be represented as a pair ( G , O ) where G is a static graph representing the initial state of a dynamic graph at time t0 and O is a set of observations where each observation is a tuple of the form ( event type , event , timestep ) where an event can be a 1-step modification on the graph structure. ( e.g . edge addition , edge deletion , node addition ) At any point t ≤ t0 , we can obtain the snapshot Gt by updating G sequentially according to the observations O occured before time t. The discrete time dynamic graph ( DTDG ) is the sequence of snapshots coming from the dynamic graph sampled at fixed space . DTDG is defined as the set { G1 , G2 , ... GT } where Gt = ( Vt , Et ) is the snapshot at time t. Vt is the set of nodes in Gt , and Et is the set of edges in Gt . DTDG may lose information compared to their CTDG counterparts since it only includes snapshots at constant intervals . Models designed for CTDG are generally applicable to DTDG but the inverse is not necessarily true . CTDG problem can be approximated by DTDGs by aggregating G within a constant time period to form the snapshot . This time period is called granularity , denoting the length of time within a single timestep . The smaller the granularity , the better the approximation to the CTDG . Existing methods predominately focus on the DTDG problem and make approximations to the respective CTDG problem . FTSE , based on Fourier Transform , is capable of modeling CTDGs which we detailed in section 4 . For a more detailed discussion on the implementation of them , please refer to appendix B . The prediction problem could also be categorized into interpolation and extrapolation . Suppose we have information of G in time period [ t0 , tT ] . In interpolation problem , we make predictions on some time t such that t ∈ [ t0 , tT ] . It is also known as the completion problem as has been studied in ( Li et al. , 2017 ; Leblay & Chekol , 2018 ; Dasgupta et al. , 2018 ; Goel et al. , 2019 ) . In extrapolation problem , our goal is to make predictions at time t such that t ≥ tT . Extrapolation is a more challenging problem as it is trying to predict the future based on the past . In this work we focus on extrapolation problem . In some cases , the new observation is streamed to the model at a fast rate that we can not update the model in an on-line fashion . This is also called streaming scenario in ( Kazemi & Goel , 2020 ) . This concept is similar to that of inductive/transductive learning , where the difference lied in whether or not using the training set to do inference on the testing set . Compared with the non-streaming scenario where we are able to retrain the model once new data comes , this scenario poses greater challenges on the model ’ s capacity to generalize . | The article presents a new approach for learning representations of dynamic graphs. The method is based on Fourier Transform of edges over time, and separate GCNs are used for each Fourier mode (N FTSE) to stain temporal embeddings. Numerical results illustrate the performance of the method on there graph tasks, namely link prediction, node and edge classifications. | SP:18e3aa22c55669fd93fff33b31cb023cc5a4e9f6 |
Dynamic Graph Representation Learning with Fourier Temporal State Embedding | 1 INTRODUCTION . Graph Representation Learning learns the graphs with low-dimensional vectors at nodes and graphs level . ( Perozzi et al. , 2014 ; Tang et al. , 2015 ; Wang et al. , 2016 ; Cao et al. , 2015 ; Ou et al. , 2016 ) In recent years , deep neural networks ( DNNs ) are extended to process graphical data and have been utilized in a plethora of real-time cases . ( Estrach et al. , 2014 ; Duvenaud et al. , 2015 ; Defferrard et al. , 2016 ; Li et al. , 2015 ; Gilmer et al. , 2017 ; Kipf & Welling , 2016 ; Hamilton et al. , 2017 ; Jin et al. , 2017 ; Chen et al. , 2018 ; Veličković et al. , 2018 ; Gao & Ji , 2019 ) . One of the most popular networks is Graph Convolution Neural Networks ( GCNs ) which originated from Spectral Graph Theory but developed into spatial-based varieties . GCNs are natural extensions of Convolution Neural Networks ( CNNs ) which has been widely studied and used in many applications in different fields of research . Traditional GCNs have achieved commendable performance on static graphs . However , many applications involved dynamic graphs where nodes and edges evolved steadily over time . For example , a social network is updated on a day-to-day basis as people developed new friends . The dynamic graph represented users ’ evolving social relationships . In financial networks , transactions between nodes naturally adopt time-stamps as temporal features . Transactions of different nature may perform differently in a financial network where our main focus is to find malicious parties . Learning the evolving nature of graphs is an important task where we predict future graphical features and classify nodes based on their past behaviors . Learning evolving graphs poses great challenges on traditional GCN as temporal features can not be easily incorporated into learning algorithms . The simple way of concatenating GCNs with RNNs is straight forward in handling dynamic graphs , but it suffered from many drawbacks . We can summarize them as three folds : Firstly , the embedding vector of each node is not static and will be evolving with time . Models need to be capable of capturing the evolving nature . Secondly , the memory and computation cost for batch training is huge to keep multiple graphs from different timesteps in the memory at the same time . Finally , the large number of timesteps within a single batch brings difficulties to high precision modeling . There is also a focus on using Deep Neural Networks to generate the graph embedding recently ( Trivedi et al. , 2018 ; Pareja et al. , 2020 ; Xu et al. , 2020 ) as another direction compared with traditional unsupervised dynamic graph embedding approaches ( Nguyen et al. , 2018 ; Li et al. , 2018 ; Goyal et al. , 2018 ; 2020 ) . Existing methods normally utilize Sequential Models ( e.g.Recurrent Neural Networks ( RNNs ) ) to learn temporal features . However , as the graph is a non-linear data structure , sequential model-based approaches are memory-costly to train and evaluate with the information from the whole graph as input . Meanwhile , pure GCN approaches built for static graphs are inefficient in capturing evolving features . Some approaches combining GCNs with RNNs ( Trivedi et al. , 2018 ; Pareja et al. , 2020 ) are costly to evaluate due to the high time complexity induced by repeated Graph Convolutions as well as high space complexity caused by a large number of network parameters . Meanwhile , the RNN-based method could only see through a fixed amount of history timesteps in training , which makes the prediction imprecise . We introduced Fourier temporal state embedding ( FTSE ) to address the above problem . Instead of using sequential models to model the evolving nature of edges , we formalize the existence of edges as a signal , transforming the original embedding problem into signal processing . We also designed a simple and efficient Edge-Convolution Network structure for FTSE and compared the complexity of it with RNN based approaches . Our main technique is Discrete-Time Fourier Transform ( DTFT for short ) , which transforms the discrete temporal signal into its continuous frequency domain . Therefore , we can embed history timesteps into a fixed-length vector , enlarging the receptive field in a single batch . Our empirical study shows that FTSE is an efficient method in modeling temporal graphs and a good approach to model the signal with high precision . We summarize the contribution of this work as follows : 1 . We proposed Fourier Temporal State Embedding ( FTSE ) to learn dynamic graph representation via transforming time-series signal into the frequency domain . FTSE directly modeled the harmonic component rather than timesteps . We also designed a simple but potent edge convolution network to model continuous-time dynamic graphs . FTSE is also the first GCN based approach capable of modeling continuous time dynamic graphs ( CTDGs ) . 2 . We studied the drawbacks of sequential-based methods in time and space complexity and justified that FTSE has much lower complexity and smaller parameter scale , making it a more efficient alternative to sequential-based approaches . This has also been proven with experiments . 3 . Extensive empirical study showed that FTSE significantly outperforms previous methods in convergence speed as well as model performance in Link Prediction , Node/Edge Classification , achieving more than 10 % improvement on some datasets . 2 RELATED WORK . Many static network embedding methods are proposed to map the nodes to low-dimensional vector representations while preserving network structure as well as node information . Both supervised and unsupervised techniques have been designed . Dynamic graph embedding methods are often extensions of their static counterparts . DANE ( Roweis & Saul , 2000 ; Belkin & Niyogi , 2002 ) used a matrix factorization-based approach to generate static node embeddings from eigenvectors of graph Laplacian matrix . This work was extended by ( Li et al. , 2017 ) by updating eigenvectors from previous ones to generate dynamic node embeddings . Random-walk based approaches ( Perozzi et al. , 2014 ; Grover & Leskovec , 2016 ) used normalized inner products of node embedding to model the transition probabilities in random-walk . These two approaches are extended by CTDANE ( Nguyen et al. , 2018 ) , which proposes to walk on the temporal order . Deep learning approaches are also popular in this area thanks to the flourishing new models . DynGEM ( Kamra et al. , 2017 ) used an autoencoding approach which minimizes the reconstruction loss as well as the distance of connected nodes in the embedding space . The point process-based approach is also popular in dynamic knowledge graph modeling . KnowEvolve ( Trivedi et al. , 2018 ) and DyRep ( Trivedi et al. , 2018 ) model the occurrence of edges as a point-process and model the intensity function with neural networks . DynamicTriad ( Zhou et al. , 2018 ) focuses on the basic ’ triad closure process ’ where a group of three vertices is developed from unconnected vertices . They proved that this process is fundamental in graph evolving thereby making their model able to predict network dynamics . HTNE ( Zhou et al. , 2018 ) used the Hawkes process with the attention mechanism to determine the influence of historical neighbors . Point process based approaches are especially good at event time prediction . Another set of approaches comes from the combination of Graph Neural Networks ( GNNs ) with Sequential Networks ( e.g . RNNs ) . GNNs are used to digest topological information and RNNs are used to handle dynamism . Graph Convolution Neural Networks ( GCNs ) is one of the most explored GNNs in this setting . GCRN ( Seo et al. , 2018 ) proposed two methods . The first one is doing GCN first and feed its output to an LSTM to capture dynamism . The second one put LSTM as an alternative for Fully Connected Layer in GCN and feed it with node features . STGCN ( Yu et al. , 2018 ) proposed ST-Conv block which was composed of a 1D convolution on the temporal dimension of node features followed by a Graph Convolution layer and another 1D convolution . STGCN is designed for spatio-temporal traffic data , which had a fixed graph structure but dynamic node embeddings . EvolveGCN ( Pareja et al. , 2020 ) combines the two models together to form EvolveGCN-Unit . They propose two versions of it . In the first one , the GCN parameters are hidden state of a recurrent architecture that takes node embeddings as input . In the second one , the GCN parameters are the input of recurrent architecture . 3 PROBLEM FORMULATION . The dynamic graph has two notable varieties as has been formally defined in ( Kazemi & Goel , 2020 ) . Continuous-time dynamic graph ( CTDG ) can be represented as a pair ( G , O ) where G is a static graph representing the initial state of a dynamic graph at time t0 and O is a set of observations where each observation is a tuple of the form ( event type , event , timestep ) where an event can be a 1-step modification on the graph structure. ( e.g . edge addition , edge deletion , node addition ) At any point t ≤ t0 , we can obtain the snapshot Gt by updating G sequentially according to the observations O occured before time t. The discrete time dynamic graph ( DTDG ) is the sequence of snapshots coming from the dynamic graph sampled at fixed space . DTDG is defined as the set { G1 , G2 , ... GT } where Gt = ( Vt , Et ) is the snapshot at time t. Vt is the set of nodes in Gt , and Et is the set of edges in Gt . DTDG may lose information compared to their CTDG counterparts since it only includes snapshots at constant intervals . Models designed for CTDG are generally applicable to DTDG but the inverse is not necessarily true . CTDG problem can be approximated by DTDGs by aggregating G within a constant time period to form the snapshot . This time period is called granularity , denoting the length of time within a single timestep . The smaller the granularity , the better the approximation to the CTDG . Existing methods predominately focus on the DTDG problem and make approximations to the respective CTDG problem . FTSE , based on Fourier Transform , is capable of modeling CTDGs which we detailed in section 4 . For a more detailed discussion on the implementation of them , please refer to appendix B . The prediction problem could also be categorized into interpolation and extrapolation . Suppose we have information of G in time period [ t0 , tT ] . In interpolation problem , we make predictions on some time t such that t ∈ [ t0 , tT ] . It is also known as the completion problem as has been studied in ( Li et al. , 2017 ; Leblay & Chekol , 2018 ; Dasgupta et al. , 2018 ; Goel et al. , 2019 ) . In extrapolation problem , our goal is to make predictions at time t such that t ≥ tT . Extrapolation is a more challenging problem as it is trying to predict the future based on the past . In this work we focus on extrapolation problem . In some cases , the new observation is streamed to the model at a fast rate that we can not update the model in an on-line fashion . This is also called streaming scenario in ( Kazemi & Goel , 2020 ) . This concept is similar to that of inductive/transductive learning , where the difference lied in whether or not using the training set to do inference on the testing set . Compared with the non-streaming scenario where we are able to retrain the model once new data comes , this scenario poses greater challenges on the model ’ s capacity to generalize . | This paper presents a new method called Fourier temporal state embedding. The motivation for this approach is unclear and should be appropriately justified. In the abstract and introduction, the claim appears to be that previous methods are not time nor memory-efficient, and therefore FTSE is proposed. But this is obviously not true. So it is unclear what this new approach offers compared to the state-of-the-art. In Table 1, why not report performance for more standard baselines like CTDNE? The clarity and writing of this work require significant improvement. There are many incomplete and incorrect sentences throughout the paper that make it difficult if not impossible to understand. In the problem formulation, CTDG and DTDG were originally introduced in the CTDNE paper, but instead a more recent 2020 paper is referenced. Many of the ideas are never fully explained properly. The labels in nearly all the figures need to be appropriately sized, as they are impossible to read. | SP:18e3aa22c55669fd93fff33b31cb023cc5a4e9f6 |
Robust Constrained Reinforcement Learning for Continuous Control with Model Misspecification | 1 INTRODUCTION . Reinforcement Learning ( RL ) has had a number of recent successes in various application domains which include computer games ( Silver et al. , 2017 ; Mnih et al. , 2015 ; Tessler et al. , 2017 ) and robotics ( Abdolmaleki et al. , 2018a ) . As RL and deep learning continue to scale , an increasing number of real-world applications may become viable candidates to take advantage of this technology . However , the application of RL to real-world systems is often associated with a number of challenges ( Dulac-Arnold et al. , 2019 ; Dulac-Arnold et al. , 2020 ) . We will focus on the following two : Challenge 1 - Constraint satisfaction : One such challenge is that many real-world systems have constraints that need to be satisfied upon deployment ( i.e. , hard constraints ) ; or at least the number of constraint violations as defined by the system need to be reduced as much as possible ( i.e. , soft-constraints ) . This is prevalent in applications ranging from physical control systems such as autonomous driving and robotics to user facing applications such as recommender systems . Challenge 2 - Model Misspecification ( MM ) : Many of these systems suffer from another challenge : model misspecification . We refer to the situation in which an agent is trained in one environment but deployed in a different , perturbed version of the environment as an instance of model misspecification . This may occur in many different applications and is well-motivated in the literature ( Mankowitz et al. , 2018 ; 2019 ; Derman et al. , 2018 ; 2019 ; Iyengar , 2005 ; Tamar et al. , 2014 ) . There has been much work on constrained optimization in the literature ( Altman , 1999 ; Tessler et al. , 2018 ; Efroni et al. , 2020 ; Achiam et al. , 2017 ; Bohez et al. , 2019 ) . However , to our knowledge , the effect of model misspecification on an agent ’ s ability to satisfy constraints at test time has not yet been investigated . ⇤indicates equal contribution . Constrained Model Misspecification ( CMM ) : We consider the scenario in which an agent is required to satisfy constraints at test time but is deployed in an environment that is different from its training environment ( i.e. , a perturbed version of the training environment ) . Deployment in a perturbed version of the environment may affect the return achieved by the agent as well as its ability to satisfy the constraints . We refer to this scenario as constrained model misspecification . This problem is prevalent in many real-world applications where constraints need to be satisfied but the environment is subject to state perturbations effects such as wear-and-tear , partial observability etc. , the exact nature of which may be unknown at training time . Since such perturbations can significantly impact the agent ’ s ability to satisfy the required constraints it is insufficient to simply ensure that constraints are satisfied in the unperturbed version of the environment . Instead , the presence of unknown environment variations needs to be factored into the training process . One area where such considerations are of particular practical relevance is sim2real transfer where the unknown sim2real gap can make it hard to ensure that constraints will be satisfied on the real system ( Andrychowicz et al. , 2018 ; Peng et al. , 2018 ; Wulfmeier et al. , 2017 ; Rastogi et al. , 2018 ; Christiano et al. , 2016 ) . Of course , one could address this issue by limiting the capabilities of the system being controlled in order to ensure that constraints are never violated , for instance by limiting the amount of current in an electric motor . Our hope is that our methods can outperform these more blunt techniques , while still ensuring constraint satisfaction in the deployment domain . Main Contributions : In this paper , we aim to bridge the two worlds of model misspecification and constraint satisfaction . We present an RL objective that enables us to optimize a policy that aims to be robust to CMM . Our contributions are as follows : ( 1 ) Introducing the Robust Return Robust Constraint ( R3C ) and Robust Constraint ( RC ) RL objectives that aim to mitigate CMM as defined above . This includes the definition of a Robust Constrained Markov Decision Process ( RC-MDP ) . ( 2 ) Derive corresponding R3C and RC value functions and Bellman operators . Provide an argument showing that these Bellman operators converge to fixed points . These are implemented in the policy evaluation step of actor-critic R3C algorithms . ( 3 ) Implement five different R3C and RC algorithmic variants on top of D4PG and DMPO , ( two state-of-the-art continuous control RL algorithms ) . ( 4 ) Empirically demonstrate the superior performance of our algorithms , compared to various baselines , with respect to mitigating CMM . This is shown consistently across 6 different Mujoco tasks from the Real-World RL ( RWRL ) suite1 . 2 BACKGROUND . 2.1 MARKOV DECISION PROCESSES . A Robust Markov Decision Process ( R-MDP ) is defined as a tuple hS , A , R , , Pi where S is a finite set of states , A is a finite set of actions , R : S ⇥ A ! R is a bounded reward function and 2 [ 0 , 1 ) is the discount factor ; P ( s , a ) ✓ M ( S ) is an uncertainty set where M ( S ) is the set of probability measures over next states s0 2 S. This is interpreted as an agent selecting a state and action pair , and the next state s0 is determined by a conditional measure p ( s0|s , a ) 2 P ( s , a ) ( Iyengar , 2005 ) . We want the agent to learn a policy ⇡ : S ! A , which is a mapping from states to actions that is robust with respect to this uncertainty set . For the purpose of this paper , we consider deterministic policies , but this can easily be extended to stochastic policies too . The robust value function V ⇡ : S ! R for a policy ⇡ is defined as V ⇡ ( s ) = infp2P ( s , ⇡ ( s ) ) V ⇡ , p ( s ) where V ⇡ , p ( s ) = r ( s , ⇡ ( s ) ) + p ( s0|s , ⇡ ( s ) ) V ⇡ , p ( s0 ) . A rectangularity assumption on the uncertainty set ( Iyengar , 2005 ) ensures that “ nature ” can choose a worst-case transition function independently for every state s and action a . This means that during a trajectory , at each timestep , nature can choose any transition model from the uncertainty set to reduce the performance of the agent . A robust policy optimizes for the robust ( worst-case ) expected return objective : JR ( ⇡ ) = infp2P Ep , ⇡ [ P1 t=0 trt ] . The robust value function can be expanded as V ⇡ ( s ) = r ( s , ⇡ ( s ) ) + infp2P ( s , ⇡ ( s ) ) Ep [ V ⇡ ( s0 ) |s , ⇡ ( s ) ] . As in ( Tamar et al. , 2014 ) , we can define an operator infP ( s , a ) v : R |S| ! R as infP ( s , a ) v = inf { p > v|p 2 P ( s , a ) } . We can also define an operator for some policy ⇡ as inf⇡ : R|S| ! R|S| where { inf⇡ v } ( s ) = inf P ( s , ⇡ ( s ) ) v. Then , we have defined the Robust Bellman 1https : //github.com/google-research/realworldrl_suite operator as follows T⇡RV ⇡ = r⇡ + inf⇡ V ⇡ . Both the robust Bellman operator T⇡R : R|S| ! R|S| for a fixed policy and the optimal robust Bellman operator T ⇤Rv ( s ) = max⇡ T ⇡ Rv ( s ) have previously been shown to be contractions ( Iyengar , 2005 ) . A Constrained Markov Decision Process ( CMDP ) is an extension to an MDP and consists of the tuple hS , A , P , R , C , i where S , A , R and are defined as in the MDP above and C : S⇥A ! RK is a mapping from a state s and action a to a K dimensional vector representing immediate costs relating to K constraint . We use K=1 from here on in and therefore C : S⇥A ! R. We refer to the cost for a specific state action tuple hs , ai at time t as ct ( s , a ) . The solution to a CMDP is a policy ⇡ : S ! A that learns to maximize return and satisfy the constraints . The agent aims to learn a policy that maximizes the expected return objective J⇡R = E [ P1 t=0 trt ] subject to J⇡C = E [ P1 t=0 tct ] where is a pre-defined constraint threshold . A number of approaches ( Tessler et al. , 2018 ; Bohez et al. , 2019 ) optimize the Lagrange relaxation of this objective min 0 max✓ J⇡R ( J⇡C ) by optimizing the Lagrange multiplier and the policy parameters ✓ using alternating optimization . We also define the constraint value function V ⇡ , pC : S ! R for a policy ⇡ as in ( Tessler et al. , 2018 ) where V ⇡ , pC ( s ) = c ( s , ⇡ ( s ) ) + p ( s 0|s , ⇡ ( s ) ) V ⇡ , pC ( s0 ) . 2.2 CONTINUOUS CONTROL RL ALGORITHMS . We address the CMM problem by modifying two well-known continuous control algorithms by having them optimize the RC and R3C objectives . The first algorithm is Maximum A-Posteriori Policy Optimization ( MPO ) . This is a continuous control RL algorithm that performs policy iteration using an RL form of expectation maximization ( Abdolmaleki et al. , 2018a ; b ) . We use the distributional-critic version in Abdolmaleki et al . ( 2020 ) , which we refer to as DMPO . The second algorithm is Distributed Distributional Deterministic Policy Gradient ( D4PG ) , which is a state-of-the-art actor-critic continuous control RL algorithm with a deterministic policy ( BarthMaron et al. , 2018 ) . It is an incremental improvement to DDPG ( Lillicrap et al. , 2015 ) with a distributional critic that is learned similarly to distributional MPO . 3 ROBUST CONSTRAINED ( RC ) OPTIMIZATION OBJECTIVE . We begin by defining a Robust Constrained MDP ( RC-MDP ) . This combines an R-MDP and C-MDP to yield the tuple hS , A , R , C , , Pi where all of the variables in the tuple are defined in Section 2 . We next define two optimization objectives that optimize the RC-MDP . The first variant attempts to learn a policy that is robust with respect to the return as well as constraint satisfaction - Robust Return Robust Constrained ( R3C ) objective . The second variant is only robust with respect to constraint satisfaction - Robust Constrained ( RC ) objective . Prior to defining these objectives , we add some important definitions . Definition 1 . The robust constrained value function V ⇡C : S ! R for a policy ⇡ is defined as V ⇡C ( s ) = supp2P ( s , ⇡ ( s ) ) V ⇡ , p C ( s ) = supp2P ( s , ⇡ ( s ) ) E⇡ , p P1 t=0 tct . This value function represents the worst-case sum of constraint penalties over the course of an episode with respect to the uncertainty set P ( s , a ) . We can also define an operator supP ( s , a ) v : R |S| ! R as supP ( s , a ) v = sup { p > v|p 2 P ( s , a ) } . In addition , we can define an operator on vectors for some policy ⇡ as sup⇡ : R|S| ! R|S| where { sup⇡ v } ( s ) = sup P ( s , ⇡ ( s ) ) v. Then , we can defined the Supremum Bellman operator T⇡sup : R|S| ! R|S| as follows T⇡supV ⇡ = r⇡ + sup⇡ V ⇡ . Note that this operator is a contraction since we get the same result if we replace T⇡inf with T ⇡ sup and replace V with V . An alternative derivation of the sup operator contraction has also been derived in the Appendix , Section A.3 for completeness . 3.0.1 ROBUST RETURN ROBUST CONSTRAINT ( R3C ) OBJECTIVE The R3C objective is defined as : max ⇡2⇧ inf p2P Ep , ⇡ X t tr ( st , at ) s.t . sup p02P Ep 0 , ⇡ X t tc ( st , at ) ( 1 ) Note , a couple of interesting properties about this objective : ( 1 ) it focuses on being robust with respect to the return for a pre-defined set of perturbations ; ( 2 ) the objective also attempts to be robust with respect to the worst case constraint value for the perturbation set . The Lagrange relaxation form of equation 1 is used to define an R3C value function . Definition 2 ( R3C Value Function ) . For a fixed , and using the above-mentioned rectangularity assumption ( Iyengar , 2005 ) , the R3C value function for a policy ⇡ is defined as the concatenation of two value functions V⇡ = f ( hV ⇡ , V ⇡C i ) = V ⇡ V ⇡C . This implies that we keep two separate estimates of V ⇡ and V ⇡C and combine them together to yield V ⇡ . The constraint threshold term offsets the value function , and has no effect on any policy improvement step2 . As a result , the dependency on is dropped . The next step is to define the R3C Bellman operator . This is presented in Definition 3 . Definition 3 ( R3C Bellman operator ) . The R3C Bellman operator is defined as two separate Bellman operators T⇡R3C = hT⇡inf , T⇡supi where T⇡inf is the robust Bellman operator ( Iyengar , 2005 ) and T⇡sup : R|S| ! R|S| is defined as the sup Bellman operator . Based on this definition , applying the R3C Bellman operator to V⇡ involves applying each of the Bellman operators to their respective value functions . That is , T⇡R3CV = T ⇡ infV T⇡supVC . It has been previously shown that T⇡inf is a contraction with respect to the max norm ( Tamar et al. , 2014 ) and therefore converges to a fixed point . We also provided an argument whereby T⇡sup is a contraction operator in the previous section as well as in Appendix , A.3 . These Bellman operators individually ensure that the robust value function V ( s ) and the constraint value function VC ( s ) converge to fixed points . Therefore , T ⇡R3CV also converges to a fixed point by construction . As a result of the above argument , we know that we can apply the R3C Bellman operator in value iteration or policy iteration algorithms in the policy evaluation step . This is achieved in practice by simultaneously learning both the robust value function V ⇡ ( s ) and the constraint value function V ⇡C ( s ) and combining these estimates to yield V ⇡ ( s ) . | The paper suggests two approaches to combine the concepts of robust Markov decision processes (MDPs) with that of constrained MDPs. In the first approach, called R3C, a worst-case setting is used for both the expected total discounted rewards criterion and the constraints on the state-action pairs. The robustness is defined with respect to all possible choices (from an uncertainty set) of transition-probability functions. In the second approach, called RC, only the constraints should be robust against all possible transition probabilities. The paper studies the value functions and the corresponding Bellman operators of these problems and argues that, in both cases, these operators are contractions in the supremum norm. Finally, numerical experiments are presented on RWRL problems, such as the cart-pole and the walker, showing the effect of using the redefined operators. | SP:9bc5be7060804da42581342ed69d6cd6cf2c90f3 |
Robust Constrained Reinforcement Learning for Continuous Control with Model Misspecification | 1 INTRODUCTION . Reinforcement Learning ( RL ) has had a number of recent successes in various application domains which include computer games ( Silver et al. , 2017 ; Mnih et al. , 2015 ; Tessler et al. , 2017 ) and robotics ( Abdolmaleki et al. , 2018a ) . As RL and deep learning continue to scale , an increasing number of real-world applications may become viable candidates to take advantage of this technology . However , the application of RL to real-world systems is often associated with a number of challenges ( Dulac-Arnold et al. , 2019 ; Dulac-Arnold et al. , 2020 ) . We will focus on the following two : Challenge 1 - Constraint satisfaction : One such challenge is that many real-world systems have constraints that need to be satisfied upon deployment ( i.e. , hard constraints ) ; or at least the number of constraint violations as defined by the system need to be reduced as much as possible ( i.e. , soft-constraints ) . This is prevalent in applications ranging from physical control systems such as autonomous driving and robotics to user facing applications such as recommender systems . Challenge 2 - Model Misspecification ( MM ) : Many of these systems suffer from another challenge : model misspecification . We refer to the situation in which an agent is trained in one environment but deployed in a different , perturbed version of the environment as an instance of model misspecification . This may occur in many different applications and is well-motivated in the literature ( Mankowitz et al. , 2018 ; 2019 ; Derman et al. , 2018 ; 2019 ; Iyengar , 2005 ; Tamar et al. , 2014 ) . There has been much work on constrained optimization in the literature ( Altman , 1999 ; Tessler et al. , 2018 ; Efroni et al. , 2020 ; Achiam et al. , 2017 ; Bohez et al. , 2019 ) . However , to our knowledge , the effect of model misspecification on an agent ’ s ability to satisfy constraints at test time has not yet been investigated . ⇤indicates equal contribution . Constrained Model Misspecification ( CMM ) : We consider the scenario in which an agent is required to satisfy constraints at test time but is deployed in an environment that is different from its training environment ( i.e. , a perturbed version of the training environment ) . Deployment in a perturbed version of the environment may affect the return achieved by the agent as well as its ability to satisfy the constraints . We refer to this scenario as constrained model misspecification . This problem is prevalent in many real-world applications where constraints need to be satisfied but the environment is subject to state perturbations effects such as wear-and-tear , partial observability etc. , the exact nature of which may be unknown at training time . Since such perturbations can significantly impact the agent ’ s ability to satisfy the required constraints it is insufficient to simply ensure that constraints are satisfied in the unperturbed version of the environment . Instead , the presence of unknown environment variations needs to be factored into the training process . One area where such considerations are of particular practical relevance is sim2real transfer where the unknown sim2real gap can make it hard to ensure that constraints will be satisfied on the real system ( Andrychowicz et al. , 2018 ; Peng et al. , 2018 ; Wulfmeier et al. , 2017 ; Rastogi et al. , 2018 ; Christiano et al. , 2016 ) . Of course , one could address this issue by limiting the capabilities of the system being controlled in order to ensure that constraints are never violated , for instance by limiting the amount of current in an electric motor . Our hope is that our methods can outperform these more blunt techniques , while still ensuring constraint satisfaction in the deployment domain . Main Contributions : In this paper , we aim to bridge the two worlds of model misspecification and constraint satisfaction . We present an RL objective that enables us to optimize a policy that aims to be robust to CMM . Our contributions are as follows : ( 1 ) Introducing the Robust Return Robust Constraint ( R3C ) and Robust Constraint ( RC ) RL objectives that aim to mitigate CMM as defined above . This includes the definition of a Robust Constrained Markov Decision Process ( RC-MDP ) . ( 2 ) Derive corresponding R3C and RC value functions and Bellman operators . Provide an argument showing that these Bellman operators converge to fixed points . These are implemented in the policy evaluation step of actor-critic R3C algorithms . ( 3 ) Implement five different R3C and RC algorithmic variants on top of D4PG and DMPO , ( two state-of-the-art continuous control RL algorithms ) . ( 4 ) Empirically demonstrate the superior performance of our algorithms , compared to various baselines , with respect to mitigating CMM . This is shown consistently across 6 different Mujoco tasks from the Real-World RL ( RWRL ) suite1 . 2 BACKGROUND . 2.1 MARKOV DECISION PROCESSES . A Robust Markov Decision Process ( R-MDP ) is defined as a tuple hS , A , R , , Pi where S is a finite set of states , A is a finite set of actions , R : S ⇥ A ! R is a bounded reward function and 2 [ 0 , 1 ) is the discount factor ; P ( s , a ) ✓ M ( S ) is an uncertainty set where M ( S ) is the set of probability measures over next states s0 2 S. This is interpreted as an agent selecting a state and action pair , and the next state s0 is determined by a conditional measure p ( s0|s , a ) 2 P ( s , a ) ( Iyengar , 2005 ) . We want the agent to learn a policy ⇡ : S ! A , which is a mapping from states to actions that is robust with respect to this uncertainty set . For the purpose of this paper , we consider deterministic policies , but this can easily be extended to stochastic policies too . The robust value function V ⇡ : S ! R for a policy ⇡ is defined as V ⇡ ( s ) = infp2P ( s , ⇡ ( s ) ) V ⇡ , p ( s ) where V ⇡ , p ( s ) = r ( s , ⇡ ( s ) ) + p ( s0|s , ⇡ ( s ) ) V ⇡ , p ( s0 ) . A rectangularity assumption on the uncertainty set ( Iyengar , 2005 ) ensures that “ nature ” can choose a worst-case transition function independently for every state s and action a . This means that during a trajectory , at each timestep , nature can choose any transition model from the uncertainty set to reduce the performance of the agent . A robust policy optimizes for the robust ( worst-case ) expected return objective : JR ( ⇡ ) = infp2P Ep , ⇡ [ P1 t=0 trt ] . The robust value function can be expanded as V ⇡ ( s ) = r ( s , ⇡ ( s ) ) + infp2P ( s , ⇡ ( s ) ) Ep [ V ⇡ ( s0 ) |s , ⇡ ( s ) ] . As in ( Tamar et al. , 2014 ) , we can define an operator infP ( s , a ) v : R |S| ! R as infP ( s , a ) v = inf { p > v|p 2 P ( s , a ) } . We can also define an operator for some policy ⇡ as inf⇡ : R|S| ! R|S| where { inf⇡ v } ( s ) = inf P ( s , ⇡ ( s ) ) v. Then , we have defined the Robust Bellman 1https : //github.com/google-research/realworldrl_suite operator as follows T⇡RV ⇡ = r⇡ + inf⇡ V ⇡ . Both the robust Bellman operator T⇡R : R|S| ! R|S| for a fixed policy and the optimal robust Bellman operator T ⇤Rv ( s ) = max⇡ T ⇡ Rv ( s ) have previously been shown to be contractions ( Iyengar , 2005 ) . A Constrained Markov Decision Process ( CMDP ) is an extension to an MDP and consists of the tuple hS , A , P , R , C , i where S , A , R and are defined as in the MDP above and C : S⇥A ! RK is a mapping from a state s and action a to a K dimensional vector representing immediate costs relating to K constraint . We use K=1 from here on in and therefore C : S⇥A ! R. We refer to the cost for a specific state action tuple hs , ai at time t as ct ( s , a ) . The solution to a CMDP is a policy ⇡ : S ! A that learns to maximize return and satisfy the constraints . The agent aims to learn a policy that maximizes the expected return objective J⇡R = E [ P1 t=0 trt ] subject to J⇡C = E [ P1 t=0 tct ] where is a pre-defined constraint threshold . A number of approaches ( Tessler et al. , 2018 ; Bohez et al. , 2019 ) optimize the Lagrange relaxation of this objective min 0 max✓ J⇡R ( J⇡C ) by optimizing the Lagrange multiplier and the policy parameters ✓ using alternating optimization . We also define the constraint value function V ⇡ , pC : S ! R for a policy ⇡ as in ( Tessler et al. , 2018 ) where V ⇡ , pC ( s ) = c ( s , ⇡ ( s ) ) + p ( s 0|s , ⇡ ( s ) ) V ⇡ , pC ( s0 ) . 2.2 CONTINUOUS CONTROL RL ALGORITHMS . We address the CMM problem by modifying two well-known continuous control algorithms by having them optimize the RC and R3C objectives . The first algorithm is Maximum A-Posteriori Policy Optimization ( MPO ) . This is a continuous control RL algorithm that performs policy iteration using an RL form of expectation maximization ( Abdolmaleki et al. , 2018a ; b ) . We use the distributional-critic version in Abdolmaleki et al . ( 2020 ) , which we refer to as DMPO . The second algorithm is Distributed Distributional Deterministic Policy Gradient ( D4PG ) , which is a state-of-the-art actor-critic continuous control RL algorithm with a deterministic policy ( BarthMaron et al. , 2018 ) . It is an incremental improvement to DDPG ( Lillicrap et al. , 2015 ) with a distributional critic that is learned similarly to distributional MPO . 3 ROBUST CONSTRAINED ( RC ) OPTIMIZATION OBJECTIVE . We begin by defining a Robust Constrained MDP ( RC-MDP ) . This combines an R-MDP and C-MDP to yield the tuple hS , A , R , C , , Pi where all of the variables in the tuple are defined in Section 2 . We next define two optimization objectives that optimize the RC-MDP . The first variant attempts to learn a policy that is robust with respect to the return as well as constraint satisfaction - Robust Return Robust Constrained ( R3C ) objective . The second variant is only robust with respect to constraint satisfaction - Robust Constrained ( RC ) objective . Prior to defining these objectives , we add some important definitions . Definition 1 . The robust constrained value function V ⇡C : S ! R for a policy ⇡ is defined as V ⇡C ( s ) = supp2P ( s , ⇡ ( s ) ) V ⇡ , p C ( s ) = supp2P ( s , ⇡ ( s ) ) E⇡ , p P1 t=0 tct . This value function represents the worst-case sum of constraint penalties over the course of an episode with respect to the uncertainty set P ( s , a ) . We can also define an operator supP ( s , a ) v : R |S| ! R as supP ( s , a ) v = sup { p > v|p 2 P ( s , a ) } . In addition , we can define an operator on vectors for some policy ⇡ as sup⇡ : R|S| ! R|S| where { sup⇡ v } ( s ) = sup P ( s , ⇡ ( s ) ) v. Then , we can defined the Supremum Bellman operator T⇡sup : R|S| ! R|S| as follows T⇡supV ⇡ = r⇡ + sup⇡ V ⇡ . Note that this operator is a contraction since we get the same result if we replace T⇡inf with T ⇡ sup and replace V with V . An alternative derivation of the sup operator contraction has also been derived in the Appendix , Section A.3 for completeness . 3.0.1 ROBUST RETURN ROBUST CONSTRAINT ( R3C ) OBJECTIVE The R3C objective is defined as : max ⇡2⇧ inf p2P Ep , ⇡ X t tr ( st , at ) s.t . sup p02P Ep 0 , ⇡ X t tc ( st , at ) ( 1 ) Note , a couple of interesting properties about this objective : ( 1 ) it focuses on being robust with respect to the return for a pre-defined set of perturbations ; ( 2 ) the objective also attempts to be robust with respect to the worst case constraint value for the perturbation set . The Lagrange relaxation form of equation 1 is used to define an R3C value function . Definition 2 ( R3C Value Function ) . For a fixed , and using the above-mentioned rectangularity assumption ( Iyengar , 2005 ) , the R3C value function for a policy ⇡ is defined as the concatenation of two value functions V⇡ = f ( hV ⇡ , V ⇡C i ) = V ⇡ V ⇡C . This implies that we keep two separate estimates of V ⇡ and V ⇡C and combine them together to yield V ⇡ . The constraint threshold term offsets the value function , and has no effect on any policy improvement step2 . As a result , the dependency on is dropped . The next step is to define the R3C Bellman operator . This is presented in Definition 3 . Definition 3 ( R3C Bellman operator ) . The R3C Bellman operator is defined as two separate Bellman operators T⇡R3C = hT⇡inf , T⇡supi where T⇡inf is the robust Bellman operator ( Iyengar , 2005 ) and T⇡sup : R|S| ! R|S| is defined as the sup Bellman operator . Based on this definition , applying the R3C Bellman operator to V⇡ involves applying each of the Bellman operators to their respective value functions . That is , T⇡R3CV = T ⇡ infV T⇡supVC . It has been previously shown that T⇡inf is a contraction with respect to the max norm ( Tamar et al. , 2014 ) and therefore converges to a fixed point . We also provided an argument whereby T⇡sup is a contraction operator in the previous section as well as in Appendix , A.3 . These Bellman operators individually ensure that the robust value function V ( s ) and the constraint value function VC ( s ) converge to fixed points . Therefore , T ⇡R3CV also converges to a fixed point by construction . As a result of the above argument , we know that we can apply the R3C Bellman operator in value iteration or policy iteration algorithms in the policy evaluation step . This is achieved in practice by simultaneously learning both the robust value function V ⇡ ( s ) and the constraint value function V ⇡C ( s ) and combining these estimates to yield V ⇡ ( s ) . | The standard Reinforcement Learning framework is limited in many ways, and numerous variants have been introduced to deal with aspects such as partial observability, temporal abstraction, safety, domain transfer, etc. Yet, these issues are often studied separately and it is often unclear how to combine them together. This is the ambitious challenge taken by this paper, which attempts to bridge the two separate settings of Robust MDPs, which aim at considering ambiguity in the dynamics, and Constrained MDPs, which aim at enforcing the satisfaction of a constraint on an expected cost signal. The authors propose the formulation of two objectives, that merge the two aspects and include both a worst-case evaluation over the ambiguity set and a constraint violation penalty term. The ways of dealing with both issues are fairly standard (Lagrangian relaxation of the constraints with alternating optimization, and worst-case evaluation over a finite set of simulated transitions in practice), but their combination seems novel and relevant. These objectives come with the corresponding Bellman Expectation operators, which allow to evaluate the current policy (critic) and provide a feedback (gradient) for the actor to ensure robust constraint satisfaction. The applicability of the proposed approaches is demonstrated on a benchmark of Mujoco tasks, where they are shown to compare favorably to several baselines. | SP:9bc5be7060804da42581342ed69d6cd6cf2c90f3 |
Multi-EPL: Accurate Multi-source Domain Adaptation | Given multiple source datasets with labels , how can we train a target model with no labeled data ? Multi-source domain adaptation ( MSDA ) aims to train a model using multiple source datasets different from a target dataset in the absence of target data labels . MSDA is a crucial problem applicable to many practical cases where labels for the target data are unavailable due to privacy issues . Existing MSDA frameworks are limited since they align data without considering conditional distributions p ( x|y ) of each domain . They also do not fully utilize the target data without labels , and rely on limited feature extraction with a single extractor . In this paper , we propose MULTI-EPL , a novel method for multi-source domain adaptation . MULTI-EPL exploits label-wise moment matching to align conditional distributions p ( x|y ) , uses pseudolabels for the unavailable target labels , and introduces an ensemble of multiple feature extractors for accurate domain adaptation . Extensive experiments show that MULTI-EPL provides the state-of-the-art performance for multi-source domain adaptation tasks in both of image domains and text domains . 1 INTRODUCTION Given multiple source datasets with labels , how can we train a target model with no labeled data ? A large training data are essential for training deep neural networks . Collecting abundant data is unfortunately an obstacle in practice ; even if enough data are obtained , manually labeling those data is prohibitively expensive . Using other available or much cheaper datasets would be a solution for these limitations ; however , indiscriminate usage of other datasets often brings severe generalization error due to the presence of dataset shifts ( Torralba & Efros ( 2011 ) ) . Unsupervised domain adaptation ( UDA ) tackles these problems where no labeled data from the target domain are available , but labeled data from other source domains are provided . Finding out domain-invariant features has been the focus of UDA since it allows knowledge transfer from the labeled source dataset to the unlabeled target dataset . There have been many efforts to transfer knowledge from a single source domain to a target one . Most recent frameworks minimize the distance between two domains by deep neural networks and distance-based techniques such as discrepancy regularizers ( Long et al . ( 2015 ; 2016 ; 2017 ) ) , adversarial networks ( Ganin et al . ( 2016 ) ; Tzeng et al . ( 2017 ) ) , and generative networks ( Liu et al . ( 2017 ) ; Zhu et al . ( 2017 ) ; Hoffman et al . ( 2018b ) ) . While the above-mentioned approaches consider one single source , we address multi-source domain adaptation ( MSDA ) , which is very crucial and more practical in real-world applications as well as more challenging . MSDA is able to bring significant performance enhancement by virtue of accessibility to multiple datasets as long as multiple domain shift problems are resolved . Previous works have extensively presented both theoretical analysis ( Ben-David et al . ( 2010 ) ; Mansour et al . ( 2008 ) ; Crammer et al . ( 2008 ) ; Hoffman et al . ( 2018a ) ; Zhao et al . ( 2018 ) ; Zellinger et al . ( 2020 ) ) and models ( Zhao et al . ( 2018 ) ; Xu et al . ( 2018 ) ; Peng et al . ( 2019 ) ) for MSDA . MDAN ( Zhao et al . ( 2018 ) ) and DCTN ( Xu et al . ( 2018 ) ) build adversarial networks for each source domain to generate features domain-invariant enough to confound domain classifiers . However , these approaches do not encompass the shifts among source domains , counting only shifts between source and target domain . M3SDA ( Peng et al . ( 2019 ) ) adopts moment matching strategy but makes the unrealistic assumption that matching the marginal probability p ( x ) would guarantee the alignment of the conditional probability p ( x|y ) . Most of these methods also do not fully exploit the knowledge of target domain , imputing to the inaccessibility to the labels . Furthermore , all these methods leverage one single feature extractor , which possibly misses important information regarding label classification . In this paper , we propose MULTI-EPL ( Multi-source domain adaptation with Ensemble of feature extractors , Pseudolabels , and Label-wise moment matching ) , a novel MSDA framework which mitigates the limitations of these methods of not explicitly considering conditional probability p ( x|y ) , and relying on only one feature extractor . The model architecture is illustrated in Figure 1 . MULTIEPL aligns the conditional probability p ( x|y ) by utilizing label-wise moment matching . We employ pseudolabels for the inaccessible target labels to maximize the usage of the target data . Moreover , generating an ensemble of features from multiple feature extractors gives abundant information about labels to the extracted features . Extensive experiments show the superiority of our methods . Our contributions are summarized as follows : • Method . We propose MULTI-EPL , a novel approach for MSDA that effectively obtains domain-invariant features from multiple domains by matching conditional probability p ( x|y ) , utilizing pseudolabels for inaccessible target labels to fully deploy target data , and using an ensemble of multiple feature extractors . It allows domain-invariant features to be extracted , capturing the intrinsic differences of different labels . • Analysis . We theoretically prove that minimizing the label-wise moment matching loss is relevant to bounding the target error . • Experiments . We conduct extensive experiments on image and text datasets . We show that 1 ) MULTI-EPL provides the state-of-the-art accuracy , and 2 ) each of our main ideas significantly contributes to the superior performance . 2 RELATED WORK Single-source Domain Adaptation . Given a labeled source dataset and an unlabeled target dataset , single-source domain adaptation aims to train a model that performs well on the target domain . The challenge of single-source domain adaptation is to reduce the discrepancy between the two domains and to obtain appropriate domain-invariant features . Various discrepancy measures such as Maximum Mean Discrepancy ( MMD ) ( Tzeng et al . ( 2014 ) ; Long et al . ( 2015 ; 2016 ; 2017 ) ; Ghifary et al . ( 2016 ) ) and KL divergence ( Zhuang et al . ( 2015 ) ) have been used as regularizers . Inspired from the insight that the domain-invariant features should exclude the clues about its domain , constructing adversarial networks against domain classifiers has shown superior performance . Liu et al . ( 2017 ) and Hoffman et al . ( 2018b ) deploy GAN to transform data across the source and target domain , while Ganin et al . ( 2016 ) and Tzeng et al . ( 2017 ) leverage the adversarial networks to extract common features of the two domains . Unlike these works , we focus on multiple source domains . Multi-source Domain Adaptation . Single-source domain adaptation should not be naively employed for multiple source domains due to the shifts between source domains . Many previous works have tackled MSDA problems theoretically . Mansour et al . ( 2008 ) establish distribution weighted combining rule that the weighted combination of source hypotheses is a good approximation for the target hypothesis . The rule is further extended to a stochastic case with joint distribution over the input and the output space in Hoffman et al . ( 2018a ) . Crammer et al . ( 2008 ) propose the general theory of how to sift appropriate samples out of multi-source data using expected loss . Efforts to find out transferable knowledge from multiple sources from the causal viewpoint are made in Zhang et al . ( 2015 ) . There have been salient studies on the learning bounds for MSDA . Ben-David et al . ( 2010 ) found the generalization bounds based on H∆H-divergence , which are further tightened by Zhao et al . ( 2018 ) . Frameworks for MSDA have been presented as well . Zhao et al . ( 2018 ) propose learning algorithms based on the generalization bounds for MSDA . DCTN ( Xu et al . ( 2018 ) ) resolves domain and category shifts between source and target domains via adversarial networks . M3SDA ( Peng et al . ( 2019 ) ) associates all the domains into a common distribution by aligning the moments of the feature distributions of multiple domains . Lin et al . ( 2020 ) focus on the visual sentiment classification tasks and attempts to find out the common latent space of source and target domains . Wang et al . ( 2020 ) consider the interactions among multiple domains and reflect the information by constructing knowledge graph . However , all these methods do not consider multimode structures ( Pei et al . ( 2018 ) ) that differently labeled data follow distinct distributions , even if they are drawn from the same domain . Also , the domain-invariant features in these methods contain the label information for only one label classifier which lead these methods to miss a large amount of label information . Different from these methods , our frameworks fully count the multimodal structures handling the data distributions in a label-wise manner and minimize the label information loss considering multiple label classifiers . Moment Matching . Domain adaptation has deployed the moment matching strategy to minimize the discrepancy between source and target domains . MMD regularizer ( Tzeng et al . ( 2014 ) ; Long et al . ( 2015 ; 2016 ; 2017 ) ; Ghifary et al . ( 2016 ) ) can be interpreted as the first-order moment while Sun et al . ( 2016 ) address second-order moments of source and target distributions . Zellinger et al . ( 2017 ) investigate the effect of higher-order moment matching . M3SDA ( Peng et al . ( 2019 ) ) demonstrates that moment matching yields remarkable performance also with multiple sources . While previous works have focused on matching the moments of marginal distributions for single-source adaptation , we handle conditional distributions in multi-source scenarios . 3 PROPOSED METHOD In this section , we describe our proposed method , MULTI-EPL . We first formulate the problem definition in Section 3.1 . Then , we describe our main ideas in Section 3.2 . Section 3.3 elaborates how to match label-wise moment with pseudolabels and Section 3.4 extends the approach by adding the concept of ensemble learning . Figure 1 shows the overview of MULTI-EPL . 3.1 PROBLEM DEFINITION Given a set of labeled datasets from N source domains S1 , . . . , SN and an unlabeled dataset from a target domain T , we aim to construct a model that minimizes test error on T . We formulate source domain Si as a tuple of the data distribution µSi on data space X and the labeling function lSi : Si = ( µSi , lSi ) . Source dataset drawn with the distribution µSi is denoted as XSi = { ( x Si j , y Si j ) } nSi j=1 . Likewise , the target domain and the target dataset are denoted as T = ( µT , lT ) and XT = { xTj } nT j=1 , respectively . We narrow our focus down to homogeneous settings in classification tasks : all domains share the same data space X and label set C. 3.2 OVERVIEW We propose MULTI-EPL based on the following observations : 1 ) existing methods focus on aligning the marginal distributions p ( x ) not the conditional ones p ( x|y ) , 2 ) knowledge of the target data is not fully employed as no target label is given , and 3 ) there exists a large amount of label information loss since domain-invariant features are extracted for only one label classifier . Thus , we design MULTIEPL aiming to solve the limitations . Designing such method entails the following challenges : 1 . Matching conditional distributions . How can we align the conditional distribution , p ( x|y ) , of multiple domains not the marginal one , p ( x ) ? 2 . Exploitation of the target data . How can we fully exploit the knowledge of the target data despite the absence of the target labels ? 3 . Maximally utilizing feature information . How can we maximally utilize the information that the domain-invariant features contain ? We propose the following main ideas to address the challenges : 1 . Label-wise moment matching ( Section 3.3 ) . We match the label-wise moments of the domain-invariant features so that the features with the same labels have similar distributions regardless of their original domains . 2 . Pseudolabels ( Section 3.3 ) . We use pseudolabels as alternatives to the target labels . 3 . Ensemble of feature representations ( Section 3.4 ) . We learn to extract ensemble of fea- tures from multiple feature extractors , each of which involves distinct domain-invariant features for its own label classifier . 3.3 LABEL-WISE MOMENT MATCHING WITH PSEUDOLABELS We describe how MULTI-EPL matches conditional distributions p ( x|y ) of the features from multiple distinct domains . In MULTI-EPL , a feature extractor fe and a label classifier flc lead the features to be domain-invariant and label-informative at the same time . The feature extractor fe extracts features from data , and the label classifier flc receives the features and predicts the labels for the data . We train fe and flc , according to the losses for label-wise moment matching and label classification , which make the features domain-invariant and label-informative , respectively . Label-wise Moment Matching . To achieve the alignment of domain-invariant features , we define a label-wise moment matching loss as follows : Llmm , K = 1 |C| ( N + 1 2 ) −1 K∑ k=1 ∑ D , D′ ∑ c∈C ∥∥∥∥∥∥∥ 1 nD , c ∑ j ; yDj =c fe ( x D j ) k − 1 nD′ , c ∑ j ; yD ′ j =c fe ( x D′ j ) k ∥∥∥∥∥∥∥ 2 , ( 1 ) where K is a hyperparameter indicating the maximum order of moments considered by the loss , D and D′ are two distinct domains amongst the N +1 domains , and nD , c is the number of data labeled as c in XD . We introduce pseudolabels for the target data , which are determined by the outputs of the model currently being trained , to manage the absence of the ground truths for the target data . In other words , we leverage flc ( fe ( xT ) ) to give the pseudolabel to the target data xT . Drawing the pseudolabels using the incomplete model , however , brings mis-labeling issue which impedes further training . To alleviate this problem , we set a threshold τ and assign the pseudolabels to the target data only when the prediction confidence is greater than the threshold . The target examples with low confidence are not pseudolabeled and not counted in label-wise moment matching . By minimizing Llmm , K , the feature extractor fe aligns data from multiple domains by bringing consistency in distributions of the features with the same labels . The data with distinct labels are aligned independently , taking account of the multimode structures that differently labeled data follow different distributions . Label Classification . The label classifier flc gets the features projected by fe as inputs and makes the label predictions . The label classification loss is defined as follows : Llc = 1 N N∑ i=1 1 nSi nSi∑ j=1 Lce ( flc ( fe ( xSij ) ) , y Si j ) , ( 2 ) where Lce is the softmax cross-entropy loss . Minimizing Llc separates the features with different labels so that each of them gets label-distinguishable . 3.4 ENSEMBLE OF FEATURE REPRESENTATIONS In this section , we introduce ensemble learning for further enhancement . Features extracted with the strategies elaborated in the previous section contain the label information for a single label classifier . However , each label classifier leverages only limited label characteristics , and thus the conventional scheme to adopt only one pair of feature extractor and label classifier captures only a small part of the label information . Our idea is to leverage an ensemble of multiple pairs of feature extractor and label classifier in order to make the features to be more label-informative . We train multiple pairs of feature extractor and label classifier in parallel following the label-wise moment matching approach explained in Section 3.3 . Let n denote the number of the feature extractors in the overall model . We denote the n ( feature extractor , label classifier ) pairs as ( fe,1 , flc,1 ) , ( fe,2 , flc,2 ) , . . . , ( fe , n , flc , n ) and the n resultant features as feat1 , feat2 , . . . , featn where feati is the output of the feature extractor fe , i . After obtaining n different feature mapping modules , we concatenate the n features into one vector featfinal = concat ( feat1 , feat2 , . . . , featn ) . The final label classifier flc , final takes the concatenated feature as input , and predicts the label of the feature . Naively exploiting multiple feature extractors , however , does not guarantee the diversity of the features since it resorts to the randomness . Thus , we introduce a new model component , extractor classifier , which separates the features from different extractors . The extractor classifier fec gets the features generated by a feature extractor as inputs and predicts which feature extractor has generated the features . For example , if n = 2 , the extractor classifier fec attempts to predict whether the input feature is extracted by the extractor fe,1 or fe,2 . By training the extractor classifier and multiple feature extractors at once , we explicitly diversify the features obtained from different extractors . We train the extractor classifier utilizing the feature diversifying loss , Lfd : Lfd = 1 N + 1 N∑ i=1 1 nSi nSi∑ j=1 n∑ k=1 Lce ( fe , k ( xSij ) , k ) + 1 nT nT∑ j=1 n∑ k=1 Lce ( fe , k ( xTj ) , k ) , ( 3 ) where n is the number of feature extractors . 3.5 MULTI-EPL : ACCURATE MULTI-SOURCE DOMAIN ADAPTATION Our final model MULTI-EPL consists of n pairs of feature extractor and label classifier , ( fe,1 , flc,1 ) , ( fe,2 , flc,2 ) , . . . , ( fe , n , flc , n ) , one extractor classifier fec , and one final label classifier flc , final . We first train the entire model except the final label classifier with the loss L : L = n∑ k=1 Llc , k + α n∑ k=1 Llmm , K , k + βLfd , ( 4 ) where Llc , k is the label classification loss of the classifier flc , k , Llmm , K , k is the label-wise moment matching loss of the feature extractor fe , k , and α and β are the hyperparameters . Then , the final label classifier is trained with respect to the label classification loss Llc , final using the concatenated features from multiple feature extractors . 4 ANALYSIS We present a theoretical insight regarding the validity of the label-wise moment matching loss . For simplicity , we tackle only binary classification tasks . The error rate of a hypothesis h on a domain D is denoted as $ D ( h ) = Pr { h ( x ) ∕= lD ( x ) } where lD is the labeling function on the domain D. We first introduce k-th order label-wise moment divergence . Definition 1 . Let D and D′ be two domains over an input space X ⊂ Rn where n is the dimension of the inputs . Let C be the set of the labels , and µc ( x ) and µ′c ( x ) be the data distribution given that the label is c , i.e . µc ( x ) = µ ( x|y = c ) and µ′c ( x ) = µ′ ( x|y = c ) for the data distribution µ and µ′ on the domains D and D′ , respectively . Then , the k-th order label-wise moment divergence dLM , k ( D , D′ ) of the two domains D and D′ over X is defined as dLM , k ( D , D′ ) = ∑ c∈C ∑ i∈∆k ∣∣∣∣∣∣ p ( c ) ∫ X µc ( x ) n∏ j=1 ( xj ) ijdx− p′ ( c ) ∫ X µ′c ( x ) n∏ j=1 ( xj ) ijdx ∣∣∣∣∣∣ , ( 5 ) where ∆k = { i = ( i1 , . . . , in ) ∈ Nn0 | ∑n j=1 ij = k } is the set of the tuples of the nonnegative integers , which add up to k , p ( c ) and p′ ( c ) are the probability that arbitrary data from D and D′ to be labeled as c respectively , and the data x ∈ X is expressed as ( x1 , . . . , xn ) . The ultimate goal of MSDA is to find a hypothesis h with the minimum target error . We nevertheless train the model with respect to the source data since ground truths for the target are unavailable . Let N datasets be drawn from N labeled source domains S1 , . . . , SN respectively . We denote i-th source dataset XSi as { ( x Si j , y Si j ) } nSi j=1 . The empirical error of hypothesis h in i-th source domain Si estimated with XSi is formulated as $ ̂Si ( h ) = 1nSi ∑nSi j=1 1h ( xSij ) ∕=y Si j . Given a weight vector α = ( α1 , α2 , . . . , αN ) such that ∑N i=1 αi = 1 , the weighted empirical source error is formulated as $ ̂α ( h ) = ∑N i=1 αi $ ̂Si ( h ) . We extend the theorems in Ben-David et al . ( 2010 ) ; Peng et al . ( 2019 ) and derive a bound for the target error $ T ( h ) , for h trained with source data , in terms of k-th order label-wise moment divergence . Theorem 1 . Let H be a hypothesis space of VC dimension d , nSi be the number of samples from source domain Si , m = ∑N i=1 nSi be the total number of samples from N source domains S1 , . . . , SN , and β = ( β1 , . . . , βN ) with βi = nSi m . Let us define a hypothesis ĥ = argminh∈H $ ̂α ( h ) that minimizes the weighted empirical source error , and a hypothesis h∗T = argminh∈H $ T ( h ) that minimizes the true target error . Then , for any δ ∈ ( 0 , 1 ) and $ > 0 , there exist N integers n1 ! , . . . , n N ! and N constants an1 ! , . . . , anN ! such that $ T ( ĥ ) ≤ $ T ( h∗T ) + ηα , β , m , δ + $ + N∑ i=1 αi 2λi + ani ! ni ! ∑ k=1 dLM , k ( Si , T ) ( 6 ) with probability at least 1 − δ , where ηα , β , m , δ = 4 √ ( ∑N i=1 α2i βi ) ( 2d ( log ( 2md ) +1 ) +2 log ( 4 δ ) m ) and λi = minh∈H { $ T ( h ) + $ Si ( h ) } . Proof . See the Appendix A.1 . Speculating that all datasets are balanced against the annotations , i.e. , p ( c ) = p′ ( c ) = 1|C| for any c ∈ C , Llmm , K is expressed as the sum of the estimates of dLM , k with k = 1 , . . . , K. The theorem provides an insight that label-wise moment matching allows the model trained with source data to have performance comparable to the optimal one on the target domain . 5 EXPERIMENTS We conduct experiments to answer the following questions of MULTI-EPL . Q1 Accuracy ( Section 5.2 ) . How well does MULTI-EPL perform in classification tasks ? Q2 Ablation Study ( Section 5.3 ) . How much does each component of MULTI-EPL contribute to performance improvement ? Q3 Effects of Degree of Ensemble ( Section 5.4 ) . How does the performance change as the number n of the pairs of the feature extractor and the label classifier increases ? 5.1 EXPERIMENTAL SETTINGS Datasets . We use three kinds of datasets , Digits-Five , Office-Caltech101 , and Amazon Reviews2 . Digits-Five consists of five datasets for digit recognition : MNIST3 ( LeCun et al . ( 1998 ) ) , MNISTM4 ( Ganin & Lempitsky ( 2015 ) ) , SVHN5 ( Netzer et al . ( 2011 ) ) , SynthDigits6 ( Ganin & Lempitsky ( 2015 ) ) , and USPS7 ( Hastie et al . ( 2001 ) ) . We set one of them as a target domain and the rest as source domains . Following the conventions in prior works ( Xu et al . ( 2018 ) ; Peng et al . ( 2019 ) ) , we randomly sample 25000 instances from the source training set and 9000 instances from the target training set to train the model except for USPS for which the whole training set is used . 1https : //people.eecs.berkeley.edu/˜jhoffman/domainadapt/ 2https : //github.com/KeiraZhao/MDAN/blob/master/amazon.npz 3http : //yann.lecun.com/exdb/mnist/ 4http : //yaroslav.ganin.net 5http : //ufldl.stanford.edu/housenumbers/ 6http : //yaroslav.ganin.net 7https : //www.kaggle.com/bistaumanga/usps-dataset Office-Caltech10 is the dataset for image classification with 10 categories that Office31 dataset and Caltech dataset have in common . It involves four different domains : Amazon , Caltech , DSLR , and Webcam . We double the number of data by data augmentation and exploit all the original data and augmented data as training data and test data respectively.Amazon Reviews dataset contains customers ’ reviews on 4 product categories : Books , DVDs , Electronics , and Kitchen appliances . The instances are encoded into 5000-dimensional vectors and are labeled as being either positive or negative depending on their sentiments . We set each of the four categories as a target and the rest as sources . For all the domains , 2000 instances are sampled for training , and the rest of the data are used for the test . Details about the datasets are summarized in Table 1 . Competitors . We use 3 MSDA algorithms , DCTN ( Xu et al . ( 2018 ) ) , M3SDA ( Peng et al . ( 2019 ) ) , and M3SDA-β ( Peng et al . ( 2019 ) ) , with state-of-the-art performances as baselines . All the frameworks share the same architecture for the feature extractor , the domain classifier , and the label classifier for consistency . For Digits-Five , we use convolutional neural networks based on LeNet5 ( LeCun et al . ( 1998 ) ) . For Office-Caltech10 , ResNet50 ( He et al . ( 2016 ) ) pretrained on ImageNet is used as the backbone architecture . For Amazon Reviews , the feature extractor is composed of three fullyconnected layers each with 1000 , 500 , and 100 output units , and a single fully-connected layer with 100 input units and 2 output units is adopted for both of the extractor and label classifiers . With Digits-Five , LeNet5 ( LeCun et al . ( 1998 ) ) and ResNet14 ( He et al . ( 2016 ) ) without any adaptation are additionally investigated in two different manners : Source Combined and Single Best . In Source Combined , multiple source datasets are simply combined and fed into a model . In Single Best , we train the model with each source dataset independently , and report the result of the best performing one . Likewise , ResNet50 and MLP consisting of 4 fully-connected layers with 1000 , 500 , 100 , and 2 units are investigated without adaptation for Office-Caltech10 and Amazon Reviews , respectively . Training Details . We train our models for Digits-Five with Adam optimizer ( Kingma & Ba ( 2015 ) ) with β1 = 0.9 , β2 = 0.999 , and the learning rate of 0.0004 for 100 epochs . All images are scaled to 32 × 32 and the mini batch size is set to 128 . We set the hyperparameters α = 0.0005 , β = 1 , and K = 2 . For the experiments with Office-Caltech10 , all the modules comprising our model are trained following SGD with the learning rate 0.001 , except that the optimizers for feature extractors have the learning rate 0.0001 . We scale all the images to 224 × 224 and set the mini batch size to 48 . All the hyperparameters are kept the same as in the experiments with Digits-Five . For Amazon Reviews , we train the models for 50 epochs using Adam optimizer with β1 = 0.9 , β2 = 0.999 , and the learning rate of 0.0001 . We set α = β = 1 , K = 2 , and the mini batch size to 100 . For every experiment , the confidence threshold τ is set to 0.9 . 5.2 PERFORMANCE EVALUATION We evaluate the performance of MULTI-EPL with n = 2 against the competitors . We repeat experiments for each setting five times and report the mean and the standard deviation . The results are summarized in Table 2 . Note that MULTI-EPL provides the best accuracy in all the datasets , showing its consistent superiority in both image datasets ( Digits-Five , Office-Caltech10 ) and text dataset ( Amazon Reviews ) . The enhancement is remarkable especially when MNIST-M is the target domain in Digits-Five , improving the accuracy by 11.48 % compared to the state-of-the-art methods . 5.3 ABLATION STUDY We perform an ablation study on Digits-Five to identify what exactly enhances the performance of MULTI-EPL . We compare MULTI-EPL with 3 of its variants : MULTI-0 , MULTI-PL , and MULTIEPL-R. MULTI-0 aligns moments regardless of the labels of the data . MULTI-PL trains the model without ensemble learning . MULTI-EPL-R exploits ensemble learning strategy but relies on randomness without the extractor classifier and the feature diversifying loss . The results are shown in Table 3 . By comparing MULTI-0 with MULTI-PL , we observe that considering labels in moment matching plays a significant role in extracting domain-invariant features . The remarkable performance gap between MULTI-PL and MULTI-EPL with n = 2 verifies the effectiveness of ensemble learning . Comparing MULTI-EPL and MULTI-EPL-R , MULTI-EPL shows a better performance than MULTI-EPL-R in half of the cases ; this means that explicitly diversifying loss often helps further improve the accuracy , while resorting to randomness for feature diversification also works in general . Hence , we conclude that we are able to apply ensemble learning approach without concern about the redundancy in features . 5.4 EFFECTS OF ENSEMBLE We vary n , the number of pairs of feature extractor and label classifier , and repeat the performance evaluation on Digits-Five . The results are summarized in Table 3 . While an ensemble of two pairs gives much better performance than the model with a single pair , using more than two pairs rarely brings further improvement . This result demonstrates that two pairs of feature extractor and label classifier are able to cover most information without losing important label information in DigitsFive . It is notable that increasing n sometimes brings small performance degradation . As more feature extractors are adopted to obtain final features , the complexity of final features increases . It is harder for the final label classifier to manage the features with high complexity compared to the simple ones . This deteriorates the performance when we exploit more than two feature extractors . 6 CONCLUSION We propose MULTI-EPL , a novel framework for the multi-source domain adaptation problem . MULTI-EPL overcomes the problems in existing methods of not directly addressing conditional distributions of data p ( x|y ) , not fully exploiting knowledge of target data , and missing large amount of label information . MULTI-EPL aligns data from multiple source domains and the target domain considering the data labels , and exploits pseudolabels for exploiting unlabeled target data . MULTIEPL further enhances the performance by generating an ensemble of multiple feature extractors . Our framework exhibits superior performance on both image and text classification tasks . Considering labels in moment matching and adding ensemble learning idea is shown to bring remarkable performance enhancement through ablation study . Future works include extending our approach to other tasks such as regression , which may require modification in the pseudolabeling method . REFERENCES Shai Ben-David , John Blitzer , Koby Crammer , Alex Kulesza , Fernando Pereira , and Jennifer Wort- man Vaughan . A theory of learning from different domains . Mach . Learn. , 79 ( 1-2 ) :151–175 , 2010 . Koby Crammer , Michael J. Kearns , and Jennifer Wortman . Learning from multiple sources . JMLR , 2008 . Yaroslav Ganin and Victor S. Lempitsky . Unsupervised domain adaptation by backpropagation . In ICML , 2015 . Yaroslav Ganin , Evgeniya Ustinova , Hana Ajakan , Pascal Germain , Hugo Larochelle , François Laviolette , Mario Marchand , and Victor Lempitsky . Domain-adversarial training of neural networks . JMLR , 2016 . Muhammad Ghifary , W. Bastiaan Kleijn , Mengjie Zhang , David Balduzzi , and Wen Li . Deep reconstruction-classification networks for unsupervised domain adaptation . In ECCV , 2016 . Trevor Hastie , Jerome H. Friedman , and Robert Tibshirani . The Elements of Statistical Learning : Data Mining , Inference , and Prediction . Springer Series in Statistics . Springer , 2001 . Kaiming He , Xiangyu Zhang , Shaoqing Ren , and Jian Sun . Deep residual learning for image recognition . In CVPR , 2016 . Judy Hoffman , Mehryar Mohri , and Ningshan Zhang . Algorithms and theory for multiple-source adaptation . In NIPS , 2018a . Judy Hoffman , Eric Tzeng , Taesung Park , Jun-Yan Zhu , Phillip Isola , Kate Saenko , Alexei A. Efros , and Trevor Darrell . Cycada : Cycle-consistent adversarial domain adaptation . In ICML , 2018b . Diederik P. Kingma and Jimmy Ba . Adam : A method for stochastic optimization . In ICLR , 2015 . Yann LeCun , Léon Bottou , Yoshua Bengio , and Patrick Haffner . Gradient-based learning applied to document recognition . Proceedings of the IEEE , 86 ( 11 ) :2278–2324 , 1998 . Chuang Lin , Sicheng Zhao , Lei Meng , and Tat-Seng Chua . Multi-source domain adaptation for visual sentiment classification . In AAAI , 2020 . Ming-Yu Liu , Thomas Breuel , and Jan Kautz . Unsupervised image-to-image translation networks . In NIPS , 2017 . Mingsheng Long , Yue Cao , Jianmin Wang , and Michael I. Jordan . Learning transferable features with deep adaptation networks . In ICML , 2015 . Mingsheng Long , Han Zhu , Jianmin Wang , and Michael I. Jordan . Unsupervised domain adaptation with residual transfer networks . In NIPS , 2016 . Mingsheng Long , Han Zhu , Jianmin Wang , and Michael I. Jordan . Deep transfer learning with joint adaptation networks . In ICML , 2017 . Yishay Mansour , Mehryar Mohri , and Afshin Rostamizadeh . Domain adaptation with multiple sources . In NIPS , 2008 . Yuval Netzer , Tao Wang , Adam Coates , Alessandro Bissacco , Bo Wu , and Andrew Y Ng . Reading digits in natural images with unsupervised feature learning . 2011 . Zhongyi Pei , Zhangjie Cao , Mingsheng Long , and Jianmin Wang . Multi-adversarial domain adaptation . In AAAI , 2018 . Xingchao Peng , Qinxun Bai , Xide Xia , Zijun Huang , Kate Saenko , and Bo Wang . Moment matching for multi-source domain adaptation . In ICCV , 2019 . Marshall Harvey Stone . Applications of the theory of boolean rings to general topology . Transactions of the American Mathematical Society , 1937 . Baochen Sun , Jiashi Feng , and Kate Saenko . Return of frustratingly easy domain adaptation . In AAAI , 2016 . A. Torralba and A . A. Efros . Unbiased look at dataset bias . In CVPR , 2011 . E. Tzeng , J. Hoffman , K. Saenko , and T. Darrell . Adversarial discriminative domain adaptation . In CVPR , 2017 . Eric Tzeng , Judy Hoffman , Ning Zhang , Kate Saenko , and Trevor Darrell . Deep domain confusion : Maximizing for domain invariance . CoRR , abs/1412.3474 , 2014 . Hang Wang , Minghao Xu , Bingbing Ni , and Wenjun Zhang . Learning to combine : Knowledge aggregation for multi-source domain adaptation . In ECCV , 2020 . Ruijia Xu , Ziliang Chen , Wangmeng Zuo , Junjie Yan , and Liang Lin . Deep cocktail network : Multisource unsupervised domain adaptation with category shift . In CVPR , 2018 . Werner Zellinger , Thomas Grubinger , Edwin Lughofer , Thomas Natschläger , and Susanne Saminger-Platz . Central moment discrepancy ( CMD ) for domain-invariant representation learning . CoRR , abs/1702.08811 , 2017 . Werner Zellinger , Bernhard Alois Moser , and Susanne Saminger-Platz . Learning bounds for moment-based domain adaptation . CoRR , abs/2002.08260 , 2020 . Kun Zhang , Mingming Gong , and Bernhard Schölkopf . Multi-source domain adaptation : A causal view . In AAAI , 2015 . Han Zhao , Shanghang Zhang , Guanhang Wu , José M. F. Moura , João Paulo Costeira , and Geoffrey J. Gordon . Adversarial multiple source domain adaptation . In NIPS , 2018 . Jun-Yan Zhu , Taesung Park , Phillip Isola , and Alexei A. Efros . Unpaired image-to-image translation using cycle-consistent adversarial networks . In ICCV , 2017 . Fuzhen Zhuang , Xiaohu Cheng , Ping Luo , Sinno Jialin Pan , and Qing He . Supervised representation learning : Transfer learning with deep autoencoders . In IJCAI , 2015 . A APPENDIX A.1 PROOF FOR THEOREM 1 In this section , we prove Theorem 1 in the paper . We first define k-th order label-wise moment divergence dLM , k , and disagreement ratio $ D ( h1 , h2 ) of the two hypotheses h1 , h2 ∈ H on the domain D. Definition 1 . Let D and D′ be two domains over an input space X ⊂ Rn where n is the dimension of the inputs . Let C be the set of the labels , and µc ( x ) and µ′c ( x ) be the data distributions given that the label is c , i.e . µc ( x ) = µ ( x|y = c ) and µ′c ( x ) = µ′ ( x|y = c ) for the data distribution µ and µ′ on the domains D and D′ , respectively . Then , the k-th order label-wise moment divergence dLM , k ( D , D′ ) of the two domains D and D′ over X is defined as dLM , k ( D , D′ ) = ∑ c∈C ∑ i∈∆k ∣∣∣∣∣∣ p ( c ) ∫ X µc ( x ) n∏ j=1 ( xj ) ijdx− p′ ( c ) ∫ X µ′c ( x ) n∏ j=1 ( xj ) ijdx ∣∣∣∣∣∣ , ( 7 ) where ∆k = { i = ( i1 , . . . , in ) ∈ Nn0 | ∑n j=1 ij = k } is the set of the tuples of the nonnegative integers , which add up to k , p ( c ) and p′ ( c ) are the probability that arbitrary data from D and D′ to be labeled as c respectively , and the data x ∈ X is expressed as ( x1 , . . . , xn ) . Definition 2 . Let D be a domain over an input space X ⊂ Rn with the data distribution µ ( x ) . Then , we define the disagreement ratio $ D ( h1 , h2 ) of the two hypotheses h1 , h2 ∈ H on the domain D as $ D ( h1 , h2 ) = Pr x∼µ ( x ) [ h1 ( x ) ∕= h2 ( x ) ] . ( 8 ) Theorem 2 . ( Stone-Weierstrass Theorem ( Stone ( 1937 ) ) ) Let K be a compact subset of Rn and f : K → R be a continuous function . Then , for every $ > 0 , there exists a polynomial , P : K → R , such that sup x∈K |f ( x ) − P ( x ) | < $ . ( 9 ) Theorem 2 indicates that continuous functions on a compact subset of Rn are approximated with polynomials . We next formulate the discrepancy of the two domains using the disagreement ratio and bound it with the label-wise moment divergence . Lemma 1 . Let D and D′ be two domains over an input space X ∈ Rn , where n is the dimension of the inputs . Then , for any hypotheses h1 , h2 ∈ H and any $ > 0 , there exist n ! ∈ N and a constant an ! such that | $ D ( h1 , h2 ) − $ D′ ( h1 , h2 ) | ≤ 1 2 an ! n ! ∑ k=1 dLM , k ( D , D′ ) + $ . ( 10 ) Proof . Let the domains D and D′ have the data distribution of µ ( x ) and µ′ ( x ) , respectively , over an input space X , which is a compact subset of Rn , where n is the dimension of the inputs . For brevity , we denote | $ D ( h1 , h2 ) − $ D′ ( h1 , h2 ) | as ∆D , D′ . Then , ∆D , D′ = | $ D ( h1 , h2 ) − $ D′ ( h1 , h2 ) | ≤ sup h1 , h2∈H | $ D ( h1 , h2 ) − $ D′ ( h1 , h2 ) | = sup h1 , h2∈H ∣∣∣∣ Prx∼µ ( x ) [ h1 ( x ) ∕= h2 ( x ) ] − Pr x∼µ′ ( x ) [ h1 ( x ) ∕= h2 ( x ) ] ∣∣∣∣ = sup h1 , h2∈H ∣∣∣∣ ∫ X µ ( x ) 1h1 ( x ) ∕=h2 ( x ) dx− ∫ X µ′ ( x ) 1h1 ( x ) ∕=h2 ( x ) dx ∣∣∣∣ . ( 11 ) For any hypotheses h1 , h2 , the indicator function 1h1 ( x ) ∕=h2 ( x ) is Lebesgue integrable on X , i.e . 1h1 ( x ) ∕=h2 ( x ) is a L 1 function . Since a set of continuous functions is dense in L1 ( X ) , for every $ > 0 , there exists a continuous L1 function f defined on X such that ∣∣1h1 ( x ) ∕=h2 ( x ) − f ( x ) ∣∣ ≤ $ 4 ( 12 ) for every x ∈ X , and the fixed h1 and h2 that drive equation 11 to the supremum . Accordingly , f ( x ) − $ 4 ≤ 1h1 ( x ) ∕=h2 ( x ) ≤ f ( x ) + $ 4 . ( 13 ) By integrating every term in the inequality over X , the inequality , ∫ X µ ( x ) f ( x ) dx− $ 4 ≤ ∫ X µ ( x ) 1h1 ( x ) ∕=h2 ( x ) dx ≤ ∫ X µ ( x ) f ( x ) dx+ $ 4 , ( 14 ) follows . Likewise , the same inequality on the domain D′ with µ′ instead of µ holds . By subtracting the two inequalities and reformulating it , the inequality , − $ 2 ≤ ∣∣∣∣ ∫ X µ ( x ) 1h1 ( x ) ∕=h2 ( x ) dx− ∫ X µ′ ( x ) 1h1 ( x ) ∕=h2 ( x ) dx ∣∣∣∣− ∣∣∣∣ ∫ X µ ( x ) f ( x ) dx− ∫ X µ′ ( x ) f ( x ) dx ∣∣∣∣ ≤ $ 2 , ( 15 ) is induced . By substituting the inequality in equation 15 to the equation 11 , ∆D , D′ ≤ ∣∣∣∣ ∫ X µ ( x ) f ( x ) dx− ∫ X µ′ ( x ) f ( x ) dx ∣∣∣∣+ $ 2 . ( 16 ) By the Theorem 2 , there exists a polynomial P ( x ) such that sup x∈X |f ( x ) − P ( x ) | < $ 4 , ( 17 ) and the polynomial P ( x ) is expressed as P ( x ) = n ! ∑ k=1 ∑ i∈∆k αi n∏ j=1 ( xj ) ij , ( 18 ) where n ! is the order of the polynomial , ∆k = { i = ( i1 , . . . , in ) ∈ Nn0 | ∑n j=1 ij = k } is the set of the tuples of the nonnegative integers , which add up to k , αi is the coefficient of each term of the polynomial , and x = ( x1 , x2 , . . . , xn ) . By applying equation 17 to the equation 16 and substituting the expression in equation 18 , ∆D , D′ ≤ ∣∣∣∣ ∫ X µ ( x ) P ( x ) dx− ∫ X µ′ ( x ) P ( x ) dx ∣∣∣∣+ $ = ∣∣∣∣∣∣ ∫ X µ ( x ) n ! ∑ k=1 ∑ i∈∆k αi n∏ j=1 ( xj ) ijdx− ∫ X µ′ ( x ) n ! ∑ k=1 ∑ i∈∆k αi n∏ j=1 ( xj ) ijdx ∣∣∣∣∣∣ + $ ≤ n ! ∑ k=1 ∣∣∣∣∣∣ ∑ i∈∆k αi ∫ X µ ( x ) n∏ j=1 ( xj ) ijdx− αi ∫ X µ′ ( x ) n∏ j=1 ( xj ) ijdx ∣∣∣∣∣∣ + $ ≤ n ! ∑ k=1 ∑ i∈∆k |αi| ∣∣∣∣∣∣ ∫ X µ ( x ) n∏ j=1 ( xj ) ijdx− ∫ X µ′ ( x ) n∏ j=1 ( xj ) ijdx ∣∣∣∣∣∣ + $ = n ! ∑ k=1 ∑ i∈∆k |αi| ∣∣∣∣∣∣ ∫ X ∑ c∈C p ( c ) µc ( x ) n∏ j=1 ( xj ) ijdx− ∫ X ∑ c∈C p′ ( c ) µ′c ( x ) n∏ j=1 ( xj ) ijdx ∣∣∣∣∣∣ + $ , ( 19 ) where p ( c ) and p′ ( c ) are the probability that an arbitrary data is labeled as class c in domain D and D′ , respectively , and µc ( x ) = µ ( x|y = c ) and µ′c ( x ) = µ′ ( x|y = c ) are the data distribution given that the data is labeled as class c on domain D and D′ , respectively . For a∆k = maxi∈∆k |αi| , ∆D , D′ ≤ n ! ∑ k=1 a∆k ∑ i∈∆k ∣∣∣∣∣∣ ∫ X ∑ c∈C p ( c ) µc ( x ) n∏ j=1 ( xj ) ijdx− ∫ X ∑ c∈C p′ ( c ) µ′c ( x ) n∏ j=1 ( xj ) ijdx ∣∣∣∣∣∣ + $ ≤ n ! ∑ k=1 a∆k ∑ i∈∆k ∑ c∈C ∣∣∣∣∣∣ p ( c ) ∫ X µc ( x ) n∏ j=1 ( xj ) ij − p′ ( c ) ∫ X µ′c ( x ) n∏ j=1 ( xj ) ij ∣∣∣∣∣∣ + $ ≤ n ! ∑ k=1 a∆kdLM.k ( D , D′ ) + $ ≤ 1 2 an ! n ! ∑ k=1 dLM , k ( D , D′ ) + $ , ( 20 ) for an ! = 2max1≤k≤n ! a∆k . Let N datasets be drawn from N labeled source domains S1 , S2 , . . . , SN respectively . We denote i-ith source dataset { ( xSij , y Si j ) } nSi j=1 as XSi . The empirical error of hypothesis h in i-th source domain Si estimated with XSi is formulated as $ ̂Si ( h ) = 1nSi ∑nSi j=1 1h ( xSij ) ∕=y Si j . Given a positive weight vector α = ( α1 , α2 , . . . , αN ) such that ∑N i=1 αi = 1 and αi ≥ 0 , the weighted empirical source error is formulated as $ ̂α ( h ) = ∑N i=1 αi $ ̂Si ( h ) . Lemma 2 . For N source domains S1 , S2 , . . . , SN , let nSi be the number of samples from source domain Si , m = ∑N i=1 nSi be the total number of samples from N source domains , and β = ( β1 , β2 , . . . , βN ) with βi = nSi m . Let $ α ( h ) be the weighted true source error which is the weighted sum of $ Si ( h ) = Prx∼µ ( x ) [ h ( x ) ∕= y ] . Then , Pr [ | $ ̂α ( h ) − $ α ( h ) | ≥ $ ] ≤ 2 exp −2m $ 2 ∑N i=1 α2i βi ( 21 ) Proof . It has been proven in Ben-David et al . ( 2010 ) . We now turn our focus back to the Theorem 1 in the paper and complete the proof . Theorem 1 . Let H be a hypothesis space of VC dimension d , nSi be the number of samples from source domain Si , m = ∑N i=1 nSi be the total number of samples from N source domains S1 , . . . , SN , and β = ( β1 , . . . , βN ) with βi = nSi m . Let us define a hypothesis ĥ = argminh∈H $ ̂α ( h ) that minimizes the weighted empirical source error , and a hypothesis h∗T = argminh∈H $ T ( h ) that minimizes the true target error . Then , for any δ ∈ ( 0 , 1 ) and $ > 0 , there exist N integers n1 ! , . . . , n N ! and N constants an1 ! , . . . , anN ! such that $ T ( ĥ ) ≤ $ T ( h∗T ) + ηα , β , m , δ + $ + N∑ i=1 αi 2λi + ani ! ni ! ∑ k=1 dLM , k ( Si , T ) ( 22 ) with probability at least 1 − δ , where ηα , β , m , δ = 4 √ ( ∑N i=1 α2i βi ) ( 2d ( log ( 2md ) +1 ) +2 log ( 4 δ ) m ) and λi = minh∈H { $ T ( h ) + $ Si ( h ) } . | This paper studies the multi-source domain adaptation (MSDA) problem. The authors argue that the existing MSDA solutions (1) do not explicitly consider distribution conditioned on labels of each domain, (2) rely on limited feature extraction based on one extractor, (3) do not well explore target data due to the absence of label. Correspondingly, Multi-EPL is proposed based on moment matching. | SP:6eb1eee13155a89e5122099295567d3bbe403b30 |
Multi-EPL: Accurate Multi-source Domain Adaptation | Given multiple source datasets with labels , how can we train a target model with no labeled data ? Multi-source domain adaptation ( MSDA ) aims to train a model using multiple source datasets different from a target dataset in the absence of target data labels . MSDA is a crucial problem applicable to many practical cases where labels for the target data are unavailable due to privacy issues . Existing MSDA frameworks are limited since they align data without considering conditional distributions p ( x|y ) of each domain . They also do not fully utilize the target data without labels , and rely on limited feature extraction with a single extractor . In this paper , we propose MULTI-EPL , a novel method for multi-source domain adaptation . MULTI-EPL exploits label-wise moment matching to align conditional distributions p ( x|y ) , uses pseudolabels for the unavailable target labels , and introduces an ensemble of multiple feature extractors for accurate domain adaptation . Extensive experiments show that MULTI-EPL provides the state-of-the-art performance for multi-source domain adaptation tasks in both of image domains and text domains . 1 INTRODUCTION Given multiple source datasets with labels , how can we train a target model with no labeled data ? A large training data are essential for training deep neural networks . Collecting abundant data is unfortunately an obstacle in practice ; even if enough data are obtained , manually labeling those data is prohibitively expensive . Using other available or much cheaper datasets would be a solution for these limitations ; however , indiscriminate usage of other datasets often brings severe generalization error due to the presence of dataset shifts ( Torralba & Efros ( 2011 ) ) . Unsupervised domain adaptation ( UDA ) tackles these problems where no labeled data from the target domain are available , but labeled data from other source domains are provided . Finding out domain-invariant features has been the focus of UDA since it allows knowledge transfer from the labeled source dataset to the unlabeled target dataset . There have been many efforts to transfer knowledge from a single source domain to a target one . Most recent frameworks minimize the distance between two domains by deep neural networks and distance-based techniques such as discrepancy regularizers ( Long et al . ( 2015 ; 2016 ; 2017 ) ) , adversarial networks ( Ganin et al . ( 2016 ) ; Tzeng et al . ( 2017 ) ) , and generative networks ( Liu et al . ( 2017 ) ; Zhu et al . ( 2017 ) ; Hoffman et al . ( 2018b ) ) . While the above-mentioned approaches consider one single source , we address multi-source domain adaptation ( MSDA ) , which is very crucial and more practical in real-world applications as well as more challenging . MSDA is able to bring significant performance enhancement by virtue of accessibility to multiple datasets as long as multiple domain shift problems are resolved . Previous works have extensively presented both theoretical analysis ( Ben-David et al . ( 2010 ) ; Mansour et al . ( 2008 ) ; Crammer et al . ( 2008 ) ; Hoffman et al . ( 2018a ) ; Zhao et al . ( 2018 ) ; Zellinger et al . ( 2020 ) ) and models ( Zhao et al . ( 2018 ) ; Xu et al . ( 2018 ) ; Peng et al . ( 2019 ) ) for MSDA . MDAN ( Zhao et al . ( 2018 ) ) and DCTN ( Xu et al . ( 2018 ) ) build adversarial networks for each source domain to generate features domain-invariant enough to confound domain classifiers . However , these approaches do not encompass the shifts among source domains , counting only shifts between source and target domain . M3SDA ( Peng et al . ( 2019 ) ) adopts moment matching strategy but makes the unrealistic assumption that matching the marginal probability p ( x ) would guarantee the alignment of the conditional probability p ( x|y ) . Most of these methods also do not fully exploit the knowledge of target domain , imputing to the inaccessibility to the labels . Furthermore , all these methods leverage one single feature extractor , which possibly misses important information regarding label classification . In this paper , we propose MULTI-EPL ( Multi-source domain adaptation with Ensemble of feature extractors , Pseudolabels , and Label-wise moment matching ) , a novel MSDA framework which mitigates the limitations of these methods of not explicitly considering conditional probability p ( x|y ) , and relying on only one feature extractor . The model architecture is illustrated in Figure 1 . MULTIEPL aligns the conditional probability p ( x|y ) by utilizing label-wise moment matching . We employ pseudolabels for the inaccessible target labels to maximize the usage of the target data . Moreover , generating an ensemble of features from multiple feature extractors gives abundant information about labels to the extracted features . Extensive experiments show the superiority of our methods . Our contributions are summarized as follows : • Method . We propose MULTI-EPL , a novel approach for MSDA that effectively obtains domain-invariant features from multiple domains by matching conditional probability p ( x|y ) , utilizing pseudolabels for inaccessible target labels to fully deploy target data , and using an ensemble of multiple feature extractors . It allows domain-invariant features to be extracted , capturing the intrinsic differences of different labels . • Analysis . We theoretically prove that minimizing the label-wise moment matching loss is relevant to bounding the target error . • Experiments . We conduct extensive experiments on image and text datasets . We show that 1 ) MULTI-EPL provides the state-of-the-art accuracy , and 2 ) each of our main ideas significantly contributes to the superior performance . 2 RELATED WORK Single-source Domain Adaptation . Given a labeled source dataset and an unlabeled target dataset , single-source domain adaptation aims to train a model that performs well on the target domain . The challenge of single-source domain adaptation is to reduce the discrepancy between the two domains and to obtain appropriate domain-invariant features . Various discrepancy measures such as Maximum Mean Discrepancy ( MMD ) ( Tzeng et al . ( 2014 ) ; Long et al . ( 2015 ; 2016 ; 2017 ) ; Ghifary et al . ( 2016 ) ) and KL divergence ( Zhuang et al . ( 2015 ) ) have been used as regularizers . Inspired from the insight that the domain-invariant features should exclude the clues about its domain , constructing adversarial networks against domain classifiers has shown superior performance . Liu et al . ( 2017 ) and Hoffman et al . ( 2018b ) deploy GAN to transform data across the source and target domain , while Ganin et al . ( 2016 ) and Tzeng et al . ( 2017 ) leverage the adversarial networks to extract common features of the two domains . Unlike these works , we focus on multiple source domains . Multi-source Domain Adaptation . Single-source domain adaptation should not be naively employed for multiple source domains due to the shifts between source domains . Many previous works have tackled MSDA problems theoretically . Mansour et al . ( 2008 ) establish distribution weighted combining rule that the weighted combination of source hypotheses is a good approximation for the target hypothesis . The rule is further extended to a stochastic case with joint distribution over the input and the output space in Hoffman et al . ( 2018a ) . Crammer et al . ( 2008 ) propose the general theory of how to sift appropriate samples out of multi-source data using expected loss . Efforts to find out transferable knowledge from multiple sources from the causal viewpoint are made in Zhang et al . ( 2015 ) . There have been salient studies on the learning bounds for MSDA . Ben-David et al . ( 2010 ) found the generalization bounds based on H∆H-divergence , which are further tightened by Zhao et al . ( 2018 ) . Frameworks for MSDA have been presented as well . Zhao et al . ( 2018 ) propose learning algorithms based on the generalization bounds for MSDA . DCTN ( Xu et al . ( 2018 ) ) resolves domain and category shifts between source and target domains via adversarial networks . M3SDA ( Peng et al . ( 2019 ) ) associates all the domains into a common distribution by aligning the moments of the feature distributions of multiple domains . Lin et al . ( 2020 ) focus on the visual sentiment classification tasks and attempts to find out the common latent space of source and target domains . Wang et al . ( 2020 ) consider the interactions among multiple domains and reflect the information by constructing knowledge graph . However , all these methods do not consider multimode structures ( Pei et al . ( 2018 ) ) that differently labeled data follow distinct distributions , even if they are drawn from the same domain . Also , the domain-invariant features in these methods contain the label information for only one label classifier which lead these methods to miss a large amount of label information . Different from these methods , our frameworks fully count the multimodal structures handling the data distributions in a label-wise manner and minimize the label information loss considering multiple label classifiers . Moment Matching . Domain adaptation has deployed the moment matching strategy to minimize the discrepancy between source and target domains . MMD regularizer ( Tzeng et al . ( 2014 ) ; Long et al . ( 2015 ; 2016 ; 2017 ) ; Ghifary et al . ( 2016 ) ) can be interpreted as the first-order moment while Sun et al . ( 2016 ) address second-order moments of source and target distributions . Zellinger et al . ( 2017 ) investigate the effect of higher-order moment matching . M3SDA ( Peng et al . ( 2019 ) ) demonstrates that moment matching yields remarkable performance also with multiple sources . While previous works have focused on matching the moments of marginal distributions for single-source adaptation , we handle conditional distributions in multi-source scenarios . 3 PROPOSED METHOD In this section , we describe our proposed method , MULTI-EPL . We first formulate the problem definition in Section 3.1 . Then , we describe our main ideas in Section 3.2 . Section 3.3 elaborates how to match label-wise moment with pseudolabels and Section 3.4 extends the approach by adding the concept of ensemble learning . Figure 1 shows the overview of MULTI-EPL . 3.1 PROBLEM DEFINITION Given a set of labeled datasets from N source domains S1 , . . . , SN and an unlabeled dataset from a target domain T , we aim to construct a model that minimizes test error on T . We formulate source domain Si as a tuple of the data distribution µSi on data space X and the labeling function lSi : Si = ( µSi , lSi ) . Source dataset drawn with the distribution µSi is denoted as XSi = { ( x Si j , y Si j ) } nSi j=1 . Likewise , the target domain and the target dataset are denoted as T = ( µT , lT ) and XT = { xTj } nT j=1 , respectively . We narrow our focus down to homogeneous settings in classification tasks : all domains share the same data space X and label set C. 3.2 OVERVIEW We propose MULTI-EPL based on the following observations : 1 ) existing methods focus on aligning the marginal distributions p ( x ) not the conditional ones p ( x|y ) , 2 ) knowledge of the target data is not fully employed as no target label is given , and 3 ) there exists a large amount of label information loss since domain-invariant features are extracted for only one label classifier . Thus , we design MULTIEPL aiming to solve the limitations . Designing such method entails the following challenges : 1 . Matching conditional distributions . How can we align the conditional distribution , p ( x|y ) , of multiple domains not the marginal one , p ( x ) ? 2 . Exploitation of the target data . How can we fully exploit the knowledge of the target data despite the absence of the target labels ? 3 . Maximally utilizing feature information . How can we maximally utilize the information that the domain-invariant features contain ? We propose the following main ideas to address the challenges : 1 . Label-wise moment matching ( Section 3.3 ) . We match the label-wise moments of the domain-invariant features so that the features with the same labels have similar distributions regardless of their original domains . 2 . Pseudolabels ( Section 3.3 ) . We use pseudolabels as alternatives to the target labels . 3 . Ensemble of feature representations ( Section 3.4 ) . We learn to extract ensemble of fea- tures from multiple feature extractors , each of which involves distinct domain-invariant features for its own label classifier . 3.3 LABEL-WISE MOMENT MATCHING WITH PSEUDOLABELS We describe how MULTI-EPL matches conditional distributions p ( x|y ) of the features from multiple distinct domains . In MULTI-EPL , a feature extractor fe and a label classifier flc lead the features to be domain-invariant and label-informative at the same time . The feature extractor fe extracts features from data , and the label classifier flc receives the features and predicts the labels for the data . We train fe and flc , according to the losses for label-wise moment matching and label classification , which make the features domain-invariant and label-informative , respectively . Label-wise Moment Matching . To achieve the alignment of domain-invariant features , we define a label-wise moment matching loss as follows : Llmm , K = 1 |C| ( N + 1 2 ) −1 K∑ k=1 ∑ D , D′ ∑ c∈C ∥∥∥∥∥∥∥ 1 nD , c ∑ j ; yDj =c fe ( x D j ) k − 1 nD′ , c ∑ j ; yD ′ j =c fe ( x D′ j ) k ∥∥∥∥∥∥∥ 2 , ( 1 ) where K is a hyperparameter indicating the maximum order of moments considered by the loss , D and D′ are two distinct domains amongst the N +1 domains , and nD , c is the number of data labeled as c in XD . We introduce pseudolabels for the target data , which are determined by the outputs of the model currently being trained , to manage the absence of the ground truths for the target data . In other words , we leverage flc ( fe ( xT ) ) to give the pseudolabel to the target data xT . Drawing the pseudolabels using the incomplete model , however , brings mis-labeling issue which impedes further training . To alleviate this problem , we set a threshold τ and assign the pseudolabels to the target data only when the prediction confidence is greater than the threshold . The target examples with low confidence are not pseudolabeled and not counted in label-wise moment matching . By minimizing Llmm , K , the feature extractor fe aligns data from multiple domains by bringing consistency in distributions of the features with the same labels . The data with distinct labels are aligned independently , taking account of the multimode structures that differently labeled data follow different distributions . Label Classification . The label classifier flc gets the features projected by fe as inputs and makes the label predictions . The label classification loss is defined as follows : Llc = 1 N N∑ i=1 1 nSi nSi∑ j=1 Lce ( flc ( fe ( xSij ) ) , y Si j ) , ( 2 ) where Lce is the softmax cross-entropy loss . Minimizing Llc separates the features with different labels so that each of them gets label-distinguishable . 3.4 ENSEMBLE OF FEATURE REPRESENTATIONS In this section , we introduce ensemble learning for further enhancement . Features extracted with the strategies elaborated in the previous section contain the label information for a single label classifier . However , each label classifier leverages only limited label characteristics , and thus the conventional scheme to adopt only one pair of feature extractor and label classifier captures only a small part of the label information . Our idea is to leverage an ensemble of multiple pairs of feature extractor and label classifier in order to make the features to be more label-informative . We train multiple pairs of feature extractor and label classifier in parallel following the label-wise moment matching approach explained in Section 3.3 . Let n denote the number of the feature extractors in the overall model . We denote the n ( feature extractor , label classifier ) pairs as ( fe,1 , flc,1 ) , ( fe,2 , flc,2 ) , . . . , ( fe , n , flc , n ) and the n resultant features as feat1 , feat2 , . . . , featn where feati is the output of the feature extractor fe , i . After obtaining n different feature mapping modules , we concatenate the n features into one vector featfinal = concat ( feat1 , feat2 , . . . , featn ) . The final label classifier flc , final takes the concatenated feature as input , and predicts the label of the feature . Naively exploiting multiple feature extractors , however , does not guarantee the diversity of the features since it resorts to the randomness . Thus , we introduce a new model component , extractor classifier , which separates the features from different extractors . The extractor classifier fec gets the features generated by a feature extractor as inputs and predicts which feature extractor has generated the features . For example , if n = 2 , the extractor classifier fec attempts to predict whether the input feature is extracted by the extractor fe,1 or fe,2 . By training the extractor classifier and multiple feature extractors at once , we explicitly diversify the features obtained from different extractors . We train the extractor classifier utilizing the feature diversifying loss , Lfd : Lfd = 1 N + 1 N∑ i=1 1 nSi nSi∑ j=1 n∑ k=1 Lce ( fe , k ( xSij ) , k ) + 1 nT nT∑ j=1 n∑ k=1 Lce ( fe , k ( xTj ) , k ) , ( 3 ) where n is the number of feature extractors . 3.5 MULTI-EPL : ACCURATE MULTI-SOURCE DOMAIN ADAPTATION Our final model MULTI-EPL consists of n pairs of feature extractor and label classifier , ( fe,1 , flc,1 ) , ( fe,2 , flc,2 ) , . . . , ( fe , n , flc , n ) , one extractor classifier fec , and one final label classifier flc , final . We first train the entire model except the final label classifier with the loss L : L = n∑ k=1 Llc , k + α n∑ k=1 Llmm , K , k + βLfd , ( 4 ) where Llc , k is the label classification loss of the classifier flc , k , Llmm , K , k is the label-wise moment matching loss of the feature extractor fe , k , and α and β are the hyperparameters . Then , the final label classifier is trained with respect to the label classification loss Llc , final using the concatenated features from multiple feature extractors . 4 ANALYSIS We present a theoretical insight regarding the validity of the label-wise moment matching loss . For simplicity , we tackle only binary classification tasks . The error rate of a hypothesis h on a domain D is denoted as $ D ( h ) = Pr { h ( x ) ∕= lD ( x ) } where lD is the labeling function on the domain D. We first introduce k-th order label-wise moment divergence . Definition 1 . Let D and D′ be two domains over an input space X ⊂ Rn where n is the dimension of the inputs . Let C be the set of the labels , and µc ( x ) and µ′c ( x ) be the data distribution given that the label is c , i.e . µc ( x ) = µ ( x|y = c ) and µ′c ( x ) = µ′ ( x|y = c ) for the data distribution µ and µ′ on the domains D and D′ , respectively . Then , the k-th order label-wise moment divergence dLM , k ( D , D′ ) of the two domains D and D′ over X is defined as dLM , k ( D , D′ ) = ∑ c∈C ∑ i∈∆k ∣∣∣∣∣∣ p ( c ) ∫ X µc ( x ) n∏ j=1 ( xj ) ijdx− p′ ( c ) ∫ X µ′c ( x ) n∏ j=1 ( xj ) ijdx ∣∣∣∣∣∣ , ( 5 ) where ∆k = { i = ( i1 , . . . , in ) ∈ Nn0 | ∑n j=1 ij = k } is the set of the tuples of the nonnegative integers , which add up to k , p ( c ) and p′ ( c ) are the probability that arbitrary data from D and D′ to be labeled as c respectively , and the data x ∈ X is expressed as ( x1 , . . . , xn ) . The ultimate goal of MSDA is to find a hypothesis h with the minimum target error . We nevertheless train the model with respect to the source data since ground truths for the target are unavailable . Let N datasets be drawn from N labeled source domains S1 , . . . , SN respectively . We denote i-th source dataset XSi as { ( x Si j , y Si j ) } nSi j=1 . The empirical error of hypothesis h in i-th source domain Si estimated with XSi is formulated as $ ̂Si ( h ) = 1nSi ∑nSi j=1 1h ( xSij ) ∕=y Si j . Given a weight vector α = ( α1 , α2 , . . . , αN ) such that ∑N i=1 αi = 1 , the weighted empirical source error is formulated as $ ̂α ( h ) = ∑N i=1 αi $ ̂Si ( h ) . We extend the theorems in Ben-David et al . ( 2010 ) ; Peng et al . ( 2019 ) and derive a bound for the target error $ T ( h ) , for h trained with source data , in terms of k-th order label-wise moment divergence . Theorem 1 . Let H be a hypothesis space of VC dimension d , nSi be the number of samples from source domain Si , m = ∑N i=1 nSi be the total number of samples from N source domains S1 , . . . , SN , and β = ( β1 , . . . , βN ) with βi = nSi m . Let us define a hypothesis ĥ = argminh∈H $ ̂α ( h ) that minimizes the weighted empirical source error , and a hypothesis h∗T = argminh∈H $ T ( h ) that minimizes the true target error . Then , for any δ ∈ ( 0 , 1 ) and $ > 0 , there exist N integers n1 ! , . . . , n N ! and N constants an1 ! , . . . , anN ! such that $ T ( ĥ ) ≤ $ T ( h∗T ) + ηα , β , m , δ + $ + N∑ i=1 αi 2λi + ani ! ni ! ∑ k=1 dLM , k ( Si , T ) ( 6 ) with probability at least 1 − δ , where ηα , β , m , δ = 4 √ ( ∑N i=1 α2i βi ) ( 2d ( log ( 2md ) +1 ) +2 log ( 4 δ ) m ) and λi = minh∈H { $ T ( h ) + $ Si ( h ) } . Proof . See the Appendix A.1 . Speculating that all datasets are balanced against the annotations , i.e. , p ( c ) = p′ ( c ) = 1|C| for any c ∈ C , Llmm , K is expressed as the sum of the estimates of dLM , k with k = 1 , . . . , K. The theorem provides an insight that label-wise moment matching allows the model trained with source data to have performance comparable to the optimal one on the target domain . 5 EXPERIMENTS We conduct experiments to answer the following questions of MULTI-EPL . Q1 Accuracy ( Section 5.2 ) . How well does MULTI-EPL perform in classification tasks ? Q2 Ablation Study ( Section 5.3 ) . How much does each component of MULTI-EPL contribute to performance improvement ? Q3 Effects of Degree of Ensemble ( Section 5.4 ) . How does the performance change as the number n of the pairs of the feature extractor and the label classifier increases ? 5.1 EXPERIMENTAL SETTINGS Datasets . We use three kinds of datasets , Digits-Five , Office-Caltech101 , and Amazon Reviews2 . Digits-Five consists of five datasets for digit recognition : MNIST3 ( LeCun et al . ( 1998 ) ) , MNISTM4 ( Ganin & Lempitsky ( 2015 ) ) , SVHN5 ( Netzer et al . ( 2011 ) ) , SynthDigits6 ( Ganin & Lempitsky ( 2015 ) ) , and USPS7 ( Hastie et al . ( 2001 ) ) . We set one of them as a target domain and the rest as source domains . Following the conventions in prior works ( Xu et al . ( 2018 ) ; Peng et al . ( 2019 ) ) , we randomly sample 25000 instances from the source training set and 9000 instances from the target training set to train the model except for USPS for which the whole training set is used . 1https : //people.eecs.berkeley.edu/˜jhoffman/domainadapt/ 2https : //github.com/KeiraZhao/MDAN/blob/master/amazon.npz 3http : //yann.lecun.com/exdb/mnist/ 4http : //yaroslav.ganin.net 5http : //ufldl.stanford.edu/housenumbers/ 6http : //yaroslav.ganin.net 7https : //www.kaggle.com/bistaumanga/usps-dataset Office-Caltech10 is the dataset for image classification with 10 categories that Office31 dataset and Caltech dataset have in common . It involves four different domains : Amazon , Caltech , DSLR , and Webcam . We double the number of data by data augmentation and exploit all the original data and augmented data as training data and test data respectively.Amazon Reviews dataset contains customers ’ reviews on 4 product categories : Books , DVDs , Electronics , and Kitchen appliances . The instances are encoded into 5000-dimensional vectors and are labeled as being either positive or negative depending on their sentiments . We set each of the four categories as a target and the rest as sources . For all the domains , 2000 instances are sampled for training , and the rest of the data are used for the test . Details about the datasets are summarized in Table 1 . Competitors . We use 3 MSDA algorithms , DCTN ( Xu et al . ( 2018 ) ) , M3SDA ( Peng et al . ( 2019 ) ) , and M3SDA-β ( Peng et al . ( 2019 ) ) , with state-of-the-art performances as baselines . All the frameworks share the same architecture for the feature extractor , the domain classifier , and the label classifier for consistency . For Digits-Five , we use convolutional neural networks based on LeNet5 ( LeCun et al . ( 1998 ) ) . For Office-Caltech10 , ResNet50 ( He et al . ( 2016 ) ) pretrained on ImageNet is used as the backbone architecture . For Amazon Reviews , the feature extractor is composed of three fullyconnected layers each with 1000 , 500 , and 100 output units , and a single fully-connected layer with 100 input units and 2 output units is adopted for both of the extractor and label classifiers . With Digits-Five , LeNet5 ( LeCun et al . ( 1998 ) ) and ResNet14 ( He et al . ( 2016 ) ) without any adaptation are additionally investigated in two different manners : Source Combined and Single Best . In Source Combined , multiple source datasets are simply combined and fed into a model . In Single Best , we train the model with each source dataset independently , and report the result of the best performing one . Likewise , ResNet50 and MLP consisting of 4 fully-connected layers with 1000 , 500 , 100 , and 2 units are investigated without adaptation for Office-Caltech10 and Amazon Reviews , respectively . Training Details . We train our models for Digits-Five with Adam optimizer ( Kingma & Ba ( 2015 ) ) with β1 = 0.9 , β2 = 0.999 , and the learning rate of 0.0004 for 100 epochs . All images are scaled to 32 × 32 and the mini batch size is set to 128 . We set the hyperparameters α = 0.0005 , β = 1 , and K = 2 . For the experiments with Office-Caltech10 , all the modules comprising our model are trained following SGD with the learning rate 0.001 , except that the optimizers for feature extractors have the learning rate 0.0001 . We scale all the images to 224 × 224 and set the mini batch size to 48 . All the hyperparameters are kept the same as in the experiments with Digits-Five . For Amazon Reviews , we train the models for 50 epochs using Adam optimizer with β1 = 0.9 , β2 = 0.999 , and the learning rate of 0.0001 . We set α = β = 1 , K = 2 , and the mini batch size to 100 . For every experiment , the confidence threshold τ is set to 0.9 . 5.2 PERFORMANCE EVALUATION We evaluate the performance of MULTI-EPL with n = 2 against the competitors . We repeat experiments for each setting five times and report the mean and the standard deviation . The results are summarized in Table 2 . Note that MULTI-EPL provides the best accuracy in all the datasets , showing its consistent superiority in both image datasets ( Digits-Five , Office-Caltech10 ) and text dataset ( Amazon Reviews ) . The enhancement is remarkable especially when MNIST-M is the target domain in Digits-Five , improving the accuracy by 11.48 % compared to the state-of-the-art methods . 5.3 ABLATION STUDY We perform an ablation study on Digits-Five to identify what exactly enhances the performance of MULTI-EPL . We compare MULTI-EPL with 3 of its variants : MULTI-0 , MULTI-PL , and MULTIEPL-R. MULTI-0 aligns moments regardless of the labels of the data . MULTI-PL trains the model without ensemble learning . MULTI-EPL-R exploits ensemble learning strategy but relies on randomness without the extractor classifier and the feature diversifying loss . The results are shown in Table 3 . By comparing MULTI-0 with MULTI-PL , we observe that considering labels in moment matching plays a significant role in extracting domain-invariant features . The remarkable performance gap between MULTI-PL and MULTI-EPL with n = 2 verifies the effectiveness of ensemble learning . Comparing MULTI-EPL and MULTI-EPL-R , MULTI-EPL shows a better performance than MULTI-EPL-R in half of the cases ; this means that explicitly diversifying loss often helps further improve the accuracy , while resorting to randomness for feature diversification also works in general . Hence , we conclude that we are able to apply ensemble learning approach without concern about the redundancy in features . 5.4 EFFECTS OF ENSEMBLE We vary n , the number of pairs of feature extractor and label classifier , and repeat the performance evaluation on Digits-Five . The results are summarized in Table 3 . While an ensemble of two pairs gives much better performance than the model with a single pair , using more than two pairs rarely brings further improvement . This result demonstrates that two pairs of feature extractor and label classifier are able to cover most information without losing important label information in DigitsFive . It is notable that increasing n sometimes brings small performance degradation . As more feature extractors are adopted to obtain final features , the complexity of final features increases . It is harder for the final label classifier to manage the features with high complexity compared to the simple ones . This deteriorates the performance when we exploit more than two feature extractors . 6 CONCLUSION We propose MULTI-EPL , a novel framework for the multi-source domain adaptation problem . MULTI-EPL overcomes the problems in existing methods of not directly addressing conditional distributions of data p ( x|y ) , not fully exploiting knowledge of target data , and missing large amount of label information . MULTI-EPL aligns data from multiple source domains and the target domain considering the data labels , and exploits pseudolabels for exploiting unlabeled target data . MULTIEPL further enhances the performance by generating an ensemble of multiple feature extractors . Our framework exhibits superior performance on both image and text classification tasks . Considering labels in moment matching and adding ensemble learning idea is shown to bring remarkable performance enhancement through ablation study . Future works include extending our approach to other tasks such as regression , which may require modification in the pseudolabeling method . REFERENCES Shai Ben-David , John Blitzer , Koby Crammer , Alex Kulesza , Fernando Pereira , and Jennifer Wort- man Vaughan . A theory of learning from different domains . Mach . Learn. , 79 ( 1-2 ) :151–175 , 2010 . Koby Crammer , Michael J. Kearns , and Jennifer Wortman . Learning from multiple sources . JMLR , 2008 . Yaroslav Ganin and Victor S. Lempitsky . Unsupervised domain adaptation by backpropagation . In ICML , 2015 . Yaroslav Ganin , Evgeniya Ustinova , Hana Ajakan , Pascal Germain , Hugo Larochelle , François Laviolette , Mario Marchand , and Victor Lempitsky . Domain-adversarial training of neural networks . JMLR , 2016 . Muhammad Ghifary , W. Bastiaan Kleijn , Mengjie Zhang , David Balduzzi , and Wen Li . Deep reconstruction-classification networks for unsupervised domain adaptation . In ECCV , 2016 . Trevor Hastie , Jerome H. Friedman , and Robert Tibshirani . The Elements of Statistical Learning : Data Mining , Inference , and Prediction . Springer Series in Statistics . Springer , 2001 . Kaiming He , Xiangyu Zhang , Shaoqing Ren , and Jian Sun . Deep residual learning for image recognition . In CVPR , 2016 . Judy Hoffman , Mehryar Mohri , and Ningshan Zhang . Algorithms and theory for multiple-source adaptation . In NIPS , 2018a . Judy Hoffman , Eric Tzeng , Taesung Park , Jun-Yan Zhu , Phillip Isola , Kate Saenko , Alexei A. Efros , and Trevor Darrell . Cycada : Cycle-consistent adversarial domain adaptation . In ICML , 2018b . Diederik P. Kingma and Jimmy Ba . Adam : A method for stochastic optimization . In ICLR , 2015 . Yann LeCun , Léon Bottou , Yoshua Bengio , and Patrick Haffner . Gradient-based learning applied to document recognition . Proceedings of the IEEE , 86 ( 11 ) :2278–2324 , 1998 . Chuang Lin , Sicheng Zhao , Lei Meng , and Tat-Seng Chua . Multi-source domain adaptation for visual sentiment classification . In AAAI , 2020 . Ming-Yu Liu , Thomas Breuel , and Jan Kautz . Unsupervised image-to-image translation networks . In NIPS , 2017 . Mingsheng Long , Yue Cao , Jianmin Wang , and Michael I. Jordan . Learning transferable features with deep adaptation networks . In ICML , 2015 . Mingsheng Long , Han Zhu , Jianmin Wang , and Michael I. Jordan . Unsupervised domain adaptation with residual transfer networks . In NIPS , 2016 . Mingsheng Long , Han Zhu , Jianmin Wang , and Michael I. Jordan . Deep transfer learning with joint adaptation networks . In ICML , 2017 . Yishay Mansour , Mehryar Mohri , and Afshin Rostamizadeh . Domain adaptation with multiple sources . In NIPS , 2008 . Yuval Netzer , Tao Wang , Adam Coates , Alessandro Bissacco , Bo Wu , and Andrew Y Ng . Reading digits in natural images with unsupervised feature learning . 2011 . Zhongyi Pei , Zhangjie Cao , Mingsheng Long , and Jianmin Wang . Multi-adversarial domain adaptation . In AAAI , 2018 . Xingchao Peng , Qinxun Bai , Xide Xia , Zijun Huang , Kate Saenko , and Bo Wang . Moment matching for multi-source domain adaptation . In ICCV , 2019 . Marshall Harvey Stone . Applications of the theory of boolean rings to general topology . Transactions of the American Mathematical Society , 1937 . Baochen Sun , Jiashi Feng , and Kate Saenko . Return of frustratingly easy domain adaptation . In AAAI , 2016 . A. Torralba and A . A. Efros . Unbiased look at dataset bias . In CVPR , 2011 . E. Tzeng , J. Hoffman , K. Saenko , and T. Darrell . Adversarial discriminative domain adaptation . In CVPR , 2017 . Eric Tzeng , Judy Hoffman , Ning Zhang , Kate Saenko , and Trevor Darrell . Deep domain confusion : Maximizing for domain invariance . CoRR , abs/1412.3474 , 2014 . Hang Wang , Minghao Xu , Bingbing Ni , and Wenjun Zhang . Learning to combine : Knowledge aggregation for multi-source domain adaptation . In ECCV , 2020 . Ruijia Xu , Ziliang Chen , Wangmeng Zuo , Junjie Yan , and Liang Lin . Deep cocktail network : Multisource unsupervised domain adaptation with category shift . In CVPR , 2018 . Werner Zellinger , Thomas Grubinger , Edwin Lughofer , Thomas Natschläger , and Susanne Saminger-Platz . Central moment discrepancy ( CMD ) for domain-invariant representation learning . CoRR , abs/1702.08811 , 2017 . Werner Zellinger , Bernhard Alois Moser , and Susanne Saminger-Platz . Learning bounds for moment-based domain adaptation . CoRR , abs/2002.08260 , 2020 . Kun Zhang , Mingming Gong , and Bernhard Schölkopf . Multi-source domain adaptation : A causal view . In AAAI , 2015 . Han Zhao , Shanghang Zhang , Guanhang Wu , José M. F. Moura , João Paulo Costeira , and Geoffrey J. Gordon . Adversarial multiple source domain adaptation . In NIPS , 2018 . Jun-Yan Zhu , Taesung Park , Phillip Isola , and Alexei A. Efros . Unpaired image-to-image translation using cycle-consistent adversarial networks . In ICCV , 2017 . Fuzhen Zhuang , Xiaohu Cheng , Ping Luo , Sinno Jialin Pan , and Qing He . Supervised representation learning : Transfer learning with deep autoencoders . In IJCAI , 2015 . A APPENDIX A.1 PROOF FOR THEOREM 1 In this section , we prove Theorem 1 in the paper . We first define k-th order label-wise moment divergence dLM , k , and disagreement ratio $ D ( h1 , h2 ) of the two hypotheses h1 , h2 ∈ H on the domain D. Definition 1 . Let D and D′ be two domains over an input space X ⊂ Rn where n is the dimension of the inputs . Let C be the set of the labels , and µc ( x ) and µ′c ( x ) be the data distributions given that the label is c , i.e . µc ( x ) = µ ( x|y = c ) and µ′c ( x ) = µ′ ( x|y = c ) for the data distribution µ and µ′ on the domains D and D′ , respectively . Then , the k-th order label-wise moment divergence dLM , k ( D , D′ ) of the two domains D and D′ over X is defined as dLM , k ( D , D′ ) = ∑ c∈C ∑ i∈∆k ∣∣∣∣∣∣ p ( c ) ∫ X µc ( x ) n∏ j=1 ( xj ) ijdx− p′ ( c ) ∫ X µ′c ( x ) n∏ j=1 ( xj ) ijdx ∣∣∣∣∣∣ , ( 7 ) where ∆k = { i = ( i1 , . . . , in ) ∈ Nn0 | ∑n j=1 ij = k } is the set of the tuples of the nonnegative integers , which add up to k , p ( c ) and p′ ( c ) are the probability that arbitrary data from D and D′ to be labeled as c respectively , and the data x ∈ X is expressed as ( x1 , . . . , xn ) . Definition 2 . Let D be a domain over an input space X ⊂ Rn with the data distribution µ ( x ) . Then , we define the disagreement ratio $ D ( h1 , h2 ) of the two hypotheses h1 , h2 ∈ H on the domain D as $ D ( h1 , h2 ) = Pr x∼µ ( x ) [ h1 ( x ) ∕= h2 ( x ) ] . ( 8 ) Theorem 2 . ( Stone-Weierstrass Theorem ( Stone ( 1937 ) ) ) Let K be a compact subset of Rn and f : K → R be a continuous function . Then , for every $ > 0 , there exists a polynomial , P : K → R , such that sup x∈K |f ( x ) − P ( x ) | < $ . ( 9 ) Theorem 2 indicates that continuous functions on a compact subset of Rn are approximated with polynomials . We next formulate the discrepancy of the two domains using the disagreement ratio and bound it with the label-wise moment divergence . Lemma 1 . Let D and D′ be two domains over an input space X ∈ Rn , where n is the dimension of the inputs . Then , for any hypotheses h1 , h2 ∈ H and any $ > 0 , there exist n ! ∈ N and a constant an ! such that | $ D ( h1 , h2 ) − $ D′ ( h1 , h2 ) | ≤ 1 2 an ! n ! ∑ k=1 dLM , k ( D , D′ ) + $ . ( 10 ) Proof . Let the domains D and D′ have the data distribution of µ ( x ) and µ′ ( x ) , respectively , over an input space X , which is a compact subset of Rn , where n is the dimension of the inputs . For brevity , we denote | $ D ( h1 , h2 ) − $ D′ ( h1 , h2 ) | as ∆D , D′ . Then , ∆D , D′ = | $ D ( h1 , h2 ) − $ D′ ( h1 , h2 ) | ≤ sup h1 , h2∈H | $ D ( h1 , h2 ) − $ D′ ( h1 , h2 ) | = sup h1 , h2∈H ∣∣∣∣ Prx∼µ ( x ) [ h1 ( x ) ∕= h2 ( x ) ] − Pr x∼µ′ ( x ) [ h1 ( x ) ∕= h2 ( x ) ] ∣∣∣∣ = sup h1 , h2∈H ∣∣∣∣ ∫ X µ ( x ) 1h1 ( x ) ∕=h2 ( x ) dx− ∫ X µ′ ( x ) 1h1 ( x ) ∕=h2 ( x ) dx ∣∣∣∣ . ( 11 ) For any hypotheses h1 , h2 , the indicator function 1h1 ( x ) ∕=h2 ( x ) is Lebesgue integrable on X , i.e . 1h1 ( x ) ∕=h2 ( x ) is a L 1 function . Since a set of continuous functions is dense in L1 ( X ) , for every $ > 0 , there exists a continuous L1 function f defined on X such that ∣∣1h1 ( x ) ∕=h2 ( x ) − f ( x ) ∣∣ ≤ $ 4 ( 12 ) for every x ∈ X , and the fixed h1 and h2 that drive equation 11 to the supremum . Accordingly , f ( x ) − $ 4 ≤ 1h1 ( x ) ∕=h2 ( x ) ≤ f ( x ) + $ 4 . ( 13 ) By integrating every term in the inequality over X , the inequality , ∫ X µ ( x ) f ( x ) dx− $ 4 ≤ ∫ X µ ( x ) 1h1 ( x ) ∕=h2 ( x ) dx ≤ ∫ X µ ( x ) f ( x ) dx+ $ 4 , ( 14 ) follows . Likewise , the same inequality on the domain D′ with µ′ instead of µ holds . By subtracting the two inequalities and reformulating it , the inequality , − $ 2 ≤ ∣∣∣∣ ∫ X µ ( x ) 1h1 ( x ) ∕=h2 ( x ) dx− ∫ X µ′ ( x ) 1h1 ( x ) ∕=h2 ( x ) dx ∣∣∣∣− ∣∣∣∣ ∫ X µ ( x ) f ( x ) dx− ∫ X µ′ ( x ) f ( x ) dx ∣∣∣∣ ≤ $ 2 , ( 15 ) is induced . By substituting the inequality in equation 15 to the equation 11 , ∆D , D′ ≤ ∣∣∣∣ ∫ X µ ( x ) f ( x ) dx− ∫ X µ′ ( x ) f ( x ) dx ∣∣∣∣+ $ 2 . ( 16 ) By the Theorem 2 , there exists a polynomial P ( x ) such that sup x∈X |f ( x ) − P ( x ) | < $ 4 , ( 17 ) and the polynomial P ( x ) is expressed as P ( x ) = n ! ∑ k=1 ∑ i∈∆k αi n∏ j=1 ( xj ) ij , ( 18 ) where n ! is the order of the polynomial , ∆k = { i = ( i1 , . . . , in ) ∈ Nn0 | ∑n j=1 ij = k } is the set of the tuples of the nonnegative integers , which add up to k , αi is the coefficient of each term of the polynomial , and x = ( x1 , x2 , . . . , xn ) . By applying equation 17 to the equation 16 and substituting the expression in equation 18 , ∆D , D′ ≤ ∣∣∣∣ ∫ X µ ( x ) P ( x ) dx− ∫ X µ′ ( x ) P ( x ) dx ∣∣∣∣+ $ = ∣∣∣∣∣∣ ∫ X µ ( x ) n ! ∑ k=1 ∑ i∈∆k αi n∏ j=1 ( xj ) ijdx− ∫ X µ′ ( x ) n ! ∑ k=1 ∑ i∈∆k αi n∏ j=1 ( xj ) ijdx ∣∣∣∣∣∣ + $ ≤ n ! ∑ k=1 ∣∣∣∣∣∣ ∑ i∈∆k αi ∫ X µ ( x ) n∏ j=1 ( xj ) ijdx− αi ∫ X µ′ ( x ) n∏ j=1 ( xj ) ijdx ∣∣∣∣∣∣ + $ ≤ n ! ∑ k=1 ∑ i∈∆k |αi| ∣∣∣∣∣∣ ∫ X µ ( x ) n∏ j=1 ( xj ) ijdx− ∫ X µ′ ( x ) n∏ j=1 ( xj ) ijdx ∣∣∣∣∣∣ + $ = n ! ∑ k=1 ∑ i∈∆k |αi| ∣∣∣∣∣∣ ∫ X ∑ c∈C p ( c ) µc ( x ) n∏ j=1 ( xj ) ijdx− ∫ X ∑ c∈C p′ ( c ) µ′c ( x ) n∏ j=1 ( xj ) ijdx ∣∣∣∣∣∣ + $ , ( 19 ) where p ( c ) and p′ ( c ) are the probability that an arbitrary data is labeled as class c in domain D and D′ , respectively , and µc ( x ) = µ ( x|y = c ) and µ′c ( x ) = µ′ ( x|y = c ) are the data distribution given that the data is labeled as class c on domain D and D′ , respectively . For a∆k = maxi∈∆k |αi| , ∆D , D′ ≤ n ! ∑ k=1 a∆k ∑ i∈∆k ∣∣∣∣∣∣ ∫ X ∑ c∈C p ( c ) µc ( x ) n∏ j=1 ( xj ) ijdx− ∫ X ∑ c∈C p′ ( c ) µ′c ( x ) n∏ j=1 ( xj ) ijdx ∣∣∣∣∣∣ + $ ≤ n ! ∑ k=1 a∆k ∑ i∈∆k ∑ c∈C ∣∣∣∣∣∣ p ( c ) ∫ X µc ( x ) n∏ j=1 ( xj ) ij − p′ ( c ) ∫ X µ′c ( x ) n∏ j=1 ( xj ) ij ∣∣∣∣∣∣ + $ ≤ n ! ∑ k=1 a∆kdLM.k ( D , D′ ) + $ ≤ 1 2 an ! n ! ∑ k=1 dLM , k ( D , D′ ) + $ , ( 20 ) for an ! = 2max1≤k≤n ! a∆k . Let N datasets be drawn from N labeled source domains S1 , S2 , . . . , SN respectively . We denote i-ith source dataset { ( xSij , y Si j ) } nSi j=1 as XSi . The empirical error of hypothesis h in i-th source domain Si estimated with XSi is formulated as $ ̂Si ( h ) = 1nSi ∑nSi j=1 1h ( xSij ) ∕=y Si j . Given a positive weight vector α = ( α1 , α2 , . . . , αN ) such that ∑N i=1 αi = 1 and αi ≥ 0 , the weighted empirical source error is formulated as $ ̂α ( h ) = ∑N i=1 αi $ ̂Si ( h ) . Lemma 2 . For N source domains S1 , S2 , . . . , SN , let nSi be the number of samples from source domain Si , m = ∑N i=1 nSi be the total number of samples from N source domains , and β = ( β1 , β2 , . . . , βN ) with βi = nSi m . Let $ α ( h ) be the weighted true source error which is the weighted sum of $ Si ( h ) = Prx∼µ ( x ) [ h ( x ) ∕= y ] . Then , Pr [ | $ ̂α ( h ) − $ α ( h ) | ≥ $ ] ≤ 2 exp −2m $ 2 ∑N i=1 α2i βi ( 21 ) Proof . It has been proven in Ben-David et al . ( 2010 ) . We now turn our focus back to the Theorem 1 in the paper and complete the proof . Theorem 1 . Let H be a hypothesis space of VC dimension d , nSi be the number of samples from source domain Si , m = ∑N i=1 nSi be the total number of samples from N source domains S1 , . . . , SN , and β = ( β1 , . . . , βN ) with βi = nSi m . Let us define a hypothesis ĥ = argminh∈H $ ̂α ( h ) that minimizes the weighted empirical source error , and a hypothesis h∗T = argminh∈H $ T ( h ) that minimizes the true target error . Then , for any δ ∈ ( 0 , 1 ) and $ > 0 , there exist N integers n1 ! , . . . , n N ! and N constants an1 ! , . . . , anN ! such that $ T ( ĥ ) ≤ $ T ( h∗T ) + ηα , β , m , δ + $ + N∑ i=1 αi 2λi + ani ! ni ! ∑ k=1 dLM , k ( Si , T ) ( 22 ) with probability at least 1 − δ , where ηα , β , m , δ = 4 √ ( ∑N i=1 α2i βi ) ( 2d ( log ( 2md ) +1 ) +2 log ( 4 δ ) m ) and λi = minh∈H { $ T ( h ) + $ Si ( h ) } . | The authors propose a novel method for multi-source domain adaptation (MSDA). For effective adaptation, the proposed method adopts three techniques: (1) label-wise moment matching, (2) pseudo-labeling target data, and (3) ensembling multiple feature extractors. Experimental results show that the proposed method outperforms several state-of-the-art methods in both image and text domains. | SP:6eb1eee13155a89e5122099295567d3bbe403b30 |
Overfitting for Fun and Profit: Instance-Adaptive Data Compression | 1 INTRODUCTION . The most common approach to neural lossy compression is to train a variational autoencoder ( VAE ) like model on a training dataset to minimize the expected RD cost D + βR ( Theis et al. , 2017 ; Kingma & Welling , 2013 ) . Although this approach has proven to be very successful ( Ballé et al. , 2018 ) , a model trained to minimize expectedRD cost over a full dataset is unlikely to be optimal for every test instance because the model has limited capacity , and both optimization and generalization will be imperfect . The problem of generalization will be especially significant when the testing distribution is different from the training distribution , as is likely to be the case in practice . Suboptimality of the encoder has been studied extensively under the term inference suboptimality ( Cremer et al. , 2018 ) , and it has been shown that finetuning the encoder or latents for a particular instance can lead to improved compression performance ( Lu et al. , 2020 ; Campos et al. , 2019 ; Yang et al. , 2020b ; Guo et al. , 2020 ) . This approach is appealing as no additional information needs to be added to the bitstream , and nothing changes on the receiver side . Performance gains however are limited , because the prior and decoder can not be adapted . ∗Equal contribution †Qualcomm AI Research is an initiative of Qualcomm Technologies , Inc. ‡Work done during internship at Qualcomm AI Research In this paper we present a method for full-model instance-adaptive compression , i.e . adapting the entire model to a single data instance . Unlike previous work , our method takes into account the costs for sending not only the latent prior , but also the decoder model updates , as well as quantization of these updates . This is achieved by extending the typical RD loss with an additional model rate term M that measures the number of bits required to send the model updates under a newly introduced model prior , resulting in a combined RDM loss . As an initial proof of concept , we show that this approach can lead to very substantial gains in RD performance ( ∼ 1 dB PSNR gain at the same bitrate ) on the problem of I-frame video coding , where a set of key frames , sampled from a video at 2 fps , are independently coded using an I-frame ( image compression ) model . Additionally , we show how the model rate bits are distributed across the model , and ( by means of an ablation study ) quantify the individual gains achieved by including a model-rate loss and using quantization-aware finetuning . The rest of this paper is structured as follows . Section 2 discusses the basics of neural compression and related work on adaptive compression . Section 3 presents our method , including details on the RDM loss , the choice of the model prior , its quantization , and the ( de ) coding procedure . In Sections 4 and 5 we present our experiments and results , followed by a discussion in Section 6 . 2 PRELIMINARIES AND RELATED WORK . 2.1 NEURAL DATA COMPRESSION . The standard approach to neural compression can be understood as a particular kind of VAE ( Kingma & Welling , 2013 ) . In the compression literature the encoder qφ ( z|x ) is typically defined by a neural network parameterized by φ , with either deterministic output ( so qφ ( z|x ) is one-hot ) ( Habibian et al. , 2019 ) or with fixed uniform [ 0 , 1 ] noise on the outputs ( Ballé et al. , 2018 ) . In both cases , sampling z ∼ qφ ( z|x ) is used during training while quantization is used at test time . The latent z is encoded to the bitstream using entropy coding in conjunction with a latent prior pθ ( z ) , so that coding z takes about − log pθ ( z ) bits ( up to discretization ) . On the receiving side , the entropy decoder is used with the same prior pθ ( z ) to decode z and then reconstruct x̂ using the decoder network pθ ( x|z ) ( note that we use the same symbol θ to denote the parameters of the prior and decoder jointly , as in our method both will have to be coded and added to the bitstream ) . From these considerations it is clear that the rate R and distortion D can be measured by the two terms in the following loss : LRD ( φ , θ ) = β Eqφ ( z|x ) [ − log pθ ( z ) ] ︸ ︷︷ ︸ R +Eqφ ( z|x ) [ − log pθ ( x|z ) ] ︸ ︷︷ ︸ D . ( 1 ) This loss is equal ( up to the tradeoff parameter β and an additive constant ) to the standard negative evidence lower bound ( ELBO ) used in VAE training . The rate term of ELBO is written as a KL divergence between encoder and prior , but since DKL ( q , p ) = R − H [ q ] , and the encoder entropy H [ q ] is constant in our case , minimizing the KL loss is equivalent to minimizing the rate loss . Neural video compression is typically decomposed into the problem of independently compressing a set of key frames ( i.e . I-frames ) and conditionally compressing the remaining frames ( Lu et al. , 2019 ; Liu et al. , 2020 ; Wu et al. , 2018 ; Djelouah et al. , 2019 ; Yang et al. , 2020a ) . In this work , we specifically focus on improving I-frame compression . 2.2 ADAPTIVE COMPRESSION . A compression model is trained on a dataset D with the aim of achieving optimal RD performance on test data . However , because of limited model capacity , optimization difficulties , or insufficient data ( resulting in poor generalization ) , the model will in general not achieve this goal . When the test data distribution differs from that of the training data , generalization will not be guaranteed even in the limit of infinite data and model capacity , and perfect optimization . A convenient feature of neural compression however is that a model can easily be finetuned on new data or data from a specific domain . A model can for instance ( further ) be trained after deployment , and Habibian et al . ( 2019 ) showed improved RD gains after finetuning a video compression model on footage from a dash cam , an approach dubbed adaptive compression ( Habibian et al. , 2019 ) . In adaptive compression , decoding requires access to the adapted prior and decoder models . These models ( or their delta relative to a pretrained shared model ) thus need to be signaled . When the amount of data coded with the adapted model is large , the cost of signaling the model update will be negligible as it is amortized . However , a tradeoff exists , the more restricted the domain of adaptation , the more we can expect to gain from adaptation ( e.g . an image compared to a video or collection of videos ) . In this paper we consider the case where the domain of adaptation is a set of I-frames from a single video , resulting in costs for sending model updates which become very relevant . 2.3 CLOSING THE AMORTIZATION GAP . Coding model updates can easily become prohibitively expensive when the model is adapted for every instance . However , if we only adapt the encoder or latents , no model update needs to be added to the bitstream , since the encoder is not needed for decoding as the latents are sent anyway . We can thus close , or at least reduce , the amortization gap ( the difference between qφ ( z|x ) and the optimal encoder ; Cremer et al . ( 2018 ) ) without paying any bits for model updates . Various authors have investigated this approach : Aytekin et al . ( 2018 ) ; Lu et al . ( 2020 ) adapt the encoder , while Campos et al . ( 2019 ) ; Yang et al . ( 2020b ) ; Guo et al . ( 2020 ) adapt the latents directly . This simple approach was shown to provide a modest boost in RD performance . 2.4 ENCODING MODEL UPDATES . As mentioned , when adapting ( parts of ) the decoder or prior to an instance , model updates have to be added to the bitstream in order to enable decoding . Recent works have proposed ways to finetune parts of the model , while keeping the resulting bitrate overhead small . For instance Klopp et al . ( 2020 ) train a reconstruction error predicting network at encoding time , quantize its parameters , and add them to the bitstream . Similarly ( Lam et al. , 2019 ; 2020 ) propose to finetune all parameters or only the convolutional biases , respectively , of an artifact removal filter that operates after decoding . A sparsity-enforcing and magnitude-suppressing penalty is leveraged , and additional thresholding is applied to even more strictly enforce sparsity . The update vector is thereafter quantized using k-means clustering . Finally , Zou et al . ( 2020 ) finetune the latents in a meta-learning framework , in addition to updating the decoder convolutional biases , which are quantized by k-means and thereafter transmitted . All these methods perform quantization post-training , leading to a potentially unbounded reduction in performance . Also , albeit the use of regularizing loss terms , no valid proxy for the actual cost of sending model updates is adopted . Finally , none of these methods performs adaptation of the full model . The field of model compression is related to our work as the main question to be answered is how to most efficiently compress a neural network without compromising on downstream task performance ( Han et al. , 2016 ; Kuzmin et al. , 2019 ) . Bayesian compression is closely related , where the model weights are sent under a model prior ( Louizos et al. , 2017 ; Havasi et al. , 2018 ) as is the case in our method . Instead of modeling uncertainty in parameters , we however assume a deterministic posterior ( i.e . point estimate ) . Another key difference with these works is that we send the model parameter updates relative to an existing baseline model , which enables extreme compression rates ( 0.02-0.2 bits/param ) . This concept of compressing updates has been used before in the context of federated learning ( McMahan et al. , 2017 ; Alistarh et al. , 2017 ) as well . We distinguish ourselves from that context , as there the model has to be compressed during every iteration , allowing for error corrections in later iterations . We only transmit the model updates once for every data instance that we finetune on . 3 FULL-MODEL INSTANCE-ADAPTIVE COMPRESSION . In this section we present full-model finetuning on one instance , while ( during finetuning ) taking into account both model quantization and the costs for sending model updates . The main idea is described in Section 3.1 , after which Section 3.2 and 3.3 respectively provide details regarding the model prior and its quantization . The algorithm is described in Section 3.4 . 3.1 FINETUNING AT INFERENCE TIME . Full-model instance-adaptive compression entails finetuning of a set of global model parameters { φD , θD } ( obtained by training on dataset D ) on a single instance x . This results in updated parameters φ , θ , of which only θ has to be signaled in the bitstream . In practice we only learn the changes with respect to the global model , and encode the model updates δ = θ − θD of the decoding model . In order to encode δ , we introduce a continuous model prior p ( δ ) to regularize these updates , and use the quantized counterpart p [ δ̄ ] for entropy ( de ) coding them ( more on quantization in Section 3.3 ) . The overhead for sending quantized model update δ̄ is given by model rate ĎM = − log p [ δ̄ ] , and can be approximated by its continuous counterpart M = − log p ( δ ) ( see Appendix A.1 for justification ) . Adding this term to the standard RD loss using the same tradeoff parameter β , we obtain the instance-adaptive compression objective : LRDM ( φ , δ ) = LRD ( φ , θD + δ̄ ) + β ( − log p ( δ ) ) ︸ ︷︷ ︸ M . ( 2 ) At inference time , this objective can be minimized directly to find the optimal model parameters for transmitting datapoint x . It takes into account the additional costs for encoding model updates ( M term ) , and incorporates model quantization during finetuning ( LRD evaluated at θ̄ = θD + δ̄ ) . | The paper describes an instance specific finetuning method for image and video compression including finetuning the decoder. Based on the shown experiments, the required additional bits for sending the updated finetuned model parameters are worth the achieved increase in RD performance. However, the method has only been evaluated on one video dataset and with respect to its own baseline and not with respect to any other existing method. | SP:668a13137e2d0f2dd7e7f9de5e72118d9a7eb5df |
Overfitting for Fun and Profit: Instance-Adaptive Data Compression | 1 INTRODUCTION . The most common approach to neural lossy compression is to train a variational autoencoder ( VAE ) like model on a training dataset to minimize the expected RD cost D + βR ( Theis et al. , 2017 ; Kingma & Welling , 2013 ) . Although this approach has proven to be very successful ( Ballé et al. , 2018 ) , a model trained to minimize expectedRD cost over a full dataset is unlikely to be optimal for every test instance because the model has limited capacity , and both optimization and generalization will be imperfect . The problem of generalization will be especially significant when the testing distribution is different from the training distribution , as is likely to be the case in practice . Suboptimality of the encoder has been studied extensively under the term inference suboptimality ( Cremer et al. , 2018 ) , and it has been shown that finetuning the encoder or latents for a particular instance can lead to improved compression performance ( Lu et al. , 2020 ; Campos et al. , 2019 ; Yang et al. , 2020b ; Guo et al. , 2020 ) . This approach is appealing as no additional information needs to be added to the bitstream , and nothing changes on the receiver side . Performance gains however are limited , because the prior and decoder can not be adapted . ∗Equal contribution †Qualcomm AI Research is an initiative of Qualcomm Technologies , Inc. ‡Work done during internship at Qualcomm AI Research In this paper we present a method for full-model instance-adaptive compression , i.e . adapting the entire model to a single data instance . Unlike previous work , our method takes into account the costs for sending not only the latent prior , but also the decoder model updates , as well as quantization of these updates . This is achieved by extending the typical RD loss with an additional model rate term M that measures the number of bits required to send the model updates under a newly introduced model prior , resulting in a combined RDM loss . As an initial proof of concept , we show that this approach can lead to very substantial gains in RD performance ( ∼ 1 dB PSNR gain at the same bitrate ) on the problem of I-frame video coding , where a set of key frames , sampled from a video at 2 fps , are independently coded using an I-frame ( image compression ) model . Additionally , we show how the model rate bits are distributed across the model , and ( by means of an ablation study ) quantify the individual gains achieved by including a model-rate loss and using quantization-aware finetuning . The rest of this paper is structured as follows . Section 2 discusses the basics of neural compression and related work on adaptive compression . Section 3 presents our method , including details on the RDM loss , the choice of the model prior , its quantization , and the ( de ) coding procedure . In Sections 4 and 5 we present our experiments and results , followed by a discussion in Section 6 . 2 PRELIMINARIES AND RELATED WORK . 2.1 NEURAL DATA COMPRESSION . The standard approach to neural compression can be understood as a particular kind of VAE ( Kingma & Welling , 2013 ) . In the compression literature the encoder qφ ( z|x ) is typically defined by a neural network parameterized by φ , with either deterministic output ( so qφ ( z|x ) is one-hot ) ( Habibian et al. , 2019 ) or with fixed uniform [ 0 , 1 ] noise on the outputs ( Ballé et al. , 2018 ) . In both cases , sampling z ∼ qφ ( z|x ) is used during training while quantization is used at test time . The latent z is encoded to the bitstream using entropy coding in conjunction with a latent prior pθ ( z ) , so that coding z takes about − log pθ ( z ) bits ( up to discretization ) . On the receiving side , the entropy decoder is used with the same prior pθ ( z ) to decode z and then reconstruct x̂ using the decoder network pθ ( x|z ) ( note that we use the same symbol θ to denote the parameters of the prior and decoder jointly , as in our method both will have to be coded and added to the bitstream ) . From these considerations it is clear that the rate R and distortion D can be measured by the two terms in the following loss : LRD ( φ , θ ) = β Eqφ ( z|x ) [ − log pθ ( z ) ] ︸ ︷︷ ︸ R +Eqφ ( z|x ) [ − log pθ ( x|z ) ] ︸ ︷︷ ︸ D . ( 1 ) This loss is equal ( up to the tradeoff parameter β and an additive constant ) to the standard negative evidence lower bound ( ELBO ) used in VAE training . The rate term of ELBO is written as a KL divergence between encoder and prior , but since DKL ( q , p ) = R − H [ q ] , and the encoder entropy H [ q ] is constant in our case , minimizing the KL loss is equivalent to minimizing the rate loss . Neural video compression is typically decomposed into the problem of independently compressing a set of key frames ( i.e . I-frames ) and conditionally compressing the remaining frames ( Lu et al. , 2019 ; Liu et al. , 2020 ; Wu et al. , 2018 ; Djelouah et al. , 2019 ; Yang et al. , 2020a ) . In this work , we specifically focus on improving I-frame compression . 2.2 ADAPTIVE COMPRESSION . A compression model is trained on a dataset D with the aim of achieving optimal RD performance on test data . However , because of limited model capacity , optimization difficulties , or insufficient data ( resulting in poor generalization ) , the model will in general not achieve this goal . When the test data distribution differs from that of the training data , generalization will not be guaranteed even in the limit of infinite data and model capacity , and perfect optimization . A convenient feature of neural compression however is that a model can easily be finetuned on new data or data from a specific domain . A model can for instance ( further ) be trained after deployment , and Habibian et al . ( 2019 ) showed improved RD gains after finetuning a video compression model on footage from a dash cam , an approach dubbed adaptive compression ( Habibian et al. , 2019 ) . In adaptive compression , decoding requires access to the adapted prior and decoder models . These models ( or their delta relative to a pretrained shared model ) thus need to be signaled . When the amount of data coded with the adapted model is large , the cost of signaling the model update will be negligible as it is amortized . However , a tradeoff exists , the more restricted the domain of adaptation , the more we can expect to gain from adaptation ( e.g . an image compared to a video or collection of videos ) . In this paper we consider the case where the domain of adaptation is a set of I-frames from a single video , resulting in costs for sending model updates which become very relevant . 2.3 CLOSING THE AMORTIZATION GAP . Coding model updates can easily become prohibitively expensive when the model is adapted for every instance . However , if we only adapt the encoder or latents , no model update needs to be added to the bitstream , since the encoder is not needed for decoding as the latents are sent anyway . We can thus close , or at least reduce , the amortization gap ( the difference between qφ ( z|x ) and the optimal encoder ; Cremer et al . ( 2018 ) ) without paying any bits for model updates . Various authors have investigated this approach : Aytekin et al . ( 2018 ) ; Lu et al . ( 2020 ) adapt the encoder , while Campos et al . ( 2019 ) ; Yang et al . ( 2020b ) ; Guo et al . ( 2020 ) adapt the latents directly . This simple approach was shown to provide a modest boost in RD performance . 2.4 ENCODING MODEL UPDATES . As mentioned , when adapting ( parts of ) the decoder or prior to an instance , model updates have to be added to the bitstream in order to enable decoding . Recent works have proposed ways to finetune parts of the model , while keeping the resulting bitrate overhead small . For instance Klopp et al . ( 2020 ) train a reconstruction error predicting network at encoding time , quantize its parameters , and add them to the bitstream . Similarly ( Lam et al. , 2019 ; 2020 ) propose to finetune all parameters or only the convolutional biases , respectively , of an artifact removal filter that operates after decoding . A sparsity-enforcing and magnitude-suppressing penalty is leveraged , and additional thresholding is applied to even more strictly enforce sparsity . The update vector is thereafter quantized using k-means clustering . Finally , Zou et al . ( 2020 ) finetune the latents in a meta-learning framework , in addition to updating the decoder convolutional biases , which are quantized by k-means and thereafter transmitted . All these methods perform quantization post-training , leading to a potentially unbounded reduction in performance . Also , albeit the use of regularizing loss terms , no valid proxy for the actual cost of sending model updates is adopted . Finally , none of these methods performs adaptation of the full model . The field of model compression is related to our work as the main question to be answered is how to most efficiently compress a neural network without compromising on downstream task performance ( Han et al. , 2016 ; Kuzmin et al. , 2019 ) . Bayesian compression is closely related , where the model weights are sent under a model prior ( Louizos et al. , 2017 ; Havasi et al. , 2018 ) as is the case in our method . Instead of modeling uncertainty in parameters , we however assume a deterministic posterior ( i.e . point estimate ) . Another key difference with these works is that we send the model parameter updates relative to an existing baseline model , which enables extreme compression rates ( 0.02-0.2 bits/param ) . This concept of compressing updates has been used before in the context of federated learning ( McMahan et al. , 2017 ; Alistarh et al. , 2017 ) as well . We distinguish ourselves from that context , as there the model has to be compressed during every iteration , allowing for error corrections in later iterations . We only transmit the model updates once for every data instance that we finetune on . 3 FULL-MODEL INSTANCE-ADAPTIVE COMPRESSION . In this section we present full-model finetuning on one instance , while ( during finetuning ) taking into account both model quantization and the costs for sending model updates . The main idea is described in Section 3.1 , after which Section 3.2 and 3.3 respectively provide details regarding the model prior and its quantization . The algorithm is described in Section 3.4 . 3.1 FINETUNING AT INFERENCE TIME . Full-model instance-adaptive compression entails finetuning of a set of global model parameters { φD , θD } ( obtained by training on dataset D ) on a single instance x . This results in updated parameters φ , θ , of which only θ has to be signaled in the bitstream . In practice we only learn the changes with respect to the global model , and encode the model updates δ = θ − θD of the decoding model . In order to encode δ , we introduce a continuous model prior p ( δ ) to regularize these updates , and use the quantized counterpart p [ δ̄ ] for entropy ( de ) coding them ( more on quantization in Section 3.3 ) . The overhead for sending quantized model update δ̄ is given by model rate ĎM = − log p [ δ̄ ] , and can be approximated by its continuous counterpart M = − log p ( δ ) ( see Appendix A.1 for justification ) . Adding this term to the standard RD loss using the same tradeoff parameter β , we obtain the instance-adaptive compression objective : LRDM ( φ , δ ) = LRD ( φ , θD + δ̄ ) + β ( − log p ( δ ) ) ︸ ︷︷ ︸ M . ( 2 ) At inference time , this objective can be minimized directly to find the optimal model parameters for transmitting datapoint x . It takes into account the additional costs for encoding model updates ( M term ) , and incorporates model quantization during finetuning ( LRD evaluated at θ̄ = θD + δ̄ ) . | This paper investigates how to improve the test time performance of learned image compression models through finetuning of the full model. The authors finetune the model (both the model parameters and the prior on the latent space) for every test-time instance, appending the model updates to the bitstream. The model updates are coded according to a discretised, mean-zero Gaussian distribution with a single learned variance. They demonstrate that this approach yields a superior rate-distortion curve than the non-finetuned model on a set of I-frame video data. | SP:668a13137e2d0f2dd7e7f9de5e72118d9a7eb5df |
Revisiting Point Cloud Classification with a Simple and Effective Baseline | 1 INTRODUCTION . Processing 3D point cloud data accurately is crucial in many applications including autonomous driving ( Navarro-Serment et al. , 2010 ) and robotics ( Rusu et al. , 2009 ) . In these settings , sensors like LIDAR produce unordered sets of points that correspond to object surfaces . Correctly classifying objects from this data is important for 3D scene understanding ( Uy et al. , 2019 ) . While classical approaches for this problem have relied on hand-crafted features ( Arras et al. , 2007 ) , recent efforts have focused on the design of deep neural networks ( DNNs ) to learn features directly from raw point cloud data ( Qi et al. , 2017a ) . Deep learning-based methods have proven effective in aggregating information across a set of 3D points to accurately classify objects . The most widely adopted benchmark for comparing methods for point cloud classification has been ModelNet40 ( Wu et al. , 2015b ) . The accuracy on ModelNet40 has steadily improved over the last few years from 89.2 % by PointNet ( Qi et al. , 2017a ) to 93.6 % by RSCNN ( Liu et al. , 2019c ) ( Fig . 1 ) . This progress is commonly perceived to be a result of better designs of network architectures . However , after performing a careful analysis of recent works we find two surprising results . First , we find that auxiliary factors including differing evaluation schemes , data augmentation strategies , and loss functions affect performance to such a degree that it can be difficult to disentangle improvements due to the network architecture . Second , we find that a very simple projection-based architecture works surprisingly well , outperforming state-of-the-art point-based architectures . In deep learning , as results improve on a benchmark , attention is generally focused on the novel architectures used to achieve those results . However , there are many factors beyond architecture design that influence performance including data augmentation and evaluation procedure . We refer to these additional factors as a method ’ s protocol . A protocol defines all details orthogonal to the network architecture that can be controlled to compare differing architectures . Note that it is possible for some specific form of loss or data augmentation to be tied to a specific architecture and inapplicable to other architectures . In these cases , it would be inappropriate to treat them as part of the protocol . However , for all the methods we consider in this paper , their losses and augmentation schemes are fully compatible with each other and can be considered independently . We do experiments to study the effect of protocol and discover that it accounts for a large difference in performance , so large as to obscure the contribution of a novel architecture . For example , the performance of the PointNet++ architecture ( Qi et al. , 2017b ) jumps from 90.0±0.3 to 93.3±0.3 , when switching from its original protocol to RSCNN ’ s protocol ( Liu et al. , 2019c ) . We further find that the protocols that lead to the strongest performance rely on feedback from the test set , which differs from conventional evaluation setups . We re-evaluate prior architectures using the best augmentation and loss functions , while not using any feedback from the test set . We find that by taking protocol into account , the PointNet++ architecture performs competitively with more recent ones in various settings . In addition to the surprising importance of protocol , in reviewing past approaches , another surprising discovery is that a very simple projection based baseline works very well . One needs to simply project the points to depth maps along the orthogonal views , pass them through a light-weight CNN and fuse the features . We refer to this baseline as SimpleView . Compared to previous projection-based method ( Roveri et al. , 2018 ; Sarkar et al. , 2018 ) for pointcloud classification , SimpleView is very simple . Prior methods have developed special modules for view selection , rendering , and feature merging , as well as use larger CNN backbones that are pretrained on ImageNet ( refer to Sec . 2 for more details ) . In contrast , SimpleView has no such special operations , and only requires simple point projections , a much smaller CNN backbone , and no ImageNet pretraining . The discovery of SimpleView is surprising because recent state-of-the-art results have all been achieved by point-based architectures of increasing sophistication . In recent literature , it is often assumed that point-based methods are the superior choice for point-cloud processing as they “ do not introduce explicit information loss ” ( Guo et al. , 2020 ) . Prior work has stated that “ convolution operation of these methods lacks the ability to capture nonlocally geometric features ” ( Yan et al. , 2020 ) , that a projection-base method “ often demands a huge number of views for decent performance ” ( Liu et al. , 2019c ) , and that projection-based methods often “ fine-tune a pre-trained image-based architecture for accurate recognition ” ( Liu et al. , 2019c ) . It is thus surprising that a projection-based method could achieve state-of-the-art results with a simple architecture , only a few views , and no pretraining . On ModelNet40 , SimpleView performs on par or better than more sophisticated state-of-the-art networks across various protocols , which includes the ones used by prior methods ( Table . 3 ) as well as our protocol ( Table . 5 ) . At the same time , SimpleView outperforms state-of-the-art architectures on ScanObjectNN ( Uy et al. , 2019 ) , a real-world dataset where point clouds are noisy ( background points , occlusions , holes in objects ) and are not axis-aligned . SimpleView also demonstrates better cross-dataset generalization than prior works . Furthermore , SimpleView uses less parameters than state-of-the-art networks ( Table . 5 ) . Note that we are not proposing a new architecture or method , but simply evaluating a simple and strong projection-based baseline for point-cloud classification that is largely ignored in the literature . We do not claim any novelty in the design of SimpleView because all of its components have appeared in the literature . Our contribution is showing that such a simple baseline works surprisingly well , which is a result absent in existing literature . It is worth noting that one might think that projection-based methods are not directly comparable with point-based methods because projection-based methods may have the full mesh as input , as opposed to just a point cloud . While this is true for existing results in the literature , it is not the case with SimpleView , whose input is the exact same point cloud given to a point-based method . In other words , SimpleView is directly comparable to a point-based method because they solve the exact same task . In summary , our contributions are threefold : • We show that training and evaluation factors independent of network architecture have a large impact on point-cloud classification performance . With these factors controlled for , PointNet++ performs as well as more recent architectures . • We demonstrate how SimpleView , a very simple projection based baseline performs surprisingly well on point-cloud classification . It performs on par with or better than prior networks on ModelNet40 while using fewer parameters . It also outperforms state-of-the-art methods on real-world point-cloud classification and achieves better cross-dataset generalization . 2 RELATED WORK . Point-Based Methods for Point-Cloud Analysis : A broad class of DNNs have emerged to process 3D points directly ( Simonovsky & Komodakis , 2017 ; Zaheer et al. , 2017 ; Klokov & Lempitsky , 2017 ; Xu et al. , 2018 ; Atzmon et al. , 2018 ; Wang et al. , 2018a ; Li et al. , 2018a ; Groh et al. , 2018 ; Ben-Shabat et al. , 2018 ; Xie et al. , 2018 ; Li et al. , 2018b ; Liu et al. , 2019a ; Thomas et al. , 2019 ; Komarichev et al. , 2019 ; Liu et al. , 2019b ; Yan et al. , 2020 ; Su et al. , 2018 ; Zhang et al. , 2019 ; Liu et al. , 2019a ; Atzmon et al. , 2018 ) . PointNet ( Qi et al. , 2017a ) proposed one of the first strategies , where features are updated for each point with MLP layers , and aggregated with global max pooling . However , no local comparisons are performed in PointNet , which motivates PointNet++ ( Qi et al. , 2017b ) . PointNet++ breaks subsets of points into local regions that are processed first . More explicit modeling of the spatial relations between points is performed with more recent methods ( Li et al. , 2018b ; Liu et al. , 2019c ; Wu et al. , 2019 ) . For example , PointConv learns functions to define continuous 3D convolutions that can be applied to arbitrary sets of points in a neighborhood ( Wu et al. , 2019 ) . RSCNN uses MLPs conditioned on the spatial relationship of two points to update and aggregate features around an individual sampled point ( Liu et al. , 2019c ) . There exist many variations to these methods , but the emerging trend is an increase in sophistication . Projection-Based Methods for Point-Cloud Classification : Projection-based methods for point cloud classification have been proposed in the literature . Notably , Roveri et al . ( 2018 ) learn to predict viewing angles and classify images in an end-to-end differentiable way . They use the ResNet50 model , pretrained on ImageNet as their backbone and a depth-image generation pipeline . Sarkar et al . ( 2018 ) propose a special multi-height rendering and feature merging scheme , and use a larger backbone network pretrained on ImageNet . Ahmed et al . ( 2019 ) manually define important views for each object category , create binary edge maps , and train an ensemble of PointNet++ and CNN . However , numbers in Ahmed et al . ( 2019 ) are not directly comparable to other approaches as there is a manual alignment of objects in the test set which is different from the standard ModelNet40 test set . This was confirmed with the authors . It is worth noting that even though prior work has shown sophisticated operations to be useful for achieving good results , we find that when controlling for method protocols , strong performance can be achieved with fixed orthogonal views , a smaller network , no ImageNet pretraining , and simpler rendering of points . Projection-Based Methods for Other Point-Cloud Analysis Tasks : There is a rich literature for using projection-based methods on various point-cloud analysis problems like segmentation ( Ladickỳ et al. , 2010 ; Tighe & Lazebnik , 2010 ; Riemenschneider et al. , 2014 ; Qin et al. , 2018 ; Dai & Nießner , 2018 ; Kalogerakis et al. , 2017 ; Tatarchenko et al. , 2018 ) , reconstruction ( Pittaluga et al. , 2019 ) and rendering ( Aliev et al. , 2019 ) . Notably , Boulch et al . ( 2017 ) use point cloud density to create scene meshes , which are then put into a mesh renderer to generate many image views at different scales . Lawin et al . ( 2017 ) render a scene point cloud from 120 views for different modalities like color , depth , and surface normal . Information from multiple modalities is then fused to generate point-wise predictions . For a detailed survey of various projection approaches on different point-cloud processing tasks , we encourage readers to check the recent survey paper by ( Guo et al. , 2020 ) . In this work , SimpleView serves as a stripped-down projection-based baseline for point-cloud classification that uses a few orthogonal views and simple point projections . 3D shape Analysis using Rendered Images and Voxels : Many works use images rendered from object meshes for 3D shape analysis ( Maturana & Scherer , 2015 ; Wu et al. , 2015b ; Yu et al. , 2018 ; Guo et al. , 2016 ; Shi et al. , 2015 ; Hackel et al. , 2017 ; Song & Xiao , 2016 ; 2014 ; Huang & You , 2016 ; Tchapmi et al. , 2017 ) . MVCNN exemplifies this strategy by applying a shared CNN to many rendered views and max-pooling to aggregate features ( Su et al. , 2015 ) . Subsequent approaches include RotationNet which trains the network to also predict the viewpoint for each image ( Kanezaki et al. , 2018 ) , GVCNN which groups features from subsets of views together before aggregating into a final prediction ( Feng et al. , 2018 ) , and hypergraph methods that consider the correlation across training samples ( Zhang et al. , 2018 ; Feng et al. , 2019 ) . One notable exception is Qi et al . ( 2016 ) , who use a multi-resolution variant of MVCNN , but instead of object meshes , use a voxelized version of the object for rendering . In contrast to the prior view-based methods that use object meshes with point connectivity information , and render images using basic shading and/or depth ; SimpleView takes as input raw point clouds . Another class of methods is voxel-based methods that convert points to a fixed 3D grid instead , which enables the use of 3D CNNs ( Qi et al. , 2016 ; Wu et al. , 2015a ; Maturana & Scherer , 2015 ) . Given the added dimension , such methods are usually restricted to a much lower resolution to represent objects . Though some strategies such as octrees have been used to address those limitations ( Wang et al. , 2017 ) , the advantages to processing 3D data directly in this manner do not yet appear to outweigh the additional overhead introduced . | In this paper, the author(s) do a careful analysis on the classification performance of various modern point cloud processing networks and show empirically that with evaluation protocol set the same for different models, PointNet++, which is a relatively old model, has similar or better performance than newly proposed methods. The author(s) also show a simple projection based baseline SimpleView that can work surprisingly well on point cloud classification task. They evaluate methods on ModelNet40 and ScanObjectNN datasets. | SP:22f0d88501a4d3cbaed9e347b94d600da992876f |
Revisiting Point Cloud Classification with a Simple and Effective Baseline | 1 INTRODUCTION . Processing 3D point cloud data accurately is crucial in many applications including autonomous driving ( Navarro-Serment et al. , 2010 ) and robotics ( Rusu et al. , 2009 ) . In these settings , sensors like LIDAR produce unordered sets of points that correspond to object surfaces . Correctly classifying objects from this data is important for 3D scene understanding ( Uy et al. , 2019 ) . While classical approaches for this problem have relied on hand-crafted features ( Arras et al. , 2007 ) , recent efforts have focused on the design of deep neural networks ( DNNs ) to learn features directly from raw point cloud data ( Qi et al. , 2017a ) . Deep learning-based methods have proven effective in aggregating information across a set of 3D points to accurately classify objects . The most widely adopted benchmark for comparing methods for point cloud classification has been ModelNet40 ( Wu et al. , 2015b ) . The accuracy on ModelNet40 has steadily improved over the last few years from 89.2 % by PointNet ( Qi et al. , 2017a ) to 93.6 % by RSCNN ( Liu et al. , 2019c ) ( Fig . 1 ) . This progress is commonly perceived to be a result of better designs of network architectures . However , after performing a careful analysis of recent works we find two surprising results . First , we find that auxiliary factors including differing evaluation schemes , data augmentation strategies , and loss functions affect performance to such a degree that it can be difficult to disentangle improvements due to the network architecture . Second , we find that a very simple projection-based architecture works surprisingly well , outperforming state-of-the-art point-based architectures . In deep learning , as results improve on a benchmark , attention is generally focused on the novel architectures used to achieve those results . However , there are many factors beyond architecture design that influence performance including data augmentation and evaluation procedure . We refer to these additional factors as a method ’ s protocol . A protocol defines all details orthogonal to the network architecture that can be controlled to compare differing architectures . Note that it is possible for some specific form of loss or data augmentation to be tied to a specific architecture and inapplicable to other architectures . In these cases , it would be inappropriate to treat them as part of the protocol . However , for all the methods we consider in this paper , their losses and augmentation schemes are fully compatible with each other and can be considered independently . We do experiments to study the effect of protocol and discover that it accounts for a large difference in performance , so large as to obscure the contribution of a novel architecture . For example , the performance of the PointNet++ architecture ( Qi et al. , 2017b ) jumps from 90.0±0.3 to 93.3±0.3 , when switching from its original protocol to RSCNN ’ s protocol ( Liu et al. , 2019c ) . We further find that the protocols that lead to the strongest performance rely on feedback from the test set , which differs from conventional evaluation setups . We re-evaluate prior architectures using the best augmentation and loss functions , while not using any feedback from the test set . We find that by taking protocol into account , the PointNet++ architecture performs competitively with more recent ones in various settings . In addition to the surprising importance of protocol , in reviewing past approaches , another surprising discovery is that a very simple projection based baseline works very well . One needs to simply project the points to depth maps along the orthogonal views , pass them through a light-weight CNN and fuse the features . We refer to this baseline as SimpleView . Compared to previous projection-based method ( Roveri et al. , 2018 ; Sarkar et al. , 2018 ) for pointcloud classification , SimpleView is very simple . Prior methods have developed special modules for view selection , rendering , and feature merging , as well as use larger CNN backbones that are pretrained on ImageNet ( refer to Sec . 2 for more details ) . In contrast , SimpleView has no such special operations , and only requires simple point projections , a much smaller CNN backbone , and no ImageNet pretraining . The discovery of SimpleView is surprising because recent state-of-the-art results have all been achieved by point-based architectures of increasing sophistication . In recent literature , it is often assumed that point-based methods are the superior choice for point-cloud processing as they “ do not introduce explicit information loss ” ( Guo et al. , 2020 ) . Prior work has stated that “ convolution operation of these methods lacks the ability to capture nonlocally geometric features ” ( Yan et al. , 2020 ) , that a projection-base method “ often demands a huge number of views for decent performance ” ( Liu et al. , 2019c ) , and that projection-based methods often “ fine-tune a pre-trained image-based architecture for accurate recognition ” ( Liu et al. , 2019c ) . It is thus surprising that a projection-based method could achieve state-of-the-art results with a simple architecture , only a few views , and no pretraining . On ModelNet40 , SimpleView performs on par or better than more sophisticated state-of-the-art networks across various protocols , which includes the ones used by prior methods ( Table . 3 ) as well as our protocol ( Table . 5 ) . At the same time , SimpleView outperforms state-of-the-art architectures on ScanObjectNN ( Uy et al. , 2019 ) , a real-world dataset where point clouds are noisy ( background points , occlusions , holes in objects ) and are not axis-aligned . SimpleView also demonstrates better cross-dataset generalization than prior works . Furthermore , SimpleView uses less parameters than state-of-the-art networks ( Table . 5 ) . Note that we are not proposing a new architecture or method , but simply evaluating a simple and strong projection-based baseline for point-cloud classification that is largely ignored in the literature . We do not claim any novelty in the design of SimpleView because all of its components have appeared in the literature . Our contribution is showing that such a simple baseline works surprisingly well , which is a result absent in existing literature . It is worth noting that one might think that projection-based methods are not directly comparable with point-based methods because projection-based methods may have the full mesh as input , as opposed to just a point cloud . While this is true for existing results in the literature , it is not the case with SimpleView , whose input is the exact same point cloud given to a point-based method . In other words , SimpleView is directly comparable to a point-based method because they solve the exact same task . In summary , our contributions are threefold : • We show that training and evaluation factors independent of network architecture have a large impact on point-cloud classification performance . With these factors controlled for , PointNet++ performs as well as more recent architectures . • We demonstrate how SimpleView , a very simple projection based baseline performs surprisingly well on point-cloud classification . It performs on par with or better than prior networks on ModelNet40 while using fewer parameters . It also outperforms state-of-the-art methods on real-world point-cloud classification and achieves better cross-dataset generalization . 2 RELATED WORK . Point-Based Methods for Point-Cloud Analysis : A broad class of DNNs have emerged to process 3D points directly ( Simonovsky & Komodakis , 2017 ; Zaheer et al. , 2017 ; Klokov & Lempitsky , 2017 ; Xu et al. , 2018 ; Atzmon et al. , 2018 ; Wang et al. , 2018a ; Li et al. , 2018a ; Groh et al. , 2018 ; Ben-Shabat et al. , 2018 ; Xie et al. , 2018 ; Li et al. , 2018b ; Liu et al. , 2019a ; Thomas et al. , 2019 ; Komarichev et al. , 2019 ; Liu et al. , 2019b ; Yan et al. , 2020 ; Su et al. , 2018 ; Zhang et al. , 2019 ; Liu et al. , 2019a ; Atzmon et al. , 2018 ) . PointNet ( Qi et al. , 2017a ) proposed one of the first strategies , where features are updated for each point with MLP layers , and aggregated with global max pooling . However , no local comparisons are performed in PointNet , which motivates PointNet++ ( Qi et al. , 2017b ) . PointNet++ breaks subsets of points into local regions that are processed first . More explicit modeling of the spatial relations between points is performed with more recent methods ( Li et al. , 2018b ; Liu et al. , 2019c ; Wu et al. , 2019 ) . For example , PointConv learns functions to define continuous 3D convolutions that can be applied to arbitrary sets of points in a neighborhood ( Wu et al. , 2019 ) . RSCNN uses MLPs conditioned on the spatial relationship of two points to update and aggregate features around an individual sampled point ( Liu et al. , 2019c ) . There exist many variations to these methods , but the emerging trend is an increase in sophistication . Projection-Based Methods for Point-Cloud Classification : Projection-based methods for point cloud classification have been proposed in the literature . Notably , Roveri et al . ( 2018 ) learn to predict viewing angles and classify images in an end-to-end differentiable way . They use the ResNet50 model , pretrained on ImageNet as their backbone and a depth-image generation pipeline . Sarkar et al . ( 2018 ) propose a special multi-height rendering and feature merging scheme , and use a larger backbone network pretrained on ImageNet . Ahmed et al . ( 2019 ) manually define important views for each object category , create binary edge maps , and train an ensemble of PointNet++ and CNN . However , numbers in Ahmed et al . ( 2019 ) are not directly comparable to other approaches as there is a manual alignment of objects in the test set which is different from the standard ModelNet40 test set . This was confirmed with the authors . It is worth noting that even though prior work has shown sophisticated operations to be useful for achieving good results , we find that when controlling for method protocols , strong performance can be achieved with fixed orthogonal views , a smaller network , no ImageNet pretraining , and simpler rendering of points . Projection-Based Methods for Other Point-Cloud Analysis Tasks : There is a rich literature for using projection-based methods on various point-cloud analysis problems like segmentation ( Ladickỳ et al. , 2010 ; Tighe & Lazebnik , 2010 ; Riemenschneider et al. , 2014 ; Qin et al. , 2018 ; Dai & Nießner , 2018 ; Kalogerakis et al. , 2017 ; Tatarchenko et al. , 2018 ) , reconstruction ( Pittaluga et al. , 2019 ) and rendering ( Aliev et al. , 2019 ) . Notably , Boulch et al . ( 2017 ) use point cloud density to create scene meshes , which are then put into a mesh renderer to generate many image views at different scales . Lawin et al . ( 2017 ) render a scene point cloud from 120 views for different modalities like color , depth , and surface normal . Information from multiple modalities is then fused to generate point-wise predictions . For a detailed survey of various projection approaches on different point-cloud processing tasks , we encourage readers to check the recent survey paper by ( Guo et al. , 2020 ) . In this work , SimpleView serves as a stripped-down projection-based baseline for point-cloud classification that uses a few orthogonal views and simple point projections . 3D shape Analysis using Rendered Images and Voxels : Many works use images rendered from object meshes for 3D shape analysis ( Maturana & Scherer , 2015 ; Wu et al. , 2015b ; Yu et al. , 2018 ; Guo et al. , 2016 ; Shi et al. , 2015 ; Hackel et al. , 2017 ; Song & Xiao , 2016 ; 2014 ; Huang & You , 2016 ; Tchapmi et al. , 2017 ) . MVCNN exemplifies this strategy by applying a shared CNN to many rendered views and max-pooling to aggregate features ( Su et al. , 2015 ) . Subsequent approaches include RotationNet which trains the network to also predict the viewpoint for each image ( Kanezaki et al. , 2018 ) , GVCNN which groups features from subsets of views together before aggregating into a final prediction ( Feng et al. , 2018 ) , and hypergraph methods that consider the correlation across training samples ( Zhang et al. , 2018 ; Feng et al. , 2019 ) . One notable exception is Qi et al . ( 2016 ) , who use a multi-resolution variant of MVCNN , but instead of object meshes , use a voxelized version of the object for rendering . In contrast to the prior view-based methods that use object meshes with point connectivity information , and render images using basic shading and/or depth ; SimpleView takes as input raw point clouds . Another class of methods is voxel-based methods that convert points to a fixed 3D grid instead , which enables the use of 3D CNNs ( Qi et al. , 2016 ; Wu et al. , 2015a ; Maturana & Scherer , 2015 ) . Given the added dimension , such methods are usually restricted to a much lower resolution to represent objects . Though some strategies such as octrees have been used to address those limitations ( Wang et al. , 2017 ) , the advantages to processing 3D data directly in this manner do not yet appear to outweigh the additional overhead introduced . | This paper discusses several protocols including data augmentation, point distribution, loss function, ensemble scheme, and testing models, which serves as a kindly reminder that the training protocol matters. As claimed, earlier work like PointNet++ can still achieve comparable performance to more recent methods. Such observations are useful, as different methods are supposed to be developed and measured under a unified setting. Moreover, the authors investigated a new projection-based SimpleView method by converting point clouds into depth images, achieving SOTA performance without pretrained CNNs. | SP:22f0d88501a4d3cbaed9e347b94d600da992876f |
Reducing Implicit Bias in Latent Domain Learning | A fundamental shortcoming of deep neural networks is their specialization to a single task and domain . While recent techniques in multi-domain learning enable the learning of more domain-agnostic features , their success relies firmly on the presence of domain labels , typically requiring manual annotation and careful curation of datasets . Here we focus on latent domain learning , a highly realistic , yet less explored scenario : learning from data from different domains , without access to domain annotations . This is a particularly challenging problem , since standard models exhibit an implicit bias toward learning only the large domains in data , while disregarding smaller ones . To address this issue , we propose dynamic residual adapters that adaptively account for latent domains , and weighted domain transfer — a novel augmentation strategy designed specifically for this setting . Our techniques are evaluated on image classification tasks containing multiple unannotated domains , and we demonstrate they enhance performance , in particular , on the smallest of these . 1 INTRODUCTION . While the performance of deep learning has surpassed that of humans in a range of tasks ( He et al. , 2016 ; Silver et al. , 2017 ) , machine learning models perform best when the learning objective is narrowly defined . Practical realities however often require the learning of joint models over semantically different examples . In this case , best performances are usually obtained by fitting a collection of models , with each model solving an individual subproblem . This is somewhat disappointing seeing how humans and other biological systems are capable of flexibly adapting to a large number of scenarios ( Kaiser et al. , 2017 ) . Past solutions that address this problem tend to fall into some category of multi-domain learning ( Nam & Han , 2016 ; Bulat et al. , 2019 ; Schoenauer-Sebag et al. , 2019 ) . In this setting , models are learned over diverse datasets each associated with an underlying distribution . Multi-domain learning however relies firmly on the availability of domain annotations , for example to control domainspecific architectural elements ( Rebuffi et al. , 2017 ; 2018 ; Liu et al. , 2019 ; Guo et al. , 2019 ) . Reliance on domain annotations is not limited to the multi-domain scenario , their presence is also required in domain adaptation where models transfer between related tasks ( Ganin et al. , 2016 ; Tzeng et al. , 2017 ; Hoffman et al. , 2018 ; Xu et al. , 2018 ; Peng et al. , 2019a ; Sun et al. , 2019b ) , continual learning ( Kirkpatrick et al. , 2017 ; Lopez-Paz & Ranzato , 2017 ; Riemer et al. , 2019 ) , meta learning over multiple tasks ( Finn et al. , 2017 ; Li et al. , 2018a ) , or the generalization to previously unseen domains ( Li et al. , 2018b ; 2019b ; a ; Gulrajani & Lopez-Paz , 2020 ) . The above approaches have established the notion that the presence of domain labels improves generalization . In the real world however , these can often be difficult or expensive to obtain . Consider images that were scraped from the web . Most image datasets such as Pascal VOC ( Li et al. , 2018a ) or ImageNet ( Deng et al. , 2009 ) already rely on expensive manual filtering and the removal of different looking images . Existing multi-domain approaches require that the scraped images are further annotated for the mixture of content types they will contain , such as real world images or studio photos ( Saenko et al. , 2010 ) , clipart or sketches ( Li et al. , 2017 ) . This can be an expensive process , moreover it is not clear which variations ( indoor/outdoor , urban/rural , etc . ) should be grouped . Here we consider the task of learning in absence of domain labels , or latent domain learning . This scenario encompasses any task where we have inadequate resources to assign domain labels to all data , but have reason to believe that such a partitioning of the data would in principle make sense . And as our experiments show , even when domain labels already exist , there is no guarantee that these are optimal for a given model . In this paper , we therefore argue and demonstrate that learning implicit domain assignments , end-to-end alongside the rest of the network , is the superior option . In Figure 1 we display accuracy for latent domain learning by jointly learning a single model over datasets from the Visual Decathlon benchmark that contains images from distinct domains with mutually exclusive classes . Per-domain performance is measured relative to that of 9× models learned individually on each domain — a common baseline in the multi-domain setting ( Rebuffi et al. , 2018 ; Liu et al. , 2019 ) . This highlights the central challenge of latent domain learning : a significant loss of performance for the joint model ( • ) on small domains . While the performance drop is not significant on large domains , relative accuracy is reduced by 15-20 % on Aircraft and Ucf101 , for example . Latent domain learning therefore requires customized solutions , because standard models have an implicit bias through which they disregard the smallest domains in data . The mechanisms we propose throughout this paper ( shown in • ) help overcome this : dynamic residual adapters ( Section 3.3 ) , which we couple with weighted domain transfer ( Section 3.4 ) obtain robust performance on small domains , without trading performance on larger ones . Our proposed solutions can be incorporated and trained seamlessly with existing architectures , and are able to surpass the performance of domain-supervised approaches that have access to human-annotated domain labels ( Section 4.2 ) . Moreover , qualitative analysis demonstrates that they partition latent domains in a highly intuitive way ( Figures 2 and 3 ) . 2 RELATED WORK . Multi-domain learning relates most closely to our paper . The state-of-the-art introduces small convolutional corrections in residual networks to account for individual domains ( Rebuffi et al. , 2017 ; 2018 ) . Stickland & Murray ( 2019 ) extend this approach to obtain efficient multi-task models for related language tasks . Other recent work makes use of task-specific attention mechanisms ( Liu et al. , 2019 ) , attempts to scale task-specific losses ( Kendall et al. , 2018 ) , or addresses tasks at the level of gradients ( Chen et al. , 2017 ) . Crucially , these approaches all rely firmly on domain labels . A lack of domain labels has previously attracted interest in domain adaptation , Hoffman et al . ( 2012 ) use hierarchical clustering to uncover latent domains , other work investigates the use of kernel-based clustering ( Gong et al. , 2013 ) , via exemplar SVMs ( Xu et al. , 2014 ) , or mutual information ( Xiong et al. , 2014 ) . Different from these works , we propose tackling latent domains in an end-to-end fashion , which no longer requires a clustering ansatz . In another line of work Mancini et al . ( 2018 ) estimate batch statistics of domain adaptation layers with Gaussian mixture models using only few domain labels . Peng et al . ( 2019b ) study the shift from some source domain to a target distribution that contains multiple latent domains . In our setting , there is no significant shift between source and target distributions , instead the focus lies on learning parameter efficient models that generalize well across multiple latent domains . Furthermore , our work is loosely related to learning universal representations ( Bilen & Vedaldi , 2017 ) , which Tamaazousti et al . ( 2019 ) use as a guiding principle in designing more transferable models . However , these works also assume the presence of domain labels . Multi-modal learning does not make this assumption : Deecke et al . ( 2018 ) normalize data in separate batches to account for differences in feature distributions , while Chang et al . ( 2018 ) propose an architecture that accounts for latent semantic factors to match images . As we show in our experiments , latent domain learning benefits from more customized solutions than these . Our module gives rise to a differentiable dynamic network architecture , studied e.g . in the context of reinforcement learning ( Zoph & Le , 2016 ; Pham et al. , 2018 ) , Bayesian optimization ( Kandasamy et al. , 2018 ) , when adapting to new tasks ( Mallya et al. , 2018 ; Rosenfeld & Tsotsos , 2018 ) , or in universal object detection ( Wang et al. , 2019 ) . For such architectures , two components are commonly used : Gumbel-softmax sampling ( Jang et al. , 2016 ) , e.g . leveraged in dynamic computer vision architectures ( Veit & Belongie , 2018 ; Sun et al. , 2019a ) , or mixtures of experts ( Jacobs et al. , 1991 ; Jordan & Jacobs , 1994 ) , used to scale models to large problem spaces ( Shazeer et al. , 2017 ) . From the perspective of algorithmic fairness , a desirable property for models is to ensure consistent predictive equality across different identifiable subgroups in the data ( Zemel et al. , 2013 ; Hardt et al. , 2016 ; Fish et al. , 2016 ; Corbett-Davies et al. , 2017 ) . This relates to the central goal in latent domain learning : to limit the implicit model bias toward large domains , and improve robustness on small domains . Wang et al . ( 2020 ) explore this connection for visual recognition problems , different from our work they focus their analysis on a setting in which domain annotations are available . 3 METHOD . 3.1 PROBLEM SETTING . In multi-domain learning ( Nam & Han , 2016 ; Rebuffi et al. , 2017 ; 2018 ; Bulat et al. , 2019 ; Schoenauer-Sebag et al. , 2019 ) , it is assumed that data is sampled i.i.d . from some mixture of domain distributions Pd with domain labels d = 1 , . . . , D. Together , they constitute the underlying distribution as P = ∑ d πdPd , where each domain is associated with a relative share πd = Nd/N , with N the total number of samples , and Nd those belonging to the d ’ th domain . In multi-domain learning , the domain label d is always available . While the two are closely related , in the broader multi-task scenario ( He et al. , 2017 ; Kokkinos , 2017 ; Vandenhende et al. , 2020 ) the nature of underlying tasks t = 1 , . . . , T is inherently different , and learning on each task distribution Pt is associated with an individual loss function Lt ( for example , one task may be object classification , the other semantic segmentation ) . In multi-domain learning on the other hand , all the Lt are associated with an equivalent problem type , but can vary substantially depending on domain membership.1 This is also the case for latent domain learning , with the important distinction that learning occurs over non-annotated domains . In latent domain learning the information that associates each sample with a domain d is no longer available . As such , we can not infer domain-specific labels yd from sample-domain pairs ( x , d ) and are instead forced to learn a single model fθ over the entire P. We study two potential cases for latent domain learning . The first setting ( Section 4.1 ) includes mutually exclusive classes ( as in Visual Decathlon ) and a disjoint label space Y1 ∪ · · · ∪ YD that encompasses all domains . This is a challenging setting , as models do not have a priori information about each domain ’ s label space Yd , and may therefore assign samples to false ones . For the second one ( Section 4.2 ) , we focus on a setting in which label spaces are shared ( for example , elephants can appear as a photo or painting ) and Yd = Yd′ for all domains . A standard baseline in multi-domain learning is to finetune D individual models , one for each domain ( Rebuffi et al. , 2018 ; Liu et al. , 2019 ) . Doing so requires learning a large number of parameters 1In addition , in multi-task learning samples are often associated with a set of task labels y1 , . . . , yT . In multi-domain learning , each sample has a distinct label yd with mutually exclusive Yd for each domain d. and shares no parameters across domains , but can serve as an upper guide on performance . We show that in some cases , even when domain annotations were assigned carefully , a latent domain approach can surpass the performance of such strong domain-supervised baselines , see Section 4.2 . | The authors propose a method for latent domain learning, where input data come from different domains and the domain labels are unknown. The proposed method consists of two parts: dynamic residual adapter and weighted domain transfer. The dynamic residual adapter acts as a mixture of expert layer. And the weighted domain transfer which augments the dataset by interpolating between different input pairs. Empirical results show that when combined together, the proposed method perform better than training a regular model. | SP:9c54758e7833e0c193817bdf1d1fa5b875902153 |
Reducing Implicit Bias in Latent Domain Learning | A fundamental shortcoming of deep neural networks is their specialization to a single task and domain . While recent techniques in multi-domain learning enable the learning of more domain-agnostic features , their success relies firmly on the presence of domain labels , typically requiring manual annotation and careful curation of datasets . Here we focus on latent domain learning , a highly realistic , yet less explored scenario : learning from data from different domains , without access to domain annotations . This is a particularly challenging problem , since standard models exhibit an implicit bias toward learning only the large domains in data , while disregarding smaller ones . To address this issue , we propose dynamic residual adapters that adaptively account for latent domains , and weighted domain transfer — a novel augmentation strategy designed specifically for this setting . Our techniques are evaluated on image classification tasks containing multiple unannotated domains , and we demonstrate they enhance performance , in particular , on the smallest of these . 1 INTRODUCTION . While the performance of deep learning has surpassed that of humans in a range of tasks ( He et al. , 2016 ; Silver et al. , 2017 ) , machine learning models perform best when the learning objective is narrowly defined . Practical realities however often require the learning of joint models over semantically different examples . In this case , best performances are usually obtained by fitting a collection of models , with each model solving an individual subproblem . This is somewhat disappointing seeing how humans and other biological systems are capable of flexibly adapting to a large number of scenarios ( Kaiser et al. , 2017 ) . Past solutions that address this problem tend to fall into some category of multi-domain learning ( Nam & Han , 2016 ; Bulat et al. , 2019 ; Schoenauer-Sebag et al. , 2019 ) . In this setting , models are learned over diverse datasets each associated with an underlying distribution . Multi-domain learning however relies firmly on the availability of domain annotations , for example to control domainspecific architectural elements ( Rebuffi et al. , 2017 ; 2018 ; Liu et al. , 2019 ; Guo et al. , 2019 ) . Reliance on domain annotations is not limited to the multi-domain scenario , their presence is also required in domain adaptation where models transfer between related tasks ( Ganin et al. , 2016 ; Tzeng et al. , 2017 ; Hoffman et al. , 2018 ; Xu et al. , 2018 ; Peng et al. , 2019a ; Sun et al. , 2019b ) , continual learning ( Kirkpatrick et al. , 2017 ; Lopez-Paz & Ranzato , 2017 ; Riemer et al. , 2019 ) , meta learning over multiple tasks ( Finn et al. , 2017 ; Li et al. , 2018a ) , or the generalization to previously unseen domains ( Li et al. , 2018b ; 2019b ; a ; Gulrajani & Lopez-Paz , 2020 ) . The above approaches have established the notion that the presence of domain labels improves generalization . In the real world however , these can often be difficult or expensive to obtain . Consider images that were scraped from the web . Most image datasets such as Pascal VOC ( Li et al. , 2018a ) or ImageNet ( Deng et al. , 2009 ) already rely on expensive manual filtering and the removal of different looking images . Existing multi-domain approaches require that the scraped images are further annotated for the mixture of content types they will contain , such as real world images or studio photos ( Saenko et al. , 2010 ) , clipart or sketches ( Li et al. , 2017 ) . This can be an expensive process , moreover it is not clear which variations ( indoor/outdoor , urban/rural , etc . ) should be grouped . Here we consider the task of learning in absence of domain labels , or latent domain learning . This scenario encompasses any task where we have inadequate resources to assign domain labels to all data , but have reason to believe that such a partitioning of the data would in principle make sense . And as our experiments show , even when domain labels already exist , there is no guarantee that these are optimal for a given model . In this paper , we therefore argue and demonstrate that learning implicit domain assignments , end-to-end alongside the rest of the network , is the superior option . In Figure 1 we display accuracy for latent domain learning by jointly learning a single model over datasets from the Visual Decathlon benchmark that contains images from distinct domains with mutually exclusive classes . Per-domain performance is measured relative to that of 9× models learned individually on each domain — a common baseline in the multi-domain setting ( Rebuffi et al. , 2018 ; Liu et al. , 2019 ) . This highlights the central challenge of latent domain learning : a significant loss of performance for the joint model ( • ) on small domains . While the performance drop is not significant on large domains , relative accuracy is reduced by 15-20 % on Aircraft and Ucf101 , for example . Latent domain learning therefore requires customized solutions , because standard models have an implicit bias through which they disregard the smallest domains in data . The mechanisms we propose throughout this paper ( shown in • ) help overcome this : dynamic residual adapters ( Section 3.3 ) , which we couple with weighted domain transfer ( Section 3.4 ) obtain robust performance on small domains , without trading performance on larger ones . Our proposed solutions can be incorporated and trained seamlessly with existing architectures , and are able to surpass the performance of domain-supervised approaches that have access to human-annotated domain labels ( Section 4.2 ) . Moreover , qualitative analysis demonstrates that they partition latent domains in a highly intuitive way ( Figures 2 and 3 ) . 2 RELATED WORK . Multi-domain learning relates most closely to our paper . The state-of-the-art introduces small convolutional corrections in residual networks to account for individual domains ( Rebuffi et al. , 2017 ; 2018 ) . Stickland & Murray ( 2019 ) extend this approach to obtain efficient multi-task models for related language tasks . Other recent work makes use of task-specific attention mechanisms ( Liu et al. , 2019 ) , attempts to scale task-specific losses ( Kendall et al. , 2018 ) , or addresses tasks at the level of gradients ( Chen et al. , 2017 ) . Crucially , these approaches all rely firmly on domain labels . A lack of domain labels has previously attracted interest in domain adaptation , Hoffman et al . ( 2012 ) use hierarchical clustering to uncover latent domains , other work investigates the use of kernel-based clustering ( Gong et al. , 2013 ) , via exemplar SVMs ( Xu et al. , 2014 ) , or mutual information ( Xiong et al. , 2014 ) . Different from these works , we propose tackling latent domains in an end-to-end fashion , which no longer requires a clustering ansatz . In another line of work Mancini et al . ( 2018 ) estimate batch statistics of domain adaptation layers with Gaussian mixture models using only few domain labels . Peng et al . ( 2019b ) study the shift from some source domain to a target distribution that contains multiple latent domains . In our setting , there is no significant shift between source and target distributions , instead the focus lies on learning parameter efficient models that generalize well across multiple latent domains . Furthermore , our work is loosely related to learning universal representations ( Bilen & Vedaldi , 2017 ) , which Tamaazousti et al . ( 2019 ) use as a guiding principle in designing more transferable models . However , these works also assume the presence of domain labels . Multi-modal learning does not make this assumption : Deecke et al . ( 2018 ) normalize data in separate batches to account for differences in feature distributions , while Chang et al . ( 2018 ) propose an architecture that accounts for latent semantic factors to match images . As we show in our experiments , latent domain learning benefits from more customized solutions than these . Our module gives rise to a differentiable dynamic network architecture , studied e.g . in the context of reinforcement learning ( Zoph & Le , 2016 ; Pham et al. , 2018 ) , Bayesian optimization ( Kandasamy et al. , 2018 ) , when adapting to new tasks ( Mallya et al. , 2018 ; Rosenfeld & Tsotsos , 2018 ) , or in universal object detection ( Wang et al. , 2019 ) . For such architectures , two components are commonly used : Gumbel-softmax sampling ( Jang et al. , 2016 ) , e.g . leveraged in dynamic computer vision architectures ( Veit & Belongie , 2018 ; Sun et al. , 2019a ) , or mixtures of experts ( Jacobs et al. , 1991 ; Jordan & Jacobs , 1994 ) , used to scale models to large problem spaces ( Shazeer et al. , 2017 ) . From the perspective of algorithmic fairness , a desirable property for models is to ensure consistent predictive equality across different identifiable subgroups in the data ( Zemel et al. , 2013 ; Hardt et al. , 2016 ; Fish et al. , 2016 ; Corbett-Davies et al. , 2017 ) . This relates to the central goal in latent domain learning : to limit the implicit model bias toward large domains , and improve robustness on small domains . Wang et al . ( 2020 ) explore this connection for visual recognition problems , different from our work they focus their analysis on a setting in which domain annotations are available . 3 METHOD . 3.1 PROBLEM SETTING . In multi-domain learning ( Nam & Han , 2016 ; Rebuffi et al. , 2017 ; 2018 ; Bulat et al. , 2019 ; Schoenauer-Sebag et al. , 2019 ) , it is assumed that data is sampled i.i.d . from some mixture of domain distributions Pd with domain labels d = 1 , . . . , D. Together , they constitute the underlying distribution as P = ∑ d πdPd , where each domain is associated with a relative share πd = Nd/N , with N the total number of samples , and Nd those belonging to the d ’ th domain . In multi-domain learning , the domain label d is always available . While the two are closely related , in the broader multi-task scenario ( He et al. , 2017 ; Kokkinos , 2017 ; Vandenhende et al. , 2020 ) the nature of underlying tasks t = 1 , . . . , T is inherently different , and learning on each task distribution Pt is associated with an individual loss function Lt ( for example , one task may be object classification , the other semantic segmentation ) . In multi-domain learning on the other hand , all the Lt are associated with an equivalent problem type , but can vary substantially depending on domain membership.1 This is also the case for latent domain learning , with the important distinction that learning occurs over non-annotated domains . In latent domain learning the information that associates each sample with a domain d is no longer available . As such , we can not infer domain-specific labels yd from sample-domain pairs ( x , d ) and are instead forced to learn a single model fθ over the entire P. We study two potential cases for latent domain learning . The first setting ( Section 4.1 ) includes mutually exclusive classes ( as in Visual Decathlon ) and a disjoint label space Y1 ∪ · · · ∪ YD that encompasses all domains . This is a challenging setting , as models do not have a priori information about each domain ’ s label space Yd , and may therefore assign samples to false ones . For the second one ( Section 4.2 ) , we focus on a setting in which label spaces are shared ( for example , elephants can appear as a photo or painting ) and Yd = Yd′ for all domains . A standard baseline in multi-domain learning is to finetune D individual models , one for each domain ( Rebuffi et al. , 2018 ; Liu et al. , 2019 ) . Doing so requires learning a large number of parameters 1In addition , in multi-task learning samples are often associated with a set of task labels y1 , . . . , yT . In multi-domain learning , each sample has a distinct label yd with mutually exclusive Yd for each domain d. and shares no parameters across domains , but can serve as an upper guide on performance . We show that in some cases , even when domain annotations were assigned carefully , a latent domain approach can surpass the performance of such strong domain-supervised baselines , see Section 4.2 . | The paper describes dynamic residual adapters designed to adaptively account for latent domains, and weighted domain transfer. This framework injects adaptivity into networks, preventing them from overfitting to the largest domains in distributions, a failure mode of traditional models that are exposed in latent domain learning. The approach closes a large amount of the performance gap to domain-supervised solutions. | SP:9c54758e7833e0c193817bdf1d1fa5b875902153 |
Redesigning the Classification Layer by Randomizing the Class Representation Vectors | 1 INTRODUCTION . Deep learning models achieved breakthroughs in classification tasks , allowing setting state-of-theart results in various fields such as speech recognition ( Chiu et al. , 2018 ) , natural language processing ( Vaswani et al. , 2017 ) , and computer vision ( Huang et al. , 2017 ) . In image classification task , the most common approach of training the models is as follows : first , a convolutional neural network ( CNN ) is used to extract a representative vector , denoted here as image representation vector ( also known as the feature vector ) . Then , at the classification layer , this vector is projected onto a set of weight vectors of the different target classes to create the class scores , as depicted in Fig . 1 . Last , a softmax function is applied to normalize the class scores . During training , the parameters of both the CNN and the classification layer are updated to minimize the cross-entropy loss . We refer to this procedure as the dot-product maximization approach since such training ends up maximizing the dot-product between the image representation vector and the target weight vector . Recently , it was demonstrated that despite the excellent performance of the dot-product maximization approach , it does not necessarily encourage discriminative learning of features , nor does it enforce the intra-class compactness and inter-class separability ( Liu et al. , 2016 ; Wang et al. , 2017 ; Liu et al. , 2017 ) . The intra-class compactness indicates how close image representations from the same class relate to each other , whereas the inter-class separability indicates how far away image representations from different classes are . Several works have proposed different approaches to address these caveats ( Liu et al. , 2016 ; 2017 ; Wang et al. , 2017 ; 2018b ; a ) . One of the most effective yet most straightforward solutions that were proposed is NormFace ( Wang et al. , 2017 ) , where it was suggested to maximize the cosine-similarity between vectors by normalizing both the image and class vectors . However , the authors found when minimizing the cosine-similarity directly , the models fail to converge , and hypothesized that the cause is due to the bounded range of the logits vector . To allow convergence , the authors added a scaling factor to multiply the logits vector . This approach has been widely adopted by multiple works ( Wang et al. , 2018b ; Wojke & Bewley , 2018 ; Deng et al. , 2019 ; Wang et al. , 2018a ; Fan et al. , 2019 ) . Here we will refer to this approach as the cosine-similarity maximization approach . This paper is focused on redesigning the classification layer , and the its role while kept fixed during training . We show that the visual similarity between classes is implicitly captured by the class vectors when they are learned by maximizing either the dot-product or the cosine-similarity between the image representation vector and the class vectors . Then we show that the class vectors of visually similar categories are close in their angle in the space . We investigate the effects of excluding the class vectors from training and simply drawing them randomly distributed over a hypersphere . We demonstrate that this process , which eliminates the visual similarities from the classification layer , boosts accuracy , and improves the inter-class separability ( using either dot-product maximization or cosine-similarity maximization ) . Moreover , we show that fixing the class representation vectors can solve the issues preventing from some cases to converge ( under the cosine-similarity maximization approach ) , and can further increase the intra-class compactness . Last , we show that the generalization to the learned concepts and robustness to noise are both not influenced by ignoring the visual similarities encoded in the class vectors . Recent work by Hoffer et al . ( 2018 ) , suggested to fix the classification layer to allow increased computational and memory efficiencies . The authors showed that the performance of models with fixed classification layer are on par or slightly drop ( up to 0.5 % in absolute accuracy ) when compared to models with non-fixed classification layer . However , this technique allows substantial reduction in the number of learned parameters . In the paper , the authors compared the performance of dot-product maximization models with a non-fixed classification layer against the performance of cosine-similarity maximization models with a fixed classification layer and integrated scaling factor . Such comparison might not indicate the benefits of fixing the classification layer , since the dotproduct maximization is linear with respect to the image representation while the cosine-similarity maximization is not . On the other hand , in our paper , we compare fixed and non-fixed dot-product maximization models as well as fixed and non-fixed cosine-maximization models , and show that by fixing the classification layer the accuracy might boost by up to 4 % in absolute accuracy . Moreover , while cosine-maximization models were suggested to improve the intra-class compactness , we reveal that by integrating a scaling factor to multiply the logits , the intra-class compactness is decreased . We demonstrate that by fixing the classification layer in cosine-maximization models , the models can converge and achieve a high performance without the scaling factor , and significantly improve their intra-class compactness . The outline of this paper is as follows . In Sections 2 and 3 , we formulate dot-product and cosinesimilarity maximization models , respectively , and analyze the effects of fixing the class vectors . In Section 4 , we describe the training procedure , compare the learning dynamics , and asses the generalization and robustness to corruptions of the evaluated models . We conclude the paper in Section 5 . 2 FIXED DOT-PRODUCT MAXIMIZATION . Assume an image classification task with m possible classes . Denote the training set of N examples by S = { ( xi , yi ) } Ni=1 , where xi ∈ X is the i-th instance , and yi is the corresponding class such that yi ∈ { 1 , ... , m } . In image classification a dot-product maximization model consists of two parts . The first is the image encoder , denoted as fθ : X → Rd , which is responsible for representing the input image as a d-dimensional vector , fθ ( x ) ∈ Rd , where θ is a set of learnable parameters . The second part of the model is the classification layer , which is composed of learnable parameters denoted as W ∈ Rm×d . Matrix W can be viewed as m vectors , w1 , . . . , wm , where each vector wi ∈ Rd can be considered as the representation vector associated with the i-th class . For simplicity , we omitted the bias terms and assumed they can be included in W . A consideration that is taken when designing the classification layer is choosing the operation applied between the matrix W and the image representation vector fθ ( x ) . Most commonly , a dotproduct operation is used , and the resulting vector is referred to as the logits vector . For training the models , a softmax operation is applied over the logits vector , and the result is given to a crossentropy loss which should be minimized . That is , argmin w1 , ... , wm , θ N∑ i=0 − log e wyi ·fθ ( xi ) ∑m j=1 e wj ·fθ ( xi ) = argmin w1 , ... , wm , θ N∑ i=0 − log e ‖wyi‖ ‖fθ ( xi ) ‖ cos ( αyi ) ∑m j=1 e ‖wj‖ ‖fθ ( xi ) ‖ cos ( αj ) . ( 1 ) The equality holds since wyi ·fθ ( xi ) = ‖wyi‖‖fθ ( xi ) ‖ cos ( αyi ) , where αk is the angle between the vectors wk and fθ ( xi ) . We trained three dot-product maximization models with different known CNN architectures over four datasets , varying in image size and number of classes , as described in detail in Section 4.1 . Since these models optimize the dot-product between the image vector and its corresponding learnable class vectors , we refer to these models as non-fixed dot-product maximization models . Inspecting the matrix W of the trained models reveals that visually similar classes have their corresponding class vectors close in space . On the left panel of Fig . 2 , we plot the cosine-similarity between the class vectors that were learned by the non-fixed model which was trained on the STL10 dataset . It can be seen that the vectors representing vehicles are relatively close to each other , and far away from vectors representing animals . Furthermore , when we inspect the class vectors of non-fixed models trained on CIFAR-100 ( 100 classes ) and Tiny ImageNet ( 200 classes ) , we find even larger similarities between vectors due to the high visual similarities between classes , such as boy and girl or apple and orange . By placing the vectors of visually similar classes close to each other , the inter-class separability is decreased . Moreover , we find a strong spearman correlation between the distance of class vectors and the number of misclassified examples . On the right panel of Fig . 2 , we plot the cosine-similarity between two class vectors , wi and wj , against the number of examples from category i that were wrongly classified as category j . As shown in the figure , as the class vectors are closer in space , the number of misclassifications increases . In STL-10 , CIFAR-10 , CIFAR-100 , and Tiny ImageNet , we find a correlation of 0.82 , 0.77 , 0.61 , and 0.79 , respectively ( note that all possible class pairs were considered in the computation of the correlation ) . These findings reveal that as two class vectors are closer in space , the confusion between the two corresponding classes increases . We examined whether the models benefit from the high angular similarities between the vectors . We trained the same models , but instead of learning the class vectors , we drew them randomly , normalized them ( ‖wj‖ = 1 ) , and kept them fixed during training . We refer to these models as the fixed dot-product maximization models . Since the target vectors are initialized randomly , the cosine-similarity between vectors is low even for visually similar classes . See the middle panel of Fig . 2 . Notice that by fixing the class vectors and bias term during training , the model can minimize the loss in Eq . 1 only by optimizing the vector fθ ( xi ) . It can be seen that by fixing the class vectors , the prediction is influenced mainly by the angle between fθ and the fixed wyi since the magnitude of fθ ( xi ) is multiplied with all classes and the magnitude of each class vectors is equal and set to 1 . Thus , the model is forced to optimize the angle of the image vector towards its randomized class vector . Table 1 compares the classification accuracy of models with a fixed and non-fixed classification layer . Results suggest that learning the matrix W during training is not necessarily beneficial , and might reduce accuracy when the number of classes is high , or when the classes are visually close . Additionally , we empirically found that models with fixed class vectors can be trained with higher learning rate , due to space limitation we bring the results in the appendix ( Table 7 , Table 8 , Table 9 ) . By randomly drawing the class vectors , we ignore possible visual similarities between classes and force the models to minimize the loss by increasing the inter-class separability and encoding images from visually similar classes into vectors far in space , see Fig . 3 . | This paper proposed a classification layer by randomizing the class representation vectors. This paper first analyses the class vector distributions between different training strategies, and then proposed the randomized class vector to improve the representation learning performance. The proposed model is further extended and analyzed for the fixed cosine-similarity maximization setting. The experiments demonstrate the effectiveness of the proposed method compared with the basic/vanilla baselines. | SP:7ce03d70aa54266baea251240b597fb9e967f084 |
Redesigning the Classification Layer by Randomizing the Class Representation Vectors | 1 INTRODUCTION . Deep learning models achieved breakthroughs in classification tasks , allowing setting state-of-theart results in various fields such as speech recognition ( Chiu et al. , 2018 ) , natural language processing ( Vaswani et al. , 2017 ) , and computer vision ( Huang et al. , 2017 ) . In image classification task , the most common approach of training the models is as follows : first , a convolutional neural network ( CNN ) is used to extract a representative vector , denoted here as image representation vector ( also known as the feature vector ) . Then , at the classification layer , this vector is projected onto a set of weight vectors of the different target classes to create the class scores , as depicted in Fig . 1 . Last , a softmax function is applied to normalize the class scores . During training , the parameters of both the CNN and the classification layer are updated to minimize the cross-entropy loss . We refer to this procedure as the dot-product maximization approach since such training ends up maximizing the dot-product between the image representation vector and the target weight vector . Recently , it was demonstrated that despite the excellent performance of the dot-product maximization approach , it does not necessarily encourage discriminative learning of features , nor does it enforce the intra-class compactness and inter-class separability ( Liu et al. , 2016 ; Wang et al. , 2017 ; Liu et al. , 2017 ) . The intra-class compactness indicates how close image representations from the same class relate to each other , whereas the inter-class separability indicates how far away image representations from different classes are . Several works have proposed different approaches to address these caveats ( Liu et al. , 2016 ; 2017 ; Wang et al. , 2017 ; 2018b ; a ) . One of the most effective yet most straightforward solutions that were proposed is NormFace ( Wang et al. , 2017 ) , where it was suggested to maximize the cosine-similarity between vectors by normalizing both the image and class vectors . However , the authors found when minimizing the cosine-similarity directly , the models fail to converge , and hypothesized that the cause is due to the bounded range of the logits vector . To allow convergence , the authors added a scaling factor to multiply the logits vector . This approach has been widely adopted by multiple works ( Wang et al. , 2018b ; Wojke & Bewley , 2018 ; Deng et al. , 2019 ; Wang et al. , 2018a ; Fan et al. , 2019 ) . Here we will refer to this approach as the cosine-similarity maximization approach . This paper is focused on redesigning the classification layer , and the its role while kept fixed during training . We show that the visual similarity between classes is implicitly captured by the class vectors when they are learned by maximizing either the dot-product or the cosine-similarity between the image representation vector and the class vectors . Then we show that the class vectors of visually similar categories are close in their angle in the space . We investigate the effects of excluding the class vectors from training and simply drawing them randomly distributed over a hypersphere . We demonstrate that this process , which eliminates the visual similarities from the classification layer , boosts accuracy , and improves the inter-class separability ( using either dot-product maximization or cosine-similarity maximization ) . Moreover , we show that fixing the class representation vectors can solve the issues preventing from some cases to converge ( under the cosine-similarity maximization approach ) , and can further increase the intra-class compactness . Last , we show that the generalization to the learned concepts and robustness to noise are both not influenced by ignoring the visual similarities encoded in the class vectors . Recent work by Hoffer et al . ( 2018 ) , suggested to fix the classification layer to allow increased computational and memory efficiencies . The authors showed that the performance of models with fixed classification layer are on par or slightly drop ( up to 0.5 % in absolute accuracy ) when compared to models with non-fixed classification layer . However , this technique allows substantial reduction in the number of learned parameters . In the paper , the authors compared the performance of dot-product maximization models with a non-fixed classification layer against the performance of cosine-similarity maximization models with a fixed classification layer and integrated scaling factor . Such comparison might not indicate the benefits of fixing the classification layer , since the dotproduct maximization is linear with respect to the image representation while the cosine-similarity maximization is not . On the other hand , in our paper , we compare fixed and non-fixed dot-product maximization models as well as fixed and non-fixed cosine-maximization models , and show that by fixing the classification layer the accuracy might boost by up to 4 % in absolute accuracy . Moreover , while cosine-maximization models were suggested to improve the intra-class compactness , we reveal that by integrating a scaling factor to multiply the logits , the intra-class compactness is decreased . We demonstrate that by fixing the classification layer in cosine-maximization models , the models can converge and achieve a high performance without the scaling factor , and significantly improve their intra-class compactness . The outline of this paper is as follows . In Sections 2 and 3 , we formulate dot-product and cosinesimilarity maximization models , respectively , and analyze the effects of fixing the class vectors . In Section 4 , we describe the training procedure , compare the learning dynamics , and asses the generalization and robustness to corruptions of the evaluated models . We conclude the paper in Section 5 . 2 FIXED DOT-PRODUCT MAXIMIZATION . Assume an image classification task with m possible classes . Denote the training set of N examples by S = { ( xi , yi ) } Ni=1 , where xi ∈ X is the i-th instance , and yi is the corresponding class such that yi ∈ { 1 , ... , m } . In image classification a dot-product maximization model consists of two parts . The first is the image encoder , denoted as fθ : X → Rd , which is responsible for representing the input image as a d-dimensional vector , fθ ( x ) ∈ Rd , where θ is a set of learnable parameters . The second part of the model is the classification layer , which is composed of learnable parameters denoted as W ∈ Rm×d . Matrix W can be viewed as m vectors , w1 , . . . , wm , where each vector wi ∈ Rd can be considered as the representation vector associated with the i-th class . For simplicity , we omitted the bias terms and assumed they can be included in W . A consideration that is taken when designing the classification layer is choosing the operation applied between the matrix W and the image representation vector fθ ( x ) . Most commonly , a dotproduct operation is used , and the resulting vector is referred to as the logits vector . For training the models , a softmax operation is applied over the logits vector , and the result is given to a crossentropy loss which should be minimized . That is , argmin w1 , ... , wm , θ N∑ i=0 − log e wyi ·fθ ( xi ) ∑m j=1 e wj ·fθ ( xi ) = argmin w1 , ... , wm , θ N∑ i=0 − log e ‖wyi‖ ‖fθ ( xi ) ‖ cos ( αyi ) ∑m j=1 e ‖wj‖ ‖fθ ( xi ) ‖ cos ( αj ) . ( 1 ) The equality holds since wyi ·fθ ( xi ) = ‖wyi‖‖fθ ( xi ) ‖ cos ( αyi ) , where αk is the angle between the vectors wk and fθ ( xi ) . We trained three dot-product maximization models with different known CNN architectures over four datasets , varying in image size and number of classes , as described in detail in Section 4.1 . Since these models optimize the dot-product between the image vector and its corresponding learnable class vectors , we refer to these models as non-fixed dot-product maximization models . Inspecting the matrix W of the trained models reveals that visually similar classes have their corresponding class vectors close in space . On the left panel of Fig . 2 , we plot the cosine-similarity between the class vectors that were learned by the non-fixed model which was trained on the STL10 dataset . It can be seen that the vectors representing vehicles are relatively close to each other , and far away from vectors representing animals . Furthermore , when we inspect the class vectors of non-fixed models trained on CIFAR-100 ( 100 classes ) and Tiny ImageNet ( 200 classes ) , we find even larger similarities between vectors due to the high visual similarities between classes , such as boy and girl or apple and orange . By placing the vectors of visually similar classes close to each other , the inter-class separability is decreased . Moreover , we find a strong spearman correlation between the distance of class vectors and the number of misclassified examples . On the right panel of Fig . 2 , we plot the cosine-similarity between two class vectors , wi and wj , against the number of examples from category i that were wrongly classified as category j . As shown in the figure , as the class vectors are closer in space , the number of misclassifications increases . In STL-10 , CIFAR-10 , CIFAR-100 , and Tiny ImageNet , we find a correlation of 0.82 , 0.77 , 0.61 , and 0.79 , respectively ( note that all possible class pairs were considered in the computation of the correlation ) . These findings reveal that as two class vectors are closer in space , the confusion between the two corresponding classes increases . We examined whether the models benefit from the high angular similarities between the vectors . We trained the same models , but instead of learning the class vectors , we drew them randomly , normalized them ( ‖wj‖ = 1 ) , and kept them fixed during training . We refer to these models as the fixed dot-product maximization models . Since the target vectors are initialized randomly , the cosine-similarity between vectors is low even for visually similar classes . See the middle panel of Fig . 2 . Notice that by fixing the class vectors and bias term during training , the model can minimize the loss in Eq . 1 only by optimizing the vector fθ ( xi ) . It can be seen that by fixing the class vectors , the prediction is influenced mainly by the angle between fθ and the fixed wyi since the magnitude of fθ ( xi ) is multiplied with all classes and the magnitude of each class vectors is equal and set to 1 . Thus , the model is forced to optimize the angle of the image vector towards its randomized class vector . Table 1 compares the classification accuracy of models with a fixed and non-fixed classification layer . Results suggest that learning the matrix W during training is not necessarily beneficial , and might reduce accuracy when the number of classes is high , or when the classes are visually close . Additionally , we empirically found that models with fixed class vectors can be trained with higher learning rate , due to space limitation we bring the results in the appendix ( Table 7 , Table 8 , Table 9 ) . By randomly drawing the class vectors , we ignore possible visual similarities between classes and force the models to minimize the loss by increasing the inter-class separability and encoding images from visually similar classes into vectors far in space , see Fig . 3 . | This paper introduces a new approach to learn a multi-class image classification model by fixing the weights of the classification layer. The authors propose to draw the class vectors randomly and set them as fixed during training instead of training them. They analyze this approach when a model is trained with a categorical cross-entropy and or softmax-cosine loss. The proposed approach is tested on 4 datasets: STL, CIFAR-10, CIFAR-100, TinyImagenet | SP:7ce03d70aa54266baea251240b597fb9e967f084 |
Bypassing the Random Input Mixing in Mixup | Mixup and its variants have promoted a surge of interest due to their capability of boosting the accuracy of deep models . For a random sample pair , such approaches generate a set of synthetic samples through interpolating both the inputs and their corresponding one-hot labels . Current methods either interpolate random features from an input pair or learn to mix salient features from the pair . Nevertheless , the former methods can create misleading synthetic samples or remove important features from the given inputs , and the latter strategies incur significant computation cost for selecting descriptive input regions . In this paper , we show that the effort needed for the input mixing can be bypassed . For a given sample pair , averaging the features from the two inputs and then assigning it with a set of soft labels can effectively regularize the training . We empirically show that the proposed approach performs on par with state-of-the-art strategies in terms of predictive accuracy . 1 INTRODUCTION . Deep neural networks have demonstrated their profound successes in many challenging real-world applications , including image classification ( Krizhevsky et al. , 2012 ) , speech recognition ( Graves et al. , 2013 ) , and machine translation ( Bahdanau et al. , 2015 ; Sutskever et al. , 2014 ) . One key factor attributing to such successes is the deployment of effective model regularization techniques , which empower the learning to avoid overfitting the training data and to generalize well to unseen samples . This is because current deep models typically embrace high modeling freedom with a very large number of parameters . To this end , many regularizers for deep models have been introduced , including weight decay ( Hanson & Pratt , 1988 ) , dropout ( Srivastava et al. , 2014 ) , stochastic depth ( Huang et al. , 2016 ) , batch normalization ( Ioffe & Szegedy , 2015 ) , and data augmentation schemes ( Cubuk et al. , 2019 ; Hendrycks et al. , 2020 ; Inoue , 2018 ; Lecun et al. , 1998 ; Simard et al. , 1998 ) . Among those effective regularizers , Mixup ( Zhang et al. , 2018 ) is a simple and yet effective , dataaugmentation based regularizer for enhancing the deep classification models . Through linearly interpolating random input pairs and their training targets in one-hot representation , Mixup generates a set of synthetic examples with soft labels to regularize the training . Such pairwise , label-variant data augmentation techniques ( Guo , 2020 ; Guo et al. , 2019 ; Kim et al. , 2020 ; Li et al. , 2020a ; Tokozume et al. , 2018a ; b ; Verma et al. , 2019 ; Yun et al. , 2019 ; Zhang et al. , 2018 ) have attracted a surge of interest and shown their effectiveness on boosting the accuracy of deep networks . Nevertheless , unlike label-preserving data augmentation such as rotation , flip , and crop , there is still limited knowledge about how to design better mixing policies for sample pairs for effective label-variant regularization . Current Mixup-based approaches either mix a pair of inputs using random mixing coefficients ( Guo , 2020 ; Guo et al. , 2019 ; Summers & Dinneen , 2019 ; Tokozume et al. , 2018b ; Verma et al. , 2019 ; Yun et al. , 2019 ; Zhang et al. , 2018 ) or learn to mix salient features from the given pair ( Dabouei et al. , 2020 ; Kim et al. , 2020 ; Li et al. , 2020b ; Walawalkar et al. , 2020 ) to create a set of synthetic samples . Nonetheless , the former methods may create misleading synthetic samples ( Guo et al. , 2019 ) or remove important features from the given inputs ( Kim et al. , 2020 ) and the latter strategies can incur significant computation cost for identifying and selecting the most descriptive input regions ( Kim et al. , 2020 ; Walawalkar et al. , 2020 ) . In this paper , we show that the effort needed for the input mixing with a range of mixing ratios can be bypassed . For a given input pair , one can average the features from the two inputs , and then assign it with a set of soft labels . These soft labels are adaptively learned during training to incorporate class information beyond the provided label pair as well as the evolving states of the training . The method is illustrated in Figure 1 , where the mixed input is the pixel-wise average of features from the two inputs and its training target is the combination of the local soft label , which is the average of the two one-hot targets , and the global soft label , which is generated by the networks during training . We empirically show that the proposed approach performs on par with state-of-the-art methods with random input mixing policy or learning to mixing strategy , in terms of predictive accuracy . We also demonstrate that the synthetic samples created by our method keep tuning the networks long after the training error on the original training set is minimal , encouraging the learning to generate , for each class of the training samples , tight representation clusters . Also , the Class Activation Mapping ( CAM ) ( Zhou et al. , 2016 ) visualization suggests that our method tends to focus on narrower regions of an image for classification . 2 BYPASSING THE INPUT MIXING IN MIXUP . 2.1 MIXUP-BASED DATA AUGMENTATION . For a standard classification setting with a training data set ( X ; Y ) , the objective of the task is to develop a classifier which assigns every input x ∈ X a label y ∈ Y . Instead of using the provided training set ( X ; Y ) , Mixup ( Zhang et al. , 2018 ) generates synthetic samples with soft labels for training . For a pair of random training samples ( xi ; yi ) and ( xj ; yj ) , where x is the input and y the one-hot encoding of the corresponding class , Mixup creates a synthetic sample as follows . x̃ijλ = λx i + ( 1− λ ) xj , ( 1 ) ỹijλ = λy i + ( 1− λ ) yj , ( 2 ) where λ is a scalar mixing policy for mixing both the inputs and the modeling targets of the sample pair . λ is sampled from a Beta ( α , α ) distribution with a hyper-parameter α . The generated samples ( x̃ijλ , ỹ ij λ ) are then fed into the model for training to minimize the cross-entropy loss function . Current variants of Mixup focus on the introduction of a representation function ψ for input mixing : x̃ijλ = ψ ( x i|xj , λ ) + ψ ( xj |xi , 1− λ ) . ( 3 ) The state-of-the-art random input mixing variant CutMix ( Yun et al. , 2019 ) defines the ψ function to form a binary rectangular mask applying to a randomly chosen rectangle covering λ proportion of the input image . PuzzleMix ( Kim et al. , 2020 ) is the state-of-the-art learning to mixing variant . This method defines the ψ function to compute the saliency map of the input pair , find the optimal mask , and optimize the transport plans for generating the mixed example . This is to ensure that the mixed image contain sufficient target class information corresponding to the mixing ratio λ while preserving the local statistics of each input . 2.2 FORMING THE TRAINING INPUT . Similar to Mixup and its variants , our method also creates mixed samples from a random sample pair , but for a given sample pair our method does not generate a set of inputs with different features . Instead , for a range of mixing ratios λs , our approach uses the same mixed input , invariant to the mixing ratios provided . We term our method Label driven Mixup ( denoted as LaMix ) . To this end , the mixed input x̃ij in LaMix has two forms . For the random input mixing methods such as Mixup and CutMix , it is formed by pixel-wise average of the raw features of the input pair ( xi , xj ) : x̃ij = 0.5xi + 0.5xj . ( 4 ) For the learning to mixing methods such as PuzzleMix , the mixed input is formed by pixel-wise average of the saliency features computed with λ value as 0.5 : x̃ij = ψ ( xi|xj , λ = 0.5 ) + ψ ( xj |xi , λ = 0.5 ) . ( 5 ) The newly resulting input x̃ij is then used for training , by passing through a neural network model fϕ ( parameterized with ϕ ) to generate the m-dimensional input embedding Sij ∈ Rm : Sij = fϕ ( x̃ ij ) . ( 6 ) Next , the resulting Sij is then fed into a linear fullyconnected layer Wl ∈ Rc×m to produce the predicted classification distribution over the c classification target classes : y ij = Softmax ( WlSij ) . ( 7 ) The error of the training is computed by comparing the prediction yij and the training target of the input x̃ij , which is discussed next . 2.3 FORMING THE TRAINING TARGET . For the same mixed input x̃ij created from a random input pair ( xi , xj ) , LaMix associates it with various soft target label ÿij , which is learned by the networks with two steps : 1 ) obtaining global soft label and 2 ) integrating with local soft label . In detail , the dynamically assigned soft target label ÿij is a function of ( xi , xj , yi , yj , λ ) , as follows . ÿijλ = τ ( x i , xj , λ , yi , yj ) . ( 8 ) As illustrated in Figure 1 , LaMix implements the τ ( · ) function through adding an additional fullyconnected layer Wt ∈ Rc×m to the original networks . That is , for the given input x̃ij with λ , LaMix first computes its probabilities over the c classification targets , denoted as pijλ : pijλ = Softmax ( σ ( WtS ij ) ) , ( 9 ) where σ denotes the Sigmoid function , and Sij is the same input embedding as that in Equation 7 . In other words , the two predictions ( i.e. , Equations 7 and 9 ) share the same networks except for the last layer . Because the predictions pijλ are about all the c target classes of the given data , such predictions thus reflect the class information beyond the provided local label pair , namely ( yi , yj ) . For description purpose , we term pijλ global soft label . The Sigmoid function here will provide the probability of associating the input to a particular label . After having the global soft label pijλ , we then integrate it with the local label of the given sample pair , i.e. , ỹijλ as described in Equation 2 , as follows : ÿijλ = βỹ ij λ + ( 1− β ) p ij λ , ( 10 ) where β is a scalar coefficient between [ 0,1 ] . Doing so , we enable the synthetic sample ( x̃ij , ÿijλ ) to have information from both the local labels of the provided sample pair ( i.e. , ỹijλ ) and the class information beyond the labels of the given pair ( i.e. , pijλ ) . This process is also illustrated in Figure 1 . | This paper simply combines mixup and self-distillation to achieve more adaptive soft label, which effectively regularize the training. In the manuscript, authors argue that the existed mixup-based approaches has two mainly efforts, may create misleading training samples or meet computation cost issue on creating samples. Motivated by this, they propose "LaMix", which can leverage the information of self-distillation, to solve those two efforts and achieve competitive performance with SOTA "Puzzle-mixup". | SP:d56d16dbf3be1381b4deb4fe29892f894dff3ff4 |
Bypassing the Random Input Mixing in Mixup | Mixup and its variants have promoted a surge of interest due to their capability of boosting the accuracy of deep models . For a random sample pair , such approaches generate a set of synthetic samples through interpolating both the inputs and their corresponding one-hot labels . Current methods either interpolate random features from an input pair or learn to mix salient features from the pair . Nevertheless , the former methods can create misleading synthetic samples or remove important features from the given inputs , and the latter strategies incur significant computation cost for selecting descriptive input regions . In this paper , we show that the effort needed for the input mixing can be bypassed . For a given sample pair , averaging the features from the two inputs and then assigning it with a set of soft labels can effectively regularize the training . We empirically show that the proposed approach performs on par with state-of-the-art strategies in terms of predictive accuracy . 1 INTRODUCTION . Deep neural networks have demonstrated their profound successes in many challenging real-world applications , including image classification ( Krizhevsky et al. , 2012 ) , speech recognition ( Graves et al. , 2013 ) , and machine translation ( Bahdanau et al. , 2015 ; Sutskever et al. , 2014 ) . One key factor attributing to such successes is the deployment of effective model regularization techniques , which empower the learning to avoid overfitting the training data and to generalize well to unseen samples . This is because current deep models typically embrace high modeling freedom with a very large number of parameters . To this end , many regularizers for deep models have been introduced , including weight decay ( Hanson & Pratt , 1988 ) , dropout ( Srivastava et al. , 2014 ) , stochastic depth ( Huang et al. , 2016 ) , batch normalization ( Ioffe & Szegedy , 2015 ) , and data augmentation schemes ( Cubuk et al. , 2019 ; Hendrycks et al. , 2020 ; Inoue , 2018 ; Lecun et al. , 1998 ; Simard et al. , 1998 ) . Among those effective regularizers , Mixup ( Zhang et al. , 2018 ) is a simple and yet effective , dataaugmentation based regularizer for enhancing the deep classification models . Through linearly interpolating random input pairs and their training targets in one-hot representation , Mixup generates a set of synthetic examples with soft labels to regularize the training . Such pairwise , label-variant data augmentation techniques ( Guo , 2020 ; Guo et al. , 2019 ; Kim et al. , 2020 ; Li et al. , 2020a ; Tokozume et al. , 2018a ; b ; Verma et al. , 2019 ; Yun et al. , 2019 ; Zhang et al. , 2018 ) have attracted a surge of interest and shown their effectiveness on boosting the accuracy of deep networks . Nevertheless , unlike label-preserving data augmentation such as rotation , flip , and crop , there is still limited knowledge about how to design better mixing policies for sample pairs for effective label-variant regularization . Current Mixup-based approaches either mix a pair of inputs using random mixing coefficients ( Guo , 2020 ; Guo et al. , 2019 ; Summers & Dinneen , 2019 ; Tokozume et al. , 2018b ; Verma et al. , 2019 ; Yun et al. , 2019 ; Zhang et al. , 2018 ) or learn to mix salient features from the given pair ( Dabouei et al. , 2020 ; Kim et al. , 2020 ; Li et al. , 2020b ; Walawalkar et al. , 2020 ) to create a set of synthetic samples . Nonetheless , the former methods may create misleading synthetic samples ( Guo et al. , 2019 ) or remove important features from the given inputs ( Kim et al. , 2020 ) and the latter strategies can incur significant computation cost for identifying and selecting the most descriptive input regions ( Kim et al. , 2020 ; Walawalkar et al. , 2020 ) . In this paper , we show that the effort needed for the input mixing with a range of mixing ratios can be bypassed . For a given input pair , one can average the features from the two inputs , and then assign it with a set of soft labels . These soft labels are adaptively learned during training to incorporate class information beyond the provided label pair as well as the evolving states of the training . The method is illustrated in Figure 1 , where the mixed input is the pixel-wise average of features from the two inputs and its training target is the combination of the local soft label , which is the average of the two one-hot targets , and the global soft label , which is generated by the networks during training . We empirically show that the proposed approach performs on par with state-of-the-art methods with random input mixing policy or learning to mixing strategy , in terms of predictive accuracy . We also demonstrate that the synthetic samples created by our method keep tuning the networks long after the training error on the original training set is minimal , encouraging the learning to generate , for each class of the training samples , tight representation clusters . Also , the Class Activation Mapping ( CAM ) ( Zhou et al. , 2016 ) visualization suggests that our method tends to focus on narrower regions of an image for classification . 2 BYPASSING THE INPUT MIXING IN MIXUP . 2.1 MIXUP-BASED DATA AUGMENTATION . For a standard classification setting with a training data set ( X ; Y ) , the objective of the task is to develop a classifier which assigns every input x ∈ X a label y ∈ Y . Instead of using the provided training set ( X ; Y ) , Mixup ( Zhang et al. , 2018 ) generates synthetic samples with soft labels for training . For a pair of random training samples ( xi ; yi ) and ( xj ; yj ) , where x is the input and y the one-hot encoding of the corresponding class , Mixup creates a synthetic sample as follows . x̃ijλ = λx i + ( 1− λ ) xj , ( 1 ) ỹijλ = λy i + ( 1− λ ) yj , ( 2 ) where λ is a scalar mixing policy for mixing both the inputs and the modeling targets of the sample pair . λ is sampled from a Beta ( α , α ) distribution with a hyper-parameter α . The generated samples ( x̃ijλ , ỹ ij λ ) are then fed into the model for training to minimize the cross-entropy loss function . Current variants of Mixup focus on the introduction of a representation function ψ for input mixing : x̃ijλ = ψ ( x i|xj , λ ) + ψ ( xj |xi , 1− λ ) . ( 3 ) The state-of-the-art random input mixing variant CutMix ( Yun et al. , 2019 ) defines the ψ function to form a binary rectangular mask applying to a randomly chosen rectangle covering λ proportion of the input image . PuzzleMix ( Kim et al. , 2020 ) is the state-of-the-art learning to mixing variant . This method defines the ψ function to compute the saliency map of the input pair , find the optimal mask , and optimize the transport plans for generating the mixed example . This is to ensure that the mixed image contain sufficient target class information corresponding to the mixing ratio λ while preserving the local statistics of each input . 2.2 FORMING THE TRAINING INPUT . Similar to Mixup and its variants , our method also creates mixed samples from a random sample pair , but for a given sample pair our method does not generate a set of inputs with different features . Instead , for a range of mixing ratios λs , our approach uses the same mixed input , invariant to the mixing ratios provided . We term our method Label driven Mixup ( denoted as LaMix ) . To this end , the mixed input x̃ij in LaMix has two forms . For the random input mixing methods such as Mixup and CutMix , it is formed by pixel-wise average of the raw features of the input pair ( xi , xj ) : x̃ij = 0.5xi + 0.5xj . ( 4 ) For the learning to mixing methods such as PuzzleMix , the mixed input is formed by pixel-wise average of the saliency features computed with λ value as 0.5 : x̃ij = ψ ( xi|xj , λ = 0.5 ) + ψ ( xj |xi , λ = 0.5 ) . ( 5 ) The newly resulting input x̃ij is then used for training , by passing through a neural network model fϕ ( parameterized with ϕ ) to generate the m-dimensional input embedding Sij ∈ Rm : Sij = fϕ ( x̃ ij ) . ( 6 ) Next , the resulting Sij is then fed into a linear fullyconnected layer Wl ∈ Rc×m to produce the predicted classification distribution over the c classification target classes : y ij = Softmax ( WlSij ) . ( 7 ) The error of the training is computed by comparing the prediction yij and the training target of the input x̃ij , which is discussed next . 2.3 FORMING THE TRAINING TARGET . For the same mixed input x̃ij created from a random input pair ( xi , xj ) , LaMix associates it with various soft target label ÿij , which is learned by the networks with two steps : 1 ) obtaining global soft label and 2 ) integrating with local soft label . In detail , the dynamically assigned soft target label ÿij is a function of ( xi , xj , yi , yj , λ ) , as follows . ÿijλ = τ ( x i , xj , λ , yi , yj ) . ( 8 ) As illustrated in Figure 1 , LaMix implements the τ ( · ) function through adding an additional fullyconnected layer Wt ∈ Rc×m to the original networks . That is , for the given input x̃ij with λ , LaMix first computes its probabilities over the c classification targets , denoted as pijλ : pijλ = Softmax ( σ ( WtS ij ) ) , ( 9 ) where σ denotes the Sigmoid function , and Sij is the same input embedding as that in Equation 7 . In other words , the two predictions ( i.e. , Equations 7 and 9 ) share the same networks except for the last layer . Because the predictions pijλ are about all the c target classes of the given data , such predictions thus reflect the class information beyond the provided local label pair , namely ( yi , yj ) . For description purpose , we term pijλ global soft label . The Sigmoid function here will provide the probability of associating the input to a particular label . After having the global soft label pijλ , we then integrate it with the local label of the given sample pair , i.e. , ỹijλ as described in Equation 2 , as follows : ÿijλ = βỹ ij λ + ( 1− β ) p ij λ , ( 10 ) where β is a scalar coefficient between [ 0,1 ] . Doing so , we enable the synthetic sample ( x̃ij , ÿijλ ) to have information from both the local labels of the provided sample pair ( i.e. , ỹijλ ) and the class information beyond the labels of the given pair ( i.e. , pijλ ) . This process is also illustrated in Figure 1 . | The previous advanced Mixup methods, such as CutMix and PuzzleMix, involve input mixing. This paper suggests a new Mixup approach, called LaMix, that does not require input mixing. The solution is combining the original target label (interpolation of two one-hot targets) and generated target labels from an additional network to use it for training. The authors argue that LaMix achieves superior performance without input mixing. | SP:d56d16dbf3be1381b4deb4fe29892f894dff3ff4 |
Graph Joint Attention Networks | 1 INTRODUCTION . Many real-world data can be modeled as a graph , where a set of nodes ( vertices ) , edges , and bag-ofwords features respectively represent data instances , instance-instance interrelationships , and contents characterizing the nodes . For example , scientific articles in a research domain can be modeled as a graph , where nodes , edges , and node features respectively represent published articles , citations , and index information of the articles . Besides , social network users and interacted biological units can also be similarly represented as graphs possessing different structural and descriptive information . As graph data are widely available and they are related to various analytical tasks , learning in graphs has been a hot-spot in machine learning community . There have been a number of approaches proposed to effectively learn in graph structured data . Amongst them , graph convolutional networks ( GCNs ) have shown to be powerful in learning lowdimensional representations for various subsequent analytical tasks . Different from those empirical convolutional neural networks ( CNNs ) which have achieved a great success in learning in image , vision , and natural language data ( Krizhevsky et al. , 2012 ; Xu et al. , 2014 ) , and whose convolution operators are always defined to process a grid-like data structure , GCNs attempt to formulate convolution operators aggregating the node features according to the observed graph structure , and learn the information propagation through different neural architectures . Meaningful representations which capture discriminative node features as well as intricate graph structure can thereby be learned by GCNs . There have been several sophisticated GCNs proposed in the recent . According to the ways through which GCNs make use of graph topology to define convolution operators for feature aggregation , GCNs can generally be categorized as spectral , and spatial ones ( Wu et al. , 2020 ) . Spectral GCNs define the convolutional layer for aggregating neighbor features based on the spectral representation of the graph . For example , Spectral CNN ( Bruna et al. , 2013 ) constructs the convolution layer based on the eigen-decomposition of graph Laplacian in the Fourier domain . However , such layer is computationally demanding . Aiming to reduce such computational burden , several approaches adopting the convolution operators which are based on simplified/approximate spectral graph theory are proposed . First , parameterized filters with smooth coefficients are introduced for Spectral CNN to allow it to consider spatially localized nodes in the graph ( Henaff et al. , 2015 ) . Chebyshev expansion is then introduced in ( Defferrard et al. , 2016 ) to approximate graph Laplacian rather than directly perform eigen-decomposition of it . Finally , the graph convolution filter is further simplified by only considering connected neighbors of each node ( Kipf & Welling , 2017 ) so as to further make spectral GCNs computationally efficient . In contrast , spatial GCNs define the convolution operators for feature aggregation directly making use of local structural properties of the central node . The key of spatial GCNs is consequently how to design an appropriate function for aggregating the effect brought by the features of candidate neighbors selected according to a proper sampling strategy . To achieve this , it sometimes requires to learn a weight matrix according to node degree ( Duvenaud et al. , 2015 ) , utilize the power of transition matrix to preserve the neighbor importance ( Atwood & Towsley , 2016 ; Busch et al. , 2020 ; Klicpera et al. , 2019 ) , extract the normalized neighbors ( Niepert et al. , 2016 ) , or sample a fixed number of neighbors ( Hamilton et al. , 2017 ; Zhang et al. , 2020 ) . As a representative spatial GCN , Graph attention network ( GAT ) ( Veličković et al. , 2018 ; Zhang et al. , 2020 ) has shown a promising performance in various graph learning tasks . What makes GATs effective in learning graph representations is they adopt the attention mechanism , which has been successfully used in machine reading and translation ( Luong et al. , 2015 ; Cheng et al. , 2016 ) , and video processing ( Xu et al. , 2015 ) , to compute the node-feature-based attention weights ( attention scores ) between a central node and its one-hop neighbors ( including the central node itself ) . Then , GATs utilize the attention scores to obtain a weighted aggregation of node features which are propagated to the next layer . As a result , those neighbors possessing similar features may impact more on the center node , and meaningful representations can be inferred by GATs . Although GATs have been experimentally verified as powerful tools for various graph learning tasks , they still confront several challenges . First , for attention-based GNNs , appropriate attention mechanisms which can automatically identify the relative significance between the graph structure and node features are not many . As a result , most current attention mechanisms for GATs can not effectively capture the joint effect brought by the underlying graph structure and node features for seamlessly impacting the message-passing in the neural architecture . Second , whether the expressive power of GNNs adopting the attention mechanisms which can effectively acquire the aforementioned joint effect may reach the upper bound of message-passing GNNs has not been theoretically investigated . To address the mentioned challenges , in this paper , we propose novel attention-based GNNs , dubbed Graph Joint Attention Networks ( JATs ) . Different from previous works , the attention mechanisms adopted by JATs are able to automatically capture the relative significance between structural coefficient learned from graph topology , and node features , so that higher attention scores may be learned by those neighbors which are topologically and contextually correlated . JATs are consequently able to smoothly adjust attention scores according to the contemporary structure and node features , and truly capture the joint attention on structural and contextual information propagated in the neural network . Besides , we theoretically analyze the expressive power of JATs and further propose an improved strategy which enables JATs to distinguish all distinct graph structures as 1-dimensional Weisfeiler-Lehman test ( 1-WL test ) does . This means JATs can reach the upper bound w.r.t . expressive power which all message-passing GNNs can ultimately achieve . JATs have been extensively tested on four widely used datasets , i.e. , Cora , Citeseer , Pubmed , and OGBNArxiv , and have been compared with a number of strong baselines . The experimental results show that JATs achieve the state-of-the-art performance . The rest of the paper is organized as follows . In Section 2 , we elaborate the proposed JATs , and compare JATs with other GNNs . In Section 3 , we prove the limitation w.r.t . expressive power of the joint attention mechanisms presented in Section 2 . A strategy is then proposed to improve JATs to reach the upper bound of expressive power which all message-passing GNNs can at most achieve . The comprehensive experiments which are used to validate the effectiveness of JATs are presented in Section 4 . Finally , we summarize the contributions of the paper and propose future works potentially improving JATs . 2 JOINT ATTENTION-BASED GRAPH NEURAL NETWORKS . In this section , we elaborate the proposed JATs . Mathematical preliminaries and notations used in the paper are firstly illustrated . How JATs learn the structural coefficients which are used in the joint attention mechanisms is then introduced . Following that , the joint attention layer , which is the cornerstone of JATs is elaborated . At last , we compare the proposed JATs with their counterparts . 2.1 NOTATIONS AND PRELIMINARIES . Throughout this paper , we assume a graph G = { V , E } containing N nodes , |E| edges , where V and E respectively represent the node and edge set . We use A ∈ { 0 , 1 } N×N and X ∈ RN×D to represent graph adjacency matrix and node feature matrix , respectively . Ni denotes the union of node i and its one-hop neighbors . Wl and { hli } i=1 , ... N denote the weight matrix and features of node i at lth layer of JATs , respectively , and h0 is set to be the input feature , i.e. , X . For the nodes in Ni , their possible feature vectors form a multiset Mi = ( Si , µi ) , where Si = { s1 , ... sn } is the ground set of Mi which contains the distinct elements existing in Mi , and µi : Si → N ? is the multiplicity function indicating the frequency of occurrence of each distinct s in Mi . 2.2 LEARNING STRUCTURAL COEFFICIENTS FROM GRAPH SUBSPACE . It is well known that topology is the corner stone of the graph . How to utilize such structural information to compute the attention scores naturally has a profound impact on the performance of attention-based GNNs . Empirical attention based GNNs , e.g. , GAT , compute the attention scores between connected neighbors only using node features , but overlook the structural correlation between pairwise nodes . To allow attention-based GNNs to capture the higher-order structures in the graph , we propose JATs to learn the topological coefficients from the graph subspace . Inspired by subspace clustering ( Elhamifar & Vidal , 2013 ) , we may formulate the learning of structural coefficients as follows . Given N nodes in the graph drawn from multiple linear subspaces { Si } i=1 , ... K , one can represent a node in a subpace as a linear combination of other nodes . If each row in A is treated as the structural information of each node , one can simply represent it using other nodes ( other rows in A ) as one equation , i.e. , Ai , : = Ci , :A , where C denotes the structural coefficient matrix as A is used . It has been shown in previous works ( Ji et al. , 2014 ) that under the assumption the subsapces are independent , by minimizing certain norm of C , C may have a block diagonal structure ( after finite permutations ) . In other words , Cij 6= 0 if and only if two nodes , vi and vj are in the same subspace . So , we can utilize C to learn the structural correlations between neighbors in the graph . And the above learning task can be formulated as the following optimization problem : minimize ‖C‖p , subject to A = CA , Cii = 0 , ( 1 ) where ‖·‖p stands for a certain matrix norm , and the zero constraint on the diagonal of C may prevent trivial solutions when ‖·‖p is the norm considering sparsity . To make the data corruption explainable , the equality constraint in Eq . ( 1 ) is often relaxed as a regularization term and the learning of structural coefficients can be reformulated as follows : minimize ‖C‖p + β‖A−CA‖2F , subject to Cii = 0 . ( 2 ) By rewriting Eq . ( 2 ) , we may reveal why subspace learning is effective in capturing the structural correlations between pairwise nodes . Mathematically , Eq . ( 2 ) is equivalent to the following nodewise minimization problem : minimize ∑ i ‖Ci , :‖p + β‖Ai , : −CAi , :‖2F , subject to Cii = 0 . ( 3 ) As CAi , : is equal to ∑ j CijAj , : and Cii = 0 , one may easily find that minimizing Eq . ( 3 ) is equivalent to search for the optimal linear combination of other nodes that can be used to reconstruct the ith node in the graph . As a result , Cij is high when Aj , : , i.e. , the global structure of jth node ( rather than the local bias ( Gong et al. , 2018 ) ) , is similar to Ai , : . By minimizing Eq . ( 2 ) , one may identify those nodes which are in the same graph subspace , and the structural correlations between neighboring nodes can therefore be inferred directly . As the above learning problem can be effectively solved via gradient descent , JATs can optimize Eq . ( 2 ) together with the training of the neural architecture . Also , we use l1 norm for C to force JATs to learn sparse structural coefficients . | This paper proposes Graph Joint Attention Networks (JAT), which augment Graph Attention Networks (GAT) by introducing structural attention coefficients, which are combined with the feature based attention coefficients computed by GAT. The authors present two ways of incorporating the structural coefficients, namely Implicit direction and Explicit direction. The authors evaluate their proposed technique in the Cora, Citeseer and Pubmed datasets, where they improve the performance of other GNN approaches. | SP:dee5207ad69f2330fc0990728f00711848dc0067 |
Graph Joint Attention Networks | 1 INTRODUCTION . Many real-world data can be modeled as a graph , where a set of nodes ( vertices ) , edges , and bag-ofwords features respectively represent data instances , instance-instance interrelationships , and contents characterizing the nodes . For example , scientific articles in a research domain can be modeled as a graph , where nodes , edges , and node features respectively represent published articles , citations , and index information of the articles . Besides , social network users and interacted biological units can also be similarly represented as graphs possessing different structural and descriptive information . As graph data are widely available and they are related to various analytical tasks , learning in graphs has been a hot-spot in machine learning community . There have been a number of approaches proposed to effectively learn in graph structured data . Amongst them , graph convolutional networks ( GCNs ) have shown to be powerful in learning lowdimensional representations for various subsequent analytical tasks . Different from those empirical convolutional neural networks ( CNNs ) which have achieved a great success in learning in image , vision , and natural language data ( Krizhevsky et al. , 2012 ; Xu et al. , 2014 ) , and whose convolution operators are always defined to process a grid-like data structure , GCNs attempt to formulate convolution operators aggregating the node features according to the observed graph structure , and learn the information propagation through different neural architectures . Meaningful representations which capture discriminative node features as well as intricate graph structure can thereby be learned by GCNs . There have been several sophisticated GCNs proposed in the recent . According to the ways through which GCNs make use of graph topology to define convolution operators for feature aggregation , GCNs can generally be categorized as spectral , and spatial ones ( Wu et al. , 2020 ) . Spectral GCNs define the convolutional layer for aggregating neighbor features based on the spectral representation of the graph . For example , Spectral CNN ( Bruna et al. , 2013 ) constructs the convolution layer based on the eigen-decomposition of graph Laplacian in the Fourier domain . However , such layer is computationally demanding . Aiming to reduce such computational burden , several approaches adopting the convolution operators which are based on simplified/approximate spectral graph theory are proposed . First , parameterized filters with smooth coefficients are introduced for Spectral CNN to allow it to consider spatially localized nodes in the graph ( Henaff et al. , 2015 ) . Chebyshev expansion is then introduced in ( Defferrard et al. , 2016 ) to approximate graph Laplacian rather than directly perform eigen-decomposition of it . Finally , the graph convolution filter is further simplified by only considering connected neighbors of each node ( Kipf & Welling , 2017 ) so as to further make spectral GCNs computationally efficient . In contrast , spatial GCNs define the convolution operators for feature aggregation directly making use of local structural properties of the central node . The key of spatial GCNs is consequently how to design an appropriate function for aggregating the effect brought by the features of candidate neighbors selected according to a proper sampling strategy . To achieve this , it sometimes requires to learn a weight matrix according to node degree ( Duvenaud et al. , 2015 ) , utilize the power of transition matrix to preserve the neighbor importance ( Atwood & Towsley , 2016 ; Busch et al. , 2020 ; Klicpera et al. , 2019 ) , extract the normalized neighbors ( Niepert et al. , 2016 ) , or sample a fixed number of neighbors ( Hamilton et al. , 2017 ; Zhang et al. , 2020 ) . As a representative spatial GCN , Graph attention network ( GAT ) ( Veličković et al. , 2018 ; Zhang et al. , 2020 ) has shown a promising performance in various graph learning tasks . What makes GATs effective in learning graph representations is they adopt the attention mechanism , which has been successfully used in machine reading and translation ( Luong et al. , 2015 ; Cheng et al. , 2016 ) , and video processing ( Xu et al. , 2015 ) , to compute the node-feature-based attention weights ( attention scores ) between a central node and its one-hop neighbors ( including the central node itself ) . Then , GATs utilize the attention scores to obtain a weighted aggregation of node features which are propagated to the next layer . As a result , those neighbors possessing similar features may impact more on the center node , and meaningful representations can be inferred by GATs . Although GATs have been experimentally verified as powerful tools for various graph learning tasks , they still confront several challenges . First , for attention-based GNNs , appropriate attention mechanisms which can automatically identify the relative significance between the graph structure and node features are not many . As a result , most current attention mechanisms for GATs can not effectively capture the joint effect brought by the underlying graph structure and node features for seamlessly impacting the message-passing in the neural architecture . Second , whether the expressive power of GNNs adopting the attention mechanisms which can effectively acquire the aforementioned joint effect may reach the upper bound of message-passing GNNs has not been theoretically investigated . To address the mentioned challenges , in this paper , we propose novel attention-based GNNs , dubbed Graph Joint Attention Networks ( JATs ) . Different from previous works , the attention mechanisms adopted by JATs are able to automatically capture the relative significance between structural coefficient learned from graph topology , and node features , so that higher attention scores may be learned by those neighbors which are topologically and contextually correlated . JATs are consequently able to smoothly adjust attention scores according to the contemporary structure and node features , and truly capture the joint attention on structural and contextual information propagated in the neural network . Besides , we theoretically analyze the expressive power of JATs and further propose an improved strategy which enables JATs to distinguish all distinct graph structures as 1-dimensional Weisfeiler-Lehman test ( 1-WL test ) does . This means JATs can reach the upper bound w.r.t . expressive power which all message-passing GNNs can ultimately achieve . JATs have been extensively tested on four widely used datasets , i.e. , Cora , Citeseer , Pubmed , and OGBNArxiv , and have been compared with a number of strong baselines . The experimental results show that JATs achieve the state-of-the-art performance . The rest of the paper is organized as follows . In Section 2 , we elaborate the proposed JATs , and compare JATs with other GNNs . In Section 3 , we prove the limitation w.r.t . expressive power of the joint attention mechanisms presented in Section 2 . A strategy is then proposed to improve JATs to reach the upper bound of expressive power which all message-passing GNNs can at most achieve . The comprehensive experiments which are used to validate the effectiveness of JATs are presented in Section 4 . Finally , we summarize the contributions of the paper and propose future works potentially improving JATs . 2 JOINT ATTENTION-BASED GRAPH NEURAL NETWORKS . In this section , we elaborate the proposed JATs . Mathematical preliminaries and notations used in the paper are firstly illustrated . How JATs learn the structural coefficients which are used in the joint attention mechanisms is then introduced . Following that , the joint attention layer , which is the cornerstone of JATs is elaborated . At last , we compare the proposed JATs with their counterparts . 2.1 NOTATIONS AND PRELIMINARIES . Throughout this paper , we assume a graph G = { V , E } containing N nodes , |E| edges , where V and E respectively represent the node and edge set . We use A ∈ { 0 , 1 } N×N and X ∈ RN×D to represent graph adjacency matrix and node feature matrix , respectively . Ni denotes the union of node i and its one-hop neighbors . Wl and { hli } i=1 , ... N denote the weight matrix and features of node i at lth layer of JATs , respectively , and h0 is set to be the input feature , i.e. , X . For the nodes in Ni , their possible feature vectors form a multiset Mi = ( Si , µi ) , where Si = { s1 , ... sn } is the ground set of Mi which contains the distinct elements existing in Mi , and µi : Si → N ? is the multiplicity function indicating the frequency of occurrence of each distinct s in Mi . 2.2 LEARNING STRUCTURAL COEFFICIENTS FROM GRAPH SUBSPACE . It is well known that topology is the corner stone of the graph . How to utilize such structural information to compute the attention scores naturally has a profound impact on the performance of attention-based GNNs . Empirical attention based GNNs , e.g. , GAT , compute the attention scores between connected neighbors only using node features , but overlook the structural correlation between pairwise nodes . To allow attention-based GNNs to capture the higher-order structures in the graph , we propose JATs to learn the topological coefficients from the graph subspace . Inspired by subspace clustering ( Elhamifar & Vidal , 2013 ) , we may formulate the learning of structural coefficients as follows . Given N nodes in the graph drawn from multiple linear subspaces { Si } i=1 , ... K , one can represent a node in a subpace as a linear combination of other nodes . If each row in A is treated as the structural information of each node , one can simply represent it using other nodes ( other rows in A ) as one equation , i.e. , Ai , : = Ci , :A , where C denotes the structural coefficient matrix as A is used . It has been shown in previous works ( Ji et al. , 2014 ) that under the assumption the subsapces are independent , by minimizing certain norm of C , C may have a block diagonal structure ( after finite permutations ) . In other words , Cij 6= 0 if and only if two nodes , vi and vj are in the same subspace . So , we can utilize C to learn the structural correlations between neighbors in the graph . And the above learning task can be formulated as the following optimization problem : minimize ‖C‖p , subject to A = CA , Cii = 0 , ( 1 ) where ‖·‖p stands for a certain matrix norm , and the zero constraint on the diagonal of C may prevent trivial solutions when ‖·‖p is the norm considering sparsity . To make the data corruption explainable , the equality constraint in Eq . ( 1 ) is often relaxed as a regularization term and the learning of structural coefficients can be reformulated as follows : minimize ‖C‖p + β‖A−CA‖2F , subject to Cii = 0 . ( 2 ) By rewriting Eq . ( 2 ) , we may reveal why subspace learning is effective in capturing the structural correlations between pairwise nodes . Mathematically , Eq . ( 2 ) is equivalent to the following nodewise minimization problem : minimize ∑ i ‖Ci , :‖p + β‖Ai , : −CAi , :‖2F , subject to Cii = 0 . ( 3 ) As CAi , : is equal to ∑ j CijAj , : and Cii = 0 , one may easily find that minimizing Eq . ( 3 ) is equivalent to search for the optimal linear combination of other nodes that can be used to reconstruct the ith node in the graph . As a result , Cij is high when Aj , : , i.e. , the global structure of jth node ( rather than the local bias ( Gong et al. , 2018 ) ) , is similar to Ai , : . By minimizing Eq . ( 2 ) , one may identify those nodes which are in the same graph subspace , and the structural correlations between neighboring nodes can therefore be inferred directly . As the above learning problem can be effectively solved via gradient descent , JATs can optimize Eq . ( 2 ) together with the training of the neural architecture . Also , we use l1 norm for C to force JATs to learn sparse structural coefficients . | Creating aggregation weight over neighbor nodes lies at the key part of graph neural networks. Generally the weights can be generated by the node structure or feature similarity. The node structure similarity provides a way to measure the correlation of a pair of nodes with a complete graph. While attention weight usually focuses on the local neighborhood, which can be easily biased by the node popularity [1, 2]. If a neighbor node with large degree, it potentially tends to have a large embedding norm. However, from complete view of graph structure, this neighbor might be a noisy node. With a given complete graph structure, we can downgrade the influence of structure bias. From this point of view, it's interesting to study whether the attention and structure weights can be complementary to each other. The key idea of this work is very easy to follow. The proposed strategy is to unify the weights generated by graph structure and node feature. Theoretical analysis shows the expressive power of the proposed strategy. The experimental results for node classification also demonstrates its superiority comparing with state-of-the-art baselines. | SP:dee5207ad69f2330fc0990728f00711848dc0067 |
Neural Pooling for Graph Neural Networks | Tasks such as graph classification , require graph pooling to learn graph-level representations from constituent node representations . In this work , we propose two novel methods using fully connected neural network layers for graph pooling , namely Neural Pooling Method 1 and 2 . Our proposed methods have the ability to handle variable number of nodes in different graphs , and are also invariant to the isomorphic structures of graphs . In addition , compared to existing graph pooling methods , our proposed methods are able to capture information from all nodes , collect second-order statistics , and leverage the ability of neural networks to learn relationships among node representations , making them more powerful . We perform experiments on graph classification tasks in the bio-informatics and social network domains to determine the effectiveness of our proposed methods . Experimental results show that our methods lead to an absolute increase of upto 1.2 % in classification accuracy over previous works and a general decrease in standard deviation across multiple runs indicating greater reliability . Experimental results also indicate that this improvement in performance is consistent across several datasets . 1 INTRODUCTION . Over the past several years , there is a growing number of applications where data is generated from non-Euclidean domains and is represented as graphs with complex relationships and interdependency between entities . Deep learning generalised from grid-like data to the graph domain has led to the development of the remarkably successful Graph Neural Networks ( GNNs ) ( Fan et al. , 2019 ; Gao et al. , 2019 ; Ma et al. , 2019a ; Wang et al. , 2019b ) and its numerous variants such the Graph Convolutional Network ( GCN ) ( Kipf & Welling , 2017 ) , GraphSAGE ( Hamilton et al. , 2017 ) , graph attention network ( GAT ) ( Veličković et al. , 2018 ) , jumping knowledge network ( JK ) ( Xu et al. , 2018 ) , and graph isomorphism networks ( GINs ) ( Xu et al. , 2019 ) , etc . Pooling is a common operation in deep learning on grid-like data , such as images . Pooling layers provide an approach to down sampling feature maps by summarizing the presence of features in patches of the feature map . It reduces dimensionality and also provides local translational invariance . In the case of graph data , pooling is used to obtain a representation of a graph using its constituent node representations . However , it is challenging to develop graph pooling methods due to the some special properties of graph data such as the variable number of nodes in different graphs and the isomorphic structures of graphs . Firstly , the number of nodes varies in different graphs , while the graph representations are usually required to have the same fixed size to fit into other downstream machine learning models where they are used for tasks such as classification . Therefore , graph pooling should be capable of handling the variable number of node representations as inputs and producing fixed-sized graph representations . Secondly , unlike images and texts where we can order pixels and words according to the spatial structural information , there is no inherent ordering relationship among nodes in graphs . Therefore , isomorphic graphs should have the same graph representation , and hence , graph pooling should give the same output by taking node representations in any order as inputs . Our main contributions in this work are two novel graph pooling methods , Neural Pooling Method 1 and 2 . These new pooling methods allow us to do the following , i ) produce the same dimensional graph representation for graphs with variable number of nodes , ii ) remain invariant to the isomorphic structures of graphs , iii ) collect second- order statistics , iv ) leverage trainable parameters in the form of fully connected neural networks to learn relationships between underlying node representations to generate high quality graph representations which are then used for graph classification tasks . Experiments are performed on four benchmark bio-informatics datasets and five popular social network datasets to demonstrate the effectiveness and superiority of our proposed graph pooling methods . Experimental results show that our methods lead to an improvement in classification accuracy over existing methods and are also more reliable as compared to previous works . 2 RELATED WORK . 2.1 GRAPH NEURAL NETWORKS . A graph can be represented by its adjacency matrix and node features . Formally , for a graph G consisting of n nodes , its topology information can be represented by an adjacency matrix A ∈ { 0 , 1 } n × n and the node features can be represented as X ∈ Rn × d , assuming each node has a d-dimensional feature vector . GNNs learn feature representations for different nodes using these matrices ( Gilmer et al. , 2017 ) . Several approaches are proposed to investigate deep GNNs , and they generally follow a neighborhood information aggregation scheme ( Gilmer et al. , 2017 ; Xu et al. , 2019 ; Kipf & Welling , 2017 ; Hamilton et al. , 2017 ; Veličković et al. , 2018 ) . In each step , the representation of a node is updated by aggregating the representations of its neighbors . Graph Convolutional Networks ( GCNs ) are popular variants of GNNs and inspired by the first order graph Laplacian methods ( Kipf & Welling , 2017 ) . Graph pooling is used to connect embedded graphs outputted by GNN layers with classifiers for graph classification . Given a graph , GNN layers produce node representations , where each node is embedded as a vector . Graph pooling is applied after GNN layers to process node representations into a single feature vector as the graph representation . A classifier takes the graph representation and performs graph classification . 2.2 GRAPH POOLING . Early studies employ simple methods such as averaging and summation as graph pooling ( Xu et al. , 2019 ; Duvenaud et al. , 2015 ; Defferrard et al. , 2016 ) . However , averaging and summation do not capture the feature correlation information , curtailing the overall model performance ( Zhang et al. , 2018 ) . Other studies have proposed advanced graph pooling methods , including DIFFPOOL ( Ying et al. , 2018 ) , SORT-POOL ( Zhang et al. , 2018 ) , TOPKPOOL ( Gao & Ji , 2019 ) , SAGPOOL ( Lee et al. , 2019 ) , and EIGENPOOL ( Ma et al. , 2019b ) , and achieve great performance on multiple benchmark datasets . EIGENPOOL involves the computation of eigenvectors , which is slow and expensive . DIFFPOOL ( Ying et al. , 2018 ) treats the graph pooling as a node clustering problem . A cluster of nodes from the original graph are merged to form a new node in the new graph . DIFFPOOL ( Ying et al. , 2018 ) proposes to perform the graph convolution operation on node features to obtain node clustering assignment matrix . Intuitively , the class assignment of a given node should depend on the class assignments of other neighbouring nodes . However , DIFFPOOL does not explicitly consider high-order structural relationships , which we that are important for graph pooling . SORTPOOL ( Zhang et al. , 2018 ) , TOPKPOOL ( Gao & Ji , 2019 ) , and SAGPOOL ( Lee et al. , 2019 ) learn to select important nodes from the original graph and use these nodes to build a new graph . They share the similar idea to learn a sorting vector based on node representations , which indicates the importance of different nodes . Then only the top k important nodes are selected to form a new graph while the other nodes are ignored . However , the ignored nodes may contain important features and this information is lost during pooling . It is worth noting that all the graph pooling methods mentioned till now only collect first-order statistics ( Boureau et al. , 2010 ) . A recent study has proposed second order graph pooling methods SOPoolbimap and SOPoolattention ( Wang & Ji , 2020 ) . In this work , we propose two novel methods using fully connected neural network layers for graph pooling , namely Neural Pooling Method 1 and 2 . Compared to existing graph pooling methods , our proposed methods are able to capture information from all nodes , collect second-order statistics , and leverage the ability of neural networks to learn relationships among node representations , making them more powerful . 3 METHODOLOGY . 3.1 PROPERTIES OF GRAPH POOLING . Consider a graph G = ( A , X ) represented by its adjacency matrix A ∈ { 0 , 1 } n × n and node feature matrix X ∈ Rn × d , where n is the number of nodes in G and d is the dimension of node features . The node features may come from node labels or node degrees . Graph neural networks are known to be powerful in learning good node representation matrix H from A and X : H = [ h1 , h2 , ......... , hn ] T = GNN ( A , X ) ∈ Rn × f ( 1 ) where rows of H , hi ∈ Rf , i = 1 , 2 , ... , n , are representations of n nodes , and f is the dimension of the node representation obtained from the GNN and depends on the architecture of the GNN . The task that we focus on in this work is to obtain a graph representation vector hG from H , which is then fed into a classifier to perform graph classification : hG = g ( [ A ] , H ) ∈ Rc ( 2 ) where g ( · ) is the graph pooling function and c is the dimension of hG . Here , [ A ] means that the information from A can be optionally used in graph pooling . For simplicity , we omit it in the following discussion . Note that the function g ( · ) must satisfy two requirements to serve as graph pooling . First , g ( · ) should be able to take H with variable number of rows as the inputs and produce fixed-sized outputs . Specifically , different graphs may have different number of nodes , which means that n is a variable . On the other hand , c , which is the dimension of the graph representation hG is supposed to be fixed to fit into the classifier . Second , g ( · ) should output the same hG when the order of rows of H changes . This permutation invariance property is necessary to handle isomorphic graphs . To be concrete , if two graph G1 = ( A1 , X1 ) and G2 = ( A2 , X2 ) are isomorphic , GNNs will output the same multi set of node representations . That is , there exists a permutation matrix P ∈ { 0 , 1 } n × n such that H1 = PH2 , for H1 = GNN ( A1 , X1 ) and H2 = GNN ( A2 , X2 ) . However , the graph representation computed by g ( · ) should be the same , i.e. , g ( H1 ) = g ( H2 ) if H1 = PH2 . 3.2 NEURAL POOLING METHOD 1 . Our first proposed method is called Neural Pooling Method 1 . Consider a node representation matrix H obtained following Equation 1 in Section 3.1 . H is passed through a Fully Connected Neural Network Layer ( FCL1 ) to obtain H ′ as : H ′ = FCL1 ( H ) ∈ Rn × f ′ where f ′ < f ( 4 ) After this H ′ is again passed through a second Fully Connected Neural Network Layer ( FCL2 ) to obtain Q as : Q = FCL2 ( H ′ ) ∈ Rn × 1 ( 5 ) Finally the graph representation hG is obtained as : hG = H ′TQ ∈ Rf ′ × 1 ( 6 ) where H ′T denotes the transpose of H ′ . Neural Pooling Method 1 always outputs an f ′-dimensional graph representation for H ∈ Rn × f , regardless of the value of n. It is also invariant to permutation so that it outputs the same graph representation , even when the order of rows of H changes . Intuition : The FCL1 performs the role of reducing the dimensionality of the input node representations . The trainable parameters of this FCL1 can be thought of as learning a mapping from the f to the f ′-dimensional space . The FCL2 reduces the f ′-dimensional node representations to a 1 dimensional representation , Q. H ′ ∈ Rn × f ′ can be viewed as H ′ = [ l1 , l2 , . . . , lf ′ ] , where lj ∈ Rn , j=1 , 2 , ... , f ′ . The vector lj encodes the spatial distribution of the j-th feature in the graph . Based on this view , H ′TQ is able to capture the topology information and Q can be thought of as roughly encoding the position of nodes by learning the weights according to which the j-th feature is aggregated across the nodes . Neural Pooling Method 1 hence , leverages the ability of neural networks to learn the topological structure as well as correlation among the node representations in H . It captures the essential features and connections between underlying data . It also reduces the dimensionality of H , and results in an accurate representation of the input graph . | This paper proposes two fully-connected layers based neural graph pooling methods for graph neural networks, named Neural Pooling Method 1 and Neural Pooling Method 2. The first method uses a first FC to reduce the feature dimension and then FC2 to compute the weights to do weighted-average over features for different nodes. The second method uses two FC to reduce the dimension and then compute second-order statistics by Flatten(H^{\top}H). Experimental results on four datasets (PTC, PROTEINS, IMDB-BINARY, IMDB-MULTI) of two tasks (bioinformatics, social networks) show that the proposed graph pooling method can improve the performance by 0.5%-1.2% accuracy while decreasing the std. | SP:445fc2caa1539447d3820e6ad6ae965d40d0cb76 |
Neural Pooling for Graph Neural Networks | Tasks such as graph classification , require graph pooling to learn graph-level representations from constituent node representations . In this work , we propose two novel methods using fully connected neural network layers for graph pooling , namely Neural Pooling Method 1 and 2 . Our proposed methods have the ability to handle variable number of nodes in different graphs , and are also invariant to the isomorphic structures of graphs . In addition , compared to existing graph pooling methods , our proposed methods are able to capture information from all nodes , collect second-order statistics , and leverage the ability of neural networks to learn relationships among node representations , making them more powerful . We perform experiments on graph classification tasks in the bio-informatics and social network domains to determine the effectiveness of our proposed methods . Experimental results show that our methods lead to an absolute increase of upto 1.2 % in classification accuracy over previous works and a general decrease in standard deviation across multiple runs indicating greater reliability . Experimental results also indicate that this improvement in performance is consistent across several datasets . 1 INTRODUCTION . Over the past several years , there is a growing number of applications where data is generated from non-Euclidean domains and is represented as graphs with complex relationships and interdependency between entities . Deep learning generalised from grid-like data to the graph domain has led to the development of the remarkably successful Graph Neural Networks ( GNNs ) ( Fan et al. , 2019 ; Gao et al. , 2019 ; Ma et al. , 2019a ; Wang et al. , 2019b ) and its numerous variants such the Graph Convolutional Network ( GCN ) ( Kipf & Welling , 2017 ) , GraphSAGE ( Hamilton et al. , 2017 ) , graph attention network ( GAT ) ( Veličković et al. , 2018 ) , jumping knowledge network ( JK ) ( Xu et al. , 2018 ) , and graph isomorphism networks ( GINs ) ( Xu et al. , 2019 ) , etc . Pooling is a common operation in deep learning on grid-like data , such as images . Pooling layers provide an approach to down sampling feature maps by summarizing the presence of features in patches of the feature map . It reduces dimensionality and also provides local translational invariance . In the case of graph data , pooling is used to obtain a representation of a graph using its constituent node representations . However , it is challenging to develop graph pooling methods due to the some special properties of graph data such as the variable number of nodes in different graphs and the isomorphic structures of graphs . Firstly , the number of nodes varies in different graphs , while the graph representations are usually required to have the same fixed size to fit into other downstream machine learning models where they are used for tasks such as classification . Therefore , graph pooling should be capable of handling the variable number of node representations as inputs and producing fixed-sized graph representations . Secondly , unlike images and texts where we can order pixels and words according to the spatial structural information , there is no inherent ordering relationship among nodes in graphs . Therefore , isomorphic graphs should have the same graph representation , and hence , graph pooling should give the same output by taking node representations in any order as inputs . Our main contributions in this work are two novel graph pooling methods , Neural Pooling Method 1 and 2 . These new pooling methods allow us to do the following , i ) produce the same dimensional graph representation for graphs with variable number of nodes , ii ) remain invariant to the isomorphic structures of graphs , iii ) collect second- order statistics , iv ) leverage trainable parameters in the form of fully connected neural networks to learn relationships between underlying node representations to generate high quality graph representations which are then used for graph classification tasks . Experiments are performed on four benchmark bio-informatics datasets and five popular social network datasets to demonstrate the effectiveness and superiority of our proposed graph pooling methods . Experimental results show that our methods lead to an improvement in classification accuracy over existing methods and are also more reliable as compared to previous works . 2 RELATED WORK . 2.1 GRAPH NEURAL NETWORKS . A graph can be represented by its adjacency matrix and node features . Formally , for a graph G consisting of n nodes , its topology information can be represented by an adjacency matrix A ∈ { 0 , 1 } n × n and the node features can be represented as X ∈ Rn × d , assuming each node has a d-dimensional feature vector . GNNs learn feature representations for different nodes using these matrices ( Gilmer et al. , 2017 ) . Several approaches are proposed to investigate deep GNNs , and they generally follow a neighborhood information aggregation scheme ( Gilmer et al. , 2017 ; Xu et al. , 2019 ; Kipf & Welling , 2017 ; Hamilton et al. , 2017 ; Veličković et al. , 2018 ) . In each step , the representation of a node is updated by aggregating the representations of its neighbors . Graph Convolutional Networks ( GCNs ) are popular variants of GNNs and inspired by the first order graph Laplacian methods ( Kipf & Welling , 2017 ) . Graph pooling is used to connect embedded graphs outputted by GNN layers with classifiers for graph classification . Given a graph , GNN layers produce node representations , where each node is embedded as a vector . Graph pooling is applied after GNN layers to process node representations into a single feature vector as the graph representation . A classifier takes the graph representation and performs graph classification . 2.2 GRAPH POOLING . Early studies employ simple methods such as averaging and summation as graph pooling ( Xu et al. , 2019 ; Duvenaud et al. , 2015 ; Defferrard et al. , 2016 ) . However , averaging and summation do not capture the feature correlation information , curtailing the overall model performance ( Zhang et al. , 2018 ) . Other studies have proposed advanced graph pooling methods , including DIFFPOOL ( Ying et al. , 2018 ) , SORT-POOL ( Zhang et al. , 2018 ) , TOPKPOOL ( Gao & Ji , 2019 ) , SAGPOOL ( Lee et al. , 2019 ) , and EIGENPOOL ( Ma et al. , 2019b ) , and achieve great performance on multiple benchmark datasets . EIGENPOOL involves the computation of eigenvectors , which is slow and expensive . DIFFPOOL ( Ying et al. , 2018 ) treats the graph pooling as a node clustering problem . A cluster of nodes from the original graph are merged to form a new node in the new graph . DIFFPOOL ( Ying et al. , 2018 ) proposes to perform the graph convolution operation on node features to obtain node clustering assignment matrix . Intuitively , the class assignment of a given node should depend on the class assignments of other neighbouring nodes . However , DIFFPOOL does not explicitly consider high-order structural relationships , which we that are important for graph pooling . SORTPOOL ( Zhang et al. , 2018 ) , TOPKPOOL ( Gao & Ji , 2019 ) , and SAGPOOL ( Lee et al. , 2019 ) learn to select important nodes from the original graph and use these nodes to build a new graph . They share the similar idea to learn a sorting vector based on node representations , which indicates the importance of different nodes . Then only the top k important nodes are selected to form a new graph while the other nodes are ignored . However , the ignored nodes may contain important features and this information is lost during pooling . It is worth noting that all the graph pooling methods mentioned till now only collect first-order statistics ( Boureau et al. , 2010 ) . A recent study has proposed second order graph pooling methods SOPoolbimap and SOPoolattention ( Wang & Ji , 2020 ) . In this work , we propose two novel methods using fully connected neural network layers for graph pooling , namely Neural Pooling Method 1 and 2 . Compared to existing graph pooling methods , our proposed methods are able to capture information from all nodes , collect second-order statistics , and leverage the ability of neural networks to learn relationships among node representations , making them more powerful . 3 METHODOLOGY . 3.1 PROPERTIES OF GRAPH POOLING . Consider a graph G = ( A , X ) represented by its adjacency matrix A ∈ { 0 , 1 } n × n and node feature matrix X ∈ Rn × d , where n is the number of nodes in G and d is the dimension of node features . The node features may come from node labels or node degrees . Graph neural networks are known to be powerful in learning good node representation matrix H from A and X : H = [ h1 , h2 , ......... , hn ] T = GNN ( A , X ) ∈ Rn × f ( 1 ) where rows of H , hi ∈ Rf , i = 1 , 2 , ... , n , are representations of n nodes , and f is the dimension of the node representation obtained from the GNN and depends on the architecture of the GNN . The task that we focus on in this work is to obtain a graph representation vector hG from H , which is then fed into a classifier to perform graph classification : hG = g ( [ A ] , H ) ∈ Rc ( 2 ) where g ( · ) is the graph pooling function and c is the dimension of hG . Here , [ A ] means that the information from A can be optionally used in graph pooling . For simplicity , we omit it in the following discussion . Note that the function g ( · ) must satisfy two requirements to serve as graph pooling . First , g ( · ) should be able to take H with variable number of rows as the inputs and produce fixed-sized outputs . Specifically , different graphs may have different number of nodes , which means that n is a variable . On the other hand , c , which is the dimension of the graph representation hG is supposed to be fixed to fit into the classifier . Second , g ( · ) should output the same hG when the order of rows of H changes . This permutation invariance property is necessary to handle isomorphic graphs . To be concrete , if two graph G1 = ( A1 , X1 ) and G2 = ( A2 , X2 ) are isomorphic , GNNs will output the same multi set of node representations . That is , there exists a permutation matrix P ∈ { 0 , 1 } n × n such that H1 = PH2 , for H1 = GNN ( A1 , X1 ) and H2 = GNN ( A2 , X2 ) . However , the graph representation computed by g ( · ) should be the same , i.e. , g ( H1 ) = g ( H2 ) if H1 = PH2 . 3.2 NEURAL POOLING METHOD 1 . Our first proposed method is called Neural Pooling Method 1 . Consider a node representation matrix H obtained following Equation 1 in Section 3.1 . H is passed through a Fully Connected Neural Network Layer ( FCL1 ) to obtain H ′ as : H ′ = FCL1 ( H ) ∈ Rn × f ′ where f ′ < f ( 4 ) After this H ′ is again passed through a second Fully Connected Neural Network Layer ( FCL2 ) to obtain Q as : Q = FCL2 ( H ′ ) ∈ Rn × 1 ( 5 ) Finally the graph representation hG is obtained as : hG = H ′TQ ∈ Rf ′ × 1 ( 6 ) where H ′T denotes the transpose of H ′ . Neural Pooling Method 1 always outputs an f ′-dimensional graph representation for H ∈ Rn × f , regardless of the value of n. It is also invariant to permutation so that it outputs the same graph representation , even when the order of rows of H changes . Intuition : The FCL1 performs the role of reducing the dimensionality of the input node representations . The trainable parameters of this FCL1 can be thought of as learning a mapping from the f to the f ′-dimensional space . The FCL2 reduces the f ′-dimensional node representations to a 1 dimensional representation , Q. H ′ ∈ Rn × f ′ can be viewed as H ′ = [ l1 , l2 , . . . , lf ′ ] , where lj ∈ Rn , j=1 , 2 , ... , f ′ . The vector lj encodes the spatial distribution of the j-th feature in the graph . Based on this view , H ′TQ is able to capture the topology information and Q can be thought of as roughly encoding the position of nodes by learning the weights according to which the j-th feature is aggregated across the nodes . Neural Pooling Method 1 hence , leverages the ability of neural networks to learn the topological structure as well as correlation among the node representations in H . It captures the essential features and connections between underlying data . It also reduces the dimensionality of H , and results in an accurate representation of the input graph . | In this paper, the authors proposed two graph pooling methods, i.e., Neural Pooling Method 1 and 2. Both of them are flat pooling strategies, which try to obtain a graph representation directly from its node representations without coarsening graphs step by step. Specifically, the major idea of Neural Pooling Method 1 is to use GCN layer to learn a score for each node. Then, the graph representation is obtained by weighted summing the node representations with the learned scores as weights. Neural Pooling Method 2 follows a similar design. The difference is that, instead of a single score, it has multiple scores for each node, which leads to a matrix for graph representation. This matrix is then flattened into a vector to serve as the graph representation. | SP:445fc2caa1539447d3820e6ad6ae965d40d0cb76 |
Risk-Averse Offline Reinforcement Learning | 1 INTRODUCTION . In high-stakes applications , the deployment of highly-performing Reinforcement Learning ( RL ) agents is limited by prohibitively large costs at early exploration stages ( Dulac-Arnold et al. , 2019 ) . To address this issue , the offline ( or batch ) RL setting considers learning a policy from a limited batch of pre-collected data . However , high-stakes decision-making is typically also risk-averse : we assign more weight to adverse events than to positive ones ( Pratt , 1978 ) . Although several algorithms for risk-sensitive RL exist ( Howard & Matheson , 1972 ; Mihatsch & Neuneier , 2002 ) , none of them addresses the offline setting . On the other hand , existing offline RL algorithms consider the average performance criterion and are risk-neutral ( Ernst et al. , 2005 ; Lange et al. , 2012 ) . Main contributions We present the first approach towards learning a risk-averse RL policy for high-stakes applications using only offline data : the Offline Risk-Averse Actor-Critic ( O-RAAC ) . The algorithm has three components : a distributional critic that learns the full value distribution ( Section 3.1 ) , a risk-averse actor that optimizes a risk averse criteria ( Section 3.2 ) and an imitation learner implemented with a variational auto-encoder ( VAE ) that reduces the bootstrapping error due to the offline nature of the algorithm ( Section 3.3 ) . In Figure 1 , we show how these components interact with each other . Finally , in Section 4 we demonstrate the empirical performance of O-RAAC . Our implementation is freely available at Github : https : //github.com/nuria95/O-RAAC . 1.1 RELATED WORK . Risk-Averse RL The most common risk-averse measure in the literature is the Conditional Valueat-Risk ( CVaR ) ( Rockafellar & Uryasev , 2002 ) , which corresponds to the family of Coherent RiskMeasures ( Artzner et al. , 1999 ) , and we focus mainly on these risk-measures . Nevertheless , other risk criteria such as Cumulative Prospect Theory ( Tversky & Kahneman , 1992 ) or Exponential Utility ( Rabin , 2013 ) can also be used with the algorithm we propose . In the context of RL , Petrik & Subramanian ( 2012 ) ; Chow & Ghavamzadeh ( 2014 ) ; Chow et al . ( 2015 ) propose dynamic programming algorithms for solving the CVaR of the return distribution with known tabular Markov Decision Processes ( MDPs ) . For unknown models , Morimura et al . ( 2010 ) propose a SARSA algorithm for ( CVaR ) optimization but it is limited to the on-policy setting and small action spaces . To scale to larger systems , Tamar et al . ( 2012 ; 2015 ) propose on-policy Actor-Critic algorithms for Coherent Risk-Measures . However , they are extremely sample inefficient due to sample discarding to compute the risk-criteria and the high-variance of the gradient estimate . While Prashanth et al . ( 2016 ) address sample efficiency by considering Cumulative Prospect Theory instead of Coherent Risk-Measures , their algorithm is limited to tabular MDPs and is also on-policy . Instead , Tang et al . ( 2020 ) propose an off-policy algorithm that approximates the return distribution with a Gaussian distribution and learns its moments using the Bellman equation for the mean and the variance of the distribution . Instead , we learn the full return distribution without making the Gaussianity assumption ( Bellemare et al. , 2017 ) . Perhaps most closely related is the work of Singh et al . ( 2020 ) , who consider also a distributional critic but their algorithm is limited to the CVaR and they do not address the offline RL setting . Furthermore , they use a sample-based distributional critic , which makes the computation of the CVaR inefficient . Instead , we modify Implicit Quantile Networks ( Dabney et al. , 2018 ) in order to compute different risk criteria efficiently . Although ( Dabney et al. , 2018 ) already investigated risk-related criteria , their scope is limited to discrete action spaces ( e.g. , the Atari domain ) in an off-policy setting whereas we consider continuous actions in an offline setting . Offline RL The biggest challenge in offline RL is the Bootstrapping Error : a Q-function is evaluated at state-action pairs where there is little or no data and these get propagated through the Bellman equation ( Kumar et al. , 2019 ) . In turn , a policy optimized with offline data induces a state-action distribution that is shifted from the original data ( Ross et al. , 2011 ) . To address this , Fujimoto et al . ( 2019 ) propose to express the actor as the sum between an imitation learning component and a perturbation model to control the deviation of the behavior policy . Other approaches to control the difference between the data-collection policy and the optimized policy include regularizing the policies with the behavior policy using the MMD distance ( Kumar et al. , 2019 ) or f-divergences ( Wu et al. , 2020 ; Jaques et al. , 2019 ) , or using the behavior policy as a prior ( Siegel et al. , 2020 ) . An alternative strategy in offline RL is to be pessimistic with respect to the epistemic uncertainty that arises due to data scarcity . Yu et al . ( 2020 ) take a model-based approach and penalize the per-step rewards with the epistemic uncertainty of their dynamical model . Using a model-free approach Kumar et al . ( 2020 ) ; Buckman et al . ( 2020 ) propose to learn a lower bound of the Q-function using an estimate of the uncertainty as penalty in the target of the equation . Our work uses ideas from both strategies to address the offline risk-averse problem . First , we use an imitiation learner to control the bootstrapping error . However , by considering a risk-averse criterion , we are also optimizing over a pessimistic distribution compatible with the empirical distribution in the data set . The connections between risk-aversion and distributional robustness are well studied in supervised learning ( Shapiro et al. , 2014 ; Namkoong & Duchi , 2017 ; Curi et al. , 2020 ; Levy et al. , 2020 ) and in reinforcement learning ( Chow et al. , 2015 ; Pan et al. , 2019 ) . 2 PROBLEM STATEMENT . We consider a Markov Decision Process ( MDP ) with possibly continuous s ∈ S and possibly continuous actions a ∈ A , transition kernel P ( ·|s , a ) , reward kernel R ( ·|s , a ) and discount factor γ . We denote by π a stationary policy , i.e. , a mapping from states to distribution over actions . We have access to a fixed batch data set collected with an unknown behaviour policy πβ . We call dβ the joint state , action , reward , next-state distribution induced by the behaviour policy and ρβ the marginal state distribution . We access this distribution by sampling from the fixed data set . Similarly , for any policy π , we call dπ the joint state , action , reward , next-state distribution induced by π on the MDP . In risk-neutral RL , the goal is to find a policy that maximizes the expected discounted sum of returns Edπ [ ∑∞ t=1 γ t−1R ( ·|St , At ) ] , where the expectation is taken with respect to the stochasticity introduced by the reward kernel , the transition kernel , and the policy . We define as Zπ ( s , a ) =D ∑∞ t=1 γ t−1R ( ·|St , At ) as the return distribution conditioned on ( S1 = s , A1 = a ) and following π thereafter . Here =D denotes equality in distribution . The risk-neutral RL objective is the expectation of the distribution of Zπ . In risk-averse settings , we replace the expectation with a distortion operator D that is a mapping from the distribution over the returns to the reals . Thus , the goal is to find a policy π that maximizes max π D [ ∞∑ t=1 γt−1R ( ·|St , At ) ] . ( 1 ) With this framework , we address many different risk-averse distortions . For example , this includes probability weighting functions ( Gonzalez & Wu , 1999 ; Tversky & Kahneman , 1992 ) , the CVaR ( Rockafellar & Uryasev , 2002 ) , the mean-variance criteria ( Namkoong & Duchi , 2017 ) or the Wang criteria ( Wang , 1996 ; Rabin , 2013 ) . 3 OFFLINE RISK-AVERSE ACTOR-CRITIC ( O-RAAC ) . We now present our algorithm O-RAAC for offline-risk averse RL . One of the main technical challenges in going beyond expected rewards is to find an analogue of the Q-function for the particular distortion operator we want to optimize . Unfortunately , the Bellman target of most risk-analogues does not have a closed-form expression . Therefore , we instead learn the full distribution of returns as proposed by Bellemare et al . ( 2017 ) . In Section 3.1 , we describe the training procedure for the distributional critic . Next , in Section 3.2 we define the actor loss as the risk-distortion operator on the learned return distribution and optimize it using a gradient-based approach . Up to this point , the actor-critic template is enough to optimize a risk-averse criteria . However , as we focus on the offline setting , we need to control the bootstrapping error . To this end , we use a variational auto-encoder VAE to learn a generative model of the behavior policy in Section 3.3 . Finally , in Section 3.4 we bring all the pieces together and instantiate our algorithm for different risk distortions D . 3.1 DISTRIBUTIONAL CRITIC LEARNING . To learn the distributional critic , we exploit the distributional Bellman equation of returns Zπ ( s , a ) =D R ( s , a ) + γZ π ( S′ , A′ ) for policy evaluation . The random variables S′ , A′ are distributed according to s′ ∼ P ( ·|s , a ) and A′ ∼ π ( ·|s′ ) . In particular , we represent the return distribution implicitly through its quantile function as proposed by Dabney et al . ( 2018 ) . We use this representation because many risk distortion operators can be efficiently computed using the quantile function of the underlying random variable . We parameterize the quantile function through a neural network with learnable parameters w. We express such implicit quantile function as Zπw ( s , a ; τ ) , where τ ∈ [ 0 , 1 ] is the quantile level . Whereas the neural network architecture proposed by Dabney et al . ( 2018 ) is for discrete actions only , we extend it to continuous actions by considering all s , a , and τ as the inputs and only the quantile value as the output . To learn the parameters w , we use the distributional variant of fitted value-iteration ( Bellemare et al. , 2017 ; Munos & Szepesvári , 2008 ) using a quantile Huber-loss ( Huber , 1964 ) as a surrogate of the Wasserstein-distance as proposed by Dabney et al . ( 2018 ) . To this end , we use a target network with parameters w′ and compute the temporal difference ( TD ) error at a sample ( s , a , r , s′ ) as δτ , τ ′ = r + γZ π w′ ( s ′ , a′ ; τ ′ ) − Zπw ( s , a ; τ ) , ( 2 ) for τ , τ ′ independently sampled from the uniform distribution , i.e. , τ , τ ′ ∼ U ( 0 , 1 ) and a′ ∼ π ( ·|s′ ) . The τ -quantile Huber-loss is Lκ ( δ ; τ ) = ∣∣∣τ − 1 { δ < 0 } ∣∣∣︸ ︷︷ ︸ Quantile loss · { 1 2κδ 2 if |δ| ≤ κ , |δ| − 12κ otherwise.︸ ︷︷ ︸ Huber loss ( 3 ) We prefer the Huber loss over the L2 or L1 loss as it is better behaved due to smooth gradientclipping ( Mnih et al. , 2015 ) . Finally , we approximate the quantile loss for all levels τ by sampling N independent quantiles τ and N ′ independent target quantiles τ ′ . The critic loss is Lcritic ( w ) = E ( s , a , r , s′ ) ∼dβ ( · ) a′∼π ( ·|s′ ) [ 1 N ·N ′ N∑ i=1 N ′∑ j=1 Lκ ( δτi , τ ′j ; τi ) ] . ( 4 ) | The authors propose an RL algorithm for learning risk-averse policies from offline data. Empirically, it is shown that it can outperform some existing risk-neutral approaches on a number of challenging robotic control tasks under risk-sensitive performance measures. Although the empirical results are encouraging, the theoretical properties of the proposed algorithm are unclear and therefore it is not clear how easy it can be implemented in other tasks. | SP:aebd056143c988e81577e5604b38712895fa21ea |
Risk-Averse Offline Reinforcement Learning | 1 INTRODUCTION . In high-stakes applications , the deployment of highly-performing Reinforcement Learning ( RL ) agents is limited by prohibitively large costs at early exploration stages ( Dulac-Arnold et al. , 2019 ) . To address this issue , the offline ( or batch ) RL setting considers learning a policy from a limited batch of pre-collected data . However , high-stakes decision-making is typically also risk-averse : we assign more weight to adverse events than to positive ones ( Pratt , 1978 ) . Although several algorithms for risk-sensitive RL exist ( Howard & Matheson , 1972 ; Mihatsch & Neuneier , 2002 ) , none of them addresses the offline setting . On the other hand , existing offline RL algorithms consider the average performance criterion and are risk-neutral ( Ernst et al. , 2005 ; Lange et al. , 2012 ) . Main contributions We present the first approach towards learning a risk-averse RL policy for high-stakes applications using only offline data : the Offline Risk-Averse Actor-Critic ( O-RAAC ) . The algorithm has three components : a distributional critic that learns the full value distribution ( Section 3.1 ) , a risk-averse actor that optimizes a risk averse criteria ( Section 3.2 ) and an imitation learner implemented with a variational auto-encoder ( VAE ) that reduces the bootstrapping error due to the offline nature of the algorithm ( Section 3.3 ) . In Figure 1 , we show how these components interact with each other . Finally , in Section 4 we demonstrate the empirical performance of O-RAAC . Our implementation is freely available at Github : https : //github.com/nuria95/O-RAAC . 1.1 RELATED WORK . Risk-Averse RL The most common risk-averse measure in the literature is the Conditional Valueat-Risk ( CVaR ) ( Rockafellar & Uryasev , 2002 ) , which corresponds to the family of Coherent RiskMeasures ( Artzner et al. , 1999 ) , and we focus mainly on these risk-measures . Nevertheless , other risk criteria such as Cumulative Prospect Theory ( Tversky & Kahneman , 1992 ) or Exponential Utility ( Rabin , 2013 ) can also be used with the algorithm we propose . In the context of RL , Petrik & Subramanian ( 2012 ) ; Chow & Ghavamzadeh ( 2014 ) ; Chow et al . ( 2015 ) propose dynamic programming algorithms for solving the CVaR of the return distribution with known tabular Markov Decision Processes ( MDPs ) . For unknown models , Morimura et al . ( 2010 ) propose a SARSA algorithm for ( CVaR ) optimization but it is limited to the on-policy setting and small action spaces . To scale to larger systems , Tamar et al . ( 2012 ; 2015 ) propose on-policy Actor-Critic algorithms for Coherent Risk-Measures . However , they are extremely sample inefficient due to sample discarding to compute the risk-criteria and the high-variance of the gradient estimate . While Prashanth et al . ( 2016 ) address sample efficiency by considering Cumulative Prospect Theory instead of Coherent Risk-Measures , their algorithm is limited to tabular MDPs and is also on-policy . Instead , Tang et al . ( 2020 ) propose an off-policy algorithm that approximates the return distribution with a Gaussian distribution and learns its moments using the Bellman equation for the mean and the variance of the distribution . Instead , we learn the full return distribution without making the Gaussianity assumption ( Bellemare et al. , 2017 ) . Perhaps most closely related is the work of Singh et al . ( 2020 ) , who consider also a distributional critic but their algorithm is limited to the CVaR and they do not address the offline RL setting . Furthermore , they use a sample-based distributional critic , which makes the computation of the CVaR inefficient . Instead , we modify Implicit Quantile Networks ( Dabney et al. , 2018 ) in order to compute different risk criteria efficiently . Although ( Dabney et al. , 2018 ) already investigated risk-related criteria , their scope is limited to discrete action spaces ( e.g. , the Atari domain ) in an off-policy setting whereas we consider continuous actions in an offline setting . Offline RL The biggest challenge in offline RL is the Bootstrapping Error : a Q-function is evaluated at state-action pairs where there is little or no data and these get propagated through the Bellman equation ( Kumar et al. , 2019 ) . In turn , a policy optimized with offline data induces a state-action distribution that is shifted from the original data ( Ross et al. , 2011 ) . To address this , Fujimoto et al . ( 2019 ) propose to express the actor as the sum between an imitation learning component and a perturbation model to control the deviation of the behavior policy . Other approaches to control the difference between the data-collection policy and the optimized policy include regularizing the policies with the behavior policy using the MMD distance ( Kumar et al. , 2019 ) or f-divergences ( Wu et al. , 2020 ; Jaques et al. , 2019 ) , or using the behavior policy as a prior ( Siegel et al. , 2020 ) . An alternative strategy in offline RL is to be pessimistic with respect to the epistemic uncertainty that arises due to data scarcity . Yu et al . ( 2020 ) take a model-based approach and penalize the per-step rewards with the epistemic uncertainty of their dynamical model . Using a model-free approach Kumar et al . ( 2020 ) ; Buckman et al . ( 2020 ) propose to learn a lower bound of the Q-function using an estimate of the uncertainty as penalty in the target of the equation . Our work uses ideas from both strategies to address the offline risk-averse problem . First , we use an imitiation learner to control the bootstrapping error . However , by considering a risk-averse criterion , we are also optimizing over a pessimistic distribution compatible with the empirical distribution in the data set . The connections between risk-aversion and distributional robustness are well studied in supervised learning ( Shapiro et al. , 2014 ; Namkoong & Duchi , 2017 ; Curi et al. , 2020 ; Levy et al. , 2020 ) and in reinforcement learning ( Chow et al. , 2015 ; Pan et al. , 2019 ) . 2 PROBLEM STATEMENT . We consider a Markov Decision Process ( MDP ) with possibly continuous s ∈ S and possibly continuous actions a ∈ A , transition kernel P ( ·|s , a ) , reward kernel R ( ·|s , a ) and discount factor γ . We denote by π a stationary policy , i.e. , a mapping from states to distribution over actions . We have access to a fixed batch data set collected with an unknown behaviour policy πβ . We call dβ the joint state , action , reward , next-state distribution induced by the behaviour policy and ρβ the marginal state distribution . We access this distribution by sampling from the fixed data set . Similarly , for any policy π , we call dπ the joint state , action , reward , next-state distribution induced by π on the MDP . In risk-neutral RL , the goal is to find a policy that maximizes the expected discounted sum of returns Edπ [ ∑∞ t=1 γ t−1R ( ·|St , At ) ] , where the expectation is taken with respect to the stochasticity introduced by the reward kernel , the transition kernel , and the policy . We define as Zπ ( s , a ) =D ∑∞ t=1 γ t−1R ( ·|St , At ) as the return distribution conditioned on ( S1 = s , A1 = a ) and following π thereafter . Here =D denotes equality in distribution . The risk-neutral RL objective is the expectation of the distribution of Zπ . In risk-averse settings , we replace the expectation with a distortion operator D that is a mapping from the distribution over the returns to the reals . Thus , the goal is to find a policy π that maximizes max π D [ ∞∑ t=1 γt−1R ( ·|St , At ) ] . ( 1 ) With this framework , we address many different risk-averse distortions . For example , this includes probability weighting functions ( Gonzalez & Wu , 1999 ; Tversky & Kahneman , 1992 ) , the CVaR ( Rockafellar & Uryasev , 2002 ) , the mean-variance criteria ( Namkoong & Duchi , 2017 ) or the Wang criteria ( Wang , 1996 ; Rabin , 2013 ) . 3 OFFLINE RISK-AVERSE ACTOR-CRITIC ( O-RAAC ) . We now present our algorithm O-RAAC for offline-risk averse RL . One of the main technical challenges in going beyond expected rewards is to find an analogue of the Q-function for the particular distortion operator we want to optimize . Unfortunately , the Bellman target of most risk-analogues does not have a closed-form expression . Therefore , we instead learn the full distribution of returns as proposed by Bellemare et al . ( 2017 ) . In Section 3.1 , we describe the training procedure for the distributional critic . Next , in Section 3.2 we define the actor loss as the risk-distortion operator on the learned return distribution and optimize it using a gradient-based approach . Up to this point , the actor-critic template is enough to optimize a risk-averse criteria . However , as we focus on the offline setting , we need to control the bootstrapping error . To this end , we use a variational auto-encoder VAE to learn a generative model of the behavior policy in Section 3.3 . Finally , in Section 3.4 we bring all the pieces together and instantiate our algorithm for different risk distortions D . 3.1 DISTRIBUTIONAL CRITIC LEARNING . To learn the distributional critic , we exploit the distributional Bellman equation of returns Zπ ( s , a ) =D R ( s , a ) + γZ π ( S′ , A′ ) for policy evaluation . The random variables S′ , A′ are distributed according to s′ ∼ P ( ·|s , a ) and A′ ∼ π ( ·|s′ ) . In particular , we represent the return distribution implicitly through its quantile function as proposed by Dabney et al . ( 2018 ) . We use this representation because many risk distortion operators can be efficiently computed using the quantile function of the underlying random variable . We parameterize the quantile function through a neural network with learnable parameters w. We express such implicit quantile function as Zπw ( s , a ; τ ) , where τ ∈ [ 0 , 1 ] is the quantile level . Whereas the neural network architecture proposed by Dabney et al . ( 2018 ) is for discrete actions only , we extend it to continuous actions by considering all s , a , and τ as the inputs and only the quantile value as the output . To learn the parameters w , we use the distributional variant of fitted value-iteration ( Bellemare et al. , 2017 ; Munos & Szepesvári , 2008 ) using a quantile Huber-loss ( Huber , 1964 ) as a surrogate of the Wasserstein-distance as proposed by Dabney et al . ( 2018 ) . To this end , we use a target network with parameters w′ and compute the temporal difference ( TD ) error at a sample ( s , a , r , s′ ) as δτ , τ ′ = r + γZ π w′ ( s ′ , a′ ; τ ′ ) − Zπw ( s , a ; τ ) , ( 2 ) for τ , τ ′ independently sampled from the uniform distribution , i.e. , τ , τ ′ ∼ U ( 0 , 1 ) and a′ ∼ π ( ·|s′ ) . The τ -quantile Huber-loss is Lκ ( δ ; τ ) = ∣∣∣τ − 1 { δ < 0 } ∣∣∣︸ ︷︷ ︸ Quantile loss · { 1 2κδ 2 if |δ| ≤ κ , |δ| − 12κ otherwise.︸ ︷︷ ︸ Huber loss ( 3 ) We prefer the Huber loss over the L2 or L1 loss as it is better behaved due to smooth gradientclipping ( Mnih et al. , 2015 ) . Finally , we approximate the quantile loss for all levels τ by sampling N independent quantiles τ and N ′ independent target quantiles τ ′ . The critic loss is Lcritic ( w ) = E ( s , a , r , s′ ) ∼dβ ( · ) a′∼π ( ·|s′ ) [ 1 N ·N ′ N∑ i=1 N ′∑ j=1 Lκ ( δτi , τ ′j ; τi ) ] . ( 4 ) | The paper studies the problem of safe reinforcement learning, where we want to learn risk-averse policies in the offline setting. It proposes “Offline Risk Averse Actor Critic” (ORAAC) which performs competitively as risk-neural agent, and outperforms D4PG based baseline as a risk-averse agent on D4RL benchmark. The algorithm involves modifying the losses to learn risk-averse actor, distributional critic and a VAE-based imitative policy. | SP:aebd056143c988e81577e5604b38712895fa21ea |
Disentangled cyclic reconstruction for domain adaptation | The domain adaptation problem involves learning a unique classification or regression model capable of performing on both a source and a target domain . Although the labels for the source data are available during training , the labels in the target domain are unknown . An effective way to tackle this problem lies in extracting insightful features invariant to the source and target domains . In this work , we propose splitting the information for each domain into a task-related representation and its complimentary context representation . We propose an original method to disentangle these two representations in the single-domain supervised case . We then adapt this method to the unsupervised domain adaptation problem . In particular , our method allows disentanglement in the target domain , despite the absence of training labels . This enables the isolation of task-specific information from both domains and a projection into a common representation . The task-specific representation allows efficient transfer of knowledge acquired from the source domain to the target domain . We validate the proposed method on several classical domain adaptation benchmarks and illustrate the benefits of disentanglement for domain adaptation . 1 INTRODUCTION . The wide adoption of Deep Neural Networks in practical supervised learning applications is hindered by their sensitivity to the training data distribution . This problem , known as domain shift , can drastically weaken , in real-life operating conditions , the performance of a model that seemed perfectly efficient in simulation . Learning a model with the goal of making it robust to a specific domain shift is called domain adaptation ( DA ) . Often , the data available to achieve DA consist of a labeled training set from a source domain and an unlabeled sample set from a target domain . This yields the problem of unsupervised domain adaptation ( UDA ) . In this work , we take an information disentanglement perspective on UDA . We argue that a key to efficient UDA lies in separating the necessary information to complete the network ’ s task ( classification or regression ) , from a task-orthogonal information which we call context or style . Disentanglement in the target domain seems however a difficult endeavor since the available data is unlabeled . Our contribution is two-fold . We propose a formal definition of the disentanglement problem for UDA which , to the best of our knowledge , is new . Then we design a new learning method , called DiCyR ( Disentangled Cyclic Reconstruction ) , which relies on cyclic reconstruction of inputs in order to achieve efficient disentanglement , including in the target domain . We derive DiCyR both in the supervised learning and in the UDA cases . This paper is organized as follows . Section 2 presents the required background on supervised learning and UDA , and proposes a definition of disentanglement for UDA . Section 3 reviews recent work in the literature that allow for a critical look at our contribution and put it in perspective . Section 4 introduces DiCyR , first for the single-domain supervised learning case and then for the UDA problem . Finally , Section 5 empirically evaluates DiCyR against state-of-the-art methods and discusses its strengths , weaknesses and variants . Section 6 summarizes and concludes this paper . 2 PROBLEM DEFINITION . In this section , we introduce the notations and background upon which we build the contributions of Section 4 . Let X be an input space of descriptors and Y an output space of labels . A supervised learning problem is defined by a distribution ps ( x , y ) over elements of X × Y . In what follows , ps will be called the source distribution . One wishes to estimate a mapping f̂ that minimizes a loss function of the form E ( x , y ) ∼ps [ l ( f̂ ( x ) , y ) ] . The optimal estimator is denoted f and one often writes the distribution P ( y|x ) as y ∼ f ( x ) + η , where η captures the deviations between y and f ( x ) . Hence , one tries to learn f . In practice , the loss can only be approximated using a finite set of samples { ( xi , yi ) } ni=1 all independently drawn from ps and f̂ is a parametric function ( such as a deep neural network ) of the form y = f̂ ( x ; θ ) . Domain adaptation ( DA ) consists in considering a target distribution pt over X ×Y that differs from ps , and the transfer of knowledge from learning in the source domain ( ps ) to the target domain ( pt ) . Specifically , unsupervised DA exploits the knowledge of a labelled training set { ( xsi , ysi ) } ni=1 sampled according to ps , and an unlabelled data set { ( xti ) } mi=1 sampled according to pt . For instance , the source domain data could be a set of labelled photographs of faces , and the target domain data , a set of unlabelled face photographs , taken with a different camera under different exposure conditions . The problem consists in minimizing the target loss E ( x , y ) ∼pt [ l ( f̂ ( x ) , y ) ] . We suppose that a necessary condition to benefit from the knowledge available in the source domain and transfer it to the target domain is the existence of a common information manifold between domains , where an input ’ s projection is sufficient to predict the labels . We call this useful information task-specific or task-related . The complimentary information should be called task-orthogonal ; it is composed of information that is present in the input but is not relevant to the task at hand . For the sake of naming simplicity , we will call this information style . However we insist that this should not be confused with the classical notion of style . Let Πτ : X → T and Πσ : X → S denote two projection operators , where T and S denote respectively the latent task-related information space and the latent style-related information space . Let Π be the joint projection Π ( x ) = ( Πτ ( x ) , Πσ ( x ) ) . Conversely , we shall note Π̄ : T × S → X a reconstruction operator . And finally , c : T → Y will denote the labeling operator which only uses information from T . We consider that the information of the elements of X is correctly disentangled by Π = ( Πτ , Πσ ) if one can find Π̄ and c such that : C1 : c ◦Πτ minimizes the loss ( and thus fits f on the appropriate domain ) , C2 : Π̄ ◦Π fits the identity operator idX , C3 : With X , T , S the random variables in X , T , S , the mutual information I ( T , S|X ) = 0 , C4 : There is no function g : T → X such that g ◦Πτ = idX , Condition C1 imposes that the projection into T retains enough information to correctly label samples . Condition C2 imposes that all the information necessary for the reconstruction is preserved by the separation performed by Π . Condition C3 states that no information is present in both T and S. Condition C4 impose that the information contained in T alone is insufficient to reconstruct an input , and thus the information of S is necessary . Note that the symmetrical condition is unnecessary , since the combination of C1 and C3 already guarantees that S can not contain the task-related information . Overall , solving this disentanglement problem for DA implies finding a quadruplet 〈Πτ , Πσ , Π̄ , c〉 that meets the conditions above . In particular , note that conditions C3 and C4 open a perspective to a formulation of disentanglement in the general case . 3 RELATED WORK . Disentanglement between the domain-invariant , task-related information and the domain-specific , task-orthogonal , style information is a desirable property to have for DA . In the next paragraphs , we cover important work in representation disentanglement , domain adaptation and their interplay . Before deep learning became popular , Tenenbaum & Freeman ( 2000 ) presented a method using bi-linear models able to separate style from content . More recently , methods based on generative models have demonstrated the ability to disentangle factors of variations from elements of a single domain ( Rifai et al. , 2012 ; Mathieu et al. , 2016 ; Chen et al. , 2016 ; Higgins et al. , 2017 ; Sanchez et al. , 2019 ) . In a cross-domain setting , Gonzalez-Garcia et al . ( 2018 ) use pairs of images with the same labels from different domains to separate representations into a shared information common to both domains and a domain-exclusive information . We note that these approaches do not explicitly aim at respecting all conditions listed in Section 2 . Additionally , most require labeled datasets ( and in some cases even paired datasets ) and thus do not address the unsupervised DA problem . One approach to UDA consists in aligning the source and target distributions statistics , a topic closely related to batch normalization ( Ioffe & Szegedy , 2015 ) . Sun et al . ( 2017 ) minimize the distance between the covariance matrices of the features extracted from the source and target domains . Assuming the domain-specific information is contained inside the batch normalization layers , Li et al . ( 2017 ) align the batch statistics by adopting a specific normalization for each domain . Cariucci et al . ( 2017 ) aim to align source and target feature distributions to a reference one and introduce domain alignment layers to automatically learn the degree of feature alignment needed at different levels of the network . Similarly , Roy et al . ( 2019 ) replace batch normalization layers with domain alignment layers implementing a so-called feature whitening . A major asset of these methods is the possibility to be used jointly with other DA methods ( including the one we propose in Section 4 ) . These methods jointly learn a common representation for elements from both domains . Conversely , Liang et al . ( 2020 ) freeze the representations learned in the source domain before training a target-specific encoder to align the representations of the target elements by maximizing the mutual information between intermediate feature representations and outputs of the classifier . Ensemble methods have also been applied to UDA ( Laine & Aila , 2017 ; Tarvainen & Valpola , 2017 ) . French et al . ( 2018 ) combine stochastic data augmentation with self-ensembling to minimize the prediction differences between a student and a teacher network in the target domain . Another approach involves learning domain-invariant features , that do not allow to discriminate whether a sample belongs to the source or target domain , while still permitting accurate labeling in the source domain . This approach relies on the assumption that such features allow efficient labeling in the target domain . Ghifary et al . ( 2016 ) build a two-headed network sharing common layers ; one head performs classification in the source domain , while the second is a decoder that performs reconstruction for target domain elements . Ganin et al . ( 2016 ) propose the DANN method and introduce Gradient Reversal Layers to connect a domain discriminator and a feature extractor . These layers invert the gradient sign during back-propagation so that the feature extractor is trained to fool the domain discriminator . Shen et al . ( 2018 ) modify DANN and replace the domain discriminator by a network that approximates the Wasserstein distance between domains . Tzeng et al . ( 2017 ) optimize , in an adversarial setting , a generator and a discriminator with an inverted label loss . Other methods focus on explicitly disentangling an information shared between domains ( analogous to the domain-invariant features above ) from a domain-specific information . Inspired by Chen et al . ( 2016 ) , Liu et al . ( 2018b ) isolate a latent factor , representing the domain information , from the rest of an encoding , by maximizing the mutual information between generated images and this latent factor . Some domain information may still be present in the remaining part of the encoding and thus may not comply with conditions C3 and C4 . Liu et al . ( 2018a ) combine an encoder , an image generator , a domain discriminator , and a fake images discriminator to produce cross-domain images . The encoder is trained jointly with the domain discriminator to produce domain-invariant representations . Li et al . ( 2020 ) disentangle a latent representation into a global code and a local code . The global code captures category information via an encoder with a prior , and the local code is transferable across domains , which captures the style-related information via an implicit decoder . Bousmalis et al . ( 2016 ) also produce domain-invariant features by training a shared encoder to fool a domain discriminator . They train two domain-private encoders with a difference loss that encourages orthogonality between the shared and the private representations ( similarly to condition C3 ) . Cao et al . ( 2018 ) ; Cai et al . ( 2019 ) ; Peng et al . ( 2019 ) combine a domain discriminator with an adversarial classifier to separate the information shared between domains from the domain-specific information . All these methods build a shared representation that prevents discriminating between source and target domains , while retaining enough information to correctly label samples from the source domain . However , because they rely on an adversarial classifier that requires labeled data , they do not guarantee that the complimentary , domain-specific information for samples in the target domain does not contain information that overlaps with the shared representation . In other words , they only enforce C3 in the source domain . They rely on the assumption that the disentanglement will still hold when applied on target domain elements , which might not be true . Another identified weakness in methods that achieve a domain-invariant feature space is that their representations might not allow for accurate labeling in the target domain . Indeed , feature alignment does not necessarily imply a correct mapping between domains . To illustrate this point , consider a binary classification problem ( classes c1 and c2 ) and two domains ( d1 and d2 ) . Let ( c1 , d1 ) denote samples of class c1 in d1 . It is possible to construct an encoding that projects ( c1 , d1 ) and ( c2 , d2 ) to the same feature values . The same holds for ( c1 , d2 ) and ( c2 , d1 ) for different feature values . This encoding allows discriminating between classes in d1 . It also fools a domain discriminator since it does not allow predicting the original domain of a projected element . However , applying the classification function learned on d1 to the projected d2 elements leads to catastrophic predictions . Transforming a sample from one domain to the other , while retaining its label information can be accomplished by image-to-image translation methods . Hoffman et al . ( 2018 ) extend CycleGAN ’ s cycle consistency ( Zhu et al. , 2017 ) with a semantic consistency to translate from source to target domains . The translated images from the source domain to the target domain are then used to train a classifier on the target domain using the source labels . Similarly , Russo et al . ( 2018 ) train two conditional GANs ( Mirza & Osindero , 2014 ) to learn bi-directional image mappings constrained by a class consistency loss and use a source domain classifier to produce pseudo-labels on source-like transformed target samples . By relaxing CycleGAN ’ s cycle consistency constraint and integrating the discriminator in the training phase , Hosseini-Asl et al . ( 2019 ) address the DA problem in the specific setting where the number of target samples is limited . Takahashi et al . ( 2020 ) use a CycleGAN to generate cross-domain pseudo-pairs and train two domain-specific encoders to align features extracted from each pseudo-pair in the feature space . A major asset of the method is to address the class-unbalanced UDA problem by oversampling with the learned data augmentation . Yang et al . ( 2019 ) use separate encoders to produce domain-invariant and domain-specific features in both domains . They jointly train these encoders with two generators to produce cross-domain elements able to fool domain-specific discriminators . Using a cyclic loss on features , they force the information contained in the representation to be preserved during the generation of cross-domain elements . However , the cyclic loss on features does not prevent the information sharing between features expressed in C3 . More importantly it does not prevent the domain-specific features to be constant . A major drawback of these methods lies in the instability during training that might be caused by min-max optimization problem induced by the adversarial training of generators and discriminators . In the next section , we introduce a method that does not rely on a domain discriminator and an adversarial label predictor , but directly minimizes the information sharing between representations . This allows to guarantee that there is no information redundancy between the task-related and the task-orthogonal style information in both the source and the target domains . Along the way , it provides an efficient mechanism to disentangle the task-related information from the style information in the single domain case . Our method combines information disentanglement , intra-domain and cross-domain cyclic consistency to enforce a more principled mapping between each domain . | This paper studies the domain adaptation problem by addressing the challenge of splitting task-specific and task-orthogonal information in the target domain using the proposed disentangled cyclic reconstruction method. The authors further develop a variant for the unsupervised domain adaption (UDA) task. The authors argue that the existing adversarial classifier based UDA solutions do not guarantee that the domain specific information does not contain any information that overlaps with the shared information in the target domain. Another shortcoming of these baselines is the learned representation in their domain-invariant feature space might not allow for accurate labeling in the target domain. To solves these limitations, the authors directly minimize the information sharing between representation, instead of using domain adversarial classifier and adversarial label predictor. | SP:d02cf08c6b78934d9bceb1fced353db460da192b |
Disentangled cyclic reconstruction for domain adaptation | The domain adaptation problem involves learning a unique classification or regression model capable of performing on both a source and a target domain . Although the labels for the source data are available during training , the labels in the target domain are unknown . An effective way to tackle this problem lies in extracting insightful features invariant to the source and target domains . In this work , we propose splitting the information for each domain into a task-related representation and its complimentary context representation . We propose an original method to disentangle these two representations in the single-domain supervised case . We then adapt this method to the unsupervised domain adaptation problem . In particular , our method allows disentanglement in the target domain , despite the absence of training labels . This enables the isolation of task-specific information from both domains and a projection into a common representation . The task-specific representation allows efficient transfer of knowledge acquired from the source domain to the target domain . We validate the proposed method on several classical domain adaptation benchmarks and illustrate the benefits of disentanglement for domain adaptation . 1 INTRODUCTION . The wide adoption of Deep Neural Networks in practical supervised learning applications is hindered by their sensitivity to the training data distribution . This problem , known as domain shift , can drastically weaken , in real-life operating conditions , the performance of a model that seemed perfectly efficient in simulation . Learning a model with the goal of making it robust to a specific domain shift is called domain adaptation ( DA ) . Often , the data available to achieve DA consist of a labeled training set from a source domain and an unlabeled sample set from a target domain . This yields the problem of unsupervised domain adaptation ( UDA ) . In this work , we take an information disentanglement perspective on UDA . We argue that a key to efficient UDA lies in separating the necessary information to complete the network ’ s task ( classification or regression ) , from a task-orthogonal information which we call context or style . Disentanglement in the target domain seems however a difficult endeavor since the available data is unlabeled . Our contribution is two-fold . We propose a formal definition of the disentanglement problem for UDA which , to the best of our knowledge , is new . Then we design a new learning method , called DiCyR ( Disentangled Cyclic Reconstruction ) , which relies on cyclic reconstruction of inputs in order to achieve efficient disentanglement , including in the target domain . We derive DiCyR both in the supervised learning and in the UDA cases . This paper is organized as follows . Section 2 presents the required background on supervised learning and UDA , and proposes a definition of disentanglement for UDA . Section 3 reviews recent work in the literature that allow for a critical look at our contribution and put it in perspective . Section 4 introduces DiCyR , first for the single-domain supervised learning case and then for the UDA problem . Finally , Section 5 empirically evaluates DiCyR against state-of-the-art methods and discusses its strengths , weaknesses and variants . Section 6 summarizes and concludes this paper . 2 PROBLEM DEFINITION . In this section , we introduce the notations and background upon which we build the contributions of Section 4 . Let X be an input space of descriptors and Y an output space of labels . A supervised learning problem is defined by a distribution ps ( x , y ) over elements of X × Y . In what follows , ps will be called the source distribution . One wishes to estimate a mapping f̂ that minimizes a loss function of the form E ( x , y ) ∼ps [ l ( f̂ ( x ) , y ) ] . The optimal estimator is denoted f and one often writes the distribution P ( y|x ) as y ∼ f ( x ) + η , where η captures the deviations between y and f ( x ) . Hence , one tries to learn f . In practice , the loss can only be approximated using a finite set of samples { ( xi , yi ) } ni=1 all independently drawn from ps and f̂ is a parametric function ( such as a deep neural network ) of the form y = f̂ ( x ; θ ) . Domain adaptation ( DA ) consists in considering a target distribution pt over X ×Y that differs from ps , and the transfer of knowledge from learning in the source domain ( ps ) to the target domain ( pt ) . Specifically , unsupervised DA exploits the knowledge of a labelled training set { ( xsi , ysi ) } ni=1 sampled according to ps , and an unlabelled data set { ( xti ) } mi=1 sampled according to pt . For instance , the source domain data could be a set of labelled photographs of faces , and the target domain data , a set of unlabelled face photographs , taken with a different camera under different exposure conditions . The problem consists in minimizing the target loss E ( x , y ) ∼pt [ l ( f̂ ( x ) , y ) ] . We suppose that a necessary condition to benefit from the knowledge available in the source domain and transfer it to the target domain is the existence of a common information manifold between domains , where an input ’ s projection is sufficient to predict the labels . We call this useful information task-specific or task-related . The complimentary information should be called task-orthogonal ; it is composed of information that is present in the input but is not relevant to the task at hand . For the sake of naming simplicity , we will call this information style . However we insist that this should not be confused with the classical notion of style . Let Πτ : X → T and Πσ : X → S denote two projection operators , where T and S denote respectively the latent task-related information space and the latent style-related information space . Let Π be the joint projection Π ( x ) = ( Πτ ( x ) , Πσ ( x ) ) . Conversely , we shall note Π̄ : T × S → X a reconstruction operator . And finally , c : T → Y will denote the labeling operator which only uses information from T . We consider that the information of the elements of X is correctly disentangled by Π = ( Πτ , Πσ ) if one can find Π̄ and c such that : C1 : c ◦Πτ minimizes the loss ( and thus fits f on the appropriate domain ) , C2 : Π̄ ◦Π fits the identity operator idX , C3 : With X , T , S the random variables in X , T , S , the mutual information I ( T , S|X ) = 0 , C4 : There is no function g : T → X such that g ◦Πτ = idX , Condition C1 imposes that the projection into T retains enough information to correctly label samples . Condition C2 imposes that all the information necessary for the reconstruction is preserved by the separation performed by Π . Condition C3 states that no information is present in both T and S. Condition C4 impose that the information contained in T alone is insufficient to reconstruct an input , and thus the information of S is necessary . Note that the symmetrical condition is unnecessary , since the combination of C1 and C3 already guarantees that S can not contain the task-related information . Overall , solving this disentanglement problem for DA implies finding a quadruplet 〈Πτ , Πσ , Π̄ , c〉 that meets the conditions above . In particular , note that conditions C3 and C4 open a perspective to a formulation of disentanglement in the general case . 3 RELATED WORK . Disentanglement between the domain-invariant , task-related information and the domain-specific , task-orthogonal , style information is a desirable property to have for DA . In the next paragraphs , we cover important work in representation disentanglement , domain adaptation and their interplay . Before deep learning became popular , Tenenbaum & Freeman ( 2000 ) presented a method using bi-linear models able to separate style from content . More recently , methods based on generative models have demonstrated the ability to disentangle factors of variations from elements of a single domain ( Rifai et al. , 2012 ; Mathieu et al. , 2016 ; Chen et al. , 2016 ; Higgins et al. , 2017 ; Sanchez et al. , 2019 ) . In a cross-domain setting , Gonzalez-Garcia et al . ( 2018 ) use pairs of images with the same labels from different domains to separate representations into a shared information common to both domains and a domain-exclusive information . We note that these approaches do not explicitly aim at respecting all conditions listed in Section 2 . Additionally , most require labeled datasets ( and in some cases even paired datasets ) and thus do not address the unsupervised DA problem . One approach to UDA consists in aligning the source and target distributions statistics , a topic closely related to batch normalization ( Ioffe & Szegedy , 2015 ) . Sun et al . ( 2017 ) minimize the distance between the covariance matrices of the features extracted from the source and target domains . Assuming the domain-specific information is contained inside the batch normalization layers , Li et al . ( 2017 ) align the batch statistics by adopting a specific normalization for each domain . Cariucci et al . ( 2017 ) aim to align source and target feature distributions to a reference one and introduce domain alignment layers to automatically learn the degree of feature alignment needed at different levels of the network . Similarly , Roy et al . ( 2019 ) replace batch normalization layers with domain alignment layers implementing a so-called feature whitening . A major asset of these methods is the possibility to be used jointly with other DA methods ( including the one we propose in Section 4 ) . These methods jointly learn a common representation for elements from both domains . Conversely , Liang et al . ( 2020 ) freeze the representations learned in the source domain before training a target-specific encoder to align the representations of the target elements by maximizing the mutual information between intermediate feature representations and outputs of the classifier . Ensemble methods have also been applied to UDA ( Laine & Aila , 2017 ; Tarvainen & Valpola , 2017 ) . French et al . ( 2018 ) combine stochastic data augmentation with self-ensembling to minimize the prediction differences between a student and a teacher network in the target domain . Another approach involves learning domain-invariant features , that do not allow to discriminate whether a sample belongs to the source or target domain , while still permitting accurate labeling in the source domain . This approach relies on the assumption that such features allow efficient labeling in the target domain . Ghifary et al . ( 2016 ) build a two-headed network sharing common layers ; one head performs classification in the source domain , while the second is a decoder that performs reconstruction for target domain elements . Ganin et al . ( 2016 ) propose the DANN method and introduce Gradient Reversal Layers to connect a domain discriminator and a feature extractor . These layers invert the gradient sign during back-propagation so that the feature extractor is trained to fool the domain discriminator . Shen et al . ( 2018 ) modify DANN and replace the domain discriminator by a network that approximates the Wasserstein distance between domains . Tzeng et al . ( 2017 ) optimize , in an adversarial setting , a generator and a discriminator with an inverted label loss . Other methods focus on explicitly disentangling an information shared between domains ( analogous to the domain-invariant features above ) from a domain-specific information . Inspired by Chen et al . ( 2016 ) , Liu et al . ( 2018b ) isolate a latent factor , representing the domain information , from the rest of an encoding , by maximizing the mutual information between generated images and this latent factor . Some domain information may still be present in the remaining part of the encoding and thus may not comply with conditions C3 and C4 . Liu et al . ( 2018a ) combine an encoder , an image generator , a domain discriminator , and a fake images discriminator to produce cross-domain images . The encoder is trained jointly with the domain discriminator to produce domain-invariant representations . Li et al . ( 2020 ) disentangle a latent representation into a global code and a local code . The global code captures category information via an encoder with a prior , and the local code is transferable across domains , which captures the style-related information via an implicit decoder . Bousmalis et al . ( 2016 ) also produce domain-invariant features by training a shared encoder to fool a domain discriminator . They train two domain-private encoders with a difference loss that encourages orthogonality between the shared and the private representations ( similarly to condition C3 ) . Cao et al . ( 2018 ) ; Cai et al . ( 2019 ) ; Peng et al . ( 2019 ) combine a domain discriminator with an adversarial classifier to separate the information shared between domains from the domain-specific information . All these methods build a shared representation that prevents discriminating between source and target domains , while retaining enough information to correctly label samples from the source domain . However , because they rely on an adversarial classifier that requires labeled data , they do not guarantee that the complimentary , domain-specific information for samples in the target domain does not contain information that overlaps with the shared representation . In other words , they only enforce C3 in the source domain . They rely on the assumption that the disentanglement will still hold when applied on target domain elements , which might not be true . Another identified weakness in methods that achieve a domain-invariant feature space is that their representations might not allow for accurate labeling in the target domain . Indeed , feature alignment does not necessarily imply a correct mapping between domains . To illustrate this point , consider a binary classification problem ( classes c1 and c2 ) and two domains ( d1 and d2 ) . Let ( c1 , d1 ) denote samples of class c1 in d1 . It is possible to construct an encoding that projects ( c1 , d1 ) and ( c2 , d2 ) to the same feature values . The same holds for ( c1 , d2 ) and ( c2 , d1 ) for different feature values . This encoding allows discriminating between classes in d1 . It also fools a domain discriminator since it does not allow predicting the original domain of a projected element . However , applying the classification function learned on d1 to the projected d2 elements leads to catastrophic predictions . Transforming a sample from one domain to the other , while retaining its label information can be accomplished by image-to-image translation methods . Hoffman et al . ( 2018 ) extend CycleGAN ’ s cycle consistency ( Zhu et al. , 2017 ) with a semantic consistency to translate from source to target domains . The translated images from the source domain to the target domain are then used to train a classifier on the target domain using the source labels . Similarly , Russo et al . ( 2018 ) train two conditional GANs ( Mirza & Osindero , 2014 ) to learn bi-directional image mappings constrained by a class consistency loss and use a source domain classifier to produce pseudo-labels on source-like transformed target samples . By relaxing CycleGAN ’ s cycle consistency constraint and integrating the discriminator in the training phase , Hosseini-Asl et al . ( 2019 ) address the DA problem in the specific setting where the number of target samples is limited . Takahashi et al . ( 2020 ) use a CycleGAN to generate cross-domain pseudo-pairs and train two domain-specific encoders to align features extracted from each pseudo-pair in the feature space . A major asset of the method is to address the class-unbalanced UDA problem by oversampling with the learned data augmentation . Yang et al . ( 2019 ) use separate encoders to produce domain-invariant and domain-specific features in both domains . They jointly train these encoders with two generators to produce cross-domain elements able to fool domain-specific discriminators . Using a cyclic loss on features , they force the information contained in the representation to be preserved during the generation of cross-domain elements . However , the cyclic loss on features does not prevent the information sharing between features expressed in C3 . More importantly it does not prevent the domain-specific features to be constant . A major drawback of these methods lies in the instability during training that might be caused by min-max optimization problem induced by the adversarial training of generators and discriminators . In the next section , we introduce a method that does not rely on a domain discriminator and an adversarial label predictor , but directly minimizes the information sharing between representations . This allows to guarantee that there is no information redundancy between the task-related and the task-orthogonal style information in both the source and the target domains . Along the way , it provides an efficient mechanism to disentangle the task-related information from the style information in the single domain case . Our method combines information disentanglement , intra-domain and cross-domain cyclic consistency to enforce a more principled mapping between each domain . | This paper proposes a new framework for unsupervised domain adaptation by applying the disentangled representations learning (DiCyR). The core idea of DiCyR is to split the raw feature into the task-related one and its complimentary context where the task-related representations are projected into a shared space for alignment. From my point of view, disentangled representations learning is the most interesting part of this work. | SP:d02cf08c6b78934d9bceb1fced353db460da192b |
Efficient Conformal Prediction via Cascaded Inference with Expanded Admission | 1 INTRODUCTION . The ability to provide precise performance guarantees is critical to many classification tasks ( Amodei et al. , 2016 ; Jiang et al. , 2012 ; 2018 ) . Yet , achieving perfect accuracy with only single guesses is often out of reach due to noise , limited data , insufficient modeling capacity , or other pitfalls . Nevertheless , in many applications , it can be more feasible and ultimately as useful to hedge predictions by having the classifier return a set of plausible options—one of which is likely to be correct . Consider the example of information retrieval ( IR ) for fact verification . Here the goal is to retrieve a snippet of text of some granularity ( e.g. , a sentence , paragraph , or article ) that can be used to verify a given claim . Large resources , such as Wikipedia , can contain millions of candidate snippets—many of which may independently be able to serve as viable evidence . A good retriever should make precise snippet suggestions , quickly—but do so without excessively sacrificing sensitivity ( i.e. , recall ) . Conformal prediction ( CP ) is a methodology for placing exactly that sort of bet on which candidates to retain ( Vovk et al. , 2005 ) . Concretely , suppose we have been given n examples , ( Xi , Yi ) ∈ X ×Y , i = 1 , . . . , n , as training data , that have been drawn exchangeably from an underlying distribution P . For instance , in our IR setting , X would be the claim in question , Y a viable piece of evidence that supports or refutes it , and Y a large corpus ( e.g. , Wikipedia ) . Next , let Xn+1 be a new exchangeable test example ( e.g. , a new claim to verify ) for which we would like to predict the paired y ∈ Y . The aim of conformal prediction is to construct a set of candidates Cn ( Xn+1 ) likely to contain Yn+1 ( e.g. , the relevant evidence ) with distribution-free marginal coverage at a tolerance level ∈ ( 0 , 1 ) : P ( Yn+1 ∈ Cn ( Xn+1 ) ) ≥ 1− ; for all distributions P. ( 1 ) The marginal probability above is taken over all the n+ 1 calibration and test points { ( Xi , Yi ) } n+1i=1 . A classifier is considered to be valid if the frequency of error , Yn+1 6∈ Cn ( Xn+1 ) , does not exceed . In our IR setting , this would mean including the correct snippet at least -fraction of the time . Not all valid classifiers , however , are particularly useful ( e.g. , a trivial classifier that merely returns all ∗Equal contribution ( author order decided randomly ) . 1Our code is available at https : //github.com/ajfisch/conformal-cascades . possible outputs ) . A classifier is considered to have good predictive efficiency if E [ |Cn ( Xn+1 ) | ] is small ( i.e. , |Y| ) . In our IR setting , this would mean not returning too many irrelevant articles—or in IR terms , maximizing precision while holding the level of recall at ≥ 1− ( assuming Y is a single answer ) . In practice , in domains where the number of outputs to choose from is large and the “ correct ” one is not necessarily unique , classifiers derived using conformal prediction can suffer dramatically from both poor predictive and computational efficiency ( Burnaev and Vovk , 2014 ; Vovk et al. , 2016 ; 2020 ) . Unfortunately , these two conditions tend to be compounding : large label spaces Y both ( 1 ) often place strict constraints on the set of tractable model classes available for consideration , and ( 2 ) frequently contain multiple clusters of labels that are difficult to discriminate between , especially for a low-capacity classifier . In this paper , we present two effective methods for improving the efficiency of conformal prediction for classification tasks with large output spaces Y , in which several y ∈ Y might be admissible—i.e. , acceptable for the purposes of our given task . First , in Section 4 we describe a generalization of Eq . 1 to an expanded admission criteria , where Cn ( Xn+1 ) is considered valid if it contains at least one admissible y with high probability . For example , in our IR setting , given the claim “ Michael Collins took part in the Apollo mission to the moon , ” any of the articles “ Apollo 11 , ” “ Michael Collins ( astronaut ) , ” or “ Apollo 11 ( 2019 film ) ” have enough information to independently support it ( see Figure 1 ) —and are therefore all admissible . When Yn+1 is not unique , forcing the classifier to hedge for the worst case , in which a specific realization of Yn+1 must be contained in Cn ( Xn+1 ) , is too strict and can lead to conservative predictions . We theoretically and empirically show that optimizing for an expanded admission criteria yields classifiers with significantly better predictive efficiency . Second , in Section 5 we present a technique for conformalizing prediction cascades to progressively filter the number of candidates with a sequence of increasingly complex classifiers . This allows us to balance predictive efficiency with computational efficiency during inference . Importantly , we also theoretically show that , in contrast to other similarly motivated pipelines , our method filters the output space in a manner that still guarantees marginal coverage . Figure 1 illustrates our combined approach . We demonstrate that , together , these two approaches serve as complementary pieces of the puzzle towards making CP more efficient . We empirically validate our approach on information retrieval for fact verification , open-domain question answering , and in-silico screening for drug discovery . Contributions . In summary , our main results are as follows : • A theoretical extension of validity ( Eq . 1 ) to allow for inferred admissible answers . • A principled framework for conformalizing computationally efficient prediction cascades . • Consistent empirical gains on three diverse tasks demonstrating up to 4.6× better predictive efficiency AUC ( measured across all ) when calibrating for expanded admission , with computation pruning factors of up to 1/m , where m is the number of models , when using prediction cascades . 2 RELATED WORK . Confident prediction . Methods for obtaining precise uncertainty estimates have received intense interest in recent years . A significant body of work is concerned with calibrating model confidence— measured as pθ ( ŷn+1|xn+1 ) —such that the true accuracy , yn+1 = ŷn+1 , is indeed equal to the estimated probability ( Niculescu-Mizil and Caruana , 2005 ; Gal and Ghahramani , 2016 ; Lakshminarayanan et al. , 2017 ; Lee et al. , 2018 ) . In theory , these estimates could be leveraged to create confident prediction sets Cn ( Xn+1 ) . Unlike CP , however , these methods are not guaranteed to be accurate , and often still suffer from miscalibration in practice—especially for modern neural networks ( Guo et al. , 2017 ; Ashukha et al. , 2020 ; Hirschfeld et al. , 2020 ) . Selective classification ( ElYaniv and Wiener , 2010 ; Geifman and El-Yaniv , 2017 ) , where models have the option to abstain from answering when not confident , is similar in motivation to Eq . 1 . In fact , it can be considered as a special case in which the classifier chooses to abstain unless |Cn ( Xn+1 ) | = 1 . Conformal prediction . As validity is already guaranteed by design in conformal prediction , most efforts in CP focus on improving various aspects of efficiency . Mondrian CP ( Vovk et al. , 2005 ) accounts for the fact that some classes are harder to model than others , and leverages class-conditional statistics . Similiarly , several recent studies have built towards conditional—as opposed to marginal— coverage through various adaptive approaches , such as conformalizing quantile functions or working with conditional distributions that vary with x ( see Cauchois et al. , 2020 ; Chernozhukov et al. , 2019 ; Kivaranovic et al. , 2020 ; Romano et al. , 2019 ; 2020 , inter alia ) . Cauchois et al . ( 2020 ) also directly model dependencies among y variables for use in multi-label prediction . Our method for expanded admission , on the other hand , aggregates statistics for equivalent single labels by example and across classes . Though we only provide marginal guarantees , the ideas expressed in those related works are complementary , and can be applied here as well . Inductive CP ( Papadopoulos , 2008 ) is also complementary extension that dramatically reduces the cost of computing Cn ( Xn+1 ) in the general case ; we make use of it here . Most similar to our work , trimmed ( Chen et al. , 2016 ) and discretized ( Chen et al. , 2018 ) CP trade predictive efficiency for computational efficiency in regression tasks , where the label space is infinite . A key distinction of our method is that we do not force the same trade-off : in fact , we empirically show that our conformalized cascades can at times result in better predictive efficiency alongside a pruned label space . Prediction cascades . The idea of balancing cost with accuracy by using multi-step inference has been explored extensively for many applications ( Charniak et al. , 2006 ; Deng and Rush , 2020 ; Fleuret and Geman , 2001 ; Jurafsky and Martin , 2000 ; Li et al. , 2015 ; Rush and Petrov , 2012 ) . Some of these methods use fixed rules with no performance guarantees , such as greedy pipelines where the top k predictions are passed on to the next level ( Chen et al. , 2017 ; Ferrucci et al. , 2010 ) . Closer to our work , Weiss and Taskar ( 2010 ) optimize their cascades for overall pruning efficiency , and not for top-1 prediction . While they also analyze error bounds for filtering , their guarantees are specific to linear classifiers with bounded L2 norm , whereas our conformalized approach only assumes data exchangeability . Furthermore , they assume a target filtering loss before training—our tolerance level is defined at test time , which allows for much greater flexibility . 3 BACKGROUND . We begin with a brief review of conformal prediction ( see Shafer and Vovk , 2008 ) . Here , and in the rest of the paper , upper-case letters ( X ) denote random variables ; lower-case letters ( x ) denote scalars , and script letters ( X ) denote sets , unless otherwise specified . Proofs are deferred to the appendix . At the core of conformal prediction is a simple statistical hypothesis test : for each candidate y ∈ Y we must either accept or reject the null hypothesis that ( Xn+1 = xn+1 , Yn+1 = y ) is a correct pairing . Formally , we rely on a nonconformity measure S ( ( xn+1 , y ) , D ) to serve as the test statistic , where a higher value of S reflects that ( xn+1 , y ) is less “ conforming ” to the distribution specified by dataset D. For instance , S could be computed as − log pθ ( y|x ) , where θ is a model fit to D. Definition 3.1 ( Nonconformity measure ) . Let Z : = X ×Y be the space of examples ( X , Y ) , and let Z ( ∗ ) : = ⋃ d≥1 ( X ×Y ) d be the space of datasets of examples D , of any size d ≥ 1 . A nonconformity measure S is then a measurable mapping S : Z × Z ( ∗ ) → R , that assigns a real-valued score to any example ( X , Y ) , indicating how different2 it is from a reference dataset D. Furthermore , in order to retain exchangeability , S is symmetric with respect to permutations of its input data . To be specific , exact or full CP takes D to be all of the examples seen so far , including the candidate ( xn+1 , y ) . Thus , the nonconformity measure S has to be re-trained each time . An alternative—which 2The definition of “ different ” here is intentionally vague , as any metric will technically work . we use in this paper w.l.o.g.—is the inductive or split CP variant ( Papadopoulos , 2008 ) which assumes that D is a proper training set , independent of any of the subsequent n+ 1 exchangeable examples used for CP . Dropping D for ease of notation , we denote the score for example ( X , Y ) as the random variable S ( X , Y ) . The degree of nonconformity can then be quantified using a p-value . Lemma 3.2 ( Smoothed p-value ) . Assume that the random variables V1 , . . . , Vn+1 are exchangeable . We define the smoothed empirical p-value pvalue ( Vn+1 , V1 : n ) as pvalue ( Vn+1 , V1 : n ) : = | { i ∈ [ 1 , n ] : Vi > Vn+1 } |+ τ · | { i ∈ [ 1 , n ] : Vi = Vn+1 } |+ 1 n+ 1 , ( 2 ) where τ ∼ U ( 0 , 1 ) . Then , for any ∈ ( 0 , 1 ) , we have P ( pvalue ( Vn+1 , V1 : n ) ≤ ) ≤ . To construct the final conformal prediction , the classifier uses the p-values to include all y for which the null hypothesis—i.e. , that the candidate pair ( xn+1 , y ) is conformal—is not rejected . Theorem 3.3 ( CP ; Vovk et al . ( 2005 ) , see also Lei et al . ( 2018 ) ) . Assume that the random variables ( Xi , Yi ) ∈ X × Y , i = 1 , . . . , n + 1 are exchangeable . For any nonconformity measure S , and ∈ ( 0 , 1 ) , define the conformal label set ( based on the first n samples ) at xn+1 ∈ X as Cn ( xn+1 ) : = { y ∈ Y : pvalue ( S ( xn+1 , y ) , S ( x1 : n , y1 : n ) ) > } . ( 3 ) Then Cn ( Xn+1 ) satisfies Eq . 1 , where P ( Yn+1 ∈ Cn ( Xn+1 ) ) ≥ 1− . | This paper presents two advances in conformal prediction, a field with information retrieval applications in which a set of candidate responses to a query is presented and the objective is to return a small set of responses with at least one of the responses being the correct response. The first contribution is a method in which the possibility of several admissible responses is modeled (rather than there being just one response) with the system being calibrated against the odds that a particular response is the "most admissible", i.e. most conforming to the joint query/response distribution being learned from data. The second contribution is a cascaded prediction system in which simpler and less computationally expensive models are used for initial filtering and then more sophisticated and more expensive models are used downstream to further refine the response set. Rigorous statistical adjustments are used to account for multiple-hypothesis-test issues arising from using the cascading system. | SP:c895519de92206da36297207d000246430963b08 |
Efficient Conformal Prediction via Cascaded Inference with Expanded Admission | 1 INTRODUCTION . The ability to provide precise performance guarantees is critical to many classification tasks ( Amodei et al. , 2016 ; Jiang et al. , 2012 ; 2018 ) . Yet , achieving perfect accuracy with only single guesses is often out of reach due to noise , limited data , insufficient modeling capacity , or other pitfalls . Nevertheless , in many applications , it can be more feasible and ultimately as useful to hedge predictions by having the classifier return a set of plausible options—one of which is likely to be correct . Consider the example of information retrieval ( IR ) for fact verification . Here the goal is to retrieve a snippet of text of some granularity ( e.g. , a sentence , paragraph , or article ) that can be used to verify a given claim . Large resources , such as Wikipedia , can contain millions of candidate snippets—many of which may independently be able to serve as viable evidence . A good retriever should make precise snippet suggestions , quickly—but do so without excessively sacrificing sensitivity ( i.e. , recall ) . Conformal prediction ( CP ) is a methodology for placing exactly that sort of bet on which candidates to retain ( Vovk et al. , 2005 ) . Concretely , suppose we have been given n examples , ( Xi , Yi ) ∈ X ×Y , i = 1 , . . . , n , as training data , that have been drawn exchangeably from an underlying distribution P . For instance , in our IR setting , X would be the claim in question , Y a viable piece of evidence that supports or refutes it , and Y a large corpus ( e.g. , Wikipedia ) . Next , let Xn+1 be a new exchangeable test example ( e.g. , a new claim to verify ) for which we would like to predict the paired y ∈ Y . The aim of conformal prediction is to construct a set of candidates Cn ( Xn+1 ) likely to contain Yn+1 ( e.g. , the relevant evidence ) with distribution-free marginal coverage at a tolerance level ∈ ( 0 , 1 ) : P ( Yn+1 ∈ Cn ( Xn+1 ) ) ≥ 1− ; for all distributions P. ( 1 ) The marginal probability above is taken over all the n+ 1 calibration and test points { ( Xi , Yi ) } n+1i=1 . A classifier is considered to be valid if the frequency of error , Yn+1 6∈ Cn ( Xn+1 ) , does not exceed . In our IR setting , this would mean including the correct snippet at least -fraction of the time . Not all valid classifiers , however , are particularly useful ( e.g. , a trivial classifier that merely returns all ∗Equal contribution ( author order decided randomly ) . 1Our code is available at https : //github.com/ajfisch/conformal-cascades . possible outputs ) . A classifier is considered to have good predictive efficiency if E [ |Cn ( Xn+1 ) | ] is small ( i.e. , |Y| ) . In our IR setting , this would mean not returning too many irrelevant articles—or in IR terms , maximizing precision while holding the level of recall at ≥ 1− ( assuming Y is a single answer ) . In practice , in domains where the number of outputs to choose from is large and the “ correct ” one is not necessarily unique , classifiers derived using conformal prediction can suffer dramatically from both poor predictive and computational efficiency ( Burnaev and Vovk , 2014 ; Vovk et al. , 2016 ; 2020 ) . Unfortunately , these two conditions tend to be compounding : large label spaces Y both ( 1 ) often place strict constraints on the set of tractable model classes available for consideration , and ( 2 ) frequently contain multiple clusters of labels that are difficult to discriminate between , especially for a low-capacity classifier . In this paper , we present two effective methods for improving the efficiency of conformal prediction for classification tasks with large output spaces Y , in which several y ∈ Y might be admissible—i.e. , acceptable for the purposes of our given task . First , in Section 4 we describe a generalization of Eq . 1 to an expanded admission criteria , where Cn ( Xn+1 ) is considered valid if it contains at least one admissible y with high probability . For example , in our IR setting , given the claim “ Michael Collins took part in the Apollo mission to the moon , ” any of the articles “ Apollo 11 , ” “ Michael Collins ( astronaut ) , ” or “ Apollo 11 ( 2019 film ) ” have enough information to independently support it ( see Figure 1 ) —and are therefore all admissible . When Yn+1 is not unique , forcing the classifier to hedge for the worst case , in which a specific realization of Yn+1 must be contained in Cn ( Xn+1 ) , is too strict and can lead to conservative predictions . We theoretically and empirically show that optimizing for an expanded admission criteria yields classifiers with significantly better predictive efficiency . Second , in Section 5 we present a technique for conformalizing prediction cascades to progressively filter the number of candidates with a sequence of increasingly complex classifiers . This allows us to balance predictive efficiency with computational efficiency during inference . Importantly , we also theoretically show that , in contrast to other similarly motivated pipelines , our method filters the output space in a manner that still guarantees marginal coverage . Figure 1 illustrates our combined approach . We demonstrate that , together , these two approaches serve as complementary pieces of the puzzle towards making CP more efficient . We empirically validate our approach on information retrieval for fact verification , open-domain question answering , and in-silico screening for drug discovery . Contributions . In summary , our main results are as follows : • A theoretical extension of validity ( Eq . 1 ) to allow for inferred admissible answers . • A principled framework for conformalizing computationally efficient prediction cascades . • Consistent empirical gains on three diverse tasks demonstrating up to 4.6× better predictive efficiency AUC ( measured across all ) when calibrating for expanded admission , with computation pruning factors of up to 1/m , where m is the number of models , when using prediction cascades . 2 RELATED WORK . Confident prediction . Methods for obtaining precise uncertainty estimates have received intense interest in recent years . A significant body of work is concerned with calibrating model confidence— measured as pθ ( ŷn+1|xn+1 ) —such that the true accuracy , yn+1 = ŷn+1 , is indeed equal to the estimated probability ( Niculescu-Mizil and Caruana , 2005 ; Gal and Ghahramani , 2016 ; Lakshminarayanan et al. , 2017 ; Lee et al. , 2018 ) . In theory , these estimates could be leveraged to create confident prediction sets Cn ( Xn+1 ) . Unlike CP , however , these methods are not guaranteed to be accurate , and often still suffer from miscalibration in practice—especially for modern neural networks ( Guo et al. , 2017 ; Ashukha et al. , 2020 ; Hirschfeld et al. , 2020 ) . Selective classification ( ElYaniv and Wiener , 2010 ; Geifman and El-Yaniv , 2017 ) , where models have the option to abstain from answering when not confident , is similar in motivation to Eq . 1 . In fact , it can be considered as a special case in which the classifier chooses to abstain unless |Cn ( Xn+1 ) | = 1 . Conformal prediction . As validity is already guaranteed by design in conformal prediction , most efforts in CP focus on improving various aspects of efficiency . Mondrian CP ( Vovk et al. , 2005 ) accounts for the fact that some classes are harder to model than others , and leverages class-conditional statistics . Similiarly , several recent studies have built towards conditional—as opposed to marginal— coverage through various adaptive approaches , such as conformalizing quantile functions or working with conditional distributions that vary with x ( see Cauchois et al. , 2020 ; Chernozhukov et al. , 2019 ; Kivaranovic et al. , 2020 ; Romano et al. , 2019 ; 2020 , inter alia ) . Cauchois et al . ( 2020 ) also directly model dependencies among y variables for use in multi-label prediction . Our method for expanded admission , on the other hand , aggregates statistics for equivalent single labels by example and across classes . Though we only provide marginal guarantees , the ideas expressed in those related works are complementary , and can be applied here as well . Inductive CP ( Papadopoulos , 2008 ) is also complementary extension that dramatically reduces the cost of computing Cn ( Xn+1 ) in the general case ; we make use of it here . Most similar to our work , trimmed ( Chen et al. , 2016 ) and discretized ( Chen et al. , 2018 ) CP trade predictive efficiency for computational efficiency in regression tasks , where the label space is infinite . A key distinction of our method is that we do not force the same trade-off : in fact , we empirically show that our conformalized cascades can at times result in better predictive efficiency alongside a pruned label space . Prediction cascades . The idea of balancing cost with accuracy by using multi-step inference has been explored extensively for many applications ( Charniak et al. , 2006 ; Deng and Rush , 2020 ; Fleuret and Geman , 2001 ; Jurafsky and Martin , 2000 ; Li et al. , 2015 ; Rush and Petrov , 2012 ) . Some of these methods use fixed rules with no performance guarantees , such as greedy pipelines where the top k predictions are passed on to the next level ( Chen et al. , 2017 ; Ferrucci et al. , 2010 ) . Closer to our work , Weiss and Taskar ( 2010 ) optimize their cascades for overall pruning efficiency , and not for top-1 prediction . While they also analyze error bounds for filtering , their guarantees are specific to linear classifiers with bounded L2 norm , whereas our conformalized approach only assumes data exchangeability . Furthermore , they assume a target filtering loss before training—our tolerance level is defined at test time , which allows for much greater flexibility . 3 BACKGROUND . We begin with a brief review of conformal prediction ( see Shafer and Vovk , 2008 ) . Here , and in the rest of the paper , upper-case letters ( X ) denote random variables ; lower-case letters ( x ) denote scalars , and script letters ( X ) denote sets , unless otherwise specified . Proofs are deferred to the appendix . At the core of conformal prediction is a simple statistical hypothesis test : for each candidate y ∈ Y we must either accept or reject the null hypothesis that ( Xn+1 = xn+1 , Yn+1 = y ) is a correct pairing . Formally , we rely on a nonconformity measure S ( ( xn+1 , y ) , D ) to serve as the test statistic , where a higher value of S reflects that ( xn+1 , y ) is less “ conforming ” to the distribution specified by dataset D. For instance , S could be computed as − log pθ ( y|x ) , where θ is a model fit to D. Definition 3.1 ( Nonconformity measure ) . Let Z : = X ×Y be the space of examples ( X , Y ) , and let Z ( ∗ ) : = ⋃ d≥1 ( X ×Y ) d be the space of datasets of examples D , of any size d ≥ 1 . A nonconformity measure S is then a measurable mapping S : Z × Z ( ∗ ) → R , that assigns a real-valued score to any example ( X , Y ) , indicating how different2 it is from a reference dataset D. Furthermore , in order to retain exchangeability , S is symmetric with respect to permutations of its input data . To be specific , exact or full CP takes D to be all of the examples seen so far , including the candidate ( xn+1 , y ) . Thus , the nonconformity measure S has to be re-trained each time . An alternative—which 2The definition of “ different ” here is intentionally vague , as any metric will technically work . we use in this paper w.l.o.g.—is the inductive or split CP variant ( Papadopoulos , 2008 ) which assumes that D is a proper training set , independent of any of the subsequent n+ 1 exchangeable examples used for CP . Dropping D for ease of notation , we denote the score for example ( X , Y ) as the random variable S ( X , Y ) . The degree of nonconformity can then be quantified using a p-value . Lemma 3.2 ( Smoothed p-value ) . Assume that the random variables V1 , . . . , Vn+1 are exchangeable . We define the smoothed empirical p-value pvalue ( Vn+1 , V1 : n ) as pvalue ( Vn+1 , V1 : n ) : = | { i ∈ [ 1 , n ] : Vi > Vn+1 } |+ τ · | { i ∈ [ 1 , n ] : Vi = Vn+1 } |+ 1 n+ 1 , ( 2 ) where τ ∼ U ( 0 , 1 ) . Then , for any ∈ ( 0 , 1 ) , we have P ( pvalue ( Vn+1 , V1 : n ) ≤ ) ≤ . To construct the final conformal prediction , the classifier uses the p-values to include all y for which the null hypothesis—i.e. , that the candidate pair ( xn+1 , y ) is conformal—is not rejected . Theorem 3.3 ( CP ; Vovk et al . ( 2005 ) , see also Lei et al . ( 2018 ) ) . Assume that the random variables ( Xi , Yi ) ∈ X × Y , i = 1 , . . . , n + 1 are exchangeable . For any nonconformity measure S , and ∈ ( 0 , 1 ) , define the conformal label set ( based on the first n samples ) at xn+1 ∈ X as Cn ( xn+1 ) : = { y ∈ Y : pvalue ( S ( xn+1 , y ) , S ( x1 : n , y1 : n ) ) > } . ( 3 ) Then Cn ( Xn+1 ) satisfies Eq . 1 , where P ( Yn+1 ∈ Cn ( Xn+1 ) ) ≥ 1− . | Conformal prediction (CP) allows for the selection of a set of candidate answers guaranteed to contain the correct answer with some probability. The authors propose two extensions to CP, 1. To extend validity for all admissible answers, 2. Using prediction cascades to improve computational efficiency. The authors show that their approaches provide similar guarantees on accuracy like CP but with lowered predictive efficiency and computational cost. | SP:c895519de92206da36297207d000246430963b08 |
On the Importance of Distraction-Robust Representations for Robot Learning | 1 INTRODUCTION . Representation Learning techniques form an integral part in many Reinforcement Learning ( RL ) robot control applications ( Lesort et al. , 2018 ) . Utilising low-dimensional representations can allow for a faster and more efficient learning of tasks than when using high-dimensional sensor information ( Munk et al. , 2016 ) . This is particularly useful in vision-based learning when high-dimensional images of the robot ’ s environment are the principal source of information available to the learning algorithm ( Zhu et al. , 2020 ) . Most commonly , representations are learned by applying dimensionality reduction techniques such as Autoencoders ( AEs ) ( Hinton & Salakhutdinov , 2006 ) or Variational Autoencoders ( VAEs ) ( Kingma & Welling , 2014 ) to the robot ’ s sensory data ( Lange et al. , 2012 ; Zhu et al. , 2020 ) . Generally , an AE consists of two Neural Networks , an Encoder E and a Decoder D. The Encoder attempts to condense all available information in the input data x into a latent representation z from which a reconstruction of the inputs D ( E ( x ) ) is generated by the Decoder . When the dimensionality of the representation is smaller than that of the input data , some information is lost when creating the representations . An AE is typically trained to shrink the magnitude of this information loss by minimising a reconstruction error . This error is commonly given by the squared norm of differences , LAE = ||x−D ( E ( x ) ) ||22 . ( 1 ) However , the optimisation of the reconstruction error in Eq . 1 does not necessarily result in the generation of representations that are optimal for the use in robot learning algorithms . For example , an accurate reconstruction of the decorative patterns on a dinner plate is less important than the plate ’ s dimensions to a robot learning to place it into a cabinet . It can therefore be desirable to control which aspects of the information contained in the inputs are most critical to be preserved in the representations . For instance , Pathak et al . ( 2017 ) design a Neural Network that learns representations from visual inputs by using them to predict the action taken by the RL agent in its state transition . By asking the network to predict the action , the authors eliminate the requirement for the representations to retain any state information that is unrelated to the agent ’ s behaviour . A focus on the learned representations ’ preservation of task-relevant information becomes even more crucial in the presence of distracting influences ( DIs ) in the environment . These DIs can materialise in the presence of additional environment objects which exhibit dynamics that are not only uncorrelated with the robot ’ s behaviour but additionally misleading . For instance , a robot that is learning to move objects to different positions in a room can find the observation of a moving autonomous vacuum cleaner misleading . Alternatively , DIs can impact the dynamics of existing objects in the room . For instance , after the robot has moved a box to a certain position in the room , further movements of the box due to external forces can be distracting to the robot ’ s learning process . In this paper , we introduce the concept of Distraction-Robust Representation Learning . We investigate the learning outcomes of robot control tasks when DIs are present in the environment . We show that in the presence of DIs , representations learned exclusively from environment observations can mislead the robot ’ s perceptions of its control over the environment . This finding demonstrates that Distraction-Robust Representation Learning needs to be afforded increased attention . In particular , works in the strand of research that aim to make RL algorithms more applicable to real-world scenarios largely concentrate on improving algorithm attributes such as the data efficiency ( Zhu et al. , 2020 ) . However , few works acknowledge the challenges posed by the inherently stochastic nature of real-world environments and the presence of DIs ( Forestier et al. , 2017 ) . Furthermore , we introduce a Robot Action Encoder-Decoder architecture ( RAED ) which successfully produces representations that are robust to DIs in the environment . RAED follows the simple but effective approach of using only the values that parameterise the robot ’ s actions as the input to the Encoder . Such a set of parameters defines a robot controller for instance . The representations produced by the Encoder are used by RAED ’ s Decoder to generate predictions of the environment observations . RAED ’ s design allows for static environment elements to be learned by the Decoder while concentrating the information in the representations on the observable consequences of the robot ’ s behaviour . Moreover , when environment observations are distorted by the presence of DIs , RAED produces representations that capture the expected consequences of the robot ’ s environment interactions . This is not the case when training representation learning methods such as AEs to reconstruct the full content of the robot ’ s visual perceptions . We can therefore draw some parallels between RAED ’ s design and the concept of a forward model ( Jordan & Rumelhart , 1992 ) . Given the simplicity of the approach , we expect the applicability of RAED to generalise to various different learning algorithms . 2 RELATED WORK . Several works have investigated mechanisms to preserve only task-relevant information in learned representations . Pathak et al . ( 2017 ) propose a Neural Network architecture that learns representations of visual inputs by predicting the action taken by the RL agent in its state transition . This design allows the representations to dedicate their information capacity to the observable consequences of the robot ’ s actions . Finn et al . ( 2016 ) propose a spatial AE to learn representations that aim to preserve only the configuration of objects in the environment rather than all aspects of the information contained in the camera images . However , in both approaches , the representations are learned from visual inputs which will be distorted if DIs are present in the environment . Without an explicit correction mechanism , these representation learning techniques therefore remain susceptible to distractions . The concept of affordance learning formulates a similar goal in discovering the consequences of the robot ’ s actions on its environment ( Cakmak et al. , 2007 ; Şahin et al. , 2007 ) . However , the works in this strand of research rarely consider the problem of DIs in the environment . Instead , they mainly concentrate on the robot ’ s ability to infer how an object in the environment would behave in response to its actions when no prior interaction experience with that particular object is available ( Dehban et al. , 2016 ; Mar et al. , 2015 ) . A work that uses learned representations and investigates robot interactions in the presence of DIs is presented in the Intrinsically Motivated Goal Exploration Processes ( IMGEP , Laversanne-Finot et al . ( 2018 ) ) . IMGEP aims to enable robots to explore the possible interactions with various tools in an environment that also features distractor objects . These objects either can not be interacted with or move independently of the robot . The authors show that a variant of their proposed algorithm remains unaffected by the presence of these distractors . This robustness is demonstrated by the robot ’ s lack of interaction with the distractor objects . However , the DIs we consider in this paper pose an arguably larger challenge for two main reasons . First , we evaluate distractor objects which exhibit dynamics that are not only independent of the robot ’ s behaviour but also misleading to the robot ’ s perceptions of its interactions with the actual objects of interest . For instance , a distractor object can collide with one of the objects manipulated by the robot . Second , we consider the case of misleading external DIs on the interesting objects themselves . In this case , the object interaction can not be avoided . Furthermore , in IMGEP the distractor robustness is not learned by the VAE that generates the representations . Instead , the algorithm identifies the components in the representations that correspond to the distractors during the robot ’ s interaction phase . Indeed , the learned representations remain static in this phase as the VAE is pre-trained on a manually generated dataset that covers all possible environment observations by spawning the various environment objects , including the distractors , in different positions . Alternative exploration-based approaches have been proposed recently ( Forestier et al. , 2017 ; Pathak et al. , 2017 ; Eysenbach et al. , 2019 ; Sharma et al. , 2019 ) . A particularly interesting framework is presented in AURORA ( Cully , 2019 ) , which we use in our experimental evaluations . Instead of decoupling the representation learning phase from the interaction phase as done in IMGEP , AURORA proposes a joint approach to discover a diverse set of behaviours of any robot in any given environment without the need to specify a task objective or reward function . More precisely , AURORA applies a dimensionality reduction algorithm such as an AE to the robot ’ s sensory data that are collected during the execution of the discovered controllers . The learned latent representation associated to a controller ’ s collected sensory data defines the Behavioural Descriptor ( BD ) for this controller . By measuring the distance between different controllers ’ BDs , the novelty of a given behaviour can be determined . The BD can therefore be used to build a collection of controllers that each exhibit different behaviours . AURORA uses this collection to further explore the space of possible behaviours via stochastic mutations , and continuously adds additional novel controllers to the collection . Periodically , the AE is trained using the sensory data that are extracted from all controllers in the collection . The AURORA framework is well-suited to judge the impact of DIs on the learned representations . Indeed , AURORA ’ s decision to accept newly generated controllers into the collection is exclusively based on the distance between their BDs . We can therefore analyse the influence of DIs using metrics that are formulated directly in the latent representation space . These metrics are more sensitive to the impact of DIs than measures of the overall learning outcomes . This is because the learning outcomes are typically also influenced by components of the learning algorithm other than the representations . Furthermore , AURORA ’ s training of the dimensionality reduction technique provides a particularly challenging setting for RAED . The training dataset composition is continually evolving as the data is collected online . Additionally , AURORA rejects controllers that generate behaviours very similar to that of existing controllers . This complexifies the task of learning the expected consequences of the robot ’ s actions when the collected environment observations are distorted by DIs . 3 METHOD . In this work , we use a single vector a to parameterise the set of actions taken by the robot from the beginning until the end of the simulation . This vector of the robot ’ s actions can store the parameter values of a controller for instance . We use a vector x to parameterise the single environment observation that is returned by each simulation . This vector can store the pixel values of an image for example . RAED consists of an Encoder-Decoder structure that uses a and x to produce a representation z that is distraction-robust . More precisely , the latent representation z is generated from RAED ’ s Encoder networkE which takes the robot ’ s actions a as its inputs . This conditioning of the representations on the robot ’ s actions is the crucial element in RAED ’ s design . The Decoder uses the representations to produce a prediction of the environment observation D ( E ( a ) ) . The actual environment observation x is used as the prediction target in the training of RAED . This yields the prediction error given in Eq . 2 . Note , the difference in the Encoder input compared to an AE ’ s reconstruction error in Eq . 1 . C = ||x−D ( E ( a ) ) ||22 . ( 2 ) Depending on the specifics of the robot design and the task , a set of controllers with different parameters can yield the same observed behaviour . For instance , when steering a robot arm with redundancies in its joints , different controllers can achieve the same position in a gripper connected to the arm . For such a set of controllers , it is possible that the differences in their parameters lead to the generation of different representations when using RAED , even if the observation predictions are exactly the same . This is less likely to occur in a dimensionality reduction technique that takes the visual perceptions as its inputs . For these methods , the principal sources of variation in the representations are the differences in the observations rather than the differences in the robot ’ s actions . To reduce RAED ’ s freedom to disperse the representations of similar observed behaviours , we investigate the addition of a penalty term P . The overall training loss is then given by LRAED = C+P . One possible instantiation of P is the Kullback-Leibler divergence ( KL ) term used in a VAE ( Kingma & Welling , 2014 ) . This KL term implicitly imposes a penalty on the magnitude of the means produced by the VAE ’ s Encoder network . The consequence is a crowding of the representations into a smaller latent subspace . This can have the desired effect of reducing RAED ’ s freedom to produce dissimilar representations for similar observed behaviours . However , the practical implementation of the KL term also imposes a penalty on any Encoder variance magnitudes different than 1 . Large Encoder variances result in an increased dispersion of representations when these are sampled from the Encoder . The presence of these variances can therefore be interpreted as a further source of stochasticity when learning representations . Our experimental results in Section 4.4 demonstrate that the application of the KL term benefits from leaving the Encoder variance outputs unused . The derived penalty can be summarised in a simple linear term given by Plinear = ||z||22 . In the AURORA framework , RAED can be used as a modular representation learning component to produce the BDs for the discovered controllers . We present an illustration of AURORA in Fig . 1 and a pseudo-code in Algorithm 1 in Appendix B.1 . AURORA largely follows a standard QualityDiversity algorithm ( Cully & Demiris , 2018a ) . At the start of each iteration , a predefined number of controllers is selected from the collection . This group of controllers forms the set of parent controllers . Each pair of parents undergoes cross-over and mutation operations . Cross-over operations produce new controllers that bear similarities to both parents . Mutation operations introduce some stochastic changes to these new controllers . If the collection is empty at the start of the iteration , we instead generate new controllers by randomly sampling in the controller space . Each controller is executed in the simulated environment and the associated observations are captured . These observations are used to produce the BD of each controller . When using an AE in AURORA , each BD is the latent representation generated using the environment observation x as input . In RAED , the robot ’ s actions a are the inputs instead . AURORA , therefore , stores for each controller a vector of robot action parameters , an environment observation and a BD . In the decision to accept a given new controller into the collection , AURORA considers the distance between its BD to the descriptor of the nearest controller contained in the collection . If this distance exceeds a minimum distance threshold d , the controller is deemed sufficiently novel to be added to the collection ( Cully & Demiris , 2018b ) . Otherwise , it is discarded . d is initialised at the start of the algorithm using the BDs of the initial set of controllers contained in the collection . AURORA then updates the value of d after each iteration to steer the size of the collection towards the target size . Every N iterations , AURORA extracts the environment observations and robot actions from all controllers contained in the collection to train the AE or RAED respectively . Once the training of the network concludes , all controllers are removed from the collection and assigned new BDs . This set of controllers is finally re-added to the collection using the acceptance mechanism described in the previous paragraph . This concludes one iteration of the AURORA algorithm . The hyperparameters used in AURORA are given in Appendix B.1 . | Distractions are alterations of states or observations outside the control of the agent. Conventional learning methods tend to be quite sensitive to them. This work proposes a method for learning representations robust to such distractions using an encoder-decoder architecture whose encoder uses actions as input, instead of an observation as conventional autoencoders do. In addition, the paper evaluates two variants of this method that employ an additional regularization term, one being the KL divergence as used by variational autoencoders, the other the $L_2$ norm of the latent activation vector (to avoid penalizing its variance as the KL divergence does). | SP:f1be80ff3839e9408ac1c693412c93d4f2483b95 |
On the Importance of Distraction-Robust Representations for Robot Learning | 1 INTRODUCTION . Representation Learning techniques form an integral part in many Reinforcement Learning ( RL ) robot control applications ( Lesort et al. , 2018 ) . Utilising low-dimensional representations can allow for a faster and more efficient learning of tasks than when using high-dimensional sensor information ( Munk et al. , 2016 ) . This is particularly useful in vision-based learning when high-dimensional images of the robot ’ s environment are the principal source of information available to the learning algorithm ( Zhu et al. , 2020 ) . Most commonly , representations are learned by applying dimensionality reduction techniques such as Autoencoders ( AEs ) ( Hinton & Salakhutdinov , 2006 ) or Variational Autoencoders ( VAEs ) ( Kingma & Welling , 2014 ) to the robot ’ s sensory data ( Lange et al. , 2012 ; Zhu et al. , 2020 ) . Generally , an AE consists of two Neural Networks , an Encoder E and a Decoder D. The Encoder attempts to condense all available information in the input data x into a latent representation z from which a reconstruction of the inputs D ( E ( x ) ) is generated by the Decoder . When the dimensionality of the representation is smaller than that of the input data , some information is lost when creating the representations . An AE is typically trained to shrink the magnitude of this information loss by minimising a reconstruction error . This error is commonly given by the squared norm of differences , LAE = ||x−D ( E ( x ) ) ||22 . ( 1 ) However , the optimisation of the reconstruction error in Eq . 1 does not necessarily result in the generation of representations that are optimal for the use in robot learning algorithms . For example , an accurate reconstruction of the decorative patterns on a dinner plate is less important than the plate ’ s dimensions to a robot learning to place it into a cabinet . It can therefore be desirable to control which aspects of the information contained in the inputs are most critical to be preserved in the representations . For instance , Pathak et al . ( 2017 ) design a Neural Network that learns representations from visual inputs by using them to predict the action taken by the RL agent in its state transition . By asking the network to predict the action , the authors eliminate the requirement for the representations to retain any state information that is unrelated to the agent ’ s behaviour . A focus on the learned representations ’ preservation of task-relevant information becomes even more crucial in the presence of distracting influences ( DIs ) in the environment . These DIs can materialise in the presence of additional environment objects which exhibit dynamics that are not only uncorrelated with the robot ’ s behaviour but additionally misleading . For instance , a robot that is learning to move objects to different positions in a room can find the observation of a moving autonomous vacuum cleaner misleading . Alternatively , DIs can impact the dynamics of existing objects in the room . For instance , after the robot has moved a box to a certain position in the room , further movements of the box due to external forces can be distracting to the robot ’ s learning process . In this paper , we introduce the concept of Distraction-Robust Representation Learning . We investigate the learning outcomes of robot control tasks when DIs are present in the environment . We show that in the presence of DIs , representations learned exclusively from environment observations can mislead the robot ’ s perceptions of its control over the environment . This finding demonstrates that Distraction-Robust Representation Learning needs to be afforded increased attention . In particular , works in the strand of research that aim to make RL algorithms more applicable to real-world scenarios largely concentrate on improving algorithm attributes such as the data efficiency ( Zhu et al. , 2020 ) . However , few works acknowledge the challenges posed by the inherently stochastic nature of real-world environments and the presence of DIs ( Forestier et al. , 2017 ) . Furthermore , we introduce a Robot Action Encoder-Decoder architecture ( RAED ) which successfully produces representations that are robust to DIs in the environment . RAED follows the simple but effective approach of using only the values that parameterise the robot ’ s actions as the input to the Encoder . Such a set of parameters defines a robot controller for instance . The representations produced by the Encoder are used by RAED ’ s Decoder to generate predictions of the environment observations . RAED ’ s design allows for static environment elements to be learned by the Decoder while concentrating the information in the representations on the observable consequences of the robot ’ s behaviour . Moreover , when environment observations are distorted by the presence of DIs , RAED produces representations that capture the expected consequences of the robot ’ s environment interactions . This is not the case when training representation learning methods such as AEs to reconstruct the full content of the robot ’ s visual perceptions . We can therefore draw some parallels between RAED ’ s design and the concept of a forward model ( Jordan & Rumelhart , 1992 ) . Given the simplicity of the approach , we expect the applicability of RAED to generalise to various different learning algorithms . 2 RELATED WORK . Several works have investigated mechanisms to preserve only task-relevant information in learned representations . Pathak et al . ( 2017 ) propose a Neural Network architecture that learns representations of visual inputs by predicting the action taken by the RL agent in its state transition . This design allows the representations to dedicate their information capacity to the observable consequences of the robot ’ s actions . Finn et al . ( 2016 ) propose a spatial AE to learn representations that aim to preserve only the configuration of objects in the environment rather than all aspects of the information contained in the camera images . However , in both approaches , the representations are learned from visual inputs which will be distorted if DIs are present in the environment . Without an explicit correction mechanism , these representation learning techniques therefore remain susceptible to distractions . The concept of affordance learning formulates a similar goal in discovering the consequences of the robot ’ s actions on its environment ( Cakmak et al. , 2007 ; Şahin et al. , 2007 ) . However , the works in this strand of research rarely consider the problem of DIs in the environment . Instead , they mainly concentrate on the robot ’ s ability to infer how an object in the environment would behave in response to its actions when no prior interaction experience with that particular object is available ( Dehban et al. , 2016 ; Mar et al. , 2015 ) . A work that uses learned representations and investigates robot interactions in the presence of DIs is presented in the Intrinsically Motivated Goal Exploration Processes ( IMGEP , Laversanne-Finot et al . ( 2018 ) ) . IMGEP aims to enable robots to explore the possible interactions with various tools in an environment that also features distractor objects . These objects either can not be interacted with or move independently of the robot . The authors show that a variant of their proposed algorithm remains unaffected by the presence of these distractors . This robustness is demonstrated by the robot ’ s lack of interaction with the distractor objects . However , the DIs we consider in this paper pose an arguably larger challenge for two main reasons . First , we evaluate distractor objects which exhibit dynamics that are not only independent of the robot ’ s behaviour but also misleading to the robot ’ s perceptions of its interactions with the actual objects of interest . For instance , a distractor object can collide with one of the objects manipulated by the robot . Second , we consider the case of misleading external DIs on the interesting objects themselves . In this case , the object interaction can not be avoided . Furthermore , in IMGEP the distractor robustness is not learned by the VAE that generates the representations . Instead , the algorithm identifies the components in the representations that correspond to the distractors during the robot ’ s interaction phase . Indeed , the learned representations remain static in this phase as the VAE is pre-trained on a manually generated dataset that covers all possible environment observations by spawning the various environment objects , including the distractors , in different positions . Alternative exploration-based approaches have been proposed recently ( Forestier et al. , 2017 ; Pathak et al. , 2017 ; Eysenbach et al. , 2019 ; Sharma et al. , 2019 ) . A particularly interesting framework is presented in AURORA ( Cully , 2019 ) , which we use in our experimental evaluations . Instead of decoupling the representation learning phase from the interaction phase as done in IMGEP , AURORA proposes a joint approach to discover a diverse set of behaviours of any robot in any given environment without the need to specify a task objective or reward function . More precisely , AURORA applies a dimensionality reduction algorithm such as an AE to the robot ’ s sensory data that are collected during the execution of the discovered controllers . The learned latent representation associated to a controller ’ s collected sensory data defines the Behavioural Descriptor ( BD ) for this controller . By measuring the distance between different controllers ’ BDs , the novelty of a given behaviour can be determined . The BD can therefore be used to build a collection of controllers that each exhibit different behaviours . AURORA uses this collection to further explore the space of possible behaviours via stochastic mutations , and continuously adds additional novel controllers to the collection . Periodically , the AE is trained using the sensory data that are extracted from all controllers in the collection . The AURORA framework is well-suited to judge the impact of DIs on the learned representations . Indeed , AURORA ’ s decision to accept newly generated controllers into the collection is exclusively based on the distance between their BDs . We can therefore analyse the influence of DIs using metrics that are formulated directly in the latent representation space . These metrics are more sensitive to the impact of DIs than measures of the overall learning outcomes . This is because the learning outcomes are typically also influenced by components of the learning algorithm other than the representations . Furthermore , AURORA ’ s training of the dimensionality reduction technique provides a particularly challenging setting for RAED . The training dataset composition is continually evolving as the data is collected online . Additionally , AURORA rejects controllers that generate behaviours very similar to that of existing controllers . This complexifies the task of learning the expected consequences of the robot ’ s actions when the collected environment observations are distorted by DIs . 3 METHOD . In this work , we use a single vector a to parameterise the set of actions taken by the robot from the beginning until the end of the simulation . This vector of the robot ’ s actions can store the parameter values of a controller for instance . We use a vector x to parameterise the single environment observation that is returned by each simulation . This vector can store the pixel values of an image for example . RAED consists of an Encoder-Decoder structure that uses a and x to produce a representation z that is distraction-robust . More precisely , the latent representation z is generated from RAED ’ s Encoder networkE which takes the robot ’ s actions a as its inputs . This conditioning of the representations on the robot ’ s actions is the crucial element in RAED ’ s design . The Decoder uses the representations to produce a prediction of the environment observation D ( E ( a ) ) . The actual environment observation x is used as the prediction target in the training of RAED . This yields the prediction error given in Eq . 2 . Note , the difference in the Encoder input compared to an AE ’ s reconstruction error in Eq . 1 . C = ||x−D ( E ( a ) ) ||22 . ( 2 ) Depending on the specifics of the robot design and the task , a set of controllers with different parameters can yield the same observed behaviour . For instance , when steering a robot arm with redundancies in its joints , different controllers can achieve the same position in a gripper connected to the arm . For such a set of controllers , it is possible that the differences in their parameters lead to the generation of different representations when using RAED , even if the observation predictions are exactly the same . This is less likely to occur in a dimensionality reduction technique that takes the visual perceptions as its inputs . For these methods , the principal sources of variation in the representations are the differences in the observations rather than the differences in the robot ’ s actions . To reduce RAED ’ s freedom to disperse the representations of similar observed behaviours , we investigate the addition of a penalty term P . The overall training loss is then given by LRAED = C+P . One possible instantiation of P is the Kullback-Leibler divergence ( KL ) term used in a VAE ( Kingma & Welling , 2014 ) . This KL term implicitly imposes a penalty on the magnitude of the means produced by the VAE ’ s Encoder network . The consequence is a crowding of the representations into a smaller latent subspace . This can have the desired effect of reducing RAED ’ s freedom to produce dissimilar representations for similar observed behaviours . However , the practical implementation of the KL term also imposes a penalty on any Encoder variance magnitudes different than 1 . Large Encoder variances result in an increased dispersion of representations when these are sampled from the Encoder . The presence of these variances can therefore be interpreted as a further source of stochasticity when learning representations . Our experimental results in Section 4.4 demonstrate that the application of the KL term benefits from leaving the Encoder variance outputs unused . The derived penalty can be summarised in a simple linear term given by Plinear = ||z||22 . In the AURORA framework , RAED can be used as a modular representation learning component to produce the BDs for the discovered controllers . We present an illustration of AURORA in Fig . 1 and a pseudo-code in Algorithm 1 in Appendix B.1 . AURORA largely follows a standard QualityDiversity algorithm ( Cully & Demiris , 2018a ) . At the start of each iteration , a predefined number of controllers is selected from the collection . This group of controllers forms the set of parent controllers . Each pair of parents undergoes cross-over and mutation operations . Cross-over operations produce new controllers that bear similarities to both parents . Mutation operations introduce some stochastic changes to these new controllers . If the collection is empty at the start of the iteration , we instead generate new controllers by randomly sampling in the controller space . Each controller is executed in the simulated environment and the associated observations are captured . These observations are used to produce the BD of each controller . When using an AE in AURORA , each BD is the latent representation generated using the environment observation x as input . In RAED , the robot ’ s actions a are the inputs instead . AURORA , therefore , stores for each controller a vector of robot action parameters , an environment observation and a BD . In the decision to accept a given new controller into the collection , AURORA considers the distance between its BD to the descriptor of the nearest controller contained in the collection . If this distance exceeds a minimum distance threshold d , the controller is deemed sufficiently novel to be added to the collection ( Cully & Demiris , 2018b ) . Otherwise , it is discarded . d is initialised at the start of the algorithm using the BDs of the initial set of controllers contained in the collection . AURORA then updates the value of d after each iteration to steer the size of the collection towards the target size . Every N iterations , AURORA extracts the environment observations and robot actions from all controllers contained in the collection to train the AE or RAED respectively . Once the training of the network concludes , all controllers are removed from the collection and assigned new BDs . This set of controllers is finally re-added to the collection using the acceptance mechanism described in the previous paragraph . This concludes one iteration of the AURORA algorithm . The hyperparameters used in AURORA are given in Appendix B.1 . | This paper approaches the problem of representation learning for robotic learning, with a focus on being robust to potentially misleading distractor objects. Concretely, they propose a method which learns a representation of sequences of actions by reconstructing a future state, and uses this representation of actions to learn skills. They show that this leads to some improvement in identifying more diverse "skills" in settings where there are external distractors. | SP:f1be80ff3839e9408ac1c693412c93d4f2483b95 |
Topic-aware Contextualized Transformers | 1 INTRODUCTION . Language models ( LMs ) play an important role across a range of natural language processing tasks , such as text summarization ( Rush et al. , 2015 ; Gehrmann et al. , 2018 ) , neural machine translation ( NMT ) ( Sutskever et al. , 2014 ; Cho et al. , 2014a ) , and image captioning ( Herdade et al. , 2019 ; Anderson et al. , 2018 ; Xu et al. , 2015 ) . Existing neural LMs are often built on either recurrent units , as used in recurrent neural networks ( RNNs ) ( Cho et al. , 2014b ; Hochreiter and Schmidhuber , 1997 ) , or purely the attention mechanism based modules , as used in the Transformer and its various generalizations ( Vaswani et al. , 2017 ; Dai et al. , 2019 ; Radford et al. , 2019 ) . Moving beyond traditional recurrent units , Transformers mainly rely on attention mechanisms , in which the direct connections between long-distance word pairs might ease optimization and enable the learning of longrange dependency ( Dai et al. , 2019 ) , and have recently demonstrated state-of-the-art performances on a wide range of sequence modeling tasks . Rather than representing a token using a predefined word embedding vector , each Transformer layer creates a contextualized representation of each token by attending to different parts of the input segment ( Ethayarajh , 2019 ) , allowing the same word to take different representations depending on its context . However , Transformers are usually trained on disjoint fixed-length segments , without any information flow across segments ( Dai et al. , 2019 ) , limiting the contextualization within the current segment . Therefore , they often fail to take full advantage of many other rich contextual information , such as longer-range word dependencies beyond the segment length and semantic relationships between neighboring segments . While a naive solution to explore richer contextual information is to increase the segment length , in practice , it is usually infeasible due to limited resources , which requires O N2 for the window N of inputs at each layer . Some long-range transformer variants ( Dai et al. , 2019 ; Rae et al. , 2020 ; Rae and Razavi , 2020 ) aim to extend context via compression , which use compressed memory cells for preserving the previous segments ’ information . The Transformer-XL ( Dai et al. , 2019 ) builds up recurrent connections between segments , concatenating the past activations with a memory cell of size M N , which results in an attention cost of O ( N ( M +N ) ) . However the memory cell still requires a considerable space L ⇥M ⇥ dmodel in a L-layer transformer with embedding size of dmodel , which consumes a non-negligible cost ( Rae and Razavi , 2020 ) . Rae et al . ( 2020 ) shorten the range of attention for Transformers by compressing the past memories into fine-grained and coarser compressed memory slots , while still suffering from memory consuming as the memory size is quiet large ( > 1000 ) . In addition , some efficient versions focusing on Transformer model ’ s self-attention mechanism have also recently been explored . These models reduce memory requirements by leveraging sparsity in the attention layers ( Sukhbaatar et al. , 2019 ) , exploiting a factorized sparse representation ( Child et al. , 2019 ) , replacing dot-product attention with locality-sensitive hashing to decrease complexity ( Kitaev et al. , 2020 ) , or using product-key attention to increase the key space ( Lample et al. , 2019 ) . Besides , Chen et al . ( 2019 ) represent sentence-level context as latent topic representations by using a convolution neural network , and utilize the context representations to improve translation . However , leveraging the contextualized topic information by capturing semantic coherence via a deep probabilistic topic model , to our knowledge , has not been directly applied to Transformer before . Furthermore , compared with pre-training , fine-tuning is relatively inexpensive ( Devlin et al. , 2019 ) . Nevertheless , most of the current contextualized models are trained independently on different datasets , without making good use of the publicly released pre-trained models ( Radford et al. , 2019 ; Devlin et al. , 2019 ; Radford et al. , 2018 ; Brown et al. , 2020 ; Peters et al. , 2018 ; Yang et al. , 2019 ) , paired with unsupervised pre-training on a large amount of training data . This motivates us to explore a general intervention based on those predecessors for performance gain with little computation cost , providing longer-range dependencies through a deep topic model . Different from RNN or Transformer-based LMs , topic models ( Blei et al. , 2003 ; Teh et al. , 2006 ; Zhou and Carin , 2015 ; Gan et al. , 2015 ; Zhou et al. , 2016 ; Zhao et al. , 2018 ) are well suited for capturing global semantic coherency by extracting word concurrence patterns into semantically meaningful topics , which can be viewed as the contextualized word representations of the entire target corpus including all segments . Since topic models are appropriate to capture long-range dependencies , some approaches attract significant recent interest by leveraging topic models to improve RNN-based language models ( Dieng et al. , 2017 ; Ahn et al. , 2016 ; Lau et al. , 2017 ; Wang et al. , 2018a ; Guo et al. , 2019 ) . Dieng et al . ( 2017 ) and Ahn et al . ( 2016 ) integrate the syntactic dependencies of RNNs and semantic topics of latent topic models . Lau et al . ( 2017 ) introduce an attention based convolutional neural network to extract semantic topics for extending the RNN cell . Wang et al . ( 2018a ) learn the global semantic coherence of a document via a neural topic model and use the learned latent topics to build a mixture-of-experts language model . Guo et al . ( 2019 ) extract recurrent hierarchical semantic structure via a dynamic deep topic model to guide natural language generation . Motivated by recent successes on integrating topic information into RNN-based LMs , here we focus on using topic model to provide richer contextual information for improving the Transformer . In particular , we consider using Poisson gamma belief network ( PGBN ) ( Zhou et al. , 2016 ; Zhang et al. , 2018 ) , a state-of-the-art probabilistic topic model which can be equivalently represented as a multi-stochastic-layer deep generalization of vanilla topic models ( Blei et al. , 2003 ; Zhou et al. , 2012 ) , to extract globally shared semantical topic representations of user-defined contexts . To this end , three different types of contextual topic information are provided to introduce long-range semantic dependencies into Transformers . ( i ) We first introduce the contextual token embedding ( TE ) guided by topic model to enrich the representation of each token , which not only extracts global semantics from the corpus , but also provides localized representation of a token given either its preceding or surrounding context ( which one to use is task-dependent ) . ( ii ) To utilize contextual information of a segment , we develop the contextual segment embedding ( SE ) to construct a set of virtual words , which is placed before the word sequence of the current segment and fed into Transformer . As such , the generation of any token in one segment depends on semantic context from the previous segments . ( iii ) After that , we further develop a multi-head topic attention ( TA ) module into the Transformer , selecting semantically related topics for generating each token , a design inspired by how a token is generated by a topic model given the topics and corresponding topic proportion . To encourage topic select-attention to focus on the topics where the predicting token is more likely to be assigned to by the topic model , during training , we add a restriction between the attention weights and the latent representation of the predicting word . Besides , a sparse penalty is employed on the topic select-attention , encouraging the network to focus on only a small subset of extracted topics . Moving beyond conventional transformers , our model can not only utilize longer-range word dependencies beyond the segment length and semantic relationships across all segments , but also generalize easily to any pre-trained Transformer-based model by jointly fine-tuning on the target corpus . It only adds minor memory and computation overhead comparing with fine-tuning the Transformer-based model alone . We demonstrate the effectiveness of our method both quantitatively and qualitatively . 2 PRELIMINARIES . To train Transformer-based LMs , the underlying word sequence of a corpus is usually broken into fixed-length non-overlapping segments , without any information flow across segments . We denote sn = ( sn1 , . . . , snI ) as the n-th segment of I consecutive tokens , where sni 2 { 1 , . . . , V } and V is the vocabulary size . The segment length I is chosen to balance the ability to model long-range word dependencies with the memory and computation cost . Note the segments fed into Transformers no longer respect natural document boundaries , which means a segment could consist of the tokens from more than one document . Below we provide a brief overview of Transformers ( Vaswani et al. , 2017 ) and PGBN ( Zhou et al. , 2016 ) , a multi-stochastic-layer deep topic model . To make them compatible with each other , each segment is fed into Transformer as a document analyzed in PGBN . Vanilla Transformer networks : Like a standard LM , Transformers are trained by maximizing the likelihood of all segments L = P n L ( sn ) , L ( sn ) = P i logP⌦ ( sni | sn , < i ) , where sn , < i consists of the preceding tokens of sni within the nth segment , and ⌦ the parameters for modeling the conditional probability . Our proposed method can be applied to improve both Transformer encoder and decoder architectures ( Vaswani et al. , 2017 ; Dai et al. , 2019 ; Radford et al. , 2019 ; Devlin et al. , 2019 ; Radford et al. , 2018 ) . For brevity , we will mainly show how to use PGBN to better contextualize through the Transformer decoder , which consists of L layers as Z0 = WE+PE , Zl = TransformerBlock Zl 1 , P ( u ) = softmax ZLWTe , ( 1 ) where WE and PE are the word and position embeddings of sn , i 1 when predicting the i-th token of the segment , We 2 RV⇥dmodel the embedding matrix , and Z1 : L the outputs of all L layers , each of which consists of a multi-head self-attention block followed by a feed-forward neural network ( Vaswani et al. , 2017 ) . To facilitate these connections , all layers in the model , as well as the embedding layers , produce outputs of dimension dmodel . See previous works ( Vaswani et al. , 2017 ; Devlin et al. , 2019 ) for more details on Transformers . Deep topic model : PGBN is used to provide semantically meaningful contextual representations to guide Transformers . We represent segment sn as a bag-of-words ( BoW ) count vector dn 2 ZV+ , the v-th element of which counts how many times term v in the vocabulary of size V appears at the n-th segment . The generative model of PGBN with T hidden layers , from top to bottom , is expressed as ✓Tn ⇠ Gamma r , ⌧T+1n , ... , ✓tn ⇠ Gamma t+1✓t+1n , ⌧ t+1 n , ✓1n ⇠ Gamma 2✓2n , ⌧ 2 n , dn ⇠ Poisson ( 1✓1n ) , ( 2 ) where the shape parameters of gamma distributed hidden units ✓tn 2 RMt+ are factorized into the product of connection weight matrix t+1 2 RMt⇥Mt+1+ and hidden units ✓t+1n of the next layer . The global semantics of entire training corpus are compressed into 1 : T , representing topic relations of T layers . ✓tn denotes a local semantic representation of input dn , indicating its topic proportion at t-th layers . See Zhou et al . ( 2016 ) for more details on PGBN . | This paper introduces an interesting idea of enhancing the contextualised word embedding learned by Transformers with long-range semantic dependencies via topic learned by Poisson Gamma Belief Network (PGBN), a deep topic model. To leverage the topic information to guide the learning process of transformers, the authors proposed two types of topic-ware embeddings and one topic attention mechanism. The experimental results show incorporating topic information can further improve the performance of Transformers. | SP:684f590cdc9c5592b1f8d815d4b380186697d37d |
Topic-aware Contextualized Transformers | 1 INTRODUCTION . Language models ( LMs ) play an important role across a range of natural language processing tasks , such as text summarization ( Rush et al. , 2015 ; Gehrmann et al. , 2018 ) , neural machine translation ( NMT ) ( Sutskever et al. , 2014 ; Cho et al. , 2014a ) , and image captioning ( Herdade et al. , 2019 ; Anderson et al. , 2018 ; Xu et al. , 2015 ) . Existing neural LMs are often built on either recurrent units , as used in recurrent neural networks ( RNNs ) ( Cho et al. , 2014b ; Hochreiter and Schmidhuber , 1997 ) , or purely the attention mechanism based modules , as used in the Transformer and its various generalizations ( Vaswani et al. , 2017 ; Dai et al. , 2019 ; Radford et al. , 2019 ) . Moving beyond traditional recurrent units , Transformers mainly rely on attention mechanisms , in which the direct connections between long-distance word pairs might ease optimization and enable the learning of longrange dependency ( Dai et al. , 2019 ) , and have recently demonstrated state-of-the-art performances on a wide range of sequence modeling tasks . Rather than representing a token using a predefined word embedding vector , each Transformer layer creates a contextualized representation of each token by attending to different parts of the input segment ( Ethayarajh , 2019 ) , allowing the same word to take different representations depending on its context . However , Transformers are usually trained on disjoint fixed-length segments , without any information flow across segments ( Dai et al. , 2019 ) , limiting the contextualization within the current segment . Therefore , they often fail to take full advantage of many other rich contextual information , such as longer-range word dependencies beyond the segment length and semantic relationships between neighboring segments . While a naive solution to explore richer contextual information is to increase the segment length , in practice , it is usually infeasible due to limited resources , which requires O N2 for the window N of inputs at each layer . Some long-range transformer variants ( Dai et al. , 2019 ; Rae et al. , 2020 ; Rae and Razavi , 2020 ) aim to extend context via compression , which use compressed memory cells for preserving the previous segments ’ information . The Transformer-XL ( Dai et al. , 2019 ) builds up recurrent connections between segments , concatenating the past activations with a memory cell of size M N , which results in an attention cost of O ( N ( M +N ) ) . However the memory cell still requires a considerable space L ⇥M ⇥ dmodel in a L-layer transformer with embedding size of dmodel , which consumes a non-negligible cost ( Rae and Razavi , 2020 ) . Rae et al . ( 2020 ) shorten the range of attention for Transformers by compressing the past memories into fine-grained and coarser compressed memory slots , while still suffering from memory consuming as the memory size is quiet large ( > 1000 ) . In addition , some efficient versions focusing on Transformer model ’ s self-attention mechanism have also recently been explored . These models reduce memory requirements by leveraging sparsity in the attention layers ( Sukhbaatar et al. , 2019 ) , exploiting a factorized sparse representation ( Child et al. , 2019 ) , replacing dot-product attention with locality-sensitive hashing to decrease complexity ( Kitaev et al. , 2020 ) , or using product-key attention to increase the key space ( Lample et al. , 2019 ) . Besides , Chen et al . ( 2019 ) represent sentence-level context as latent topic representations by using a convolution neural network , and utilize the context representations to improve translation . However , leveraging the contextualized topic information by capturing semantic coherence via a deep probabilistic topic model , to our knowledge , has not been directly applied to Transformer before . Furthermore , compared with pre-training , fine-tuning is relatively inexpensive ( Devlin et al. , 2019 ) . Nevertheless , most of the current contextualized models are trained independently on different datasets , without making good use of the publicly released pre-trained models ( Radford et al. , 2019 ; Devlin et al. , 2019 ; Radford et al. , 2018 ; Brown et al. , 2020 ; Peters et al. , 2018 ; Yang et al. , 2019 ) , paired with unsupervised pre-training on a large amount of training data . This motivates us to explore a general intervention based on those predecessors for performance gain with little computation cost , providing longer-range dependencies through a deep topic model . Different from RNN or Transformer-based LMs , topic models ( Blei et al. , 2003 ; Teh et al. , 2006 ; Zhou and Carin , 2015 ; Gan et al. , 2015 ; Zhou et al. , 2016 ; Zhao et al. , 2018 ) are well suited for capturing global semantic coherency by extracting word concurrence patterns into semantically meaningful topics , which can be viewed as the contextualized word representations of the entire target corpus including all segments . Since topic models are appropriate to capture long-range dependencies , some approaches attract significant recent interest by leveraging topic models to improve RNN-based language models ( Dieng et al. , 2017 ; Ahn et al. , 2016 ; Lau et al. , 2017 ; Wang et al. , 2018a ; Guo et al. , 2019 ) . Dieng et al . ( 2017 ) and Ahn et al . ( 2016 ) integrate the syntactic dependencies of RNNs and semantic topics of latent topic models . Lau et al . ( 2017 ) introduce an attention based convolutional neural network to extract semantic topics for extending the RNN cell . Wang et al . ( 2018a ) learn the global semantic coherence of a document via a neural topic model and use the learned latent topics to build a mixture-of-experts language model . Guo et al . ( 2019 ) extract recurrent hierarchical semantic structure via a dynamic deep topic model to guide natural language generation . Motivated by recent successes on integrating topic information into RNN-based LMs , here we focus on using topic model to provide richer contextual information for improving the Transformer . In particular , we consider using Poisson gamma belief network ( PGBN ) ( Zhou et al. , 2016 ; Zhang et al. , 2018 ) , a state-of-the-art probabilistic topic model which can be equivalently represented as a multi-stochastic-layer deep generalization of vanilla topic models ( Blei et al. , 2003 ; Zhou et al. , 2012 ) , to extract globally shared semantical topic representations of user-defined contexts . To this end , three different types of contextual topic information are provided to introduce long-range semantic dependencies into Transformers . ( i ) We first introduce the contextual token embedding ( TE ) guided by topic model to enrich the representation of each token , which not only extracts global semantics from the corpus , but also provides localized representation of a token given either its preceding or surrounding context ( which one to use is task-dependent ) . ( ii ) To utilize contextual information of a segment , we develop the contextual segment embedding ( SE ) to construct a set of virtual words , which is placed before the word sequence of the current segment and fed into Transformer . As such , the generation of any token in one segment depends on semantic context from the previous segments . ( iii ) After that , we further develop a multi-head topic attention ( TA ) module into the Transformer , selecting semantically related topics for generating each token , a design inspired by how a token is generated by a topic model given the topics and corresponding topic proportion . To encourage topic select-attention to focus on the topics where the predicting token is more likely to be assigned to by the topic model , during training , we add a restriction between the attention weights and the latent representation of the predicting word . Besides , a sparse penalty is employed on the topic select-attention , encouraging the network to focus on only a small subset of extracted topics . Moving beyond conventional transformers , our model can not only utilize longer-range word dependencies beyond the segment length and semantic relationships across all segments , but also generalize easily to any pre-trained Transformer-based model by jointly fine-tuning on the target corpus . It only adds minor memory and computation overhead comparing with fine-tuning the Transformer-based model alone . We demonstrate the effectiveness of our method both quantitatively and qualitatively . 2 PRELIMINARIES . To train Transformer-based LMs , the underlying word sequence of a corpus is usually broken into fixed-length non-overlapping segments , without any information flow across segments . We denote sn = ( sn1 , . . . , snI ) as the n-th segment of I consecutive tokens , where sni 2 { 1 , . . . , V } and V is the vocabulary size . The segment length I is chosen to balance the ability to model long-range word dependencies with the memory and computation cost . Note the segments fed into Transformers no longer respect natural document boundaries , which means a segment could consist of the tokens from more than one document . Below we provide a brief overview of Transformers ( Vaswani et al. , 2017 ) and PGBN ( Zhou et al. , 2016 ) , a multi-stochastic-layer deep topic model . To make them compatible with each other , each segment is fed into Transformer as a document analyzed in PGBN . Vanilla Transformer networks : Like a standard LM , Transformers are trained by maximizing the likelihood of all segments L = P n L ( sn ) , L ( sn ) = P i logP⌦ ( sni | sn , < i ) , where sn , < i consists of the preceding tokens of sni within the nth segment , and ⌦ the parameters for modeling the conditional probability . Our proposed method can be applied to improve both Transformer encoder and decoder architectures ( Vaswani et al. , 2017 ; Dai et al. , 2019 ; Radford et al. , 2019 ; Devlin et al. , 2019 ; Radford et al. , 2018 ) . For brevity , we will mainly show how to use PGBN to better contextualize through the Transformer decoder , which consists of L layers as Z0 = WE+PE , Zl = TransformerBlock Zl 1 , P ( u ) = softmax ZLWTe , ( 1 ) where WE and PE are the word and position embeddings of sn , i 1 when predicting the i-th token of the segment , We 2 RV⇥dmodel the embedding matrix , and Z1 : L the outputs of all L layers , each of which consists of a multi-head self-attention block followed by a feed-forward neural network ( Vaswani et al. , 2017 ) . To facilitate these connections , all layers in the model , as well as the embedding layers , produce outputs of dimension dmodel . See previous works ( Vaswani et al. , 2017 ; Devlin et al. , 2019 ) for more details on Transformers . Deep topic model : PGBN is used to provide semantically meaningful contextual representations to guide Transformers . We represent segment sn as a bag-of-words ( BoW ) count vector dn 2 ZV+ , the v-th element of which counts how many times term v in the vocabulary of size V appears at the n-th segment . The generative model of PGBN with T hidden layers , from top to bottom , is expressed as ✓Tn ⇠ Gamma r , ⌧T+1n , ... , ✓tn ⇠ Gamma t+1✓t+1n , ⌧ t+1 n , ✓1n ⇠ Gamma 2✓2n , ⌧ 2 n , dn ⇠ Poisson ( 1✓1n ) , ( 2 ) where the shape parameters of gamma distributed hidden units ✓tn 2 RMt+ are factorized into the product of connection weight matrix t+1 2 RMt⇥Mt+1+ and hidden units ✓t+1n of the next layer . The global semantics of entire training corpus are compressed into 1 : T , representing topic relations of T layers . ✓tn denotes a local semantic representation of input dn , indicating its topic proportion at t-th layers . See Zhou et al . ( 2016 ) for more details on PGBN . | This paper introduces a global topic model into the Transformer to enrich longer-term dependencies beyond the fixed training segment, including contextual token/segment embedding (TE/SE) and Topic Attention (TA). However, some components seem to be unnecessary: The function of “+TA+SE” is very trivial by comparing “+Topic attention (TA)” with “+TE + SE + TA” in Table 1. In addition, the experiments of GLUE in Table 2 are only conducted on “Bert-base” with marginal improvements. | SP:684f590cdc9c5592b1f8d815d4b380186697d37d |
Multi-timescale Representation Learning in LSTM Language Models | 1 INTRODUCTION . Autoregressive language models are functions that estimate a probability distribution over the next word in a sequence from past words , p ( wt|wt−1 , . . . , w1 ) . This requires capturing statistical dependencies between words over short timescales , where syntactic information likely dominates ( Adi et al. , 2017 ; Linzen et al. , 2016 ) , as well as long timescales , where semantic and narrative information likely dominate ( Zhu et al. , 2018 ; Conneau et al. , 2018 ; Gulordava et al. , 2018 ) . Because this probability distribution grows exponentially with sequence length , some approaches simplify the problem by ignoring long-range dependencies . Classical n-gram models , for example , assume word wt is independent of all but the last n− 1 words , with typical n = 5 ( Heafield , 2011 ) . Hidden Markov models ( HMMs ) assume that the influence of previous words decays exponentially with distance from the current word ( Lin & Tegmark , 2016 ) . In contrast , neural network language models such as recurrent ( Hochreiter & Schmidhuber , 1997 ; Merity et al. , 2018 ; Melis et al. , 2018 ) and transformer networks ( Melis et al. , 2019 ; Krause et al. , 2019 ; Dai et al. , 2019 ) include longer-range interactions , but simplify the problem by working in lower-dimensional representational spaces . Attention-based networks combine position and ∗Current affiliation : Apple Inc. content-based information in a small number of attention heads to flexibly capture different types of dependencies within a sequence ( Vaswani et al. , 2017 ; Cordonnier et al. , 2019 ) . Gated recurrent neural networks ( RNNs ) compress information about past words into a fixed-length state vector ( Hochreiter & Schmidhuber , 1997 ) . The influence each word has on this state vector tends to decay exponentially over time . However , each element of the state vector can have a different exponential time constant , or “ timescale ” ( Tallec & Ollivier , 2018 ) , enabling gated RNNs like the long short-term memory ( LSTM ) network to flexibly learn many different types of temporal relationships ( Hochreiter & Schmidhuber , 1997 ) . Stacked LSTM networks reduce to a single layer ( Turek et al. , 2020 ) , showing that network depth has an insignificant influence on how the LSTM captures temporal relationships . Yet in all these networks the shape of the temporal dependencies must be learned directly from the data . This seems particularly problematic for very long-range dependencies , which are only sparsely informative ( Lin & Tegmark , 2016 ) . This raises two related questions : what should the temporal dependencies in a language model look like ? And how can that information be incorporated into a neural network language model ? To answer the first question , we look to empirical and theoretical work that has explored the dependency statistics of natural language . Lin & Tegmark ( 2016 ) quantified temporal dependencies in English and French language corpora by measuring the mutual information between tokens as a function of the distance between them . They observed that mutual information decays as a power law , i.e . MI ( wk , wk+t ) ∝ t−d for constant d. This behavior is common to hierarchically structured natural languages ( Lin & Tegmark , 2016 ; Sainburg et al. , 2019 ) as well as sequences generated from probabilistic context-free grammars ( PCFGs ) ( Lin & Tegmark , 2016 ) . Now to the second question : if temporal dependencies in natural language follow a power law , how can this information be incorporated into neural network language models ? To our knowledge , little work has explored how to control the temporal dependencies learned in attention-based models . However , many approaches have been proposed for controlling gated RNNs , including updating different groups of units at different intervals ( El Hihi & Bengio , 1996 ; Koutnik et al. , 2014 ; Liu et al. , 2015 ; Chung et al. , 2017 ) , gating units across layers ( Chung et al. , 2015 ) , and explicitly controlling the input and forget gates that determine how information is stored and removed from memory ( Xu et al. , 2016 ; Shen et al. , 2018 ; Tallec & Ollivier , 2018 ) . Yet none of these proposals incorporate a specific shape of temporal dependencies based on the known statistics of natural language . In this work , we build on the framework of Tallec & Ollivier ( 2018 ) to develop a theory for how the memory mechanism in LSTM language models can capture temporal dependencies that follow a power law . This relies on defining the timescale of an individual LSTM unit based on how the unit retains and forgets information . We show that this theory predicts the distribution of unit timescales for LSTM models trained on both natural English ( Merity et al. , 2018 ) and formal languages ( Suzgun et al. , 2019 ) . Further , we show that forcing models to follow this theoretical distribution improves language modeling performance . These results highlight the importance of combining theoretical modeling with an understanding of how language models capture temporal dependencies over multiple scales . 2 MULTI-TIMESCALE LANGUAGE MODELS . 2.1 TIMESCALE OF INFORMATION . We are interested in understanding how LSTM language models capture dependencies across time . Tallec & Ollivier ( 2018 ) elegantly argued that memory in individual LSTM units tends to decay exponentially with a time constant determined by weights within the network . We refer to the time constant of that exponential decay as the unit ’ s representational timescale . Timescale is directly related to the LSTM memory mechanism ( Hochreiter & Schmidhuber , 1997 ) , which involves the LSTM cell state ct , input gate it and forget gate ft , it = σ ( Wixxt +Wihht−1 + bi ) ft = σ ( Wfxxt +Wfhht−1 + bf ) c̃t = tanh ( Wcxxt +Wchht−1 + bc ) ct = ft ct−1 + it c̃t , where xt is the input at time t , ht−1 is the hidden state , Wih , Wix , Wfh , Wfx , Wch , Wcx are the different weights and bi , bf , bc the respective biases . σ ( · ) and tanh ( · ) represent element-wise sigmoid and hyperbolic tangent functions . Input and forget gates control the flow of information in and out of memory . The forget gate ft controls how much memory from the last time step ct−1 is carried forward to the current state ct . The input gate it controls how much information from the input xt and hidden state ht−1 at the current timestep is stored in memory for subsequent timesteps . To find the representational timescale , we consider a “ free input ” regime with zero input to the LSTM after timestep t0 , i.e. , xt = 0 for t > t0 . Ignoring information leakage through the hidden state ( i.e. , assuming Wch = 0 , bc = 0 , and Wfh = 0 ) the cell state update becomes ct = ft ct−1 . For t > t0 , it can be further simplified as ct = f t−t0 0 c0 = e ( log f0 ) ( t−t0 ) c0 , ( 1 ) where c0 = ct0 is the cell state at t0 , and f0 = σ ( bf ) is the value of the forget gate , which depends only on the forget gate bias bf . Equation 1 shows that LSTM memory exhibits exponential decay with characteristic forgetting time T = − 1 log f0 = 1 log ( 1 + e−bf ) . ( 2 ) That is , values in the cell state tend to shrink by a factor of e every T timesteps . We refer to the forgetting time in Equation 2 as the representational timescale of an LSTM unit . Beyond the “ free input ” regime , we can estimate the timescale for a LSTM unit by measuring the average forget gate value over a set of test sequences , Test = − 1 log f̄ , ( 3 ) where f̄ = 1KN ∑N j=1 ∑K t=1 f j t , in which f j t is the forget gate value of the unit at t-th timestep for j-th test sequence , N is the number of test sequences , and K is the test sequence length . 2.2 COMBINING EXPONENTIAL TIMESCALES TO YIELD A POWER LAW . From earlier work , we know that temporal dependencies in natural language tend to decay following a power law ( Lin & Tegmark , 2016 ; Sainburg et al. , 2019 ) . Yet from Equation 1 we see that LSTM memory tends to decay exponentially . These two decay regimes are fundamentally different–the ratio of a power law divided by an exponential always tends towards infinity . However , LSTM language models contain many units , each of which can have a different timescale . Thus LSTM language models might approximate power law decay through a combination of exponential functions . Here we derive a theory for how timescales should be distributed within an LSTM in order to yield overall power law decay . Let us assume that the timescale T for each LSTM unit is drawn from a distribution P ( T ) . We want to find a P ( T ) such that the expected value over T of the function e −t T approximates a power law decay t−d for some constant d , t−d ∝ ET [ e−t/T ] = ∫ ∞ 0 P ( T ) e−t/T dT . ( 4 ) Solving this problem reveals that P ( T ) is an Inverse Gamma distribution with shape parameter α = d and scale parameter β = 1 ( see Section A.1 for derivation ) . The probability density function of the Inverse Gamma distribution is given as P ( T ; α , β ) = β α Γ ( α ) ( 1/T ) α+1e ( −β/T ) . This theoretical result suggests that in order to approximate the power law decay of information in natural language , unit timescales in LSTM language models should follow an Inverse Gamma distribution . We next perform experiments to test whether this prediction holds true for models trained on natural language and models trained on samples from a formal language with known temporal statistics . We then test whether enforcing an Inverse Gamma timescale distribution at training time improves model performance . 2.3 CONTROLLING LSTM UNIT TIMESCALES . To enforce a specific distribution of timescales in an LSTM and thus create an explicit multi-timescale model , we drew again upon the methods developed in Tallec & Ollivier ( 2018 ) . Following the analysis in Section 2.1 , the desired timescale Tdesired for an LSTM unit can be controlled by setting the forget gate bias to the value bf = − log ( e 1 Tdesired − 1 ) . ( 5 ) The balance between forgetting information from the previous timestep and adding new information from the current timestep is controlled by the relationship between forget and input gates . To maintain this balance we set the input gate bias bi to the opposite value of the forget gate , i.e. , bi = −bf . This ensures that the relation it ≈ 1− ft holds true . Importantly , these bias values remain fixed ( i.e . are not learned ) during training , in order to keep the desired timescale distribution across the network . | This work investigates representational power of LSTM to model natural language, in particular how well it models temporal dependencies within text. They define a notion of timescale of each LSTM unit and analitycally show that LSTM memory exhibits exponential decay, while natural language tends (based on prior work) to decay following the power law. Based on this, they figure that LSTM memory may decay following the power law *if the timescales approximate samples from the particular Inverse Gamma Distribution*. To achieve that they propose the multi-timescale LSTM unit, where the desired timescale is explicitly controlled via the forget gate bias. | SP:351c576700ecf5c84f15b3a4baef958e72d099eb |
Multi-timescale Representation Learning in LSTM Language Models | 1 INTRODUCTION . Autoregressive language models are functions that estimate a probability distribution over the next word in a sequence from past words , p ( wt|wt−1 , . . . , w1 ) . This requires capturing statistical dependencies between words over short timescales , where syntactic information likely dominates ( Adi et al. , 2017 ; Linzen et al. , 2016 ) , as well as long timescales , where semantic and narrative information likely dominate ( Zhu et al. , 2018 ; Conneau et al. , 2018 ; Gulordava et al. , 2018 ) . Because this probability distribution grows exponentially with sequence length , some approaches simplify the problem by ignoring long-range dependencies . Classical n-gram models , for example , assume word wt is independent of all but the last n− 1 words , with typical n = 5 ( Heafield , 2011 ) . Hidden Markov models ( HMMs ) assume that the influence of previous words decays exponentially with distance from the current word ( Lin & Tegmark , 2016 ) . In contrast , neural network language models such as recurrent ( Hochreiter & Schmidhuber , 1997 ; Merity et al. , 2018 ; Melis et al. , 2018 ) and transformer networks ( Melis et al. , 2019 ; Krause et al. , 2019 ; Dai et al. , 2019 ) include longer-range interactions , but simplify the problem by working in lower-dimensional representational spaces . Attention-based networks combine position and ∗Current affiliation : Apple Inc. content-based information in a small number of attention heads to flexibly capture different types of dependencies within a sequence ( Vaswani et al. , 2017 ; Cordonnier et al. , 2019 ) . Gated recurrent neural networks ( RNNs ) compress information about past words into a fixed-length state vector ( Hochreiter & Schmidhuber , 1997 ) . The influence each word has on this state vector tends to decay exponentially over time . However , each element of the state vector can have a different exponential time constant , or “ timescale ” ( Tallec & Ollivier , 2018 ) , enabling gated RNNs like the long short-term memory ( LSTM ) network to flexibly learn many different types of temporal relationships ( Hochreiter & Schmidhuber , 1997 ) . Stacked LSTM networks reduce to a single layer ( Turek et al. , 2020 ) , showing that network depth has an insignificant influence on how the LSTM captures temporal relationships . Yet in all these networks the shape of the temporal dependencies must be learned directly from the data . This seems particularly problematic for very long-range dependencies , which are only sparsely informative ( Lin & Tegmark , 2016 ) . This raises two related questions : what should the temporal dependencies in a language model look like ? And how can that information be incorporated into a neural network language model ? To answer the first question , we look to empirical and theoretical work that has explored the dependency statistics of natural language . Lin & Tegmark ( 2016 ) quantified temporal dependencies in English and French language corpora by measuring the mutual information between tokens as a function of the distance between them . They observed that mutual information decays as a power law , i.e . MI ( wk , wk+t ) ∝ t−d for constant d. This behavior is common to hierarchically structured natural languages ( Lin & Tegmark , 2016 ; Sainburg et al. , 2019 ) as well as sequences generated from probabilistic context-free grammars ( PCFGs ) ( Lin & Tegmark , 2016 ) . Now to the second question : if temporal dependencies in natural language follow a power law , how can this information be incorporated into neural network language models ? To our knowledge , little work has explored how to control the temporal dependencies learned in attention-based models . However , many approaches have been proposed for controlling gated RNNs , including updating different groups of units at different intervals ( El Hihi & Bengio , 1996 ; Koutnik et al. , 2014 ; Liu et al. , 2015 ; Chung et al. , 2017 ) , gating units across layers ( Chung et al. , 2015 ) , and explicitly controlling the input and forget gates that determine how information is stored and removed from memory ( Xu et al. , 2016 ; Shen et al. , 2018 ; Tallec & Ollivier , 2018 ) . Yet none of these proposals incorporate a specific shape of temporal dependencies based on the known statistics of natural language . In this work , we build on the framework of Tallec & Ollivier ( 2018 ) to develop a theory for how the memory mechanism in LSTM language models can capture temporal dependencies that follow a power law . This relies on defining the timescale of an individual LSTM unit based on how the unit retains and forgets information . We show that this theory predicts the distribution of unit timescales for LSTM models trained on both natural English ( Merity et al. , 2018 ) and formal languages ( Suzgun et al. , 2019 ) . Further , we show that forcing models to follow this theoretical distribution improves language modeling performance . These results highlight the importance of combining theoretical modeling with an understanding of how language models capture temporal dependencies over multiple scales . 2 MULTI-TIMESCALE LANGUAGE MODELS . 2.1 TIMESCALE OF INFORMATION . We are interested in understanding how LSTM language models capture dependencies across time . Tallec & Ollivier ( 2018 ) elegantly argued that memory in individual LSTM units tends to decay exponentially with a time constant determined by weights within the network . We refer to the time constant of that exponential decay as the unit ’ s representational timescale . Timescale is directly related to the LSTM memory mechanism ( Hochreiter & Schmidhuber , 1997 ) , which involves the LSTM cell state ct , input gate it and forget gate ft , it = σ ( Wixxt +Wihht−1 + bi ) ft = σ ( Wfxxt +Wfhht−1 + bf ) c̃t = tanh ( Wcxxt +Wchht−1 + bc ) ct = ft ct−1 + it c̃t , where xt is the input at time t , ht−1 is the hidden state , Wih , Wix , Wfh , Wfx , Wch , Wcx are the different weights and bi , bf , bc the respective biases . σ ( · ) and tanh ( · ) represent element-wise sigmoid and hyperbolic tangent functions . Input and forget gates control the flow of information in and out of memory . The forget gate ft controls how much memory from the last time step ct−1 is carried forward to the current state ct . The input gate it controls how much information from the input xt and hidden state ht−1 at the current timestep is stored in memory for subsequent timesteps . To find the representational timescale , we consider a “ free input ” regime with zero input to the LSTM after timestep t0 , i.e. , xt = 0 for t > t0 . Ignoring information leakage through the hidden state ( i.e. , assuming Wch = 0 , bc = 0 , and Wfh = 0 ) the cell state update becomes ct = ft ct−1 . For t > t0 , it can be further simplified as ct = f t−t0 0 c0 = e ( log f0 ) ( t−t0 ) c0 , ( 1 ) where c0 = ct0 is the cell state at t0 , and f0 = σ ( bf ) is the value of the forget gate , which depends only on the forget gate bias bf . Equation 1 shows that LSTM memory exhibits exponential decay with characteristic forgetting time T = − 1 log f0 = 1 log ( 1 + e−bf ) . ( 2 ) That is , values in the cell state tend to shrink by a factor of e every T timesteps . We refer to the forgetting time in Equation 2 as the representational timescale of an LSTM unit . Beyond the “ free input ” regime , we can estimate the timescale for a LSTM unit by measuring the average forget gate value over a set of test sequences , Test = − 1 log f̄ , ( 3 ) where f̄ = 1KN ∑N j=1 ∑K t=1 f j t , in which f j t is the forget gate value of the unit at t-th timestep for j-th test sequence , N is the number of test sequences , and K is the test sequence length . 2.2 COMBINING EXPONENTIAL TIMESCALES TO YIELD A POWER LAW . From earlier work , we know that temporal dependencies in natural language tend to decay following a power law ( Lin & Tegmark , 2016 ; Sainburg et al. , 2019 ) . Yet from Equation 1 we see that LSTM memory tends to decay exponentially . These two decay regimes are fundamentally different–the ratio of a power law divided by an exponential always tends towards infinity . However , LSTM language models contain many units , each of which can have a different timescale . Thus LSTM language models might approximate power law decay through a combination of exponential functions . Here we derive a theory for how timescales should be distributed within an LSTM in order to yield overall power law decay . Let us assume that the timescale T for each LSTM unit is drawn from a distribution P ( T ) . We want to find a P ( T ) such that the expected value over T of the function e −t T approximates a power law decay t−d for some constant d , t−d ∝ ET [ e−t/T ] = ∫ ∞ 0 P ( T ) e−t/T dT . ( 4 ) Solving this problem reveals that P ( T ) is an Inverse Gamma distribution with shape parameter α = d and scale parameter β = 1 ( see Section A.1 for derivation ) . The probability density function of the Inverse Gamma distribution is given as P ( T ; α , β ) = β α Γ ( α ) ( 1/T ) α+1e ( −β/T ) . This theoretical result suggests that in order to approximate the power law decay of information in natural language , unit timescales in LSTM language models should follow an Inverse Gamma distribution . We next perform experiments to test whether this prediction holds true for models trained on natural language and models trained on samples from a formal language with known temporal statistics . We then test whether enforcing an Inverse Gamma timescale distribution at training time improves model performance . 2.3 CONTROLLING LSTM UNIT TIMESCALES . To enforce a specific distribution of timescales in an LSTM and thus create an explicit multi-timescale model , we drew again upon the methods developed in Tallec & Ollivier ( 2018 ) . Following the analysis in Section 2.1 , the desired timescale Tdesired for an LSTM unit can be controlled by setting the forget gate bias to the value bf = − log ( e 1 Tdesired − 1 ) . ( 5 ) The balance between forgetting information from the previous timestep and adding new information from the current timestep is controlled by the relationship between forget and input gates . To maintain this balance we set the input gate bias bi to the opposite value of the forget gate , i.e. , bi = −bf . This ensures that the relation it ≈ 1− ft holds true . Importantly , these bias values remain fixed ( i.e . are not learned ) during training , in order to keep the desired timescale distribution across the network . | This paper points out the relationship between words in natural language usually follow the power law. Gated recurrent neural networks such as LSTMs excel in modelling natural language, however, the forgetting mechanism of LSTMs is ruled by the exponential decay. This work demonstrates a way to engineer the forgetting mechanism of LSTMs to mimic the power law relationship that is more presented in natural language. By applying their technique, the modified LSTM model can do better in modelling rare tokens, which usually span for longer timescales, hence the model can score lower perplexities on less frequent words. The key contribution of the paper is the derivation which shows that the forget gates of LSTMs are subject to exponential decay in zero-input regime after the first input token is given. And the expected value of exponential decay functions exp(-t/T) can approximate the power law when T is sampled from the Inverse Gamma distribution. | SP:351c576700ecf5c84f15b3a4baef958e72d099eb |
Consistency and Monotonicity Regularization for Neural Knowledge Tracing | 1 INTRODUCTION . In recent years , Artificial Intelligence in Education ( AIEd ) has gained much attention as one of the currently emerging fields in educational technology . In particular , the recent COVID-19 pandemic has transformed the setting of education from classroom learning to online learning . As a result , AIEd has become more prominent because of its ability to diagnose students automatically and provide personalized learning paths . High-quality diagnosis and educational content recommendation require good understanding of students ’ current knowledge status , and it is essential to model their learning behavior precisely . Due to this , Knowledge Tracing ( KT ) , a task of modeling a student ’ s evolution of knowledge over time , has become one of the most central tasks in AIEd research . Since the work of Piech et al . ( 2015 ) , deep neural networks have been widely used for the KT modeling . Current research trends in the KT literature concentrate on building more sophisticated , complex and large-scale models , inspired by model architectures from Natural Language Processing ( NLP ) , such as LSTM ( Hochreiter & Schmidhuber , 1997 ) or Transformer ( Vaswani et al. , 2017 ) architectures , along with additional components that extract question textual information or students ’ forgetting behaviors ( Huang et al. , 2019 ; Pu et al. , 2020 ; Ghosh et al. , 2020 ) . However , as the number of parameters of these models increases , they may easily overfit on small datasets and hurt model ’ s generalizabiliy . Such an issue has been under-explored in the literature . To address the issue , we propose simple , yet effective data augmentation strategies for improving the generalization ability of KT models , along with novel regularization losses for each strategy . In particular , we suggest three types of data augmentation , coined ( skill-based ) replacement , insertion , and deletion . Specifically , we generate augmented ( training ) samples by randomly replacing questions that a student solved with similar questions or inserting/deleting interactions with fixed responses . Then , during training , we impose certain consistency ( for replacement ) and monotonicity ( for insertion/deletion ) bias on a model ’ s predictions by optimizing corresponding regularization losses that compares the original and the augmented interaction sequences . Here , our intuition behind the proposed consistency regularization is that the model ’ s output for two interaction sequences with same response logs for similar questions should be close . Next , the proposed monotonicity regularization is designed to enforce the model ’ s prediction to be monotone with respect to the number of questions that correctly ( or incorrectly ) answered , i.e. , a student is more likely to answer correctly ( or incorrectly ) if the student did the same more in the past . By analyzing distribution of the previous correctness rates of interaction sequences , we can observe that the existing student interaction datasets indeed have monotonicity properties - see Figure 1 and Section A.2 for details . The overall augmentation and regularization strategies are sketched in Figure 2 . Such regularization strategies are motivated from our observation that existing knowledge tracing models ’ prediction often fails to satisfy the consistency and monotonicity condition , e.g. , see Figure 4 in Section 3 . We demonstrate the effectiveness of the proposed method with 3 widely used neural knowledge tracing models - DKT ( Piech et al. , 2015 ) , DKVMN ( Zhang et al. , 2017b ) , and SAINT ( Choi et al. , 2020a ) - on 4 public benchmark datasets - ASSISTments2015 , ASSISTmentsChall , STATICS2011 , and EdNet-KT1 . Extensive experiments show that , regardless of dataset or model architecture , our scheme remarkably increases the prediction performance - 6.2 % gain in Area Under Curve ( AUC ) for DKT on the ASSISTmentsChall dataset . In particular , ours is much more effective under smaller datasets : by using only 25 % of the ASSISTmentsChall dataset , we improve AUC of the DKT model from 69.68 % to 75.44 % , which even surpasses the baseline performance 74.4 % with the full training set . We further provide various ablation studies for the selected design choices , e.g. , AUC of the DKT model on the ASSISTments2015 dataset is dropped from 72.44 % to 66.48 % when we impose ‘ reversed ’ ( wrong ) monotonicity regularization . We believe that our work can be a strong guideline for other researchers attempting to improve the generalization ability of KT models . 1.1 RELATED WORKS AND PRELIMINARIES . Data augmentation is arguably the most trustworthy technique to prevent overfitting or improve the generalizability of machine learning models . In particular , it has been developed as an effective way to impose a domain-specific , inductive bias to a model . For example , for computer vision models , simple image warpings such as flip , rotation , distortion , color shifting , blur , and random erasing are the most popular data augmentation methods ( Shorten & Khoshgoftaar , 2019 ) . More advanced techniques , e.g. , augmenting images by interpolation ( Zhang et al. , 2017a ; Yun et al. , 2019 ) or by using generative adversarial networks ( Huang et al. , 2018 ) , have been also investigated . For NLP models , it is popular to augment texts by replacing words with synonyms ( Zhang et al. , 2015 ) or words with similar ( contextualized ) embeddings ( Wang & Yang , 2015 ; Kobayashi , 2018 ) . As an alternative method , back translation ( Sennrich et al. , 2016 ; Yu et al. , 2018 ) generates an augmented sentence by translating a given sentence into a different language domain and translate it back to the original domain with machine translation models . Recently , Wei & Zou ( 2019 ) show that even simple methods like random insertion/swap/deletion could improve text classification performances . In the area of speech recognition , vocal tract length normalization ( Jaitly & Hinton , 2013 ) , synthesizing noisy audio ( Hannun et al. , 2014 ) , perturbing speed ( Ko et al. , 2015 ) , and augmenting spectrogram ( Park et al. , 2019 ) are popular as data augmentation methods . The aformentioned data augmentation techniques have been used not only for standard supervised learning setups , but also for various unsupervised and semi-supervised learning frameworks , by imposing certain inductive biases to models . For example , consistency learning ( Sajjadi et al. , 2016 ; Xie et al. , 2019 ; Berthelot et al. , 2019 ; Sohn et al. , 2020 ) impose a consistency bias to a model so that the model ’ s output is invariant under the augmentations , by means of training the model with consistency regularization loss ( e.g . L2-loss between outputs ) . Abu-Mostafa ( 1992 ; 1990 ) suggested general theory for imposing such inductive biases ( which are stated as hints ) via additional regularization losses . Their successes highlight the importance of domain specific knowledge for designing appropriate data augmentation strategies , but such results are rare in the domain of AIEd , especially for Knowledge Tracing . Knowledge tracing ( KT ) is the task of modeling student knowledge over time based on the student ’ s learning history . Formally , for a given student interaction sequence ( I1 , . . . , IT ) , where each It = ( Qt , Rt ) is a pair of question id Qt and the student ’ s response correctness Rt ∈ { 0 , 1 } ( 1 means correct ) , KT aims to estimate the following probability P [ Rt = 1|I1 , I2 , . . . , It−1 , Qt ] , ( 1 ) i.e. , the probability that the student answers correctly to the question Qt at t-th step . Corbett & Anderson ( 1994 ) proposed Bayesian Knowledge Tracing ( BKT ) that models a student ’ s knowledge as a latent variable in a Hidden Markov Model . Also , various seq2seq architectures including LSTM ( Hochreiter & Schmidhuber , 1997 ) , MANN ( Graves et al. , 2016 ) , and Transformer ( Vaswani et al. , 2017 ) are used in the context of KT and showed their efficacy . Deep Knowledge Tracing ( DKT ) is the first deep learning based model that models student ’ s knowledge states as LSTM ’ s hidden state vectors ( Piech et al. , 2015 ) . Dynamic Key-Value Memory Network and its variation can exploit relationships between questions/skills with concept vectors and concept-state vectors with key and value matrices , which is more interpretable than DKT ( Zhang et al. , 2017b ; Abdelrahman & Wang , 2019 ) . Transformer based models ( Pandey & Karypis , 2019 ; Choi et al. , 2020a ; Ghosh et al. , 2020 ; Pu et al. , 2020 ) are able to learn long-range dependencies with their self-attention mechanisms and be trained in parallel . Utilizing additional features of interactions , such as question texts ( Huang et al. , 2019 ; Pandey & Srivastava , 2020 ) , prerequisite relations ( Chen et al. , 2018 ) and time information ( Nagatani et al. , 2019 ; Choi et al. , 2020a ; Pu et al. , 2020 ) is another way to improve performances . Recent works try to use graph neural networks ( Nakagawa et al. , 2019 ; Liu et al . ; Tong et al. , 2020 ; Yang et al. , 2020b ) and convolutional networks ( Yang et al. , 2020a ; Shen et al. , 2020 ) to model relations between questions and skills or extract individualized prior knowledge . 2 CONSISTENCY AND MONOTONICITY REGULARIZATION FOR KT . For a given set of data augmentations A , we train KT models with the following loss : Ltot = Lori + ∑ aug∈A ( λaugLaug + λreg-augLreg-aug ) , ( 2 ) where Lori is the commonly used binary cross-entropy ( BCE ) loss for original training sequences and Laug are the same BCE losses for augmented sequences generated by applying augmentation strategies aug ∈ A.1 Lreg-aug are the regularization losses that impose consistency and monotonicity bias on model ’ s predictions for the original and augmented sequence , which are going to be defined in the following sections . Finally , λaug , λreg-aug > 0 are hyperparameters to control the trade-off among Lori , Laug , and Lreg-aug. 1For replacement and insertion , we do not include outputs for augmented interactions in Laug . In the following sections , we introduce our three simple augmentation strategies , replacement , insertion and deletion with corresponding consistency and monotonicity regularization losses , Lreg-rep , Lreg-cor ins ( or Lreg-incor ins ) and Lreg-cor del ( or Lreg-incor del ) , respectively . 2.1 REPLACEMENT . Replacement , which is motivated by the synonym replacement in NLP , is an augmentation strategy that replaces questions in the original interaction sequence with other similar questions without changing their responses , where similar questions are defined as the questions that have overlapping skills attached to . Our hypothesis is that the predicted correctness probabilities for questions in an augmented interaction sequence will not change a lot from those in the original interaction sequence . Formally , for each interaction in the original interaction sequence ( I1 , . . . , IT ) , we randomly decide whether the interaction will be replaced or not , following the Bernoulli distribution with the probability αrep . If an interaction It = ( Qt , Rt ) with a set of skills St associated with the question Qt is set to be replaced , we determine Irept = ( Q rep t , Rt ) by selecting a question Q rep t with its associated set of skills Srept that satisfies St ∩ S rep t 6= ∅ . The resulting augmented sequence ( I rep 1 , . . . , I rep T ) is generated by replacing It with I rep t for t ∈ R ⊂ [ T ] = { 1 , 2 , . . . , T } , where R is a set of indices to replace . Then we consider the following consistency regularization loss : Lreg-rep = Et 6∈R [ ( pt − prept ) 2 ] ( 3 ) where pt and p rep t are model ’ s predicted correctness probabilities for t-th question of the original and augmented sequences , respectively . We do not include the output for the replaced interactions in the loss computation . For the replacement strategy itself we consider several variants . For instance , randomly selecting a question for Qrept from the question pool is an alternative strategy if a skill set for each question is not available . It is also possible to only consider outputs for interactions that are replaced or consider outputs for all interactions in the augmented sequence for the loss computation . We investigate the effectiveness of each strategy in Section 3 . | This paper presents some enhancements for Knowledge Tracing (KT), in which predictions are made about the odds of a student answering a question correctly given a sequence of correct/incorrect responses to previous questions. The authors observe that the predictive model should obey certain 3 common sense constraints. If a question is replaced in the student's data by a very similar question, the prediction should not change much. If an additional correct question is added to the data, the odds of the student being correct on the next question should go up, and the odds should go down for questions being removed and/or added with incorrect responses. The learning algorithm's objective function is augmented with additional terms which encourage the model to obey these constraints. | SP:a9ff7a5c458d390f57d69569ab561dc077a46238 |
Consistency and Monotonicity Regularization for Neural Knowledge Tracing | 1 INTRODUCTION . In recent years , Artificial Intelligence in Education ( AIEd ) has gained much attention as one of the currently emerging fields in educational technology . In particular , the recent COVID-19 pandemic has transformed the setting of education from classroom learning to online learning . As a result , AIEd has become more prominent because of its ability to diagnose students automatically and provide personalized learning paths . High-quality diagnosis and educational content recommendation require good understanding of students ’ current knowledge status , and it is essential to model their learning behavior precisely . Due to this , Knowledge Tracing ( KT ) , a task of modeling a student ’ s evolution of knowledge over time , has become one of the most central tasks in AIEd research . Since the work of Piech et al . ( 2015 ) , deep neural networks have been widely used for the KT modeling . Current research trends in the KT literature concentrate on building more sophisticated , complex and large-scale models , inspired by model architectures from Natural Language Processing ( NLP ) , such as LSTM ( Hochreiter & Schmidhuber , 1997 ) or Transformer ( Vaswani et al. , 2017 ) architectures , along with additional components that extract question textual information or students ’ forgetting behaviors ( Huang et al. , 2019 ; Pu et al. , 2020 ; Ghosh et al. , 2020 ) . However , as the number of parameters of these models increases , they may easily overfit on small datasets and hurt model ’ s generalizabiliy . Such an issue has been under-explored in the literature . To address the issue , we propose simple , yet effective data augmentation strategies for improving the generalization ability of KT models , along with novel regularization losses for each strategy . In particular , we suggest three types of data augmentation , coined ( skill-based ) replacement , insertion , and deletion . Specifically , we generate augmented ( training ) samples by randomly replacing questions that a student solved with similar questions or inserting/deleting interactions with fixed responses . Then , during training , we impose certain consistency ( for replacement ) and monotonicity ( for insertion/deletion ) bias on a model ’ s predictions by optimizing corresponding regularization losses that compares the original and the augmented interaction sequences . Here , our intuition behind the proposed consistency regularization is that the model ’ s output for two interaction sequences with same response logs for similar questions should be close . Next , the proposed monotonicity regularization is designed to enforce the model ’ s prediction to be monotone with respect to the number of questions that correctly ( or incorrectly ) answered , i.e. , a student is more likely to answer correctly ( or incorrectly ) if the student did the same more in the past . By analyzing distribution of the previous correctness rates of interaction sequences , we can observe that the existing student interaction datasets indeed have monotonicity properties - see Figure 1 and Section A.2 for details . The overall augmentation and regularization strategies are sketched in Figure 2 . Such regularization strategies are motivated from our observation that existing knowledge tracing models ’ prediction often fails to satisfy the consistency and monotonicity condition , e.g. , see Figure 4 in Section 3 . We demonstrate the effectiveness of the proposed method with 3 widely used neural knowledge tracing models - DKT ( Piech et al. , 2015 ) , DKVMN ( Zhang et al. , 2017b ) , and SAINT ( Choi et al. , 2020a ) - on 4 public benchmark datasets - ASSISTments2015 , ASSISTmentsChall , STATICS2011 , and EdNet-KT1 . Extensive experiments show that , regardless of dataset or model architecture , our scheme remarkably increases the prediction performance - 6.2 % gain in Area Under Curve ( AUC ) for DKT on the ASSISTmentsChall dataset . In particular , ours is much more effective under smaller datasets : by using only 25 % of the ASSISTmentsChall dataset , we improve AUC of the DKT model from 69.68 % to 75.44 % , which even surpasses the baseline performance 74.4 % with the full training set . We further provide various ablation studies for the selected design choices , e.g. , AUC of the DKT model on the ASSISTments2015 dataset is dropped from 72.44 % to 66.48 % when we impose ‘ reversed ’ ( wrong ) monotonicity regularization . We believe that our work can be a strong guideline for other researchers attempting to improve the generalization ability of KT models . 1.1 RELATED WORKS AND PRELIMINARIES . Data augmentation is arguably the most trustworthy technique to prevent overfitting or improve the generalizability of machine learning models . In particular , it has been developed as an effective way to impose a domain-specific , inductive bias to a model . For example , for computer vision models , simple image warpings such as flip , rotation , distortion , color shifting , blur , and random erasing are the most popular data augmentation methods ( Shorten & Khoshgoftaar , 2019 ) . More advanced techniques , e.g. , augmenting images by interpolation ( Zhang et al. , 2017a ; Yun et al. , 2019 ) or by using generative adversarial networks ( Huang et al. , 2018 ) , have been also investigated . For NLP models , it is popular to augment texts by replacing words with synonyms ( Zhang et al. , 2015 ) or words with similar ( contextualized ) embeddings ( Wang & Yang , 2015 ; Kobayashi , 2018 ) . As an alternative method , back translation ( Sennrich et al. , 2016 ; Yu et al. , 2018 ) generates an augmented sentence by translating a given sentence into a different language domain and translate it back to the original domain with machine translation models . Recently , Wei & Zou ( 2019 ) show that even simple methods like random insertion/swap/deletion could improve text classification performances . In the area of speech recognition , vocal tract length normalization ( Jaitly & Hinton , 2013 ) , synthesizing noisy audio ( Hannun et al. , 2014 ) , perturbing speed ( Ko et al. , 2015 ) , and augmenting spectrogram ( Park et al. , 2019 ) are popular as data augmentation methods . The aformentioned data augmentation techniques have been used not only for standard supervised learning setups , but also for various unsupervised and semi-supervised learning frameworks , by imposing certain inductive biases to models . For example , consistency learning ( Sajjadi et al. , 2016 ; Xie et al. , 2019 ; Berthelot et al. , 2019 ; Sohn et al. , 2020 ) impose a consistency bias to a model so that the model ’ s output is invariant under the augmentations , by means of training the model with consistency regularization loss ( e.g . L2-loss between outputs ) . Abu-Mostafa ( 1992 ; 1990 ) suggested general theory for imposing such inductive biases ( which are stated as hints ) via additional regularization losses . Their successes highlight the importance of domain specific knowledge for designing appropriate data augmentation strategies , but such results are rare in the domain of AIEd , especially for Knowledge Tracing . Knowledge tracing ( KT ) is the task of modeling student knowledge over time based on the student ’ s learning history . Formally , for a given student interaction sequence ( I1 , . . . , IT ) , where each It = ( Qt , Rt ) is a pair of question id Qt and the student ’ s response correctness Rt ∈ { 0 , 1 } ( 1 means correct ) , KT aims to estimate the following probability P [ Rt = 1|I1 , I2 , . . . , It−1 , Qt ] , ( 1 ) i.e. , the probability that the student answers correctly to the question Qt at t-th step . Corbett & Anderson ( 1994 ) proposed Bayesian Knowledge Tracing ( BKT ) that models a student ’ s knowledge as a latent variable in a Hidden Markov Model . Also , various seq2seq architectures including LSTM ( Hochreiter & Schmidhuber , 1997 ) , MANN ( Graves et al. , 2016 ) , and Transformer ( Vaswani et al. , 2017 ) are used in the context of KT and showed their efficacy . Deep Knowledge Tracing ( DKT ) is the first deep learning based model that models student ’ s knowledge states as LSTM ’ s hidden state vectors ( Piech et al. , 2015 ) . Dynamic Key-Value Memory Network and its variation can exploit relationships between questions/skills with concept vectors and concept-state vectors with key and value matrices , which is more interpretable than DKT ( Zhang et al. , 2017b ; Abdelrahman & Wang , 2019 ) . Transformer based models ( Pandey & Karypis , 2019 ; Choi et al. , 2020a ; Ghosh et al. , 2020 ; Pu et al. , 2020 ) are able to learn long-range dependencies with their self-attention mechanisms and be trained in parallel . Utilizing additional features of interactions , such as question texts ( Huang et al. , 2019 ; Pandey & Srivastava , 2020 ) , prerequisite relations ( Chen et al. , 2018 ) and time information ( Nagatani et al. , 2019 ; Choi et al. , 2020a ; Pu et al. , 2020 ) is another way to improve performances . Recent works try to use graph neural networks ( Nakagawa et al. , 2019 ; Liu et al . ; Tong et al. , 2020 ; Yang et al. , 2020b ) and convolutional networks ( Yang et al. , 2020a ; Shen et al. , 2020 ) to model relations between questions and skills or extract individualized prior knowledge . 2 CONSISTENCY AND MONOTONICITY REGULARIZATION FOR KT . For a given set of data augmentations A , we train KT models with the following loss : Ltot = Lori + ∑ aug∈A ( λaugLaug + λreg-augLreg-aug ) , ( 2 ) where Lori is the commonly used binary cross-entropy ( BCE ) loss for original training sequences and Laug are the same BCE losses for augmented sequences generated by applying augmentation strategies aug ∈ A.1 Lreg-aug are the regularization losses that impose consistency and monotonicity bias on model ’ s predictions for the original and augmented sequence , which are going to be defined in the following sections . Finally , λaug , λreg-aug > 0 are hyperparameters to control the trade-off among Lori , Laug , and Lreg-aug. 1For replacement and insertion , we do not include outputs for augmented interactions in Laug . In the following sections , we introduce our three simple augmentation strategies , replacement , insertion and deletion with corresponding consistency and monotonicity regularization losses , Lreg-rep , Lreg-cor ins ( or Lreg-incor ins ) and Lreg-cor del ( or Lreg-incor del ) , respectively . 2.1 REPLACEMENT . Replacement , which is motivated by the synonym replacement in NLP , is an augmentation strategy that replaces questions in the original interaction sequence with other similar questions without changing their responses , where similar questions are defined as the questions that have overlapping skills attached to . Our hypothesis is that the predicted correctness probabilities for questions in an augmented interaction sequence will not change a lot from those in the original interaction sequence . Formally , for each interaction in the original interaction sequence ( I1 , . . . , IT ) , we randomly decide whether the interaction will be replaced or not , following the Bernoulli distribution with the probability αrep . If an interaction It = ( Qt , Rt ) with a set of skills St associated with the question Qt is set to be replaced , we determine Irept = ( Q rep t , Rt ) by selecting a question Q rep t with its associated set of skills Srept that satisfies St ∩ S rep t 6= ∅ . The resulting augmented sequence ( I rep 1 , . . . , I rep T ) is generated by replacing It with I rep t for t ∈ R ⊂ [ T ] = { 1 , 2 , . . . , T } , where R is a set of indices to replace . Then we consider the following consistency regularization loss : Lreg-rep = Et 6∈R [ ( pt − prept ) 2 ] ( 3 ) where pt and p rep t are model ’ s predicted correctness probabilities for t-th question of the original and augmented sequences , respectively . We do not include the output for the replaced interactions in the loss computation . For the replacement strategy itself we consider several variants . For instance , randomly selecting a question for Qrept from the question pool is an alternative strategy if a skill set for each question is not available . It is also possible to only consider outputs for interactions that are replaced or consider outputs for all interactions in the augmented sequence for the loss computation . We investigate the effectiveness of each strategy in Section 3 . | Knowledge tracing is a longstanding task in educational data mining and has been tackled by various studies. This paper proposed that three data augmentation methods (along with different types of regularization losses) can be applied to boost the performance of existing deep neural network models for knowledge tracing. Overall, the methods developed by this paper seem technically sound. In particular, the experiments are rather extensive, i.e., four widely-used datasets were employed in the experiments and different variants of the methods were investigated and compared. However, my biggest concern for this paper is its connection with previous studies and the design principles behind the proposed methods. To be specific, there are a few places that need to be further justified or a more clear explanation. | SP:a9ff7a5c458d390f57d69569ab561dc077a46238 |
Bayesian neural network parameters provide insights into the earthquake rupture physics. | 1 INTRODUCTION . Because of the limited observational data and computational cost , geoscientists often rely on simple low-resolution simulations to study physical systems such as dynamic earthquake rupture , long-term tectonic process , etc . Such simplified models are indeed a powerful tool beside the observational data but sometimes can not capture the proper physics of the system . As a result , it becomes difficult to accurately identify and understand the underlying causes . Machine learning ( ML ) approaches have been successfully used to solve many such geophysical problems with limited data and require computational overhead . For example , Ahamed & Daub ( 2019 ) used neural network and random forest algorithms to predict if an earthquake can break through a fault with geometric heterogeneity . The authors used 1600 simulated rupture data points to train the models . They identified several patterns responsible for earthquake rupture . Machine learning approaches are also used in seismic event detection ( Rouet-Leduc et al. , 2017 ) , earthquake detection ( Perol et al. , 2018 ) , identifying faults from unprocessed raw seismic data ( Last et al. , 2016 ) and to predict broadband earthquake ground motions from 3D physics-based numerical simulations ( Paolucci et al. , 2018 ) . All the examples show the potential application ML to solve many unsolved geophysical problems . However , the machine learning model ’ s performance usually depends on the quality and quantity of data . Bad quality or insufficient data increases the uncertainty of the predictions ( Hoeting et al. , 1999 ; Blei et al. , 2017 ; Gal et al. , 2017 ) . Therefore , estimating the source of uncertainty is vital to understanding the physics of earthquake rupture and seismic risk . On top of that black-box nature of the ML algorithms inhibits mapping the input features with model output prediction . As a result , it becomes challenging for scientists to make actionable decisions . To overcome insufficient earthquake rupture data , I used the Bayesian neural network algorithm to develop a model reusing the simulations data of Ahamed & Daub ( 2019 ) . I present an exciting approach to learning the patterns of earthquake ruptures from the trained model parameters . Unlike regular neural networks , BNN works better with a small amount of data and provides prediction uncertainty . The approach gives more information on rupture physics than the traditional geophys- ical methods . I also describe the workflow of ( 1 ) developing a BNN and ( 2 ) estimating prediction uncertainty . 2 EARTHQUAKE RUPTURE SIMULATIONS . I used the simulated earthquake rupture dataset created by Ahamed & Daub ( 2019 ) . The simulations are a two-dimensional rupture , illustrated in figure . 1 . The domain is 32 km long and 24 km wide . Figure 1a shows the zoomed view of the original domain for better visualization of the fault barrier . Rupture is nucleated 10 km to the left of the barrier and propagates towards the barrier . In each simulation , eight parameters were varied : x and y components of normal stress ( sxx and syy ) , shear stress ( sxy ) , dynamic friction coefficient , friction drop ( µs − µd ) , critical slip distance ( dc ) , and width and height of the fault . The fault starts to break when the shear stress ( τ ) on the fault exceeds the peak strength τs = µsσn , where µs and σn are the static friction coefficient and normal stress , respectively . Over a critical slip distance dc , the friction coefficient reduces linearly to constant dynamic friction µd . 1600 simulation data points were used to train , and 400 were used to test the model performance . The training dataset has an imbalance class proportion of rupture arrest ( 65 % ) and rupture propagation ( 35 % ) . To avoid a bias toward rupture arrest , I upsampled the rupture propagation examples . Before training , all the data were normalized by subtracting the mean and dividing by the standard deviation . 3 BAYESIAN NEURAL NETWORK . In a traditional neural network , weights are assigned as a single value or point estimate . In a BNN , weights are considered as a probability distribution . These probability distributions are used to estimate the uncertainty in weights and predictions . Figure 2 shows a schematic diagram of a BNN where weights are normally distributed . The posterior network parameters are calculated using the following equation : P ( W |X ) = P ( X|W ) P ( W ) P ( X ) ( 1 ) Where X is the data , P ( X|W ) is the likelihood of observing X , given weights ( W ) . P ( W ) is the prior belief of the weights , and the denominator P ( X ) is the probability of data which is also known as evidence . The equation requires integrating over all possible values of the weights as : P ( X ) = ∫ P ( X|W ) P ( W ) dW . ( 2 ) Integrating over the indefinite weights in evidence makes it hard to find a closed-form analytical solution . As a result , simulation or numerical based alternative approaches such as Monte Carlo Markov chain ( MCMC ) and variational inference ( VI ) are considered . MCMC sampling is an inference method in modern Bayesian statistics , perhaps widely studied and applied in many situations . However , the technique is slow for large datasets and complex models . Variational inference ( VI ) , on the other hand , is faster . It has been applied to solve many large-scale computationally expensive neuroscience and computer vision problems ( Blei et al. , 2017 ) . In VI , ar new distribution Q ( W |θ ) is considered that approximates the true posterior P ( W |X ) . Q ( W |θ ) is parameterized by θ over W and VI finds the right set of θ that minimizes the divergence of two distributions through optimization : Q∗ ( W ) = argmin θ KL [ Q ( W |θ ) ||P ( W |X ) ] ( 3 ) In equation-3 , KL or Kullback–Leibler divergence is a non-symmetric and information theoretic measure of similarity ( relative entropy ) between true and approximated distributions ( Kullback , 1997 ) . The KL-divergence between Q ( W |θ ) and P ( W |X ) is defined as : KL [ Q ( W |θ ) ||P ( W |X ) ] = ∫ Q ( W |θ ) log Q ( W |θ ) P ( W |X ) dW ( 4 ) Replacing P ( W |X ) using equation-1 we get : KL [ Q ( W |θ ) ||P ( W |X ) ] = ∫ Q ( W |θ ) log Q ( W |θ ) P ( X ) P ( X|W ) P ( W ) dW = ∫ Q ( W |θ ) [ logQ ( W |θ ) P ( X ) − logP ( X|W ) P ( W ) ] dW = ∫ Q ( W |θ ) log Q ( W |θ ) P ( W ) dW + ∫ Q ( W |θ ) logP ( X ) dW − ∫ Q ( W |θ ) logP ( X|W ) dW ( 5 ) Taking the expectation with respect to Q ( W |θ ) , we get : KL [ Q ( W |θ ) ||P ( W |X ) ] = E [ log Q ( W |θ ) P ( W ) ] + logP ( X ) − E [ logP ( X|W ) ] ( 6 ) The above equation shows the dependency of logP ( X ) that makes it difficult to compute . An alternative objective function is therefore , derived by adding logP ( X ) with negative KL divergence . logP ( X ) is a constant with respect to Q ( W |θ ) . The new function is called as the evidence of lower bound ( ELBO ) and expressed as : ELBO ( Q ) = E [ logP ( X|W ) ] − E [ log Q ( W |θ ) P ( W ) ] ( 7 ) = E [ logP ( X|W ) ] −KL [ Q ( W |θ ) ||P ( W |X ) ] ( 8 ) The first term is called likelihood , and the second term is the negative KL divergence between a variational distribution and prior weight distribution . Therefore , ELBO balances between the likelihood and the prior . The ELBO objective function can be optimized to minimize the KL divergence using different optimizing algorithms like gradient descent . 4 TRAINING BAYESIAN NEURAL NETWORK . The BNN has the same NN architecture used in Ahamed & Daub ( 2019 ) to compare the performance between them . Like NN , BNN has one input layer with eight parameters , one hidden layer with twelve nodes , and one output layer ( Figure 2 ) . A nonlinear activation function ReLu ( Hahnloser et al. , 2000 ) was used at the hidden layer . ReLu passes all the values greater than zero and sets the negative output to zero . The output layer uses sigmoid activation function , which converts the outputs between zero and one . Prior weights and biases are normally distributed with zero mean and one standard deviation . Figure 3 shows the log density of prior and posterior weights ( wkij ) and biases ( b k j ) . i and j are the index of the input and hidden layer nodes . i ranges from 0 to 7 , and j ranges from 0 to 11. k is the index that maps two layers . For example , w015 is the weight between the first input node and the fifth hidden node . The output node of the last layer produces a distribution of prediction scores between 0 and 1 . The prediction distributions are used to compute standard deviation , which is the uncertainty metric . Adam optimization ( extension of stochastic gradient descent ) was used to minimize the KL divergence by finding a suitable variational parameter θ . The initial learning rate is 0.5 , which exponentially decays as the training progresses . To train the BNN , I use Edward ( Tran et al. , 2016 ; 2017 ) , TensoFlow ( Abadi et al. , 2015 ) and Scikit-learn ( Pedregosa et al. , 2011 ) . Edward is a Python-based Bayesian deep learning library for probabilistic modeling , inference , and criticism . All the training data , codes , and the corresponding visualizations can be found on the Github repository : https : //github.com/msahamed/earthquake_physics_bayesian_nn 5 PRIOR AND POSTERIOR PARAMETER DISTRIBUTION . To evaluate the parameters ( weights and biases ) of the BNN , 1000 posterior samples of w0ij , w 1 jk , b0 and b1 were used . Figure 3 shows the prior and posterior distribution of mean weight and biases . The posterior location of the mean and density of the weights and biases are different from their priors . For example , the location of w0 shifts toward non-negative value , while the density remains similar . Whereas , the w1 , b0 , and b1 have a different posterior mean location and density than their prior . The differences between prior and posterior indicate that the BNN has learned from the data and adjusted the posterior distribution accordingly . The performance of the BNN was evaluated using 400 test simulations . For a given test example , 1000 posterior samples were used to determine the class and associated uncertainty . Uncertainty is the standard deviation of the prediction scores . The test accuracy of the BNN is 83.34 % , which is 2.34 % higher than NN . In the following subsection , I discuss how uncertainty can help us understand physics and find the parameter combinations responsible for an earthquake rupture . | This paper proposes a Bayesian neural network for predicting if an earthquake will break a fault or not, overcoming 'small data problem' and predicting model uncertainty. The data is composed of 8 features and a binary output, and the samples are all coming from simulations. An analysis on the means and standard deviations of the first and last layer of the neural network's weights has been carried out. | SP:3a3df1703d2f59babf2fc1abd8b17975479fc8a5 |
Bayesian neural network parameters provide insights into the earthquake rupture physics. | 1 INTRODUCTION . Because of the limited observational data and computational cost , geoscientists often rely on simple low-resolution simulations to study physical systems such as dynamic earthquake rupture , long-term tectonic process , etc . Such simplified models are indeed a powerful tool beside the observational data but sometimes can not capture the proper physics of the system . As a result , it becomes difficult to accurately identify and understand the underlying causes . Machine learning ( ML ) approaches have been successfully used to solve many such geophysical problems with limited data and require computational overhead . For example , Ahamed & Daub ( 2019 ) used neural network and random forest algorithms to predict if an earthquake can break through a fault with geometric heterogeneity . The authors used 1600 simulated rupture data points to train the models . They identified several patterns responsible for earthquake rupture . Machine learning approaches are also used in seismic event detection ( Rouet-Leduc et al. , 2017 ) , earthquake detection ( Perol et al. , 2018 ) , identifying faults from unprocessed raw seismic data ( Last et al. , 2016 ) and to predict broadband earthquake ground motions from 3D physics-based numerical simulations ( Paolucci et al. , 2018 ) . All the examples show the potential application ML to solve many unsolved geophysical problems . However , the machine learning model ’ s performance usually depends on the quality and quantity of data . Bad quality or insufficient data increases the uncertainty of the predictions ( Hoeting et al. , 1999 ; Blei et al. , 2017 ; Gal et al. , 2017 ) . Therefore , estimating the source of uncertainty is vital to understanding the physics of earthquake rupture and seismic risk . On top of that black-box nature of the ML algorithms inhibits mapping the input features with model output prediction . As a result , it becomes challenging for scientists to make actionable decisions . To overcome insufficient earthquake rupture data , I used the Bayesian neural network algorithm to develop a model reusing the simulations data of Ahamed & Daub ( 2019 ) . I present an exciting approach to learning the patterns of earthquake ruptures from the trained model parameters . Unlike regular neural networks , BNN works better with a small amount of data and provides prediction uncertainty . The approach gives more information on rupture physics than the traditional geophys- ical methods . I also describe the workflow of ( 1 ) developing a BNN and ( 2 ) estimating prediction uncertainty . 2 EARTHQUAKE RUPTURE SIMULATIONS . I used the simulated earthquake rupture dataset created by Ahamed & Daub ( 2019 ) . The simulations are a two-dimensional rupture , illustrated in figure . 1 . The domain is 32 km long and 24 km wide . Figure 1a shows the zoomed view of the original domain for better visualization of the fault barrier . Rupture is nucleated 10 km to the left of the barrier and propagates towards the barrier . In each simulation , eight parameters were varied : x and y components of normal stress ( sxx and syy ) , shear stress ( sxy ) , dynamic friction coefficient , friction drop ( µs − µd ) , critical slip distance ( dc ) , and width and height of the fault . The fault starts to break when the shear stress ( τ ) on the fault exceeds the peak strength τs = µsσn , where µs and σn are the static friction coefficient and normal stress , respectively . Over a critical slip distance dc , the friction coefficient reduces linearly to constant dynamic friction µd . 1600 simulation data points were used to train , and 400 were used to test the model performance . The training dataset has an imbalance class proportion of rupture arrest ( 65 % ) and rupture propagation ( 35 % ) . To avoid a bias toward rupture arrest , I upsampled the rupture propagation examples . Before training , all the data were normalized by subtracting the mean and dividing by the standard deviation . 3 BAYESIAN NEURAL NETWORK . In a traditional neural network , weights are assigned as a single value or point estimate . In a BNN , weights are considered as a probability distribution . These probability distributions are used to estimate the uncertainty in weights and predictions . Figure 2 shows a schematic diagram of a BNN where weights are normally distributed . The posterior network parameters are calculated using the following equation : P ( W |X ) = P ( X|W ) P ( W ) P ( X ) ( 1 ) Where X is the data , P ( X|W ) is the likelihood of observing X , given weights ( W ) . P ( W ) is the prior belief of the weights , and the denominator P ( X ) is the probability of data which is also known as evidence . The equation requires integrating over all possible values of the weights as : P ( X ) = ∫ P ( X|W ) P ( W ) dW . ( 2 ) Integrating over the indefinite weights in evidence makes it hard to find a closed-form analytical solution . As a result , simulation or numerical based alternative approaches such as Monte Carlo Markov chain ( MCMC ) and variational inference ( VI ) are considered . MCMC sampling is an inference method in modern Bayesian statistics , perhaps widely studied and applied in many situations . However , the technique is slow for large datasets and complex models . Variational inference ( VI ) , on the other hand , is faster . It has been applied to solve many large-scale computationally expensive neuroscience and computer vision problems ( Blei et al. , 2017 ) . In VI , ar new distribution Q ( W |θ ) is considered that approximates the true posterior P ( W |X ) . Q ( W |θ ) is parameterized by θ over W and VI finds the right set of θ that minimizes the divergence of two distributions through optimization : Q∗ ( W ) = argmin θ KL [ Q ( W |θ ) ||P ( W |X ) ] ( 3 ) In equation-3 , KL or Kullback–Leibler divergence is a non-symmetric and information theoretic measure of similarity ( relative entropy ) between true and approximated distributions ( Kullback , 1997 ) . The KL-divergence between Q ( W |θ ) and P ( W |X ) is defined as : KL [ Q ( W |θ ) ||P ( W |X ) ] = ∫ Q ( W |θ ) log Q ( W |θ ) P ( W |X ) dW ( 4 ) Replacing P ( W |X ) using equation-1 we get : KL [ Q ( W |θ ) ||P ( W |X ) ] = ∫ Q ( W |θ ) log Q ( W |θ ) P ( X ) P ( X|W ) P ( W ) dW = ∫ Q ( W |θ ) [ logQ ( W |θ ) P ( X ) − logP ( X|W ) P ( W ) ] dW = ∫ Q ( W |θ ) log Q ( W |θ ) P ( W ) dW + ∫ Q ( W |θ ) logP ( X ) dW − ∫ Q ( W |θ ) logP ( X|W ) dW ( 5 ) Taking the expectation with respect to Q ( W |θ ) , we get : KL [ Q ( W |θ ) ||P ( W |X ) ] = E [ log Q ( W |θ ) P ( W ) ] + logP ( X ) − E [ logP ( X|W ) ] ( 6 ) The above equation shows the dependency of logP ( X ) that makes it difficult to compute . An alternative objective function is therefore , derived by adding logP ( X ) with negative KL divergence . logP ( X ) is a constant with respect to Q ( W |θ ) . The new function is called as the evidence of lower bound ( ELBO ) and expressed as : ELBO ( Q ) = E [ logP ( X|W ) ] − E [ log Q ( W |θ ) P ( W ) ] ( 7 ) = E [ logP ( X|W ) ] −KL [ Q ( W |θ ) ||P ( W |X ) ] ( 8 ) The first term is called likelihood , and the second term is the negative KL divergence between a variational distribution and prior weight distribution . Therefore , ELBO balances between the likelihood and the prior . The ELBO objective function can be optimized to minimize the KL divergence using different optimizing algorithms like gradient descent . 4 TRAINING BAYESIAN NEURAL NETWORK . The BNN has the same NN architecture used in Ahamed & Daub ( 2019 ) to compare the performance between them . Like NN , BNN has one input layer with eight parameters , one hidden layer with twelve nodes , and one output layer ( Figure 2 ) . A nonlinear activation function ReLu ( Hahnloser et al. , 2000 ) was used at the hidden layer . ReLu passes all the values greater than zero and sets the negative output to zero . The output layer uses sigmoid activation function , which converts the outputs between zero and one . Prior weights and biases are normally distributed with zero mean and one standard deviation . Figure 3 shows the log density of prior and posterior weights ( wkij ) and biases ( b k j ) . i and j are the index of the input and hidden layer nodes . i ranges from 0 to 7 , and j ranges from 0 to 11. k is the index that maps two layers . For example , w015 is the weight between the first input node and the fifth hidden node . The output node of the last layer produces a distribution of prediction scores between 0 and 1 . The prediction distributions are used to compute standard deviation , which is the uncertainty metric . Adam optimization ( extension of stochastic gradient descent ) was used to minimize the KL divergence by finding a suitable variational parameter θ . The initial learning rate is 0.5 , which exponentially decays as the training progresses . To train the BNN , I use Edward ( Tran et al. , 2016 ; 2017 ) , TensoFlow ( Abadi et al. , 2015 ) and Scikit-learn ( Pedregosa et al. , 2011 ) . Edward is a Python-based Bayesian deep learning library for probabilistic modeling , inference , and criticism . All the training data , codes , and the corresponding visualizations can be found on the Github repository : https : //github.com/msahamed/earthquake_physics_bayesian_nn 5 PRIOR AND POSTERIOR PARAMETER DISTRIBUTION . To evaluate the parameters ( weights and biases ) of the BNN , 1000 posterior samples of w0ij , w 1 jk , b0 and b1 were used . Figure 3 shows the prior and posterior distribution of mean weight and biases . The posterior location of the mean and density of the weights and biases are different from their priors . For example , the location of w0 shifts toward non-negative value , while the density remains similar . Whereas , the w1 , b0 , and b1 have a different posterior mean location and density than their prior . The differences between prior and posterior indicate that the BNN has learned from the data and adjusted the posterior distribution accordingly . The performance of the BNN was evaluated using 400 test simulations . For a given test example , 1000 posterior samples were used to determine the class and associated uncertainty . Uncertainty is the standard deviation of the prediction scores . The test accuracy of the BNN is 83.34 % , which is 2.34 % higher than NN . In the following subsection , I discuss how uncertainty can help us understand physics and find the parameter combinations responsible for an earthquake rupture . | In the present paper, the author intends to get further insights into the physics behind earthquake ruptures using a BNN to model simulated data from the literature. By using a BNN, the parameters of the model are not deterministic scalar values, but complete probability distributions. Studying the change of the distributions in the parameters before and after training, the author tries to extract information about the relative importance of the input variables, and also comprehend the physical mechanisms behind earthquake ruptures. Results are shown in figure 3, on which the change of behavior of the distributions of the parameters can be observed, as well as in figure 4 where the mean and standard deviations for all the parameters are presented. The pattern in figure 6 seems to indicate that variables previously thought to be important in the task of predicting the presence of the rupture, such as normal stress and friction, are also pointed out as being important in this case. Finally, the authors also claim an improvement in the F1 metric in comparison to previous NN methods. | SP:3a3df1703d2f59babf2fc1abd8b17975479fc8a5 |
Learning from Protein Structure with Geometric Vector Perceptrons | 1 INTRODUCTION . Many efforts in structural biology aim to predict , or derive insights from , the structure of a macromolecule ( such as a protein , RNA , or DNA ) , represented as a set of positions associated with atoms or groups of atoms in 3D Euclidean space . These problems can often be framed as functions mapping the input domain of structures to some property of interest—for example , predicting the quality of a structural model or determining whether two molecules will bind in a particular geometry . Thanks to their importance and difficulty , such problems , which we broadly refer to as learning from structure , have recently developed into an exciting and promising application area for deep learning ( Graves et al. , 2020 ; Ingraham et al. , 2019 ; Pereira et al. , 2016 ; Townshend et al. , 2019 ; Won et al. , 2019 ) . Successful applications of deep learning are often driven by techniques that leverage the problem structure of the domain—for example , convolutions in computer vision ( Cohen & Shashua , 2017 ) and attention in natural language processing ( Vaswani et al. , 2017 ) . What are the relevant considerations in the domain of learning from structure ? Using proteins as the most common example , we have on the one hand the arrangement and orientation of the amino acid residues in space , which govern the dynamics and function of the molecule ( Berg et al. , 2002 ) . On the other hand , proteins also possess relational structure in terms of their amino-acid sequence and the residue-residue interactions that mediate the aforementioned protein properties ( Hammes-Schiffer & Benkovic , 2006 ) . We refer to these as the geometric and relational aspects of the problem domain , respectively . Recent state-of-the-art methods for learning from structure leverage one of these two aspects . Commonly , such methods employ either graph neural networks ( GNNs ) , which are expressive in terms of relational reasoning ( Battaglia et al. , 2018 ) , or convolutional neural networks ( CNNs ) , which operate directly on the geometry of the structure . Here , we present a unifying architecture that bridges these two families of methods to leverage both aspects of the problem domain . We do so by introducing geometric vector perceptrons ( GVPs ) , a drop-in replacement for standard multi-layer perceptrons ( MLPs ) in aggregation and feed-forward layers of GNNs . GVPs operate directly on both scalar and geometric features—features that transform as a vector under a rotation of spatial coordinates . GVPs therefore allow for the embedding of geometric information at nodes and ∗Equal contribution edges without reducing such information to scalars that may not fully capture complex geometry . We postulate that our approach makes it easier for a GNN to learn functions whose significant features are both geometric and relational . Our method ( GVP-GNN ) can be applied to any problem where the input domain is a structure of a single macromolecule or of molecules bound to one another . In this work , we specifically demonstrate our approach on two problems connected to protein structure : computational protein design and model quality assessment . Computational protein design ( CPD ) is the conceptual inverse of protein structure prediction , aiming to infer an amino acid sequence that will fold into a given structure . Model quality assessment ( MQA ) aims to select the best structural model of a protein from a large pool of candidate structures and is an important step in structure prediction ( Cheng et al. , 2019 ) . Our method outperforms existing methods on both tasks . 2 RELATED WORK . ML methods for learning from protein structure largely fall into one of three types , operating on sequential , voxelized , or graph-structured representations of proteins . We briefly discuss each type and introduce state-of-the-art examples for MQA and CPD to set the stage for our experiments later . Sequential representations In traditional models of learning from protein structure , each amino acid is represented as a feature vector using hand-crafted representations of the 3D structural environment . These representations include residue contacts ( Olechnovič & Venclovas , 2017 ) , orientations or positions collectively projected to local coordinates ( Karasikov et al. , 2019 ) , physicsinspired energy terms ( O ’ Connell et al. , 2018 ; Uziela et al. , 2017 ) , or context-free grammars of protein topology ( Greener et al. , 2018 ) . The structure is then viewed as a sequence or collection of such features which can be fed into a 1D convolutional network , RNN , or dense feedforward network . Although these methods only indirectly represent the full 3D structure of the protein , a number of them , such as ProQ4 ( Hurtado et al. , 2018 ) , VoroMQA ( Olechnovič & Venclovas , 2017 ) , and SBROD ( Karasikov et al. , 2019 ) , are competitive in assessments of MQA . Voxelized representations In lieu of hand-crafted representations of structure , 3D convolutional neural networks ( CNNs ) can operate directly on the positions of atoms in space , encoded as occupancy maps in a voxelized 3D volume . The hierarchical convolutions of such networks are easily compatible with the detection of structural motifs , binding pockets , and the specific shapes of other important structural features , leveraging the geometric aspect of the domain . A number of CPD methods ( Anand et al. , 2020 ; Zhang et al. , 2019 ; Shroff et al. , 2019 ) and the MQA methods 3DCNN ( Derevyanko et al. , 2018 ) and Ornate ( Pagès et al. , 2019 ) exemplify the power of this approach . Graph-structured representations A protein structure can also be represented as a proximity graph over amino acid nodes , reducing the challenge of representing a collective structural neighborhood in a single feature vector to that of representing individual edges . Graph neural networks ( GNNs ) can then perform complex relational reasoning over structures ( Battaglia et al. , 2018 ) —for example , identifying key relationships among amino acids , or flexible structural motifs described as a connectivity pattern rather than a rigid shape . Recent state-of-the-art GNNs include Structured Transformer ( Ingraham et al. , 2019 ) on CPD , ProteinSolver ( Strokach et al. , 2020 ) on CPD and mutation stability prediction , and GraphQA ( Baldassarre et al. , 2020 ) on MQA . These methods vary in their representation of geometry : while some , such as ProteinSolver and GraphQA , represent edges as a function of their length , others , such as Structured Transformer , indirectly encode the 3D geometry of the proximity graph in terms of relative orientations and other scalar features . 3 METHODS . Our architecture seeks to combine the strengths of CNN and GNN methods in learning from biomolecular structure by improving the latter ’ s ability to reason geometrically . The GNNs described in the previous section encode the 3D geometry of the protein by encoding vector features ( such as node orientations and edge directions ) in terms of rotation-invariant scalars , often by defining a local coordinate system at each node . We instead propose that these features be directly represented as geometric vectors—features in R3 which transform appropriately under a change of spatial coordinates—at all steps of graph propagation . This conceptual shift has two important ramifications . First , the input representation is more efficient : instead of encoding the orientation of a node by its relative orientation with all of its neighbors , we only have to represent one absolute orientation per node . Second , it standardizes a global coordinate system across the entire structure , which allows geometric features to be directly propagated without transforming between local coordinates . For example , representations of arbitrary positions in space—including points that are not themselves nodes—can be easily propagated across the graph by Euclidean vector addition . We postulate this allows the GNN to more easily access global geometric properties of the structure . The key challenge with this representation , however , is to perform graph propagation in a way that simultaneously preserves the full expressive power of the original GNN while maintaining the rotation invariance provided by the scalar representations . We do so by introducing a new module , the geometric vector perceptron , to replace dense layers in a GNN . 3.1 GEOMETRIC VECTOR PERCEPTRONS . The geometric vector perceptron is a simple module for learning vector-valued and scalar-valued functions over geometric vectors and scalars . That is , given a tuple ( s , V ) of scalar features s ∈ Rn and vector features V ∈ Rν×3 , we compute new features ( s′ , V′ ) ∈ Rm ×Rµ×3 . The computation is illustrated in Figure 1A and formally described in Algorithm 1 . At its core , the GVP consists of two separate linear transformations Wm , Wh for the scalar and vector features , followed by nonlinearities σ , σ+ . However , before the scalar features are transformed , we concatenate the L2 norm of the transformed vector features Vh ; this allows us to extract rotation-invariant information from the input vectors V. An additional linear transformation Wµ is inserted just before the vector nonlinearity to control the output dimensionality independently of the number of norms extracted . The GVP is conceptually simple , yet provably possesses the desired properties of invariance/equivariance and expressiveness . First , the vector and scalar outputs of the GVP are equivariant and invariant , respectively , with respect to an arbitrary composition R of rotations and reflections in 3D Euclidean space — i.e. , if GVP ( s , V ) = ( s′ , V′ ) then GVP ( s , R ( V ) ) = ( s′ , R ( V′ ) ) ( 1 ) Algorithm 1 Geometric vector perceptron Input : Scalar and vector features ( s , V ) ∈ Rn × Rν×3 . Output : Scalar and vector features ( s′ , V′ ) ∈ Rm × Rµ×3 . h← max ( ν , µ ) GVP : Vh ←WhV ∈ Rh×3 Vµ ←WµVh ∈ Rµ×3 sh ← ‖Vh‖2 ( row-wise ) ∈ Rh vµ ← ‖Vµ‖2 ( row-wise ) ∈ R µ sh+n ← concat ( sh , s ) ∈ Rh+n sm ←Wmsh+n + b ∈ Rm s′ ← σ ( sm ) ∈ Rm V′ ← σ+ ( vµ ) Vµ ( row-wise multiplication ) ∈ Rµ×3 return ( s′ , V′ ) This is due to the fact that the only operations on vector-valued inputs are scalar multiplication , linear combination , and the L2 norm.1 We include a formal proof in Appendix A . In addition , the GVP architecture can approximate any continuous rotation- and reflection-invariant scalar-valued function of V. More precisely , let Gs be a GVP defined with n , µ = 0—that is , one which transforms vector features to scalar features . Then for any function f : Rν×3 → R invariant with respect to rotations and reflections in 3D , there exists a functional form Gs able to -approximate f , given mild assumptions . Theorem . Let R describe an arbitrary rotation and/or reflection in R3 . For ν ≥ 3 let Ων ⊂ Rν×3 be the set of all V = [ v1 , . . . , vν ] T ∈ Rν×3 such that v1 , v2 , v3 are linearly independent and 0 < ||vi||2 ≤ b for all i and some finite b > 0 . Then for any continuous F : Ων → R such that F ( R ( V ) ) = F ( V ) and for any > 0 , there exists a form f ( V ) = wTGs ( V ) such that |F ( V ) − f ( V ) | < for all V ∈ Ων . We include a formal proof in Appendix A . As a corollary , a GVP with nonzero n , µ is also able to approximate similarly-defined functions over the full input domain Rn × Rν×3 . In addition to the GVP layer itself , we use a version of dropout that drops entire vector channels at random ( as opposed to coordinates within vector channels ) . We also introduce layer normalization for the vector features as V← V/ √ 1 ν ‖V‖22 ∈ R ν×3 ( 2 ) That is , we scale the row vectors of V such that their root-mean-square norm is one . This vector layer norm has no trainable parameters , but we continue to use normal layer normalization on scalar channels with trainable parameters γ , β . We study our hypothesis that GVPs augment the geometric reasoning ability of GNNs on a synthetic dataset ( Appendix B ) . The synthetic dataset allows us to control the function underlying the groundtruth label in order to explicitly separate geometric and relational aspects in different tasks . The GVP-augmented GNN ( or GVP-GNN ) matches a CNN on a geometric task and a standard GNN on a relational task . However , when we combine the two tasks in one objective , the GVP-GNN does significantly better than either a GNN or a CNN . | The challenge of predicting the structure of biological macro-molecules is widely relevant in many applications and difficult to address. This paper divides the types of approaches taken to address this challenge into those that use "geometric" information (i.e. positions of molecules in space), and those that utilize "relational methods" mainly through graphs (how different parts of molecule relate). This study is an attempt to integrate the two source of information by a novel network architecture. They introduce geometric vector perceptrons as a way of summarizing geometric information for graph layers without loss of information as it happens in dense layers. They evaluate the performance of these architectures on MQA and CPD tasks, both relevant and standard benchmarks in the field. | SP:5042502317c1ae133d310b3ede02e7abde1a7507 |
Learning from Protein Structure with Geometric Vector Perceptrons | 1 INTRODUCTION . Many efforts in structural biology aim to predict , or derive insights from , the structure of a macromolecule ( such as a protein , RNA , or DNA ) , represented as a set of positions associated with atoms or groups of atoms in 3D Euclidean space . These problems can often be framed as functions mapping the input domain of structures to some property of interest—for example , predicting the quality of a structural model or determining whether two molecules will bind in a particular geometry . Thanks to their importance and difficulty , such problems , which we broadly refer to as learning from structure , have recently developed into an exciting and promising application area for deep learning ( Graves et al. , 2020 ; Ingraham et al. , 2019 ; Pereira et al. , 2016 ; Townshend et al. , 2019 ; Won et al. , 2019 ) . Successful applications of deep learning are often driven by techniques that leverage the problem structure of the domain—for example , convolutions in computer vision ( Cohen & Shashua , 2017 ) and attention in natural language processing ( Vaswani et al. , 2017 ) . What are the relevant considerations in the domain of learning from structure ? Using proteins as the most common example , we have on the one hand the arrangement and orientation of the amino acid residues in space , which govern the dynamics and function of the molecule ( Berg et al. , 2002 ) . On the other hand , proteins also possess relational structure in terms of their amino-acid sequence and the residue-residue interactions that mediate the aforementioned protein properties ( Hammes-Schiffer & Benkovic , 2006 ) . We refer to these as the geometric and relational aspects of the problem domain , respectively . Recent state-of-the-art methods for learning from structure leverage one of these two aspects . Commonly , such methods employ either graph neural networks ( GNNs ) , which are expressive in terms of relational reasoning ( Battaglia et al. , 2018 ) , or convolutional neural networks ( CNNs ) , which operate directly on the geometry of the structure . Here , we present a unifying architecture that bridges these two families of methods to leverage both aspects of the problem domain . We do so by introducing geometric vector perceptrons ( GVPs ) , a drop-in replacement for standard multi-layer perceptrons ( MLPs ) in aggregation and feed-forward layers of GNNs . GVPs operate directly on both scalar and geometric features—features that transform as a vector under a rotation of spatial coordinates . GVPs therefore allow for the embedding of geometric information at nodes and ∗Equal contribution edges without reducing such information to scalars that may not fully capture complex geometry . We postulate that our approach makes it easier for a GNN to learn functions whose significant features are both geometric and relational . Our method ( GVP-GNN ) can be applied to any problem where the input domain is a structure of a single macromolecule or of molecules bound to one another . In this work , we specifically demonstrate our approach on two problems connected to protein structure : computational protein design and model quality assessment . Computational protein design ( CPD ) is the conceptual inverse of protein structure prediction , aiming to infer an amino acid sequence that will fold into a given structure . Model quality assessment ( MQA ) aims to select the best structural model of a protein from a large pool of candidate structures and is an important step in structure prediction ( Cheng et al. , 2019 ) . Our method outperforms existing methods on both tasks . 2 RELATED WORK . ML methods for learning from protein structure largely fall into one of three types , operating on sequential , voxelized , or graph-structured representations of proteins . We briefly discuss each type and introduce state-of-the-art examples for MQA and CPD to set the stage for our experiments later . Sequential representations In traditional models of learning from protein structure , each amino acid is represented as a feature vector using hand-crafted representations of the 3D structural environment . These representations include residue contacts ( Olechnovič & Venclovas , 2017 ) , orientations or positions collectively projected to local coordinates ( Karasikov et al. , 2019 ) , physicsinspired energy terms ( O ’ Connell et al. , 2018 ; Uziela et al. , 2017 ) , or context-free grammars of protein topology ( Greener et al. , 2018 ) . The structure is then viewed as a sequence or collection of such features which can be fed into a 1D convolutional network , RNN , or dense feedforward network . Although these methods only indirectly represent the full 3D structure of the protein , a number of them , such as ProQ4 ( Hurtado et al. , 2018 ) , VoroMQA ( Olechnovič & Venclovas , 2017 ) , and SBROD ( Karasikov et al. , 2019 ) , are competitive in assessments of MQA . Voxelized representations In lieu of hand-crafted representations of structure , 3D convolutional neural networks ( CNNs ) can operate directly on the positions of atoms in space , encoded as occupancy maps in a voxelized 3D volume . The hierarchical convolutions of such networks are easily compatible with the detection of structural motifs , binding pockets , and the specific shapes of other important structural features , leveraging the geometric aspect of the domain . A number of CPD methods ( Anand et al. , 2020 ; Zhang et al. , 2019 ; Shroff et al. , 2019 ) and the MQA methods 3DCNN ( Derevyanko et al. , 2018 ) and Ornate ( Pagès et al. , 2019 ) exemplify the power of this approach . Graph-structured representations A protein structure can also be represented as a proximity graph over amino acid nodes , reducing the challenge of representing a collective structural neighborhood in a single feature vector to that of representing individual edges . Graph neural networks ( GNNs ) can then perform complex relational reasoning over structures ( Battaglia et al. , 2018 ) —for example , identifying key relationships among amino acids , or flexible structural motifs described as a connectivity pattern rather than a rigid shape . Recent state-of-the-art GNNs include Structured Transformer ( Ingraham et al. , 2019 ) on CPD , ProteinSolver ( Strokach et al. , 2020 ) on CPD and mutation stability prediction , and GraphQA ( Baldassarre et al. , 2020 ) on MQA . These methods vary in their representation of geometry : while some , such as ProteinSolver and GraphQA , represent edges as a function of their length , others , such as Structured Transformer , indirectly encode the 3D geometry of the proximity graph in terms of relative orientations and other scalar features . 3 METHODS . Our architecture seeks to combine the strengths of CNN and GNN methods in learning from biomolecular structure by improving the latter ’ s ability to reason geometrically . The GNNs described in the previous section encode the 3D geometry of the protein by encoding vector features ( such as node orientations and edge directions ) in terms of rotation-invariant scalars , often by defining a local coordinate system at each node . We instead propose that these features be directly represented as geometric vectors—features in R3 which transform appropriately under a change of spatial coordinates—at all steps of graph propagation . This conceptual shift has two important ramifications . First , the input representation is more efficient : instead of encoding the orientation of a node by its relative orientation with all of its neighbors , we only have to represent one absolute orientation per node . Second , it standardizes a global coordinate system across the entire structure , which allows geometric features to be directly propagated without transforming between local coordinates . For example , representations of arbitrary positions in space—including points that are not themselves nodes—can be easily propagated across the graph by Euclidean vector addition . We postulate this allows the GNN to more easily access global geometric properties of the structure . The key challenge with this representation , however , is to perform graph propagation in a way that simultaneously preserves the full expressive power of the original GNN while maintaining the rotation invariance provided by the scalar representations . We do so by introducing a new module , the geometric vector perceptron , to replace dense layers in a GNN . 3.1 GEOMETRIC VECTOR PERCEPTRONS . The geometric vector perceptron is a simple module for learning vector-valued and scalar-valued functions over geometric vectors and scalars . That is , given a tuple ( s , V ) of scalar features s ∈ Rn and vector features V ∈ Rν×3 , we compute new features ( s′ , V′ ) ∈ Rm ×Rµ×3 . The computation is illustrated in Figure 1A and formally described in Algorithm 1 . At its core , the GVP consists of two separate linear transformations Wm , Wh for the scalar and vector features , followed by nonlinearities σ , σ+ . However , before the scalar features are transformed , we concatenate the L2 norm of the transformed vector features Vh ; this allows us to extract rotation-invariant information from the input vectors V. An additional linear transformation Wµ is inserted just before the vector nonlinearity to control the output dimensionality independently of the number of norms extracted . The GVP is conceptually simple , yet provably possesses the desired properties of invariance/equivariance and expressiveness . First , the vector and scalar outputs of the GVP are equivariant and invariant , respectively , with respect to an arbitrary composition R of rotations and reflections in 3D Euclidean space — i.e. , if GVP ( s , V ) = ( s′ , V′ ) then GVP ( s , R ( V ) ) = ( s′ , R ( V′ ) ) ( 1 ) Algorithm 1 Geometric vector perceptron Input : Scalar and vector features ( s , V ) ∈ Rn × Rν×3 . Output : Scalar and vector features ( s′ , V′ ) ∈ Rm × Rµ×3 . h← max ( ν , µ ) GVP : Vh ←WhV ∈ Rh×3 Vµ ←WµVh ∈ Rµ×3 sh ← ‖Vh‖2 ( row-wise ) ∈ Rh vµ ← ‖Vµ‖2 ( row-wise ) ∈ R µ sh+n ← concat ( sh , s ) ∈ Rh+n sm ←Wmsh+n + b ∈ Rm s′ ← σ ( sm ) ∈ Rm V′ ← σ+ ( vµ ) Vµ ( row-wise multiplication ) ∈ Rµ×3 return ( s′ , V′ ) This is due to the fact that the only operations on vector-valued inputs are scalar multiplication , linear combination , and the L2 norm.1 We include a formal proof in Appendix A . In addition , the GVP architecture can approximate any continuous rotation- and reflection-invariant scalar-valued function of V. More precisely , let Gs be a GVP defined with n , µ = 0—that is , one which transforms vector features to scalar features . Then for any function f : Rν×3 → R invariant with respect to rotations and reflections in 3D , there exists a functional form Gs able to -approximate f , given mild assumptions . Theorem . Let R describe an arbitrary rotation and/or reflection in R3 . For ν ≥ 3 let Ων ⊂ Rν×3 be the set of all V = [ v1 , . . . , vν ] T ∈ Rν×3 such that v1 , v2 , v3 are linearly independent and 0 < ||vi||2 ≤ b for all i and some finite b > 0 . Then for any continuous F : Ων → R such that F ( R ( V ) ) = F ( V ) and for any > 0 , there exists a form f ( V ) = wTGs ( V ) such that |F ( V ) − f ( V ) | < for all V ∈ Ων . We include a formal proof in Appendix A . As a corollary , a GVP with nonzero n , µ is also able to approximate similarly-defined functions over the full input domain Rn × Rν×3 . In addition to the GVP layer itself , we use a version of dropout that drops entire vector channels at random ( as opposed to coordinates within vector channels ) . We also introduce layer normalization for the vector features as V← V/ √ 1 ν ‖V‖22 ∈ R ν×3 ( 2 ) That is , we scale the row vectors of V such that their root-mean-square norm is one . This vector layer norm has no trainable parameters , but we continue to use normal layer normalization on scalar channels with trainable parameters γ , β . We study our hypothesis that GVPs augment the geometric reasoning ability of GNNs on a synthetic dataset ( Appendix B ) . The synthetic dataset allows us to control the function underlying the groundtruth label in order to explicitly separate geometric and relational aspects in different tasks . The GVP-augmented GNN ( or GVP-GNN ) matches a CNN on a geometric task and a standard GNN on a relational task . However , when we combine the two tasks in one objective , the GVP-GNN does significantly better than either a GNN or a CNN . | In this paper, the authors introduce a novel procedure to predict or acquire insights from the structure of a macromolecule (such as a protein, RNA, or DNA), represented as a set of positions associated with atoms or groups of atoms in 3D Euclidean space. Their approach, called GVP-GNN, can be applied to any problem where the input domain is a structure of a single macromolecule or molecules bound to one another. Their approach is divided into two steps: model quality assessment and computational protein design. | SP:5042502317c1ae133d310b3ede02e7abde1a7507 |
On Representing (Anti)Symmetric Functions | 1 INTRODUCTION . Neural Networks ( NN ) , or more precisely , Multi-Layer Perceptrons ( MLP ) , are universal function approximators [ Pin99 ] in the sense that every ( say ) continuous function can be approximated arbitrarily well by a sufficiently large NN . The true power of NN though stems from the fact that they apparently have a bias towards functions we care about and that they can be trained by local gradient-descent or variations thereof . For many problems we have additional information about the function , e.g . symmetries under which the function of interest is invariant or covariant . Here we consider functions that are covariant¬ under permutations . Of particular interest are functions that are invariant® , equivariant¯ , or antisymmetric° under permutations . Definition 1 ( ( Anti ) symmetric and equivariant functions ) A function φ : Xn → R in n ∈ N variables is called symmetric iff φ ( x1 , ... , xn ) = φ ( xπ ( 1 ) , ... , xπ ( n ) ) for all x1 , ... , xn ∈ X for all permutations π ∈ Sn , where Sn : = { π : { 1 : n } → { 1 : n } ∧ π is bijection } is called the symmetric group and { 1 : n } is short for { 1 , ... , n } . Similarly , a function ψ : Xn → R is called anti-symmetric ( AS ) iff ψ ( x1 , ... , xn ) = σ ( π ) ψ ( xπ ( 1 ) , ... , xπ ( n ) ) , where σ ( π ) = ±1 is the parity or sign of permutation π . A function ϕ : Xn → X ′n is called equivariant under permutations iff ϕ ( Sπ ( x ) ) = Sπ ( ϕ ( x ) ) , where x ≡ ( x1 , ... , xn ) and Sπ ( x1 , ... , xn ) : = ( xπ ( 1 ) , ... , xπ ( n ) ) . Of course ( anti ) symmetric functions are also just functions , hence a NN of sufficient capacity can also represent ( anti ) symmetric functions , and if trained on an ( anti ) symmetric target could converge to an ( anti ) symmetric function . But NNs that can represent only ( anti ) symmetric functions are desirable for multiple reasons . Equivariant MLP ( EMLP ) are the basis for constructing symmetric functions by simply summing the output of the last layer , and for anti-symmetric ( AS ) functions by ¬In full generality , a function f : X → Y is covariant under group operations g ∈ G , if f ( RXg ( x ) ) = RYg ( f ( x ) ) , where RXg : X → X and RYg : Y → Y are representations of group ( element ) g ∈ G. The symmetric group G = Sn is the group of all permutations=bijections π : { 1 , ... , n } → { 1 , ... , n } . ®RYg =Identity . Permutation-invariant functions are also called ‘ totally symmetric functions ’ or simply ‘ sym- metric function ’ . ¯General Y and X , often Y = X and RYg = RXg , also called covariant . °RYg = ±1 for even/odd permutations . multiplying with Vandermonde determinants or by computing their generalized Slater determinant ( GSD ) defined later . The most prominent application is in quantum physics which represents systems of identical ( fermions ) bosons with ( anti ) symmetric wave functions [ PSMF20 ] . Another application is classification of point clouds in computer vision , which should be invariant under permutation of points [ ZKR+18 ] . Even if a general NN can learn the ( anti ) symmetry , it will only do so approximately , but some applications require exact ( anti ) symmetry , for instance in quantum physics to guarantee upper bounds on the true ground state energy [ PSMF20 ] . This has spawned interest in NNs that can represent only ( anti ) symmetric functions [ ZKR+18 , HLL+19 ] . A natural question is whether such NNs can represent all reasonable ( anti ) symmetric functions , which is the focus of this paper . We will answer this question for the ( symmetric ) EMLP [ ZKR+18 ] defined in Section 6 and for the ( AS ) FermiNet [ PSMF20 ] defined in Sections 4 & 5 & 6 . Approximation architectures need to satisfy a number of criteria to be practically useful : ( a ) they can approximate a large class of functions , e.g . all continuous ( anti ) symmetric functions , ( b ) only the ( anti ) symmetric functions can be represented , ( c ) a fast algorithm exists for computing the approximation , ( d ) the representation itself is continuous or differentiable , ( e ) the architecture is suitable for learning the function from data ( which we don ’ t discuss ) . Section 2 reviews existing approximation results for ( anti ) symmetric functions . Section 3 discusses various “ naive ” representations ( linear , sampling , sorting ) and their ( dis ) advantages , before introducing the “ standard ” solution that satisfies ( a ) - ( e ) based on algebraic composition of basis functions , symmetric polynomials , and polarized bases . For simplicity the section considers only totally symmetric functions of their n real-valued inputs ( the d = 1 case ) , i.e . particles in one dimension . Section 4 proves the representation power of a single GSD for totally anti-symmetric ( AS ) functions ( also d = 1 ) . Technically we reduce the GSD to a Vandermonde determinant , and determine the loss of differentiability due to the Vandermonde determinant . From Sections 5 on we consider the general case of functions with n · d inputs that are ( anti ) symmetric when permuting their n ddimensional input vectors . The case d = 3 is particularly relevant for particles and point clouds in 3D space . The difficulties encountered for d = 1 transfer to d > 1 , while the positive results don ’ t , or only with considerable extra effort . The universality construction and proof for the EMLP is outlined in Section 6 with a proper treatment and all details in Sections 6-8 of the supplementary , which implies universality of symmetric MLPs and of the AS FermiNet . Section 7 concludes . We took great care to unify notation from different sources . The list of notation in the appendix should be helpful to disambiguate some similarly looking but different notation . Our main novel contributions are establishing the universality of the anti-symmetric FermiNet with a single GSD ( Theorems 3 & 5 & 7 ) for d = 1 and d > 1 ( the results are non-trivial and unexpected ) , and the universality of ( 2-hidden-layer ) symmetric MLPs ( Theorem 6 ) with a complete and explicit and self-contained equivariant universality construction based on ( smooth ) polynomials . We took care to avoid relying on results with inherently asymptotic or tabulation or discontinuous character , to enable ( in future work ) good approximation rates for specific function classes , such as smooth functions or those with ‘ nice ’ Fourier transform [ Bar93 , Mak96 ] , The supplementary material contains the extended version of this paper with ( more ) details , discussion , and proofs . 2 RELATED WORK . The study of universal approximation properties of NN has a long history , see e.g . [ Pin99 ] for a pre-millennium survey , and e.g . [ LSYZ20 ] for recent results and references . For ( anti ) symmetric NN such investigation has only recently begun [ ZKR+18 , WFE+19 , HLL+19 , SI19 ] . Functions on sets are necessarily invariant under permutation , since the order of set elements is irrelevant . For countable domain , [ ZKR+18 ] derive a general representation based on encoding domain elements as bits into the binary expansion of real numbers . They conjecture that the construction can be generalized to uncountable domains such as Rd , but it would have to involve pathological everywhere discontinuous functions [ WFE+19 ] . Functions on sets of fixed size n are equivalent to symmetric functions in n variables . [ ZKR+18 ] prove a symmetric version of Kolmogorov-Arnold ’ s superposition theorem [ Kol57 ] ( for d = 1 ) based on elementary symmetric polynomials und using Newton ’ s identities , also known as Girard-Newton or Newton-Girard formulae , which we will generalize to d > 1 . Another proof is provided based on homeomorphisms between vectors and ordered vectors , also with no obvious generalization to d > 1 . They do not consider AS functions . For symmetric functions and any d ≥ 1 , [ HLL+19 ] provide two proofs of the symmetric superposition theorem of [ ZKR+18 ] : Every symmetric function can be approximated by symmetric polynomials , symmetrized monomials can be represented as a permanents , and Ryser ’ s formula brings the representation into the desired polarized superposition form . The down-side is that computing permanents is NP complete , and exponentially many symmetrized monomials are needed to approximate f . The second proof discretizes the input space into a n · d-dimensional lattice and uses indicator functions for each grid cell . They then symmetrize the indicator functions , and approximate f by these piecewise constant symmetric indicator functions instead of polynomials , also using Ryser formula for the final representation . Super-exponentially many indicator functions are needed , but explicit error bounds are provided . The construction is discontinuous but they remark on how to make it continuous . Approximating AS f for d ≥ 1 is based on a similar lattice construction , but by summing super-exponentially many Vandermonde determinants , leading to a similar bound . We show that a single Vandermonde/Slater determinant suffices but without bound . Additionally for d = 1 we determine the loss in smoothness this construction suffers from . [ SI19 ] prove tighter but still exponential bounds if f is Lipschitz w.r.t . ` ∞ based on sorting which inevitably introduces irreparable discontinuities for d > 1 . The FermiNet [ PSMF20 ] is also based on EMLPs [ ZKR+18 ] but anti-symmetrizes not with Vandermonde determinants but with GSDs . It has shown remarkable practical performance for modelling the ground state of a variety of atoms and small molecules . To achieve good performance , a linear combination of GSDs has been used . We show that in principle a single GSD suffices , a sort of generalized Hartree-Fock approximation . This is contrast to the increasing number of conventional Slater determinants required for increasing accuracy . Our result implies ( with some caveats ) that the improved practical performance of multiple GSDs is due to a limited ( approximation and/or learning ) capacity of the EMLP , rather than a fundamental limit of the GSD . 3 ONE-DIMENSIONAL SYMMETRY . This section reviews various approaches to representing symmetric functions , and is the broadest review we are aware of . To ease discussion and notation , we consider d = 1 in this section . Most considerations generalize easily to d > 1 , some require significant effort , and others break . We discuss various “ naive ” representations ( linear , sampling ) and their ( dis ) advantages , before introducing the “ standard ” solution that can satisfy ( a ) - ( e ) . All representations consist of a finite set of fixed ( inner ) basis functions , which are linearly , algebraically , functionally , or otherwise combined . We then introduce symmetric polynomials , which can be used to prove the “ standard ” representation theorem for d = 1 . The extended version contains a broader and deeper review of alternative representations , including composition by inversion , generally invariant linear bases , symmetric functions by sorting , and linear bases for symmetric polynomials . Indeed it is the broadest review we are aware of , and unified and summarized as far as possible in one big table . The extended review may also help to better grasp the concepts introduced in this section , since it is less dense and contains some illustrating examples . Motivation . Consider n ∈ N one-dimensional particles with coordinates xi ∈ R for particle i = 1 , ... , n. In quantum mechanics the probability amplitude of the ground state can be described by a real-valued joint wave function χ ( x1 , ... , xn ) . Bosons φ have a totally symmetric wave function : φ ( x1 , ... , xn ) = φ ( xπ ( 1 ) , ... , xπ ( n ) ) for all permutations π ∈ Sn ⊂ { 1 : n } → { 1 : n } . Fermions ψ have totally Anti-Symmetric ( AS ) wave functions : ψ ( x1 , ... , xn ) = σ ( π ) ψ ( xπ ( 1 ) , ... , xπ ( n ) ) , where σ ( π ) = ±1 is the parity or sign of permutation π . Wave functions are continuous and almost everywhere differentiable , and often posses higher derivatives or are even analytic . Nothing in this work hinges on any special properties wave functions may possess or interpreting them as such , and the precise conditions required for our results to hold are stated in the theorems . We are interested in representing or approximating all and only such ( anti ) symmetric functions by neural networks . Abbreviate x ≡ ( x1 , ... , xn ) and let Sπ ( x ) : = ( xπ ( 1 ) , ... , xπ ( n ) ) be the permuted coordinates . There is an easy way to ( anti ) symmetrize any function , φ ( x ) = 1 n ! ∑ π∈Sn χ ( Sπ ( x ) ) , ψ ( x ) = 1 n ! ∑ π∈Sn σ ( π ) χ ( Sπ ( x ) ) ( 1 ) and any ( anti ) symmetric function can be represented in this form ( proof : use χ : = φ or χ : = ψ ) . If we train a NN χ : Rn → R to approximate some function f : Rn → R to accuracy ε > 0 , then φ ( ψ ) are ( anti ) symmetric approximations of f to accuracy ε > 0 too , provided f itself is ( anti ) symmetric . Instead of averaging , the minimum or maximum or median or many other compositions would also work , but the average has the advantage that smooth χ lead to smooth φ and ψ , and more general , preserves many desirable properties such as ( Lipschitz/absolute/ ... ) continuity , ( k-times ) differentiability , analyticity , etc . It possibly has all important desirable properties , but one : Time complexity , sampling , learning . The problem with this approach is that it has n ! terms , and evaluating χ super-exponentially often is intractable even for moderate n , especially if χ is a NN . There can also be no clever trick to linearly ( anti ) symmetrize arbitrary functions fast , intuitively since the sum pools n ! independent regions of χ . In the extended version we prove that computing φ and ψ are indeed NP-hard . There we also show that approximating ( 1 ) by sampling permutations is unsuitable , especially for ψ due to sign cancellations . Even if we could compute ( 1 ) fast , a NN would represent the function separately on all n ! regions , hence potentially requires n ! more training samples to learn from than an intrinsically ( anti ) symmetric NN . See the extended version for a more detailed discussion . Function composition and bases . Before delving into proving universality of the EMLP and the FermiNet , it is instructive to first review the general concepts of function composition and basis functions , since a NN essentially is a composition of basis functions . We want to represent/decompose functions as f ( x ) = g ( β ( x ) ) . In this work we are interested in symmetric β , where ultimately β will be represented by the first ( couple of ) layer ( s ) of an EMLP , and g by the second ( couple of ) layer ( s ) . Of particular interest is β ( x ) = n∑ i=1 η ( xi ) ( 2 ) for then β and hence f are obviously symmetric ( permutation invariant ) in x. Anti-symmetry is more difficult and will be dealt with later . Formally let f ∈ F ⊆ Rn → R be a function ( class ) we wish to represent or approximate . Let βb : Rn → R be basis functions for b = 1 , ... , m ∈ N ∪ { ∞ } , and β ≡ ( β1 , ... , βm ) : Rn → Rm be what we call basis vector ( function ) , and ηb : R → R a basis template , sometimes called inner function [ Act18 ] or polarized bass function . Let g ∈ G ⊆ Rm → R be a composition function ( class ) , sometimes called ‘ outer function ’ [ Act18 ] , which creates new functions from the basis functions . Let G ◦ β = { g ( β ( · ) ) : g ∈ G } be the class of representable functions , and G ◦ β its topological closure , i.e . the class of all approximable functions.± β is called a G-basis for F if F = G ◦ β or F = G ◦ β , depending on context . Interesting classes of compositions are linear Glin : = { g : g ( x ) = a0 + ∑m i=1 xi ; a0 , ai ∈ R } , algebraic Galg : = { multivariate polynomials } , functional Gfunc : = Rm → R , and Ck-functional Gkfunc : = Ck for k-times continuously differentiable functions . The extended version illustrates on some simple examples how larger composition classes G allow ( drastically ) smaller bases ( m ) to represent the same functions F . Algebraic basis for symmetric polynomials . It is well-known that the elementary symmetric polynomials eb ( x ) generated by n∏ i=1 ( 1 + λxi ) = : 1 + λe1 ( x ) + λ 2e2 ( x ) + ... + λ nen ( x ) ( 3 ) ±Functions may be defined on sub-spaces of Rk , function composition may not exists , and convergence can be w.r.t . different topologies . We will ignore these technicalities unless important for our results , but the reader may assume compact-open topology , which induces uniform convergence on compacta . are an algebraic basis of all symmetric polynomials . Explicit expressions are e1 ( x ) = ∑ i xi , and e2 ( x ) = ∑ i < j xixj , ... , and en ( x ) = x1 ... xn , and in general eb ( x ) = ∑ i1 < ... < ib xi1 ... xib . For given x , the polynomial in λ on the l.h.s . of ( 3 ) can be expanded to the r.h.s . in quadratic time or by FFT even in time O ( n log n ) , so the e ( x ) can be computed in time O ( n log n ) , but is not of the desired form ( 2 ) . Luckily Newton already solved this problem for us . Newton ’ s identities express the elementary symmetric polynomials e1 ( x ) , ... , en ( x ) as polynomials in pb ( x ) : = ∑n i=1 x b i , b = 1 , ... , n , hence also β ( x ) : = ( p1 ( x ) , ... , pn ( x ) ) is an algebraic basis for all symmetric polynomials , hence by closure for all continuous symmetric functions , and is of desired form ( 2 ) : Theorem 2 ( Symmetric polarized superposition [ ZKR+18 , WFE+19 , Thm.7 ] ) Every continuous symmetric function φ : Rn → R can be represented as φ ( x ) = g ( ∑ i η ( xi ) ) with η ( x ) = ( x , x2 , ... , xn ) and continuous g : Rn → R. [ ZKR+18 ] provide two proofs , one based on ‘ composition by inversion ’ , the other using symmetric polynomials and Newton ’ s identities . The non-trivial generalization to d > 1 is provided in Section 5 . Theorem 2 is a symmetric version of the infamous Kolmogorov-Arnold superposition theorem [ Kol57 ] , which solved Hilbert ’ s 13th problem . Its deep and obscure² constructions continue to fill whole PhD theses [ Liu15 , Act18 ] . It is quite remarkable that the symmetric version above is very natural and comparably easy to prove . For given x , the basis β ( x ) can be computed in time O ( n2 ) , so is actually slower to compute than e ( x ) . The elementary symmetric polynomials also have other advantages ( integral coefficients for integral polynomials , works for fields other than R , is numerically more stable , mimics 1,2,3 , ... particle interactions ) , so symmetric NN based on eb rather than pb may be worth pursuing . Note that we need at least m ≥ n functional bases for a continuous representation , so Theorem 2 is optimal in this sense [ WFE+19 ] . The extended version contains a discussion and a table with bases and properties . | This paper is about representing functions $\psi : (\mathbb{R}^d)^n \rightarrow \mathbb{R}$ that are symmetric or asymmetric with respect to the permutation group $S_n$. The aim is to consider neural networks giving only functions that symmetric or asymmetric, and to establish universality results. The motivation comes from applications such quantum physics or computer vision with permutation symmetries. | SP:cd78fd328ffefb039b4f7629174f06f582a63920 |
On Representing (Anti)Symmetric Functions | 1 INTRODUCTION . Neural Networks ( NN ) , or more precisely , Multi-Layer Perceptrons ( MLP ) , are universal function approximators [ Pin99 ] in the sense that every ( say ) continuous function can be approximated arbitrarily well by a sufficiently large NN . The true power of NN though stems from the fact that they apparently have a bias towards functions we care about and that they can be trained by local gradient-descent or variations thereof . For many problems we have additional information about the function , e.g . symmetries under which the function of interest is invariant or covariant . Here we consider functions that are covariant¬ under permutations . Of particular interest are functions that are invariant® , equivariant¯ , or antisymmetric° under permutations . Definition 1 ( ( Anti ) symmetric and equivariant functions ) A function φ : Xn → R in n ∈ N variables is called symmetric iff φ ( x1 , ... , xn ) = φ ( xπ ( 1 ) , ... , xπ ( n ) ) for all x1 , ... , xn ∈ X for all permutations π ∈ Sn , where Sn : = { π : { 1 : n } → { 1 : n } ∧ π is bijection } is called the symmetric group and { 1 : n } is short for { 1 , ... , n } . Similarly , a function ψ : Xn → R is called anti-symmetric ( AS ) iff ψ ( x1 , ... , xn ) = σ ( π ) ψ ( xπ ( 1 ) , ... , xπ ( n ) ) , where σ ( π ) = ±1 is the parity or sign of permutation π . A function ϕ : Xn → X ′n is called equivariant under permutations iff ϕ ( Sπ ( x ) ) = Sπ ( ϕ ( x ) ) , where x ≡ ( x1 , ... , xn ) and Sπ ( x1 , ... , xn ) : = ( xπ ( 1 ) , ... , xπ ( n ) ) . Of course ( anti ) symmetric functions are also just functions , hence a NN of sufficient capacity can also represent ( anti ) symmetric functions , and if trained on an ( anti ) symmetric target could converge to an ( anti ) symmetric function . But NNs that can represent only ( anti ) symmetric functions are desirable for multiple reasons . Equivariant MLP ( EMLP ) are the basis for constructing symmetric functions by simply summing the output of the last layer , and for anti-symmetric ( AS ) functions by ¬In full generality , a function f : X → Y is covariant under group operations g ∈ G , if f ( RXg ( x ) ) = RYg ( f ( x ) ) , where RXg : X → X and RYg : Y → Y are representations of group ( element ) g ∈ G. The symmetric group G = Sn is the group of all permutations=bijections π : { 1 , ... , n } → { 1 , ... , n } . ®RYg =Identity . Permutation-invariant functions are also called ‘ totally symmetric functions ’ or simply ‘ sym- metric function ’ . ¯General Y and X , often Y = X and RYg = RXg , also called covariant . °RYg = ±1 for even/odd permutations . multiplying with Vandermonde determinants or by computing their generalized Slater determinant ( GSD ) defined later . The most prominent application is in quantum physics which represents systems of identical ( fermions ) bosons with ( anti ) symmetric wave functions [ PSMF20 ] . Another application is classification of point clouds in computer vision , which should be invariant under permutation of points [ ZKR+18 ] . Even if a general NN can learn the ( anti ) symmetry , it will only do so approximately , but some applications require exact ( anti ) symmetry , for instance in quantum physics to guarantee upper bounds on the true ground state energy [ PSMF20 ] . This has spawned interest in NNs that can represent only ( anti ) symmetric functions [ ZKR+18 , HLL+19 ] . A natural question is whether such NNs can represent all reasonable ( anti ) symmetric functions , which is the focus of this paper . We will answer this question for the ( symmetric ) EMLP [ ZKR+18 ] defined in Section 6 and for the ( AS ) FermiNet [ PSMF20 ] defined in Sections 4 & 5 & 6 . Approximation architectures need to satisfy a number of criteria to be practically useful : ( a ) they can approximate a large class of functions , e.g . all continuous ( anti ) symmetric functions , ( b ) only the ( anti ) symmetric functions can be represented , ( c ) a fast algorithm exists for computing the approximation , ( d ) the representation itself is continuous or differentiable , ( e ) the architecture is suitable for learning the function from data ( which we don ’ t discuss ) . Section 2 reviews existing approximation results for ( anti ) symmetric functions . Section 3 discusses various “ naive ” representations ( linear , sampling , sorting ) and their ( dis ) advantages , before introducing the “ standard ” solution that satisfies ( a ) - ( e ) based on algebraic composition of basis functions , symmetric polynomials , and polarized bases . For simplicity the section considers only totally symmetric functions of their n real-valued inputs ( the d = 1 case ) , i.e . particles in one dimension . Section 4 proves the representation power of a single GSD for totally anti-symmetric ( AS ) functions ( also d = 1 ) . Technically we reduce the GSD to a Vandermonde determinant , and determine the loss of differentiability due to the Vandermonde determinant . From Sections 5 on we consider the general case of functions with n · d inputs that are ( anti ) symmetric when permuting their n ddimensional input vectors . The case d = 3 is particularly relevant for particles and point clouds in 3D space . The difficulties encountered for d = 1 transfer to d > 1 , while the positive results don ’ t , or only with considerable extra effort . The universality construction and proof for the EMLP is outlined in Section 6 with a proper treatment and all details in Sections 6-8 of the supplementary , which implies universality of symmetric MLPs and of the AS FermiNet . Section 7 concludes . We took great care to unify notation from different sources . The list of notation in the appendix should be helpful to disambiguate some similarly looking but different notation . Our main novel contributions are establishing the universality of the anti-symmetric FermiNet with a single GSD ( Theorems 3 & 5 & 7 ) for d = 1 and d > 1 ( the results are non-trivial and unexpected ) , and the universality of ( 2-hidden-layer ) symmetric MLPs ( Theorem 6 ) with a complete and explicit and self-contained equivariant universality construction based on ( smooth ) polynomials . We took care to avoid relying on results with inherently asymptotic or tabulation or discontinuous character , to enable ( in future work ) good approximation rates for specific function classes , such as smooth functions or those with ‘ nice ’ Fourier transform [ Bar93 , Mak96 ] , The supplementary material contains the extended version of this paper with ( more ) details , discussion , and proofs . 2 RELATED WORK . The study of universal approximation properties of NN has a long history , see e.g . [ Pin99 ] for a pre-millennium survey , and e.g . [ LSYZ20 ] for recent results and references . For ( anti ) symmetric NN such investigation has only recently begun [ ZKR+18 , WFE+19 , HLL+19 , SI19 ] . Functions on sets are necessarily invariant under permutation , since the order of set elements is irrelevant . For countable domain , [ ZKR+18 ] derive a general representation based on encoding domain elements as bits into the binary expansion of real numbers . They conjecture that the construction can be generalized to uncountable domains such as Rd , but it would have to involve pathological everywhere discontinuous functions [ WFE+19 ] . Functions on sets of fixed size n are equivalent to symmetric functions in n variables . [ ZKR+18 ] prove a symmetric version of Kolmogorov-Arnold ’ s superposition theorem [ Kol57 ] ( for d = 1 ) based on elementary symmetric polynomials und using Newton ’ s identities , also known as Girard-Newton or Newton-Girard formulae , which we will generalize to d > 1 . Another proof is provided based on homeomorphisms between vectors and ordered vectors , also with no obvious generalization to d > 1 . They do not consider AS functions . For symmetric functions and any d ≥ 1 , [ HLL+19 ] provide two proofs of the symmetric superposition theorem of [ ZKR+18 ] : Every symmetric function can be approximated by symmetric polynomials , symmetrized monomials can be represented as a permanents , and Ryser ’ s formula brings the representation into the desired polarized superposition form . The down-side is that computing permanents is NP complete , and exponentially many symmetrized monomials are needed to approximate f . The second proof discretizes the input space into a n · d-dimensional lattice and uses indicator functions for each grid cell . They then symmetrize the indicator functions , and approximate f by these piecewise constant symmetric indicator functions instead of polynomials , also using Ryser formula for the final representation . Super-exponentially many indicator functions are needed , but explicit error bounds are provided . The construction is discontinuous but they remark on how to make it continuous . Approximating AS f for d ≥ 1 is based on a similar lattice construction , but by summing super-exponentially many Vandermonde determinants , leading to a similar bound . We show that a single Vandermonde/Slater determinant suffices but without bound . Additionally for d = 1 we determine the loss in smoothness this construction suffers from . [ SI19 ] prove tighter but still exponential bounds if f is Lipschitz w.r.t . ` ∞ based on sorting which inevitably introduces irreparable discontinuities for d > 1 . The FermiNet [ PSMF20 ] is also based on EMLPs [ ZKR+18 ] but anti-symmetrizes not with Vandermonde determinants but with GSDs . It has shown remarkable practical performance for modelling the ground state of a variety of atoms and small molecules . To achieve good performance , a linear combination of GSDs has been used . We show that in principle a single GSD suffices , a sort of generalized Hartree-Fock approximation . This is contrast to the increasing number of conventional Slater determinants required for increasing accuracy . Our result implies ( with some caveats ) that the improved practical performance of multiple GSDs is due to a limited ( approximation and/or learning ) capacity of the EMLP , rather than a fundamental limit of the GSD . 3 ONE-DIMENSIONAL SYMMETRY . This section reviews various approaches to representing symmetric functions , and is the broadest review we are aware of . To ease discussion and notation , we consider d = 1 in this section . Most considerations generalize easily to d > 1 , some require significant effort , and others break . We discuss various “ naive ” representations ( linear , sampling ) and their ( dis ) advantages , before introducing the “ standard ” solution that can satisfy ( a ) - ( e ) . All representations consist of a finite set of fixed ( inner ) basis functions , which are linearly , algebraically , functionally , or otherwise combined . We then introduce symmetric polynomials , which can be used to prove the “ standard ” representation theorem for d = 1 . The extended version contains a broader and deeper review of alternative representations , including composition by inversion , generally invariant linear bases , symmetric functions by sorting , and linear bases for symmetric polynomials . Indeed it is the broadest review we are aware of , and unified and summarized as far as possible in one big table . The extended review may also help to better grasp the concepts introduced in this section , since it is less dense and contains some illustrating examples . Motivation . Consider n ∈ N one-dimensional particles with coordinates xi ∈ R for particle i = 1 , ... , n. In quantum mechanics the probability amplitude of the ground state can be described by a real-valued joint wave function χ ( x1 , ... , xn ) . Bosons φ have a totally symmetric wave function : φ ( x1 , ... , xn ) = φ ( xπ ( 1 ) , ... , xπ ( n ) ) for all permutations π ∈ Sn ⊂ { 1 : n } → { 1 : n } . Fermions ψ have totally Anti-Symmetric ( AS ) wave functions : ψ ( x1 , ... , xn ) = σ ( π ) ψ ( xπ ( 1 ) , ... , xπ ( n ) ) , where σ ( π ) = ±1 is the parity or sign of permutation π . Wave functions are continuous and almost everywhere differentiable , and often posses higher derivatives or are even analytic . Nothing in this work hinges on any special properties wave functions may possess or interpreting them as such , and the precise conditions required for our results to hold are stated in the theorems . We are interested in representing or approximating all and only such ( anti ) symmetric functions by neural networks . Abbreviate x ≡ ( x1 , ... , xn ) and let Sπ ( x ) : = ( xπ ( 1 ) , ... , xπ ( n ) ) be the permuted coordinates . There is an easy way to ( anti ) symmetrize any function , φ ( x ) = 1 n ! ∑ π∈Sn χ ( Sπ ( x ) ) , ψ ( x ) = 1 n ! ∑ π∈Sn σ ( π ) χ ( Sπ ( x ) ) ( 1 ) and any ( anti ) symmetric function can be represented in this form ( proof : use χ : = φ or χ : = ψ ) . If we train a NN χ : Rn → R to approximate some function f : Rn → R to accuracy ε > 0 , then φ ( ψ ) are ( anti ) symmetric approximations of f to accuracy ε > 0 too , provided f itself is ( anti ) symmetric . Instead of averaging , the minimum or maximum or median or many other compositions would also work , but the average has the advantage that smooth χ lead to smooth φ and ψ , and more general , preserves many desirable properties such as ( Lipschitz/absolute/ ... ) continuity , ( k-times ) differentiability , analyticity , etc . It possibly has all important desirable properties , but one : Time complexity , sampling , learning . The problem with this approach is that it has n ! terms , and evaluating χ super-exponentially often is intractable even for moderate n , especially if χ is a NN . There can also be no clever trick to linearly ( anti ) symmetrize arbitrary functions fast , intuitively since the sum pools n ! independent regions of χ . In the extended version we prove that computing φ and ψ are indeed NP-hard . There we also show that approximating ( 1 ) by sampling permutations is unsuitable , especially for ψ due to sign cancellations . Even if we could compute ( 1 ) fast , a NN would represent the function separately on all n ! regions , hence potentially requires n ! more training samples to learn from than an intrinsically ( anti ) symmetric NN . See the extended version for a more detailed discussion . Function composition and bases . Before delving into proving universality of the EMLP and the FermiNet , it is instructive to first review the general concepts of function composition and basis functions , since a NN essentially is a composition of basis functions . We want to represent/decompose functions as f ( x ) = g ( β ( x ) ) . In this work we are interested in symmetric β , where ultimately β will be represented by the first ( couple of ) layer ( s ) of an EMLP , and g by the second ( couple of ) layer ( s ) . Of particular interest is β ( x ) = n∑ i=1 η ( xi ) ( 2 ) for then β and hence f are obviously symmetric ( permutation invariant ) in x. Anti-symmetry is more difficult and will be dealt with later . Formally let f ∈ F ⊆ Rn → R be a function ( class ) we wish to represent or approximate . Let βb : Rn → R be basis functions for b = 1 , ... , m ∈ N ∪ { ∞ } , and β ≡ ( β1 , ... , βm ) : Rn → Rm be what we call basis vector ( function ) , and ηb : R → R a basis template , sometimes called inner function [ Act18 ] or polarized bass function . Let g ∈ G ⊆ Rm → R be a composition function ( class ) , sometimes called ‘ outer function ’ [ Act18 ] , which creates new functions from the basis functions . Let G ◦ β = { g ( β ( · ) ) : g ∈ G } be the class of representable functions , and G ◦ β its topological closure , i.e . the class of all approximable functions.± β is called a G-basis for F if F = G ◦ β or F = G ◦ β , depending on context . Interesting classes of compositions are linear Glin : = { g : g ( x ) = a0 + ∑m i=1 xi ; a0 , ai ∈ R } , algebraic Galg : = { multivariate polynomials } , functional Gfunc : = Rm → R , and Ck-functional Gkfunc : = Ck for k-times continuously differentiable functions . The extended version illustrates on some simple examples how larger composition classes G allow ( drastically ) smaller bases ( m ) to represent the same functions F . Algebraic basis for symmetric polynomials . It is well-known that the elementary symmetric polynomials eb ( x ) generated by n∏ i=1 ( 1 + λxi ) = : 1 + λe1 ( x ) + λ 2e2 ( x ) + ... + λ nen ( x ) ( 3 ) ±Functions may be defined on sub-spaces of Rk , function composition may not exists , and convergence can be w.r.t . different topologies . We will ignore these technicalities unless important for our results , but the reader may assume compact-open topology , which induces uniform convergence on compacta . are an algebraic basis of all symmetric polynomials . Explicit expressions are e1 ( x ) = ∑ i xi , and e2 ( x ) = ∑ i < j xixj , ... , and en ( x ) = x1 ... xn , and in general eb ( x ) = ∑ i1 < ... < ib xi1 ... xib . For given x , the polynomial in λ on the l.h.s . of ( 3 ) can be expanded to the r.h.s . in quadratic time or by FFT even in time O ( n log n ) , so the e ( x ) can be computed in time O ( n log n ) , but is not of the desired form ( 2 ) . Luckily Newton already solved this problem for us . Newton ’ s identities express the elementary symmetric polynomials e1 ( x ) , ... , en ( x ) as polynomials in pb ( x ) : = ∑n i=1 x b i , b = 1 , ... , n , hence also β ( x ) : = ( p1 ( x ) , ... , pn ( x ) ) is an algebraic basis for all symmetric polynomials , hence by closure for all continuous symmetric functions , and is of desired form ( 2 ) : Theorem 2 ( Symmetric polarized superposition [ ZKR+18 , WFE+19 , Thm.7 ] ) Every continuous symmetric function φ : Rn → R can be represented as φ ( x ) = g ( ∑ i η ( xi ) ) with η ( x ) = ( x , x2 , ... , xn ) and continuous g : Rn → R. [ ZKR+18 ] provide two proofs , one based on ‘ composition by inversion ’ , the other using symmetric polynomials and Newton ’ s identities . The non-trivial generalization to d > 1 is provided in Section 5 . Theorem 2 is a symmetric version of the infamous Kolmogorov-Arnold superposition theorem [ Kol57 ] , which solved Hilbert ’ s 13th problem . Its deep and obscure² constructions continue to fill whole PhD theses [ Liu15 , Act18 ] . It is quite remarkable that the symmetric version above is very natural and comparably easy to prove . For given x , the basis β ( x ) can be computed in time O ( n2 ) , so is actually slower to compute than e ( x ) . The elementary symmetric polynomials also have other advantages ( integral coefficients for integral polynomials , works for fields other than R , is numerically more stable , mimics 1,2,3 , ... particle interactions ) , so symmetric NN based on eb rather than pb may be worth pursuing . Note that we need at least m ≥ n functional bases for a continuous representation , so Theorem 2 is optimal in this sense [ WFE+19 ] . The extended version contains a discussion and a table with bases and properties . | In this paper the authors study the representability of symmetric or antisymmetric functions using neural networks. In particular, we say f: R^n -> R is symmetric/ antisymmetric if f(x)= f(pi(x)) for all pi in S_n or is of the form f(x)= sign(pi) *f(pi(x)) where sign(pi) is the sign of the permutation. Such functions with such symmetries are ubiquitous in quantum physics since if one looks at the wave function of a system of identical bosons, then they are symmetric and if you look at fermions they are antisymmetric. In this paper they authors try to understand if there exists succinct architectures that can learn/represent functions with such a symmetry property. In this direction the author makes a few observations For every "nice" antisymmetric function f, there exists a symmetric function Phi and a matrix associated to Phi such that determinant of Phi can be used to represent f. Then the authors show that the standard Ferminet (the first demonstration of deep learning) can be used to represent determinants of slater determinant and hence an arbitrary continous antisymmetric function. | SP:cd78fd328ffefb039b4f7629174f06f582a63920 |
Robust early-learning: Hindering the memorization of noisy labels | The memorization effects of deep networks show that they will first memorize training data with clean labels and then those with noisy labels . The early stopping method therefore can be exploited for learning with noisy labels . However , the side effect brought by noisy labels will influence the memorization of clean labels before early stopping . In this paper , motivated by the lottery ticket hypothesis which shows that only partial parameters are important for generalization , we find that only partial parameters are important for fitting clean labels and generalize well , which we term as critical parameters ; while the other parameters tend to fit noisy labels and can not generalize well , which we term as non-critical parameters . Based on this , we propose robust early-learning to reduce the side effect of noisy labels before early stopping and thus enhance the memorization of clean labels . Specifically , in each iteration , we divide all parameters into the critical and non-critical ones , and then perform different update rules for different types of parameters . Extensive experiments on benchmark-simulated and real-world label-noise datasets demonstrate the superiority of the proposed method over the state-of-the-art label-noise learning methods . 1 INTRODUCTION . Deep neural networks have achieved a remarkable success in various tasks , such as image classification ( He et al. , 2015 ) , object detection ( Ren et al. , 2015 ) , speech recognition ( Graves et al. , 2013 ) , and machine translation ( Wu et al. , 2016 ) . However , the success is largely attributed to large amounts of data with high-quality annotations , which is expensive or even infeasible in practice ( Han et al. , 2018a ; Li et al. , 2020a ; Wu et al. , 2020 ) . On the other hand , many large-scale datasets are collected from image search engines or web crawlers , which inevitably involves noisy labels ( Xiao et al. , 2015 ; Li et al. , 2017a ; Zhu et al. , 2021 ) . As deep networks have large learning capacities and strong memorization power , they will ultimately overfit noisy labels , leading to poor generalization performance ( Jiang et al. , 2018 ; Nguyen et al. , 2020 ) . General regularization techniques such as dropout and weight decay can not address this issue well ( Zhang et al. , 2017 ) . Fortunately , even though deep networks will fit all the labels eventually , they first fit data with clean labels , which helps generalization ( Arpit et al. , 2017 ; Han et al. , 2018b ; Yu et al. , 2019 ; Liu et al. , 2020 ) . Thus , the early stopping method can be used to reduce overfitting to the noisy labels ( Rolnick et al. , 2017 ; Li et al. , 2020b ; Hu et al. , 2020 ) . However , the existence of noisy labels will still adversely affect the memorization of clean labels even in the early training stage . This will hurt generalization ( Han et al. , 2020 ) . Intuitively , if we can reduce the side effect of noisy labels before early stopping , the generalization and robustness of the networks can be improved . †Correspondence to Tongliang Liu ( tongliang.liu @ sydney.edu.au ) . Note that over-parameterization of deep networks is one of the main reasons for overfitting to noisy labels ( Zhang et al. , 2017 ; Yao et al. , 2020a ) . The lottery ticket hypothesis ( Frankle & Carbin , 2018 ) shows that only partial parameters are important for generalization . The deep networks with these important parameters can generalize well , or even better by avoid overfitting . Motivated by this , for learning with noisy labels , it remains a question if we can divide the parameters into two parts to reduce the side effect brought by noisy labels , which enhances the memorization of clean labels and further improves the generalization performance of the deep networks . In this paper , we present a novel and effective method to find which parameters are important for fitting data with clean labels , and which parameters tend to fit data with noisy labels . We term the former as critical parameters , and the latter as non-critical parameters . Then on this basis , we proposed robust early-learning to reduce the side effect of noisy labels before early stopping . Specifically , in each iteration during training , we first categorize all parameters into two parts , i.e. , the critical parameters and the non-critical parameters . Then we designed different update rules for different types of parameters . For the critical ones , we perform robust positive update . This part of the parameters are updated using the gradients derived from the objective function and weight decay . For the non-critical ones , we perform negative update . Their values are penalized with the weight decay , and without the gradients derived from the objective function . Note that the gradients for updating are based on the loss between the prediction of deep networks and given labels . For the critical ones , they tend to fit data with clean ( correct ) labels to help generalization . Their gradients can therefore be exploited to update parameters . However , for the non-critical ones , they tend to fit data with noisy ( incorrect ) labels , which hurts generalization . Their gradients will misguide the deep networks to overfit data with noisy labels . Thus , we only use a regularization item , i.e. , the weight decay , to update them . The weight decay will penalize their values to be zero , which means that they are penalized to be deactivated , and not to contribute to the generalization of deep networks . In this way , we can reduce the side effect of noisy labels and enhance the memorization of clean labels . In summary , the main contributions of this work are as follows : • We propose a novel and effective method which can categorize the parameters into two parts according to whether they are important to fit data with clean labels . • Different update rules have been designed for different types of the parameters to reduce the side effect of noisy labels before early stopping . •We experimentally validate the proposed method on both synthetic noisy datasets and real-world noisy datasets , on which it achieves superior robustness compared with the state-of-the-art methods for learning with noisy labels . Related Work . Early stopping is quite simple but effective in practice . It was used in supervised learning early ( Prechelt , 1998 ; Caruana et al. , 2001 ; Zhang et al. , 2005 ; Yao et al. , 2007 ) . With the help of a validation set , training is then stopped before convergence to avoid the overfitting . While learning with noisy labels , the networks fit the data with clean labels before starting to overfit the data with noisy labels ( Arpit et al. , 2017 ) . Early stopping is then formally proved to be valid for relieving overfitting to noisy labels ( Rolnick et al. , 2017 ; Li et al. , 2020b ) . It has also been widely used in existing methods to improve robustness and generalization ( Yu et al. , 2018b ; Xu et al. , 2019 ; Yao et al. , 2020b ; Cheng et al. , 2021 ) . The lottery ticket hypothesis ( Frankle & Carbin , 2018 ) shows that deep networks are likely to be over-parameterized , and only partial parameters are important for generalization . With this part of the parameters , the small and sparsified networks can be trained to generalize well . While this work is motivated by the lottery ticket hypotheis , this work is fundamentally different from it . The lottery ticket hypothesis focuses on network compression . It aims to find a sparsified sub-network which has competitive generalization performance compared with the original network . This paper focuses on learning with noisy labels . We want to find the critical/non-critical parameters to reduce the side effect of noisy labels , which greatly improves the generalization performance . Lots of work proposed various methods for training with noisy labels , such as exploiting a noise transition matrix ( Liu & Tao , 2016 ; Hendrycks et al. , 2018 ; Xia et al. , 2020a ; Li et al. , 2021 ) , using graph models ( Xiao et al. , 2015 ; Li et al. , 2017b ) , using surrogate loss functions ( Zhang & Sabuncu , 2018 ; Wang et al. , 2019 ; Ma et al. , 2020 ) , meta-learning ( Ren et al. , 2018 ; Shu et al. , 2020 ) , and employing the small loss trick ( Jiang et al. , 2018 ; Han et al. , 2018b ; Yu et al. , 2019 ) . Some methods among them employ early stopping explicitly or implicitly ( Patrini et al. , 2017 ; Xia et al. , 2019 ) . We also use early stopping in this paper . We are the first to hinder the memorization of noisy labels with analyzing the criticality of parameters . Organization . The rest of the paper is organized as follows . In Section 2 , we setup the problem and introduce the neural network optimization method . In Section 3 , we discuss how to find the critical parameters and perform different update rules . In Section 4 , we provide empirical evaluations of the proposed learning algorithm . Finally , Section 5 concludes the paper . 2 PRELIMINARIES . Notation . Vectors and matrices are denoted by bold-faced letters . The standard inner product between two vectors is denoted by 〈· , ·〉 . We use ‖ · ‖p as the ` p norm of vectors or matrices . For a function f , we use ∇f to denote its gradient . Let [ n ] = { 1 , 2 , . . . , n } . Problem Setup . Consider a classification task , there are c classes . Let X and Y be the feature and label spaces respectively , where X ∈ Rd with d being the dimensionality , and Y = [ c ] . The joint probability distribution over X × Y is denoted by D. Let S = { ( xi , yi ) } ni=1 be an i.i.d . sample drawn from D , where n denotes the sample size . In traditional supervised learning , by employing S , the aim is to learn a classifier that can assign labels precisely for given instances . While learning with noisy labels , we are given a sample with noisy labels S̃ = { ( xi , ỹi ) } ni=1 , which is drawn from a corrupted joint probability distribution D̃ rather than D. Here , ỹ is the possibly corrupted label of the underlying clean label y . The aim is changed to learn a robust classifier that could assign clean labels to test data by only exploiting a training sample with noisy labels . 2.1 NEURAL NETWORK OPTIMIZATION METHOD . The optimization method is essential for training neural networks . Stochastic gradient descent ( SGD ) is the most popular one nowadays among the optimization methods ( Allen-Zhu et al. , 2019 ; Cao & Gu , 2019 ; Zou et al. , 2020 ) . Our proposed method is directly related to SGD . We analyze the optimization problem of typical supervised learning with clean labels as knowledge background . Consider a classifier to be trained , letW ∈ Rm be all the parameters , where m is the total number of the parameters . Let L : Rc ×Y → R+ be the surrogate loss function , e.g. , cross entropy loss . With a regularization item , e.g. , ` 1 regularizer , optimization method would involve minimizing an objective function as : minL ( W ; S ) = min 1 n n∑ i=1 L ( W ; ( xi , yi ) ) + λ‖W‖1 , ( 1 ) where λ ∈ R+ is a regularization parameter . The update rules of the parametersW can be represented by the following formula : W ( k + 1 ) ←W ( k ) − η ( ∂L ( W ( k ) ; S ? ) ∂W ( k ) + λsgn ( W ( k ) ) ) , ( 2 ) where η > 0 is the learning rate , W ( k ) is the set of the parameters at the k-th iteration , sgn ( · ) is the standard sgn function in mathematics , and S ? is a subset randomly sampled from S. With SGD , the regularization parameter λ is equivalent to the weight decay coefficient in the training process ( Loshchilov & Hutter , 2019 ) . | This paper aims to exploit the early stopping method to solve the problem of learning with noisy labels. Specifically, this paper finds that only partial parameters (critical parameters) are important for fitting clean labels and generalize well; while the other parameters (non-critical parameters) tend to fit noisy labels and cannot generalize well. Based on this observation, this paper proposes to divide all parameters into the critical parameters and non-critical ones, and perform different update rules for the two types of parameters, in each iteration. Extensive experiments on benchmark-simulated and real-world label-noise datasets demonstrate the effectiveness of the proposed method. | SP:28fa8254eddb2362bd1015b861efaf8c58edf29f |
Robust early-learning: Hindering the memorization of noisy labels | The memorization effects of deep networks show that they will first memorize training data with clean labels and then those with noisy labels . The early stopping method therefore can be exploited for learning with noisy labels . However , the side effect brought by noisy labels will influence the memorization of clean labels before early stopping . In this paper , motivated by the lottery ticket hypothesis which shows that only partial parameters are important for generalization , we find that only partial parameters are important for fitting clean labels and generalize well , which we term as critical parameters ; while the other parameters tend to fit noisy labels and can not generalize well , which we term as non-critical parameters . Based on this , we propose robust early-learning to reduce the side effect of noisy labels before early stopping and thus enhance the memorization of clean labels . Specifically , in each iteration , we divide all parameters into the critical and non-critical ones , and then perform different update rules for different types of parameters . Extensive experiments on benchmark-simulated and real-world label-noise datasets demonstrate the superiority of the proposed method over the state-of-the-art label-noise learning methods . 1 INTRODUCTION . Deep neural networks have achieved a remarkable success in various tasks , such as image classification ( He et al. , 2015 ) , object detection ( Ren et al. , 2015 ) , speech recognition ( Graves et al. , 2013 ) , and machine translation ( Wu et al. , 2016 ) . However , the success is largely attributed to large amounts of data with high-quality annotations , which is expensive or even infeasible in practice ( Han et al. , 2018a ; Li et al. , 2020a ; Wu et al. , 2020 ) . On the other hand , many large-scale datasets are collected from image search engines or web crawlers , which inevitably involves noisy labels ( Xiao et al. , 2015 ; Li et al. , 2017a ; Zhu et al. , 2021 ) . As deep networks have large learning capacities and strong memorization power , they will ultimately overfit noisy labels , leading to poor generalization performance ( Jiang et al. , 2018 ; Nguyen et al. , 2020 ) . General regularization techniques such as dropout and weight decay can not address this issue well ( Zhang et al. , 2017 ) . Fortunately , even though deep networks will fit all the labels eventually , they first fit data with clean labels , which helps generalization ( Arpit et al. , 2017 ; Han et al. , 2018b ; Yu et al. , 2019 ; Liu et al. , 2020 ) . Thus , the early stopping method can be used to reduce overfitting to the noisy labels ( Rolnick et al. , 2017 ; Li et al. , 2020b ; Hu et al. , 2020 ) . However , the existence of noisy labels will still adversely affect the memorization of clean labels even in the early training stage . This will hurt generalization ( Han et al. , 2020 ) . Intuitively , if we can reduce the side effect of noisy labels before early stopping , the generalization and robustness of the networks can be improved . †Correspondence to Tongliang Liu ( tongliang.liu @ sydney.edu.au ) . Note that over-parameterization of deep networks is one of the main reasons for overfitting to noisy labels ( Zhang et al. , 2017 ; Yao et al. , 2020a ) . The lottery ticket hypothesis ( Frankle & Carbin , 2018 ) shows that only partial parameters are important for generalization . The deep networks with these important parameters can generalize well , or even better by avoid overfitting . Motivated by this , for learning with noisy labels , it remains a question if we can divide the parameters into two parts to reduce the side effect brought by noisy labels , which enhances the memorization of clean labels and further improves the generalization performance of the deep networks . In this paper , we present a novel and effective method to find which parameters are important for fitting data with clean labels , and which parameters tend to fit data with noisy labels . We term the former as critical parameters , and the latter as non-critical parameters . Then on this basis , we proposed robust early-learning to reduce the side effect of noisy labels before early stopping . Specifically , in each iteration during training , we first categorize all parameters into two parts , i.e. , the critical parameters and the non-critical parameters . Then we designed different update rules for different types of parameters . For the critical ones , we perform robust positive update . This part of the parameters are updated using the gradients derived from the objective function and weight decay . For the non-critical ones , we perform negative update . Their values are penalized with the weight decay , and without the gradients derived from the objective function . Note that the gradients for updating are based on the loss between the prediction of deep networks and given labels . For the critical ones , they tend to fit data with clean ( correct ) labels to help generalization . Their gradients can therefore be exploited to update parameters . However , for the non-critical ones , they tend to fit data with noisy ( incorrect ) labels , which hurts generalization . Their gradients will misguide the deep networks to overfit data with noisy labels . Thus , we only use a regularization item , i.e. , the weight decay , to update them . The weight decay will penalize their values to be zero , which means that they are penalized to be deactivated , and not to contribute to the generalization of deep networks . In this way , we can reduce the side effect of noisy labels and enhance the memorization of clean labels . In summary , the main contributions of this work are as follows : • We propose a novel and effective method which can categorize the parameters into two parts according to whether they are important to fit data with clean labels . • Different update rules have been designed for different types of the parameters to reduce the side effect of noisy labels before early stopping . •We experimentally validate the proposed method on both synthetic noisy datasets and real-world noisy datasets , on which it achieves superior robustness compared with the state-of-the-art methods for learning with noisy labels . Related Work . Early stopping is quite simple but effective in practice . It was used in supervised learning early ( Prechelt , 1998 ; Caruana et al. , 2001 ; Zhang et al. , 2005 ; Yao et al. , 2007 ) . With the help of a validation set , training is then stopped before convergence to avoid the overfitting . While learning with noisy labels , the networks fit the data with clean labels before starting to overfit the data with noisy labels ( Arpit et al. , 2017 ) . Early stopping is then formally proved to be valid for relieving overfitting to noisy labels ( Rolnick et al. , 2017 ; Li et al. , 2020b ) . It has also been widely used in existing methods to improve robustness and generalization ( Yu et al. , 2018b ; Xu et al. , 2019 ; Yao et al. , 2020b ; Cheng et al. , 2021 ) . The lottery ticket hypothesis ( Frankle & Carbin , 2018 ) shows that deep networks are likely to be over-parameterized , and only partial parameters are important for generalization . With this part of the parameters , the small and sparsified networks can be trained to generalize well . While this work is motivated by the lottery ticket hypotheis , this work is fundamentally different from it . The lottery ticket hypothesis focuses on network compression . It aims to find a sparsified sub-network which has competitive generalization performance compared with the original network . This paper focuses on learning with noisy labels . We want to find the critical/non-critical parameters to reduce the side effect of noisy labels , which greatly improves the generalization performance . Lots of work proposed various methods for training with noisy labels , such as exploiting a noise transition matrix ( Liu & Tao , 2016 ; Hendrycks et al. , 2018 ; Xia et al. , 2020a ; Li et al. , 2021 ) , using graph models ( Xiao et al. , 2015 ; Li et al. , 2017b ) , using surrogate loss functions ( Zhang & Sabuncu , 2018 ; Wang et al. , 2019 ; Ma et al. , 2020 ) , meta-learning ( Ren et al. , 2018 ; Shu et al. , 2020 ) , and employing the small loss trick ( Jiang et al. , 2018 ; Han et al. , 2018b ; Yu et al. , 2019 ) . Some methods among them employ early stopping explicitly or implicitly ( Patrini et al. , 2017 ; Xia et al. , 2019 ) . We also use early stopping in this paper . We are the first to hinder the memorization of noisy labels with analyzing the criticality of parameters . Organization . The rest of the paper is organized as follows . In Section 2 , we setup the problem and introduce the neural network optimization method . In Section 3 , we discuss how to find the critical parameters and perform different update rules . In Section 4 , we provide empirical evaluations of the proposed learning algorithm . Finally , Section 5 concludes the paper . 2 PRELIMINARIES . Notation . Vectors and matrices are denoted by bold-faced letters . The standard inner product between two vectors is denoted by 〈· , ·〉 . We use ‖ · ‖p as the ` p norm of vectors or matrices . For a function f , we use ∇f to denote its gradient . Let [ n ] = { 1 , 2 , . . . , n } . Problem Setup . Consider a classification task , there are c classes . Let X and Y be the feature and label spaces respectively , where X ∈ Rd with d being the dimensionality , and Y = [ c ] . The joint probability distribution over X × Y is denoted by D. Let S = { ( xi , yi ) } ni=1 be an i.i.d . sample drawn from D , where n denotes the sample size . In traditional supervised learning , by employing S , the aim is to learn a classifier that can assign labels precisely for given instances . While learning with noisy labels , we are given a sample with noisy labels S̃ = { ( xi , ỹi ) } ni=1 , which is drawn from a corrupted joint probability distribution D̃ rather than D. Here , ỹ is the possibly corrupted label of the underlying clean label y . The aim is changed to learn a robust classifier that could assign clean labels to test data by only exploiting a training sample with noisy labels . 2.1 NEURAL NETWORK OPTIMIZATION METHOD . The optimization method is essential for training neural networks . Stochastic gradient descent ( SGD ) is the most popular one nowadays among the optimization methods ( Allen-Zhu et al. , 2019 ; Cao & Gu , 2019 ; Zou et al. , 2020 ) . Our proposed method is directly related to SGD . We analyze the optimization problem of typical supervised learning with clean labels as knowledge background . Consider a classifier to be trained , letW ∈ Rm be all the parameters , where m is the total number of the parameters . Let L : Rc ×Y → R+ be the surrogate loss function , e.g. , cross entropy loss . With a regularization item , e.g. , ` 1 regularizer , optimization method would involve minimizing an objective function as : minL ( W ; S ) = min 1 n n∑ i=1 L ( W ; ( xi , yi ) ) + λ‖W‖1 , ( 1 ) where λ ∈ R+ is a regularization parameter . The update rules of the parametersW can be represented by the following formula : W ( k + 1 ) ←W ( k ) − η ( ∂L ( W ( k ) ; S ? ) ∂W ( k ) + λsgn ( W ( k ) ) ) , ( 2 ) where η > 0 is the learning rate , W ( k ) is the set of the parameters at the k-th iteration , sgn ( · ) is the standard sgn function in mathematics , and S ? is a subset randomly sampled from S. With SGD , the regularization parameter λ is equivalent to the weight decay coefficient in the training process ( Loshchilov & Hutter , 2019 ) . | This paper tackles the problem of learning with noisy labels and proposes a novel method CDR which is inspired by the lottery ticket hypothesis. In particular, the proposed method categorizes the parameters into two parts, including critical parameters and non-critical parameters, and applies different update rules to these parameters. Using comprehensive experiments on synthetic datasets and real-world datasets, the authors verify that the proposed method can improve the robustness of the classifiers against noisy labels. | SP:28fa8254eddb2362bd1015b861efaf8c58edf29f |
Improving Abstractive Dialogue Summarization with Conversational Structure and Factual Knowledge | Recently , people have been paying more attention to the abstractive dialogue summarization task . Compared with news text , the information flows of the dialogue exchange between at least two interlocutors , which leads to the necessity of capturing long-distance cross-sentence relations . In addition , the generated summaries commonly suffer from fake facts because the key elements of dialogues often scatter in multiple utterances . However , the existing sequence-to-sequence models are difficult to address these issues . Therefore , it is necessary to explore the implicit conversational structure to ensure the richness and faithfulness of generated contents . In this paper , we present a Knowledge Graph Enhanced Dual-Copy network ( KGEDC ) , a novel framework for abstractive dialogue summarization with conversational structure and factual knowledge . We use a sequence encoder to draw local features and a graph encoder to integrate global features via the sparse relational graph self-attention network , complementing each other . Besides , a dual-copy mechanism is also designed in decoding process to force the generation conditioned on both the source text and extracted factual knowledge . The experimental results show that our method produces significantly higher ROUGE scores than most of the baselines on both SAMSum corpus and Automobile Master corpus . Human judges further evaluate that outputs of our model contain more richer and faithful information . 1 INTRODUCTION . Abstractive summarization aims to understand the semantic information of source texts , and generate flexible and concise expressions as summaries , which is more similar to how humans summarize texts . By employing sequence-to-sequence frameworks , some encouraging results have been made in the abstractive summarization of single-speaker documents like news , scientific publications , etc ( Rush et al. , 2015 ; See et al. , 2017 ; Gehrmann et al. , 2018 ; Sharma et al. , 2019 ) . Recently , with the explosive growth of dialogic texts , abstractive dialogue summarization has begun arousing people ’ s interest . Some previous works have attempted to transfer general neural models , which are designed for abstractive summarization of non-dialogic texts , to deal with abstractive dialogue summarization task ( Goo & Chen , 2018 ; Liu et al. , 2019 ; Gliwa et al. , 2019 ) . Different from news texts , dialogues contain dynamic information exchange flows , which are usually informal , verbose and repetitive , sprinkled with false-starts , backchanneling , reconfirmations , hesitations , and speaker interruptions ( Sacks et al. , 1974 ) . Furthermore , utterances are often turned from different interlocutors , which leads to topic drifts and lower information density . Therefore , previous methods are not suitable to generate summaries for dialogues . We argue that the conversational structure and factual knowledge are important to generate informative and succinct summaries . While the neural methods achieve impressive levels of output fluency , they also struggle to produce a coherent order of facts for longer texts ( Wiseman et al. , 2017 ) , and are often unfaithful to input facts , either omitting , repeating , hallucinating or changing facts . Besides , complex events related to the same element often span across multiple utterances , which makes it challenging for sequence-based models to handle utterance-level long-distance dependencies and capture cross-sentence relations . To mitigate these issues , an intuitive way is to model the relationships between textual units within a conversation discourse using graph structures , which can break the sequential positions of textual units and directly connect the related long-distance contents . In this paper , we present the Knowledge Graph Enhanced Dual-Copy network ( KGEDC ) , a novel network specially designed for abstractive dialogue summarization . A graph encoder is proposed to construct the conversational structure in utterance-level under the assumption that utterances represent nodes and edges are semantic relations between them . Specifically , we devise three types of edge labels : speaker dependency , sequential context dependency , and co-occurring keyword dependency . The edges navigate the model from the core fact to other occurrences of that fact , and explore its interactions with other concepts or facts . The sparse dialogue graph only leverages related utterances and filters out redundant details , retaining the capacity to include concise concepts or events . In order to extract sequential features at token-level , a sequence encoder is also used . These two encoders cooperate to express conversational contents via two different granularities , which can effectively capture long-distance cross-sentence dependencies . Moreover , considering that the fact fabrication is a serious problem , encoding existing factual knowledge into the summarization system should be an ideal solution to avoid fake generation . To achieve this goal , we firstly apply the OpenIE tool ( Angeli et al. , 2015 ) and dependency parser tool ( Manning et al. , 2014 ) to extract the factual knowledge in the form of relational tuples : ( subject , predicate , object ) , which construct a knowledge graph . These tuples describe facts and are regarded as the skeletons of dialogues . Next , we design a dual-copy mechanism to copy contents from tokens of the dialogue text and factual knowledge of the knowledge graph in parallel , which would clearly provide the right guidance for summarization . To verify the effectiveness of KGEDC , we carry out automatic and human evaluations on SAMSum corpus and Automobile Master corpus . The experimental results show that our model yield significantly better ROUGE scores ( Lin & Hovy , 2003 ) than all baselines . Human judges further confirm that KGEDC generates more informative summaries with less unfaithful errors than all models without the knowledge graph . 2 RELATED WORK . Graph-based summarization Graph-based approaches have been widely explored in text summarization . Early traditional works make use of inter-sentence cosine similarity to build the connectivity graph like LexRank ( Erkan & Radev , 2004 ) and TextRank ( Mihalcea & Tarau , 2004 ) . Some works further propose discourse inter-sentential relationships to build the Approximate Discourse Graph ( ADG ) ( Yasunaga et al. , 2017 ) and Rhetorical Structure Theory ( RST ) graph ( Xu et al. , 2019 ) . These methods usually rely on external tools and cause error propagation . To avoid these problems , neural models have been applied to improve summarization techniques . Tan et al . ( 2017 ) proposed a graph-based attention mechanism to discover the salient information of a document . Fernandes et al . ( 2019 ) developed a framework to extend existing sequence encoders with a graph component to reason about long-distance relationships . Zhong et al . ( 2019 ) used a Transformer encoder to create a fully-connected graph that learns relations between pairwise sentences . Nevertheless , the factual knowledge implied in dialogues is largely ignored . Cao et al . ( 2017 ) incorporated the fact descriptions as an additional input source text in the attentional sequence-to-sequence framework . Gunel et al . ( 2019 ) employed an entity-aware transformer structure to boost the factual correctness , where the entities come from the Wikidata knowledge graph . In this work , we design a graph encoder based on conversational structure , which uses the sparse relational graph self-attention network to obtain the global features of dialogues . Abstractive dialogue summarization Due to the lack of publicly available resources , the work for dialogue summarization has been rarely studied and it is still in the exploratory stage at present . Some early works benchmarked the abstractive dialogue summarization task using the AMI meeting corpus , which contains a wide range of annotations , including dialogue acts , topic descriptions , etc ( Carletta et al. , 2005 ; Mehdad et al. , 2014 ; Banerjee et al. , 2015 ) . Goo & Chen ( 2018 ) proposed to use the high-level topic descriptions ( e.g . costing evaluation of project process ) as the gold references and leveraged dialogue act signals in a neural summarization model . They assumed that dialogue acts indicated interactive signals and used these information for a better performance . Customer service interaction is also a common form of dialogue , which contains questions of the user Graph . 3 METHODOLOGY . In this section , we introduce the Knowledge Graph Enhanced Dual-Copy network , as displayed in Figure 1 ( a ) . Our framework consists of four modules including a sequence encoder , a graph encoder , a factual knowledge graph , and a dual-copy decoder . Importantly , we first present two types of graphs : Dialogue Graph which constructs conversational structures , and Factual Knowledge Graph which directly extracts fact descriptions from source dialogues . Then , the dual-copy decoder generates faithful summaries by embedding the semantics of both source utterances and factual knowledge . 3.1 SEQUENCE ENCODER . Considering that the contextual information of dialogues usually flows along the sequence , the sequential aspect of the input text is also rich in meaning . Taking the dialogue D as an example , we feed the tokens of it one-by-one into a single-layer bidirectional LSTM , producing a sequence of encoder hidden states { hS1 , hS2 , ... , hSn } . The BiLSTM at the time step i is defined as follows : hSi = BiLSTM ( wi , h S i−1 ) ( 1 ) where wi is the embedding of the i-th token in dialogue , and hSi is the concatenation of the hidden state of a forward LSTM and a backward LSTM . 3.2 GRAPH ENCODER . Given a constructed dialogue graph Gd = ( Vd , Ed ) , Vd = { vd,1 , ... , vd , m } corresponds to m utterances in the dialogue . Ed is a real-value edge weight matrix and ed , ij 6= 0 ( i ∈ { 1 , ... , m } , j ∈ { 1 , ... , m } ) indicates that there is an edge between the i-th utterance and the j-th utterance . We then use graph neural networks to update the representations of all utterances to capture long-distance cross-sentence dependencies , as shown in Figure 2 ( a ) . 3.2.1 NODE INITIALIZATION . We first use a Convolutional Neural Network ( CNN ) with different filter sizes to obtain the representations xj for the j-th utterance vd , j . We also do pos tagging on dialogues with off-the-shelf tools such as Stanford CoreNLP ( Manning et al. , 2014 ) and select nouns , numerals , adjectives , adverbs , and notional verbs as keywords . Each keyword is transformed into a real-valued vector representation εi by looking up the word embedding matrix , which is initialized by a random process . The attention mechanism is then designed to characterize the strength of contextual correlations between utterances and keywords . The representation of the utterance v̂d , j is updated as a weighted sum of these keyword vector ki ( i ∈ { 1 , ... , K } ) : Aij = f ( εi , xj ) = ε T i xj αij = softmaxi ( Aij ) = exp ( Aij ) ∑ k∈Nj exp ( Akj ) v̂d , j = σ ( K∑ i=1 αijWaεi ) ( 2 ) where K is the number of keywords in each dialogue , Wa is a trainable weight , and αij is the attention coefficient between εi and xj . 3.2.2 EDGE INITIALIZATION . If we hypothesize that each utterance is contextually dependent on all the other utterances in the dialogue , then a fully connected graph would be constructed . However , this leads to a huge amount of computation . Therefore , we adopt a strategy to construct the edges of the graph , which relies on the various semantic relations among utterances . We define three types of edge labels : speaker dependency , sequential context dependency , co-occurring keyword dependency ( A.1 ) . Speaker dependency : The relation depends on where the same speaker appears in the dialogue . In other words , if the utterances belong to the same speaker , we will set an edge between them . Sequential context dependency : The relation describes the sequential utterances that occur within a fixed-size sliding window . In this scenario , each utterance node vd , i has an edge with the immediate p utterances of the past vd , i−1 , vd , i−2 , ... , vd , i−p , and f utterances of the future : vd , i+1 , vd , i+2 , ... , vd , i+f . co-occurring keyword dependency : The relation means that all utterances containing the same keyword are connected . We further change the existing undirected edges into bidirectional edges and add self-loops to enhance the information flow . | This paper proposes a knowledge graph enhanced network to improve abstractive dialog summarization with graphs constructed from the dialog structure and factual knowledge. The dialog graph is composed of utterances as nodes and 3 heuristic types of edges (such as utterances of the same speaker, adjacent utterances). The factual graph is constructed via openIE and dependency parsing, which the authors claim are complementary as the triplets (results of openIE) are not always available. | SP:63621148403a12bfbf0dd14179ad3933d6ebe50d |
Improving Abstractive Dialogue Summarization with Conversational Structure and Factual Knowledge | Recently , people have been paying more attention to the abstractive dialogue summarization task . Compared with news text , the information flows of the dialogue exchange between at least two interlocutors , which leads to the necessity of capturing long-distance cross-sentence relations . In addition , the generated summaries commonly suffer from fake facts because the key elements of dialogues often scatter in multiple utterances . However , the existing sequence-to-sequence models are difficult to address these issues . Therefore , it is necessary to explore the implicit conversational structure to ensure the richness and faithfulness of generated contents . In this paper , we present a Knowledge Graph Enhanced Dual-Copy network ( KGEDC ) , a novel framework for abstractive dialogue summarization with conversational structure and factual knowledge . We use a sequence encoder to draw local features and a graph encoder to integrate global features via the sparse relational graph self-attention network , complementing each other . Besides , a dual-copy mechanism is also designed in decoding process to force the generation conditioned on both the source text and extracted factual knowledge . The experimental results show that our method produces significantly higher ROUGE scores than most of the baselines on both SAMSum corpus and Automobile Master corpus . Human judges further evaluate that outputs of our model contain more richer and faithful information . 1 INTRODUCTION . Abstractive summarization aims to understand the semantic information of source texts , and generate flexible and concise expressions as summaries , which is more similar to how humans summarize texts . By employing sequence-to-sequence frameworks , some encouraging results have been made in the abstractive summarization of single-speaker documents like news , scientific publications , etc ( Rush et al. , 2015 ; See et al. , 2017 ; Gehrmann et al. , 2018 ; Sharma et al. , 2019 ) . Recently , with the explosive growth of dialogic texts , abstractive dialogue summarization has begun arousing people ’ s interest . Some previous works have attempted to transfer general neural models , which are designed for abstractive summarization of non-dialogic texts , to deal with abstractive dialogue summarization task ( Goo & Chen , 2018 ; Liu et al. , 2019 ; Gliwa et al. , 2019 ) . Different from news texts , dialogues contain dynamic information exchange flows , which are usually informal , verbose and repetitive , sprinkled with false-starts , backchanneling , reconfirmations , hesitations , and speaker interruptions ( Sacks et al. , 1974 ) . Furthermore , utterances are often turned from different interlocutors , which leads to topic drifts and lower information density . Therefore , previous methods are not suitable to generate summaries for dialogues . We argue that the conversational structure and factual knowledge are important to generate informative and succinct summaries . While the neural methods achieve impressive levels of output fluency , they also struggle to produce a coherent order of facts for longer texts ( Wiseman et al. , 2017 ) , and are often unfaithful to input facts , either omitting , repeating , hallucinating or changing facts . Besides , complex events related to the same element often span across multiple utterances , which makes it challenging for sequence-based models to handle utterance-level long-distance dependencies and capture cross-sentence relations . To mitigate these issues , an intuitive way is to model the relationships between textual units within a conversation discourse using graph structures , which can break the sequential positions of textual units and directly connect the related long-distance contents . In this paper , we present the Knowledge Graph Enhanced Dual-Copy network ( KGEDC ) , a novel network specially designed for abstractive dialogue summarization . A graph encoder is proposed to construct the conversational structure in utterance-level under the assumption that utterances represent nodes and edges are semantic relations between them . Specifically , we devise three types of edge labels : speaker dependency , sequential context dependency , and co-occurring keyword dependency . The edges navigate the model from the core fact to other occurrences of that fact , and explore its interactions with other concepts or facts . The sparse dialogue graph only leverages related utterances and filters out redundant details , retaining the capacity to include concise concepts or events . In order to extract sequential features at token-level , a sequence encoder is also used . These two encoders cooperate to express conversational contents via two different granularities , which can effectively capture long-distance cross-sentence dependencies . Moreover , considering that the fact fabrication is a serious problem , encoding existing factual knowledge into the summarization system should be an ideal solution to avoid fake generation . To achieve this goal , we firstly apply the OpenIE tool ( Angeli et al. , 2015 ) and dependency parser tool ( Manning et al. , 2014 ) to extract the factual knowledge in the form of relational tuples : ( subject , predicate , object ) , which construct a knowledge graph . These tuples describe facts and are regarded as the skeletons of dialogues . Next , we design a dual-copy mechanism to copy contents from tokens of the dialogue text and factual knowledge of the knowledge graph in parallel , which would clearly provide the right guidance for summarization . To verify the effectiveness of KGEDC , we carry out automatic and human evaluations on SAMSum corpus and Automobile Master corpus . The experimental results show that our model yield significantly better ROUGE scores ( Lin & Hovy , 2003 ) than all baselines . Human judges further confirm that KGEDC generates more informative summaries with less unfaithful errors than all models without the knowledge graph . 2 RELATED WORK . Graph-based summarization Graph-based approaches have been widely explored in text summarization . Early traditional works make use of inter-sentence cosine similarity to build the connectivity graph like LexRank ( Erkan & Radev , 2004 ) and TextRank ( Mihalcea & Tarau , 2004 ) . Some works further propose discourse inter-sentential relationships to build the Approximate Discourse Graph ( ADG ) ( Yasunaga et al. , 2017 ) and Rhetorical Structure Theory ( RST ) graph ( Xu et al. , 2019 ) . These methods usually rely on external tools and cause error propagation . To avoid these problems , neural models have been applied to improve summarization techniques . Tan et al . ( 2017 ) proposed a graph-based attention mechanism to discover the salient information of a document . Fernandes et al . ( 2019 ) developed a framework to extend existing sequence encoders with a graph component to reason about long-distance relationships . Zhong et al . ( 2019 ) used a Transformer encoder to create a fully-connected graph that learns relations between pairwise sentences . Nevertheless , the factual knowledge implied in dialogues is largely ignored . Cao et al . ( 2017 ) incorporated the fact descriptions as an additional input source text in the attentional sequence-to-sequence framework . Gunel et al . ( 2019 ) employed an entity-aware transformer structure to boost the factual correctness , where the entities come from the Wikidata knowledge graph . In this work , we design a graph encoder based on conversational structure , which uses the sparse relational graph self-attention network to obtain the global features of dialogues . Abstractive dialogue summarization Due to the lack of publicly available resources , the work for dialogue summarization has been rarely studied and it is still in the exploratory stage at present . Some early works benchmarked the abstractive dialogue summarization task using the AMI meeting corpus , which contains a wide range of annotations , including dialogue acts , topic descriptions , etc ( Carletta et al. , 2005 ; Mehdad et al. , 2014 ; Banerjee et al. , 2015 ) . Goo & Chen ( 2018 ) proposed to use the high-level topic descriptions ( e.g . costing evaluation of project process ) as the gold references and leveraged dialogue act signals in a neural summarization model . They assumed that dialogue acts indicated interactive signals and used these information for a better performance . Customer service interaction is also a common form of dialogue , which contains questions of the user Graph . 3 METHODOLOGY . In this section , we introduce the Knowledge Graph Enhanced Dual-Copy network , as displayed in Figure 1 ( a ) . Our framework consists of four modules including a sequence encoder , a graph encoder , a factual knowledge graph , and a dual-copy decoder . Importantly , we first present two types of graphs : Dialogue Graph which constructs conversational structures , and Factual Knowledge Graph which directly extracts fact descriptions from source dialogues . Then , the dual-copy decoder generates faithful summaries by embedding the semantics of both source utterances and factual knowledge . 3.1 SEQUENCE ENCODER . Considering that the contextual information of dialogues usually flows along the sequence , the sequential aspect of the input text is also rich in meaning . Taking the dialogue D as an example , we feed the tokens of it one-by-one into a single-layer bidirectional LSTM , producing a sequence of encoder hidden states { hS1 , hS2 , ... , hSn } . The BiLSTM at the time step i is defined as follows : hSi = BiLSTM ( wi , h S i−1 ) ( 1 ) where wi is the embedding of the i-th token in dialogue , and hSi is the concatenation of the hidden state of a forward LSTM and a backward LSTM . 3.2 GRAPH ENCODER . Given a constructed dialogue graph Gd = ( Vd , Ed ) , Vd = { vd,1 , ... , vd , m } corresponds to m utterances in the dialogue . Ed is a real-value edge weight matrix and ed , ij 6= 0 ( i ∈ { 1 , ... , m } , j ∈ { 1 , ... , m } ) indicates that there is an edge between the i-th utterance and the j-th utterance . We then use graph neural networks to update the representations of all utterances to capture long-distance cross-sentence dependencies , as shown in Figure 2 ( a ) . 3.2.1 NODE INITIALIZATION . We first use a Convolutional Neural Network ( CNN ) with different filter sizes to obtain the representations xj for the j-th utterance vd , j . We also do pos tagging on dialogues with off-the-shelf tools such as Stanford CoreNLP ( Manning et al. , 2014 ) and select nouns , numerals , adjectives , adverbs , and notional verbs as keywords . Each keyword is transformed into a real-valued vector representation εi by looking up the word embedding matrix , which is initialized by a random process . The attention mechanism is then designed to characterize the strength of contextual correlations between utterances and keywords . The representation of the utterance v̂d , j is updated as a weighted sum of these keyword vector ki ( i ∈ { 1 , ... , K } ) : Aij = f ( εi , xj ) = ε T i xj αij = softmaxi ( Aij ) = exp ( Aij ) ∑ k∈Nj exp ( Akj ) v̂d , j = σ ( K∑ i=1 αijWaεi ) ( 2 ) where K is the number of keywords in each dialogue , Wa is a trainable weight , and αij is the attention coefficient between εi and xj . 3.2.2 EDGE INITIALIZATION . If we hypothesize that each utterance is contextually dependent on all the other utterances in the dialogue , then a fully connected graph would be constructed . However , this leads to a huge amount of computation . Therefore , we adopt a strategy to construct the edges of the graph , which relies on the various semantic relations among utterances . We define three types of edge labels : speaker dependency , sequential context dependency , co-occurring keyword dependency ( A.1 ) . Speaker dependency : The relation depends on where the same speaker appears in the dialogue . In other words , if the utterances belong to the same speaker , we will set an edge between them . Sequential context dependency : The relation describes the sequential utterances that occur within a fixed-size sliding window . In this scenario , each utterance node vd , i has an edge with the immediate p utterances of the past vd , i−1 , vd , i−2 , ... , vd , i−p , and f utterances of the future : vd , i+1 , vd , i+2 , ... , vd , i+f . co-occurring keyword dependency : The relation means that all utterances containing the same keyword are connected . We further change the existing undirected edges into bidirectional edges and add self-loops to enhance the information flow . | This paper proposes to improve dialogue summarization by encoding the text with a sequential encoder (for token-level contextualization) and a graph encoder (for long-distance and semantic contextualization). A KG is built and considered to be a surrogate for "factual knowledge". A dual-copy mechanism is used while decoding in the hope that direct access to this factual knowledge will enhance the faithfulness of the generated summaries. | SP:63621148403a12bfbf0dd14179ad3933d6ebe50d |
NOSE Augment: Fast and Effective Data Augmentation Without Searching | 1 INTRODUCTION . Data is an essential and dominant factor for learning AI models , especially in deep learning era where deep neural networks normally require large data volume for training . Data augmentation techniques artificially create new samples to increase the diversity of training data and in turn the generalization of AI models . For example , different image transformation operations , such as rotation , flip , shear etc. , have been used to generate variations on original image samples in image classification and other computer vision tasks . More intricate augmentation operations have also been implemented , such as Cutout ( Devries & Taylor , 2017 ) , Mixup ( Zhang et al. , 2018 ) , Cutmix ( Yun et al. , 2019 ) , Sample Pairing ( Inoue , 2018 ) , and so on . How to formulate effective augmentation strategies with these basic augmentation methods becomes the crucial factor to the success of data augmentation . Recent works ( Cubuk et al. , 2019 ; Lim et al. , 2019 ; Ho et al. , 2019 ) introduced automated searching or optimization techniques in augmentation policy search . The common assumption of these methods is : a selected subset of better-fit augmentation policies will produce more relevant augmented data which will in turn result in a better trained model . Here the augmentation policy is defined by an ordered sequence of augmentation operations , such as image transformations , parameterized with probability and magnitude . Though these methods achieved state-of-the-art accuracies on image classification tasks , they lead to high computational cost in general , due to large search space and extra training steps . More importantly , it is worth exploring whether it is really necessary to find the best-fit subset of policies with specific parameter values of probability and magnitude . RandAugment ( Cubuk et al. , 2020 ) has started to simplify the parameters and scale down the search space defined by AutoAugment Cubuk et al . ( 2019 ) , but their method still relied on grid search for iterative optimization of the simplified parameters . Our method aims to fully avoid policy search and cost , meanwhile to maintain or improve model performance in terms of both accuracy and training efficiency . Our work showed that by applying simple stochastic augmentation policies with the same sampling space and other settings of training , we could obtain equal or very close performance with search-based augmentation methods . Another advantage of stochastic policies is that adding more operations in the pool does not bring additional cost ; while in search-base methods , more operations in the pool causes exponential increase of the search space . Therefore , the second part of our method is to add more operations to the pool to bring more data diversity . In practice , we introduced a new category of operations such as mixup and cutmix into the operation pool . Furthermore , we tackled automated augmentation from overall data usage point of view , in contrast to data creation point of view accentuated by policy-search based methods . Inspired by the idea of Curriculum Learning ( CL ) ( Bengio et al. , 2009 ) , which presents training samples in an increasing order of difficulties , our method defines various complexity levels of augmentation strategies and applies them with orders on phased training stages . To avoid the confounding overfitting problem of original Curriculum Learning in practice , our method applies the inverted order of Curriculum Learning , which presents the hardest augmentation strategies from the beginning and gradually decreases the complexity levels . In general , our augmentation method replaces policy search with stochastic policy generation , upon which it introduces more operations for better diversity and phased augmentation strategy with decreasing complexities for a smooth learning convergence , and as an integral solution it achieves better results . Figure 1 describes our method and the difference compared to search-based methods . The main contributions of this paper can be summarized as follows : 1 . We present a no-search ( NOSE ) augmentation method as an alternative of computation-intensive search-based auto-augment methods . By jointly applying phased augmentation strategy and introducing more augmentation operations on top of a simple stochastic augmentation mechanism , NOSE augment achieves state-of-the-art ( SOTA ) accuracies on CIFAR 10 , CIFAR 100 ( Krizhevsky , 2009 ) and close-to-SOTA results on other benchmark datasets . Our ablation study demonstrates that all the components of our methods should be combined together to achieve the best performance . 2 . We demonstrate that a stochastic-based augmentation approach can obtain accuracies comparable to those of search-based methods while achieving overwhelming advantage on overall augmentation and training efficiency as the searching phase is completely avoided . 3 . Besides image classification , we also applied NOSE augment on face recognition and text detection ( OCR ) tasks , and obtained competitive or better results in comparison with search-based methods . This further proves the advantage and generality of NOSE augment . 2 RELATED WORKS . Our work is most closely related to RandAugment ( Cubuk et al. , 2020 ) . A key idea in RandAugment is to avoid a separate search phase on proxy datasets but chose instead to reduce the search space by decreasing the number of parameters . For instance , the probability for each operator is set to a constant uniform probability . The two sets of data augmentation parameters to be searched are N , the number of transformations for a given image and M , the discrete operator magnitude . These two parameters are regarded as hyperparameters and tuned using grid search . Our method is similar to RandAugment in terms of the operators used and the setting of equal probability for each operator . The most contrasting difference between RandAugment and our method is that RandAugment is still a search-based method with search cost while our method skips policy search completely and tackles the problem by introducing new augmentation operations and further new strategies built upon stochastic policies . Our work stands diametrically opposite to the AutoAugment series of methods ( Cubuk et al. , 2019 ; Lim et al. , 2019 ; Zhang et al. , 2020 ) , in which the best data augmentation policy is derived through a search . AutoAugment ( Cubuk et al. , 2019 ) uses a RNN controller to propose an augmentation strategy . Based on this proposed augmentation strategy , the model is trained and use the resulting validation accuracy to update the RNN controller . Although AutoAugment achieves good results on the standard benchmark datasets , the search cost is prohibitively huge , for instance , 5000 GPU ( NVIDIA Tesla P100 ) hours on the CIFAR-10 dataset and Pyramid-Net+ShakeDrop model . Fast AutoAugment ( Fast AA ) ( Lim et al. , 2019 ) ameliorates AutoAugment ’ s huge search cost with a three pronged approach . Smaller datasets are used for policy search . The idea of density matching is proposed to avoid having to re-train the model for assessing the validation accuracy for each proposed policy . The use of Bayesian Optimization based method ( Bergstra et al. , 2011 ) also helps to converge to an effective augmentation policy quickly . Adversarial Augment ( Adv AA ) ( Zhang et al. , 2020 ) reduces the huge computational cost of AutoAugment through the adversarial policy framework , which generates data samples that maximizes the training loss of the target network . PBA ( Ho et al. , 2019 ) introduces the idea of non-stationary policy schedules instead of the fixed augementation policy proposed in AutoAugment . The non-stationary policy schedules refers to how the policy evolves with the training epochs . Our main differences with aforementioned state-of-the-art methods lie in our stochastic policy described in section 3.1 and the multi-stage complexity driven augmentation policy outlined in section 3.3 . We use the same set of operators and settings as these related works . 3 METHOD . We describe the three key components of our proposed method in this section . In section 3.1 , we put forward a stochastic-based method as opposed to the search-based paradigm advocated by many of the state-of-the-art works described in section 2 . Due to the counter-intuitiveness ( but effective ) nature of this stochastic-based method , we first provide insights and motivations into stochastic augmentation policies in section 3.1 . In section 3.2 , we capitalize on our proposed stochastic-based method by proposing additional operators that will further enrich the data augmentation diversity , since there is no extra search cost for adding new operators with a no-search method . In 3.3 , we propose a multi-stage complexity driven policy that helps to resolve the tension between augmented data diversity and data distribution fidelity . Our ablation study demonstrates that the performance of our method is not a simple incremental benefit with each individual component , but rather , the three components need to work together to achieve a competitive performance with no policy search cost . 3.1 STOCHASTIC POLICY - SKIPPING POLICY SEARCH . The first component of our method removes policy searching completely and applies a stochastic augmentation policy with randomly selected operations and magnitudes . Unlike the search-based methods , once an operation is selected , it is used with 100 % probability . Our stochastic method follows the same policy definition as existing search-based methods . Specifically , one augmentation policy has 5 sub-policies ; each sub-policy consists of 2 augmentation operations . The base operation pool includes the following 15 operations : ShearX/Y , TranslateX/Y , Rotate , AutoContrast , Invert , Equalize , Solarize , Posterize , Contrast , Color , Brightness , Sharpness and Cutout . Each operation has 11 uniformly discretized magnitudes which is randomly selected upon each use . We provide an abstract analysis for stochastic policy through a data deficiency complement point of view , in which a relatively slower accuracy increase is expected for stochastic method in early stage of training . We refer to the time period required by stochastic approach to accumulate enough amount of data in the deficient dimensions as the Stochastic Accumulation Stage ( SAS ) . However , as training carries on , the amount of data of deficient dimension in the random approach may gradually get close to or even go beyond the one in search-based methods . When enough number of epochs is reached , the performance of random policy may match or even overtake search-based methods . More detailed intuitions are provided in section A.1 of the appendix . Note that we are not claiming that this stochastic policy outperforms the search-based augmentation policies , but rather , this stochastic policy provides a good foundation for us to build upon ; it allows us to further incorporate additional operators and a multi-stage complexity augmentation strategy with very little or no extra cost compared to search-based methods . 3.2 INTRODUCING ADDITIONAL AUGMENTATION OPERATIONS . In our method , we introduce mix-based operations such as mixup , cutmix , and augmix ( Hendrycks et al. , 2020 ) in addition to the randomly generated augmentation policies . RandAugment showed certain operation ( e.g . posterize ) brought consistent negative effect to augmentation result regardless of the number of operations in the pool ; while some ( e.g . rotate ) had consistent positive effect . We also observed some operations might harm the augmentation performance when directly applied on stochastic method ; however , an interesting finding is that the negative influence could be weakened or even turned back to positive when these operations were used together with our complexity driven strategy , which is explained in next section . Note that these mix-based operators can also be introduced to the search-based methods . The main difference is that there is no extra overhead or cost as far as our method is concern ; whereas these additional operators will incur even larger cost for an already expensive search process . | This paper aims to provide an effective augmentation strategy without the need for a separate search. The resulting method is called NOSE Augment, which is presented as a substitute for the previous AutoAugment type methods (e.g. Fast AutoAugment, Population Based Augmentation, RandAugment, Adversarial AutoAugment etc.) In parallel to this goal, the authors propose adding the mixing-based augmentation operations Mixup, Cutmix, and Augmix into the list of operations used in AutoAugment. Finally, authors also employ a curriculum of augmentation strength during training. | SP:95a437dfc5ea49319e4f23691decffac1d4a74b3 |
NOSE Augment: Fast and Effective Data Augmentation Without Searching | 1 INTRODUCTION . Data is an essential and dominant factor for learning AI models , especially in deep learning era where deep neural networks normally require large data volume for training . Data augmentation techniques artificially create new samples to increase the diversity of training data and in turn the generalization of AI models . For example , different image transformation operations , such as rotation , flip , shear etc. , have been used to generate variations on original image samples in image classification and other computer vision tasks . More intricate augmentation operations have also been implemented , such as Cutout ( Devries & Taylor , 2017 ) , Mixup ( Zhang et al. , 2018 ) , Cutmix ( Yun et al. , 2019 ) , Sample Pairing ( Inoue , 2018 ) , and so on . How to formulate effective augmentation strategies with these basic augmentation methods becomes the crucial factor to the success of data augmentation . Recent works ( Cubuk et al. , 2019 ; Lim et al. , 2019 ; Ho et al. , 2019 ) introduced automated searching or optimization techniques in augmentation policy search . The common assumption of these methods is : a selected subset of better-fit augmentation policies will produce more relevant augmented data which will in turn result in a better trained model . Here the augmentation policy is defined by an ordered sequence of augmentation operations , such as image transformations , parameterized with probability and magnitude . Though these methods achieved state-of-the-art accuracies on image classification tasks , they lead to high computational cost in general , due to large search space and extra training steps . More importantly , it is worth exploring whether it is really necessary to find the best-fit subset of policies with specific parameter values of probability and magnitude . RandAugment ( Cubuk et al. , 2020 ) has started to simplify the parameters and scale down the search space defined by AutoAugment Cubuk et al . ( 2019 ) , but their method still relied on grid search for iterative optimization of the simplified parameters . Our method aims to fully avoid policy search and cost , meanwhile to maintain or improve model performance in terms of both accuracy and training efficiency . Our work showed that by applying simple stochastic augmentation policies with the same sampling space and other settings of training , we could obtain equal or very close performance with search-based augmentation methods . Another advantage of stochastic policies is that adding more operations in the pool does not bring additional cost ; while in search-base methods , more operations in the pool causes exponential increase of the search space . Therefore , the second part of our method is to add more operations to the pool to bring more data diversity . In practice , we introduced a new category of operations such as mixup and cutmix into the operation pool . Furthermore , we tackled automated augmentation from overall data usage point of view , in contrast to data creation point of view accentuated by policy-search based methods . Inspired by the idea of Curriculum Learning ( CL ) ( Bengio et al. , 2009 ) , which presents training samples in an increasing order of difficulties , our method defines various complexity levels of augmentation strategies and applies them with orders on phased training stages . To avoid the confounding overfitting problem of original Curriculum Learning in practice , our method applies the inverted order of Curriculum Learning , which presents the hardest augmentation strategies from the beginning and gradually decreases the complexity levels . In general , our augmentation method replaces policy search with stochastic policy generation , upon which it introduces more operations for better diversity and phased augmentation strategy with decreasing complexities for a smooth learning convergence , and as an integral solution it achieves better results . Figure 1 describes our method and the difference compared to search-based methods . The main contributions of this paper can be summarized as follows : 1 . We present a no-search ( NOSE ) augmentation method as an alternative of computation-intensive search-based auto-augment methods . By jointly applying phased augmentation strategy and introducing more augmentation operations on top of a simple stochastic augmentation mechanism , NOSE augment achieves state-of-the-art ( SOTA ) accuracies on CIFAR 10 , CIFAR 100 ( Krizhevsky , 2009 ) and close-to-SOTA results on other benchmark datasets . Our ablation study demonstrates that all the components of our methods should be combined together to achieve the best performance . 2 . We demonstrate that a stochastic-based augmentation approach can obtain accuracies comparable to those of search-based methods while achieving overwhelming advantage on overall augmentation and training efficiency as the searching phase is completely avoided . 3 . Besides image classification , we also applied NOSE augment on face recognition and text detection ( OCR ) tasks , and obtained competitive or better results in comparison with search-based methods . This further proves the advantage and generality of NOSE augment . 2 RELATED WORKS . Our work is most closely related to RandAugment ( Cubuk et al. , 2020 ) . A key idea in RandAugment is to avoid a separate search phase on proxy datasets but chose instead to reduce the search space by decreasing the number of parameters . For instance , the probability for each operator is set to a constant uniform probability . The two sets of data augmentation parameters to be searched are N , the number of transformations for a given image and M , the discrete operator magnitude . These two parameters are regarded as hyperparameters and tuned using grid search . Our method is similar to RandAugment in terms of the operators used and the setting of equal probability for each operator . The most contrasting difference between RandAugment and our method is that RandAugment is still a search-based method with search cost while our method skips policy search completely and tackles the problem by introducing new augmentation operations and further new strategies built upon stochastic policies . Our work stands diametrically opposite to the AutoAugment series of methods ( Cubuk et al. , 2019 ; Lim et al. , 2019 ; Zhang et al. , 2020 ) , in which the best data augmentation policy is derived through a search . AutoAugment ( Cubuk et al. , 2019 ) uses a RNN controller to propose an augmentation strategy . Based on this proposed augmentation strategy , the model is trained and use the resulting validation accuracy to update the RNN controller . Although AutoAugment achieves good results on the standard benchmark datasets , the search cost is prohibitively huge , for instance , 5000 GPU ( NVIDIA Tesla P100 ) hours on the CIFAR-10 dataset and Pyramid-Net+ShakeDrop model . Fast AutoAugment ( Fast AA ) ( Lim et al. , 2019 ) ameliorates AutoAugment ’ s huge search cost with a three pronged approach . Smaller datasets are used for policy search . The idea of density matching is proposed to avoid having to re-train the model for assessing the validation accuracy for each proposed policy . The use of Bayesian Optimization based method ( Bergstra et al. , 2011 ) also helps to converge to an effective augmentation policy quickly . Adversarial Augment ( Adv AA ) ( Zhang et al. , 2020 ) reduces the huge computational cost of AutoAugment through the adversarial policy framework , which generates data samples that maximizes the training loss of the target network . PBA ( Ho et al. , 2019 ) introduces the idea of non-stationary policy schedules instead of the fixed augementation policy proposed in AutoAugment . The non-stationary policy schedules refers to how the policy evolves with the training epochs . Our main differences with aforementioned state-of-the-art methods lie in our stochastic policy described in section 3.1 and the multi-stage complexity driven augmentation policy outlined in section 3.3 . We use the same set of operators and settings as these related works . 3 METHOD . We describe the three key components of our proposed method in this section . In section 3.1 , we put forward a stochastic-based method as opposed to the search-based paradigm advocated by many of the state-of-the-art works described in section 2 . Due to the counter-intuitiveness ( but effective ) nature of this stochastic-based method , we first provide insights and motivations into stochastic augmentation policies in section 3.1 . In section 3.2 , we capitalize on our proposed stochastic-based method by proposing additional operators that will further enrich the data augmentation diversity , since there is no extra search cost for adding new operators with a no-search method . In 3.3 , we propose a multi-stage complexity driven policy that helps to resolve the tension between augmented data diversity and data distribution fidelity . Our ablation study demonstrates that the performance of our method is not a simple incremental benefit with each individual component , but rather , the three components need to work together to achieve a competitive performance with no policy search cost . 3.1 STOCHASTIC POLICY - SKIPPING POLICY SEARCH . The first component of our method removes policy searching completely and applies a stochastic augmentation policy with randomly selected operations and magnitudes . Unlike the search-based methods , once an operation is selected , it is used with 100 % probability . Our stochastic method follows the same policy definition as existing search-based methods . Specifically , one augmentation policy has 5 sub-policies ; each sub-policy consists of 2 augmentation operations . The base operation pool includes the following 15 operations : ShearX/Y , TranslateX/Y , Rotate , AutoContrast , Invert , Equalize , Solarize , Posterize , Contrast , Color , Brightness , Sharpness and Cutout . Each operation has 11 uniformly discretized magnitudes which is randomly selected upon each use . We provide an abstract analysis for stochastic policy through a data deficiency complement point of view , in which a relatively slower accuracy increase is expected for stochastic method in early stage of training . We refer to the time period required by stochastic approach to accumulate enough amount of data in the deficient dimensions as the Stochastic Accumulation Stage ( SAS ) . However , as training carries on , the amount of data of deficient dimension in the random approach may gradually get close to or even go beyond the one in search-based methods . When enough number of epochs is reached , the performance of random policy may match or even overtake search-based methods . More detailed intuitions are provided in section A.1 of the appendix . Note that we are not claiming that this stochastic policy outperforms the search-based augmentation policies , but rather , this stochastic policy provides a good foundation for us to build upon ; it allows us to further incorporate additional operators and a multi-stage complexity augmentation strategy with very little or no extra cost compared to search-based methods . 3.2 INTRODUCING ADDITIONAL AUGMENTATION OPERATIONS . In our method , we introduce mix-based operations such as mixup , cutmix , and augmix ( Hendrycks et al. , 2020 ) in addition to the randomly generated augmentation policies . RandAugment showed certain operation ( e.g . posterize ) brought consistent negative effect to augmentation result regardless of the number of operations in the pool ; while some ( e.g . rotate ) had consistent positive effect . We also observed some operations might harm the augmentation performance when directly applied on stochastic method ; however , an interesting finding is that the negative influence could be weakened or even turned back to positive when these operations were used together with our complexity driven strategy , which is explained in next section . Note that these mix-based operators can also be introduced to the search-based methods . The main difference is that there is no extra overhead or cost as far as our method is concern ; whereas these additional operators will incur even larger cost for an already expensive search process . | The authors propose a method for learning an augmentation pipeline for image recognition. As opposed to recent existing approaches such as AutoAugment or RandAugment, the authors do not seek for the augmentation pipeline iteratively. Instead they use a stochastic approach, where augmenters are split to three categories based on their complexity to be used by curriculum learning. | SP:95a437dfc5ea49319e4f23691decffac1d4a74b3 |
Learning from others' mistakes: Avoiding dataset biases without modeling them | 1 INTRODUCTION . The natural language processing community has made tremendous progress in using pre-trained language models to improve predictive accuracy ( Devlin et al. , 2019 ; Raffel et al. , 2019 ) . Models have now surpassed human performance on language understanding benchmarks such as SuperGLUE ( Wang et al. , 2019 ) . However , studies have shown that these results are partially driven by these models detecting superficial cues that correlate well with labels but which may not be useful for the intended underlying task ( Jia & Liang , 2017 ; Schwartz et al. , 2017 ) . This brittleness leads to overestimating model performance on the artificially constructed tasks and poor performance in out-of-distribution or adversarial examples . A well-studied example of this phenomenon is the natural language inference dataset MNLI ( Williams et al. , 2018 ) . The generation of this dataset led to spurious surface patterns that correlate noticeably with the labels . Poliak et al . ( 2018 ) highlight that negation words ( “ not ” , “ no ” , etc . ) are often associated with the contradiction label . Gururangan et al . ( 2018 ) , Poliak et al . ( 2018 ) , and Tsuchiya ( 2018 ) show that a model trained solely on the hypothesis , completely ignoring the intended signal , reaches strong performance . We refer to these surface patterns as dataset biases since the conditional distribution of the labels given such biased features is likely to change in examples outside the training data distribution ( as formalized by He et al . ( 2019 ) ) . A major challenge in representation learning for NLP is to produce models that are robust to these dataset biases . Previous work ( He et al. , 2019 ; Clark et al. , 2019 ; Mahabadi et al. , 2020 ) has targeted removing dataset biases by explicitly factoring them out of models . These studies explicitly construct a biased model , for instance , a hypothesis-only model for NLI experiments , and use it to improve the robustness of the main model . The core idea is to encourage the main model to find a different explanation where the biased model is wrong . During training , products-of-experts ensembling ( Hinton , 2002 ) is used to factor out the biased model . While these works show promising results , the assumption of knowledge of the underlying dataset bias is quite restrictive . Finding dataset biases in established datasets is a costly and time-consuming process , and may require access to private details about the annotation procedure , while actively re- ∗Supported by the Viterbi Fellowship in the Center for Computer Engineering at the Technion ducing surface correlations in the collection process of new datasets is challenging given the number of potential biases ( Zellers et al. , 2019 ; Sakaguchi et al. , 2020 ) . In this work , we explore methods for learning from biased datasets which do not require such an explicit formulation of the dataset biases . We first show how a model with limited capacity , which we call a weak learner , trained with a standard cross-entropy loss learns to exploit biases in the dataset . We then investigate the biases on which this weak learner relies and show that they match several previously manually identified biases . Based on this observation , we leverage such limited capacity models in a product of experts ensemble to train a more robust model and evaluate our approach in various settings ranging from toy datasets up to large crowd-sourced benchmarks : controlled synthetic bias setup ( He et al. , 2019 ; Clark et al. , 2019 ) , natural language inference ( McCoy et al. , 2019b ) , extractive question answering ( Jia & Liang , 2017 ) and fact verification Schuster et al . ( 2019 ) . Our contributions are the following : ( a ) we show that weak learners are prone to relying on shallow heuristics and highlight how they rediscover previously human-identified dataset biases ; ( b ) we demonstrate that we do not need to explicitly know or model dataset biases to train more robust models that generalize better to out-of-distribution examples ; ( c ) we discuss the design choices for weak learners and show trade-offs between higher out-of-distribution performance at the expense of the in-distribution performance . 2 RELATED WORK . Many studies have reported dataset biases in various settings . Examples include visual question answering ( Jabri et al. , 2016 ; Zhang et al. , 2016 ) , story completion ( Schwartz et al. , 2017 ) , and reading comprehension ( Kaushik & Lipton , 2018 ; Chen et al. , 2016 ) . Towards better evaluation methods , researchers have proposed to collect “ challenge ” datasets that account for surface correlations a model might adopt ( Jia & Liang , 2017 ; McCoy et al. , 2019b ) . Standard models without specific robust training methods often drop in performance when evaluated on these challenge sets . While these works have focused on data collection , another approach is to develop methods allowing models to ignore dataset biases during training . Several active areas of research tackle this challenge by adversarial training ( Belinkov et al. , 2019a ; b ; Stacey et al. , 2020 ) , example forgetting ( Yaghoobzadeh et al. , 2019 ) and dynamic loss adjustment ( Cadène et al. , 2019 ) . Previous work ( He et al. , 2019 ; Clark et al. , 2019 ; Mahabadi et al. , 2020 ) has shown the effectiveness of product of experts to train un-biased models . In our work , we show that we do not need to explicitly model biases to apply these de-biasing methods and can use a more general setup than previously presented . Orthogonal to these evaluation and optimization efforts , data augmentation has attracted interest as a way to reduce model biases by explicitly modifying the dataset distribution ( Min et al. , 2020 ; Belinkov & Bisk , 2018 ) , either by leveraging human knowledge about dataset biases such as swapping male and female entities ( Zhao et al. , 2018 ) or by developing dynamic data collection and benchmarking ( Nie et al. , 2020 ) . Our work is mostly orthogonal to these efforts and alleviates the need for a human-in-the-loop setup which is common to such data-augmentation approaches . Large pre-trained language models have contributed to improved out-of-distribution generalization ( Hendrycks et al. , 2020 ) . However , in practice , that remains a challenge in natural language processing ( Linzen , 2020 ; Yogatama et al. , 2019 ) and our work aims at out-of-distribution robustness without significantly compromising in-distribution performance . Finally , in parallel the work of Utama et al . ( 2020 ) presents a related de-biasing method leveraging the mistakes of weakened models without the need to explicitly model dataset biases . Our approach is different in several ways , in particular we advocate for using limited capacity weak learner while Utama et al . ( 2020 ) uses the same architecture as the robust model trained on a few thousands examples . We investigated the trade-off between learner ’ s capacity and resulting performances as well as the resulting few-shot learning regime in the limit of a high capacity weak model . 3 METHOD . 3.1 OVERVIEW . Our approach utilizes product of experts ( Hinton , 2002 ) to factor dataset biases out of a learned model . We have access to a training set ( xi , yi ) 1≤i≤N where each example xi has a label yi among K classes . We use two models fW ( weak ) and fM ( main ) which produce respective logits vectors w and m ∈ RK . The product of experts ensemble of fW and fM produces logits vector e ∀1 ≤ j ≤ K , ej = wj +mj ( 1 ) Equivalently , we have softmax ( e ) ∝ softmax ( w ) softmax ( m ) where is the element-wise multiplication . Our training approach can be decomposed in two successive stages : ( a ) training the weak learner fW with a standard cross-entropy loss ( CE ) and ( b ) training a main ( robust ) model fM via product of experts ( PoE ) to learn from the errors of the weak learner . The core intuition of this method is to encourage the robust model to learn to make predictions that take into account the weak learner ’ s mistakes . We do not make any assumption on the biases present ( or not ) in the dataset and rely on letting the weak learner discover them during training . Moreover , in contrast to prior work ( Mahabadi et al. , 2020 ; He et al. , 2019 ; Clark et al. , 2019 ) in which the weak learner had a hand-engineered bias-specific structure , our approach does not make any specific assumption on the weak learner such as its architecture , capacity , pre-training , etc . The weak learner fW is trained with standard cross-entropy . The final goal is producing main model fM . After training , the weak model fW is frozen and used only as part of the product of experts . Since the weak model is frozen , only the main model fM receives gradient updates during training . This is similar to He et al . ( 2019 ) ; Clark et al . ( 2019 ) but differs from Mahabadi et al . ( 2020 ) who train both weak and main models jointly . For convenience , we refer to the cross-entropy of the prediction e of Equation 1 as the PoE cross-entropy . 3.2 ANALYSIS : THE ROBUST MODEL LEARNS FROM THE ERRORS OF THE WEAK LEARNER . To better explore the impact of PoE training with a weak learner , we consider the special case of binary classification with logistic regression . Here w and m are scalar logits and the softmax becomes a sigmoid . The loss of the product of experts for a single positive example is : LPoE , binary = −m− w + log ( 1 + exp ( m+ w ) ) ( 2 ) Logit w is a fixed value since the weak learner is frozen . We also define the entropy of the weak learner asHw = −p log ( p ) − ( 1− p ) log ( 1− p ) where p = σ ( w ) as our measure of certainty . Different values of w from the weak learner induce different gradient updates in the main model . Figure 1a shows the gradient update of the main model logitm . Each of the three curves corresponds to a different value of w the weak model . • Weak Model is Certain / Incorrect : the first case ( in blue ) corresponds to low values of w. The entropy is low and the loss of the weak model is high . The main model receives gradients even when it is classifying the point correctly ( ≈ m = 5 ) which encourages m to compensate for the weak model ’ s mistake . • Weak Model is Uncertain : the second case ( in red ) corresponds tow = 0 which means the weak model ’ s entropy is high ( uniform probability over all classes ) . In this case , product of experts is equal to the main model , and the gradient is equal to the one obtained with cross-entropy . • Weak Model is Certain / Correct : the third case ( in green ) corresponds to high values of w. The entropy is low and the loss of the weak model is low . In this case , m ’ s gradients are “ cropped ” early on and the main model receives less gradients on average . When w is extremely high , m receives no gradient ( and the current example is simply ignored ) . Put another way , the logit values for whichm receives gradients are shifted according the correctness and certainty of the weak model . Figure 1b shows the concentration of training examples of MNLI ( Williams et al. , 2018 ) projected on the 2D coordinates ( correctness , certainty ) from a trained weak learner ( described in Section 4.1 ) . We observe that there are many examples for the 3 cases . More crucially , we verify that the group certain / incorrect is not empty since the examples in this group encourage the model to not rely on the dataset biases . ( a ) Gradient update of m for different values of w on binary classification . ( b ) 2D projection of MNLI examples from a trained weak learner . Colors indicate the concentration and are in log scale . Figure 1 : The analysis of the gradients reveals 3 regimes where the gradient is shifted by the certainty and correctness of the weak learner . These 3 regions are present in real dataset such as MNLI . | This paper focuses on the known problem that current NLP models tend to solve tasks by exploiting superficial properties of the training data that do not generalize. For example, in the NLI task, models learn that negation words are indicative of the label "contradiction" and high word overlap is indicative of the label "entailment". There have been many recent solutions proposed for mitigating such behavior, but existing methods have tended to assume knowledge of the specific dataset biases a priori. In this paper, the authors propose a method based on product of experts that doesn't assume particular knowledge of specific dataset biases. The method works by first training a weak model and then training a "main" model using a loss that upweights examples on which the weak model performs poorly (namely, predicts the wrong answer with high confidence). The assumption is that weak models will exploit heuristics, and so this method will deincentivize the main model to use those same heuristics. The authors evaluate on a range of tasks, including a simulated bias setting, and NLI setting, and a QA setting, and offer a fair amount of analysis of their results. In particular, the analysis showing that the weak learners do in fact adopt the biases which have been documented elsewhere in the literature is interesting, and the discussion of "how weak does the weak learner need to be" is appreciated (a few questions on this below). | SP:aecd57c5b2337667d1619d0da05b1103c8ba07cf |
Learning from others' mistakes: Avoiding dataset biases without modeling them | 1 INTRODUCTION . The natural language processing community has made tremendous progress in using pre-trained language models to improve predictive accuracy ( Devlin et al. , 2019 ; Raffel et al. , 2019 ) . Models have now surpassed human performance on language understanding benchmarks such as SuperGLUE ( Wang et al. , 2019 ) . However , studies have shown that these results are partially driven by these models detecting superficial cues that correlate well with labels but which may not be useful for the intended underlying task ( Jia & Liang , 2017 ; Schwartz et al. , 2017 ) . This brittleness leads to overestimating model performance on the artificially constructed tasks and poor performance in out-of-distribution or adversarial examples . A well-studied example of this phenomenon is the natural language inference dataset MNLI ( Williams et al. , 2018 ) . The generation of this dataset led to spurious surface patterns that correlate noticeably with the labels . Poliak et al . ( 2018 ) highlight that negation words ( “ not ” , “ no ” , etc . ) are often associated with the contradiction label . Gururangan et al . ( 2018 ) , Poliak et al . ( 2018 ) , and Tsuchiya ( 2018 ) show that a model trained solely on the hypothesis , completely ignoring the intended signal , reaches strong performance . We refer to these surface patterns as dataset biases since the conditional distribution of the labels given such biased features is likely to change in examples outside the training data distribution ( as formalized by He et al . ( 2019 ) ) . A major challenge in representation learning for NLP is to produce models that are robust to these dataset biases . Previous work ( He et al. , 2019 ; Clark et al. , 2019 ; Mahabadi et al. , 2020 ) has targeted removing dataset biases by explicitly factoring them out of models . These studies explicitly construct a biased model , for instance , a hypothesis-only model for NLI experiments , and use it to improve the robustness of the main model . The core idea is to encourage the main model to find a different explanation where the biased model is wrong . During training , products-of-experts ensembling ( Hinton , 2002 ) is used to factor out the biased model . While these works show promising results , the assumption of knowledge of the underlying dataset bias is quite restrictive . Finding dataset biases in established datasets is a costly and time-consuming process , and may require access to private details about the annotation procedure , while actively re- ∗Supported by the Viterbi Fellowship in the Center for Computer Engineering at the Technion ducing surface correlations in the collection process of new datasets is challenging given the number of potential biases ( Zellers et al. , 2019 ; Sakaguchi et al. , 2020 ) . In this work , we explore methods for learning from biased datasets which do not require such an explicit formulation of the dataset biases . We first show how a model with limited capacity , which we call a weak learner , trained with a standard cross-entropy loss learns to exploit biases in the dataset . We then investigate the biases on which this weak learner relies and show that they match several previously manually identified biases . Based on this observation , we leverage such limited capacity models in a product of experts ensemble to train a more robust model and evaluate our approach in various settings ranging from toy datasets up to large crowd-sourced benchmarks : controlled synthetic bias setup ( He et al. , 2019 ; Clark et al. , 2019 ) , natural language inference ( McCoy et al. , 2019b ) , extractive question answering ( Jia & Liang , 2017 ) and fact verification Schuster et al . ( 2019 ) . Our contributions are the following : ( a ) we show that weak learners are prone to relying on shallow heuristics and highlight how they rediscover previously human-identified dataset biases ; ( b ) we demonstrate that we do not need to explicitly know or model dataset biases to train more robust models that generalize better to out-of-distribution examples ; ( c ) we discuss the design choices for weak learners and show trade-offs between higher out-of-distribution performance at the expense of the in-distribution performance . 2 RELATED WORK . Many studies have reported dataset biases in various settings . Examples include visual question answering ( Jabri et al. , 2016 ; Zhang et al. , 2016 ) , story completion ( Schwartz et al. , 2017 ) , and reading comprehension ( Kaushik & Lipton , 2018 ; Chen et al. , 2016 ) . Towards better evaluation methods , researchers have proposed to collect “ challenge ” datasets that account for surface correlations a model might adopt ( Jia & Liang , 2017 ; McCoy et al. , 2019b ) . Standard models without specific robust training methods often drop in performance when evaluated on these challenge sets . While these works have focused on data collection , another approach is to develop methods allowing models to ignore dataset biases during training . Several active areas of research tackle this challenge by adversarial training ( Belinkov et al. , 2019a ; b ; Stacey et al. , 2020 ) , example forgetting ( Yaghoobzadeh et al. , 2019 ) and dynamic loss adjustment ( Cadène et al. , 2019 ) . Previous work ( He et al. , 2019 ; Clark et al. , 2019 ; Mahabadi et al. , 2020 ) has shown the effectiveness of product of experts to train un-biased models . In our work , we show that we do not need to explicitly model biases to apply these de-biasing methods and can use a more general setup than previously presented . Orthogonal to these evaluation and optimization efforts , data augmentation has attracted interest as a way to reduce model biases by explicitly modifying the dataset distribution ( Min et al. , 2020 ; Belinkov & Bisk , 2018 ) , either by leveraging human knowledge about dataset biases such as swapping male and female entities ( Zhao et al. , 2018 ) or by developing dynamic data collection and benchmarking ( Nie et al. , 2020 ) . Our work is mostly orthogonal to these efforts and alleviates the need for a human-in-the-loop setup which is common to such data-augmentation approaches . Large pre-trained language models have contributed to improved out-of-distribution generalization ( Hendrycks et al. , 2020 ) . However , in practice , that remains a challenge in natural language processing ( Linzen , 2020 ; Yogatama et al. , 2019 ) and our work aims at out-of-distribution robustness without significantly compromising in-distribution performance . Finally , in parallel the work of Utama et al . ( 2020 ) presents a related de-biasing method leveraging the mistakes of weakened models without the need to explicitly model dataset biases . Our approach is different in several ways , in particular we advocate for using limited capacity weak learner while Utama et al . ( 2020 ) uses the same architecture as the robust model trained on a few thousands examples . We investigated the trade-off between learner ’ s capacity and resulting performances as well as the resulting few-shot learning regime in the limit of a high capacity weak model . 3 METHOD . 3.1 OVERVIEW . Our approach utilizes product of experts ( Hinton , 2002 ) to factor dataset biases out of a learned model . We have access to a training set ( xi , yi ) 1≤i≤N where each example xi has a label yi among K classes . We use two models fW ( weak ) and fM ( main ) which produce respective logits vectors w and m ∈ RK . The product of experts ensemble of fW and fM produces logits vector e ∀1 ≤ j ≤ K , ej = wj +mj ( 1 ) Equivalently , we have softmax ( e ) ∝ softmax ( w ) softmax ( m ) where is the element-wise multiplication . Our training approach can be decomposed in two successive stages : ( a ) training the weak learner fW with a standard cross-entropy loss ( CE ) and ( b ) training a main ( robust ) model fM via product of experts ( PoE ) to learn from the errors of the weak learner . The core intuition of this method is to encourage the robust model to learn to make predictions that take into account the weak learner ’ s mistakes . We do not make any assumption on the biases present ( or not ) in the dataset and rely on letting the weak learner discover them during training . Moreover , in contrast to prior work ( Mahabadi et al. , 2020 ; He et al. , 2019 ; Clark et al. , 2019 ) in which the weak learner had a hand-engineered bias-specific structure , our approach does not make any specific assumption on the weak learner such as its architecture , capacity , pre-training , etc . The weak learner fW is trained with standard cross-entropy . The final goal is producing main model fM . After training , the weak model fW is frozen and used only as part of the product of experts . Since the weak model is frozen , only the main model fM receives gradient updates during training . This is similar to He et al . ( 2019 ) ; Clark et al . ( 2019 ) but differs from Mahabadi et al . ( 2020 ) who train both weak and main models jointly . For convenience , we refer to the cross-entropy of the prediction e of Equation 1 as the PoE cross-entropy . 3.2 ANALYSIS : THE ROBUST MODEL LEARNS FROM THE ERRORS OF THE WEAK LEARNER . To better explore the impact of PoE training with a weak learner , we consider the special case of binary classification with logistic regression . Here w and m are scalar logits and the softmax becomes a sigmoid . The loss of the product of experts for a single positive example is : LPoE , binary = −m− w + log ( 1 + exp ( m+ w ) ) ( 2 ) Logit w is a fixed value since the weak learner is frozen . We also define the entropy of the weak learner asHw = −p log ( p ) − ( 1− p ) log ( 1− p ) where p = σ ( w ) as our measure of certainty . Different values of w from the weak learner induce different gradient updates in the main model . Figure 1a shows the gradient update of the main model logitm . Each of the three curves corresponds to a different value of w the weak model . • Weak Model is Certain / Incorrect : the first case ( in blue ) corresponds to low values of w. The entropy is low and the loss of the weak model is high . The main model receives gradients even when it is classifying the point correctly ( ≈ m = 5 ) which encourages m to compensate for the weak model ’ s mistake . • Weak Model is Uncertain : the second case ( in red ) corresponds tow = 0 which means the weak model ’ s entropy is high ( uniform probability over all classes ) . In this case , product of experts is equal to the main model , and the gradient is equal to the one obtained with cross-entropy . • Weak Model is Certain / Correct : the third case ( in green ) corresponds to high values of w. The entropy is low and the loss of the weak model is low . In this case , m ’ s gradients are “ cropped ” early on and the main model receives less gradients on average . When w is extremely high , m receives no gradient ( and the current example is simply ignored ) . Put another way , the logit values for whichm receives gradients are shifted according the correctness and certainty of the weak model . Figure 1b shows the concentration of training examples of MNLI ( Williams et al. , 2018 ) projected on the 2D coordinates ( correctness , certainty ) from a trained weak learner ( described in Section 4.1 ) . We observe that there are many examples for the 3 cases . More crucially , we verify that the group certain / incorrect is not empty since the examples in this group encourage the model to not rely on the dataset biases . ( a ) Gradient update of m for different values of w on binary classification . ( b ) 2D projection of MNLI examples from a trained weak learner . Colors indicate the concentration and are in log scale . Figure 1 : The analysis of the gradients reveals 3 regimes where the gradient is shifted by the certainty and correctness of the weak learner . These 3 regions are present in real dataset such as MNLI . | This paper proposes a method for training model that are robust to spurious correlations, building upon prior work that uses product-of-experts and a model explicitly trained on a dataset bias (e.g., a hypothesis-only model). Instead of using a model explicitly trained to learn the dataset bias, the authors use a “weak learner” with limited capacity. Then, this model is used in the PoE setting as in past work. The advantage of this method is that a model developer doesn’t need to know that a bias exists, since the hope is that the weak learner will implicitly learn the bias. | SP:aecd57c5b2337667d1619d0da05b1103c8ba07cf |
Hyperbolic Neural Networks++ | 1 INTRODUCTION . Shifting the arithmetic stage of a neural network to a non-Euclidean geometry such as a hyperbolic space is a promising way to find more suitable geometric structures for representing or processing data . Owing to its exponential growth in volume with respect to its radius ( Krioukov et al. , 2009 ; 2010 ) , a hyperbolic space has the capacity to continuously embed tree structures with arbitrarily low distortion ( Krioukov et al. , 2010 ; Sala et al. , 2018 ) . It has been directly utilized , for instance , to visualize large taxonomic graphs ( Lamping et al. , 1995 ) , to embed scale-free graphs ( Blasius et al. , 2018 ) , or to learn hierarchical lexical entailments ( Nickel & Kiela , 2017 ) . Compared to the Euclidean space , a hyperbolic space shows a higher embedding accuracy under fewer dimensions in such cases . Because a wide variety of real-world data encompasses some type of latent hierarchical structures ( Katayama & Maina , 2015 ; Newman , 2005 ; Lin & Tegmark , 2017 ; Krioukov et al. , 2010 ) , it has been empirically proven that a hyperbolic space is able to capture such intrinsic features through representation learning ( Krioukov et al. , 2010 ; Ganea et al. , 2018b ; Nickel & Kiela , 2018 ; Tifrea et al. , 2019 ; Law et al. , 2019 ; Balazevic et al. , 2019 ; Gu et al. , 2019 ) . Motivated by such expressive characteristics , various machine learning methods , including support vector machines ( Cho et al. , 2019 ) and neural networks ( Ganea et al. , 2018a ; Gulcehre et al. , 2018 ; Micic & Chu , 2018 ; Chami et al. , 2019 ) have derived the analogous benefits from the introduction of a hyperbolic space , aiming to improve the performance on advanced tasks beyond just representing data . One of the pioneers in this area is Hyperbolic Neural Networks ( HNNs ) , which introduced an easy-to-interpret and highly analytical coordinate system of hyperbolic spaces , namely , the Poincaré ball model , with a corresponding gyrovector space to smoothly connect the fundamental functions common to neural networks into valid functions in a hyperbolic geometry ( Ganea et al. , 2018a ) . Built upon the solid foundation of HNNs , the essential components for neural networks covering the multinomial logistic regression ( MLR ) , fully-connected ( FC ) layers , and Recurrent Neural Networks have been realized . In addition to the formalism , the methods for graphs ( Liu et al. , 2019 ) , sequential classification ( Micic & Chu , 2018 ) , or Variational Autoencoders ( Nagano et al. , 2019 ; Mathieu et al. , 2019 ; Ovinnikov , 2019 ; Skopek et al. , 2020 ) are further constructed . Such studies have applied the Poincaré ball model as a natural and viable option in the area of deep learning . Despite such progress , however , there still remain some unsolved problems and uncovered regions . In terms of the network architectures , the current formulation of hyperbolic MLR ( Ganea et al. , 2018a ) requires almost twice the number of parameters compared to its Euclidean counterpart . This makes both the training and inference costly in cases in which numerous embedded entities should be classified or where large hidden dimensions are employed , such as in natural language processing . The lack of convolutional layers must also be mentioned , because their application is now ubiquitous and is no longer limited to the field of computer vision . For the individual functions that are commonly used in machine learning , the split and concatenation of vectors have yet to be realized in a hyperbolic space in a manner that can fully exploit such space and allow sub-vectors to achieve a commutative property . Additionally , although several types of closed-form centroids in a hyperbolic space have been proposed , their geometric relationships have not yet been analyzed enough . Because a centroid operation has been utilized in many recent attention-based architectures , the theoretical background for which type of hyperbolic centroid should be used would be required in order to properly convert such operations into the hyperbolic geometry . Based on the previous analysis , we reconsider the flow of several extensions to bridge Euclidean operations into hyperbolic operations and construct alternative or novel methods on the Poincaré ball model . Specifically , the main contributions of this paper are summarized as follows : 1 . We reformulate a hyperbolic MLR to reduce the number of parameters to the same level as a Euclidean version while maintaining the same range of representational properties . 2 . We further exploit the knowledge of 1 as a replacement of an affine transformation and propose a novel generalization of the FC layers that can more properly make use of the hyperbolic nature compared with a previous research ( Ganea et al. , 2018a ) . 3 . We generalize the split and concatenation of coordinates to the Poincaré ball model by setting the invariance of the expected value of the vector norm as a criterion . 4 . By combining 2 and 3 , we further define a novel generalization scheme of arbitrary dimensional convolutional layers in the Poincaré ball model . 5 . We prove the equivalence of the hyperbolic centroids defined in three different hyperbolic geometry models , and expand the condition of non-negative weights to entire real values . Moreover , integrating this finding and previous contributions 1 , 2 , and 3 , we give a theoretical insight into hyperbolic attention mechanisms realized in the Poincaré ball model . We experimentally demonstrate the effectiveness of our methods over existing HNNs and Euclidean equivalents based on a performance test of MLR functions and experiments with Set Transformer ( Lee et al. , 2019 ) and convolutional sequence to sequence modeling ( Gehring et al. , 2017 ) .1 2 HYPERBOLIC GEOMETRY . Riemannian geometry . An n-dimensional manifoldM is an n-dimensional topological space that can be linearly approximated to an n-dimensional real space at any point x ∈ M , and each local linear space is called a tangent space TxM . A Riemannian manifold is a pairing of a differentiable manifold and a metric tensor field g as a function of each point x , which is expressed as ( M , g ) . Here , g defines an inner product on each tangent space such that ∀u , v ∈ TxM , 〈u , v〉x = u > gxv , where gx is a positive definite symmetric matrix defined on TxM . The norm of a tangent vector derived from the inner product is defined as ‖v‖x = √ |〈v , v〉x| . A metric tensor gx provides local information regarding the angle and length of the tangent vectors in TxM , which induces the global length of the curves onM through an integration . The shortest path connecting two arbitrary points onM at a constant speed is called a geodesic , the length of which becomes the distance . Along a geodesic where one of the endpoints is x , the function projecting a tangent vector v ∈ TxM as an initial velocity vector ontoM is denoted as an exponential map expx , and its inverse function is called a logarithmic map logx . In addition , the concept of parallel transport Px→y : TxM→ TyM is generalized to the specially conditioned unique linear isometry between two tangent spaces . For more details , please refer to Spivak ( 1979 ) ; Petersen et al . ( 2006 ) ; Andrews & Hopper ( 2010 ) . Note that , in this study , we equate g with gx if gx is constant , and denote the Euclidean inner product , norm , and unit vector for any real vector u , v ∈ Rn as 〈u , v〉 , ‖v‖ , and [ v ] = v/‖v‖ , respectively . Hyperbolic space . A hyperbolic space is a Riemannian manifold with a constant negative curvature , the coordinates of which can be represented in several isometric models . The most basic model is an 1The code is available at https : //github.com/mil-tokyo/hyperbolic_nn_plusplus . n-dimensional hyperboloid model , which is a hypersurface Hnc in an ( n+ 1 ) -dimensional Minkowski space Rn+11 composed of one time-like axis and n space-like axes . The manifolds of Poincaré ball model Bnc and Beltrami-Klein model Knc are the projections of the hyperboloid model onto the different n-dimensional space-like hyperplanes , as depicted in Figure 1 . For their mathematical definitions and the isometric isomorphism between their coordinates , see Appendix A. Poincaré ball model . The n-dimensional Poincaré ball model of a constant negative curvature −c is defined by ( Bnc , gc ) , where Bnc = { x ∈ Rn | c‖x‖2 < 1 } and gcx = ( λcx ) 2In . Here , Bnc is an open ball of radius c− 1 2 , and λcx = 2 ( 1− c‖x‖2 ) −1 is a conformal factor , which induces the inner product 〈u , v〉cx = ( λcx ) 2〈u , v〉 and norm ‖v‖cx = λcx‖v‖ for u , v ∈ TxBnc . The exponential , logarithmic maps and parallel transport are denoted as expcx , log c x and P c x→y , respectively , as shown in Appendix C. To operate the coordinates as vector-like mathematical objects , the Möbius gyrovector space provides an algebra that treats them as gyrovectors , equipped with various operations including the generalized vector addition , that is , a noncommutative and non-associative binary operation called the Möbius addition ⊕c ( Ungar , 2009 ) . limc→0⊕c converges to + in connection with a Euclidean geometry , the curvature of which is zero . For more details , see Appendix B. Poincaré hyperplane . As a specific generalization of a hyperplane into Riemannian geometry , Ganea et al . ( 2018a ) derived a Poincaré hyperplane H̃ca , p , which is the set of all geodesics containing an arbitrary point p ∈ Bnc and orthogonal to an arbitrary tangent vector a ∈ TpBnc , based on the Möbius gyrovector space . As shown in Appendix C.2 , they also extended the distance dc between two points in Bnc into the distance from a point in Bnc to a Poincaré hyperplane in a closed form expression . 3 HYPERBOLIC NEURAL NETWORKS++ Aiming to overcome the difficulties discussed in Section 1 , we build a novel scheme of hyperbolic neural networks in the Poincaré ball model . The core concept is re-generalization of 〈a , x〉−b type equations with no increase in the number of parameters , which has the potential to replace any affine transformation based on the same mathematical principle . Specifically , this section starts from the reformulation of the hyperbolic MLR , from which the variants to the FC , convolutional , and multi-head attention layers are derived . Several other modifications are also proposed to support neural networks with broad architectures . 3.1 UNIDIRECTIONAL REPARAMETERIZATION OF HYPERBOLIC MLR LAYER . Given an input x ∈ Rn , MLR is an operation used to predict the probabilities of all target outcomes k ∈ { 1 , 2 , ... , K } for the objective variable y as a log-linear model and is described as follows : p ( y = k | x ) ∝ exp ( vk ( x ) ) , where vk ( x ) = 〈ak , x〉 − bk , ak ∈ Rn , bk ∈ R. ( 1 ) Circumvention of the double vectorization . To generalize the linear function vk to the Poincaré ball model , Ganea et al . ( 2018a ) first re-parameterized the scalar term bk as a vector pk ∈ Rn in the form 〈ak , x〉 − bk = 〈ak , −pk + x〉 , where bk = 〈ak , pk〉 , and then discussed the properties which must be satisfied when such vectors become Möbius gyrovectors . However , this causes an undesirable increase in the parameters from n+ 1 to 2n in each class k. As illustrated in Figure 2 ( a ) , this reformulation is redundant from the viewpoint that there exist countless choices of pk to determine the same discriminative hyperplane Hak , bk = { x ∈ Rn | 〈ak , x〉 − bk = 0 } . Because the key of this step is to replace all variables with vectors attributed to the same manifold , we introduce another scalar parameter rk ∈ R instead , which makes the bias vector qak , rk parallel to ak : 〈ak , x〉 − bk = 〈ak , −qak , rk + x〉 , where qak , rk = rk [ ak ] s.t . bk = rk‖ak‖ . ( 2 ) One possible realization of pk is adopted to reduce the previously mentioned redundancies without a loss of generality or representational properties compared to the original affine transformation , and induces another notation : H̄ak , rk : = { x ∈ Rn | 〈ak , −qak , rk + x〉 = 0 } = Hak , rk‖ak‖ . Based on distance d from a point to a hyperplane , Equation 2 can be rewritten as with Lebanon & Lafferty ( 2004 ) in the following form : 〈ak , −qak , rk + x〉 = sign ( 〈ak , −qak , rk + x〉 ) d ( x , H̄ak , rk ) ‖ak‖ , which decomposes the inner product into the product of the norm of an orientation vector ak and the signed distance between an input vector x ∈ Rn and the hyperplane H̄ak , rk . Unidirectional Poincaré MLR . Based on the observation that qak , rk starts from the origin and the concept of Poincaré hyperplanes , we can now generalize vk for x , qak , rk ∈ Bnc and ak ∈ Tqak , rkB n c : vk ( x ) = sign ( 〈ak , c qak , rk ⊕c x〉 ) dc ( x , H̄cak , rk ) ‖ak‖cqak , rk , ( 3 ) where qak , rk = exp c 0 ( rk [ ak ] ) , H̄ c ak , rk : = { x ∈ Bnc | 〈ak , c qak , rk ⊕c x〉 = 0 } , ( 4 ) which are shown in Figure 2 ( b ) . Importantly , the circular reference between ak ∈ Tqak , rkB n c and qak , rk can be unraveled by considering the tangent vector at the origin , zk ∈ T0Bnc , from which ak is parallel transported by P cx→y : TxBnc → TyBnc described in Appendix C.3 as follows : ak = P c 0→qak , rk ( zk ) = sech 2 ( √ c rk ) zk , qak , rk = exp c 0 ( rk [ zk ] ) = qzk , rk . ( 5 ) Combining Equations 3 , 5 , and 23 , we conclude the derivation of the unidirectional re-generalization of MLR , the parameters of which are rk ∈ R and zk ∈ T0Bnc = Rn for each class k : vk ( x ) = 2 c − 12 ‖zk‖ sinh−1 ( λcx〈 √ cx , [ zk ] 〉 cosh ( 2 √ c rk ) − ( λcx − 1 ) sinh ( 2 √ c rk ) ) . ( 6 ) For more detailed deformation , see Appendix D.1 . Note that we recover the form of the standard Euclidean MLR in limc→0 vk ( x ) = 4 ( 〈ak , x〉 − bk ) , which is proven in Appendix D.2 . | Hyperbolic Neural Networks++ extends the existing work of applying hyperbolic manifolds to neural networks. It proposes new ways to reparametrize hyperbolic multinomial logistic regression (MLR) layers to reduce the number of parameters, to generalise fully connected layers as well as split and concat operations to be more flexible and less computationally expensive. Further they expand hyperbolic neural networks to convolutional layer and attention mechanisms. The evaluation include direct comparison to HNN, and clustering with Transformers and seq-2-seq modeling. | SP:e7c555dbd995aa8446a7a8ac705aa9bfced8ac9a |
Hyperbolic Neural Networks++ | 1 INTRODUCTION . Shifting the arithmetic stage of a neural network to a non-Euclidean geometry such as a hyperbolic space is a promising way to find more suitable geometric structures for representing or processing data . Owing to its exponential growth in volume with respect to its radius ( Krioukov et al. , 2009 ; 2010 ) , a hyperbolic space has the capacity to continuously embed tree structures with arbitrarily low distortion ( Krioukov et al. , 2010 ; Sala et al. , 2018 ) . It has been directly utilized , for instance , to visualize large taxonomic graphs ( Lamping et al. , 1995 ) , to embed scale-free graphs ( Blasius et al. , 2018 ) , or to learn hierarchical lexical entailments ( Nickel & Kiela , 2017 ) . Compared to the Euclidean space , a hyperbolic space shows a higher embedding accuracy under fewer dimensions in such cases . Because a wide variety of real-world data encompasses some type of latent hierarchical structures ( Katayama & Maina , 2015 ; Newman , 2005 ; Lin & Tegmark , 2017 ; Krioukov et al. , 2010 ) , it has been empirically proven that a hyperbolic space is able to capture such intrinsic features through representation learning ( Krioukov et al. , 2010 ; Ganea et al. , 2018b ; Nickel & Kiela , 2018 ; Tifrea et al. , 2019 ; Law et al. , 2019 ; Balazevic et al. , 2019 ; Gu et al. , 2019 ) . Motivated by such expressive characteristics , various machine learning methods , including support vector machines ( Cho et al. , 2019 ) and neural networks ( Ganea et al. , 2018a ; Gulcehre et al. , 2018 ; Micic & Chu , 2018 ; Chami et al. , 2019 ) have derived the analogous benefits from the introduction of a hyperbolic space , aiming to improve the performance on advanced tasks beyond just representing data . One of the pioneers in this area is Hyperbolic Neural Networks ( HNNs ) , which introduced an easy-to-interpret and highly analytical coordinate system of hyperbolic spaces , namely , the Poincaré ball model , with a corresponding gyrovector space to smoothly connect the fundamental functions common to neural networks into valid functions in a hyperbolic geometry ( Ganea et al. , 2018a ) . Built upon the solid foundation of HNNs , the essential components for neural networks covering the multinomial logistic regression ( MLR ) , fully-connected ( FC ) layers , and Recurrent Neural Networks have been realized . In addition to the formalism , the methods for graphs ( Liu et al. , 2019 ) , sequential classification ( Micic & Chu , 2018 ) , or Variational Autoencoders ( Nagano et al. , 2019 ; Mathieu et al. , 2019 ; Ovinnikov , 2019 ; Skopek et al. , 2020 ) are further constructed . Such studies have applied the Poincaré ball model as a natural and viable option in the area of deep learning . Despite such progress , however , there still remain some unsolved problems and uncovered regions . In terms of the network architectures , the current formulation of hyperbolic MLR ( Ganea et al. , 2018a ) requires almost twice the number of parameters compared to its Euclidean counterpart . This makes both the training and inference costly in cases in which numerous embedded entities should be classified or where large hidden dimensions are employed , such as in natural language processing . The lack of convolutional layers must also be mentioned , because their application is now ubiquitous and is no longer limited to the field of computer vision . For the individual functions that are commonly used in machine learning , the split and concatenation of vectors have yet to be realized in a hyperbolic space in a manner that can fully exploit such space and allow sub-vectors to achieve a commutative property . Additionally , although several types of closed-form centroids in a hyperbolic space have been proposed , their geometric relationships have not yet been analyzed enough . Because a centroid operation has been utilized in many recent attention-based architectures , the theoretical background for which type of hyperbolic centroid should be used would be required in order to properly convert such operations into the hyperbolic geometry . Based on the previous analysis , we reconsider the flow of several extensions to bridge Euclidean operations into hyperbolic operations and construct alternative or novel methods on the Poincaré ball model . Specifically , the main contributions of this paper are summarized as follows : 1 . We reformulate a hyperbolic MLR to reduce the number of parameters to the same level as a Euclidean version while maintaining the same range of representational properties . 2 . We further exploit the knowledge of 1 as a replacement of an affine transformation and propose a novel generalization of the FC layers that can more properly make use of the hyperbolic nature compared with a previous research ( Ganea et al. , 2018a ) . 3 . We generalize the split and concatenation of coordinates to the Poincaré ball model by setting the invariance of the expected value of the vector norm as a criterion . 4 . By combining 2 and 3 , we further define a novel generalization scheme of arbitrary dimensional convolutional layers in the Poincaré ball model . 5 . We prove the equivalence of the hyperbolic centroids defined in three different hyperbolic geometry models , and expand the condition of non-negative weights to entire real values . Moreover , integrating this finding and previous contributions 1 , 2 , and 3 , we give a theoretical insight into hyperbolic attention mechanisms realized in the Poincaré ball model . We experimentally demonstrate the effectiveness of our methods over existing HNNs and Euclidean equivalents based on a performance test of MLR functions and experiments with Set Transformer ( Lee et al. , 2019 ) and convolutional sequence to sequence modeling ( Gehring et al. , 2017 ) .1 2 HYPERBOLIC GEOMETRY . Riemannian geometry . An n-dimensional manifoldM is an n-dimensional topological space that can be linearly approximated to an n-dimensional real space at any point x ∈ M , and each local linear space is called a tangent space TxM . A Riemannian manifold is a pairing of a differentiable manifold and a metric tensor field g as a function of each point x , which is expressed as ( M , g ) . Here , g defines an inner product on each tangent space such that ∀u , v ∈ TxM , 〈u , v〉x = u > gxv , where gx is a positive definite symmetric matrix defined on TxM . The norm of a tangent vector derived from the inner product is defined as ‖v‖x = √ |〈v , v〉x| . A metric tensor gx provides local information regarding the angle and length of the tangent vectors in TxM , which induces the global length of the curves onM through an integration . The shortest path connecting two arbitrary points onM at a constant speed is called a geodesic , the length of which becomes the distance . Along a geodesic where one of the endpoints is x , the function projecting a tangent vector v ∈ TxM as an initial velocity vector ontoM is denoted as an exponential map expx , and its inverse function is called a logarithmic map logx . In addition , the concept of parallel transport Px→y : TxM→ TyM is generalized to the specially conditioned unique linear isometry between two tangent spaces . For more details , please refer to Spivak ( 1979 ) ; Petersen et al . ( 2006 ) ; Andrews & Hopper ( 2010 ) . Note that , in this study , we equate g with gx if gx is constant , and denote the Euclidean inner product , norm , and unit vector for any real vector u , v ∈ Rn as 〈u , v〉 , ‖v‖ , and [ v ] = v/‖v‖ , respectively . Hyperbolic space . A hyperbolic space is a Riemannian manifold with a constant negative curvature , the coordinates of which can be represented in several isometric models . The most basic model is an 1The code is available at https : //github.com/mil-tokyo/hyperbolic_nn_plusplus . n-dimensional hyperboloid model , which is a hypersurface Hnc in an ( n+ 1 ) -dimensional Minkowski space Rn+11 composed of one time-like axis and n space-like axes . The manifolds of Poincaré ball model Bnc and Beltrami-Klein model Knc are the projections of the hyperboloid model onto the different n-dimensional space-like hyperplanes , as depicted in Figure 1 . For their mathematical definitions and the isometric isomorphism between their coordinates , see Appendix A. Poincaré ball model . The n-dimensional Poincaré ball model of a constant negative curvature −c is defined by ( Bnc , gc ) , where Bnc = { x ∈ Rn | c‖x‖2 < 1 } and gcx = ( λcx ) 2In . Here , Bnc is an open ball of radius c− 1 2 , and λcx = 2 ( 1− c‖x‖2 ) −1 is a conformal factor , which induces the inner product 〈u , v〉cx = ( λcx ) 2〈u , v〉 and norm ‖v‖cx = λcx‖v‖ for u , v ∈ TxBnc . The exponential , logarithmic maps and parallel transport are denoted as expcx , log c x and P c x→y , respectively , as shown in Appendix C. To operate the coordinates as vector-like mathematical objects , the Möbius gyrovector space provides an algebra that treats them as gyrovectors , equipped with various operations including the generalized vector addition , that is , a noncommutative and non-associative binary operation called the Möbius addition ⊕c ( Ungar , 2009 ) . limc→0⊕c converges to + in connection with a Euclidean geometry , the curvature of which is zero . For more details , see Appendix B. Poincaré hyperplane . As a specific generalization of a hyperplane into Riemannian geometry , Ganea et al . ( 2018a ) derived a Poincaré hyperplane H̃ca , p , which is the set of all geodesics containing an arbitrary point p ∈ Bnc and orthogonal to an arbitrary tangent vector a ∈ TpBnc , based on the Möbius gyrovector space . As shown in Appendix C.2 , they also extended the distance dc between two points in Bnc into the distance from a point in Bnc to a Poincaré hyperplane in a closed form expression . 3 HYPERBOLIC NEURAL NETWORKS++ Aiming to overcome the difficulties discussed in Section 1 , we build a novel scheme of hyperbolic neural networks in the Poincaré ball model . The core concept is re-generalization of 〈a , x〉−b type equations with no increase in the number of parameters , which has the potential to replace any affine transformation based on the same mathematical principle . Specifically , this section starts from the reformulation of the hyperbolic MLR , from which the variants to the FC , convolutional , and multi-head attention layers are derived . Several other modifications are also proposed to support neural networks with broad architectures . 3.1 UNIDIRECTIONAL REPARAMETERIZATION OF HYPERBOLIC MLR LAYER . Given an input x ∈ Rn , MLR is an operation used to predict the probabilities of all target outcomes k ∈ { 1 , 2 , ... , K } for the objective variable y as a log-linear model and is described as follows : p ( y = k | x ) ∝ exp ( vk ( x ) ) , where vk ( x ) = 〈ak , x〉 − bk , ak ∈ Rn , bk ∈ R. ( 1 ) Circumvention of the double vectorization . To generalize the linear function vk to the Poincaré ball model , Ganea et al . ( 2018a ) first re-parameterized the scalar term bk as a vector pk ∈ Rn in the form 〈ak , x〉 − bk = 〈ak , −pk + x〉 , where bk = 〈ak , pk〉 , and then discussed the properties which must be satisfied when such vectors become Möbius gyrovectors . However , this causes an undesirable increase in the parameters from n+ 1 to 2n in each class k. As illustrated in Figure 2 ( a ) , this reformulation is redundant from the viewpoint that there exist countless choices of pk to determine the same discriminative hyperplane Hak , bk = { x ∈ Rn | 〈ak , x〉 − bk = 0 } . Because the key of this step is to replace all variables with vectors attributed to the same manifold , we introduce another scalar parameter rk ∈ R instead , which makes the bias vector qak , rk parallel to ak : 〈ak , x〉 − bk = 〈ak , −qak , rk + x〉 , where qak , rk = rk [ ak ] s.t . bk = rk‖ak‖ . ( 2 ) One possible realization of pk is adopted to reduce the previously mentioned redundancies without a loss of generality or representational properties compared to the original affine transformation , and induces another notation : H̄ak , rk : = { x ∈ Rn | 〈ak , −qak , rk + x〉 = 0 } = Hak , rk‖ak‖ . Based on distance d from a point to a hyperplane , Equation 2 can be rewritten as with Lebanon & Lafferty ( 2004 ) in the following form : 〈ak , −qak , rk + x〉 = sign ( 〈ak , −qak , rk + x〉 ) d ( x , H̄ak , rk ) ‖ak‖ , which decomposes the inner product into the product of the norm of an orientation vector ak and the signed distance between an input vector x ∈ Rn and the hyperplane H̄ak , rk . Unidirectional Poincaré MLR . Based on the observation that qak , rk starts from the origin and the concept of Poincaré hyperplanes , we can now generalize vk for x , qak , rk ∈ Bnc and ak ∈ Tqak , rkB n c : vk ( x ) = sign ( 〈ak , c qak , rk ⊕c x〉 ) dc ( x , H̄cak , rk ) ‖ak‖cqak , rk , ( 3 ) where qak , rk = exp c 0 ( rk [ ak ] ) , H̄ c ak , rk : = { x ∈ Bnc | 〈ak , c qak , rk ⊕c x〉 = 0 } , ( 4 ) which are shown in Figure 2 ( b ) . Importantly , the circular reference between ak ∈ Tqak , rkB n c and qak , rk can be unraveled by considering the tangent vector at the origin , zk ∈ T0Bnc , from which ak is parallel transported by P cx→y : TxBnc → TyBnc described in Appendix C.3 as follows : ak = P c 0→qak , rk ( zk ) = sech 2 ( √ c rk ) zk , qak , rk = exp c 0 ( rk [ zk ] ) = qzk , rk . ( 5 ) Combining Equations 3 , 5 , and 23 , we conclude the derivation of the unidirectional re-generalization of MLR , the parameters of which are rk ∈ R and zk ∈ T0Bnc = Rn for each class k : vk ( x ) = 2 c − 12 ‖zk‖ sinh−1 ( λcx〈 √ cx , [ zk ] 〉 cosh ( 2 √ c rk ) − ( λcx − 1 ) sinh ( 2 √ c rk ) ) . ( 6 ) For more detailed deformation , see Appendix D.1 . Note that we recover the form of the standard Euclidean MLR in limc→0 vk ( x ) = 4 ( 〈ak , x〉 − bk ) , which is proven in Appendix D.2 . | The paper provides a reformulation of the fundamental operations in Euclidean space that are used in neural networks for the Poincaré ball model of hyperbolic space (and thus hyperbolic space generally). The paper’s reformulation differs from previous reformulations (Ganea et al. 2018) in several ways. For multinomial logistic regression, the excess n-1 degrees of freedom available in previous formulations when defining a Poincaré hyperplane via a point on the hyperplane and a normal vector are eliminated by using a canonical choice of normal vector along with a scalar quantity corresponding to the distance to the hyperplane from the origin. Fully connected (FC) neural network layers are also reformulated in a way that keeps with the interpretation of an affine transformation as returning a point whose individual coordinates are distances to a set of different hyperplanes. On the other hand, the previous reformulation directly used Möbius matrix-vector multiplication, which does not this same interpretation. The paper then gives hyperbolic reformulations of further types of neural network operations in Euclidean space, namely split/concatenation (less computationally intensive than that in previous work), convolution (not present in previous work). Turning its focus to attention models, the paper proves a theorem regarding the equivalence of various hyperbolic midpoints proposed in previous work. Finally, the paper carries out experiments testing each part of its reformulation on appropriate datasets. | SP:e7c555dbd995aa8446a7a8ac705aa9bfced8ac9a |
Meta-learning Transferable Representations with a Single Target Domain | 1 INTRODUCTION . Transfer learning—transferring knowledge learned from a large-scale source dataset to a small target dataset—is an important paradigm in machine learning ( Yosinski et al. , 2014 ) with wide applications in vision ( Donahue et al. , 2014 ) and natural language processing ( NLP ) ( Howard & Ruder , 2018 ; Devlin et al. , 2019 ) . Because the source and target tasks are often related , we expect to be able to learn features that are transferable to the target task from the source data . These features may help learn the target task with fewer examples ( Long et al. , 2015 ; Tamkin et al. , 2020 ) . Mainstream approaches for transfer learning are fine-tuning and joint training . Fine-tuning initializes from a model pre-trained on a large-scale source task ( e.g. , ImageNet ) and continues training on the target task with a potentially different set of labels ( e.g. , object recognition ( Wang et al. , 2017 ; Yang et al. , 2018 ; Kolesnikov et al. , 2019 ) , object detection ( Girshick et al. , 2014 ) , and segmentation ( Long et al. , 2015 ; He et al. , 2017 ) ) . Another enormously successful example of fine-tuning is in NLP : pre-training transformers and fine-tuning on downstream tasks leads to state-of-the-art results for many NLP tasks ( Devlin et al. , 2019 ; Yang et al. , 2019 ) . In contrast to the two-stage optimization process of fine-tuning , joint training optimizes a linear combination of the objectives of the source and the target tasks ( Kokkinos , 2017 ; Kendall et al. , 2017 ; Liu et al. , 2019b ) . Despite the pervasiveness of fine-tuning and joint training , recent works uncover that they are not always panaceas for transfer learning . Geirhos et al . ( 2019 ) found that the pre-trained models learn the texture of ImageNet , which is biased and not transferable to target tasks . ImageNet pre-training does not necessarily improve accuracy on COCO ( He et al. , 2018 ) , fine-grained classification ( Kornblith et al. , 2019 ) , and medical imaging tasks ( Raghu et al. , 2019 ) . Wu et al . ( 2020 ) observed that large model capacity and discrepancy between the source and target domain eclipse the effect of joint training . Nonetheless , we do not yet have a systematic understanding of what makes the successes of fine-tuning and joint training inconsistent . The goal of this paper is two-fold : ( 1 ) to understand more about when and why fine-tuning and joint training can be suboptimal or even harmful for transfer learning ; ( 2 ) to design algorithms that overcome the drawbacks of fine-tuning and joint training and consistently outperform them . To address the first question , we hypothesize that fine-tuning and joint training do not have incentives to prefer learning transferable features over source-specific features , and thus their capability of learning transferable features is rather accidental depending on the property of the datasets . To empirically analyze the hypothesis , we design a semi-synthetic dataset that contains artificiallyamplified transferable features and source-specific features simultaneously in the source data . Both the transferable and source-specific features can solve the source task , but only transferable features are useful for the target . We analyze what features fine-tuning and joint training will learn . See Figure 1 for an illustration of the semi-synthetic experiments . We observed following failure patterns of fine-tuning and joint training on the semi-synthetic dataset . • Pre-training may learn non-transferable features that don ’ t help the target when both transferable and source-specific features can solve the source task , since it ’ s oblivious to the target data . When the dataset contains source-specific features that are more convenient for neural nets to use , pretraining learns them ; as a result , fine-tuning starting from the source-specific features does not lead to improvement . • Joint training learns source-specific features and overfits on the target . A priori , it may appear that the joint training should prefer transferable features because the target data is present in the training loss . However , joint training easily overfits to the target especially when the target dataset is small . When the source-specific features are the most convenient for the source , joint training simultaneously learns the source-specific features and memorizes the target dataset . Toward overcoming the drawbacks of fine-tuning and joint training , we first note that any proposed algorithm , unlike fine-tuning , should use the source and the target simultaneously to encourage extracting shared structures . Second and more importantly , we recall that good representations should enable generalization : we should not only be able to fit a target head with the representations ( as joint training does ) , but the learned head should also generalize well to a held-out target dataset . With this intuition , we propose Meta Representation Learning ( MeRLin ) to encourage learning transferable and generalizable features : we meta-learn a feature extractor such that the head fit to a target training set performs well on a target validation set . In contrast to the standard model-agnostic meta-learning ( MAML ) ( Finn et al. , 2017 ) , which aims to learn prediction models that are adaptable to multiple target tasks from multiple source tasks , our method meta-learns transferable representations with only one source and one target domain . Empirically , we first verify that MeRLin learns transferable features on the semi-synthetic dataset . We then show that MeRLin outperforms state-of-the-art transfer learning baselines in real-world vision and NLP tasks such as ImageNet to fine-grained classification and language modeling to GLUE . Theoretically , we analyze the mechanism of the improvement brought by MeRLin . In a simple two-layer quadratic neural network setting , we prove that MeRLin recovers the target ground truth with only limited target examples whereas both fine-tuning and joint training fail to learn transferable features that can perform well on the target . In summary , our contributions are as follows . ( 1 ) Using a semi-synthetic dataset , we analyze and diagnose when and why fine-tuning and joint training fail to learn transferable representations . ( 2 ) We design a meta representation learning algorithm ( MeRLin ) which outperforms state-of-the-art transfer learning baselines . ( 3 ) We rigorously analyze the behavior of fine-tuning , joint training , and MeRLin on a special two-layer neural net setting . 2 SETUP AND PRELIMINARIES . In this paper , we study supervised transfer learning . Consider an input-label pair ( x , y ) ∈ Rd × R. We are provided with a source distributions Ds and a target distribution Dt over Rd × R. The source dataset D̂s = { xsi , ysi } ns i=1 and the target dataset D̂t = { xti , yti } nt i=1 consist of ns i.i.d . samples from Ds and nt i.i.d . samples from Dt respectively . Typically ns nt . We view a predictor as a composition of a feature extractor hφ : Rd → Rm parametrized by φ ∈ Φ , which is often a deep neural net , and a head classifier gθ : Rm → R parametrized by θ ∈ Θ , which is often linear . That is , the final prediction is fθ , φ ( x ) = gθ ( hφ ( x ) ) . Suppose the loss function is ` ( · , · ) , such as cross entropy loss for classification tasks . Our goal is to learn an accurate model on the target domain Dt . Since the label sets of the source and target tasks can be different , we usually learn two heads for the source task and the target task separately , denoted by θs and θt , with a shared feature extractor φ . Let LD̂ ( θ , φ ) be the empirical loss of model gθ ( hφ ( x ) ) on the empirical distribution D̂ , that is , LD̂ ( θ , φ ) : = E ( x , y ) ∈D̂ ` ( gθ ( hφ ( x ) ) , y ) where ( x , y ) ∈ D̂ means sampling uniformly from the dataset D̂ . Using this notation , the standard supervised loss on the source ( with the source head θs ) and loss on the target ( with the target head θt ) can be written as LD̂s ( θs , φ ) and LD̂t ( θt , φ ) respectively . We next review mainstream transfer learning baselines and describe them in our notations . Target-only is the trivial algorithm that only trains on the target data D̂t with the objective LD̂t ( θt , φ ) starting from random initialization . With insufficient target data , target-only is prone to overfitting . Pre-training starts with random initialization and pre-trains on the source dataset with objective function LD̂s ( θs , φ ) to obtain the pre-trained feature extractor φ̂pre and head θ̂s . Fine-tuning initializes the target head θt randomly and initializes the feature extractor φ by φ̂pre obtained in pre-training , and fine-tunes φ and θt on the target by optimizing LD̂t ( θt , φ ) over both θt and φ . Note that in this paper , fine-tuning refers to fine-tuning all layers by default . Joint training starts with random initialization , and trains on the source and target dataset jointly by optimizing a linear combination of their objectives over the heads θs , θt and the shared feature extractor φ : minθs , θt , φ Ljoint ( θs , θt , φ ) : = ( 1− α ) LD̂s ( θs , φ ) + αLD̂t ( θt , φ ) . The hyper-parameter α is used to balance source training and target training . We use cross-validation to select optimal α . 3 LIMITATIONS OF FINE-TUNING AND JOINT TRAINING : ANALYSIS ON SEMI-SYNTHETIC DATA . Previous works ( He et al. , 2018 ; Wu et al. , 2020 ) have observed cases when fine-tuning and joint training fail to improve over target-only . Our hypothesis is that both pre-training and joint training do not have incentives to prefer learning transferable features over source-specific features , and thus the performance of fine-tuning and joint training rely on whether the transferable features happen to be the best features for predicting the source labels . Validating this hypothesis on real datasets is challenging , if not intractable—it ’ s unclear what ’ s the precise definition or characterization of transferable features and source-specific features . Instead , we create a semi-synthetic dataset where transferable features and source-specific features are prominent and well defined . A semi-synthetic dataset . The target training dataset we use is a uniformly-sampled subset of the CIFAR-10 training set of size 500 . The target test dataset is the original CIFAR-10 test set . The source dataset of size 49500 , denoted by AB , is created as follows . The upper halves of the examples are the upper halves of the CIFAR-10 images ( excluding the 500 example used in target ) . The lower halves contain a signature pattern that strongly correlates with the class label : for class c , the pixels of the lower half are drawn i.i.d . from gaussian distribution N ( c/10 , 0.22 ) . Therefore , averaging the pixels in the lower half of the image can reveal the label because the noise will get averaged out . The benefit of this dataset is that any features related to the top half of the images can be defined as transferable features , whereas the features related to the bottom half are source-specific . Moreover , we can easily tell which features are used by a model by testing the performance on images with masked top or bottom half . For analysis and comparison , we define A to be the dataset that contains the top half of dataset AB and zeros out the bottom half , and B vice versa . See Figure 1 ( left ) for an illustration of the datasets . Further details are deferred to Section A.1 In Figure 1 ( right ) , we evaluate various algorithms ’ performance on target test data . In Figure 2 ( a ) ( left ) , we run algorithms with AB being the source dataset and visualize the learned features on the target training dataset and target test dataset to examine the generalizability of the features . In Figure 2 ( a ) ( right ) , we evaluate the algorithms on the held-out version of dataset A and B to examine what features the algorithms learn . ResNet-32 ( He et al. , 2016 ) is used for all settings . Analysis : First of all , target-only has low accuracy ( 38 % ) because the target training set is small . Except when explicitly mentioned , all the discussions below are about algorithms on the source AB . Fine-tuning fails because pre-training does not prefer to learn transferable features and fine-tuning overfits . Figure 2 ( b ) ( pre-training ) shows that the pre-trained model has near-trivial accuracy on heldout A but near-perfect accuracy on held-out B , indicating that it solely relies on the source-specific feature ( bottom half ) and does not learn transferable features . Figure 2 ( a ) ( pre-training ) shows that indeed pre-trained features do not have even correlation with target training and test sets . Figure 2 ( a ) ( fine-tuning ) shows that fine-tuning improves the features ’ correlation with the training target labels but it does not generalize to the target test because of overfitting . The performance of fine-tuning ( with source =AB ) in Figure 1 ( right ) also corroborates the lack of generalization . Joint training fails because it simultaneously learns mostly source-specific features and features that overfit to the target . Figure 2 ( b ) ( joint training ) shows that the joint training model performs much better on held-out B ( with 92 % accuracy ) than on the held-out A ( with 46 % accuracy ) , indicating it learns the source-specific feature very well but not the transferable features . The next question is what features joint training relies on to fit the target training labels . Figure 2 ( a ) shows strong correlation between joint training model ’ s features and labels on the target training set , but much less correlation on the target test set , suggesting that the joint training model ’ s feature extractor , applied on the target data ( which doesn ’ t have source-specific features ) , overfits to the target training set . This corroborates the poor accuracy of joint training on the target test set ( Figure 1 ) , which is similar to target-only ’ s.1 In Section 5 , we rigorously analyze the behavior of these algorithms on a more simplified settings and show that the phenomena above can theoretically occur . | The paper investigates failure cases for transfer learning (fine-tuning and joint training), specifically in the context where training on the source data may highlight features that are irrelevant for the target data. This is done through semi-synthetic data. Based on the insights, the authors present an approach called Meta Representation Learning (MeRLin) inspired by Meta Learning and Learning-to-learn approaches. This approach is evaluated on several real-world transfer-learning tasks from vision and NLP. The authors also derive theoretical results on constructed data distributions for which superiority of Merlin can be shown analytically. | SP:42c3eb2cad23ed513b09f0810e3d7dd4e7bb2532 |
Meta-learning Transferable Representations with a Single Target Domain | 1 INTRODUCTION . Transfer learning—transferring knowledge learned from a large-scale source dataset to a small target dataset—is an important paradigm in machine learning ( Yosinski et al. , 2014 ) with wide applications in vision ( Donahue et al. , 2014 ) and natural language processing ( NLP ) ( Howard & Ruder , 2018 ; Devlin et al. , 2019 ) . Because the source and target tasks are often related , we expect to be able to learn features that are transferable to the target task from the source data . These features may help learn the target task with fewer examples ( Long et al. , 2015 ; Tamkin et al. , 2020 ) . Mainstream approaches for transfer learning are fine-tuning and joint training . Fine-tuning initializes from a model pre-trained on a large-scale source task ( e.g. , ImageNet ) and continues training on the target task with a potentially different set of labels ( e.g. , object recognition ( Wang et al. , 2017 ; Yang et al. , 2018 ; Kolesnikov et al. , 2019 ) , object detection ( Girshick et al. , 2014 ) , and segmentation ( Long et al. , 2015 ; He et al. , 2017 ) ) . Another enormously successful example of fine-tuning is in NLP : pre-training transformers and fine-tuning on downstream tasks leads to state-of-the-art results for many NLP tasks ( Devlin et al. , 2019 ; Yang et al. , 2019 ) . In contrast to the two-stage optimization process of fine-tuning , joint training optimizes a linear combination of the objectives of the source and the target tasks ( Kokkinos , 2017 ; Kendall et al. , 2017 ; Liu et al. , 2019b ) . Despite the pervasiveness of fine-tuning and joint training , recent works uncover that they are not always panaceas for transfer learning . Geirhos et al . ( 2019 ) found that the pre-trained models learn the texture of ImageNet , which is biased and not transferable to target tasks . ImageNet pre-training does not necessarily improve accuracy on COCO ( He et al. , 2018 ) , fine-grained classification ( Kornblith et al. , 2019 ) , and medical imaging tasks ( Raghu et al. , 2019 ) . Wu et al . ( 2020 ) observed that large model capacity and discrepancy between the source and target domain eclipse the effect of joint training . Nonetheless , we do not yet have a systematic understanding of what makes the successes of fine-tuning and joint training inconsistent . The goal of this paper is two-fold : ( 1 ) to understand more about when and why fine-tuning and joint training can be suboptimal or even harmful for transfer learning ; ( 2 ) to design algorithms that overcome the drawbacks of fine-tuning and joint training and consistently outperform them . To address the first question , we hypothesize that fine-tuning and joint training do not have incentives to prefer learning transferable features over source-specific features , and thus their capability of learning transferable features is rather accidental depending on the property of the datasets . To empirically analyze the hypothesis , we design a semi-synthetic dataset that contains artificiallyamplified transferable features and source-specific features simultaneously in the source data . Both the transferable and source-specific features can solve the source task , but only transferable features are useful for the target . We analyze what features fine-tuning and joint training will learn . See Figure 1 for an illustration of the semi-synthetic experiments . We observed following failure patterns of fine-tuning and joint training on the semi-synthetic dataset . • Pre-training may learn non-transferable features that don ’ t help the target when both transferable and source-specific features can solve the source task , since it ’ s oblivious to the target data . When the dataset contains source-specific features that are more convenient for neural nets to use , pretraining learns them ; as a result , fine-tuning starting from the source-specific features does not lead to improvement . • Joint training learns source-specific features and overfits on the target . A priori , it may appear that the joint training should prefer transferable features because the target data is present in the training loss . However , joint training easily overfits to the target especially when the target dataset is small . When the source-specific features are the most convenient for the source , joint training simultaneously learns the source-specific features and memorizes the target dataset . Toward overcoming the drawbacks of fine-tuning and joint training , we first note that any proposed algorithm , unlike fine-tuning , should use the source and the target simultaneously to encourage extracting shared structures . Second and more importantly , we recall that good representations should enable generalization : we should not only be able to fit a target head with the representations ( as joint training does ) , but the learned head should also generalize well to a held-out target dataset . With this intuition , we propose Meta Representation Learning ( MeRLin ) to encourage learning transferable and generalizable features : we meta-learn a feature extractor such that the head fit to a target training set performs well on a target validation set . In contrast to the standard model-agnostic meta-learning ( MAML ) ( Finn et al. , 2017 ) , which aims to learn prediction models that are adaptable to multiple target tasks from multiple source tasks , our method meta-learns transferable representations with only one source and one target domain . Empirically , we first verify that MeRLin learns transferable features on the semi-synthetic dataset . We then show that MeRLin outperforms state-of-the-art transfer learning baselines in real-world vision and NLP tasks such as ImageNet to fine-grained classification and language modeling to GLUE . Theoretically , we analyze the mechanism of the improvement brought by MeRLin . In a simple two-layer quadratic neural network setting , we prove that MeRLin recovers the target ground truth with only limited target examples whereas both fine-tuning and joint training fail to learn transferable features that can perform well on the target . In summary , our contributions are as follows . ( 1 ) Using a semi-synthetic dataset , we analyze and diagnose when and why fine-tuning and joint training fail to learn transferable representations . ( 2 ) We design a meta representation learning algorithm ( MeRLin ) which outperforms state-of-the-art transfer learning baselines . ( 3 ) We rigorously analyze the behavior of fine-tuning , joint training , and MeRLin on a special two-layer neural net setting . 2 SETUP AND PRELIMINARIES . In this paper , we study supervised transfer learning . Consider an input-label pair ( x , y ) ∈ Rd × R. We are provided with a source distributions Ds and a target distribution Dt over Rd × R. The source dataset D̂s = { xsi , ysi } ns i=1 and the target dataset D̂t = { xti , yti } nt i=1 consist of ns i.i.d . samples from Ds and nt i.i.d . samples from Dt respectively . Typically ns nt . We view a predictor as a composition of a feature extractor hφ : Rd → Rm parametrized by φ ∈ Φ , which is often a deep neural net , and a head classifier gθ : Rm → R parametrized by θ ∈ Θ , which is often linear . That is , the final prediction is fθ , φ ( x ) = gθ ( hφ ( x ) ) . Suppose the loss function is ` ( · , · ) , such as cross entropy loss for classification tasks . Our goal is to learn an accurate model on the target domain Dt . Since the label sets of the source and target tasks can be different , we usually learn two heads for the source task and the target task separately , denoted by θs and θt , with a shared feature extractor φ . Let LD̂ ( θ , φ ) be the empirical loss of model gθ ( hφ ( x ) ) on the empirical distribution D̂ , that is , LD̂ ( θ , φ ) : = E ( x , y ) ∈D̂ ` ( gθ ( hφ ( x ) ) , y ) where ( x , y ) ∈ D̂ means sampling uniformly from the dataset D̂ . Using this notation , the standard supervised loss on the source ( with the source head θs ) and loss on the target ( with the target head θt ) can be written as LD̂s ( θs , φ ) and LD̂t ( θt , φ ) respectively . We next review mainstream transfer learning baselines and describe them in our notations . Target-only is the trivial algorithm that only trains on the target data D̂t with the objective LD̂t ( θt , φ ) starting from random initialization . With insufficient target data , target-only is prone to overfitting . Pre-training starts with random initialization and pre-trains on the source dataset with objective function LD̂s ( θs , φ ) to obtain the pre-trained feature extractor φ̂pre and head θ̂s . Fine-tuning initializes the target head θt randomly and initializes the feature extractor φ by φ̂pre obtained in pre-training , and fine-tunes φ and θt on the target by optimizing LD̂t ( θt , φ ) over both θt and φ . Note that in this paper , fine-tuning refers to fine-tuning all layers by default . Joint training starts with random initialization , and trains on the source and target dataset jointly by optimizing a linear combination of their objectives over the heads θs , θt and the shared feature extractor φ : minθs , θt , φ Ljoint ( θs , θt , φ ) : = ( 1− α ) LD̂s ( θs , φ ) + αLD̂t ( θt , φ ) . The hyper-parameter α is used to balance source training and target training . We use cross-validation to select optimal α . 3 LIMITATIONS OF FINE-TUNING AND JOINT TRAINING : ANALYSIS ON SEMI-SYNTHETIC DATA . Previous works ( He et al. , 2018 ; Wu et al. , 2020 ) have observed cases when fine-tuning and joint training fail to improve over target-only . Our hypothesis is that both pre-training and joint training do not have incentives to prefer learning transferable features over source-specific features , and thus the performance of fine-tuning and joint training rely on whether the transferable features happen to be the best features for predicting the source labels . Validating this hypothesis on real datasets is challenging , if not intractable—it ’ s unclear what ’ s the precise definition or characterization of transferable features and source-specific features . Instead , we create a semi-synthetic dataset where transferable features and source-specific features are prominent and well defined . A semi-synthetic dataset . The target training dataset we use is a uniformly-sampled subset of the CIFAR-10 training set of size 500 . The target test dataset is the original CIFAR-10 test set . The source dataset of size 49500 , denoted by AB , is created as follows . The upper halves of the examples are the upper halves of the CIFAR-10 images ( excluding the 500 example used in target ) . The lower halves contain a signature pattern that strongly correlates with the class label : for class c , the pixels of the lower half are drawn i.i.d . from gaussian distribution N ( c/10 , 0.22 ) . Therefore , averaging the pixels in the lower half of the image can reveal the label because the noise will get averaged out . The benefit of this dataset is that any features related to the top half of the images can be defined as transferable features , whereas the features related to the bottom half are source-specific . Moreover , we can easily tell which features are used by a model by testing the performance on images with masked top or bottom half . For analysis and comparison , we define A to be the dataset that contains the top half of dataset AB and zeros out the bottom half , and B vice versa . See Figure 1 ( left ) for an illustration of the datasets . Further details are deferred to Section A.1 In Figure 1 ( right ) , we evaluate various algorithms ’ performance on target test data . In Figure 2 ( a ) ( left ) , we run algorithms with AB being the source dataset and visualize the learned features on the target training dataset and target test dataset to examine the generalizability of the features . In Figure 2 ( a ) ( right ) , we evaluate the algorithms on the held-out version of dataset A and B to examine what features the algorithms learn . ResNet-32 ( He et al. , 2016 ) is used for all settings . Analysis : First of all , target-only has low accuracy ( 38 % ) because the target training set is small . Except when explicitly mentioned , all the discussions below are about algorithms on the source AB . Fine-tuning fails because pre-training does not prefer to learn transferable features and fine-tuning overfits . Figure 2 ( b ) ( pre-training ) shows that the pre-trained model has near-trivial accuracy on heldout A but near-perfect accuracy on held-out B , indicating that it solely relies on the source-specific feature ( bottom half ) and does not learn transferable features . Figure 2 ( a ) ( pre-training ) shows that indeed pre-trained features do not have even correlation with target training and test sets . Figure 2 ( a ) ( fine-tuning ) shows that fine-tuning improves the features ’ correlation with the training target labels but it does not generalize to the target test because of overfitting . The performance of fine-tuning ( with source =AB ) in Figure 1 ( right ) also corroborates the lack of generalization . Joint training fails because it simultaneously learns mostly source-specific features and features that overfit to the target . Figure 2 ( b ) ( joint training ) shows that the joint training model performs much better on held-out B ( with 92 % accuracy ) than on the held-out A ( with 46 % accuracy ) , indicating it learns the source-specific feature very well but not the transferable features . The next question is what features joint training relies on to fit the target training labels . Figure 2 ( a ) shows strong correlation between joint training model ’ s features and labels on the target training set , but much less correlation on the target test set , suggesting that the joint training model ’ s feature extractor , applied on the target data ( which doesn ’ t have source-specific features ) , overfits to the target training set . This corroborates the poor accuracy of joint training on the target test set ( Figure 1 ) , which is similar to target-only ’ s.1 In Section 5 , we rigorously analyze the behavior of these algorithms on a more simplified settings and show that the phenomena above can theoretically occur . | This paper first investigates when and why fine-tuning and joint training are not the best methods for transfer learning. The authors generate a toy dataset, in which the source-specific and transferable features are thus clearly distinguishable, for the transfer learning tasks. As both fine-tuning and joint training are not optimal solutions for the experimental dataset, they further design MeRLin, which is based on the meta-learning mechanism, to learn a generalizable model weight. | SP:42c3eb2cad23ed513b09f0810e3d7dd4e7bb2532 |
A Good Image Generator Is What You Need for High-Resolution Video Synthesis | 1 INTRODUCTION . Video synthesis seeks to generate a sequence of moving pictures from noise . While its closely related counterpart—image synthesis—has seen substantial advances in recent years , allowing for synthesizing at high resolutions ( Karras et al. , 2017 ) , rendering images often indistinguishable from real ones ( Karras et al. , 2019 ) , and supporting multiple classes of image content ( Zhang et al. , 2019 ) , contemporary improvements in the domain of video synthesis have been comparatively modest . Due to the statistical complexity of videos and larger model sizes , video synthesis produces relatively low-resolution videos , yet requires longer training times . For example , scaling the image generator of Brock et al . ( 2019 ) to generate 256 × 256 videos requires a substantial computational budget1 . Can we use a similar method to attain higher resolutions ? We believe a different approach is needed . There are two desired properties for generated videos : ( i ) high quality for each individual frame , and ( ii ) the frame sequence should be temporally consistent , i.e . depicting the same content with plausible motion . Previous works ( Tulyakov et al. , 2018 ; Clark et al. , 2019 ) attempt to achieve both goals with a single framework , making such methods computationally demanding when high resolution is desired . We suggest a different perspective on this problem . We hypothesize that , given an image generator that has learned the distribution of video frames as independent images , a video can be represented as a sequence of latent codes from this generator . The problem of video synthesis can then be framed as discovering a latent trajectory that renders temporally consistent images . Hence , we demonstrate that ( i ) can be addressed by a pre-trained and fixed image generator , and ( ii ) can be achieved using the proposed framework to create appropriate image sequences . ∗Work done while at Snap Inc. 1We estimate that the cost of training a model such as DVD-GAN ( Clark et al. , 2019 ) once requires > $ 30K . To discover the appropriate latent trajectory , we introduce a motion generator , implemented via two recurrent neural networks , that operates on the initial content code to obtain the motion representation . We model motion as a residual between continuous latent codes that are passed to the image generator for individual frame generation . Such a residual representation can also facilitate the disentangling of motion and content . The motion generator is trained using the chosen image discriminator with contrastive loss to force the content to be temporally consistent , and a patch-based multi-scale video discriminator for learning motion patterns . Our framework supports contemporary image generators such as StyleGAN2 ( Karras et al. , 2019 ) and BigGAN ( Brock et al. , 2019 ) . We name our approach as MoCoGAN-HD ( Motion and Content decomposed GAN for HighDefinition video synthesis ) as it features several major advantages over traditional video synthesis pipelines . First , it transcends the limited resolutions of existing techniques , allowing for the generation of high-quality videos at resolutions up to 1024 × 1024 . Second , as we search for a latent trajectory in an image generator , our method is computationally more efficient , requiring an order of magnitude less training time than previous video-based works ( Clark et al. , 2019 ) . Third , as the image generator is fixed , it can be trained on a separate high-quality image dataset . Due to the disentangled representation of motion and content , our approach can learn motion from a video dataset and apply it to an image dataset , even in the case of two datasets belonging to different domains . It thus unleashes the power of an image generator to synthesize high quality videos when a domain ( e.g. , dogs ) contains many high-quality images but no corresponding high-quality videos ( see Fig . 4 ) . In this manner , our method can generate realistic videos of objects it has never seen moving during training ( such as generating realistic pet face videos using motions extracted from images of talking people ) . We refer to this new video generation task as cross-domain video synthesis . Finally , we quantitatively and qualitatively evaluate our approach , attaining state-of-the-art performance on each benchmark , and establish a challenging new baseline for video synthesis methods . 2 RELATED WORK . Video Synthesis . Approaches to image generation and translation using Generative Adversarial Networks ( GANs ) ( Goodfellow et al. , 2014 ) have demonstrated the ability to synthesize high quality images ( Radford et al. , 2016 ; Zhang et al. , 2019 ; Brock et al. , 2019 ; Donahue & Simonyan , 2019 ; Jin et al. , 2021 ) . Built upon image translation ( Isola et al. , 2017 ; Wang et al. , 2018b ) , works on video-to-video translation ( Bansal et al. , 2018 ; Wang et al. , 2018a ) are capable of converting an input video to a high-resolution output in another domain . However , the task of high-fidelity video generation , in the unconditional setting , is still a difficult and unresolved problem . Without the strong conditional inputs such as segmentation masks ( Wang et al. , 2019 ) or human poses ( Chan et al. , 2019 ; Ren et al. , 2020 ) that are employed by video-to-video translation works , generating videos following the distribution of training video samples is challenging . Earlier works on GANbased video modeling , including MDPGAN ( Yushchenko et al. , 2019 ) , VGAN ( Vondrick et al. , 2016 ) , TGAN ( Saito et al. , 2017 ) , MoCoGAN ( Tulyakov et al. , 2018 ) , ProgressiveVGAN ( Acharya et al. , 2018 ) , TGANv2 ( Saito et al. , 2020 ) show promising results on low-resolution datasets . Recent efforts demonstrate the capacity to generate more realistic videos , but with significantly more computation ( Clark et al. , 2019 ; Weissenborn et al. , 2020 ) . In this paper , we focus on generating realistic videos using manageable computational resources . LDVDGAN ( Kahembwe & Ramamoorthy , 2020 ) uses low dimensional discriminator to reduce model size and can generate videos with resolution up to 512× 512 , while we decrease training cost by utilizing a pre-trained image generator . The high-quality generation is achieved by using pre-trained image generators , while the motion trajectory is modeled within the latent space . Additionally , learning motion in the latent space allows us to easily adapt the video generation model to the task of video prediction ( Denton et al. , 2017 ) , in which the starting frame is given ( Denton & Fergus , 2018 ; Zhao et al. , 2018 ; Walker et al. , 2017 ; Villegas et al. , 2017b ; a ; Babaeizadeh et al. , 2017 ; Hsieh et al. , 2018 ; Byeon et al. , 2018 ) , by inverting the initial frame through the generator ( Abdal et al. , 2020 ) , instead of training an extra image encoder ( Tulyakov et al. , 2018 ; Zhang et al. , 2020 ) . Interpretable Latent Directions . The latent space of GANs is known to consist of semantically meaningful vectors for image manipulation . Both supervised methods , either using human annotations or pre-trained image classifiers ( Goetschalckx et al. , 2019 ; Shen et al. , 2020 ) , and unsupervised methods ( Jahanian et al. , 2020 ; Plumerault et al. , 2020 ) , are able to find interpretable directions for image editing , such as supervising directions for image rotation or background removal ( Voynov & Babenko , 2020 ; Shen & Zhou , 2020 ) . We further consider the motion vectors in the latent space . By disentangling the motion trajectories in an unsupervised fashion , we are able to transfer the motion information from a video dataset to an image dataset in which no temporal information is available . Contrastive Representation Learning is widely studied in unsupervised learning tasks ( He et al. , 2020 ; Chen et al. , 2020a ; b ; Hénaff et al. , 2020 ; Löwe et al. , 2019 ; Oord et al. , 2018 ; Misra & Maaten , 2020 ) . Related inputs , such as images ( Wu et al. , 2018 ) or latent representations ( Hjelm et al. , 2019 ) , which can vary while training due to data augmentation , are forced to be close by minimizing differences in their representation during training . Recent work ( Park et al. , 2020 ) applies noisecontrastive estimation ( Gutmann & Hyvärinen , 2010 ) to image generation tasks by learning the correspondence between image patches , achieving performance superior to that attained when using cycle-consistency constraints ( Zhu et al. , 2017 ; Yi et al. , 2017 ) . On the other hand , we learn an image discriminator to create videos with coherent content by leveraging contrastive loss ( Hadsell et al. , 2006 ) along with an adversarial loss ( Goodfellow et al. , 2014 ) . 3 METHOD . In this section , we introduce our method for high-resolution video generation . Our framework is built on top of a pre-trained image generator ( Karras et al. , 2020a ; b ; Zhao et al. , 2020a ; b ) , which helps to generate high-quality image frames and boosts the training efficiency with manageable computational resources . In addition , with the image generator fixed during training , we can disentangle video motion from image content , and enable video synthesis even when the image content and the video motion come from different domains . More specifically , our inference framework includes a motion generatorGM and an image generator GI . GM is implemented with two LSTM networks ( Hochreiter & Schmidhuber , 1997 ) and predicts the latent motion trajectory Z = { z1 , z2 , · · · , zn } , where n is the number of frames in the synthesized video . The image generator GI can thus synthesize each individual frame from the motion trajectory . The generated video sequence ṽ is given by ṽ = { x̃1 , x̃2 , · · · , x̃n } . For each synthesized frame x̃t , we have x̃t = GI ( zt ) for t = 1 , 2 , · · · , n. We also define the real video clip as v = { x1 , x2 , · · · , xn } and the training video distribution as pv . To train the motion generator GM to discover the desired motion trajectory , we apply a video discriminator to constrain the generated motion patterns to be similar to those of the training videos , and an image discriminator to force the frame content to be temporally consistent . Our framework is illustrated in Fig . 1 . We describe each component in more detail in the following sections . 3.1 MOTION GENERATOR . The motion generator GM predicts consecutive latent codes using an input code z1 ∈ Z , where the latent spaceZ is also shared by the image generator . For BigGAN ( Brock et al. , 2019 ) , we sample z1 from the normal distribution pz . For StyleGAN2 ( Karras et al. , 2020b ) , pz is the distribution after the multi-layer perceptron ( MLP ) , as the latent codes within this distribution can be semantically disentangled better than when using the normal distribution ( Shen et al. , 2020 ; Zhu et al. , 2020 ) . Formally , GM includes an LSTM encoder LSTMenc , which encodes z1 to get the initial hidden state , and a LSTM decoder LSTMdec , which estimates n− 1 continuous hidden states recursively : h1 , c1 = LSTMenc ( z1 ) , ht , ct = LSTMdec ( t , ( ht−1 , ct−1 ) ) , t = 2 , 3 , · · · , n , ( 1 ) where h and c denote the hidden state and cell state respectively , and t is a noise vector sampled from the normal distribution to model the motion diversity at timestamp t. Motion Disentanglement . Prior work ( Tulyakov et al. , 2018 ) applies ht as the motion code for the frame to be generated , while the content code is fixed for all frames . However , such a design requires a recurrent network to estimate the motion while preserving consistent content from the latent vector , which is difficult to learn in practice . Instead , we propose to use a sequence of motion residuals for estimating the motion trajectory . Specifically , we model the motion residual as the linear combination of a set of interpretable directions in the latent space ( Shen & Zhou , 2020 ; Härkönen et al. , 2020 ) . We first conduct principal component analysis ( PCA ) on m randomly sampled latent vectors from Z to get the basis V. Then , we estimate the motion direction from the previous frame zt−1 to the current frame zt by using ht and V as follows : zt = zt−1 + λ · ht ·V , t = 2 , 3 , · · · , n , ( 2 ) where the hidden state ht ∈ [ −1 , 1 ] , and λ controls the step given by the residual . With Eqn . 1 and Eqn . 2 , we have GM ( z1 ) = { z1 , z2 , · · · , zn } , and the generated video ṽ is given as ṽ = GI ( GM ( z1 ) ) . Motion Diversity . In Eqn . 1 , we introduce a noise vector t to control the diversity of motion . However , we observe that the LSTM decoder tends to neglect the t , resulting in motion mode collapse , meaning that GM can not capture the diverse motion patterns from training videos and generate distinct videos from one initial latent code with similar motion patterns for different sequences of noise vectors . To alleviate this issue , we introduce a mutual information loss Lm to maximize the mutual information between the hidden vector ht and the noise vector t. With sim ( u , v ) = uTv/ ‖u‖ ‖v‖ denoting the cosine similarity between vectors u and v , we define Lm as follows : Lm = 1 n− 1 n∑ t=2 sim ( H ( ht ) , t ) , ( 3 ) where H is a 2-layer MLP that serves as a mapping function . Learning . To learn the appropriate parameters for the motion generator GM , we apply a multi-scale video discriminator DV to tell whether a video sequence is real or synthesized . The discriminator is based on the architecture of PatchGAN ( Isola et al. , 2017 ) . However , we use 3D convolutional layers in DV , as they can model temporal dynamics better than 2D convolutional layers . We divide input video sequence into small 3D patches , and classify each patch as real or fake . The local responses for the input sequence are averaged to produce the final output . Additionally , each frame in the input video sequence is conditioned on the first frame , as it falls into the distribution of the pre-trained image generator , for more stable training . We thus optimize the following adversarial loss to learn GM and DV : LDV = Ev∼pv [ logDv ( v ) ] + Ez1∼pz [ log ( 1−DV ( GI ( GM ( z1 ) ) ) ) ] . ( 4 ) | This paper proposes a method to disentangle content and motion from videos for high-resolution video synthesis. The proposed method consists of a motion generator, pre-trained generator, image discriminator, and video discriminator. The motion generator predicts the latent motion trajectory z, which is residually updated over time. Then the image generator produces each individual frame from the motion trajectory. For training, five types of loss functions are combined. In experiments, video generation by the proposed method is performed on UCF-101, FaceForensics, and Sky time-Lapse datasets. Also, cross-domain video generation and more ablation studies were conducted to show the effectiveness of the proposed method. | SP:626c65a0fe391afe1b3a8769de16e9f1ccded977 |
A Good Image Generator Is What You Need for High-Resolution Video Synthesis | 1 INTRODUCTION . Video synthesis seeks to generate a sequence of moving pictures from noise . While its closely related counterpart—image synthesis—has seen substantial advances in recent years , allowing for synthesizing at high resolutions ( Karras et al. , 2017 ) , rendering images often indistinguishable from real ones ( Karras et al. , 2019 ) , and supporting multiple classes of image content ( Zhang et al. , 2019 ) , contemporary improvements in the domain of video synthesis have been comparatively modest . Due to the statistical complexity of videos and larger model sizes , video synthesis produces relatively low-resolution videos , yet requires longer training times . For example , scaling the image generator of Brock et al . ( 2019 ) to generate 256 × 256 videos requires a substantial computational budget1 . Can we use a similar method to attain higher resolutions ? We believe a different approach is needed . There are two desired properties for generated videos : ( i ) high quality for each individual frame , and ( ii ) the frame sequence should be temporally consistent , i.e . depicting the same content with plausible motion . Previous works ( Tulyakov et al. , 2018 ; Clark et al. , 2019 ) attempt to achieve both goals with a single framework , making such methods computationally demanding when high resolution is desired . We suggest a different perspective on this problem . We hypothesize that , given an image generator that has learned the distribution of video frames as independent images , a video can be represented as a sequence of latent codes from this generator . The problem of video synthesis can then be framed as discovering a latent trajectory that renders temporally consistent images . Hence , we demonstrate that ( i ) can be addressed by a pre-trained and fixed image generator , and ( ii ) can be achieved using the proposed framework to create appropriate image sequences . ∗Work done while at Snap Inc. 1We estimate that the cost of training a model such as DVD-GAN ( Clark et al. , 2019 ) once requires > $ 30K . To discover the appropriate latent trajectory , we introduce a motion generator , implemented via two recurrent neural networks , that operates on the initial content code to obtain the motion representation . We model motion as a residual between continuous latent codes that are passed to the image generator for individual frame generation . Such a residual representation can also facilitate the disentangling of motion and content . The motion generator is trained using the chosen image discriminator with contrastive loss to force the content to be temporally consistent , and a patch-based multi-scale video discriminator for learning motion patterns . Our framework supports contemporary image generators such as StyleGAN2 ( Karras et al. , 2019 ) and BigGAN ( Brock et al. , 2019 ) . We name our approach as MoCoGAN-HD ( Motion and Content decomposed GAN for HighDefinition video synthesis ) as it features several major advantages over traditional video synthesis pipelines . First , it transcends the limited resolutions of existing techniques , allowing for the generation of high-quality videos at resolutions up to 1024 × 1024 . Second , as we search for a latent trajectory in an image generator , our method is computationally more efficient , requiring an order of magnitude less training time than previous video-based works ( Clark et al. , 2019 ) . Third , as the image generator is fixed , it can be trained on a separate high-quality image dataset . Due to the disentangled representation of motion and content , our approach can learn motion from a video dataset and apply it to an image dataset , even in the case of two datasets belonging to different domains . It thus unleashes the power of an image generator to synthesize high quality videos when a domain ( e.g. , dogs ) contains many high-quality images but no corresponding high-quality videos ( see Fig . 4 ) . In this manner , our method can generate realistic videos of objects it has never seen moving during training ( such as generating realistic pet face videos using motions extracted from images of talking people ) . We refer to this new video generation task as cross-domain video synthesis . Finally , we quantitatively and qualitatively evaluate our approach , attaining state-of-the-art performance on each benchmark , and establish a challenging new baseline for video synthesis methods . 2 RELATED WORK . Video Synthesis . Approaches to image generation and translation using Generative Adversarial Networks ( GANs ) ( Goodfellow et al. , 2014 ) have demonstrated the ability to synthesize high quality images ( Radford et al. , 2016 ; Zhang et al. , 2019 ; Brock et al. , 2019 ; Donahue & Simonyan , 2019 ; Jin et al. , 2021 ) . Built upon image translation ( Isola et al. , 2017 ; Wang et al. , 2018b ) , works on video-to-video translation ( Bansal et al. , 2018 ; Wang et al. , 2018a ) are capable of converting an input video to a high-resolution output in another domain . However , the task of high-fidelity video generation , in the unconditional setting , is still a difficult and unresolved problem . Without the strong conditional inputs such as segmentation masks ( Wang et al. , 2019 ) or human poses ( Chan et al. , 2019 ; Ren et al. , 2020 ) that are employed by video-to-video translation works , generating videos following the distribution of training video samples is challenging . Earlier works on GANbased video modeling , including MDPGAN ( Yushchenko et al. , 2019 ) , VGAN ( Vondrick et al. , 2016 ) , TGAN ( Saito et al. , 2017 ) , MoCoGAN ( Tulyakov et al. , 2018 ) , ProgressiveVGAN ( Acharya et al. , 2018 ) , TGANv2 ( Saito et al. , 2020 ) show promising results on low-resolution datasets . Recent efforts demonstrate the capacity to generate more realistic videos , but with significantly more computation ( Clark et al. , 2019 ; Weissenborn et al. , 2020 ) . In this paper , we focus on generating realistic videos using manageable computational resources . LDVDGAN ( Kahembwe & Ramamoorthy , 2020 ) uses low dimensional discriminator to reduce model size and can generate videos with resolution up to 512× 512 , while we decrease training cost by utilizing a pre-trained image generator . The high-quality generation is achieved by using pre-trained image generators , while the motion trajectory is modeled within the latent space . Additionally , learning motion in the latent space allows us to easily adapt the video generation model to the task of video prediction ( Denton et al. , 2017 ) , in which the starting frame is given ( Denton & Fergus , 2018 ; Zhao et al. , 2018 ; Walker et al. , 2017 ; Villegas et al. , 2017b ; a ; Babaeizadeh et al. , 2017 ; Hsieh et al. , 2018 ; Byeon et al. , 2018 ) , by inverting the initial frame through the generator ( Abdal et al. , 2020 ) , instead of training an extra image encoder ( Tulyakov et al. , 2018 ; Zhang et al. , 2020 ) . Interpretable Latent Directions . The latent space of GANs is known to consist of semantically meaningful vectors for image manipulation . Both supervised methods , either using human annotations or pre-trained image classifiers ( Goetschalckx et al. , 2019 ; Shen et al. , 2020 ) , and unsupervised methods ( Jahanian et al. , 2020 ; Plumerault et al. , 2020 ) , are able to find interpretable directions for image editing , such as supervising directions for image rotation or background removal ( Voynov & Babenko , 2020 ; Shen & Zhou , 2020 ) . We further consider the motion vectors in the latent space . By disentangling the motion trajectories in an unsupervised fashion , we are able to transfer the motion information from a video dataset to an image dataset in which no temporal information is available . Contrastive Representation Learning is widely studied in unsupervised learning tasks ( He et al. , 2020 ; Chen et al. , 2020a ; b ; Hénaff et al. , 2020 ; Löwe et al. , 2019 ; Oord et al. , 2018 ; Misra & Maaten , 2020 ) . Related inputs , such as images ( Wu et al. , 2018 ) or latent representations ( Hjelm et al. , 2019 ) , which can vary while training due to data augmentation , are forced to be close by minimizing differences in their representation during training . Recent work ( Park et al. , 2020 ) applies noisecontrastive estimation ( Gutmann & Hyvärinen , 2010 ) to image generation tasks by learning the correspondence between image patches , achieving performance superior to that attained when using cycle-consistency constraints ( Zhu et al. , 2017 ; Yi et al. , 2017 ) . On the other hand , we learn an image discriminator to create videos with coherent content by leveraging contrastive loss ( Hadsell et al. , 2006 ) along with an adversarial loss ( Goodfellow et al. , 2014 ) . 3 METHOD . In this section , we introduce our method for high-resolution video generation . Our framework is built on top of a pre-trained image generator ( Karras et al. , 2020a ; b ; Zhao et al. , 2020a ; b ) , which helps to generate high-quality image frames and boosts the training efficiency with manageable computational resources . In addition , with the image generator fixed during training , we can disentangle video motion from image content , and enable video synthesis even when the image content and the video motion come from different domains . More specifically , our inference framework includes a motion generatorGM and an image generator GI . GM is implemented with two LSTM networks ( Hochreiter & Schmidhuber , 1997 ) and predicts the latent motion trajectory Z = { z1 , z2 , · · · , zn } , where n is the number of frames in the synthesized video . The image generator GI can thus synthesize each individual frame from the motion trajectory . The generated video sequence ṽ is given by ṽ = { x̃1 , x̃2 , · · · , x̃n } . For each synthesized frame x̃t , we have x̃t = GI ( zt ) for t = 1 , 2 , · · · , n. We also define the real video clip as v = { x1 , x2 , · · · , xn } and the training video distribution as pv . To train the motion generator GM to discover the desired motion trajectory , we apply a video discriminator to constrain the generated motion patterns to be similar to those of the training videos , and an image discriminator to force the frame content to be temporally consistent . Our framework is illustrated in Fig . 1 . We describe each component in more detail in the following sections . 3.1 MOTION GENERATOR . The motion generator GM predicts consecutive latent codes using an input code z1 ∈ Z , where the latent spaceZ is also shared by the image generator . For BigGAN ( Brock et al. , 2019 ) , we sample z1 from the normal distribution pz . For StyleGAN2 ( Karras et al. , 2020b ) , pz is the distribution after the multi-layer perceptron ( MLP ) , as the latent codes within this distribution can be semantically disentangled better than when using the normal distribution ( Shen et al. , 2020 ; Zhu et al. , 2020 ) . Formally , GM includes an LSTM encoder LSTMenc , which encodes z1 to get the initial hidden state , and a LSTM decoder LSTMdec , which estimates n− 1 continuous hidden states recursively : h1 , c1 = LSTMenc ( z1 ) , ht , ct = LSTMdec ( t , ( ht−1 , ct−1 ) ) , t = 2 , 3 , · · · , n , ( 1 ) where h and c denote the hidden state and cell state respectively , and t is a noise vector sampled from the normal distribution to model the motion diversity at timestamp t. Motion Disentanglement . Prior work ( Tulyakov et al. , 2018 ) applies ht as the motion code for the frame to be generated , while the content code is fixed for all frames . However , such a design requires a recurrent network to estimate the motion while preserving consistent content from the latent vector , which is difficult to learn in practice . Instead , we propose to use a sequence of motion residuals for estimating the motion trajectory . Specifically , we model the motion residual as the linear combination of a set of interpretable directions in the latent space ( Shen & Zhou , 2020 ; Härkönen et al. , 2020 ) . We first conduct principal component analysis ( PCA ) on m randomly sampled latent vectors from Z to get the basis V. Then , we estimate the motion direction from the previous frame zt−1 to the current frame zt by using ht and V as follows : zt = zt−1 + λ · ht ·V , t = 2 , 3 , · · · , n , ( 2 ) where the hidden state ht ∈ [ −1 , 1 ] , and λ controls the step given by the residual . With Eqn . 1 and Eqn . 2 , we have GM ( z1 ) = { z1 , z2 , · · · , zn } , and the generated video ṽ is given as ṽ = GI ( GM ( z1 ) ) . Motion Diversity . In Eqn . 1 , we introduce a noise vector t to control the diversity of motion . However , we observe that the LSTM decoder tends to neglect the t , resulting in motion mode collapse , meaning that GM can not capture the diverse motion patterns from training videos and generate distinct videos from one initial latent code with similar motion patterns for different sequences of noise vectors . To alleviate this issue , we introduce a mutual information loss Lm to maximize the mutual information between the hidden vector ht and the noise vector t. With sim ( u , v ) = uTv/ ‖u‖ ‖v‖ denoting the cosine similarity between vectors u and v , we define Lm as follows : Lm = 1 n− 1 n∑ t=2 sim ( H ( ht ) , t ) , ( 3 ) where H is a 2-layer MLP that serves as a mapping function . Learning . To learn the appropriate parameters for the motion generator GM , we apply a multi-scale video discriminator DV to tell whether a video sequence is real or synthesized . The discriminator is based on the architecture of PatchGAN ( Isola et al. , 2017 ) . However , we use 3D convolutional layers in DV , as they can model temporal dynamics better than 2D convolutional layers . We divide input video sequence into small 3D patches , and classify each patch as real or fake . The local responses for the input sequence are averaged to produce the final output . Additionally , each frame in the input video sequence is conditioned on the first frame , as it falls into the distribution of the pre-trained image generator , for more stable training . We thus optimize the following adversarial loss to learn GM and DV : LDV = Ev∼pv [ logDv ( v ) ] + Ez1∼pz [ log ( 1−DV ( GI ( GM ( z1 ) ) ) ) ] . ( 4 ) | This paper addresses the problem of video synthesis --- generating diverse, realistic videos. This paper's core idea is to leverage a fixed, pre-trained GAN model for image synthesis and train a motion generator to produce a sequence of latent vectors to generate image sequences (using the pretrained GAN and the generated latent vectors) are temporally coherent. The specific technical novelties lie in (1) predicting the motion residual and (2) adding contrastive image discriminator to ensure that generated contents in a video are similar. The paper provides an extensive set of experiments demonstrating the proposed method's effectiveness over the state-of-the-art video synthesis models. | SP:626c65a0fe391afe1b3a8769de16e9f1ccded977 |
Learning continuous-time PDEs from sparse data with graph neural networks | 1 INTRODUCTION . We consider continuous dynamical systems with a state u ( x , t ) ∈ R that evolves over time t ∈ R+ and spatial locations x ∈ Ω ⊂ RD of a bounded domain Ω . We assume the system is governed by an unknown partial differential equation ( PDE ) u̇ ( x , t ) : = du ( x , t ) dt = F ( x , u , ∇xu , ∇2xu , . . . ) , ( 1 ) where the temporal evolution u̇ of the system depends on the current state u and its spatial first and higher-order partial derivatives w.r.t . the coordinates x . Such PDE models are the cornerstone of natural sciences , and are widely applicable to modelling of propagative systems , such as behavior of sound waves , fluid dynamics , heat dissipation , weather patterns , disease progression or cellular kinetics ( Courant & Hilbert , 2008 ) . Our objective is to learn the differential F from data . There is a long history of manually deriving mechanistic PDE equations for specific systems ( Cajori , 1928 ) , such as the Navier-Stokes fluid dynamics or the Schrödinger ’ s quantum equations , and approximating their solution forward in time numerically ( Ames , 2014 ) . These efforts are complemented by data-driven approaches to infer any unknown or latent coefficients in the otherwise known equations ( Isakov , 2006 ; Berg & Nyström , 2017 ; Santo et al. , 2019 ) , or in partially known equations ( Freund et al. , 2019 ; Seo & Liu , 2019b ; Seo et al. , 2020 ) . A series of methods have studied neural proxies of known PDEs for solution acceleration ( Lagaris et al. , 1998 ; Raissi et al. , 2017 ; Weinan & Yu , 2018 ; Sirignano & Spiliopoulos , 2018 ) or for uncertainty quantification ( Khoo et al. , 2017 ) . Related work . Recently the pioneering work of Long et al . ( 2017 ) proposed a fully non-mechanistic method PDE-Net , where the governing equation F is learned from system snapshot observations as a convolutional neural network ( CNN ) over the input domain discretised into a spatio-temporal grid . Further works have extended the approach with residual CNNs ( Ruthotto & Haber , 2019 ) , symbolic neural networks ( Long et al. , 2019 ) , high-order autoregressive networks ( Geneva & Zabaras , 2020 ) , and feed-forward networks ( Xu et al. , 2019 ) . These models are fundamentally limited to discretizing the input domain with a sample-inefficient grid , while they also do not support continuous evolution over time , rendering them unable to handle temporally or spatially sparse or non-uniform observations commonly encountered in realistic applications . Models such as ( Battaglia et al. , 2016 ; Chang et al. , 2016 ; Sanchez-Gonzalez et al. , 2018 ) are related to the interaction networks where object ’ s state evolves as a function of its neighboring objects , which forms dynamic relational graphs instead of grids . In contrast to the dense solution fields of PDEs , these models apply message-passing between small number of moving and interacting objects , which deviates from PDEs that are strictly differential functions . In Poli et al . ( 2019 ) graph neural ordinary differential equations ( GNODE ) were proposed as a framework for modeling continuous-time signals on graphs . The main limitations of this framework in application to learning PDEs are the lack of spatial information about physical node locations and lack of motivation for why this type of model could be suitable . Our work can be viewed as connecting graph-based continuous-time models with data-driven learning of PDEs in spatial domain through a classical PDE solution technique . Contributions . In this paper we propose to learn free-form , continuous-time , a priori fully unknown PDE model F from sparse data measured on arbitrary timepoints and locations of the coordinate domain Ω with graph neural networks ( GNN ) . Our contributions are : • We introduce continuous-time representation and learning of the dynamics of PDE-driven systems • We propose efficient graph representation of the domain structure using the method of lines with message passing neural networks • We achieve state-of-the-art learning performance on realistic PDE systems with irregular data , and our model is highly robust to data sparsity Scripts and data for reproducing the experiments can be found in this github repository . 2 METHODS . We apply the method of lines ( MOL ) ( Schiesser , 2012 ) to numerically solve Equation 1 . The MOL consists of selecting N nodes in Ω and discretizing spatial derivatives in F at these nodes . We place the nodes to the observation locations ( x1 , . . . , xN ) . The discretization leads to F being approximated by F̂ and produces the following system of ordinary differential equations ( ODEs ) whose solution asymptotically approximates the solution of Equation 1 u̇ ( t ) = u̇1 ( t ) ... u̇N ( t ) = du ( x1 , t ) dt ... du ( xN , t ) dt ≈ F̂ ( x1 , xN ( 1 ) , u1 , uN ( 1 ) ) ... F̂ ( xN , xN ( N ) , uN , uN ( N ) ) ∈ RN . ( 2 ) As the discretized F̂ inherits its unknown nature from the true PDE function F , we approximate F̂ by a learnable neural surrogate function . The system ’ s state at xi is defined as ui , while N ( i ) is a set of indices of neighboring nodes other than i that are required to evaluate F̂ at xi , and xN ( i ) with uN ( i ) are positions and states of nodes N ( i ) . This shows that the temporal derivative u̇i of ui depends not only on the location and state at the node i , but also on locations and states of neighboring nodes , resulting in a locally coupled system of ODEs . Each ODE in the system follows the solution at a fixed location xi . Numerous ODE solvers have been proposed ( such as Euler and Runge-Kutta solvers ) to solve the full system u ( t ) = u ( 0 ) + ∫ t 0 u̇ ( τ ) dτ , ( 3 ) where 0 ≤ τ ≤ t is a cumulative intermediate time variable . Solving equation 3 forward in time scales linearly both with respect to the number of nodes N and the number of evaluated time points M , while saturating the input space Ω requires a large number of nodes . In practice , PDEs are often applied for two- and three-dimensional spatial systems where the method is efficient . 2.1 POSITION-INVARIANT GRAPH NEURAL NETWORK DIFFERENTIAL . After introducing Equation 2 , we transition from learning F to learning F̂ . The value of F̂ at a node i must depend only on the nodes i and N ( i ) . Furthermore , the number of arguments and their order in F̂ is not known in advance and might be different for each node . This means that our model F̂ must be able to work with an arbitrary number of arguments and must be invariant to permutations of their order . Graph neural networks ( GNNs ) ( Wu et al. , 2020 ) satisfy these requirements . In a more restricted setting , where the number of neighbors and their order is known , ( e.g . if the grid is uniform ) other types of models such as multilayer perceptrons and convolutional neural networks can be used as well . We consider a type of GNNs called message passing neural networks ( MPNNs ) ( Gilmer et al. , 2017 ) to represent F̂ as F̂θ ( xN ( i ) − xi , ui , uN ( i ) ) , ( 4 ) where xN ( i ) − xi = { xj − xi : j ∈ N ( i ) } and θ denote parameters of the MPNN . This formulation assumes the absence of position-dependent quantities in F̂ , but models based on this formulation are invariant to translations and rotations of Ω , which makes generalization to systems with different node positions feasible , and prevents overfitting by memorizing position-specific dynamics . We use MPNNs , which is a type of spatial-based GNNs , due to their flexibility and computational efficiency . The main alternative – spectral-based GNNs – have relatively poor scaling with the number of nodes and learn global , or domain-dependent , filters due to the need to perform eigenvalue decomposition of the Laplacian matrix . 2.2 MESSAGE PASSING NEURAL NETWORKS . Let a graph G = ( V , E ) contain nodes V = { xi } Ni=1 , defined by the measurement positions , and undirected edges E = { eij } , and assume each node and edge are associated with a node feature vi and an edge feature eij , respectively . We use the node neighborhood N ( i ) to define edges . Neighbors for each node were selected by applying Delaunay triangulation to the measurement positions . Two nodes were considered to be neighbors if they lie on the same edge of at least one triangle ( Figure 1 ) . Delaunay triangulation has such useful properties as maximizing the minimum angle within each triangle in the triangulation and containing the nearest neighbor of each node which helps to obtain a good quality discretization of Ω . In message passing graph neural networks we propagate a latent state for K ≥ 1 graph layers , where each layer k consists of first aggregating messages m ( k ) i for each node i , and then updating the corresponding node states h ( k ) i , m ( k+1 ) i = ⊕ j∈N ( i ) φ ( k ) ( h ( k ) i , h ( k ) j , eij ) , ( 5 ) h ( k+1 ) i = γ ( k ) ( h ( k ) i , m ( k+1 ) i ) , ( 6 ) where ⊕ denotes a permutation invariant aggregation function ( e.g . sum , mean , max ) , and φ ( k ) , γ ( k ) are differentiable functions parameterized by deep neural networks . At any time τ , we initialise the latent states h ( 0 ) i = vi = ui ( τ ) and node features to the current state ui ( τ ) of the system . We define edge features eij : = xj − xi as location differences . Finally , we use the node states at the last graph layer of the MPNN to evaluate the PDE surrogate dû ( xi , t ) dt = F̂θ ( xN ( i ) − xi , ui , uN ( i ) ) = h ( K ) i , ( 7 ) which is used to solve Equation 3 for the estimated states û ( t ) = ( û ( x1 , t ) , . . . , û ( xN , t ) ) . 2.3 ADJOINT METHOD FOR LEARNING CONTINUOUS-TIME MPNN SURROGATES . Parameters of F̂θ are defined by θ which is the union of parameters of functions φ ( k ) , γ ( k ) , k = 1 , . . . , K in the MPNN . We fit θ by minimizing the mean squared error between the observed states ( y ( t0 ) , . . . , y ( tM ) ) and the estimated states ( û ( t0 ) , . . . , û ( tM ) ) , L ( θ ) = ∫ tM t0 ` ( t , û ) dt = ∫ tM t0 1 M + 1 M∑ i=0 ||û ( ti ) − y ( ti ) ||22δ ( t− ti ) dt ( 8 ) = 1 M + 1 M∑ i=1 ||û ( ti ) − y ( ti ) ||22 . ( 9 ) While discrete-time neural PDE models evaluate the system state only at measurement time points , more accurate continuous-time solution for the estimated state generally requires many more evaluations of the system state . If an adaptive solver is used to obtain the estimated states , the number of time steps performed by the solver might be significantly larger than M . The amount of memory required to evaluate the gradient of L ( θ ) by backpropagation scales linearly with the number of solver time steps . This typically makes backpropagation infeasible due to large memory requirements . We use an alternative approach , which allows computing the gradient for memory cost , which is independent from the number of the solver time steps . The approach was presented in Chen et al . ( 2018 ) for neural ODEs and is based on the adjoint method ( Pontryagin , 2018 ) . The adjoint method consists of a single forward ODE pass 3 until state û ( tM ) at the final time tM , and subsequent backward ODE pass solving the gradients . The backward pass is performed by first solving the adjoint equation λ̇ ( t ) T = ∂ ` ∂û ( t ) − λ ( t ) T ∂F̂ ∂û ( t ) . ( 10 ) for the adjoint variables λ from t = tM until t = 0 with λ ( tM ) = 0 , and then computing dL dθ = − ∫ T 0 λ ( t ) T ∂F̂ ∂θ dt ( 11 ) to obtain the final gradient . | The paper proposes to use graph-based networks for evaluations of PDEs with continuous time formulations. In contrast to existing works on continuous time ODE formulations with graph structures, the proposed networks incorporate relative spatial information in order for the network to evaluate spatial derivatives in addition to the temporal dynamics. A key argument for this setup is the flexibility in spcae (via the graph nets) in addition to a variable time step. | SP:c395c4430a7169941643a29482096a5d69b7ae50 |
Learning continuous-time PDEs from sparse data with graph neural networks | 1 INTRODUCTION . We consider continuous dynamical systems with a state u ( x , t ) ∈ R that evolves over time t ∈ R+ and spatial locations x ∈ Ω ⊂ RD of a bounded domain Ω . We assume the system is governed by an unknown partial differential equation ( PDE ) u̇ ( x , t ) : = du ( x , t ) dt = F ( x , u , ∇xu , ∇2xu , . . . ) , ( 1 ) where the temporal evolution u̇ of the system depends on the current state u and its spatial first and higher-order partial derivatives w.r.t . the coordinates x . Such PDE models are the cornerstone of natural sciences , and are widely applicable to modelling of propagative systems , such as behavior of sound waves , fluid dynamics , heat dissipation , weather patterns , disease progression or cellular kinetics ( Courant & Hilbert , 2008 ) . Our objective is to learn the differential F from data . There is a long history of manually deriving mechanistic PDE equations for specific systems ( Cajori , 1928 ) , such as the Navier-Stokes fluid dynamics or the Schrödinger ’ s quantum equations , and approximating their solution forward in time numerically ( Ames , 2014 ) . These efforts are complemented by data-driven approaches to infer any unknown or latent coefficients in the otherwise known equations ( Isakov , 2006 ; Berg & Nyström , 2017 ; Santo et al. , 2019 ) , or in partially known equations ( Freund et al. , 2019 ; Seo & Liu , 2019b ; Seo et al. , 2020 ) . A series of methods have studied neural proxies of known PDEs for solution acceleration ( Lagaris et al. , 1998 ; Raissi et al. , 2017 ; Weinan & Yu , 2018 ; Sirignano & Spiliopoulos , 2018 ) or for uncertainty quantification ( Khoo et al. , 2017 ) . Related work . Recently the pioneering work of Long et al . ( 2017 ) proposed a fully non-mechanistic method PDE-Net , where the governing equation F is learned from system snapshot observations as a convolutional neural network ( CNN ) over the input domain discretised into a spatio-temporal grid . Further works have extended the approach with residual CNNs ( Ruthotto & Haber , 2019 ) , symbolic neural networks ( Long et al. , 2019 ) , high-order autoregressive networks ( Geneva & Zabaras , 2020 ) , and feed-forward networks ( Xu et al. , 2019 ) . These models are fundamentally limited to discretizing the input domain with a sample-inefficient grid , while they also do not support continuous evolution over time , rendering them unable to handle temporally or spatially sparse or non-uniform observations commonly encountered in realistic applications . Models such as ( Battaglia et al. , 2016 ; Chang et al. , 2016 ; Sanchez-Gonzalez et al. , 2018 ) are related to the interaction networks where object ’ s state evolves as a function of its neighboring objects , which forms dynamic relational graphs instead of grids . In contrast to the dense solution fields of PDEs , these models apply message-passing between small number of moving and interacting objects , which deviates from PDEs that are strictly differential functions . In Poli et al . ( 2019 ) graph neural ordinary differential equations ( GNODE ) were proposed as a framework for modeling continuous-time signals on graphs . The main limitations of this framework in application to learning PDEs are the lack of spatial information about physical node locations and lack of motivation for why this type of model could be suitable . Our work can be viewed as connecting graph-based continuous-time models with data-driven learning of PDEs in spatial domain through a classical PDE solution technique . Contributions . In this paper we propose to learn free-form , continuous-time , a priori fully unknown PDE model F from sparse data measured on arbitrary timepoints and locations of the coordinate domain Ω with graph neural networks ( GNN ) . Our contributions are : • We introduce continuous-time representation and learning of the dynamics of PDE-driven systems • We propose efficient graph representation of the domain structure using the method of lines with message passing neural networks • We achieve state-of-the-art learning performance on realistic PDE systems with irregular data , and our model is highly robust to data sparsity Scripts and data for reproducing the experiments can be found in this github repository . 2 METHODS . We apply the method of lines ( MOL ) ( Schiesser , 2012 ) to numerically solve Equation 1 . The MOL consists of selecting N nodes in Ω and discretizing spatial derivatives in F at these nodes . We place the nodes to the observation locations ( x1 , . . . , xN ) . The discretization leads to F being approximated by F̂ and produces the following system of ordinary differential equations ( ODEs ) whose solution asymptotically approximates the solution of Equation 1 u̇ ( t ) = u̇1 ( t ) ... u̇N ( t ) = du ( x1 , t ) dt ... du ( xN , t ) dt ≈ F̂ ( x1 , xN ( 1 ) , u1 , uN ( 1 ) ) ... F̂ ( xN , xN ( N ) , uN , uN ( N ) ) ∈ RN . ( 2 ) As the discretized F̂ inherits its unknown nature from the true PDE function F , we approximate F̂ by a learnable neural surrogate function . The system ’ s state at xi is defined as ui , while N ( i ) is a set of indices of neighboring nodes other than i that are required to evaluate F̂ at xi , and xN ( i ) with uN ( i ) are positions and states of nodes N ( i ) . This shows that the temporal derivative u̇i of ui depends not only on the location and state at the node i , but also on locations and states of neighboring nodes , resulting in a locally coupled system of ODEs . Each ODE in the system follows the solution at a fixed location xi . Numerous ODE solvers have been proposed ( such as Euler and Runge-Kutta solvers ) to solve the full system u ( t ) = u ( 0 ) + ∫ t 0 u̇ ( τ ) dτ , ( 3 ) where 0 ≤ τ ≤ t is a cumulative intermediate time variable . Solving equation 3 forward in time scales linearly both with respect to the number of nodes N and the number of evaluated time points M , while saturating the input space Ω requires a large number of nodes . In practice , PDEs are often applied for two- and three-dimensional spatial systems where the method is efficient . 2.1 POSITION-INVARIANT GRAPH NEURAL NETWORK DIFFERENTIAL . After introducing Equation 2 , we transition from learning F to learning F̂ . The value of F̂ at a node i must depend only on the nodes i and N ( i ) . Furthermore , the number of arguments and their order in F̂ is not known in advance and might be different for each node . This means that our model F̂ must be able to work with an arbitrary number of arguments and must be invariant to permutations of their order . Graph neural networks ( GNNs ) ( Wu et al. , 2020 ) satisfy these requirements . In a more restricted setting , where the number of neighbors and their order is known , ( e.g . if the grid is uniform ) other types of models such as multilayer perceptrons and convolutional neural networks can be used as well . We consider a type of GNNs called message passing neural networks ( MPNNs ) ( Gilmer et al. , 2017 ) to represent F̂ as F̂θ ( xN ( i ) − xi , ui , uN ( i ) ) , ( 4 ) where xN ( i ) − xi = { xj − xi : j ∈ N ( i ) } and θ denote parameters of the MPNN . This formulation assumes the absence of position-dependent quantities in F̂ , but models based on this formulation are invariant to translations and rotations of Ω , which makes generalization to systems with different node positions feasible , and prevents overfitting by memorizing position-specific dynamics . We use MPNNs , which is a type of spatial-based GNNs , due to their flexibility and computational efficiency . The main alternative – spectral-based GNNs – have relatively poor scaling with the number of nodes and learn global , or domain-dependent , filters due to the need to perform eigenvalue decomposition of the Laplacian matrix . 2.2 MESSAGE PASSING NEURAL NETWORKS . Let a graph G = ( V , E ) contain nodes V = { xi } Ni=1 , defined by the measurement positions , and undirected edges E = { eij } , and assume each node and edge are associated with a node feature vi and an edge feature eij , respectively . We use the node neighborhood N ( i ) to define edges . Neighbors for each node were selected by applying Delaunay triangulation to the measurement positions . Two nodes were considered to be neighbors if they lie on the same edge of at least one triangle ( Figure 1 ) . Delaunay triangulation has such useful properties as maximizing the minimum angle within each triangle in the triangulation and containing the nearest neighbor of each node which helps to obtain a good quality discretization of Ω . In message passing graph neural networks we propagate a latent state for K ≥ 1 graph layers , where each layer k consists of first aggregating messages m ( k ) i for each node i , and then updating the corresponding node states h ( k ) i , m ( k+1 ) i = ⊕ j∈N ( i ) φ ( k ) ( h ( k ) i , h ( k ) j , eij ) , ( 5 ) h ( k+1 ) i = γ ( k ) ( h ( k ) i , m ( k+1 ) i ) , ( 6 ) where ⊕ denotes a permutation invariant aggregation function ( e.g . sum , mean , max ) , and φ ( k ) , γ ( k ) are differentiable functions parameterized by deep neural networks . At any time τ , we initialise the latent states h ( 0 ) i = vi = ui ( τ ) and node features to the current state ui ( τ ) of the system . We define edge features eij : = xj − xi as location differences . Finally , we use the node states at the last graph layer of the MPNN to evaluate the PDE surrogate dû ( xi , t ) dt = F̂θ ( xN ( i ) − xi , ui , uN ( i ) ) = h ( K ) i , ( 7 ) which is used to solve Equation 3 for the estimated states û ( t ) = ( û ( x1 , t ) , . . . , û ( xN , t ) ) . 2.3 ADJOINT METHOD FOR LEARNING CONTINUOUS-TIME MPNN SURROGATES . Parameters of F̂θ are defined by θ which is the union of parameters of functions φ ( k ) , γ ( k ) , k = 1 , . . . , K in the MPNN . We fit θ by minimizing the mean squared error between the observed states ( y ( t0 ) , . . . , y ( tM ) ) and the estimated states ( û ( t0 ) , . . . , û ( tM ) ) , L ( θ ) = ∫ tM t0 ` ( t , û ) dt = ∫ tM t0 1 M + 1 M∑ i=0 ||û ( ti ) − y ( ti ) ||22δ ( t− ti ) dt ( 8 ) = 1 M + 1 M∑ i=1 ||û ( ti ) − y ( ti ) ||22 . ( 9 ) While discrete-time neural PDE models evaluate the system state only at measurement time points , more accurate continuous-time solution for the estimated state generally requires many more evaluations of the system state . If an adaptive solver is used to obtain the estimated states , the number of time steps performed by the solver might be significantly larger than M . The amount of memory required to evaluate the gradient of L ( θ ) by backpropagation scales linearly with the number of solver time steps . This typically makes backpropagation infeasible due to large memory requirements . We use an alternative approach , which allows computing the gradient for memory cost , which is independent from the number of the solver time steps . The approach was presented in Chen et al . ( 2018 ) for neural ODEs and is based on the adjoint method ( Pontryagin , 2018 ) . The adjoint method consists of a single forward ODE pass 3 until state û ( tM ) at the final time tM , and subsequent backward ODE pass solving the gradients . The backward pass is performed by first solving the adjoint equation λ̇ ( t ) T = ∂ ` ∂û ( t ) − λ ( t ) T ∂F̂ ∂û ( t ) . ( 10 ) for the adjoint variables λ from t = tM until t = 0 with λ ( tM ) = 0 , and then computing dL dθ = − ∫ T 0 λ ( t ) T ∂F̂ ∂θ dt ( 11 ) to obtain the final gradient . | This submission proposes extensions of PDE-net that relax some constraints that could help extend the range of applications of this approach. First, rather than fixing a spatial discretization in the form of a grid, the authors use a Delaunay triangulation to represent the domain. The updates to the nodes of this triangulation are performed using a message-passing GNN framework which couples neighboring nodes. Secondly, the authors use a classical adjoint method to allow for arbitrary time-discretizations (though this may be much more expensive in practice). | SP:c395c4430a7169941643a29482096a5d69b7ae50 |
DCT-SNN: Using DCT to Distribute Spatial Information over Time for Learning Low-Latency Spiking Neural Networks | 1 INTRODUCTION . Deep Learning networks have tremendously improved state-of-the-art performance for many tasks such as object detection , classification and natural language processing ( Krizhevsky et al. , 2012 ; Hinton et al. , 2012 ; Deng & Liu , 2018 ) . However , such architectures are extremely energyintensive ( Li et al. , 2016 ) and hence require custom architectures and training methodologies for edge deployment ( Howard et al. , 2017 ) . To address this , Spiking Neural Networks ( SNNs ) have emerged as a promising alternative to traditional deep learning architectures ( Maass , 1997 ; Roy et al. , 2019 ) . SNNs are bio-plausible networks inspired from the learning mechanisms observed in mammalian brains . They are analogous in structure to standard networks , but perform computation in the form of spikes instead of fully analog values , as done in standard networks . For the rest of this paper , we refer to standard networks as Analog Neural Networks ( ANNs ) to distinguish them from their spiking counterparts with digital ( spiking ) inputs.The input and the correspondingly generated activations in SNNs are all binary spikes and inference is performed by accumulating the spikes over time . This can be visualized as distributing the one step inference of ANNs into a multi-step , very sparse inference scheme in the SNN . The primary source of energy efficiency of SNNs comes from the fact that very few neurons spike at any given timestep . This event driven computation and the replacement of every multiply–accumulate ( MAC ) operation in the ANN by an addition in SNN allows SNNs to infer with lesser energy . This energy benefit can be further enhanced using custom SNN implementations with architectural modifications ( Ju et al. , 2020 ) . ( Li et al. , 2017 ) have released a spiking version of the CIFAR-10 dataset based on inputs from neuromorphic sensors . IBM has designed a noncommercial processor ‘ TrueNorth ’ ( F. Akopyan et al. , 2015 ) , and Intel has designed its equivalent ‘ Loihi ’ ( Davies et al. , 2018 ) , that can train and infer on SNNs , and Blouw et al . ( 2019 ) have shown SNNs implemented on Loihi to be two orders of magnitude more efficient than an equivalent ANN running on GPU for keywork spotting . However , a major challenge still to be addressed is that the accumulation of spikes over timesteps results in a higher inference latency in SNNs . Energy efficiency at the cost of too high a latency would still hamper real-time deployment . Consequently , reduction of timesteps required for inference in SNNs is an active field of research . One of the factors that significantly affects the number of timesteps needed is the encoding scheme that converts pixels into spikes over the timesteps . Currently , the most common encoding scheme is Poisson spike generation ( Rueckauer et al. , 2017 ) , where the spikes at the input are generated as a Poisson spike train , with the mean spiking rate proportional to the pixel intensity . This scheme does not encode anything meaningful in the temporal axis and each timestep is the same as any other . Moreover , networks trained using this scheme suffer from high inference latency ( Rueckauer et al. , 2017 ) . Temporal coding schemes such as phase ( Kim et al. , 2018 ) or burst ( Park et al. , 2019 ) coding have been introduced to better encode temporal information into the spike trains , but they still incur high latency and require a large number of spikes for inference . Another related temporal method is time-to-first-spike ( TTFS ) coding ( Zhang et al. , 2019 ; Park et al. , 2020 ) . They limit the number of spikes per neuron but the high latency problem still persists . Relative timing of spikes to encode information has been used in Comsa et al . ( 2020 ) , but the results are only reported for simple tasks like MNIST and its scalability to deeper architectures such as VGG and more complex datasets like CIFAR remains unclear . In this paper , we propose a novel encoding scheme to convert pixels into spikes over time . The proposed scheme utilizes a block-wise matrix multiplication to decompose spatial information into a weighted sum of basis , and then reverses the transform to allow reconstruction of the input over multiple timesteps . These bases , taken one per timestep , modulated by the weights from the forward transform are then presented to the spike generating layer . The spike generator sums the contribution of all bases seen until the current timestep , as shown in Figure 1 . Though any invertible matrix can be utilized as the transform , the ideal transform follows the properties of energy compaction and orthonormality of bases as outlined in Section 3.1 . We motivate Discrete Cosine Transform ( DCT ) as the ideal choice , since it is data independent , with orthogonal bases ordered by their contribution to spectral energy . Each timestep gets the information corresponding to a single base , starting from the zero frequency component at the first timestep . Each subsequent step refines the input representation progressively . At the end of the cycle , the entire pixel value has passed through the spike generating neuron . Thus , this methodology successfully distributes the pixel value over all the timesteps in a meaningful manner . Choosing the appropriate dimensions of the transform provides a fine grained control on the number of timesteps used for inference . We use the proposed scheme to learn DCT-SNN , a spiking version of an ANN and show that it cuts down the timesteps needed to infer an image taken from CIFAR-10 , CIFAR-100 and TinyImageNet datasets from 100 to 48 , 125 to 48 and 250 to 48 , respectively , while achieving comparable accuracy to the state-ofthe-art Poisson encoded SNNs . Additionally , ordering the frequencies bases being input at each timestep provides a principled way of trading off accuracy for a reduced number of timesteps during inference , if desired , by dropping the least important ( highest frequency ) components . To summarize , the main contributions of this work are as follows , • A novel input encoding scheme for SNNs is introduced wherein each timestep of computation encodes distinct information , unlike other rate-encoding methods . • The proposed encoding scheme is used to learn DCT-SNN , which is able to infer with 2-14X lower timesteps compared to other state-of-the-art SNNs , while achieving comparable accuracy . • The proposed technique is , to the best of our knowledge , the first work that leverages frequency domain learning for SNNs on vision applications . • To the best of our knowledge , this is the first work that orders timesteps by significance to reconstruction . This provides an option to trade-off accuracy for faster inference by trimming some of the later frequency components , which is non-trivial to perform in other SNNs . 2 RELATED WORKS . Learning ANNs in the frequency domain . Successful learning for vision tasks in the frequency domain has been demonstrated in ANNs in several works . These utilize the DCT coefficients directly available from JPEG compression method ( Wallace , 1992 ) without performing the decompression steps . Conventional CNNs were used with DCT coefficients as input for image classification in Ulicny & Dahyot ( 2017 ) and Rajesh et al . ( 2019 ) . Ehrlich & Davis ( 2019 ) proposed a model conversion algorithm to apply pretrained spatial domain networks to JPEG images . Wavelet features are utilized in Williams & Li ( 2016 ) to train CNN-based classifiers . However , these methods suffer a small accuracy degradation compared to learning in spatial domain . DCT features were used effectively for large scale classification and instance segmentation tasks in Xu et al . ( 2020 ) . Although such frequency domain approaches have proved fruitful in ANNs , it is unexplored in SNNs despite the conversion of spatial bases of the image to temporal bases in the frequency domain being intuitively related to distributing the analog pixel values in ANNs to spikes over time in SNNs . There exist three prominent line of works for training SNNs , namely using spike-timing-dependent plasticity rules ( STDP ) , ANN-SNN conversion and training from scratch . While STDP-based local learning ( Diehl & Cook , 2015 ; Xu et al. , 2020 ) is more bio-plausible , scaling such algorithms beyond MNIST type of tasks has been challenging . So , the following discussion focuses mainly on conversion and backpropagation based works . ANN-SNN Conversion . The most common approach of training rate-coded deep SNNs is to first train an ANN and then convert it to an SNN for finetuning . ( Diehl et al. , 2015 ; Sengupta et al. , 2019 ; Cao et al. , 2015 ) . Usually , the ANNs are trained with some limitations to facilitate this , such as not using bias , batch-norm or average pooling layers , though some works are able to bypass these constraints ( Rueckauer et al. , 2017 ) . To convert ANNs to SNNs successfully , it is critical to adjust the threshold of Integrate-and-Fire ( IF ) / Leaky IF ( LIF ) neurons properly . The authors in Sengupta et al . ( 2019 ) recommend computing the layerwise thresholds as the maximum pre-activation of the neurons . This results in high accuracy but incurs high inference latency ( 2000-2500 timesteps ) . Alternatively , Rueckauer et al . ( 2017 ) choose a certain percentile of the pre-activation distribution as the threshold , reducing inference latency and improving robustness . The difference between these works and ours lie in the significance we attach to the timesteps . Backpropagation from Scratch and Hybrid Training . Another approach to training SNNs is learning from scratch using backpropagation , which is challenging due to the non-differentiability of the spike function at the time of spike . Surrogate gradient based optimization ( Neftci et al. , 2019 ) has been utilized to circumvent this issue and implement backpropagation in SNNs effectively ( Lee et al. , 2020 ; Huh & Sejnowski , 2018 ) . Surrogate gradient based backpropagation on the membrane potential at only a single timestep was proposed in Zenke & Ganguli ( 2018 ) . Shrestha & Orchard ( 2018 ) compute the gradients using the difference between the membrane potential and the threshold , but only demonstrate on MNIST using shallow architectures . Wu et al . ( 2018 ) perform backpropagation through time ( BPTT ) on SNNs with a surrogate gradient defined on the membrane potential as it is continuous-valued . Overall , SNNs trained with BPTT using such surrogategradients have been shown to achieve high accuracy and low latency ( ∼100-125 timesteps ) , but the training is very compute intensive compared to conversion techniques . Rathi et al . ( 2020 ) propose a combination of both methods , where a pre-trained ANN serves as initialization for subsequent surrogate gradient learning in the SNN domain . This hybrid approach improves upon conversion by reducing latency and speeding up convergence . However , this is orthogonal to the encoding scheme and can be used to improve the performance of any rate-coded scheme . In this work , we adopt the hybrid training method to train the SNNs . The key distinction of our method lies in how the pixel values are encoded over time , which is described next . 3 ENCODING SCHEME . An ideal encoding scheme to convert pixel values into spikes over time should capture relevant information in the temporal statistics of the data . Additionally , the total spike activity over all the timesteps at the input neuron should correspond to the pixel intensity . Our encoding scheme deconstructs the image into a weighted sum of basis functions . We invert this transform to reconstruct the image over time steps . Each basis function , taken one per timestep and modulated by the weights from the deconstruction is input to an Integrate-and-Fire ( IF ) neuron , which accumulates the input over timesteps and fires when accumulation crosses its threshold . | This paper proposes an encoding method based on the Discrete Cosine Transform (DCT) for Spiking Neural Network (SNN). The key idea is to decompose an image into different frequency components and feed them to the SNN sequentially. Compared to the Poisson coding method used in most SNN studies, the proposed encoding method significantly decreases the latency that the SNN needs for image classification while having minimal accuracy decease. | SP:7ded50d27f7af0a20575038f245fec224285d066 |
DCT-SNN: Using DCT to Distribute Spatial Information over Time for Learning Low-Latency Spiking Neural Networks | 1 INTRODUCTION . Deep Learning networks have tremendously improved state-of-the-art performance for many tasks such as object detection , classification and natural language processing ( Krizhevsky et al. , 2012 ; Hinton et al. , 2012 ; Deng & Liu , 2018 ) . However , such architectures are extremely energyintensive ( Li et al. , 2016 ) and hence require custom architectures and training methodologies for edge deployment ( Howard et al. , 2017 ) . To address this , Spiking Neural Networks ( SNNs ) have emerged as a promising alternative to traditional deep learning architectures ( Maass , 1997 ; Roy et al. , 2019 ) . SNNs are bio-plausible networks inspired from the learning mechanisms observed in mammalian brains . They are analogous in structure to standard networks , but perform computation in the form of spikes instead of fully analog values , as done in standard networks . For the rest of this paper , we refer to standard networks as Analog Neural Networks ( ANNs ) to distinguish them from their spiking counterparts with digital ( spiking ) inputs.The input and the correspondingly generated activations in SNNs are all binary spikes and inference is performed by accumulating the spikes over time . This can be visualized as distributing the one step inference of ANNs into a multi-step , very sparse inference scheme in the SNN . The primary source of energy efficiency of SNNs comes from the fact that very few neurons spike at any given timestep . This event driven computation and the replacement of every multiply–accumulate ( MAC ) operation in the ANN by an addition in SNN allows SNNs to infer with lesser energy . This energy benefit can be further enhanced using custom SNN implementations with architectural modifications ( Ju et al. , 2020 ) . ( Li et al. , 2017 ) have released a spiking version of the CIFAR-10 dataset based on inputs from neuromorphic sensors . IBM has designed a noncommercial processor ‘ TrueNorth ’ ( F. Akopyan et al. , 2015 ) , and Intel has designed its equivalent ‘ Loihi ’ ( Davies et al. , 2018 ) , that can train and infer on SNNs , and Blouw et al . ( 2019 ) have shown SNNs implemented on Loihi to be two orders of magnitude more efficient than an equivalent ANN running on GPU for keywork spotting . However , a major challenge still to be addressed is that the accumulation of spikes over timesteps results in a higher inference latency in SNNs . Energy efficiency at the cost of too high a latency would still hamper real-time deployment . Consequently , reduction of timesteps required for inference in SNNs is an active field of research . One of the factors that significantly affects the number of timesteps needed is the encoding scheme that converts pixels into spikes over the timesteps . Currently , the most common encoding scheme is Poisson spike generation ( Rueckauer et al. , 2017 ) , where the spikes at the input are generated as a Poisson spike train , with the mean spiking rate proportional to the pixel intensity . This scheme does not encode anything meaningful in the temporal axis and each timestep is the same as any other . Moreover , networks trained using this scheme suffer from high inference latency ( Rueckauer et al. , 2017 ) . Temporal coding schemes such as phase ( Kim et al. , 2018 ) or burst ( Park et al. , 2019 ) coding have been introduced to better encode temporal information into the spike trains , but they still incur high latency and require a large number of spikes for inference . Another related temporal method is time-to-first-spike ( TTFS ) coding ( Zhang et al. , 2019 ; Park et al. , 2020 ) . They limit the number of spikes per neuron but the high latency problem still persists . Relative timing of spikes to encode information has been used in Comsa et al . ( 2020 ) , but the results are only reported for simple tasks like MNIST and its scalability to deeper architectures such as VGG and more complex datasets like CIFAR remains unclear . In this paper , we propose a novel encoding scheme to convert pixels into spikes over time . The proposed scheme utilizes a block-wise matrix multiplication to decompose spatial information into a weighted sum of basis , and then reverses the transform to allow reconstruction of the input over multiple timesteps . These bases , taken one per timestep , modulated by the weights from the forward transform are then presented to the spike generating layer . The spike generator sums the contribution of all bases seen until the current timestep , as shown in Figure 1 . Though any invertible matrix can be utilized as the transform , the ideal transform follows the properties of energy compaction and orthonormality of bases as outlined in Section 3.1 . We motivate Discrete Cosine Transform ( DCT ) as the ideal choice , since it is data independent , with orthogonal bases ordered by their contribution to spectral energy . Each timestep gets the information corresponding to a single base , starting from the zero frequency component at the first timestep . Each subsequent step refines the input representation progressively . At the end of the cycle , the entire pixel value has passed through the spike generating neuron . Thus , this methodology successfully distributes the pixel value over all the timesteps in a meaningful manner . Choosing the appropriate dimensions of the transform provides a fine grained control on the number of timesteps used for inference . We use the proposed scheme to learn DCT-SNN , a spiking version of an ANN and show that it cuts down the timesteps needed to infer an image taken from CIFAR-10 , CIFAR-100 and TinyImageNet datasets from 100 to 48 , 125 to 48 and 250 to 48 , respectively , while achieving comparable accuracy to the state-ofthe-art Poisson encoded SNNs . Additionally , ordering the frequencies bases being input at each timestep provides a principled way of trading off accuracy for a reduced number of timesteps during inference , if desired , by dropping the least important ( highest frequency ) components . To summarize , the main contributions of this work are as follows , • A novel input encoding scheme for SNNs is introduced wherein each timestep of computation encodes distinct information , unlike other rate-encoding methods . • The proposed encoding scheme is used to learn DCT-SNN , which is able to infer with 2-14X lower timesteps compared to other state-of-the-art SNNs , while achieving comparable accuracy . • The proposed technique is , to the best of our knowledge , the first work that leverages frequency domain learning for SNNs on vision applications . • To the best of our knowledge , this is the first work that orders timesteps by significance to reconstruction . This provides an option to trade-off accuracy for faster inference by trimming some of the later frequency components , which is non-trivial to perform in other SNNs . 2 RELATED WORKS . Learning ANNs in the frequency domain . Successful learning for vision tasks in the frequency domain has been demonstrated in ANNs in several works . These utilize the DCT coefficients directly available from JPEG compression method ( Wallace , 1992 ) without performing the decompression steps . Conventional CNNs were used with DCT coefficients as input for image classification in Ulicny & Dahyot ( 2017 ) and Rajesh et al . ( 2019 ) . Ehrlich & Davis ( 2019 ) proposed a model conversion algorithm to apply pretrained spatial domain networks to JPEG images . Wavelet features are utilized in Williams & Li ( 2016 ) to train CNN-based classifiers . However , these methods suffer a small accuracy degradation compared to learning in spatial domain . DCT features were used effectively for large scale classification and instance segmentation tasks in Xu et al . ( 2020 ) . Although such frequency domain approaches have proved fruitful in ANNs , it is unexplored in SNNs despite the conversion of spatial bases of the image to temporal bases in the frequency domain being intuitively related to distributing the analog pixel values in ANNs to spikes over time in SNNs . There exist three prominent line of works for training SNNs , namely using spike-timing-dependent plasticity rules ( STDP ) , ANN-SNN conversion and training from scratch . While STDP-based local learning ( Diehl & Cook , 2015 ; Xu et al. , 2020 ) is more bio-plausible , scaling such algorithms beyond MNIST type of tasks has been challenging . So , the following discussion focuses mainly on conversion and backpropagation based works . ANN-SNN Conversion . The most common approach of training rate-coded deep SNNs is to first train an ANN and then convert it to an SNN for finetuning . ( Diehl et al. , 2015 ; Sengupta et al. , 2019 ; Cao et al. , 2015 ) . Usually , the ANNs are trained with some limitations to facilitate this , such as not using bias , batch-norm or average pooling layers , though some works are able to bypass these constraints ( Rueckauer et al. , 2017 ) . To convert ANNs to SNNs successfully , it is critical to adjust the threshold of Integrate-and-Fire ( IF ) / Leaky IF ( LIF ) neurons properly . The authors in Sengupta et al . ( 2019 ) recommend computing the layerwise thresholds as the maximum pre-activation of the neurons . This results in high accuracy but incurs high inference latency ( 2000-2500 timesteps ) . Alternatively , Rueckauer et al . ( 2017 ) choose a certain percentile of the pre-activation distribution as the threshold , reducing inference latency and improving robustness . The difference between these works and ours lie in the significance we attach to the timesteps . Backpropagation from Scratch and Hybrid Training . Another approach to training SNNs is learning from scratch using backpropagation , which is challenging due to the non-differentiability of the spike function at the time of spike . Surrogate gradient based optimization ( Neftci et al. , 2019 ) has been utilized to circumvent this issue and implement backpropagation in SNNs effectively ( Lee et al. , 2020 ; Huh & Sejnowski , 2018 ) . Surrogate gradient based backpropagation on the membrane potential at only a single timestep was proposed in Zenke & Ganguli ( 2018 ) . Shrestha & Orchard ( 2018 ) compute the gradients using the difference between the membrane potential and the threshold , but only demonstrate on MNIST using shallow architectures . Wu et al . ( 2018 ) perform backpropagation through time ( BPTT ) on SNNs with a surrogate gradient defined on the membrane potential as it is continuous-valued . Overall , SNNs trained with BPTT using such surrogategradients have been shown to achieve high accuracy and low latency ( ∼100-125 timesteps ) , but the training is very compute intensive compared to conversion techniques . Rathi et al . ( 2020 ) propose a combination of both methods , where a pre-trained ANN serves as initialization for subsequent surrogate gradient learning in the SNN domain . This hybrid approach improves upon conversion by reducing latency and speeding up convergence . However , this is orthogonal to the encoding scheme and can be used to improve the performance of any rate-coded scheme . In this work , we adopt the hybrid training method to train the SNNs . The key distinction of our method lies in how the pixel values are encoded over time , which is described next . 3 ENCODING SCHEME . An ideal encoding scheme to convert pixel values into spikes over time should capture relevant information in the temporal statistics of the data . Additionally , the total spike activity over all the timesteps at the input neuron should correspond to the pixel intensity . Our encoding scheme deconstructs the image into a weighted sum of basis functions . We invert this transform to reconstruct the image over time steps . Each basis function , taken one per timestep and modulated by the weights from the deconstruction is input to an Integrate-and-Fire ( IF ) neuron , which accumulates the input over timesteps and fires when accumulation crosses its threshold . | The scheme proposed breaks down the information in a block of an image into orthogonal basis functions (DCT is used) to make a progressively better reconstruction of the original image block with the addition of more basis functions used (like an nth order Taylor expansion). The increasing spatial frequency components are known to be perceptually less sensitive (they need to include this) in images, so the low freq components can be presented first. Each freq component is encoded into spikes sequentially, thereby staging the more perceptually important information first, with less important info coming later. This reorders the presentation of information to allow a tradeoff of image quality with time/latency. | SP:7ded50d27f7af0a20575038f245fec224285d066 |
Individually Fair Gradient Boosting | 1 INTRODUCTION . In light of the ubiquity of machine learning ( ML ) methods in high-stakes decision-making and support roles , there is concern about ML models reproducing or even exacerbating the historical biases against certain groups of users . These concerns are valid : there are recent incidents in which algorithmic bias has led to dire consequences . For example , Amazon recently discovered its ML-based resume screening system discriminates against women applying for technical positions ( Dastin , 2018 ) . In response , the ML community has proposed a myriad of formal definitions of algorithmic fairness . Broadly speaking , there are two types of fairness definitions : group fairness and individual fairness ( Chouldechova & Roth , 2018 ) . In this paper , we focus on enforcing individual fairness . At a highlevel , the idea of individual fairness is the requirement that a fair algorithm should treat similar individuals similarly . For a while , individual fairness was overlooked in favor of group fairness because there is often no consensus on which users are similar for many ML tasks . Fortunately , there is a flurry of recent work that addresses this issue ( Ilvento , 2019 ; Wang et al. , 2019 ; Yurochkin et al. , 2020 ; Mukherjee et al. , 2020a ) . In this paper , we assume there is a fair metric for the ML task at hand and consider the task of individually fair gradient boosting . Gradient boosting , especially gradient boosted decision trees ( GBDT ) , is a popular method for tabular data problems ( Chen & Guestrin , 2016 ) . Unfortunately , existing approaches to enforcing individual fairness are either not suitable for training non-smooth ML models ( Yurochkin et al. , 2020 ) or perform poorly with flexible non-parametric ML models . We aim to fill this gap in the literature . Our main contributions are : 1 . We develop a method to enforce individual fairness in gradient boosting . Unlike other methods for enforcing individually fairness , our approach handles non-smooth ML models such as ( boosted ) decision trees . 2 . We show that the method converges globally and leads to ML models that are individually fair . We also show that it is possible to certify the individual fairness of the models a posteriori . 3 . We show empirically that our method preserves the accuracy of gradient boosting while improving widely used group and individual fairness metrics . 2 ENFORCING INDIVIDUAL FAIRNESS IN GRADIENT BOOSTING . Consider a supervised learning problem . Let X ⊂ Rd be the input space and Y be the output space . To keep things simple , we assume Y = { 0 , 1 } , but our method readily extends to multi-class classification problems . Define Z = X × { 0 , 1 } . We equip X with a fair metric dx that measures the similarity between inputs . The fair metric is application specific , and we refer to the literature on fair metric learning ( Ilvento , 2019 ; Wang et al. , 2019 ; Yurochkin et al. , 2020 ) for ways of picking the fair metric . Our goal is to learn an ML model f : X → { 0 , 1 } that is individually fair . Formally , we enforce distributionally robust fairness ( Yurochkin et al. , 2020 ) , which asserts that an ML model has similar accuracy/performance ( measured by the loss function ) on similar samples ( see Definition 2.1 ) . One way to accomplish this is adversarial training ( Yurochkin et al. , 2020 ; Yurochkin & Sun , 2020 ) . Unfortunately , adversarial training relies on the smoothness of the model ( with respect to the inputs ) , so it can not handle non-smooth ML models ( e.g . decision trees ) . We address this issue by considering a restricted adversarial cost function that only searches over the training examples ( instead of the entire input space ) for similar examples that reveal violations of individual fairness . As we shall see , this restricted adversarial cost function is amenable to functional gradient descent , which allows us to develop a gradient boosting algorithm . 2.1 ENFORCING INDIVIDUAL FAIRNESS WITH A RESTRICTED ADVERSARIAL COST FUNCTION . We first review how to train individually fair ML models with adversarial training ( see Yurochkin et al . ( 2020 ) for more details ) to set up notation and provide intuition on how adversarial training leads to individual fairness . Let F be a set of ML models , let ` : Y × Y → R be a smooth loss function ( see Section 3 for concrete assumptions on ` ) that measures the performance of an ML model , and let D = { ( xi , yi ) } ni=1 be a set of training data . Define the transport cost function c ( ( x1 , y1 ) , ( x2 , y2 ) ) , d 2 x ( x1 , x2 ) +∞ · 1 { y1 6=y2 } . ( 2.1 ) We see that c ( ( x1 , y1 ) , ( x2 , y2 ) ) is small iff x1 and x2 are similar ( in the fair metric dx ) and y1 = y2 . In other words , c is small iff two similar examples are assigned the same output . Define the optimal transport distance W ( with transport cost c ) on probability distributions on Z : W ( P1 , P2 ) , infΠ∈C ( P1 , P2 ) ∫ Z×Z c ( z1 , z2 ) dΠ ( z1 , z2 ) , where C ( P1 , P2 ) is the set of couplings between P1 and P2 ( distributions on Z ×Z whose marginals are P1 and P2 ) . This optimal transport distance lifts the fair metric on ( points in ) the sample space to distributions on the sample space . Two distributions are close in this optimal transport distance iff they assign mass to similar areas of the sample space Z . Finally , define the adversarial risk function Lr ( f ) , supP : W ( P , P∗ ) ≤ EP [ ` ( f ( X ) , Y ) ] , ( 2.2 ) where P∗ is the data generating distribution and > 0 is a small tolerance parameter . The adversarial risk function looks for distributions on the sample space that ( i ) are similar to the data generating distribution and ( ii ) increases the risk of the ML model f . This reveals differential performance of the ML model on similar samples . This search for differential performance is captured by the notion of distributionally robust fairness : Definition 2.1 ( distributionally robust fairness ( DRF ) ( Yurochkin et al. , 2020 ) ) . An ML model h : X → Y is ( , δ ) -distributionally robustly fair ( DRF ) WRT the fair metric dx iff supP : W ( P , Pn ) ≤ ∫ Z ` ( z , h ) dP ( z ) ≤ δ . ( 2.3 ) In light of the preceding developments , a natural cost function for training individually fair ML models is the adversarial cost function : Le ( f ) , supP : W ( P , Pn ) ≤ EP [ ` ( f ( X ) , Y ) ] , ( 2.4 ) where Pn is the empirical distribution of the training data . This is the empirical counterpart of ( 2.2 ) , and it works well for training smooth ML models ( Yurochkin et al. , 2020 ) . Unfortunately , ( 2.4 ) is hard to evaluate for non-smooth ML models : it is defined as the optimal value of an optimization problem , but the gradient ∂x ` ( f ( x ) , y ) is not available because the ML model f is non-smooth . To circumvent this issue , we augment the support of the training set and restrict the supremum in ( 2.4 ) to the augmented support . Define the augmented support set D0 , { ( xi , yi ) , ( xi , 1− yi ) } ni=1 and the restricted optimal transport distance WD between distributions supported on D0 : WD ( P1 , P2 ) , infΠ∈C0 ( P1 , P2 ) ∫ Z×Z c ( z1 , z2 ) dΠ ( z1 , z2 ) , where C0 ( P1 , P2 ) is the set of distributions supported on D0 ×D0 whose marginals are P1 and P2 . We consider the restricted adversarial cost function L ( f ) , supP : WD ( P , Pn ) ≤ EP [ ` ( f ( X ) , Y ) ] , ( 2.5 ) where > 0 is a small tolerance parameter . The interpretation of ( 2.5 ) is identical to that of ( 2.4 ) : it searches for perturbations to the training examples that reveal differential performance in the ML model . On the other hand , compared to ( 2.4 ) , the supremum in ( 2.5 ) is restricted to distributions supported on D0 . This allows us to evaluate ( 2.5 ) by solving a ( finite-dimensional ) linear program ( LP ) . As we shall see , this LP depends only on the loss values ` ( f ( xi ) , yi ) and ` ( f ( xi ) , 1− yi ) , so it is possible to solve the LP efficiently even if the ML model f is non-smooth . This is the key idea in this paper . Before delving into the details , we note that the main drawback of restricting the search to distributions supported on D0 is reduced power to detect differential performance . If the ML model exhibits differential performance between two ( similar ) areas of the input space but only one area is represented in the training set , then ( 2.4 ) will detect differential performance but ( 2.5 ) will not . Augmenting the support set with the points { ( xi , 1 − yi ) } ni=1 partially alleviates this issue ( but the power remains reduced compared to ( 2.4 ) ) . This is the price we pay for the broader applicability of ( 2.5 ) . 2.2 FUNCTIONAL GRADIENT DESCENT ON THE RESTRICTED ADVERSARIAL COST FUNCTION . Gradient boosting is functional gradient descent ( Friedman , 2001 ) , so a key step in gradient boosting is evaluating ∂L∂ŷ , where the components of ŷ ∈ R n are ŷi , f ( xi ) . By Danskin ’ s theorem , we have ∂L ∂ŷi = ∂∂f ( xi ) [ supP : WD ( P , Pn ) ≤ EP [ ` ( f ( xi ) , yi ) ] ] = ∑ y∈Y ∂ ∂f ( xi ) [ ` ( f ( xi ) , y ) ) ] P ∗ ( xi , y ) , ( 2.6 ) where P ∗ is a distribution that attains the supremum in ( 2.5 ) . We note that there is no need to differentiate through the ML model f in ( 2.6 ) , so it is possible to evaluate the functional gradient for non-smooth ML models . It remains to find P ∗ . We devise a way of finding P ∗ by solving a linear program . We start with a simplifying observation : if c ( zi , zj ) = ∞ for any zi ∈ D0 and zj ∈ D , then any weight at zj can not be transported to zi . Thus , we will only focus on the pairs ( zi , zj ) ∈ D0×D with c ( zi , zj ) < ∞ . Let C ∈ Rn×n be the matrix with entries given by Ci , j = c ( ( xi , yj ) , ( xj , yj ) ) = d2x ( xi , xj ) . We also define the class indicator vectors y 1 , y0 ∈ { 0 , 1 } n by y1j = { 1 : yj = 1 0 : yj = 0 and y0 = 1n − y1 . ( 2.7 ) For any distribution P on D0 , let Pi , k = P ( { ( xi , k ) } ) for k ∈ { 0 , 1 } . Then , the condition that WD ( P , Pn ) ≤ is implied by the existence of a matrix Π such that 1 . Π ∈ Γ with Γ = { Π|Π ∈ Rn×n+ , 〈C , Π〉 ≤ , ΠT · 1n = 1n1n } . 2 . Π · y1 = ( P1,1 , . . . , Pn,1 ) , and Π · y0 = ( P1,0 , . . . , Pn,0 ) . Further define the matrix R ∈ Rn×n by Rij = ` ( f ( xi ) , yj ) - this is the loss incurred if point j with label yj is transported to point i . With this setup , given the current predictor f , we can obtain a solution Π∗ to the optimization as the solution to the linear program ( in n2 variables ) Π∗ ∈ arg max Π∈Γ 〈R , Π〉 . ( 2.8 ) Then the optimal distribution P ∗ on D0 is given by P ∗ ( { ( xi , k ) } ) = ( Π∗ · yk ) i . An outline of the full gradient boosting procedure is provided in Algorithm 1 . It is important to note that we have made no assumptions about the class of candidate predictors F in finding the optimal transport map Π∗ in ( 2.8 ) . In particular , F can contain discontinuous functions - for example , decision trees or sums of decision trees . This allows us to apply this fair gradient boosting algorithm to any class F of base classifiers . Algorithm 1 Fair gradient boosting 1 : Input : Labeled training data { ( xi , yi ) } ni=1 ; class of weak learnersH ; initial predictor f0 ; search radius ; number of steps T ; sequence of step sizes α ( t ) ; fair metric dx on X 2 : Define the matrix C by Ci , j ← d2x ( xi , xj ) . 3 : for t = 0 , 1 , . . . , T − 1 do 4 : Define the matrix Rt by ( Rt ) ij = ` ( ft ( xi ) , yj ) 5 : Find Π∗t ∈ arg maxΠ∈Γ 〈Rt , Π〉 ; and set Pt+1 ( xi , k ) ← ( Π∗t · yk ) i 6 : Fit a base learner ht ∈ H to the set of pseudo-residuals { ∂L∂ft ( xi ) } n i=1 ( see ( 2.6 ) ) . 7 : Let ft+1 = ft + αtht . 8 : end for 9 : return fT | The authors presented in the submission a thorough study on enforcing the aggregated individual fairness with non-differentiable ML models. The proposed method generates individually fair and robust ML models in a minimax fashion among all possible samples that are close to the true distribution w.r.t. a given fair metric. They introduce the augmented support and transfer the standard gradient descent to a gradient descent in the functional space anchored by the augmented support to optimize the adversarial risk function with non-smooth ML models, e.g. decision trees. Solid theoretical guarantees and convincing empirical study results are provided to support their claims. The paper is highly completed, well-structured (though a bit dense given the page limit) and well-written - a clear accept. | SP:0a53cecba6b2eda47d14aacdd8e9873c8c1cce5b |
Individually Fair Gradient Boosting | 1 INTRODUCTION . In light of the ubiquity of machine learning ( ML ) methods in high-stakes decision-making and support roles , there is concern about ML models reproducing or even exacerbating the historical biases against certain groups of users . These concerns are valid : there are recent incidents in which algorithmic bias has led to dire consequences . For example , Amazon recently discovered its ML-based resume screening system discriminates against women applying for technical positions ( Dastin , 2018 ) . In response , the ML community has proposed a myriad of formal definitions of algorithmic fairness . Broadly speaking , there are two types of fairness definitions : group fairness and individual fairness ( Chouldechova & Roth , 2018 ) . In this paper , we focus on enforcing individual fairness . At a highlevel , the idea of individual fairness is the requirement that a fair algorithm should treat similar individuals similarly . For a while , individual fairness was overlooked in favor of group fairness because there is often no consensus on which users are similar for many ML tasks . Fortunately , there is a flurry of recent work that addresses this issue ( Ilvento , 2019 ; Wang et al. , 2019 ; Yurochkin et al. , 2020 ; Mukherjee et al. , 2020a ) . In this paper , we assume there is a fair metric for the ML task at hand and consider the task of individually fair gradient boosting . Gradient boosting , especially gradient boosted decision trees ( GBDT ) , is a popular method for tabular data problems ( Chen & Guestrin , 2016 ) . Unfortunately , existing approaches to enforcing individual fairness are either not suitable for training non-smooth ML models ( Yurochkin et al. , 2020 ) or perform poorly with flexible non-parametric ML models . We aim to fill this gap in the literature . Our main contributions are : 1 . We develop a method to enforce individual fairness in gradient boosting . Unlike other methods for enforcing individually fairness , our approach handles non-smooth ML models such as ( boosted ) decision trees . 2 . We show that the method converges globally and leads to ML models that are individually fair . We also show that it is possible to certify the individual fairness of the models a posteriori . 3 . We show empirically that our method preserves the accuracy of gradient boosting while improving widely used group and individual fairness metrics . 2 ENFORCING INDIVIDUAL FAIRNESS IN GRADIENT BOOSTING . Consider a supervised learning problem . Let X ⊂ Rd be the input space and Y be the output space . To keep things simple , we assume Y = { 0 , 1 } , but our method readily extends to multi-class classification problems . Define Z = X × { 0 , 1 } . We equip X with a fair metric dx that measures the similarity between inputs . The fair metric is application specific , and we refer to the literature on fair metric learning ( Ilvento , 2019 ; Wang et al. , 2019 ; Yurochkin et al. , 2020 ) for ways of picking the fair metric . Our goal is to learn an ML model f : X → { 0 , 1 } that is individually fair . Formally , we enforce distributionally robust fairness ( Yurochkin et al. , 2020 ) , which asserts that an ML model has similar accuracy/performance ( measured by the loss function ) on similar samples ( see Definition 2.1 ) . One way to accomplish this is adversarial training ( Yurochkin et al. , 2020 ; Yurochkin & Sun , 2020 ) . Unfortunately , adversarial training relies on the smoothness of the model ( with respect to the inputs ) , so it can not handle non-smooth ML models ( e.g . decision trees ) . We address this issue by considering a restricted adversarial cost function that only searches over the training examples ( instead of the entire input space ) for similar examples that reveal violations of individual fairness . As we shall see , this restricted adversarial cost function is amenable to functional gradient descent , which allows us to develop a gradient boosting algorithm . 2.1 ENFORCING INDIVIDUAL FAIRNESS WITH A RESTRICTED ADVERSARIAL COST FUNCTION . We first review how to train individually fair ML models with adversarial training ( see Yurochkin et al . ( 2020 ) for more details ) to set up notation and provide intuition on how adversarial training leads to individual fairness . Let F be a set of ML models , let ` : Y × Y → R be a smooth loss function ( see Section 3 for concrete assumptions on ` ) that measures the performance of an ML model , and let D = { ( xi , yi ) } ni=1 be a set of training data . Define the transport cost function c ( ( x1 , y1 ) , ( x2 , y2 ) ) , d 2 x ( x1 , x2 ) +∞ · 1 { y1 6=y2 } . ( 2.1 ) We see that c ( ( x1 , y1 ) , ( x2 , y2 ) ) is small iff x1 and x2 are similar ( in the fair metric dx ) and y1 = y2 . In other words , c is small iff two similar examples are assigned the same output . Define the optimal transport distance W ( with transport cost c ) on probability distributions on Z : W ( P1 , P2 ) , infΠ∈C ( P1 , P2 ) ∫ Z×Z c ( z1 , z2 ) dΠ ( z1 , z2 ) , where C ( P1 , P2 ) is the set of couplings between P1 and P2 ( distributions on Z ×Z whose marginals are P1 and P2 ) . This optimal transport distance lifts the fair metric on ( points in ) the sample space to distributions on the sample space . Two distributions are close in this optimal transport distance iff they assign mass to similar areas of the sample space Z . Finally , define the adversarial risk function Lr ( f ) , supP : W ( P , P∗ ) ≤ EP [ ` ( f ( X ) , Y ) ] , ( 2.2 ) where P∗ is the data generating distribution and > 0 is a small tolerance parameter . The adversarial risk function looks for distributions on the sample space that ( i ) are similar to the data generating distribution and ( ii ) increases the risk of the ML model f . This reveals differential performance of the ML model on similar samples . This search for differential performance is captured by the notion of distributionally robust fairness : Definition 2.1 ( distributionally robust fairness ( DRF ) ( Yurochkin et al. , 2020 ) ) . An ML model h : X → Y is ( , δ ) -distributionally robustly fair ( DRF ) WRT the fair metric dx iff supP : W ( P , Pn ) ≤ ∫ Z ` ( z , h ) dP ( z ) ≤ δ . ( 2.3 ) In light of the preceding developments , a natural cost function for training individually fair ML models is the adversarial cost function : Le ( f ) , supP : W ( P , Pn ) ≤ EP [ ` ( f ( X ) , Y ) ] , ( 2.4 ) where Pn is the empirical distribution of the training data . This is the empirical counterpart of ( 2.2 ) , and it works well for training smooth ML models ( Yurochkin et al. , 2020 ) . Unfortunately , ( 2.4 ) is hard to evaluate for non-smooth ML models : it is defined as the optimal value of an optimization problem , but the gradient ∂x ` ( f ( x ) , y ) is not available because the ML model f is non-smooth . To circumvent this issue , we augment the support of the training set and restrict the supremum in ( 2.4 ) to the augmented support . Define the augmented support set D0 , { ( xi , yi ) , ( xi , 1− yi ) } ni=1 and the restricted optimal transport distance WD between distributions supported on D0 : WD ( P1 , P2 ) , infΠ∈C0 ( P1 , P2 ) ∫ Z×Z c ( z1 , z2 ) dΠ ( z1 , z2 ) , where C0 ( P1 , P2 ) is the set of distributions supported on D0 ×D0 whose marginals are P1 and P2 . We consider the restricted adversarial cost function L ( f ) , supP : WD ( P , Pn ) ≤ EP [ ` ( f ( X ) , Y ) ] , ( 2.5 ) where > 0 is a small tolerance parameter . The interpretation of ( 2.5 ) is identical to that of ( 2.4 ) : it searches for perturbations to the training examples that reveal differential performance in the ML model . On the other hand , compared to ( 2.4 ) , the supremum in ( 2.5 ) is restricted to distributions supported on D0 . This allows us to evaluate ( 2.5 ) by solving a ( finite-dimensional ) linear program ( LP ) . As we shall see , this LP depends only on the loss values ` ( f ( xi ) , yi ) and ` ( f ( xi ) , 1− yi ) , so it is possible to solve the LP efficiently even if the ML model f is non-smooth . This is the key idea in this paper . Before delving into the details , we note that the main drawback of restricting the search to distributions supported on D0 is reduced power to detect differential performance . If the ML model exhibits differential performance between two ( similar ) areas of the input space but only one area is represented in the training set , then ( 2.4 ) will detect differential performance but ( 2.5 ) will not . Augmenting the support set with the points { ( xi , 1 − yi ) } ni=1 partially alleviates this issue ( but the power remains reduced compared to ( 2.4 ) ) . This is the price we pay for the broader applicability of ( 2.5 ) . 2.2 FUNCTIONAL GRADIENT DESCENT ON THE RESTRICTED ADVERSARIAL COST FUNCTION . Gradient boosting is functional gradient descent ( Friedman , 2001 ) , so a key step in gradient boosting is evaluating ∂L∂ŷ , where the components of ŷ ∈ R n are ŷi , f ( xi ) . By Danskin ’ s theorem , we have ∂L ∂ŷi = ∂∂f ( xi ) [ supP : WD ( P , Pn ) ≤ EP [ ` ( f ( xi ) , yi ) ] ] = ∑ y∈Y ∂ ∂f ( xi ) [ ` ( f ( xi ) , y ) ) ] P ∗ ( xi , y ) , ( 2.6 ) where P ∗ is a distribution that attains the supremum in ( 2.5 ) . We note that there is no need to differentiate through the ML model f in ( 2.6 ) , so it is possible to evaluate the functional gradient for non-smooth ML models . It remains to find P ∗ . We devise a way of finding P ∗ by solving a linear program . We start with a simplifying observation : if c ( zi , zj ) = ∞ for any zi ∈ D0 and zj ∈ D , then any weight at zj can not be transported to zi . Thus , we will only focus on the pairs ( zi , zj ) ∈ D0×D with c ( zi , zj ) < ∞ . Let C ∈ Rn×n be the matrix with entries given by Ci , j = c ( ( xi , yj ) , ( xj , yj ) ) = d2x ( xi , xj ) . We also define the class indicator vectors y 1 , y0 ∈ { 0 , 1 } n by y1j = { 1 : yj = 1 0 : yj = 0 and y0 = 1n − y1 . ( 2.7 ) For any distribution P on D0 , let Pi , k = P ( { ( xi , k ) } ) for k ∈ { 0 , 1 } . Then , the condition that WD ( P , Pn ) ≤ is implied by the existence of a matrix Π such that 1 . Π ∈ Γ with Γ = { Π|Π ∈ Rn×n+ , 〈C , Π〉 ≤ , ΠT · 1n = 1n1n } . 2 . Π · y1 = ( P1,1 , . . . , Pn,1 ) , and Π · y0 = ( P1,0 , . . . , Pn,0 ) . Further define the matrix R ∈ Rn×n by Rij = ` ( f ( xi ) , yj ) - this is the loss incurred if point j with label yj is transported to point i . With this setup , given the current predictor f , we can obtain a solution Π∗ to the optimization as the solution to the linear program ( in n2 variables ) Π∗ ∈ arg max Π∈Γ 〈R , Π〉 . ( 2.8 ) Then the optimal distribution P ∗ on D0 is given by P ∗ ( { ( xi , k ) } ) = ( Π∗ · yk ) i . An outline of the full gradient boosting procedure is provided in Algorithm 1 . It is important to note that we have made no assumptions about the class of candidate predictors F in finding the optimal transport map Π∗ in ( 2.8 ) . In particular , F can contain discontinuous functions - for example , decision trees or sums of decision trees . This allows us to apply this fair gradient boosting algorithm to any class F of base classifiers . Algorithm 1 Fair gradient boosting 1 : Input : Labeled training data { ( xi , yi ) } ni=1 ; class of weak learnersH ; initial predictor f0 ; search radius ; number of steps T ; sequence of step sizes α ( t ) ; fair metric dx on X 2 : Define the matrix C by Ci , j ← d2x ( xi , xj ) . 3 : for t = 0 , 1 , . . . , T − 1 do 4 : Define the matrix Rt by ( Rt ) ij = ` ( ft ( xi ) , yj ) 5 : Find Π∗t ∈ arg maxΠ∈Γ 〈Rt , Π〉 ; and set Pt+1 ( xi , k ) ← ( Π∗t · yk ) i 6 : Fit a base learner ht ∈ H to the set of pseudo-residuals { ∂L∂ft ( xi ) } n i=1 ( see ( 2.6 ) ) . 7 : Let ft+1 = ft + αtht . 8 : end for 9 : return fT | This paper proposes a non-smooth method to enforce individual fairness in gradient boosting. To deal with the non-smoothness of the model, it restricts the optimal transport distance to that defined on an augmented training support set and thus reduces the search of a worst-case distribution to solving an LP problem, where an approximate solution can be found efficiently by SGD on the dual space. The authors provide convergence and generalization properties of the algorithm, and demonstrate its improvement of group and individual fairness metrics in several numerical experiments. | SP:0a53cecba6b2eda47d14aacdd8e9873c8c1cce5b |
Fold2Seq: A Joint Sequence(1D)-Fold(3D) Embedding-based Generative Model for Protein Design | 1 INTRODUCTION . Computational protein design is the conceptual inverse of the protein structure prediction problem , and aims to infer an amino acid sequence that will fold into a given 3D structure . Designing protein sequences that will fold into a desired structure has a broad range of applications , from therapeutics to materials ( Kraemer-Pecore et al. , 2001 ) . Despite significant advancements in methodologies as well as in computing power , inverse protein design still remains challenging , primarily due to the vast size of the sequence space - and the difficulty of learning a function that maps from the 3D structure space to the sequence space . Earlier works rely mostly on energy minimization-based approaches ( Koga et al. , 2012 ; Rocklin et al. , 2017 ; Huang et al. , 2011 ) , which follow a scoring function ( force fields , statistical potentials , or machine learning ( ML ) models , ) and sample both sequence and conformational space . Such methods often suffer from drawbacks such as low accuracy of energy functions or force-fields ( Khan & Vihinen , 2010 ) and low efficiency in sequence and conformational search ( Koga et al. , 2012 ) . Recently , as the data on both protein sequences ( hundreds of millions ) and structures ( a few hundreds of thousands ) is quickly accumulating , data-driven approaches for inverse protein design are rapidly emerging ( Greener et al. , 2018 ; Karimi et al. , 2020 ; Ingraham et al. , 2019 ) . Generally , data-driven protein design , attempts to model the probability distribution over sequences conditioned on the structures : P ( x|y ) , where x and y are protein sequences and structures , respectively . Two key challenges remain : ( 1 ) defining a good representation ( y ) of the protein structure and ( 2 ) modelling the sequence generation process conditioned on y . Current protein design methods use protein backbone information from a single protein structure ( fixed backbone ) or from a set of backbone structures consistent with a single fold ( flexible backbone ) . In earlier studies , the protein structures are represented as a 1D string ( Greener et al. , 2018 ) , a 1D vector ( Karimi et al. , 2020 ) , a 2D image ( Strokach et al. , 2020 ) , or a graph ( Ingraham et al. , 2019 ) . The sequence generation methods used in the protein design studies can be classified as non-autoregressive ( Karimi et al. , 2020 ; Greener et al. , 2018 ; Strokach et al. , 2020 ) and autoregeressive ( Ingraham et al. , 2019 ; Madani et al. , 2020 ) . In non-autoregerssive methods , y is usually concatenated with a Gaussian random noise z ( which is the latent vector of the sequence ) please check here to be the input to a sequence generator P ( x|y ) = fg ( y , z ) , while in autoregressive methods , P ( x|y ) is decomposed through the chain rule : P ( x|y ) =∏n i=1 P ( xi|x1 , x2 , ... , xi−1 , y ) , where x = ( x1 , x2 , ... , xn ) . In this paper , we focus on designing sequences conditioned on a protein fold . A protein fold is defined as the arrangement ( or topology ) of the secondary structure elements of the protein relative to each other ( Hou et al. , 2003 ) . A secondary structural element can be defined as the three dimensional form of local segments of a protein sequence . Protein folds are therefore necessarily based on sets of structural elements that distinguish domains . As protein structure is inherently hierarchical , the complete native structure can have multiple folds and a fold can be present in many protein structures . A single structure ( fixed backbone ) or an ensemble of structures ( flexible backbone ) can be used as representatives of a fold . The ensemble representation is often a better choice , as it captures the protein dynamics . Despite the recent progress in using ML models for protein design , significant gaps still remain in addressing both aforementioned challenges ( fold representation and conditional sequence generation ) . First , the current fold representation methods are either hand-designed , or constrained and do not capture the complete original fold space ( See Sec . 2.2 for details ) , resulting in low generalization capacity or efficiency . Second , the sequence encoding and the fold encoding are learned separately in previous methods , which makes two latent domains heterogeneous . Such heterogeneity across two domains actually increases the difficulty of learning the complex sequence–fold relationship . To fill the aforementioned gaps , the main contributions of this work are as follows : • We propose a novel fold representation , through first representing the 3D structure by the voxels of the density of secondary structures elements ( SSEs ) , and then learning the fold representation through a transformer-based structure encoder . Compared to previous fold representations , this representation has several advantages : first , it preserves the entire spatial information of SSEs . Second , it does not need any pre-defined rules , so that the paramterized fold space is not neither limited or biased toward any particular fold . Third , the representation can be automatically extracted from a given protein structure . Lastly , the density model also loosens the rigidity of structures so that the structural variation and lack of structural information of the protein is better handled . • We employ a novel joint sequence-fold embedding learning framework into the transformer-based auto-encoder model . By learning a joint latent space between sequences and folds , our model , Fold2Seq , mitigates the heterogeneity between two different domains and is able to better capture the sequence-fold relationship , as reflected in the results . • Experiments on standard test sets demonstrate that Fold2Seq has superior performance on perplexity , native sequence recovery rate , and native structure recovery accuracy , when compared to competing methods including the state-of-the-art RosettaDesign and other neural net models . Ablation study shows that this superior performance is directly attributed to our algorithmic innovations . Experiments on real-world test sets further demonstrates the unique practical utility and versatility of Fold2Seq compared to the structure-based baselines . 2 RELATED WORK . Data-driven Protein Design A significant surge of protein design studies that deeply exploit the data through modern artificial intelligence algorithms has been witnessed in the last two years . Greener et al . ( 2018 ) used the conditional variational autoencoder for generating protein sequences conditioned on a given fold . Karimi et al . ( 2020 ) developed a guided conditional Wasserstein Generative Adversarial Networks ( gcWGAN ) also for inverse fold design . Madani et al . ( 2020 ) trained an extreme large ( 1.2B parameters ) language model conditioned on taxonomic and keyword tags such as molecular functions for generating protein sequences . Ingraham et al . ( 2019 ) developed a graph-based transformer for generating protein sequences conditioned on a fixed backbone . Lastly , Strokach et al . ( 2020 ) formulated the inverse protein design as a constraint satisfaction problem ( CSP ) and applied the graph neural networks for generating protein sequences conditioned on the residue-residue distance map that is a static representation of the structure . Protein Fold Representation For an extensive overview of molecular representations , including those of proteins , please see David et al . ( 2020 ) . Murzin et al . ( 1995 ) and Orengo et al . ( 1997 ) manually classified protein structures in a hierarchical manner based on their structural similarity . These classifications can be regarded as one-hot encoding of the fold representations . Taylor ( 2002 ) represents a protein fold using a “ periodic table ” . This representation was later used for inverse fold design ( Greener et al. , 2018 ) . However , it only considers three pre-defined folds ( ( layer , layer and barrel ) for a set of structures , which significantly limits the spatial information content of the fold . Hou et al . ( 2003 ) chose hundreds of representative proteins and calculated the similarity scores among them . This similarity matrix was then used for kernel Principle Component Analysis ( kPCA ) . A similar idea was used in Karimi et al . ( 2020 ) for inverse protein design . This representation needs a pre-defined set ( ( alpha only , beta only , and alpha+beta ) of structures along with a similarity metric . Such representation could lead to biased or constrained representations of the fold space and also may not preserve the detailed spatial information of the fold . Finally , Koga et al . ( 2012 ) summarized three rules that describe the junctions between adjacent secondary structure elements for a specific fold . Again , these rules are hand designed for a subset of structures , which makes the representation restricted to a small part of the fold space and offers limited generalizability during conditional sequence generation . Joint Embedding Learning Joint embedding learning across multiple different data modalities was first proposed by Ngiam et al . ( 2011 ) on audio and video signals . Since then , such approaches have been then widely used in cross modal retrieval or captioning tasks ( Arandjelovic & Zisserman , 2018 ; Gu et al. , 2018 ; Peng & Qi , 2019 ; Chen et al. , 2018 ; Wang et al. , 2013 ; Dognin et al. , 2019 ) . In few/zero-shot learning , joint feature-label embedding was used for predicting the label of instances belonging to unseen classes ( Zhang & Saligrama , 2016 ; Socher et al. , 2013 ) . Several papers have demonstrated that learning joint embedding is useful for the single modal classification tasks ( Ngiam et al. , 2011 ; Wang et al. , 2018 ; Toutanova et al. , 2015 ) . Moreover , Chen et al . ( 2018 ) used joint embedding learning for text to shape generation . Lastly , Joint sequence-label embedding is also applied for molecular prediction/generation ( Cao & Shen , 2020 ; Das et al. , 2018 ) . 3 METHODS . 3.1 BACKGROUND AND NOTATION . A protein is formed by a linear chain of amino acids ( residues ) that defines its 1D sequence . Chemical nature , as well as physical and chemical interactions with neighboring residues drive the folding of a sequence into different secondary structure elements or SSEs ( helix , beta-sheet , loop , etc. , see Fig 1 ( a ) ) , that eventually forms a complete native 3D structure . A protein fold captures the topology and the composition of secondary structure elements , thus serving as an intermediate between the 1D sequence and the full 3D structure . 3.2 STRUCTURE REPRESENTATION THROUGH 3D VOXELS OF THE DENSITY OF SSES . In this subsection , we describe how we represent the 3D structure to explicitly capture the fold information . We denote the position ( 3D coordinate ) of each residue by its alpha carbon . For a given protein with length N , we first translate the structure to match its center of mass with the origin of the coordinate system . We then rotate the protein around the origin to let the first residue be on the negative side of z-axis . We denote the resulting residue coordinates as c1 , c2 , ... , cN . We assign the secondary structure label to each residue based on their SSE assignment ( Kabsch & Sander , 1983 ) in Protein Data Bank ( Berman et al. , 2000 ) . We consider 4 types of secondary structure labels : helix , beta strand , loop and bend/turn . In order to consider the distribution of different secondary structure labels in the 3D space , we discretize the 3D space into voxels , as shown in Fig 1 . A technical challenge here is that the sizes of different proteins vary drastically . As we are only considering the arrangement of SSEs , not their exact coordinates , we here rescale the original structure , so that it fits into a fixed-size cubic box . Based on the distribution of sizes of single-chain proteins in the CATH database ( Sillitoe et al. , 2019 ) , we choose a 40Å × 40Å × 40Å box with each voxel of size 2Å× 2Å× 2Å . We denote the scaling ratio as r ∈ R3 . For voxel i , we denote the coordinates of its center as vi . We assume that the contribution of residues j to voxel i follows the Gaussian form : yij = exp ( − ||cj r − vi||22 σ2 ) · tj , ( 1 ) where tj ∈ { 0 , 1 } 4 is the one-hot encoding of the secondary structure label of amino acid j . The standard deviation is chosen to be 2Å . We sum up all residues together to obtain the final features of the voxel i : yi = ∑N j=1 yij . The structure representation y is the vector of yi ’ s over all voxels . In the next subsection , we will describe how we encode y into the latent space and how we learn a joint sequence-fold embedding in order for generating sequences consistent with a desired 3D structure . | This paper tackle the challenge of designing protein sequences that are consistent with a given 3D fold. To address this challenge, the authors propose a transformer-based generative framework that designs protein sequences conditioned on a given fold. There are two central contributions - the first is a novel fold representation, in which the 3D structure is represented by the voxels of secondary structure elements, and then a fold representation is learned via a transformer-based structure encoder. The second is a joint sequence-fold embedding learning framework. The authors use ablation studies to show that learning a joint latent space between sequences and folds enables the model to better capture the the sequence-fold relationship, improving experimental results. The authors provide a good summary of related work. | SP:ee58edd03a89f8fa07ba73d3b36b32ad551970da |
Fold2Seq: A Joint Sequence(1D)-Fold(3D) Embedding-based Generative Model for Protein Design | 1 INTRODUCTION . Computational protein design is the conceptual inverse of the protein structure prediction problem , and aims to infer an amino acid sequence that will fold into a given 3D structure . Designing protein sequences that will fold into a desired structure has a broad range of applications , from therapeutics to materials ( Kraemer-Pecore et al. , 2001 ) . Despite significant advancements in methodologies as well as in computing power , inverse protein design still remains challenging , primarily due to the vast size of the sequence space - and the difficulty of learning a function that maps from the 3D structure space to the sequence space . Earlier works rely mostly on energy minimization-based approaches ( Koga et al. , 2012 ; Rocklin et al. , 2017 ; Huang et al. , 2011 ) , which follow a scoring function ( force fields , statistical potentials , or machine learning ( ML ) models , ) and sample both sequence and conformational space . Such methods often suffer from drawbacks such as low accuracy of energy functions or force-fields ( Khan & Vihinen , 2010 ) and low efficiency in sequence and conformational search ( Koga et al. , 2012 ) . Recently , as the data on both protein sequences ( hundreds of millions ) and structures ( a few hundreds of thousands ) is quickly accumulating , data-driven approaches for inverse protein design are rapidly emerging ( Greener et al. , 2018 ; Karimi et al. , 2020 ; Ingraham et al. , 2019 ) . Generally , data-driven protein design , attempts to model the probability distribution over sequences conditioned on the structures : P ( x|y ) , where x and y are protein sequences and structures , respectively . Two key challenges remain : ( 1 ) defining a good representation ( y ) of the protein structure and ( 2 ) modelling the sequence generation process conditioned on y . Current protein design methods use protein backbone information from a single protein structure ( fixed backbone ) or from a set of backbone structures consistent with a single fold ( flexible backbone ) . In earlier studies , the protein structures are represented as a 1D string ( Greener et al. , 2018 ) , a 1D vector ( Karimi et al. , 2020 ) , a 2D image ( Strokach et al. , 2020 ) , or a graph ( Ingraham et al. , 2019 ) . The sequence generation methods used in the protein design studies can be classified as non-autoregressive ( Karimi et al. , 2020 ; Greener et al. , 2018 ; Strokach et al. , 2020 ) and autoregeressive ( Ingraham et al. , 2019 ; Madani et al. , 2020 ) . In non-autoregerssive methods , y is usually concatenated with a Gaussian random noise z ( which is the latent vector of the sequence ) please check here to be the input to a sequence generator P ( x|y ) = fg ( y , z ) , while in autoregressive methods , P ( x|y ) is decomposed through the chain rule : P ( x|y ) =∏n i=1 P ( xi|x1 , x2 , ... , xi−1 , y ) , where x = ( x1 , x2 , ... , xn ) . In this paper , we focus on designing sequences conditioned on a protein fold . A protein fold is defined as the arrangement ( or topology ) of the secondary structure elements of the protein relative to each other ( Hou et al. , 2003 ) . A secondary structural element can be defined as the three dimensional form of local segments of a protein sequence . Protein folds are therefore necessarily based on sets of structural elements that distinguish domains . As protein structure is inherently hierarchical , the complete native structure can have multiple folds and a fold can be present in many protein structures . A single structure ( fixed backbone ) or an ensemble of structures ( flexible backbone ) can be used as representatives of a fold . The ensemble representation is often a better choice , as it captures the protein dynamics . Despite the recent progress in using ML models for protein design , significant gaps still remain in addressing both aforementioned challenges ( fold representation and conditional sequence generation ) . First , the current fold representation methods are either hand-designed , or constrained and do not capture the complete original fold space ( See Sec . 2.2 for details ) , resulting in low generalization capacity or efficiency . Second , the sequence encoding and the fold encoding are learned separately in previous methods , which makes two latent domains heterogeneous . Such heterogeneity across two domains actually increases the difficulty of learning the complex sequence–fold relationship . To fill the aforementioned gaps , the main contributions of this work are as follows : • We propose a novel fold representation , through first representing the 3D structure by the voxels of the density of secondary structures elements ( SSEs ) , and then learning the fold representation through a transformer-based structure encoder . Compared to previous fold representations , this representation has several advantages : first , it preserves the entire spatial information of SSEs . Second , it does not need any pre-defined rules , so that the paramterized fold space is not neither limited or biased toward any particular fold . Third , the representation can be automatically extracted from a given protein structure . Lastly , the density model also loosens the rigidity of structures so that the structural variation and lack of structural information of the protein is better handled . • We employ a novel joint sequence-fold embedding learning framework into the transformer-based auto-encoder model . By learning a joint latent space between sequences and folds , our model , Fold2Seq , mitigates the heterogeneity between two different domains and is able to better capture the sequence-fold relationship , as reflected in the results . • Experiments on standard test sets demonstrate that Fold2Seq has superior performance on perplexity , native sequence recovery rate , and native structure recovery accuracy , when compared to competing methods including the state-of-the-art RosettaDesign and other neural net models . Ablation study shows that this superior performance is directly attributed to our algorithmic innovations . Experiments on real-world test sets further demonstrates the unique practical utility and versatility of Fold2Seq compared to the structure-based baselines . 2 RELATED WORK . Data-driven Protein Design A significant surge of protein design studies that deeply exploit the data through modern artificial intelligence algorithms has been witnessed in the last two years . Greener et al . ( 2018 ) used the conditional variational autoencoder for generating protein sequences conditioned on a given fold . Karimi et al . ( 2020 ) developed a guided conditional Wasserstein Generative Adversarial Networks ( gcWGAN ) also for inverse fold design . Madani et al . ( 2020 ) trained an extreme large ( 1.2B parameters ) language model conditioned on taxonomic and keyword tags such as molecular functions for generating protein sequences . Ingraham et al . ( 2019 ) developed a graph-based transformer for generating protein sequences conditioned on a fixed backbone . Lastly , Strokach et al . ( 2020 ) formulated the inverse protein design as a constraint satisfaction problem ( CSP ) and applied the graph neural networks for generating protein sequences conditioned on the residue-residue distance map that is a static representation of the structure . Protein Fold Representation For an extensive overview of molecular representations , including those of proteins , please see David et al . ( 2020 ) . Murzin et al . ( 1995 ) and Orengo et al . ( 1997 ) manually classified protein structures in a hierarchical manner based on their structural similarity . These classifications can be regarded as one-hot encoding of the fold representations . Taylor ( 2002 ) represents a protein fold using a “ periodic table ” . This representation was later used for inverse fold design ( Greener et al. , 2018 ) . However , it only considers three pre-defined folds ( ( layer , layer and barrel ) for a set of structures , which significantly limits the spatial information content of the fold . Hou et al . ( 2003 ) chose hundreds of representative proteins and calculated the similarity scores among them . This similarity matrix was then used for kernel Principle Component Analysis ( kPCA ) . A similar idea was used in Karimi et al . ( 2020 ) for inverse protein design . This representation needs a pre-defined set ( ( alpha only , beta only , and alpha+beta ) of structures along with a similarity metric . Such representation could lead to biased or constrained representations of the fold space and also may not preserve the detailed spatial information of the fold . Finally , Koga et al . ( 2012 ) summarized three rules that describe the junctions between adjacent secondary structure elements for a specific fold . Again , these rules are hand designed for a subset of structures , which makes the representation restricted to a small part of the fold space and offers limited generalizability during conditional sequence generation . Joint Embedding Learning Joint embedding learning across multiple different data modalities was first proposed by Ngiam et al . ( 2011 ) on audio and video signals . Since then , such approaches have been then widely used in cross modal retrieval or captioning tasks ( Arandjelovic & Zisserman , 2018 ; Gu et al. , 2018 ; Peng & Qi , 2019 ; Chen et al. , 2018 ; Wang et al. , 2013 ; Dognin et al. , 2019 ) . In few/zero-shot learning , joint feature-label embedding was used for predicting the label of instances belonging to unseen classes ( Zhang & Saligrama , 2016 ; Socher et al. , 2013 ) . Several papers have demonstrated that learning joint embedding is useful for the single modal classification tasks ( Ngiam et al. , 2011 ; Wang et al. , 2018 ; Toutanova et al. , 2015 ) . Moreover , Chen et al . ( 2018 ) used joint embedding learning for text to shape generation . Lastly , Joint sequence-label embedding is also applied for molecular prediction/generation ( Cao & Shen , 2020 ; Das et al. , 2018 ) . 3 METHODS . 3.1 BACKGROUND AND NOTATION . A protein is formed by a linear chain of amino acids ( residues ) that defines its 1D sequence . Chemical nature , as well as physical and chemical interactions with neighboring residues drive the folding of a sequence into different secondary structure elements or SSEs ( helix , beta-sheet , loop , etc. , see Fig 1 ( a ) ) , that eventually forms a complete native 3D structure . A protein fold captures the topology and the composition of secondary structure elements , thus serving as an intermediate between the 1D sequence and the full 3D structure . 3.2 STRUCTURE REPRESENTATION THROUGH 3D VOXELS OF THE DENSITY OF SSES . In this subsection , we describe how we represent the 3D structure to explicitly capture the fold information . We denote the position ( 3D coordinate ) of each residue by its alpha carbon . For a given protein with length N , we first translate the structure to match its center of mass with the origin of the coordinate system . We then rotate the protein around the origin to let the first residue be on the negative side of z-axis . We denote the resulting residue coordinates as c1 , c2 , ... , cN . We assign the secondary structure label to each residue based on their SSE assignment ( Kabsch & Sander , 1983 ) in Protein Data Bank ( Berman et al. , 2000 ) . We consider 4 types of secondary structure labels : helix , beta strand , loop and bend/turn . In order to consider the distribution of different secondary structure labels in the 3D space , we discretize the 3D space into voxels , as shown in Fig 1 . A technical challenge here is that the sizes of different proteins vary drastically . As we are only considering the arrangement of SSEs , not their exact coordinates , we here rescale the original structure , so that it fits into a fixed-size cubic box . Based on the distribution of sizes of single-chain proteins in the CATH database ( Sillitoe et al. , 2019 ) , we choose a 40Å × 40Å × 40Å box with each voxel of size 2Å× 2Å× 2Å . We denote the scaling ratio as r ∈ R3 . For voxel i , we denote the coordinates of its center as vi . We assume that the contribution of residues j to voxel i follows the Gaussian form : yij = exp ( − ||cj r − vi||22 σ2 ) · tj , ( 1 ) where tj ∈ { 0 , 1 } 4 is the one-hot encoding of the secondary structure label of amino acid j . The standard deviation is chosen to be 2Å . We sum up all residues together to obtain the final features of the voxel i : yi = ∑N j=1 yij . The structure representation y is the vector of yi ’ s over all voxels . In the next subsection , we will describe how we encode y into the latent space and how we learn a joint sequence-fold embedding in order for generating sequences consistent with a desired 3D structure . | This manuscript presents a method for generating protein sequences conditioned on protein structures. The core idea is to represented protein structures by their secondary structures in 3D space. This voxel grid is then encoded into a vector representation and decoded to a distribution over sequences. The authors propose to learn this model jointly with a sequence encoder, combining the sequence and structure representations to decode the sequence during training. For inference, the sequence encoder component is not used. Learning to generate protein sequence conditioned on structure is an interesting and important problem and has been attracting increasing attention from the ML community. Representing structures as voxel grids is an approach worth exploring and flexible structure representations could be promising. However, it isn’t clear to me that this work achieves those goals and comparisons against key baselines (namely Ingraham 2019) are missing. Furthermore, the authors make many unsupported and unsubstantiated claims about their method. Specific comments and questions follow below. | SP:ee58edd03a89f8fa07ba73d3b36b32ad551970da |
Learning Better Structured Representations Using Low-rank Adaptive Label Smoothing | 1 INTRODUCTION . Ever since Szegedy et al . ( 2016 ) introduced label smoothing as a way to regularize the classification ( or output ) layer of a deep neural network , it has been used across a wide range of tasks from image classification ( Szegedy et al. , 2016 ) and machine translation ( Vaswani et al. , 2017 ) to pre-training for natural language generation ( Lewis et al. , 2019 ) . Label smoothing works by mixing the one-hot encoding of a class with a uniform distribution and then computing the cross-entropy with respect to the model ’ s estimate of the class probabilities to compute the loss of the model . This prevents the model being too confident about its predictions — since the model is now penalized ( to a small amount ) even for predicting the correct class in the training data . As a result , label smoothing has been shown to improve generalization across a wide range of tasks ( Müller et al. , 2019 ) . More recently , Müller et al . ( 2019 ) further provided important empirical insights into label smoothing by showing that it encourages the representation learned by a neural network for different classes to be equidistant from each other . Yet , label smoothing is overly crude for many tasks where there is structure in the label space . For instance , consider task-oriented semantic parsing where the goal is to predict a parse tree of intents , slots , and slot values given a natural language utterance . The label space comprises of ontology ( intents and slots ) and natural language tokens and the output has specific structure , e.g. , the first token is always a top-level intent ( see Figure 1 ) , the leaf nodes are always natural language tokens and so on . Therefore , it is more likely for a well trained model to confuse a top-level intent with another top-level intent rather than a natural language token . This calls for models whose uncertainty is spread over related tokens rather than over obviously unrelated tokens . This is especially important in the few-shot setting where there are few labelled examples to learn representations of novel tokens from . Our contributions . We present the first rigorous theoretical analysis of label smoothing by obtaining PAC Bayesian generalization bounds for a closely related ( upper-bound ) loss function . Our analysis reveals that the choice of the smoothing distribution affects generalization , and provides a recipe for tuning the smoothing parameter . Then , we develop a simple yet effective extension of label smoothing : low-rank adaptive label smoothing ( LORAS ) , which provably generalizes the former and adapts to the latent structure that is often present in the label space in many structured prediction problems . We evaluate LORAS on three semantic parsing data sets , and a semantic parsing based question-answering data set , using various pre-trained representations like RoBERTa Liu et al . ( 2019 ) and BART Lewis et al . ( 2019 ) . On ATIS ( Price , 1990 ) and SNIPS ( Coucke et al. , 2018 ) , LORAS achieves average absolute improvement of 0.6 % and 0.9 % respectively in exact match of logical form over vanilla label smoothing across different pre-trained representations . In the few-shot setting using the TOPv2 data set ( Chen et al. , 2020 ) 1 , LORAS achieves an accuracy of 74.1 % on average over the two target domains — an absolute improvement of 2 % over using vanilla label smoothing and matching the state-ofthe-art performance in Chen et al . ( 2020 ) despite their use of a much more complex meta-learning method . Lastly , in the transfer learning setting on the Overnight data set ( Wang et al. , 2015 ) , LORAS improves over vanilla label smoothing by 1 % on average on the target domains . Furthermore , LORAS is easy to implement and train and can be used in conjunction with any architecture . We show that unlike vanilla label smoothing , LORAS effectively solves the neural network overconfidence problem for structured outputs where it produces more calibrated uncertainty estimates over different parts of the structured output . As a result , LORAS reduces the test set expected calibration error by 55 % over vanilla label smoothing on the TOPv2 data set . We present an efficient formulation of LORAS which does not increase the model size , while requiring only O ( K ) additional memory during training where K is the output vocabulary size ( or the number of classes in the multi-class setting ) . 2 PRELIMINARIES . We consider structured prediction formulated as a sequence-to-sequence ( seq2seq ) prediction problem . We motivate our method through semantic parsing where the input x is an natural language utterance and the output y is a serialized tree that captures the semantics of the input in a machine understandable form ( see Figure 1 for an example ) . Specifically , given input output pairs ( x , y ) where x = ( xi ) mi=1 and y = ( yi ) n i=1 are sequences , let φ ( x , y1 : t−1 ) be the representation of the input and output tokens up to time step t − 1 modeled by a neural network . At time step t the probability of the t-th output token is given by : softmax ( Wφ ( x , y1 : t−1 ) ) , where W ∈ RK×d are the output projection weights ( last layer ) of the neural network and K is the vocabulary size . The representation and the output projections are learned by minimizing the negative log-likelihood of the observed samples S. 1TOPv2 data set is a newer version of the TOP data set introduced in ( Gupta et al. , 2018 ) containing 6 additional domains , which is particularly suitable for benchmarking few-shot semantic parsing methods . Label Smoothing . The idea behind label smoothing is to uniformly smooth the one-hot vector before computing the cross-entropy with the learned distribution . Let yt = ( 1 [ yt = j ] ) Kj=1 denote the one-hot encoding of t-th output token and pt = ( p ( yt = j | x , y1 : t−1 ) ) Kj=1 denote the distribution over the vocabulary modeled by the neural network . Then , setting yLSt = ( 1 − α ) y + α1/K , we compute H ( yLSt , pt ) , the cross-entropy between y LS t and pt , as our loss function : H ( yLSt , pt ) = − ( 1− α ) K∑ j=1 yt , j logpt , j − α K K∑ j=1 logpt , j . ( 1 ) 3 THEORETICAL MOTIVATION FOR LABEL SMOOTHING . In this section we look at why training neural networks with soft-targets can help with generalization . To simplify exposition we will consider a multi-class classification setting where we have input output pairs ( x , y ) and y ∈ [ K ] . As first described by Müller et al . ( 2019 ) , label smoothing encourages the representation of the input φ ( x ) to be close to projection weight ( w ) for the correct class and at the same time be equidistant from the weights of all other classes . We will formalize this by obtaining rigorous generalization bounds for label smoothing . Towards that end we will fix the input representation φ ( x ) ∈ Rd with ‖φ ( x ) ‖2 ≤ 1 and focus on the classification layer weights W ∈ RK×d . For a noise distribution n ( · ) , which is uniform for standard label smoothing , an upper-bound on the loss ( 1 ) is given as follows : L̃ ( S , W ) = ∑ ( x , y ) ∈S l ( x , y ; W , α ) + α 2 ∥∥n−Wφ∥∥2 2 ( 2 ) where n = ( n ( i ) ) Ki=1 is the vectorized noise distribution and φ = ∑ x∈S φ ( x ) is the sum of input representations in the training set , and l ( x , y ; W , α ) is the re-scaled negative log-likelihood of the observed data S where the linear term is scaled by α . The upper bound is obtained by ignoring the norm of Wφ from the objective ( see Appendix A.1 for a derivation ) . The objective given by ( 2 ) is essentially penalized negative log-likelihood with a penalty term that encourages the aggregated ( un-normalized ) class scores to be close to the noise distribution . Unlike standard weight regularization , however , the regularization term depends on both the weight W and the inputs x ∈ S. Therefore , existing theory for regularized loss minimization doesn ’ t apply to this case and we invoke PAC-Bayesian theory to analyze the above . As is standard in PAC-Bayesian analysis , we consider minimizing the empirical loss L̃ ( S , W ) around a small neighborhood of the weight W. For a posterior distribution Q on the weights W , which depends on the sample S , we consider the following empirical risk and the expected risk and their respective minimizers . R̂ ( Q ( W ) ) = EW′∼Q ( W ) [ L̃ ( S , W ) ] ( empirical risk ) R ( Q ( W ) ) = EW′∼Q ( W ) [ E ( x , y ) [ l ( x , y ; W′ , α ) ] ] ( expected risk ) Ŵ ∈ argmin W∈RK×d R̂ ( Q ( W ) ) ( empirical minimizer ) W ∈ argmin W∈RK×d R ( Q ( W ) ) ( true minimizer ) The following theorem , whose proof we defer to Appendix A.2 , bounds the risk of the minimizer of the label smoothing loss ( on the sample S ) in terms of the risk of the minimizer of the expected negative log-likelihood ( under the data distribution ) . Theorem 1 ( PAC-Bayesian generalization bound ) . Set the distribution Q ( W ) , parameterized by W with bounded induced norm , over the weights W′ to be such that each column W′∗ , i is sampled i.i.d . from the Gaussian distribution N ( Wφ , I ) . If α = 2d/√N , where N = |S| is the number of samples , then with probability at least 1− δ the generalization error is bounded as follows : R ( Q ( Ŵ ) ) −R ( Q ( W ) ) ≤ 2d√ N ∥∥n−Wφ∥∥2 2 + 1√ N log 2e b2 8 δ . It is important to note that the generalization error depends on the number of classes K through the term ∥∥n−Wφ∥∥ 2 which grows as Θ ( K ) . This is due to the fact that the label smoothing objective regularizes the class scores ( Wφ ) as opposed to regularizing the output layer weights ( W ) directly which would result in the generalization error depending on ‖W‖2F which is Θ ( dK ) . The above result also prescribes how to set the smoothing constant α which is typically chosen to be the constant 0.1 in practice — as the number of samples N →∞ , α→ 0 and less smoothing of the hard targets is needed to achieve generalization . Furthermore , the generalization error also depends on how close the aggregated un-normalized class scores ( Wφ ) of the true minimizer on the training set S are to the noise distribution . Therefore , choosing a more informative smoothing distribution , as opposed to a uniform distribution , should lead to better generalization . | This paper theoretically analyzes "label smoothing” (LS) with PAC-Bayesian bound and motivated from their analysis, proposes a new method: LORAS. In their theoretical analysis, they identify that the generalization error depends on the smoothing distribution. So they propose to learn the smoothing distribution in LORAS. In doing so, to overcome the computational issues & overfitting to diagonal smoothing, they propose Low-rank approach which seems to be successful. The authors show experimental results on semantic parsing dataset (ATIS, SNIPS, and TOPv2) where the LORAS shows better performance than no LS, LS, and some other SOTA model (with one exception of LORAS vs. no LS on ATIS) | SP:f19f24d32d2198e2512cee9f90386a5175255624 |
Learning Better Structured Representations Using Low-rank Adaptive Label Smoothing | 1 INTRODUCTION . Ever since Szegedy et al . ( 2016 ) introduced label smoothing as a way to regularize the classification ( or output ) layer of a deep neural network , it has been used across a wide range of tasks from image classification ( Szegedy et al. , 2016 ) and machine translation ( Vaswani et al. , 2017 ) to pre-training for natural language generation ( Lewis et al. , 2019 ) . Label smoothing works by mixing the one-hot encoding of a class with a uniform distribution and then computing the cross-entropy with respect to the model ’ s estimate of the class probabilities to compute the loss of the model . This prevents the model being too confident about its predictions — since the model is now penalized ( to a small amount ) even for predicting the correct class in the training data . As a result , label smoothing has been shown to improve generalization across a wide range of tasks ( Müller et al. , 2019 ) . More recently , Müller et al . ( 2019 ) further provided important empirical insights into label smoothing by showing that it encourages the representation learned by a neural network for different classes to be equidistant from each other . Yet , label smoothing is overly crude for many tasks where there is structure in the label space . For instance , consider task-oriented semantic parsing where the goal is to predict a parse tree of intents , slots , and slot values given a natural language utterance . The label space comprises of ontology ( intents and slots ) and natural language tokens and the output has specific structure , e.g. , the first token is always a top-level intent ( see Figure 1 ) , the leaf nodes are always natural language tokens and so on . Therefore , it is more likely for a well trained model to confuse a top-level intent with another top-level intent rather than a natural language token . This calls for models whose uncertainty is spread over related tokens rather than over obviously unrelated tokens . This is especially important in the few-shot setting where there are few labelled examples to learn representations of novel tokens from . Our contributions . We present the first rigorous theoretical analysis of label smoothing by obtaining PAC Bayesian generalization bounds for a closely related ( upper-bound ) loss function . Our analysis reveals that the choice of the smoothing distribution affects generalization , and provides a recipe for tuning the smoothing parameter . Then , we develop a simple yet effective extension of label smoothing : low-rank adaptive label smoothing ( LORAS ) , which provably generalizes the former and adapts to the latent structure that is often present in the label space in many structured prediction problems . We evaluate LORAS on three semantic parsing data sets , and a semantic parsing based question-answering data set , using various pre-trained representations like RoBERTa Liu et al . ( 2019 ) and BART Lewis et al . ( 2019 ) . On ATIS ( Price , 1990 ) and SNIPS ( Coucke et al. , 2018 ) , LORAS achieves average absolute improvement of 0.6 % and 0.9 % respectively in exact match of logical form over vanilla label smoothing across different pre-trained representations . In the few-shot setting using the TOPv2 data set ( Chen et al. , 2020 ) 1 , LORAS achieves an accuracy of 74.1 % on average over the two target domains — an absolute improvement of 2 % over using vanilla label smoothing and matching the state-ofthe-art performance in Chen et al . ( 2020 ) despite their use of a much more complex meta-learning method . Lastly , in the transfer learning setting on the Overnight data set ( Wang et al. , 2015 ) , LORAS improves over vanilla label smoothing by 1 % on average on the target domains . Furthermore , LORAS is easy to implement and train and can be used in conjunction with any architecture . We show that unlike vanilla label smoothing , LORAS effectively solves the neural network overconfidence problem for structured outputs where it produces more calibrated uncertainty estimates over different parts of the structured output . As a result , LORAS reduces the test set expected calibration error by 55 % over vanilla label smoothing on the TOPv2 data set . We present an efficient formulation of LORAS which does not increase the model size , while requiring only O ( K ) additional memory during training where K is the output vocabulary size ( or the number of classes in the multi-class setting ) . 2 PRELIMINARIES . We consider structured prediction formulated as a sequence-to-sequence ( seq2seq ) prediction problem . We motivate our method through semantic parsing where the input x is an natural language utterance and the output y is a serialized tree that captures the semantics of the input in a machine understandable form ( see Figure 1 for an example ) . Specifically , given input output pairs ( x , y ) where x = ( xi ) mi=1 and y = ( yi ) n i=1 are sequences , let φ ( x , y1 : t−1 ) be the representation of the input and output tokens up to time step t − 1 modeled by a neural network . At time step t the probability of the t-th output token is given by : softmax ( Wφ ( x , y1 : t−1 ) ) , where W ∈ RK×d are the output projection weights ( last layer ) of the neural network and K is the vocabulary size . The representation and the output projections are learned by minimizing the negative log-likelihood of the observed samples S. 1TOPv2 data set is a newer version of the TOP data set introduced in ( Gupta et al. , 2018 ) containing 6 additional domains , which is particularly suitable for benchmarking few-shot semantic parsing methods . Label Smoothing . The idea behind label smoothing is to uniformly smooth the one-hot vector before computing the cross-entropy with the learned distribution . Let yt = ( 1 [ yt = j ] ) Kj=1 denote the one-hot encoding of t-th output token and pt = ( p ( yt = j | x , y1 : t−1 ) ) Kj=1 denote the distribution over the vocabulary modeled by the neural network . Then , setting yLSt = ( 1 − α ) y + α1/K , we compute H ( yLSt , pt ) , the cross-entropy between y LS t and pt , as our loss function : H ( yLSt , pt ) = − ( 1− α ) K∑ j=1 yt , j logpt , j − α K K∑ j=1 logpt , j . ( 1 ) 3 THEORETICAL MOTIVATION FOR LABEL SMOOTHING . In this section we look at why training neural networks with soft-targets can help with generalization . To simplify exposition we will consider a multi-class classification setting where we have input output pairs ( x , y ) and y ∈ [ K ] . As first described by Müller et al . ( 2019 ) , label smoothing encourages the representation of the input φ ( x ) to be close to projection weight ( w ) for the correct class and at the same time be equidistant from the weights of all other classes . We will formalize this by obtaining rigorous generalization bounds for label smoothing . Towards that end we will fix the input representation φ ( x ) ∈ Rd with ‖φ ( x ) ‖2 ≤ 1 and focus on the classification layer weights W ∈ RK×d . For a noise distribution n ( · ) , which is uniform for standard label smoothing , an upper-bound on the loss ( 1 ) is given as follows : L̃ ( S , W ) = ∑ ( x , y ) ∈S l ( x , y ; W , α ) + α 2 ∥∥n−Wφ∥∥2 2 ( 2 ) where n = ( n ( i ) ) Ki=1 is the vectorized noise distribution and φ = ∑ x∈S φ ( x ) is the sum of input representations in the training set , and l ( x , y ; W , α ) is the re-scaled negative log-likelihood of the observed data S where the linear term is scaled by α . The upper bound is obtained by ignoring the norm of Wφ from the objective ( see Appendix A.1 for a derivation ) . The objective given by ( 2 ) is essentially penalized negative log-likelihood with a penalty term that encourages the aggregated ( un-normalized ) class scores to be close to the noise distribution . Unlike standard weight regularization , however , the regularization term depends on both the weight W and the inputs x ∈ S. Therefore , existing theory for regularized loss minimization doesn ’ t apply to this case and we invoke PAC-Bayesian theory to analyze the above . As is standard in PAC-Bayesian analysis , we consider minimizing the empirical loss L̃ ( S , W ) around a small neighborhood of the weight W. For a posterior distribution Q on the weights W , which depends on the sample S , we consider the following empirical risk and the expected risk and their respective minimizers . R̂ ( Q ( W ) ) = EW′∼Q ( W ) [ L̃ ( S , W ) ] ( empirical risk ) R ( Q ( W ) ) = EW′∼Q ( W ) [ E ( x , y ) [ l ( x , y ; W′ , α ) ] ] ( expected risk ) Ŵ ∈ argmin W∈RK×d R̂ ( Q ( W ) ) ( empirical minimizer ) W ∈ argmin W∈RK×d R ( Q ( W ) ) ( true minimizer ) The following theorem , whose proof we defer to Appendix A.2 , bounds the risk of the minimizer of the label smoothing loss ( on the sample S ) in terms of the risk of the minimizer of the expected negative log-likelihood ( under the data distribution ) . Theorem 1 ( PAC-Bayesian generalization bound ) . Set the distribution Q ( W ) , parameterized by W with bounded induced norm , over the weights W′ to be such that each column W′∗ , i is sampled i.i.d . from the Gaussian distribution N ( Wφ , I ) . If α = 2d/√N , where N = |S| is the number of samples , then with probability at least 1− δ the generalization error is bounded as follows : R ( Q ( Ŵ ) ) −R ( Q ( W ) ) ≤ 2d√ N ∥∥n−Wφ∥∥2 2 + 1√ N log 2e b2 8 δ . It is important to note that the generalization error depends on the number of classes K through the term ∥∥n−Wφ∥∥ 2 which grows as Θ ( K ) . This is due to the fact that the label smoothing objective regularizes the class scores ( Wφ ) as opposed to regularizing the output layer weights ( W ) directly which would result in the generalization error depending on ‖W‖2F which is Θ ( dK ) . The above result also prescribes how to set the smoothing constant α which is typically chosen to be the constant 0.1 in practice — as the number of samples N →∞ , α→ 0 and less smoothing of the hard targets is needed to achieve generalization . Furthermore , the generalization error also depends on how close the aggregated un-normalized class scores ( Wφ ) of the true minimizer on the training set S are to the noise distribution . Therefore , choosing a more informative smoothing distribution , as opposed to a uniform distribution , should lead to better generalization . | The paper proposes a label-smoothing method upon the low-rank assumption of the output dimension, especially when the output dimension is large. The contribution of this work is two folds: first, highlighted the importance of informative label smoothing through better bound, and second, proposed one label smoothing with low-rank assumption. It is overall a good paper but there are a few concerns: | SP:f19f24d32d2198e2512cee9f90386a5175255624 |
Learning Invariant Representations for Reinforcement Learning without Reconstruction | We study how representation learning can accelerate reinforcement learning from rich observations , such as images , without relying either on domain knowledge or pixel-reconstruction . Our goal is to learn representations that provide for effective downstream control and invariance to task-irrelevant details . Bisimulation metrics quantify behavioral similarity between states in continuous MDPs , which we propose using to learn robust latent representations which encode only the task-relevant information from observations . Our method trains encoders such that distances in latent space equal bisimulation distances in state space . We demonstrate the effectiveness of our method at disregarding task-irrelevant information using modified visual MuJoCo tasks , where the background is replaced with moving distractors and natural videos , while achieving SOTA performance . We also test a first-person highway driving task where our method learns invariance to clouds , weather , and time of day . Finally , we provide generalization results drawn from properties of bisimulation metrics , and links to causal inference . 1 Introduction Learning control from images is important for many real world applications . While deep reinforcement learning ( RL ) has enjoyed many successes in simulated tasks , learning control from real vision is more complex , especially outdoors , where images reveal detailed scenes of a complex and unstructured world . Furthermore , while many RL algorithms can eventually learn control from real images given unlimited data , data-efficiency is often a necessity in real trials which are expensive and constrained to real-time . Prior methods for data-efficient learning of simulated visual tasks typically use representation learning . Representation learning summarizes images by encoding them into smaller vectored representations better suited for RL . For example , sequential autoencoders aim to learn lossless representations of streaming observations—sufficient to reconstruct current observations and predict future observations—from which various RL algorithms can be trained ( Hafner et al. , 2018 ; Lee et al. , 2019 ; Yarats et al. , 2019 ) . However , such methods are taskagnostic : the models represent all dynamic elements they observe in the world , whether they are relevant to the task or not . We argue such representations can easily “ distract ” RL algorithms with irrelevant information in the case of real images . The issues of distraction is less evident in popular simulation MuJoCo and Atari tasks , since any change in observation space is likely task-relevant , and thus , worth representing . By contrast , visual images that autonomous cars observe contain predominately task-irrelevant information , like cloud shapes and architectural details , illustrated in Figure 1 . ∗Equal contribution . Corresponding author : amy.x.zhang @ mail.mcgill.ca Rather than learning control-agnostic representations that focus on accurate reconstruction of clouds and buildings , we would rather achieve a more compressed representation from a lossy encoder , which only retains state information relevant to our task . If we would like to learn representations that capture only task-relevant elements of the state and are invariant to task-irrelevant information , intuitively we can utilize the reward signal to help determine task-relevance , as shown by Jonschkowski & Brock ( 2015 ) . As cumulative rewards are our objective , state elements are relevant not only if they influence the current reward , but also if they influence state elements in the future that in turn influence future rewards . This recursive relationship can be distilled into a recursive task-aware notion of state abstraction : an ideal representation is one that is predictive of reward , and also predictive of itself in the future . We propose learning such an invariant representation using the bisimulation metric , where the distance between two observation encodings correspond to how “ behaviourally different ” ( Ferns & Precup , 2014 ) both observations are . Our main contribution is a practical representation learning method based on the bisimulation metric suitable for downstream control , which we call deep bisimulation for control ( DBC ) . We additionally provide theoretical analysis that proves value bounds between the optimal value function of the true MDP and the optimal value function of the MDP constructed by the learned representation . Empirical evaluations demonstrate our nonreconstructive approach using bisimulation is substantially more robust to task-irrelevant distractors when compared to prior approaches that use reconstruction losses or contrastive losses . Our initial experiments insert natural videos into the background of MoJoCo control task as complex distraction . Our second setup is a high-fidelity highway driving task using CARLA ( Dosovitskiy et al. , 2017 ) , showing that our representations can be trained effectively even on highly realistic images with many distractions , such as trees , clouds , buildings , and shadows . For example videos see https : //sites.google.com/view/deepbisim4control . 2 Related Work . Our work builds on the extensive prior research on bisimulation in MDP state aggregation . Reconstruction-based Representations . Early works on deep reinforcement learning from images ( Lange & Riedmiller , 2010 ; Lange et al. , 2012 ) used a two-step learning process where first an auto-encoder was trained using reconstruction loss to learn a low-dimensional representation , and subsequently a controller was learned using this representation . This allows effective leveraging of large , unlabeled datasets for learning representations for control . In practice , there is no guarantee that the learned representation will capture useful information for the control task , and significant expert knowledge and tricks are often necessary for these approaches to work . In model-based RL , one solution to this problem has been to jointly train the encoder and the dynamics model end-to-end ( Watter et al. , 2015 ; Wahlström et al. , 2015 ) – this proved effective in learning useful task-oriented representations . Hafner et al . ( 2018 ) and Lee et al . ( 2019 ) learn latent state models using a reconstruction loss , but these approaches suffer from the difficulty of learning accurate long-term predictions and often still require significant manual tuning . Gelada et al . ( 2019 ) also propose a latent dynamics model-based method and connect their approach to bisimulation metrics , using a reconstruction loss in Atari . They show that ` 2 distance in the DeepMDP representation upper bounds the bisimulation distance , whereas our objective directly learns a representation where distance in latent space is the bisimulation metric . Further , their results rely on the assumption that the learned representation is Lipschitz , whereas we show that , by directly learning a bisimilarity-based representation , we guarantee a representation that generates a Lipschitz MDP . We show experimentally that our non-reconstructive DBC method is substantially more robust to complex distractors . Contrastive-based Representations . Contrastive losses are a self-supervised approach to learn useful representations by enforcing similarity constraints between data ( van den Oord et al. , 2018 ; Chen et al. , 2020 ) . Similarity functions can be provided as domain knowledge in the form of heuristic data augmentation , where we maximize similarity between augmentations of the same data point ( Laskin et al. , 2020 ) or nearby image patches ( Hénaff et al. , 2019 ) , and minimize similarity between different data points . In the absence of this domain knowledge , contrastive representations can be trained by predicting the future ( van den Oord et al. , 2018 ) . We compare to such an approach in our experiments , and show that DBC is substantially more robust . While contrastive losses do not require reconstruction , they do not inherently have a mechanism to determine downstream task relevance without manual engineering , and when trained only for prediction , they aim to capture all predictable features in the observation , which performs poorly on real images for the same reasons world models do . A better method would be to incorporate knowledge of the downstream task into the similarity function in a data-driven way , so that images that are very different pixel-wise ( e.g . lighting or texture changes ) , can also be grouped as similar w.r.t . downstream objectives . Bisimulation . Various forms of state abstractions have been defined in Markov decision processes ( MDPs ) to group states into clusters whilst preserving some property ( e.g . the optimal value , or all values , or all action values from each state ) ( Li et al. , 2006 ) . The strictest form , which generally preserves the most properties , is bisimulation ( Larsen & Skou , 1989 ) . Bisimulation only groups states that are indistinguishable w.r.t . reward sequences output given any action sequence tested . A related concept is bisimulation metrics ( Ferns & Precup , 2014 ) , which measure how “ behaviorally similar ” states are . Ferns et al . ( 2011 ) defines the bisimulation metric with respect to continuous MDPs , and propose a Monte Carlo algorithm for learning it using an exact computation of the Wasserstein distance between empirically measured transition distributions . However , this method does not scale well to large state spaces . Taylor et al . ( 2009 ) relate MDP homomorphisms to lax probabilistic bisimulation , and define a lax bisimulation metric . They then compute a value bound based on this metric for MDP homomorphisms , where approximately equivalent state-action pairs are aggregated . Most recently , Castro ( 2020 ) propose an algorithm for computing on-policy bisimulation metrics , but does so directly , without learning a representation . They focus on deterministic settings and the policy evaluation problem . We believe our work is the first to propose a gradient-based method for directly learning a representation space with the properties of bisimulation metrics and show that it works in the policy optimization setting . 3 Preliminaries . We start by introducing notation and outlining realistic assumptions about underlying structure in the environment . Then , we review state abstractions and metrics for state similarity . We assume the underlying environment is a Markov decision process ( MDP ) , described by the tuple M = ( S , A , P , R , γ ) , where S is the state space , A the action space , P ( s′|s , a ) the probability of transitioning from state s ∈ S to state s′ ∈ S , and γ ∈ [ 0 , 1 ) a discount factor . An “ agent ” chooses actions a ∈ A according to a policy function a ∼ π ( s ) , which updates the system state s′ ∼ P ( s , a ) , yielding a reward r = R ( s ) ∈ R. The agent ’ s goal is to maximize the expected cumulative discounted rewards by learning a good policy : maxπ EP [ ∑∞ t=0 [ γ tR ( st ) ] . While our primary concern is learning from images , we do not address the partial-observability problem explicitly : we instead approximate stacked pixel observations as the fully-observed system state s ( explained further in Appendix B ) . Bisimulation is a form of state abstraction that groups states si and sj that are “ behaviorally equivalent ” ( Li et al. , 2006 ) . For any action sequence a0 : ∞ , the probabilistic sequence of rewards from si and sj are identical . A more compact definition has a recursive form : two states are bisimilar if they share both the same immediate reward and equivalent distributions over the next bisimilar states ( Larsen & Skou , 1989 ; Givan et al. , 2003 ) . Definition 1 ( Bisimulation Relations ( Givan et al. , 2003 ) ) . Given an MDP M , an equivalence relation B between states is a bisimulation relation if , for all states si , sj ∈ S that are equivalent under B ( denoted si ≡B sj ) the following conditions hold : R ( si , a ) = R ( sj , a ) ∀a ∈ A , ( 1 ) P ( G|si , a ) = P ( G|sj , a ) ∀a ∈ A , ∀G ∈ SB , ( 2 ) where SB is the partition of S under the relation B ( the set of all groups G of equivalent states ) , and P ( G|s , a ) = ∑ s′∈G P ( s′|s , a ) . Exact partitioning with bisimulation relations is generally impractical in continuous state spaces , as the relation is highly sensitive to infinitesimal changes in the reward function or dynamics . For this reason , Bisimulation Metrics ( Ferns et al. , 2011 ; Ferns & Precup , 2014 ; Castro , 2020 ) softens the concept of state partitions , and instead defines a pseudometric space ( S , d ) , where a distance function d : S × S 7→ R≥0 measures the “ behavioral similarity ” between two states1 . Defining a distance d between states requires defining both a distance between rewards ( to soften Equation ( 1 ) ) , and distance between state distributions ( to soften Equation ( 2 ) ) . Prior works use the Wasserstein metric for the latter , originally used in the context of bisimulation metrics by van Breugel 1Note that d is a pseudometric , meaning the distance between two different states can be zero , corresponding to behavioral equivalence . & Worrell ( 2001 ) . The pth Wasserstein metric is defined between two probability distributions Pi and Pj as Wp ( Pi , Pj ; d ) = ( infγ′∈Γ ( Pi , Pj ) ∫ S×S d ( si , sj ) p dγ′ ( si , sj ) ) 1/p , where Γ ( Pi , Pj ) is the set of all couplings of Pi and Pj . This is known as the “ earth mover ” distance , denoting the cost of transporting mass from one distribution to another ( Villani , 2003 ) . Finally , the bisimulation metric is the reward difference added to the Wasserstein distance between transition distributions : Definition 2 ( Bisimulation Metric ) . From Theorem 2.6 in Ferns et al . ( 2011 ) with c ∈ [ 0 , 1 ) : d ( si , sj ) = max a∈A ( 1− c ) · |Rasi −R a sj |+ c ·W1 ( P a si , P a sj ; d ) . ( 3 ) | The paper presents a new method for embedding visual images into a state space suitable for effective control by an actor-critic style RL algorithm. They show how a previously explored idea of using a bisimulation between state abstractions and reward sequences to group states that are similar from a decision theoretic perspective can be extended to a continuous deep embedded representation using twin network style learning through standard gradient descent optimization. They call the approach Deep Bisimulation for Control (DBC). The paper also argues for the correctness of their approach using a contraction proof and a theoretical argument for generalization to new problem domains. The approach contrasts directly with algorithms that use an autoencoder to find a compact representation by reconstructing input frames or predicting future input frames. These approaches necessarily represent enough information to reconstruct both task relevant and incidental details. Experimentally, the paper shows that performance of reconstruction-based approaches degrades by a large and significant amount when extraneous background detail is present in image frames, while the proposed method is immune. The evaluation is done on widely respected benchmark of Deep Mind MuJoCo based articulated figure simulations and a CARLA realistic image simulation of car driving which shows that focusing on task specific detail is important on realistic tasks. | SP:ee9150a3bbdc0fa36a2a1876c4de2c9002270a06 |
Learning Invariant Representations for Reinforcement Learning without Reconstruction | We study how representation learning can accelerate reinforcement learning from rich observations , such as images , without relying either on domain knowledge or pixel-reconstruction . Our goal is to learn representations that provide for effective downstream control and invariance to task-irrelevant details . Bisimulation metrics quantify behavioral similarity between states in continuous MDPs , which we propose using to learn robust latent representations which encode only the task-relevant information from observations . Our method trains encoders such that distances in latent space equal bisimulation distances in state space . We demonstrate the effectiveness of our method at disregarding task-irrelevant information using modified visual MuJoCo tasks , where the background is replaced with moving distractors and natural videos , while achieving SOTA performance . We also test a first-person highway driving task where our method learns invariance to clouds , weather , and time of day . Finally , we provide generalization results drawn from properties of bisimulation metrics , and links to causal inference . 1 Introduction Learning control from images is important for many real world applications . While deep reinforcement learning ( RL ) has enjoyed many successes in simulated tasks , learning control from real vision is more complex , especially outdoors , where images reveal detailed scenes of a complex and unstructured world . Furthermore , while many RL algorithms can eventually learn control from real images given unlimited data , data-efficiency is often a necessity in real trials which are expensive and constrained to real-time . Prior methods for data-efficient learning of simulated visual tasks typically use representation learning . Representation learning summarizes images by encoding them into smaller vectored representations better suited for RL . For example , sequential autoencoders aim to learn lossless representations of streaming observations—sufficient to reconstruct current observations and predict future observations—from which various RL algorithms can be trained ( Hafner et al. , 2018 ; Lee et al. , 2019 ; Yarats et al. , 2019 ) . However , such methods are taskagnostic : the models represent all dynamic elements they observe in the world , whether they are relevant to the task or not . We argue such representations can easily “ distract ” RL algorithms with irrelevant information in the case of real images . The issues of distraction is less evident in popular simulation MuJoCo and Atari tasks , since any change in observation space is likely task-relevant , and thus , worth representing . By contrast , visual images that autonomous cars observe contain predominately task-irrelevant information , like cloud shapes and architectural details , illustrated in Figure 1 . ∗Equal contribution . Corresponding author : amy.x.zhang @ mail.mcgill.ca Rather than learning control-agnostic representations that focus on accurate reconstruction of clouds and buildings , we would rather achieve a more compressed representation from a lossy encoder , which only retains state information relevant to our task . If we would like to learn representations that capture only task-relevant elements of the state and are invariant to task-irrelevant information , intuitively we can utilize the reward signal to help determine task-relevance , as shown by Jonschkowski & Brock ( 2015 ) . As cumulative rewards are our objective , state elements are relevant not only if they influence the current reward , but also if they influence state elements in the future that in turn influence future rewards . This recursive relationship can be distilled into a recursive task-aware notion of state abstraction : an ideal representation is one that is predictive of reward , and also predictive of itself in the future . We propose learning such an invariant representation using the bisimulation metric , where the distance between two observation encodings correspond to how “ behaviourally different ” ( Ferns & Precup , 2014 ) both observations are . Our main contribution is a practical representation learning method based on the bisimulation metric suitable for downstream control , which we call deep bisimulation for control ( DBC ) . We additionally provide theoretical analysis that proves value bounds between the optimal value function of the true MDP and the optimal value function of the MDP constructed by the learned representation . Empirical evaluations demonstrate our nonreconstructive approach using bisimulation is substantially more robust to task-irrelevant distractors when compared to prior approaches that use reconstruction losses or contrastive losses . Our initial experiments insert natural videos into the background of MoJoCo control task as complex distraction . Our second setup is a high-fidelity highway driving task using CARLA ( Dosovitskiy et al. , 2017 ) , showing that our representations can be trained effectively even on highly realistic images with many distractions , such as trees , clouds , buildings , and shadows . For example videos see https : //sites.google.com/view/deepbisim4control . 2 Related Work . Our work builds on the extensive prior research on bisimulation in MDP state aggregation . Reconstruction-based Representations . Early works on deep reinforcement learning from images ( Lange & Riedmiller , 2010 ; Lange et al. , 2012 ) used a two-step learning process where first an auto-encoder was trained using reconstruction loss to learn a low-dimensional representation , and subsequently a controller was learned using this representation . This allows effective leveraging of large , unlabeled datasets for learning representations for control . In practice , there is no guarantee that the learned representation will capture useful information for the control task , and significant expert knowledge and tricks are often necessary for these approaches to work . In model-based RL , one solution to this problem has been to jointly train the encoder and the dynamics model end-to-end ( Watter et al. , 2015 ; Wahlström et al. , 2015 ) – this proved effective in learning useful task-oriented representations . Hafner et al . ( 2018 ) and Lee et al . ( 2019 ) learn latent state models using a reconstruction loss , but these approaches suffer from the difficulty of learning accurate long-term predictions and often still require significant manual tuning . Gelada et al . ( 2019 ) also propose a latent dynamics model-based method and connect their approach to bisimulation metrics , using a reconstruction loss in Atari . They show that ` 2 distance in the DeepMDP representation upper bounds the bisimulation distance , whereas our objective directly learns a representation where distance in latent space is the bisimulation metric . Further , their results rely on the assumption that the learned representation is Lipschitz , whereas we show that , by directly learning a bisimilarity-based representation , we guarantee a representation that generates a Lipschitz MDP . We show experimentally that our non-reconstructive DBC method is substantially more robust to complex distractors . Contrastive-based Representations . Contrastive losses are a self-supervised approach to learn useful representations by enforcing similarity constraints between data ( van den Oord et al. , 2018 ; Chen et al. , 2020 ) . Similarity functions can be provided as domain knowledge in the form of heuristic data augmentation , where we maximize similarity between augmentations of the same data point ( Laskin et al. , 2020 ) or nearby image patches ( Hénaff et al. , 2019 ) , and minimize similarity between different data points . In the absence of this domain knowledge , contrastive representations can be trained by predicting the future ( van den Oord et al. , 2018 ) . We compare to such an approach in our experiments , and show that DBC is substantially more robust . While contrastive losses do not require reconstruction , they do not inherently have a mechanism to determine downstream task relevance without manual engineering , and when trained only for prediction , they aim to capture all predictable features in the observation , which performs poorly on real images for the same reasons world models do . A better method would be to incorporate knowledge of the downstream task into the similarity function in a data-driven way , so that images that are very different pixel-wise ( e.g . lighting or texture changes ) , can also be grouped as similar w.r.t . downstream objectives . Bisimulation . Various forms of state abstractions have been defined in Markov decision processes ( MDPs ) to group states into clusters whilst preserving some property ( e.g . the optimal value , or all values , or all action values from each state ) ( Li et al. , 2006 ) . The strictest form , which generally preserves the most properties , is bisimulation ( Larsen & Skou , 1989 ) . Bisimulation only groups states that are indistinguishable w.r.t . reward sequences output given any action sequence tested . A related concept is bisimulation metrics ( Ferns & Precup , 2014 ) , which measure how “ behaviorally similar ” states are . Ferns et al . ( 2011 ) defines the bisimulation metric with respect to continuous MDPs , and propose a Monte Carlo algorithm for learning it using an exact computation of the Wasserstein distance between empirically measured transition distributions . However , this method does not scale well to large state spaces . Taylor et al . ( 2009 ) relate MDP homomorphisms to lax probabilistic bisimulation , and define a lax bisimulation metric . They then compute a value bound based on this metric for MDP homomorphisms , where approximately equivalent state-action pairs are aggregated . Most recently , Castro ( 2020 ) propose an algorithm for computing on-policy bisimulation metrics , but does so directly , without learning a representation . They focus on deterministic settings and the policy evaluation problem . We believe our work is the first to propose a gradient-based method for directly learning a representation space with the properties of bisimulation metrics and show that it works in the policy optimization setting . 3 Preliminaries . We start by introducing notation and outlining realistic assumptions about underlying structure in the environment . Then , we review state abstractions and metrics for state similarity . We assume the underlying environment is a Markov decision process ( MDP ) , described by the tuple M = ( S , A , P , R , γ ) , where S is the state space , A the action space , P ( s′|s , a ) the probability of transitioning from state s ∈ S to state s′ ∈ S , and γ ∈ [ 0 , 1 ) a discount factor . An “ agent ” chooses actions a ∈ A according to a policy function a ∼ π ( s ) , which updates the system state s′ ∼ P ( s , a ) , yielding a reward r = R ( s ) ∈ R. The agent ’ s goal is to maximize the expected cumulative discounted rewards by learning a good policy : maxπ EP [ ∑∞ t=0 [ γ tR ( st ) ] . While our primary concern is learning from images , we do not address the partial-observability problem explicitly : we instead approximate stacked pixel observations as the fully-observed system state s ( explained further in Appendix B ) . Bisimulation is a form of state abstraction that groups states si and sj that are “ behaviorally equivalent ” ( Li et al. , 2006 ) . For any action sequence a0 : ∞ , the probabilistic sequence of rewards from si and sj are identical . A more compact definition has a recursive form : two states are bisimilar if they share both the same immediate reward and equivalent distributions over the next bisimilar states ( Larsen & Skou , 1989 ; Givan et al. , 2003 ) . Definition 1 ( Bisimulation Relations ( Givan et al. , 2003 ) ) . Given an MDP M , an equivalence relation B between states is a bisimulation relation if , for all states si , sj ∈ S that are equivalent under B ( denoted si ≡B sj ) the following conditions hold : R ( si , a ) = R ( sj , a ) ∀a ∈ A , ( 1 ) P ( G|si , a ) = P ( G|sj , a ) ∀a ∈ A , ∀G ∈ SB , ( 2 ) where SB is the partition of S under the relation B ( the set of all groups G of equivalent states ) , and P ( G|s , a ) = ∑ s′∈G P ( s′|s , a ) . Exact partitioning with bisimulation relations is generally impractical in continuous state spaces , as the relation is highly sensitive to infinitesimal changes in the reward function or dynamics . For this reason , Bisimulation Metrics ( Ferns et al. , 2011 ; Ferns & Precup , 2014 ; Castro , 2020 ) softens the concept of state partitions , and instead defines a pseudometric space ( S , d ) , where a distance function d : S × S 7→ R≥0 measures the “ behavioral similarity ” between two states1 . Defining a distance d between states requires defining both a distance between rewards ( to soften Equation ( 1 ) ) , and distance between state distributions ( to soften Equation ( 2 ) ) . Prior works use the Wasserstein metric for the latter , originally used in the context of bisimulation metrics by van Breugel 1Note that d is a pseudometric , meaning the distance between two different states can be zero , corresponding to behavioral equivalence . & Worrell ( 2001 ) . The pth Wasserstein metric is defined between two probability distributions Pi and Pj as Wp ( Pi , Pj ; d ) = ( infγ′∈Γ ( Pi , Pj ) ∫ S×S d ( si , sj ) p dγ′ ( si , sj ) ) 1/p , where Γ ( Pi , Pj ) is the set of all couplings of Pi and Pj . This is known as the “ earth mover ” distance , denoting the cost of transporting mass from one distribution to another ( Villani , 2003 ) . Finally , the bisimulation metric is the reward difference added to the Wasserstein distance between transition distributions : Definition 2 ( Bisimulation Metric ) . From Theorem 2.6 in Ferns et al . ( 2011 ) with c ∈ [ 0 , 1 ) : d ( si , sj ) = max a∈A ( 1− c ) · |Rasi −R a sj |+ c ·W1 ( P a si , P a sj ; d ) . ( 3 ) | The paper focuses on how learning state-representations that encode information relevant to the task can improve reinforcement learning from pixels. Often, observations in an MDP can contain information that are irrelevant (“distractors”) to the task at hand and can likely “distract” the downstream RL algorithm used. Unlike existing reconstruction based approaches (which don’t explicitly incentivize ignoring task-irrelevant information), the authors propose Deep Bisimulation Control (DBC) that relies on bi-simulation metrics (as the task-aware criterion) that encode behavioral similarity b/w states with respect to the reward structure. Instead of explicitly learning a bi-similarity distance function, authors enforce the representations which under L1 distances correspond to bi-simulation metrics. DBC demonstrates learning these representations in conjunction with the control policy, reward and a dynamics model. Furthermore, the authors highlight connections to causal inference which can hopefully further provide insights into which “new” reward structures can the learned representations generalize to (since bi-similarity metrics themselves are heavily dependent on the reward structure). Results obtained by the authors demonstrate that DBC can learn task specific representations and a control policy in a robust manner in the presence of distractors on the Deepmind Control Suite and the CARLA simulator. Additionally, the authors also demonstrate how DBC can generalize to new reward functions on Mujoco. | SP:ee9150a3bbdc0fa36a2a1876c4de2c9002270a06 |
Can Students Outperform Teachers in Knowledge Distillation based Model Compression? | 1 INTRODUCTION . Deep neural networks ( DNNs ) have achieved remarkable performances in various domains , but they require large amounts of computation and memory . This seriously limits their deployment with limited resources or a strict latency requirement . One solution to this problem is knowledge distillation which transfers the knowledge from a large network ( teacher ) to a small one ( student ) . Hinton et al . ( 2015 ) proposed the original knowledge distillation 2 ( KD ) which uses softened logits of a teacher as supervision to train a student . To make the student better capture the knowledge from the teacher , the existing studies focus on aligning their representations by using different criteria . However , there is still a significant performance gap between the teacher and the student . Figuring out the reason for this gap is essential for further improving the student performance . Mirzadeh et al . ( 2020 ) argue that the model capacity difference causes the failure for transferring the knowledge from a large teacher to a small student , thus leading to a large performance gap . Similarly , Cho & Hariharan ( 2019 ) point out that as the teacher grows in capacity and accuracy , it is difficult for the student to emulate the teacher . In this paper , we systematically study why students underperform teachers and how students can match or outperform teachers . We find that in most experimental settings of the existing literature , the root reason for the performance gap is not necessarily the capacity differenc as the student is powerful enough to memorize the teacher ’ s outputs . The reason lies in the distillation dataset on which the knowledge is transferred . As an old proverb says , indigo comes from blue , but it is bluer than blue . In reality , it is not rare for human students to do better than their teachers . These excellent human students not only well capture the knowledge from their teachers but also learn more related knowledge on their own . This gives an insight for students in KD to match or outperform their teachers . We find that currently the students in KD have not well captured the knowledge in their teachers as they only mimic the behavior of the teachers on sparse training data points . In light of this , we propose KD+ which goes beyond in-distribution distillation to substantially reduce the performance gap between students and teachers . Our main contributions are summarized as follows : 1The code will be released online . 2In this paper , we use KD to denote the original knowledge distillation algorithm Hinton et al . ( 2015 ) . • Different from the common belief that model capacity differences result in the performance gap between students and teachers , we find that capacity differences are not necessarily the root reason and instead the distillation data matters when students ’ capacities are greater than a threshold . To our best knowledge , this is the first work that systematically explores why small students underperform teachers and how students can outperform large teachers . • By designing exploratory experiments , we find the following : ( 1 ) only fitting teachers ’ outputs at sparse training data points can not make students well capture the local , indistribution shapes of the teacher functions ; ( 2 ) different from the case on standard supervised learning , out-of-distribution data ( but not all ) can be beneficial to knowledge distillation . • Different from the existing work focusing on using different criteria to align representations or logits between teachers and students , we address knowledge distillation from a novel ( data ) perspective by going beyond in-distribution distillation and accordingly develop KD+ . • Extensive experiments demonstrate that KD+ largely reduces the performance gap between students and teachers , and even enables students to match or outperform their teachers . KD+ is superior to KD as it outperforms KD and more than 10 SOTA methods substantially and shows a better compatibility with the existing methods and superiority in few-shot scenario . 2 RELATED WORK . The objective function of knowledge distillation can be simply expressed as a combination of the regular cross-entropy objective and a distillation objective . According to the distillation objective , the existing literature can be divided into logit-based approaches ( Hinton et al. , 2015 ) and representationbased approaches ( Romero et al. , 2015 ) . Logit-based approaches construct the distillation objective based on output logits . Hinton et al . ( 2015 ) propose KD which penalizes the softened logit differences between a teacher and a student . Park et al . ( 2019 ) propose to transfer data sample relations from a teacher to a student by aligning their logit-based structures . On the other hand , representation-based approaches design the distillation objective based on feature maps . FitNet ( Romero et al. , 2015 ) aligns the features of a teacher and a student through regressions . AT ( Zagoruyko & Komodakis , 2017 ) distills feature attention from a teacher into a student . CRD ( Tian et al. , 2020 ) maximizes the mutual information between student and teacher representations . Other representation-based methods ( Yim et al. , 2017 ; Huang & Wang , 2017 ; Kim et al. , 2018 ; Liu et al. , 2019 ; Srinivas & Fleuret , 2018 ; Wang et al. , 2018 ; Heo et al. , 2019a ; Cho & Hariharan , 2019 ; Ahn et al. , 2019 ; Koratana et al. , 2019 ; Aguilar et al. , 2019 ; Shen & Savvides , 2020 ) use different criteria to align feature representations . SSKD ( Xu et al. , 2020 ) introduces extra self-supervision tasks to assist KD . Online knowledge distillation ( Zhang et al. , 2018b ; Chen et al. , 2020 ; Anil et al. , 2018 ; Chung et al. , 2020 ; Zhu et al. , 2018 ) trains multiple students simultaneously . Self-distillation ( Furlanello et al. , 2018 ; Yuan et al. , 2020 ) approaches train a DNN by using itself as the teacher . It is observed that the existing studies focus on designing different criteria to align teacher-student representations or logits on in-distribution data . In this work , we address knowledge distillation from a data perspective by embedding out-of-distribution distillation into a regularizer . Mirzadeh et al . ( 2020 ) observe that the model capacity gap results in the failure for transferring knowledge from a large teacher to a small student , thus causing a performance gap . To reduce this gap , they propose a multi-step knowledge distillation framework by using several intermediate-size networks ( teacher assistants ) . However , the students still underperform the teachers substantially . Cho & Hariharan ( 2019 ) argue that as the teacher grows in capacity and accuracy , it is difficult for the student to emulate the teacher . To reduce the influence of the large capacity gap , they regularize both the teacher and the knowledge distillation by early stopping . We find that capacity differences are not necessarily the root reason when student capacities are greater than a threshold . On the other hand , KD+ goes beyond in-distribution distillation by exploring the knowledge between two training samples . Similar techniques have been used in many applications with different goals and mechanisms . Mixup ( Zhang et al. , 2018a ) enforces local linearity of a DNN by linearly interpolating a random pair of training samples and their one-hot labels simultaneously . However , simply interpolating two labels may not match the generated sample as pointed out in ( Guo et al. , 2019 ) . KD+ does not have the above issue as it teaches a student to mimic the local shape of a powerful teacher . MixMatch ( Berthelot et al. , 2019b ) linearly interpolates labeled and unlabeled data to improve the semi-supervised learning performances . ReMixMatch ( Berthelot et al. , 2019a ) improves MixMatch by introducing distribution alignment and augmentation anchoring . DivideMix ( Li et al. , 2020 ) aims to learn with noisy labels by modifying MixMatch with label co-refinement and label co-guessing on labeled and unlabeled samples , respectively . AugMix ( Hendrycks et al. , 2019 ) linearly interpolates original training samples and augmented training samples to improves the robustness and uncertainty estimates of DNNs . 3 REFORMULATING KD . Hinton et al . ( 2015 ) propose KD which minimizes the softened logit differences between a student and a teacher over training data Dt = ( Xt , Yt ) where Xt and Yt are the training samples and the ground truth , respectively . The complete objective is : LKD = ∑ ( xt , yt ) ∈ ( Xt , Yt ) [ αLCE ( fS , xt , yt ) + βLKL ( fS , fT , xt ) ] ( 1 ) where α and β are balancing weights and LCE is the regular cross-entropy objective : LCE ( fS , xt , yt ) = H ( yt , σ ( fS ( xt ) ) ) ( 2 ) where H ( . ) is the cross-entropy and σ is softmax . LKL in ( 1 ) is the distillation objective : LKL ( fS , fT , xt ) = τ2KL ( σ ( fT ( xt ) τ ) , σ ( fS ( xt ) τ ) ) ( 3 ) where τ is a temperature to generate soft labels and KL represents KL-divergence . KD can be considered as using one function ( fS ) to fit the outputs of another function ( fT ) . We notice that in ( 1 ) , LCE requires both data samples Xt and the corresponding ground truth Yt while LKL only needs data samples Xt for distilling the teacher knowledge . In light of the difference , we consider KD from semi-supervised perspective and reformulate ( 1 ) in a more general form : L = ∑ ( xt , yt ) ∈ ( Xt , Yt ) αLCE ( fS , xt , yt ) + ∑ xd∈ ( Xd ) βLKL ( fS , fT , xd ) ( 4 ) where we introduce a new concept : distillation dataset Xd is a set of samples on which the knowledge is transferred from a teacher to a student . The first term in the right hand side of ( 4 ) is supervised while the second term is unsupervised . It is obvious that the widely used objective ( 1 ) is a special case of ( 4 ) when Xd is set to Xt . 4 WHY SMALL STUDENTS UNDERPERFORM LARGE TEACHERS ? . In this part , we systematically analyze the reason for the performance gap between students and teachers in KD based model compression . We first introduce several definitions . Definition 4.1 Memorization Error ( ME ) : For a given task with data distribution P ( X , Y ) , ME measures the degree of a student fS fitting the outputs of a teacher fT over the data distribution : E ( fS , fT , P ) = E x∼P ( X ) M ( fT ( x ) , fS ( x ) ) ( 5 ) where M denotes a distance metric such as KL-divergence or mean square error . When ME is 0 , it means that the student can completely memorize the outputs of the teacher over the data distribution . In this paper , we take KL-divergence as M . Definition 4.2 Capable Students ( CSTs ) and Incapable Students ( ISTs ) : network fS with parameters ΘS is a CST of teacher fT if there exists ΘS such that E ( fS , fT , P ) =0 , otherwise , it is an IST . Obviously , a CST is able to fully fit the teacher outputs over data distribution P ( X , Y ) . In contrast , an IST does not have the capacity to fit the teacher . For ISTs , the common belief holds that the student-teacher capacity gap causes the performance gap . For example , we can not expect a two-layer neural network with 1000 parameters to fit the outputs of ResNet-101 with 1.7M parameters on CIFAR-100 . However , in the current SOTA approaches and applications , the commonly used students are modern neural network architectures , such as ResNet-20 , ResNet-8×4 , VGG-8 , and WRN-40-1 . We empirically show that these models are CSTs on commonly used benchmark datasets . To check whether student fS is a CST of teacher fT on a task , we minimize ME to check whether E ( fS , fT , P ) can achieve 0 . However , in practice , it is impossible to calculate E ( fS , fT , P ) as the data distribution P is typically unknown . Fortunately , we have the access to a set of training data ( Xt , Yt ) . With the training data , we approximate ME E ( fS , fT , P ) with the empirical error : Eem ( fS , fT , Xt ) = 1 |Xt| ∑ xt∈Xt M ( fT ( xt ) , fS ( xt ) ) ( 6 ) For comparison , we also evaluate two small neural networks which are expected to be ISTs , i.e. , SN-2 and SN-3 with two and three layers , respectively . We report the ME in Table 1 3 , where we adopt the students and the teachers that share the same architectures ( e.g. , WRN-40-2 and WRN-16-2 ) or use different architectures ( e.g. , ResNet-110 and VGG-8 ) . As expected , the widely used students achieve ME 0.0 on these benckmark datasets , i.e. , CIFAR-10 , CIFAR-100 , and Tiny ImageNet while the small networks ( i.e. , SN2 and SN3 ) have large ME ( e.g. , 2.4 and 4.2 ) , which demonstrates that the widely used students are CSTs . However , as observed in the existing literature , these CSTs underperform the teachers by a significant margin on the test data . This suggests that these students have well captured the knowledge on sparse training data points but have not well captured the local shapes of the teachers within the data distribution . Corollary 4.1 In KD , for CSTs , only fitting the outputs of teachers on sparse training data points can not enable them to well capture the local , in-distribution shapes of the teachers , thus leading to a performance gap . For ISTs , capacity differences cause the performance gap . Proof : We empirically show this by comparing the student performances in the following two settings : ( a ) setting the distillation dataset to training data points ; ( b ) setting the distillation dataset to real data distribution P ( X ) . As P ( X ) is typically unknown in practice , we conduct a simulation experiment on CIFAR-100 . We suppose that the union of the training dataset and the test dataset in CIFAR-100 can accurately represent the real data distribution for this task . Then we randomly draw data samples from the vicinity around the training data and the test data as the distillation dataset , i.e. , Xd in ( 4 ) . Consequently , the distillation dataset can sufficiently represent the real data sample distribution . Note that in the experiments , we never spy the ground truth of the test samples , since the distillation dataset does not use ground truth as shown in ( 4 ) . This means that the students are trained without any additional supervision compared with the teachers as training datset ( Xt , Yt ) in ( 4 ) does not change . As CSTs are able to fully memorize the outputs of the teachers , we expect them to achieve the same 3The ME values in Table 1 are accurate to 1 decimal place . accuracies as or higher accuracies than those of the teachers . In contrast , we expect ISTs to achieve lower accuracies than those of the teachers . Table 2 shows the simulation results . As expected , all the CSTs outperform the teachers in the simulation experiments ( i.e. , Simulation KD ) . This is due to the following facts : first , by using the simulated distillation dataset , the distillation objective in ( 4 ) makes the CSTs fully capture the knowledge of the teachers within the data distribution ; second , the cross-entropy objective in ( 4 ) enables the CSTs to learn their own knowledge . Consequently , CSTs contain both the teacher knowledge and the knowledge learned on their own , which results in better performances than those of the teachers . SN2 and SN3 still underperform the teachers in the simulation experiments due to their limited capacities . These results empirically prove Corollary 4.1 . The simulation experiments also suggest a way for CSTs to outperform teachers . That is to sufficiently distill the knowledge in the teachers with a well representative distillation dataset . Unfortunately , it is impossible to have such a distillation datset as the real data sample distribution P ( X ) is typically unknown in practice . Motivated by this , we propose to go beyond in-distribution distillation . | The paper studies knowledge distillation. In particular, it tries to disentangle the effect of student model capacity and distillation dataset on the performance of the student. The paper goes on to present KD+, a knowledge distillation approach that goes beyond in-distribution data. Experiments on multiple image recognition models and datasets show that KD+ outperforms KD consistently. | SP:f14e55698af04d3b1990c9cc6f86951b56276742 |
Can Students Outperform Teachers in Knowledge Distillation based Model Compression? | 1 INTRODUCTION . Deep neural networks ( DNNs ) have achieved remarkable performances in various domains , but they require large amounts of computation and memory . This seriously limits their deployment with limited resources or a strict latency requirement . One solution to this problem is knowledge distillation which transfers the knowledge from a large network ( teacher ) to a small one ( student ) . Hinton et al . ( 2015 ) proposed the original knowledge distillation 2 ( KD ) which uses softened logits of a teacher as supervision to train a student . To make the student better capture the knowledge from the teacher , the existing studies focus on aligning their representations by using different criteria . However , there is still a significant performance gap between the teacher and the student . Figuring out the reason for this gap is essential for further improving the student performance . Mirzadeh et al . ( 2020 ) argue that the model capacity difference causes the failure for transferring the knowledge from a large teacher to a small student , thus leading to a large performance gap . Similarly , Cho & Hariharan ( 2019 ) point out that as the teacher grows in capacity and accuracy , it is difficult for the student to emulate the teacher . In this paper , we systematically study why students underperform teachers and how students can match or outperform teachers . We find that in most experimental settings of the existing literature , the root reason for the performance gap is not necessarily the capacity differenc as the student is powerful enough to memorize the teacher ’ s outputs . The reason lies in the distillation dataset on which the knowledge is transferred . As an old proverb says , indigo comes from blue , but it is bluer than blue . In reality , it is not rare for human students to do better than their teachers . These excellent human students not only well capture the knowledge from their teachers but also learn more related knowledge on their own . This gives an insight for students in KD to match or outperform their teachers . We find that currently the students in KD have not well captured the knowledge in their teachers as they only mimic the behavior of the teachers on sparse training data points . In light of this , we propose KD+ which goes beyond in-distribution distillation to substantially reduce the performance gap between students and teachers . Our main contributions are summarized as follows : 1The code will be released online . 2In this paper , we use KD to denote the original knowledge distillation algorithm Hinton et al . ( 2015 ) . • Different from the common belief that model capacity differences result in the performance gap between students and teachers , we find that capacity differences are not necessarily the root reason and instead the distillation data matters when students ’ capacities are greater than a threshold . To our best knowledge , this is the first work that systematically explores why small students underperform teachers and how students can outperform large teachers . • By designing exploratory experiments , we find the following : ( 1 ) only fitting teachers ’ outputs at sparse training data points can not make students well capture the local , indistribution shapes of the teacher functions ; ( 2 ) different from the case on standard supervised learning , out-of-distribution data ( but not all ) can be beneficial to knowledge distillation . • Different from the existing work focusing on using different criteria to align representations or logits between teachers and students , we address knowledge distillation from a novel ( data ) perspective by going beyond in-distribution distillation and accordingly develop KD+ . • Extensive experiments demonstrate that KD+ largely reduces the performance gap between students and teachers , and even enables students to match or outperform their teachers . KD+ is superior to KD as it outperforms KD and more than 10 SOTA methods substantially and shows a better compatibility with the existing methods and superiority in few-shot scenario . 2 RELATED WORK . The objective function of knowledge distillation can be simply expressed as a combination of the regular cross-entropy objective and a distillation objective . According to the distillation objective , the existing literature can be divided into logit-based approaches ( Hinton et al. , 2015 ) and representationbased approaches ( Romero et al. , 2015 ) . Logit-based approaches construct the distillation objective based on output logits . Hinton et al . ( 2015 ) propose KD which penalizes the softened logit differences between a teacher and a student . Park et al . ( 2019 ) propose to transfer data sample relations from a teacher to a student by aligning their logit-based structures . On the other hand , representation-based approaches design the distillation objective based on feature maps . FitNet ( Romero et al. , 2015 ) aligns the features of a teacher and a student through regressions . AT ( Zagoruyko & Komodakis , 2017 ) distills feature attention from a teacher into a student . CRD ( Tian et al. , 2020 ) maximizes the mutual information between student and teacher representations . Other representation-based methods ( Yim et al. , 2017 ; Huang & Wang , 2017 ; Kim et al. , 2018 ; Liu et al. , 2019 ; Srinivas & Fleuret , 2018 ; Wang et al. , 2018 ; Heo et al. , 2019a ; Cho & Hariharan , 2019 ; Ahn et al. , 2019 ; Koratana et al. , 2019 ; Aguilar et al. , 2019 ; Shen & Savvides , 2020 ) use different criteria to align feature representations . SSKD ( Xu et al. , 2020 ) introduces extra self-supervision tasks to assist KD . Online knowledge distillation ( Zhang et al. , 2018b ; Chen et al. , 2020 ; Anil et al. , 2018 ; Chung et al. , 2020 ; Zhu et al. , 2018 ) trains multiple students simultaneously . Self-distillation ( Furlanello et al. , 2018 ; Yuan et al. , 2020 ) approaches train a DNN by using itself as the teacher . It is observed that the existing studies focus on designing different criteria to align teacher-student representations or logits on in-distribution data . In this work , we address knowledge distillation from a data perspective by embedding out-of-distribution distillation into a regularizer . Mirzadeh et al . ( 2020 ) observe that the model capacity gap results in the failure for transferring knowledge from a large teacher to a small student , thus causing a performance gap . To reduce this gap , they propose a multi-step knowledge distillation framework by using several intermediate-size networks ( teacher assistants ) . However , the students still underperform the teachers substantially . Cho & Hariharan ( 2019 ) argue that as the teacher grows in capacity and accuracy , it is difficult for the student to emulate the teacher . To reduce the influence of the large capacity gap , they regularize both the teacher and the knowledge distillation by early stopping . We find that capacity differences are not necessarily the root reason when student capacities are greater than a threshold . On the other hand , KD+ goes beyond in-distribution distillation by exploring the knowledge between two training samples . Similar techniques have been used in many applications with different goals and mechanisms . Mixup ( Zhang et al. , 2018a ) enforces local linearity of a DNN by linearly interpolating a random pair of training samples and their one-hot labels simultaneously . However , simply interpolating two labels may not match the generated sample as pointed out in ( Guo et al. , 2019 ) . KD+ does not have the above issue as it teaches a student to mimic the local shape of a powerful teacher . MixMatch ( Berthelot et al. , 2019b ) linearly interpolates labeled and unlabeled data to improve the semi-supervised learning performances . ReMixMatch ( Berthelot et al. , 2019a ) improves MixMatch by introducing distribution alignment and augmentation anchoring . DivideMix ( Li et al. , 2020 ) aims to learn with noisy labels by modifying MixMatch with label co-refinement and label co-guessing on labeled and unlabeled samples , respectively . AugMix ( Hendrycks et al. , 2019 ) linearly interpolates original training samples and augmented training samples to improves the robustness and uncertainty estimates of DNNs . 3 REFORMULATING KD . Hinton et al . ( 2015 ) propose KD which minimizes the softened logit differences between a student and a teacher over training data Dt = ( Xt , Yt ) where Xt and Yt are the training samples and the ground truth , respectively . The complete objective is : LKD = ∑ ( xt , yt ) ∈ ( Xt , Yt ) [ αLCE ( fS , xt , yt ) + βLKL ( fS , fT , xt ) ] ( 1 ) where α and β are balancing weights and LCE is the regular cross-entropy objective : LCE ( fS , xt , yt ) = H ( yt , σ ( fS ( xt ) ) ) ( 2 ) where H ( . ) is the cross-entropy and σ is softmax . LKL in ( 1 ) is the distillation objective : LKL ( fS , fT , xt ) = τ2KL ( σ ( fT ( xt ) τ ) , σ ( fS ( xt ) τ ) ) ( 3 ) where τ is a temperature to generate soft labels and KL represents KL-divergence . KD can be considered as using one function ( fS ) to fit the outputs of another function ( fT ) . We notice that in ( 1 ) , LCE requires both data samples Xt and the corresponding ground truth Yt while LKL only needs data samples Xt for distilling the teacher knowledge . In light of the difference , we consider KD from semi-supervised perspective and reformulate ( 1 ) in a more general form : L = ∑ ( xt , yt ) ∈ ( Xt , Yt ) αLCE ( fS , xt , yt ) + ∑ xd∈ ( Xd ) βLKL ( fS , fT , xd ) ( 4 ) where we introduce a new concept : distillation dataset Xd is a set of samples on which the knowledge is transferred from a teacher to a student . The first term in the right hand side of ( 4 ) is supervised while the second term is unsupervised . It is obvious that the widely used objective ( 1 ) is a special case of ( 4 ) when Xd is set to Xt . 4 WHY SMALL STUDENTS UNDERPERFORM LARGE TEACHERS ? . In this part , we systematically analyze the reason for the performance gap between students and teachers in KD based model compression . We first introduce several definitions . Definition 4.1 Memorization Error ( ME ) : For a given task with data distribution P ( X , Y ) , ME measures the degree of a student fS fitting the outputs of a teacher fT over the data distribution : E ( fS , fT , P ) = E x∼P ( X ) M ( fT ( x ) , fS ( x ) ) ( 5 ) where M denotes a distance metric such as KL-divergence or mean square error . When ME is 0 , it means that the student can completely memorize the outputs of the teacher over the data distribution . In this paper , we take KL-divergence as M . Definition 4.2 Capable Students ( CSTs ) and Incapable Students ( ISTs ) : network fS with parameters ΘS is a CST of teacher fT if there exists ΘS such that E ( fS , fT , P ) =0 , otherwise , it is an IST . Obviously , a CST is able to fully fit the teacher outputs over data distribution P ( X , Y ) . In contrast , an IST does not have the capacity to fit the teacher . For ISTs , the common belief holds that the student-teacher capacity gap causes the performance gap . For example , we can not expect a two-layer neural network with 1000 parameters to fit the outputs of ResNet-101 with 1.7M parameters on CIFAR-100 . However , in the current SOTA approaches and applications , the commonly used students are modern neural network architectures , such as ResNet-20 , ResNet-8×4 , VGG-8 , and WRN-40-1 . We empirically show that these models are CSTs on commonly used benchmark datasets . To check whether student fS is a CST of teacher fT on a task , we minimize ME to check whether E ( fS , fT , P ) can achieve 0 . However , in practice , it is impossible to calculate E ( fS , fT , P ) as the data distribution P is typically unknown . Fortunately , we have the access to a set of training data ( Xt , Yt ) . With the training data , we approximate ME E ( fS , fT , P ) with the empirical error : Eem ( fS , fT , Xt ) = 1 |Xt| ∑ xt∈Xt M ( fT ( xt ) , fS ( xt ) ) ( 6 ) For comparison , we also evaluate two small neural networks which are expected to be ISTs , i.e. , SN-2 and SN-3 with two and three layers , respectively . We report the ME in Table 1 3 , where we adopt the students and the teachers that share the same architectures ( e.g. , WRN-40-2 and WRN-16-2 ) or use different architectures ( e.g. , ResNet-110 and VGG-8 ) . As expected , the widely used students achieve ME 0.0 on these benckmark datasets , i.e. , CIFAR-10 , CIFAR-100 , and Tiny ImageNet while the small networks ( i.e. , SN2 and SN3 ) have large ME ( e.g. , 2.4 and 4.2 ) , which demonstrates that the widely used students are CSTs . However , as observed in the existing literature , these CSTs underperform the teachers by a significant margin on the test data . This suggests that these students have well captured the knowledge on sparse training data points but have not well captured the local shapes of the teachers within the data distribution . Corollary 4.1 In KD , for CSTs , only fitting the outputs of teachers on sparse training data points can not enable them to well capture the local , in-distribution shapes of the teachers , thus leading to a performance gap . For ISTs , capacity differences cause the performance gap . Proof : We empirically show this by comparing the student performances in the following two settings : ( a ) setting the distillation dataset to training data points ; ( b ) setting the distillation dataset to real data distribution P ( X ) . As P ( X ) is typically unknown in practice , we conduct a simulation experiment on CIFAR-100 . We suppose that the union of the training dataset and the test dataset in CIFAR-100 can accurately represent the real data distribution for this task . Then we randomly draw data samples from the vicinity around the training data and the test data as the distillation dataset , i.e. , Xd in ( 4 ) . Consequently , the distillation dataset can sufficiently represent the real data sample distribution . Note that in the experiments , we never spy the ground truth of the test samples , since the distillation dataset does not use ground truth as shown in ( 4 ) . This means that the students are trained without any additional supervision compared with the teachers as training datset ( Xt , Yt ) in ( 4 ) does not change . As CSTs are able to fully memorize the outputs of the teachers , we expect them to achieve the same 3The ME values in Table 1 are accurate to 1 decimal place . accuracies as or higher accuracies than those of the teachers . In contrast , we expect ISTs to achieve lower accuracies than those of the teachers . Table 2 shows the simulation results . As expected , all the CSTs outperform the teachers in the simulation experiments ( i.e. , Simulation KD ) . This is due to the following facts : first , by using the simulated distillation dataset , the distillation objective in ( 4 ) makes the CSTs fully capture the knowledge of the teachers within the data distribution ; second , the cross-entropy objective in ( 4 ) enables the CSTs to learn their own knowledge . Consequently , CSTs contain both the teacher knowledge and the knowledge learned on their own , which results in better performances than those of the teachers . SN2 and SN3 still underperform the teachers in the simulation experiments due to their limited capacities . These results empirically prove Corollary 4.1 . The simulation experiments also suggest a way for CSTs to outperform teachers . That is to sufficiently distill the knowledge in the teachers with a well representative distillation dataset . Unfortunately , it is impossible to have such a distillation datset as the real data sample distribution P ( X ) is typically unknown in practice . Motivated by this , we propose to go beyond in-distribution distillation . | This paper presents an argument that model capacity differences are not necessarily the root reason for the performance gap between the student and the teacher, and the distillation data matters when the student capacity is greater than a threshold. Based on this, the authors develop KD+ to reduce the performance gap between them and enable students to match or outperform their teachers. In addition, this paper designs experiments to confirm the proposed arguments. | SP:f14e55698af04d3b1990c9cc6f86951b56276742 |
Deep Neural Network Fingerprinting by Conferrable Adversarial Examples | 1 INTRODUCTION Deep neural network ( DNN ) classifiers have become indispensable tools for addressing practically relevant problems , such as autonomous driving ( Tian et al. , 2018 ) , natural language processing ( Young et al. , 2018 ) and health care predictions ( Esteva et al. , 2019 ) . While a DNN provides substantial utility , training a DNN is costly because of data preparation ( collection , organization , and cleaning ) and computational resources required for validation of a model ( Press , 2016 ) . For this reason , DNNs are often provided by a single entity and consumed by many , such as in the context of Machine Learning as a Service ( MLaaS ) . A threat to the provider is model stealing , in which an adversary derives a surrogate model from only API access to a source model . We refer to an independently trained model for the same task as a reference model . Consider a MLaaS provider that wants to protect their service and hence restrict its redistribution , e.g. , through a contractual usage agreement because trained models constitute their intellectual property . A threat to the model provider is an attacker who derives surrogate models and publicly deploys them . Since access to the source model has to be provided , users can not be prevented from deriving surrogate models . Krishna et al . ( 2019 ) have shown that model stealing is ( i ) effective , because even high-fidelity surrogates of large models like BERT can be stolen , and ( ii ) efficient , because surrogate models can be derived for a fraction of the costs with limited access to domain data . This paper proposes a DNN fingerprinting method to predict whether a model is a ( stolen ) surrogate or a ( benign ) reference model relative to a source model . DNN fingerprinting is a new area of research that extracts a persistent , identifying code ( fingerprint ) from an already trained model . Model stealing can be categorized into model modification , such as weight pruning ( Zhu & Gupta , 2017 ) , or model extraction that uses some form of knowledge distillation ( Hinton et al. , 2015 ) to derive a surrogate from scratch . Claimed security properties of existing defenses ( ( Adi et al. , 2018 ; Zhang et al. , 2018 ) ) , have been broken by model extraction attacks ( Shafieinejad et al. , 2019 ) . Our fingerprinting method is the first passive defense that is specifically designed towards withstanding model extraction attacks , which extends to robustness against model modification attacks . Our research provides new insight into the transferability of adversarial examples . In this paper , we hypothesize that there exists a subclass of targeted , transferable , adversarial examples that transfer exclusively to surrogate models , but not to reference models . We call this subclass conferrable . Any conferrable example found in the source model should have the same misclassification in a surrogate model , but a different one in reference models . We propose a metric to measure conferrability and an ensemble adversarial attack that optimizes this new metric . We generate conferrable examples as the source model ’ s fingerprint . Retrained CIFAR-10 surrogate models can be verified with a perfect ROC AUC of 1.0 using our fingerprint , compared to an ROC AUC of 0.63 for related work ( Cao et al. , 2019 ) . While our fingerprinting scheme is robust to almost all derivation and extraction attacks , we show that some adapted attacks may remove our fingerprint . Specifically , our fingerprint is not robust to transfer learning when the attacker has access to a model pre-trained on ImageNet32 and access to CIFAR-10 domain data . Our fingerprint is also not robust against adversarial training ( Madry et al. , 2017 ) from scratch . Adversarial training is an adapted model extraction attack specifically designed to limit the transferability of adversarial examples . We hypothesize that incorporating adversarial training into the generation process of conferrable adversarial examples may lead to higher robustness against this attack . 2 RELATED WORK . In black-box adversarial attacks ( Papernot et al. , 2017 ; Tramèr et al. , 2016 ; Madry et al. , 2017 ) , access to the target model is limited , meaning that the target architecture is unknown and computing gradients directly is not possible . Transfer-based adversarial attacks ( Papernot et al. , 2016 ; 2017 ) exploit the ability of an adversarial example to transfer across models with similar decision boundaries . Targeted transferability additionally specifies the target class of the adversarial example . Our proposed adversarial attack is a targeted , transfer-based attack with white-box access to a source model ( that should be defended ) , but black-box access to the stolen model derived by the attacker . Liu et al . ( 2016 ) and Tramèr et al . ( 2017a ) show that ( targeted ) transferability can be boosted by optimizing over an ensemble of models . Our attack also optimizes over an ensemble of models to maximize transferability to stolen surrogate models , while minimizing transferability to independently trained models , called reference models . We refer to this special subclass of targeted transferability as conferrable . Tramèr et al . ( 2017a ) empirically study transferability and find that transferable adversarial examples are located in the intersection of high-dimensional ” adversarial subspaces ” across models . We further their studies and show that ( i ) stolen models apprehend adversarial vulnerabilities from the source model and ( ii ) parts of these subspaces , in which conferrable examples are located , can be used in practice to predict whether a model has been stolen . Watermarking of DNNs is a related method to DNN fingerprinting where an identifying code is embedded into a DNN , thereby potentially impacting the model ’ s utility . Uchida et al . ( 2017 ) embed a secret message into the source model ’ s weight parameters , but require white-box access to the model ’ s parameters for the watermark verification . Adi et al . ( 2018 ) and Zhang et al . ( 2018 ) propose backdooring the source model on a set of unrelated or slightly modified images . Their approaches allow black-box verification that only requires API access to the watermarked model . Frontier-Stitching ( Merrer et al. , 2017 ) and BlackMarks ( Dong et al. , 2018 ) use ( targeted ) adversarial examples as watermarks . These watermarks have been evaluated only against model modification attacks , but not against model extraction attacks that train a surrogate model from scratch . At least two of these watermarking schemes ( Adi et al. , 2018 ; Zhang et al. , 2018 ) are not robust to model extraction attacks ( Shafieinejad et al. , 2019 ) . Cao et al . ( 2019 ) recently proposed a fingerprinting method with adversarial examples close to the source model ’ s decision boundary . We show that their fingerprint does not withstand retraining as a model extraction attack and propose a fingerprint with improved robustness to model extraction attacks . 3 DNN FINGERPRINTING . Threat Model . The attacker ’ s goal is to derive a surrogate model from access to the defender ’ s source model that ( i ) has a similar performance ( measured by test accuracy ) and ( ii ) is not verified as a surrogate of the source model by the defender . We protect against an informed attacker that can have ( i ) white-box access to the source model , ( ii ) unbounded computational capacity and ( iii ) access to domain data from the same distribution . A more informed attacker can drop information and invoke all attacks of a less informed attacker . Robustness against a more informed attacker implies robustness against a less informed attacker . Our attacker is limited in their access to groundtruth labeled data , otherwise they could train their own model and there would be no need to steal a model . In our evaluation , we experiment with attackers that have up to 80 % of ground-truth labels for CIFAR-10 ( Krizhevsky et al. ) . A practical explanation for the limited accessibility of ground truth labels could be that attackers do not have access to a reliable oracle ( e.g. , for medical applications ) , or acquiring labels may be associated with high expenses ( e.g. , Amazon Mechanical Turk1 ) . The defender ’ s goal is to identify stolen surrogate models that are remotely deployed by the attacker . Their capabilities are ( i ) white-box access to the source model , ( ii ) black-box access to the target model deployed by the attacker and ( iii ) a limited set of n queries to verify a remotely deployed surrogate model . Black-box access to the suspect model excludes knowledge of the suspect model ’ s architecture or attack used to distill the model . The defender also does not have knowledge of , nor control over the attacker ’ s dataset used to steal the model . Fingerprinting Definitions . A fingerprinting method for DNNs consists of two algorithms : ( i ) A fingerprint generation algorithm that generates a secret fingerprint F ⊆ Xn of size n , and a fingerprint verification keyFy ⊆ Yn ; ( ii ) A fingerprint verification algorithm that verifies surrogates of the source model . These algorithms can be summarized as follows . • Generate ( M , D ) : Given white-box access to a source model M and training data D ∈ D. Outputs a fingerprint F and the verification keys Fy = { M ( x ) |x ∈ F } . • Verify ( M̂ ( F ) , Fy ) : Given black-box access to a suspect model M̂ , a fingerprint F and a verification key Fy . Outputs 1 if M̂ is verified by the fingerprint and 0 otherwise . The verification algorithm computes an error rate between the outputs of the source and target model on the fingerprint . We empirically measure the error rate separately for surrogate and reference models , which allows to choose a decision threshold ρ ∈ [ 0 , 1 ] . If the error-rate of a target model exceeds 1 − ρ , the verification predicts the target model to be a reference model , otherwise the prediction is a surrogate model . We define that a fingerprint must be irremovable , i.e. , surrogate and reference models are correctly verified , despite an attacker ’ s removal attempt . It must also be non-evasive , meaning that an attacker can not evade black-box verification by detecting fingerprint queries . We refer to Appendix A.3 for security games of DNN fingerprinting . 4 CONFERRABLE ADVERSARIAL EXAMPLES . Motivating Conferrability Conferrability is a new property for adversarial examples , in which targeted transferability occurs only from a source model to its surrogates , but not to independently trained reference models . Intuitively , surrogate models are expected to be more similar to the source model than any reference model , but quantifying this similarity is non-trivial . Conferrable examples are an attempt to quantify this similarity by shared adversarial vulnerabilities of the source model 1https : //www.mturk.com/ and its surrogates . Surrogate models differ from reference models in the objective function which they optimize . Reference models maximize fidelity to the ground truth labels , whereas surrogate models maximize fidelity to the source model ’ s labels , which do not always coincide . Fig . 2a shows the relation between targeted adversarial , transferable , and conferrable examples for the source model , its surrogates , and all reference models . An example is transferable if it is adversarial to any model . It is conferrable when it is adversarial only to surrogate and source models . In that sense , conferrable adversarial examples are a subclass of targeted transferable adversarial examples . Fig . 2b shows the relation between transferable and conferrable adversarial examples in the decision space , simplified for illustrative purposes to binary classification . Transferable adversarial examples occur in those adversarial subspaces where the decision boundary of surrogate and reference models coincide ( Tramèr et al. , 2017b ) . Conferrable adversarial examples occur in those adversarial subspaces where the decision boundary of surrogate and reference models differ . Targeted transferability for a class t and a set of modelsM can be computed as follows . Transfer ( M , x ; t ) = Pr M∈M [ M ( x ) = t ] ( 1 ) Objective We want to find adversarial examples that maximize the output activation difference between surrogate models S and reference modelsR . This difference is quantified by our conferrability score , which measures the example ’ s transferability to surrogate and reference models . Confer ( S , R , x ; t ) = Transfer ( S , x ; t ) ( 1− Transfer ( R , x ; t ) ) ( 2 ) The central challenge for optimizing conferrability directly is that we require access to a differentiable function Transfer that estimates an example ’ s transferability score . To the best of our knowledge , the only known method to evaluate transferability is to train a representative set of DNNs and estimating the example ’ s transferability itself . We use this method to evaluate transferability . In the case of conferrable examples , we evaluate transferability on a set of surrogate and reference models trained locally by the defender and use Equation 2 to obtain the conferrability score . Our hypothesis is that conferrability generalizes , i.e. , examples that are conferrable to a representative set of surrogate and reference DNNs are also conferrable to other , unseen DNNs . Conferrable Ensemble Method . In this section , we describe our adversarial attack that generates conferrable adversarial examples , called the Conferrable Ensemble Method ( CEM ) . CEM operates on the source model M , a set of its surrogates SM , and a set of reference models R. The attack constructs an ensemble model ME with a single shared input that outputs conferrability scores for all output classes y ∈ Y . CEM generates highly conferrable adversarial examples by finding a perturbation δ so that x′ = x0 + δ maximizes the output of the ensemble model for a target class t. We now present the construction of the ensemble model ME . The ensemble model produces two intermediate outputs for an input x ∈ X , representing the average predictions of all surrogate and all reference models on x . We use Dropout ( Srivastava et al. , 2014 ) with a drop ratio of d = 0.3 . Surr ( SM , x ) = 1 |SM | ∑ S∈SM Dropout ( S ( x ) ; d ) ( 3 ) Ref ( R , x ) = 1 |R| ∑ R∈R Dropout ( R ( x ) ; d ) ( 4 ) The output of the ensemble model is the conferrability score of the input for each class . The Softmax activation function is denoted by σ . We refer to Appendix A.4 for details about the optimization . ME ( x ; SM , R ) = σ ( Surr ( SM , x ) ( 1− Ref ( R , x ) ) ) ( 5 ) The loss function consists of three summands and is computed over the benign , initial example x0 , and the example at an intermediate iteration step x′ = x0 + δ . We denote the cross-entropy loss by H ( · , · ) . The first summand function maximizes the output of the ensemble model for some target class t. The second summand maximizes the categorical cross-entropy between the current and initial prediction for the source model . The third summand minimizes the categorical cross-entropy between the source model ’ s prediction and the predictions of its surrogates . The total loss L is the weighted sum over all individual losses . L ( x0 , x′ ) = αH ( 1 , max t [ ME ( x ′ ) t ] ) − βH ( M ( x0 ) , M ( x′ ) ) + γH ( M ( x′ ) , Surr ( SM , x′ ) ) ( 6 ) In all our experiments , we use weights α = β = γ = 1 and refer to Appendix A.6 for an empirical sensitivity analysis of the hyperparameters . We address the box constraint , i.e. , ||δ|| ≤ , similarly to PGD ( Madry et al. , 2017 ) by clipping intermediate outputs around the ball of the original input x0 . For the optimization of an input with respect to the loss we use the Adam optimizer ( Kingma & Ba , 2014 ) . Note that we use an untargeted attack to generate targeted adversarial examples . Targeted attacks are harder to optimize than their untargeted counterparts ( Wu & Fu , 2019 ) . We assign the source model ’ s predicted label for the generated adversarial example as the target label and ensure that target classes are balanced in the fingerprint verification key . Fingerprinting Algorithms . We now describe our fingerprinting generation and verification algorithms . For the generation , the defender locally trains a set of c1 surrogate and c2 reference models ( c1 = c2 = 18 ) on their training data prior to executing CEM . Surrogate models are trained on data labeled by the source model , whereas reference models are trained on ground-truth labels . The defender composes the ensemble model ME as described in the previous paragraph and optimizes for a perturbation δ given an input x0 , so that L ( x0 , x0 + δ ) is minimized . The optimization returns a set of adversarial examples that are filtered by their conferrability scores on the locally trained models . If their conferrability score ( see Equation 2 ) exceeds a minimum threshold ( τ ≥ 0.95 ) , they are added to the fingerprint . For the fingerprint verification , we compute the error rate between the source model ’ s prediction on the fingerprint and a target model ’ s predictions . If the error rate is greater than 1− ρ , which we refer to as the decision threshold , the target model is predicted to be a reference model and a surrogate model otherwise . | This paper introduces an interesting property of adversarial examples, which is called conferrability and can reflect the abilities whether an instance can exclusively transfer with a target label from a source model to its surrogates. A new method is proposed to generate conferrable adversarial examples. Experimental results show the effectiveness of the proposed method. The most impressive thing is the AUC of this method in verifying surrogates. | SP:68a116045efaad7a809e686eab1b5a8b1f665d99 |
Deep Neural Network Fingerprinting by Conferrable Adversarial Examples | 1 INTRODUCTION Deep neural network ( DNN ) classifiers have become indispensable tools for addressing practically relevant problems , such as autonomous driving ( Tian et al. , 2018 ) , natural language processing ( Young et al. , 2018 ) and health care predictions ( Esteva et al. , 2019 ) . While a DNN provides substantial utility , training a DNN is costly because of data preparation ( collection , organization , and cleaning ) and computational resources required for validation of a model ( Press , 2016 ) . For this reason , DNNs are often provided by a single entity and consumed by many , such as in the context of Machine Learning as a Service ( MLaaS ) . A threat to the provider is model stealing , in which an adversary derives a surrogate model from only API access to a source model . We refer to an independently trained model for the same task as a reference model . Consider a MLaaS provider that wants to protect their service and hence restrict its redistribution , e.g. , through a contractual usage agreement because trained models constitute their intellectual property . A threat to the model provider is an attacker who derives surrogate models and publicly deploys them . Since access to the source model has to be provided , users can not be prevented from deriving surrogate models . Krishna et al . ( 2019 ) have shown that model stealing is ( i ) effective , because even high-fidelity surrogates of large models like BERT can be stolen , and ( ii ) efficient , because surrogate models can be derived for a fraction of the costs with limited access to domain data . This paper proposes a DNN fingerprinting method to predict whether a model is a ( stolen ) surrogate or a ( benign ) reference model relative to a source model . DNN fingerprinting is a new area of research that extracts a persistent , identifying code ( fingerprint ) from an already trained model . Model stealing can be categorized into model modification , such as weight pruning ( Zhu & Gupta , 2017 ) , or model extraction that uses some form of knowledge distillation ( Hinton et al. , 2015 ) to derive a surrogate from scratch . Claimed security properties of existing defenses ( ( Adi et al. , 2018 ; Zhang et al. , 2018 ) ) , have been broken by model extraction attacks ( Shafieinejad et al. , 2019 ) . Our fingerprinting method is the first passive defense that is specifically designed towards withstanding model extraction attacks , which extends to robustness against model modification attacks . Our research provides new insight into the transferability of adversarial examples . In this paper , we hypothesize that there exists a subclass of targeted , transferable , adversarial examples that transfer exclusively to surrogate models , but not to reference models . We call this subclass conferrable . Any conferrable example found in the source model should have the same misclassification in a surrogate model , but a different one in reference models . We propose a metric to measure conferrability and an ensemble adversarial attack that optimizes this new metric . We generate conferrable examples as the source model ’ s fingerprint . Retrained CIFAR-10 surrogate models can be verified with a perfect ROC AUC of 1.0 using our fingerprint , compared to an ROC AUC of 0.63 for related work ( Cao et al. , 2019 ) . While our fingerprinting scheme is robust to almost all derivation and extraction attacks , we show that some adapted attacks may remove our fingerprint . Specifically , our fingerprint is not robust to transfer learning when the attacker has access to a model pre-trained on ImageNet32 and access to CIFAR-10 domain data . Our fingerprint is also not robust against adversarial training ( Madry et al. , 2017 ) from scratch . Adversarial training is an adapted model extraction attack specifically designed to limit the transferability of adversarial examples . We hypothesize that incorporating adversarial training into the generation process of conferrable adversarial examples may lead to higher robustness against this attack . 2 RELATED WORK . In black-box adversarial attacks ( Papernot et al. , 2017 ; Tramèr et al. , 2016 ; Madry et al. , 2017 ) , access to the target model is limited , meaning that the target architecture is unknown and computing gradients directly is not possible . Transfer-based adversarial attacks ( Papernot et al. , 2016 ; 2017 ) exploit the ability of an adversarial example to transfer across models with similar decision boundaries . Targeted transferability additionally specifies the target class of the adversarial example . Our proposed adversarial attack is a targeted , transfer-based attack with white-box access to a source model ( that should be defended ) , but black-box access to the stolen model derived by the attacker . Liu et al . ( 2016 ) and Tramèr et al . ( 2017a ) show that ( targeted ) transferability can be boosted by optimizing over an ensemble of models . Our attack also optimizes over an ensemble of models to maximize transferability to stolen surrogate models , while minimizing transferability to independently trained models , called reference models . We refer to this special subclass of targeted transferability as conferrable . Tramèr et al . ( 2017a ) empirically study transferability and find that transferable adversarial examples are located in the intersection of high-dimensional ” adversarial subspaces ” across models . We further their studies and show that ( i ) stolen models apprehend adversarial vulnerabilities from the source model and ( ii ) parts of these subspaces , in which conferrable examples are located , can be used in practice to predict whether a model has been stolen . Watermarking of DNNs is a related method to DNN fingerprinting where an identifying code is embedded into a DNN , thereby potentially impacting the model ’ s utility . Uchida et al . ( 2017 ) embed a secret message into the source model ’ s weight parameters , but require white-box access to the model ’ s parameters for the watermark verification . Adi et al . ( 2018 ) and Zhang et al . ( 2018 ) propose backdooring the source model on a set of unrelated or slightly modified images . Their approaches allow black-box verification that only requires API access to the watermarked model . Frontier-Stitching ( Merrer et al. , 2017 ) and BlackMarks ( Dong et al. , 2018 ) use ( targeted ) adversarial examples as watermarks . These watermarks have been evaluated only against model modification attacks , but not against model extraction attacks that train a surrogate model from scratch . At least two of these watermarking schemes ( Adi et al. , 2018 ; Zhang et al. , 2018 ) are not robust to model extraction attacks ( Shafieinejad et al. , 2019 ) . Cao et al . ( 2019 ) recently proposed a fingerprinting method with adversarial examples close to the source model ’ s decision boundary . We show that their fingerprint does not withstand retraining as a model extraction attack and propose a fingerprint with improved robustness to model extraction attacks . 3 DNN FINGERPRINTING . Threat Model . The attacker ’ s goal is to derive a surrogate model from access to the defender ’ s source model that ( i ) has a similar performance ( measured by test accuracy ) and ( ii ) is not verified as a surrogate of the source model by the defender . We protect against an informed attacker that can have ( i ) white-box access to the source model , ( ii ) unbounded computational capacity and ( iii ) access to domain data from the same distribution . A more informed attacker can drop information and invoke all attacks of a less informed attacker . Robustness against a more informed attacker implies robustness against a less informed attacker . Our attacker is limited in their access to groundtruth labeled data , otherwise they could train their own model and there would be no need to steal a model . In our evaluation , we experiment with attackers that have up to 80 % of ground-truth labels for CIFAR-10 ( Krizhevsky et al. ) . A practical explanation for the limited accessibility of ground truth labels could be that attackers do not have access to a reliable oracle ( e.g. , for medical applications ) , or acquiring labels may be associated with high expenses ( e.g. , Amazon Mechanical Turk1 ) . The defender ’ s goal is to identify stolen surrogate models that are remotely deployed by the attacker . Their capabilities are ( i ) white-box access to the source model , ( ii ) black-box access to the target model deployed by the attacker and ( iii ) a limited set of n queries to verify a remotely deployed surrogate model . Black-box access to the suspect model excludes knowledge of the suspect model ’ s architecture or attack used to distill the model . The defender also does not have knowledge of , nor control over the attacker ’ s dataset used to steal the model . Fingerprinting Definitions . A fingerprinting method for DNNs consists of two algorithms : ( i ) A fingerprint generation algorithm that generates a secret fingerprint F ⊆ Xn of size n , and a fingerprint verification keyFy ⊆ Yn ; ( ii ) A fingerprint verification algorithm that verifies surrogates of the source model . These algorithms can be summarized as follows . • Generate ( M , D ) : Given white-box access to a source model M and training data D ∈ D. Outputs a fingerprint F and the verification keys Fy = { M ( x ) |x ∈ F } . • Verify ( M̂ ( F ) , Fy ) : Given black-box access to a suspect model M̂ , a fingerprint F and a verification key Fy . Outputs 1 if M̂ is verified by the fingerprint and 0 otherwise . The verification algorithm computes an error rate between the outputs of the source and target model on the fingerprint . We empirically measure the error rate separately for surrogate and reference models , which allows to choose a decision threshold ρ ∈ [ 0 , 1 ] . If the error-rate of a target model exceeds 1 − ρ , the verification predicts the target model to be a reference model , otherwise the prediction is a surrogate model . We define that a fingerprint must be irremovable , i.e. , surrogate and reference models are correctly verified , despite an attacker ’ s removal attempt . It must also be non-evasive , meaning that an attacker can not evade black-box verification by detecting fingerprint queries . We refer to Appendix A.3 for security games of DNN fingerprinting . 4 CONFERRABLE ADVERSARIAL EXAMPLES . Motivating Conferrability Conferrability is a new property for adversarial examples , in which targeted transferability occurs only from a source model to its surrogates , but not to independently trained reference models . Intuitively , surrogate models are expected to be more similar to the source model than any reference model , but quantifying this similarity is non-trivial . Conferrable examples are an attempt to quantify this similarity by shared adversarial vulnerabilities of the source model 1https : //www.mturk.com/ and its surrogates . Surrogate models differ from reference models in the objective function which they optimize . Reference models maximize fidelity to the ground truth labels , whereas surrogate models maximize fidelity to the source model ’ s labels , which do not always coincide . Fig . 2a shows the relation between targeted adversarial , transferable , and conferrable examples for the source model , its surrogates , and all reference models . An example is transferable if it is adversarial to any model . It is conferrable when it is adversarial only to surrogate and source models . In that sense , conferrable adversarial examples are a subclass of targeted transferable adversarial examples . Fig . 2b shows the relation between transferable and conferrable adversarial examples in the decision space , simplified for illustrative purposes to binary classification . Transferable adversarial examples occur in those adversarial subspaces where the decision boundary of surrogate and reference models coincide ( Tramèr et al. , 2017b ) . Conferrable adversarial examples occur in those adversarial subspaces where the decision boundary of surrogate and reference models differ . Targeted transferability for a class t and a set of modelsM can be computed as follows . Transfer ( M , x ; t ) = Pr M∈M [ M ( x ) = t ] ( 1 ) Objective We want to find adversarial examples that maximize the output activation difference between surrogate models S and reference modelsR . This difference is quantified by our conferrability score , which measures the example ’ s transferability to surrogate and reference models . Confer ( S , R , x ; t ) = Transfer ( S , x ; t ) ( 1− Transfer ( R , x ; t ) ) ( 2 ) The central challenge for optimizing conferrability directly is that we require access to a differentiable function Transfer that estimates an example ’ s transferability score . To the best of our knowledge , the only known method to evaluate transferability is to train a representative set of DNNs and estimating the example ’ s transferability itself . We use this method to evaluate transferability . In the case of conferrable examples , we evaluate transferability on a set of surrogate and reference models trained locally by the defender and use Equation 2 to obtain the conferrability score . Our hypothesis is that conferrability generalizes , i.e. , examples that are conferrable to a representative set of surrogate and reference DNNs are also conferrable to other , unseen DNNs . Conferrable Ensemble Method . In this section , we describe our adversarial attack that generates conferrable adversarial examples , called the Conferrable Ensemble Method ( CEM ) . CEM operates on the source model M , a set of its surrogates SM , and a set of reference models R. The attack constructs an ensemble model ME with a single shared input that outputs conferrability scores for all output classes y ∈ Y . CEM generates highly conferrable adversarial examples by finding a perturbation δ so that x′ = x0 + δ maximizes the output of the ensemble model for a target class t. We now present the construction of the ensemble model ME . The ensemble model produces two intermediate outputs for an input x ∈ X , representing the average predictions of all surrogate and all reference models on x . We use Dropout ( Srivastava et al. , 2014 ) with a drop ratio of d = 0.3 . Surr ( SM , x ) = 1 |SM | ∑ S∈SM Dropout ( S ( x ) ; d ) ( 3 ) Ref ( R , x ) = 1 |R| ∑ R∈R Dropout ( R ( x ) ; d ) ( 4 ) The output of the ensemble model is the conferrability score of the input for each class . The Softmax activation function is denoted by σ . We refer to Appendix A.4 for details about the optimization . ME ( x ; SM , R ) = σ ( Surr ( SM , x ) ( 1− Ref ( R , x ) ) ) ( 5 ) The loss function consists of three summands and is computed over the benign , initial example x0 , and the example at an intermediate iteration step x′ = x0 + δ . We denote the cross-entropy loss by H ( · , · ) . The first summand function maximizes the output of the ensemble model for some target class t. The second summand maximizes the categorical cross-entropy between the current and initial prediction for the source model . The third summand minimizes the categorical cross-entropy between the source model ’ s prediction and the predictions of its surrogates . The total loss L is the weighted sum over all individual losses . L ( x0 , x′ ) = αH ( 1 , max t [ ME ( x ′ ) t ] ) − βH ( M ( x0 ) , M ( x′ ) ) + γH ( M ( x′ ) , Surr ( SM , x′ ) ) ( 6 ) In all our experiments , we use weights α = β = γ = 1 and refer to Appendix A.6 for an empirical sensitivity analysis of the hyperparameters . We address the box constraint , i.e. , ||δ|| ≤ , similarly to PGD ( Madry et al. , 2017 ) by clipping intermediate outputs around the ball of the original input x0 . For the optimization of an input with respect to the loss we use the Adam optimizer ( Kingma & Ba , 2014 ) . Note that we use an untargeted attack to generate targeted adversarial examples . Targeted attacks are harder to optimize than their untargeted counterparts ( Wu & Fu , 2019 ) . We assign the source model ’ s predicted label for the generated adversarial example as the target label and ensure that target classes are balanced in the fingerprint verification key . Fingerprinting Algorithms . We now describe our fingerprinting generation and verification algorithms . For the generation , the defender locally trains a set of c1 surrogate and c2 reference models ( c1 = c2 = 18 ) on their training data prior to executing CEM . Surrogate models are trained on data labeled by the source model , whereas reference models are trained on ground-truth labels . The defender composes the ensemble model ME as described in the previous paragraph and optimizes for a perturbation δ given an input x0 , so that L ( x0 , x0 + δ ) is minimized . The optimization returns a set of adversarial examples that are filtered by their conferrability scores on the locally trained models . If their conferrability score ( see Equation 2 ) exceeds a minimum threshold ( τ ≥ 0.95 ) , they are added to the fingerprint . For the fingerprint verification , we compute the error rate between the source model ’ s prediction on the fingerprint and a target model ’ s predictions . If the error rate is greater than 1− ρ , which we refer to as the decision threshold , the target model is predicted to be a reference model and a surrogate model otherwise . | This paper studies fingerprinting a neural network model by using adversarial example techniques. The idea itself is interesting enough, the this work presents a neat development toward solving this problem. An important issue with this problem is to distinguish a reference model from a stolen model. Thus a desire property of the fingerprint adversarial example is to mislead all surrogate models but non reference models. Since adversarial examples are typically transferable to reference models, thus it is important to distinguish a fingerprint from a transferable adversarial example. For a long time, researchers do not have an answer to whether this is possible, and this work provides an evidence that it may generate a conferrable but not transferable adversarial example to achieve the goal. | SP:68a116045efaad7a809e686eab1b5a8b1f665d99 |
Factor Normalization for Deep Neural Network Models | 1 INTRODUCTION . In recent decades , the progress of deep learning , together with advances in GPU devices , has led to a growing popularity of deep neural network ( DNN ) models in both academia and industry . DNN models have been widely used in various fields , such as image classification ( Simonyan & Zisserman , 2014 ; He et al. , 2016a ) , speech recognition ( Hinton et al. , 2012 ; Maas et al. , 2017 ) , and machine translation ( Wu et al. , 2016 ; Vaswani et al. , 2017 ) . However , due to their deep structure , most DNN models are extremely difficult to train . The practical training of a DNN model often highly depends on empirical experience and is extremely time consuming . Therefore , a series of effective optimization methods have been developed for fast DNN training . According to a recent survey paper by Sun et al . ( 2019 ) , most of the optimization methods with explicit derivatives can be roughly categorized into two groups : the first-order optimization methods and the high-order optimization methods . The widely used stochastic gradient descent ( SGD ) algorithm and its variants ( Robbins & Monro , 1951 ; Jain et al. , 2018 ) are typical examples of the first-order optimization methods . The SGD algorithm only computes the first-order derivatives ( i.e. , the gradient ) using a randomly sampled batch . By doing so , the SGD algorithm can handle large-sized datasets with limited computational resources . Unfortunately , the practical feasibility of SGD comes at the cost of sublinear convergence speed ( Johnson & Zhang , 2013a ) . For better convergence speed , various accelerated SGD algorithms have been developed . For instance , the popularly used momentum method ( Polyak , 1964 ; Qian , 1999 ) and the Nesterov Accelerated Gradient Descent ( NAG ) ( Nesterov , 1983 ; Sutskever et al. , 2013 ) method . Both of them took the information from the previous update gradient direction into consideration . Further improvements include AdaGrad ( Duchi et al. , 2011 ) , AdaDelta ( Zeiler , 2012 ) , RMSprop ( Tieleman & Hinton , 2012 ) , Adam ( Kingma & Ba , 2014 ) and others . For a more stable gradient estimation , the stochastic average gradient ( SAG ) ( Roux et al. , 2012 ) and stochastic variance reduction gradient ( SVRG ) ( Johnson & Zhang , 2013b ) methods are also developed . Except for the first-order optimization methods , high-order optimization methods also exist . Popular representatives are the Newton ’ s method and its variants ( Shanno , 1970 ; Hu et al. , 2019 ; Pajarinen et al. , 2019 ) . Compared to the first-order methods , high-order methods might lead to faster convergence speed since they take the information of Hessian matrix into consideration . For example , the Newton ’ s method can have a quadratic convergence speed under appropriate conditions ( Avriel , 2003 ) . However , calculating and storing the Hessian matrix and its inverse is extremely expensive in terms of both time and storage . This leads to the development of some approximation methods , such as Quasi-Newton method ( Avriel , 2003 ) and stochastic Quasi-Newton method ( Luo et al. , 2014 ) . The idea of Quasi or stochastic Quasi Newton method is to approximate the inverse Hessian matrix by a positive definite matrix . For example , DFP ( Fletcher & Powell , 1963 ; Davidon , 1991 ) , BFGS ( Broyden , 1970 ; Fletcher & R , 1970 ; Donald & Goldfarb , 1970 ) and L-BFGS ( Nocedal & Jorge , 1980 ; Liu & Nocedal , 1989 ) methods are popular representatives . Moreover , as a useful technique for fast convergence , various pre-conditioning techniques are also popularly used . ( Huckle , 1999 ; Benzi , 2002 ; Tang et al. , 2009 ) . The basis idea of pre-conditioning is to transform a difficult or ill-conditioned linear system ( e.g. , Aθ = b ) into an easier system with better condition ( Higham & Mary , 2019 ) . As a consequence , the information contained in the feature covariance can be effectively used ( Wang et al. , 2019 ) . Other interesting methods trying to extract useful information from the feature covariance also exist ; see for example Denton et al . ( 2015 ) , Ghiasi & Fowlkes ( 2016 ) , and Lai et al . ( 2017 ) . However , to our best knowledge , there seems no existing models or methods that are particularly designed for high-dimensional features with a factor structure . In the meanwhile , ample amounts of empirical experience suggest that most high-dimensional features demonstrate a strong factor type of covariance structure . In other words , a significant amount of the feature variability can be explained by a latent factor with very low dimensions . As a consequence , we can decompose the original features into two parts . The first is a low dimensional factor part , which accounts for a significant portion of the total volatility . The second is the residual part with factor effects removed . This residual part has the same dimension as the original feature . Consequently , it has a much reduced variability . Moreover , the inter-feature correlation is also reduced substantially . To this end , the original learning problem concerning for the high dimensional features can be decomposed into two sub learning problems . The first one is a learning problem concerning for the latent factor . This is relatively simple since the dimension of the factor is very low . The second problem is related to the residual feature . Unfortunately , this is still a challenging problem due to the high dimensions . However , compared with the original one , it is much easier because the inter feature dependence has been substantially reduced . For a practical implementation , we propose here a novel method called factor normalization . It starts with a benchmark model ( e.g. , VGG or ResNet ) and then slightly modifies the benchmark model into a new model structure . Compared with the benchmark model , the new model takes the latent factor and residuals as different inputs . The benchmark model is remained to process the residuals . The latent factor is then put back to the model in the last layer . This is to compensate for the information loss due to factor extraction . By doing so , the new model allows the factor-related features and residual-related features to be processed separately . Furthermore , different ( i.e. , adaptive ) learning rates can be allowed for factor and residuals , respectively . This leads to adaptive learning and thus fast convergence speed . The rest of this article is organized as follows . Section 2 develops our theoretical motivation with statistical insights . Section 3 provides the details of the proposed new model . Section 4 demonstrates the outstanding performance of the propose model via extensive empirical experiments . Section 5 concludes the article with a brief discussion for future research . 2 THEORETICAL MOTIVATION . To motivate our new model , we provide here a number of interesting theoretical motivations from different perspectives . Since the SGD algorithm is a stochastic version of the GD algorithm , we thus focus on a standard GD algorithm in this section for discussion simplicity . 2.1 THE GD ALGORITHM . Let ( Xi , Yi ) be the observation collected from the i-th instance with 1 ≤ i ≤ N , where Yi is often the class label and Xi = ( Xi1 , ... , Xip ) ⊤ ∈ Rp is the associated p-dimensional feature . The loss function evaluated at i is defined as ℓ ( Yi , X⊤i θ ) , where θ ∈ Rp is the unknown parameter . Then , the global loss is given by LN ( θ ) = N−1 ∑N i=1 ℓ ( Yi , X ⊤ i θ ) . The global gradient is given by L̇N ( θ ) = N−1 ∑N i=1 ℓ̇ ( Yi , X ⊤ i θ ) Xi and ℓ̇ ( y , z ) = ∂ℓ ( y , z ) /∂z . Let θ̂ ( t ) be the estimator obtained in the t-th iteration . Then , the GD algorithm updates the parameter as θ̂ ( t+1 ) = θ̂ ( t ) − αL̇N ( θ̂ ( t ) ) . Here , α is a scalar and is referred as the learning rate ( Robbins & Monro , 1951 ) . Assume that LN ( θ̂ ( t ) ) reaches its minimum at θ̂ such that L̇N ( θ̂ ) = 0 . We then apply Taylor expansion for L̇N ( θ ) at θ̂ . This leads to θ̂ ( t+1 ) − θ̂ = { Ip − αL̈N ( θ̂ ) } ( θ̂ ( t ) − θ̂ ) + o ( ∥θ̂ ( t ) − θ̂∥2 ) = K ( θ̂ ( t ) − θ̂ ) + o ( ∥θ̂ ( t ) − θ̂∥2 ) , where K = Ip−αL̈N ( θ̂ ) . We refer to K as a contraction operator , and it plays a very important role in optimization . Intuitively , all the eigenvalues of K should lie in ( −1 , 1 ) . Otherwise , the algorithm might not converge numerically . Proposition 1 Assume L̈N ( θ̂ ) to be a positive definite matrix . Let λ1 ≥ λ2 ≥ ... ≥ λp > 0 be the eigenvalues of L̈N ( θ̂ ) . To have the GD algorithm converge , we should have 0 < α < 1/λ1 . 2.2 CONDITION NUMBER . By Proposition 1 we know that the learning rate can not be too large . Otherwise the GD algorithm might not numerically converge . The size of the learning rate is controlled by the largest eigenvalue of the Hessian matrix L̈N ( θ̂ ) . The larger λ1 is , the smaller the learning rate must be , and the slower convergence speed should be . This problem is particularly serious if the condition number ( i.e. , λ1/λp ) of the Hessian matrix is very large . In that case , the large λ1 value forces the learning rate α to be very small . In the meanwhile , other small eigenvalues ( λj for j ̸= 1 ) make the convergence speed along the corresponding eigen-directions very slow . Consequently , practitioners should wish the condition number of the Hessian matrix to be as small as possible . On the other hand , as we mentioned previously , most high-dimensional features have a strong factor structure . In other words , the size of the top eigenvalues of the covariance matrix Σ is typically much larger than the rest . Consequently , the condition number of its covariance matrix is typically very large . It is then of great interest to investigate : how would this factor structure affect the condition number of the Hessian matrix ? To address this important problem , we evaluate the expected Hessian matrix as H = E ( L̈ ( θ ) ) = E { ℓ̈ ( Yi , X⊤i θ ) XiX⊤i } , where ℓ̈ ( y , z ) = ∂ℓ̇ ( y , z ) /∂z stands for the second order derivative of ℓ ( y , z ) with respect to z . For illustration purpose , assume Xi is normally distributed with mean 0 . Recall that the covariance matrix is Σ . Define X̃i = Σ−1/2Xi and θ̃ = Σ1/2θ . We then rewrite H as H = Σ1/2E { ℓ̈ ( Yi , X̃⊤i θ̃ ) X̃iX̃⊤i } Σ1/2 = Σ1/2H̃Σ1/2 , where H̃ = E { ℓ̈ ( Yi , X̃⊤i θ̃ ) X̃iX̃⊤i } . Let A be an arbitrary positive definite matrix . Define λmax ( A ) and λmin ( A ) be the maximum and minimum eigenvalues of A , respectively . We then have λmax ( H ) ≥ λmax ( Σ ) λmin ( H̃ ) and λmin ( H ) ≤ λmin ( Σ ) λmax ( H̃ ) . This further suggests that the condition number of H ( i.e. , con ( H ) = λmax ( H ) /λmin ( H ) ) satisfies the following inequality , con ( H ) ≥ con ( Σ ) / con ( H̃ ) , ( 1 ) where con ( A ) stands for the condition number of an arbitrary positive definite matrix . Note that H̃ is the expected Hessian matrix under an extremely ideal situation , where the input feature follows a standard multivariate normal distribution . This is arguable the most ideal situation for numerical optimization . We thus can reasonably expect that con ( H̃ ) should not be very large in this case . Thus , by ( 1 ) we know that con ( Σ ) should play an important role in determining the con ( H ) . In other words , the large condition number of Σ will affect con ( H ) . This makes the numerical optimization by a standard GD algorithm extremely difficult , and thus calls for a novel solution . | In this paper, a learning method that accelerates the training of DNN is proposed. Given an input X, the proposed method decomposes X as X = BZ + E where BZ is a low-rank approximation of X and E is the residual term. E is used as an input of DNN and Z is used as an additional feature of the input of the last layer. Experiments using MNIST and CIFAR10 show that the proposed method accelerates the speed to reduce the training loss. | SP:974f46bba59746cb294a5107730c8bc0d27cca85 |
Factor Normalization for Deep Neural Network Models | 1 INTRODUCTION . In recent decades , the progress of deep learning , together with advances in GPU devices , has led to a growing popularity of deep neural network ( DNN ) models in both academia and industry . DNN models have been widely used in various fields , such as image classification ( Simonyan & Zisserman , 2014 ; He et al. , 2016a ) , speech recognition ( Hinton et al. , 2012 ; Maas et al. , 2017 ) , and machine translation ( Wu et al. , 2016 ; Vaswani et al. , 2017 ) . However , due to their deep structure , most DNN models are extremely difficult to train . The practical training of a DNN model often highly depends on empirical experience and is extremely time consuming . Therefore , a series of effective optimization methods have been developed for fast DNN training . According to a recent survey paper by Sun et al . ( 2019 ) , most of the optimization methods with explicit derivatives can be roughly categorized into two groups : the first-order optimization methods and the high-order optimization methods . The widely used stochastic gradient descent ( SGD ) algorithm and its variants ( Robbins & Monro , 1951 ; Jain et al. , 2018 ) are typical examples of the first-order optimization methods . The SGD algorithm only computes the first-order derivatives ( i.e. , the gradient ) using a randomly sampled batch . By doing so , the SGD algorithm can handle large-sized datasets with limited computational resources . Unfortunately , the practical feasibility of SGD comes at the cost of sublinear convergence speed ( Johnson & Zhang , 2013a ) . For better convergence speed , various accelerated SGD algorithms have been developed . For instance , the popularly used momentum method ( Polyak , 1964 ; Qian , 1999 ) and the Nesterov Accelerated Gradient Descent ( NAG ) ( Nesterov , 1983 ; Sutskever et al. , 2013 ) method . Both of them took the information from the previous update gradient direction into consideration . Further improvements include AdaGrad ( Duchi et al. , 2011 ) , AdaDelta ( Zeiler , 2012 ) , RMSprop ( Tieleman & Hinton , 2012 ) , Adam ( Kingma & Ba , 2014 ) and others . For a more stable gradient estimation , the stochastic average gradient ( SAG ) ( Roux et al. , 2012 ) and stochastic variance reduction gradient ( SVRG ) ( Johnson & Zhang , 2013b ) methods are also developed . Except for the first-order optimization methods , high-order optimization methods also exist . Popular representatives are the Newton ’ s method and its variants ( Shanno , 1970 ; Hu et al. , 2019 ; Pajarinen et al. , 2019 ) . Compared to the first-order methods , high-order methods might lead to faster convergence speed since they take the information of Hessian matrix into consideration . For example , the Newton ’ s method can have a quadratic convergence speed under appropriate conditions ( Avriel , 2003 ) . However , calculating and storing the Hessian matrix and its inverse is extremely expensive in terms of both time and storage . This leads to the development of some approximation methods , such as Quasi-Newton method ( Avriel , 2003 ) and stochastic Quasi-Newton method ( Luo et al. , 2014 ) . The idea of Quasi or stochastic Quasi Newton method is to approximate the inverse Hessian matrix by a positive definite matrix . For example , DFP ( Fletcher & Powell , 1963 ; Davidon , 1991 ) , BFGS ( Broyden , 1970 ; Fletcher & R , 1970 ; Donald & Goldfarb , 1970 ) and L-BFGS ( Nocedal & Jorge , 1980 ; Liu & Nocedal , 1989 ) methods are popular representatives . Moreover , as a useful technique for fast convergence , various pre-conditioning techniques are also popularly used . ( Huckle , 1999 ; Benzi , 2002 ; Tang et al. , 2009 ) . The basis idea of pre-conditioning is to transform a difficult or ill-conditioned linear system ( e.g. , Aθ = b ) into an easier system with better condition ( Higham & Mary , 2019 ) . As a consequence , the information contained in the feature covariance can be effectively used ( Wang et al. , 2019 ) . Other interesting methods trying to extract useful information from the feature covariance also exist ; see for example Denton et al . ( 2015 ) , Ghiasi & Fowlkes ( 2016 ) , and Lai et al . ( 2017 ) . However , to our best knowledge , there seems no existing models or methods that are particularly designed for high-dimensional features with a factor structure . In the meanwhile , ample amounts of empirical experience suggest that most high-dimensional features demonstrate a strong factor type of covariance structure . In other words , a significant amount of the feature variability can be explained by a latent factor with very low dimensions . As a consequence , we can decompose the original features into two parts . The first is a low dimensional factor part , which accounts for a significant portion of the total volatility . The second is the residual part with factor effects removed . This residual part has the same dimension as the original feature . Consequently , it has a much reduced variability . Moreover , the inter-feature correlation is also reduced substantially . To this end , the original learning problem concerning for the high dimensional features can be decomposed into two sub learning problems . The first one is a learning problem concerning for the latent factor . This is relatively simple since the dimension of the factor is very low . The second problem is related to the residual feature . Unfortunately , this is still a challenging problem due to the high dimensions . However , compared with the original one , it is much easier because the inter feature dependence has been substantially reduced . For a practical implementation , we propose here a novel method called factor normalization . It starts with a benchmark model ( e.g. , VGG or ResNet ) and then slightly modifies the benchmark model into a new model structure . Compared with the benchmark model , the new model takes the latent factor and residuals as different inputs . The benchmark model is remained to process the residuals . The latent factor is then put back to the model in the last layer . This is to compensate for the information loss due to factor extraction . By doing so , the new model allows the factor-related features and residual-related features to be processed separately . Furthermore , different ( i.e. , adaptive ) learning rates can be allowed for factor and residuals , respectively . This leads to adaptive learning and thus fast convergence speed . The rest of this article is organized as follows . Section 2 develops our theoretical motivation with statistical insights . Section 3 provides the details of the proposed new model . Section 4 demonstrates the outstanding performance of the propose model via extensive empirical experiments . Section 5 concludes the article with a brief discussion for future research . 2 THEORETICAL MOTIVATION . To motivate our new model , we provide here a number of interesting theoretical motivations from different perspectives . Since the SGD algorithm is a stochastic version of the GD algorithm , we thus focus on a standard GD algorithm in this section for discussion simplicity . 2.1 THE GD ALGORITHM . Let ( Xi , Yi ) be the observation collected from the i-th instance with 1 ≤ i ≤ N , where Yi is often the class label and Xi = ( Xi1 , ... , Xip ) ⊤ ∈ Rp is the associated p-dimensional feature . The loss function evaluated at i is defined as ℓ ( Yi , X⊤i θ ) , where θ ∈ Rp is the unknown parameter . Then , the global loss is given by LN ( θ ) = N−1 ∑N i=1 ℓ ( Yi , X ⊤ i θ ) . The global gradient is given by L̇N ( θ ) = N−1 ∑N i=1 ℓ̇ ( Yi , X ⊤ i θ ) Xi and ℓ̇ ( y , z ) = ∂ℓ ( y , z ) /∂z . Let θ̂ ( t ) be the estimator obtained in the t-th iteration . Then , the GD algorithm updates the parameter as θ̂ ( t+1 ) = θ̂ ( t ) − αL̇N ( θ̂ ( t ) ) . Here , α is a scalar and is referred as the learning rate ( Robbins & Monro , 1951 ) . Assume that LN ( θ̂ ( t ) ) reaches its minimum at θ̂ such that L̇N ( θ̂ ) = 0 . We then apply Taylor expansion for L̇N ( θ ) at θ̂ . This leads to θ̂ ( t+1 ) − θ̂ = { Ip − αL̈N ( θ̂ ) } ( θ̂ ( t ) − θ̂ ) + o ( ∥θ̂ ( t ) − θ̂∥2 ) = K ( θ̂ ( t ) − θ̂ ) + o ( ∥θ̂ ( t ) − θ̂∥2 ) , where K = Ip−αL̈N ( θ̂ ) . We refer to K as a contraction operator , and it plays a very important role in optimization . Intuitively , all the eigenvalues of K should lie in ( −1 , 1 ) . Otherwise , the algorithm might not converge numerically . Proposition 1 Assume L̈N ( θ̂ ) to be a positive definite matrix . Let λ1 ≥ λ2 ≥ ... ≥ λp > 0 be the eigenvalues of L̈N ( θ̂ ) . To have the GD algorithm converge , we should have 0 < α < 1/λ1 . 2.2 CONDITION NUMBER . By Proposition 1 we know that the learning rate can not be too large . Otherwise the GD algorithm might not numerically converge . The size of the learning rate is controlled by the largest eigenvalue of the Hessian matrix L̈N ( θ̂ ) . The larger λ1 is , the smaller the learning rate must be , and the slower convergence speed should be . This problem is particularly serious if the condition number ( i.e. , λ1/λp ) of the Hessian matrix is very large . In that case , the large λ1 value forces the learning rate α to be very small . In the meanwhile , other small eigenvalues ( λj for j ̸= 1 ) make the convergence speed along the corresponding eigen-directions very slow . Consequently , practitioners should wish the condition number of the Hessian matrix to be as small as possible . On the other hand , as we mentioned previously , most high-dimensional features have a strong factor structure . In other words , the size of the top eigenvalues of the covariance matrix Σ is typically much larger than the rest . Consequently , the condition number of its covariance matrix is typically very large . It is then of great interest to investigate : how would this factor structure affect the condition number of the Hessian matrix ? To address this important problem , we evaluate the expected Hessian matrix as H = E ( L̈ ( θ ) ) = E { ℓ̈ ( Yi , X⊤i θ ) XiX⊤i } , where ℓ̈ ( y , z ) = ∂ℓ̇ ( y , z ) /∂z stands for the second order derivative of ℓ ( y , z ) with respect to z . For illustration purpose , assume Xi is normally distributed with mean 0 . Recall that the covariance matrix is Σ . Define X̃i = Σ−1/2Xi and θ̃ = Σ1/2θ . We then rewrite H as H = Σ1/2E { ℓ̈ ( Yi , X̃⊤i θ̃ ) X̃iX̃⊤i } Σ1/2 = Σ1/2H̃Σ1/2 , where H̃ = E { ℓ̈ ( Yi , X̃⊤i θ̃ ) X̃iX̃⊤i } . Let A be an arbitrary positive definite matrix . Define λmax ( A ) and λmin ( A ) be the maximum and minimum eigenvalues of A , respectively . We then have λmax ( H ) ≥ λmax ( Σ ) λmin ( H̃ ) and λmin ( H ) ≤ λmin ( Σ ) λmax ( H̃ ) . This further suggests that the condition number of H ( i.e. , con ( H ) = λmax ( H ) /λmin ( H ) ) satisfies the following inequality , con ( H ) ≥ con ( Σ ) / con ( H̃ ) , ( 1 ) where con ( A ) stands for the condition number of an arbitrary positive definite matrix . Note that H̃ is the expected Hessian matrix under an extremely ideal situation , where the input feature follows a standard multivariate normal distribution . This is arguable the most ideal situation for numerical optimization . We thus can reasonably expect that con ( H̃ ) should not be very large in this case . Thus , by ( 1 ) we know that con ( Σ ) should play an important role in determining the con ( H ) . In other words , the large condition number of Σ will affect con ( H ) . This makes the numerical optimization by a standard GD algorithm extremely difficult , and thus calls for a novel solution . | The paper describes a training scheme based on decomposing input features into two parts which have different training dynamics: a low rank "factor feature" computed using PCA on the raw features, and a high rank "residual". The former is processed by a very shallow network, while the latter passes through the full network, and parameters for each are updated with different learning rates. Experiments show that the proposed algorithm can speed up wall-time to a certain accuracy on MNIST and CIFAR10 classification, across several neural network architectures and optimizers. | SP:974f46bba59746cb294a5107730c8bc0d27cca85 |
Revisiting Loss Modelling for Unstructured Pruning | 1 INTRODUCTION . Neural networks are getting bigger , requiring more and more computational resources not only for training , but also when used for inference . However , resources are sometimes limited , especially on mobile devices and low-power chips . In unstructured pruning , the goal is to remove some parameters ( i.e . setting them to zeros ) , while still maintaining good prediction performances . This is fundamentally a combinatorial optimization problem which is intractable even for small scale neural networks , and thus various heuristics have been developed to prune the model either before training ( Lee et al. , 2019b ; Wang et al. , 2020 ) , during training ( Louizos et al. , 2017 ; Molchanov et al. , 2017 ; Ding et al. , 2019 ) , or in an iterative training/fine-tuning fashion ( LeCun et al. , 1990 ; Hassibi & Stork , 1993 ; Han et al. , 2015 ; Frankle & Carbin , 2018 ; Renda et al. , 2020 ) . Early pruning work Optimal Brain Damage ( OBD ) ( LeCun et al. , 1990 ) , and later Optimal Brain Surgeon ( OBS ) ( Hassibi & Stork , 1993 ) , proposed to estimate the importance of each parameter by approximating the effect of removing it , using the second order term of a Taylor expansion of the loss function around converged parameters . This type of approach involves computing the Hessian , which is challenging to compute since it scales quadratically with the number of parameters in the network . Several approximations have thus been explored in the literature ( LeCun et al. , 1990 ; Hassibi & Stork , 1993 ; Heskes , 2000 ; Zeng & Urtasun , 2019 ; Wang et al. , 2019 ) . However , state-ofthe-art unstructured pruning methods typically rely on Magnitude Pruning ( MP ) ( Han et al. , 2015 ) , a simple and computationally cheap criterion based on weight magnitude , that works extremely well in practice ( Renda et al. , 2020 ) . This paper revisits linear and diagonal quadratic models of the local loss landscape for unstructured pruning . In particular , since these models are local approximations and thus assume that pruning steps correspond to small vectors in parameter space , we propose to investigate how this locality assumption affects their performance . Moreover , we show that the convergence assumption behind OBD and OBS , which is overlooked and violated in current methods , can be relaxed by maintaining the gradient term in the quadratic model . Finally , to prevent having to compute second order information , we propose to compare diagonal quadratic models to simpler linear models . While our empirical study demonstrates that pruning criteria based on linear and quadratic loss models are good at preserving the training loss , it also shows that this benefit does not necessarily transfer to better networks after fine-tuning , suggesting that preserving the loss might not be the best objective to optimize for . Our contributions can be summarized as follows : 1 . We present pruning criteria based on both linear and diagonal quadratic models of the loss , and show how they compare at preserving training loss compared to OBD and MP . 2 . We study two strategies to better enforce locality in the pruning steps , pruning in several stages and regularising the step size , and show how they improve the quality of the criteria . 3 . We show that using pruning criteria that are better at preserving the loss does not necessarily transfer to better fine-tuned networks , raising questions about the adequacy of such criteria . 2 BACKGROUND : UNSTRUCTURED PRUNING . 2.1 UNSTRUCTURED PRUNING PROBLEM FORMULATION . For a given architecture , neural networks are a family of functions fθ : X → Y from an input space X to an output space Y , where θ ∈ RD is the vector that contains all the parameters of the network . Neural networks are usually trained by seeking parameters θ that minimize the empirical risk L ( θ ) = 1N ∑ i ` ( fθ ( xi ) , ti ) of a loss function ` on a training dataset D = { ( xi , ti ) } 1≤i≤N , composed of N ( example , target ) pairs . The goal of unstructured pruning is to find a step ∆θ to add to the current parameters θ such that ‖θ+∆θ‖0 = ( 1−κ ) D , i.e . the parameter vector after pruning is of desired sparsity κ ∈ [ 0 , 1 ] . While doing so , the performance of the pruned network should be maintained , so L ( θ + ∆θ ) should not differ much from L ( θ ) . Unstructured pruning thus amounts to the following minimization problem : minimize ∆θ ∆L ( θ , ∆θ ) def= |L ( θ + ∆θ ) − L ( θ ) | s.t . ‖θ + ∆θ‖0 = ( 1− κ ) D ( 1 ) Directly solving this problem would require evaluating L ( θ + ∆θ ) for all possible values of ∆θ , which is prohibitively expensive , so one needs to rely on heuristics to find good solutions . 2.2 OPTIMAL BRAIN DAMAGE CRITERION . Optimal Brain Damage ( OBD ) ( LeCun et al. , 1990 ) proposes to use a quadratic modelling of L ( θ + ∆θ ) , leading to the following approximation of ∆L ( θ , ∆θ ) : ∆LQM ( θ , ∆θ ) = ∣∣∣∣∣∂L ( θ ) ∂θ > ∆θ + 12∆θ > H ( θ ) ∆θ ∣∣∣∣∣ ( 2 ) where H ( θ ) is the Hessian of L ( θ ) . H ( θ ) being intractable , even for small-scale networks , its Generalized Gauss-Newton approximation G ( θ ) ( Schraudolph , 2002 ) is used in practice , as detailed in Appendix A.1 Then , two more approximations are made : first , it assumes the training of the network has converged , thus the gradient of the loss wrt θ is 0 , which makes the linear term vanish . Then , it neglects the interactions between parameters , which corresponds to a diagonal approximation of G ( θ ) , leading to the following model : ∆LOBD ( θ , ∆θk ) ≈ 1 2 Gkk ( θ ) ∆θ 2 k ⇒ sOBDk = 1 2 Gkk ( θ ) θ 2 k ( 3 ) sOBDk is the saliency of each parameter , estimating how much the loss will change if that parameter is pruned , so if ∆θk = −θk . Parameters can thus be ranked by order of importance , and the ones with the smallest saliencies ( i.e . the least influence on the loss ) are pruned , while the ones with the biggest saliencies are kept unchanged . This can be interpreted as finding and applying a binary mask m ∈ { 0 , 1 } D to the parameters such that θ + ∆θ = θ m , where is the element-wise product . 2.3 MAGNITUDE PRUNING CRITERION . Magnitude Pruning ( MP ) ( Han et al. , 2015 ) , is a popular pruning criterion in which the saliency is simply based on the norm of the parameter : sMPk = θ 2 k ( 4 ) Despite its simplicity , MP works extremely well in practice ( Gale et al. , 2019 ) , and is used in current state-of-the-art methods ( Renda et al. , 2020 ) . We use global MP as baseline in all our experiments . 1Although LeCun et al . ( 1990 ) uses H ( θ ) in the equations of OBD , it is actually G ( θ ) which was used in practice ( LeCun , 2007 ) . 2.4 OPTIMAL BRAIN SURGEON . Optimal Brain Surgeon ( OBS ) ( Hassibi & Stork , 1993 ) also relies on the quadratic model in Equation 2 to solve the minimization problem given in Equation 1 , but uses the Lagrangian formulation to include the constraint to the solution of the minimization problem . Since OBS requires to compute the inverse of H ( θ ) , several approximations have been explored in the literature , including diagonal , as in the original OBS , Kronecker-factored ( Martens & Grosse , 2015 ) as in ML-Prune ( Zeng & Urtasun , 2019 ) , or diagonal , but in an Kronecker-factored Eigenbasis ( George et al. , 2018 ) , as in EigenDamage ( Wang et al. , 2019 ) . While we use OBD in our demonstrations and experimental setup , everything presented in this paper can also be used in OBS-based methods . We leave that for future work . 3 REVISITING LOSS MODELLING FOR UNSTRUCTURED PRUNING . In this work , we investigate linear and diagonal quadratic models of the loss function and their performance when used for pruning neural networks . In our empirical study , we aim at answering the following questions : 1 . How do criteria based on weight magnitude , or linear or quadratic models compare at preserving training loss ( i.e . at solving the minimization problem in Equation 1 ) ? 2 . How does the locality assumption behind criteria based on linear and quadratic models affect their performances ? 3 . Do pruning criteria that are better at preserving the loss lead to better fine-tuned networks ? We now describe the linear and quadratic models we use , as well as the strategies to enforce locality of the pruning steps . 3.1 LINEAR AND QUADRATIC MODELS . In current training strategies , regularization techniques such as early stopping or dropout ( Srivastava et al. , 2014 ) are often used to counteract overfitting . In these setups , there is no reason to assume that the training has converged , implying that the linear term in the Taylor expansion should not be neglected . Thus , one can build a pruning criterion similar to OBD that includes the gradient term in the quadratic model from Equation 2 , leading to the following saliencies:2 ∆LQM ( θ , ∆θk ) ≈ ∣∣∣∣∣∂L ( θ ) ∂θk > ∆θk + 1 2 Gkk ( θ ) ∆θ 2 k ∣∣∣∣∣⇒ sQMk = ∣∣∣∣−∂L ( θ ) ∂θk θk + 12Gkk ( θ ) θ2k ∣∣∣∣ ( 5 ) Recall the constraint ∆θk ∈ { −θk , 0 } , hence the saliencies . This criterion generalizes OBD for networks that are not at convergence , and provides similar saliencies for networks that have converged . To avoid the computational cost associated with computing second order information , which is prohibitive for large scale neural networks , one can use a simpler linear model ( LM ) instead of a quadratic one to approximate ∆L ( θ , ∆θ ) , leading to the following approximation and saliencies : ∆LLM ( θ , ∆θ ) = ∣∣∣∣∣∂L ( θ ) ∂θ > ∆θ ∣∣∣∣∣ ⇒ sLMk = ∣∣∣∣∂L ( θ ) ∂θk θk ∣∣∣∣ ( 6 ) The saliencies of the linear model are very related to the criterion used in Single-shot Network Pruning ( Lee et al. , 2019b ) , as demonstrated by Wang et al . ( 2020 ) . 3.2 ENFORCING LOCALITY . One important point to keep in mind is that linear and quadratic models ( whether diagonal or not ) are local approximations , and are generally only faithful in a small neighbourhood of the current parameters . Explicitly showing the terms that are neglected , we have : ∆L ( θ , ∆θ ) = ∆LLM ( θ , ∆θ ) +O ( ‖∆θ‖22 ) = ∆LQM ( θ , ∆θ ) +O ( ‖∆θ‖32 ) ( 7 ) 2Note that this idea has been explored for OBS ( Singh & Alistarh , 2020 ) , as well as for structured prun- ing ( Molchanov et al. , 2019 ) So when approximating ∆L with ∆LLM we neglect the terms in O ( ‖∆θ‖22 ) , and when approximating ∆L with ∆LQM we neglect the terms in O ( ‖∆θ‖32 ) . Both approximations are thus only valid in a small neighbourhood of θ , and are extremely likely to be wrong when ‖∆θ‖2 is large . We list here different tricks to prevent this from happening . Performing the Pruning in several Stages ‖∆θ‖2 can be large when a large portion of the parameters is pruned at once . An easy fix typically used to mitigate this issue is to perform the pruning in several stages , re-estimating the model at each stage . The number of stages , which we denote by π , is typically overlooked ( e.g . both Zeng & Urtasun ( 2019 ) and Wang et al . ( 2019 ) use only 6 stages of pruning ) . Our experiments , in upcoming Section 5 , show that it has a drastic impact on the performances . Note that , without fine-tuning phases between the different pruning stages , this strategy violates the convergence assumption behind OBD and OBS , since after the first stage of pruning the network is no more at convergence . The sparsity at each stage can be increased following either a linear schedule , where each step prunes the same number of parameter , or an exponential schedule , where the number of parameters pruned at each stage gets smaller and smaller . The later is typically used in the literature ( Zeng & Urtasun , 2019 ; Wang et al. , 2019 ; Frankle & Carbin , 2018 ; Renda et al. , 2020 ) . We compare them in Section 5 . Constraining the Step Size As is often done when using quadratic models ( e.g . Nocedal & Wright ( 2006 ) ) , one can penalize the model when it decides to take steps that are too large , in order to stay in a region where we can trust the model . This can be done by simply adding the norm penalty λ2 ‖θk‖ 2 2 to the saliencies computed by any criterion ( Equations 3 , 5 or 6 ) , where λ is a hyper-parameter that controls the strength of the constraint : a small value of λ leaves the saliencies unchanged , and a large value of λ transforms the pruning criterion into MP ( Equation 4 ) . Other Considerations ‖∆θ‖2 can be large if θ is large itself . This is dependent on the training procedure of the network , but can be easily mitigated by constraining the norm of the weights , which can be done using L2 regularisation or weight decay . Since nowadays weight decay is almost systematically used by default when training networks ( e.g . He et al . ( 2016b ) ; Xie et al . ( 2017 ) ; Devlin et al . ( 2018 ) ) , we do not investigate this further . | - This paper conducted a detailed study on how does the loss modeling affects the final performance of the pruned model. The authors first provided a unified view of various pruning algorithms (e.g., Magnitude Pruning, SNIP, OBD, and OBS), which can be categorized into three classes: weight magnitude, linear and quadratic models of the loss function. In the experiments, the authors seek to answer the questions: 1) how well do each criterion preserve the loss; 2) how does the locality assumption affect the final performance; and 3) how does the loss relate to the final performance? Empirical, the authors found that the quadratic model preserves the loss the best, as expected. Also, the loss after pruning seems not strongly correlated with the performance after fine-tuning. | SP:69a60eb62ae3b7e2bb036b1434554397024a8d47 |
Revisiting Loss Modelling for Unstructured Pruning | 1 INTRODUCTION . Neural networks are getting bigger , requiring more and more computational resources not only for training , but also when used for inference . However , resources are sometimes limited , especially on mobile devices and low-power chips . In unstructured pruning , the goal is to remove some parameters ( i.e . setting them to zeros ) , while still maintaining good prediction performances . This is fundamentally a combinatorial optimization problem which is intractable even for small scale neural networks , and thus various heuristics have been developed to prune the model either before training ( Lee et al. , 2019b ; Wang et al. , 2020 ) , during training ( Louizos et al. , 2017 ; Molchanov et al. , 2017 ; Ding et al. , 2019 ) , or in an iterative training/fine-tuning fashion ( LeCun et al. , 1990 ; Hassibi & Stork , 1993 ; Han et al. , 2015 ; Frankle & Carbin , 2018 ; Renda et al. , 2020 ) . Early pruning work Optimal Brain Damage ( OBD ) ( LeCun et al. , 1990 ) , and later Optimal Brain Surgeon ( OBS ) ( Hassibi & Stork , 1993 ) , proposed to estimate the importance of each parameter by approximating the effect of removing it , using the second order term of a Taylor expansion of the loss function around converged parameters . This type of approach involves computing the Hessian , which is challenging to compute since it scales quadratically with the number of parameters in the network . Several approximations have thus been explored in the literature ( LeCun et al. , 1990 ; Hassibi & Stork , 1993 ; Heskes , 2000 ; Zeng & Urtasun , 2019 ; Wang et al. , 2019 ) . However , state-ofthe-art unstructured pruning methods typically rely on Magnitude Pruning ( MP ) ( Han et al. , 2015 ) , a simple and computationally cheap criterion based on weight magnitude , that works extremely well in practice ( Renda et al. , 2020 ) . This paper revisits linear and diagonal quadratic models of the local loss landscape for unstructured pruning . In particular , since these models are local approximations and thus assume that pruning steps correspond to small vectors in parameter space , we propose to investigate how this locality assumption affects their performance . Moreover , we show that the convergence assumption behind OBD and OBS , which is overlooked and violated in current methods , can be relaxed by maintaining the gradient term in the quadratic model . Finally , to prevent having to compute second order information , we propose to compare diagonal quadratic models to simpler linear models . While our empirical study demonstrates that pruning criteria based on linear and quadratic loss models are good at preserving the training loss , it also shows that this benefit does not necessarily transfer to better networks after fine-tuning , suggesting that preserving the loss might not be the best objective to optimize for . Our contributions can be summarized as follows : 1 . We present pruning criteria based on both linear and diagonal quadratic models of the loss , and show how they compare at preserving training loss compared to OBD and MP . 2 . We study two strategies to better enforce locality in the pruning steps , pruning in several stages and regularising the step size , and show how they improve the quality of the criteria . 3 . We show that using pruning criteria that are better at preserving the loss does not necessarily transfer to better fine-tuned networks , raising questions about the adequacy of such criteria . 2 BACKGROUND : UNSTRUCTURED PRUNING . 2.1 UNSTRUCTURED PRUNING PROBLEM FORMULATION . For a given architecture , neural networks are a family of functions fθ : X → Y from an input space X to an output space Y , where θ ∈ RD is the vector that contains all the parameters of the network . Neural networks are usually trained by seeking parameters θ that minimize the empirical risk L ( θ ) = 1N ∑ i ` ( fθ ( xi ) , ti ) of a loss function ` on a training dataset D = { ( xi , ti ) } 1≤i≤N , composed of N ( example , target ) pairs . The goal of unstructured pruning is to find a step ∆θ to add to the current parameters θ such that ‖θ+∆θ‖0 = ( 1−κ ) D , i.e . the parameter vector after pruning is of desired sparsity κ ∈ [ 0 , 1 ] . While doing so , the performance of the pruned network should be maintained , so L ( θ + ∆θ ) should not differ much from L ( θ ) . Unstructured pruning thus amounts to the following minimization problem : minimize ∆θ ∆L ( θ , ∆θ ) def= |L ( θ + ∆θ ) − L ( θ ) | s.t . ‖θ + ∆θ‖0 = ( 1− κ ) D ( 1 ) Directly solving this problem would require evaluating L ( θ + ∆θ ) for all possible values of ∆θ , which is prohibitively expensive , so one needs to rely on heuristics to find good solutions . 2.2 OPTIMAL BRAIN DAMAGE CRITERION . Optimal Brain Damage ( OBD ) ( LeCun et al. , 1990 ) proposes to use a quadratic modelling of L ( θ + ∆θ ) , leading to the following approximation of ∆L ( θ , ∆θ ) : ∆LQM ( θ , ∆θ ) = ∣∣∣∣∣∂L ( θ ) ∂θ > ∆θ + 12∆θ > H ( θ ) ∆θ ∣∣∣∣∣ ( 2 ) where H ( θ ) is the Hessian of L ( θ ) . H ( θ ) being intractable , even for small-scale networks , its Generalized Gauss-Newton approximation G ( θ ) ( Schraudolph , 2002 ) is used in practice , as detailed in Appendix A.1 Then , two more approximations are made : first , it assumes the training of the network has converged , thus the gradient of the loss wrt θ is 0 , which makes the linear term vanish . Then , it neglects the interactions between parameters , which corresponds to a diagonal approximation of G ( θ ) , leading to the following model : ∆LOBD ( θ , ∆θk ) ≈ 1 2 Gkk ( θ ) ∆θ 2 k ⇒ sOBDk = 1 2 Gkk ( θ ) θ 2 k ( 3 ) sOBDk is the saliency of each parameter , estimating how much the loss will change if that parameter is pruned , so if ∆θk = −θk . Parameters can thus be ranked by order of importance , and the ones with the smallest saliencies ( i.e . the least influence on the loss ) are pruned , while the ones with the biggest saliencies are kept unchanged . This can be interpreted as finding and applying a binary mask m ∈ { 0 , 1 } D to the parameters such that θ + ∆θ = θ m , where is the element-wise product . 2.3 MAGNITUDE PRUNING CRITERION . Magnitude Pruning ( MP ) ( Han et al. , 2015 ) , is a popular pruning criterion in which the saliency is simply based on the norm of the parameter : sMPk = θ 2 k ( 4 ) Despite its simplicity , MP works extremely well in practice ( Gale et al. , 2019 ) , and is used in current state-of-the-art methods ( Renda et al. , 2020 ) . We use global MP as baseline in all our experiments . 1Although LeCun et al . ( 1990 ) uses H ( θ ) in the equations of OBD , it is actually G ( θ ) which was used in practice ( LeCun , 2007 ) . 2.4 OPTIMAL BRAIN SURGEON . Optimal Brain Surgeon ( OBS ) ( Hassibi & Stork , 1993 ) also relies on the quadratic model in Equation 2 to solve the minimization problem given in Equation 1 , but uses the Lagrangian formulation to include the constraint to the solution of the minimization problem . Since OBS requires to compute the inverse of H ( θ ) , several approximations have been explored in the literature , including diagonal , as in the original OBS , Kronecker-factored ( Martens & Grosse , 2015 ) as in ML-Prune ( Zeng & Urtasun , 2019 ) , or diagonal , but in an Kronecker-factored Eigenbasis ( George et al. , 2018 ) , as in EigenDamage ( Wang et al. , 2019 ) . While we use OBD in our demonstrations and experimental setup , everything presented in this paper can also be used in OBS-based methods . We leave that for future work . 3 REVISITING LOSS MODELLING FOR UNSTRUCTURED PRUNING . In this work , we investigate linear and diagonal quadratic models of the loss function and their performance when used for pruning neural networks . In our empirical study , we aim at answering the following questions : 1 . How do criteria based on weight magnitude , or linear or quadratic models compare at preserving training loss ( i.e . at solving the minimization problem in Equation 1 ) ? 2 . How does the locality assumption behind criteria based on linear and quadratic models affect their performances ? 3 . Do pruning criteria that are better at preserving the loss lead to better fine-tuned networks ? We now describe the linear and quadratic models we use , as well as the strategies to enforce locality of the pruning steps . 3.1 LINEAR AND QUADRATIC MODELS . In current training strategies , regularization techniques such as early stopping or dropout ( Srivastava et al. , 2014 ) are often used to counteract overfitting . In these setups , there is no reason to assume that the training has converged , implying that the linear term in the Taylor expansion should not be neglected . Thus , one can build a pruning criterion similar to OBD that includes the gradient term in the quadratic model from Equation 2 , leading to the following saliencies:2 ∆LQM ( θ , ∆θk ) ≈ ∣∣∣∣∣∂L ( θ ) ∂θk > ∆θk + 1 2 Gkk ( θ ) ∆θ 2 k ∣∣∣∣∣⇒ sQMk = ∣∣∣∣−∂L ( θ ) ∂θk θk + 12Gkk ( θ ) θ2k ∣∣∣∣ ( 5 ) Recall the constraint ∆θk ∈ { −θk , 0 } , hence the saliencies . This criterion generalizes OBD for networks that are not at convergence , and provides similar saliencies for networks that have converged . To avoid the computational cost associated with computing second order information , which is prohibitive for large scale neural networks , one can use a simpler linear model ( LM ) instead of a quadratic one to approximate ∆L ( θ , ∆θ ) , leading to the following approximation and saliencies : ∆LLM ( θ , ∆θ ) = ∣∣∣∣∣∂L ( θ ) ∂θ > ∆θ ∣∣∣∣∣ ⇒ sLMk = ∣∣∣∣∂L ( θ ) ∂θk θk ∣∣∣∣ ( 6 ) The saliencies of the linear model are very related to the criterion used in Single-shot Network Pruning ( Lee et al. , 2019b ) , as demonstrated by Wang et al . ( 2020 ) . 3.2 ENFORCING LOCALITY . One important point to keep in mind is that linear and quadratic models ( whether diagonal or not ) are local approximations , and are generally only faithful in a small neighbourhood of the current parameters . Explicitly showing the terms that are neglected , we have : ∆L ( θ , ∆θ ) = ∆LLM ( θ , ∆θ ) +O ( ‖∆θ‖22 ) = ∆LQM ( θ , ∆θ ) +O ( ‖∆θ‖32 ) ( 7 ) 2Note that this idea has been explored for OBS ( Singh & Alistarh , 2020 ) , as well as for structured prun- ing ( Molchanov et al. , 2019 ) So when approximating ∆L with ∆LLM we neglect the terms in O ( ‖∆θ‖22 ) , and when approximating ∆L with ∆LQM we neglect the terms in O ( ‖∆θ‖32 ) . Both approximations are thus only valid in a small neighbourhood of θ , and are extremely likely to be wrong when ‖∆θ‖2 is large . We list here different tricks to prevent this from happening . Performing the Pruning in several Stages ‖∆θ‖2 can be large when a large portion of the parameters is pruned at once . An easy fix typically used to mitigate this issue is to perform the pruning in several stages , re-estimating the model at each stage . The number of stages , which we denote by π , is typically overlooked ( e.g . both Zeng & Urtasun ( 2019 ) and Wang et al . ( 2019 ) use only 6 stages of pruning ) . Our experiments , in upcoming Section 5 , show that it has a drastic impact on the performances . Note that , without fine-tuning phases between the different pruning stages , this strategy violates the convergence assumption behind OBD and OBS , since after the first stage of pruning the network is no more at convergence . The sparsity at each stage can be increased following either a linear schedule , where each step prunes the same number of parameter , or an exponential schedule , where the number of parameters pruned at each stage gets smaller and smaller . The later is typically used in the literature ( Zeng & Urtasun , 2019 ; Wang et al. , 2019 ; Frankle & Carbin , 2018 ; Renda et al. , 2020 ) . We compare them in Section 5 . Constraining the Step Size As is often done when using quadratic models ( e.g . Nocedal & Wright ( 2006 ) ) , one can penalize the model when it decides to take steps that are too large , in order to stay in a region where we can trust the model . This can be done by simply adding the norm penalty λ2 ‖θk‖ 2 2 to the saliencies computed by any criterion ( Equations 3 , 5 or 6 ) , where λ is a hyper-parameter that controls the strength of the constraint : a small value of λ leaves the saliencies unchanged , and a large value of λ transforms the pruning criterion into MP ( Equation 4 ) . Other Considerations ‖∆θ‖2 can be large if θ is large itself . This is dependent on the training procedure of the network , but can be easily mitigated by constraining the norm of the weights , which can be done using L2 regularisation or weight decay . Since nowadays weight decay is almost systematically used by default when training networks ( e.g . He et al . ( 2016b ) ; Xie et al . ( 2017 ) ; Devlin et al . ( 2018 ) ) , we do not investigate this further . | The authors study the use of loss-modeling to maintain model quality when inducing unstructured sparsity in deep neural networks. They study a range of different approximations and modifications that can help improve the quality of the approximation (taking local steps, avoid large changes in weight magnitude, avoiding assumptions about convergence). The authors conduct a thorough empirical investigation that yields practical observations for the design of future pruning techniques. | SP:69a60eb62ae3b7e2bb036b1434554397024a8d47 |
DEMI: Discriminative Estimator of Mutual Information | Estimating mutual information between continuous random variables is often intractable and extremely challenging for high-dimensional data . Recent progress has leveraged neural networks to optimize variational lower bounds on mutual information . Although showing promise for this difficult problem , the variational methods have been theoretically and empirically proven to have serious statistical limitations : 1 ) many methods struggle to produce accurate estimates when the underlying mutual information is either low or high ; 2 ) the resulting estimators may suffer from high variance . Our approach is based on training a classifier that provides the probability that a data sample pair is drawn from the joint distribution rather than from the product of its marginal distributions . Moreover , we establish a direct connection between mutual information and the average log odds estimate produced by the classifier on a test set , leading to a simple and accurate estimator of mutual information . We show theoretically that our method and other variational approaches are equivalent when they achieve their optimum , while our method sidesteps the variational bound . Empirical results demonstrate high accuracy of our approach and the advantages of our estimator in the context of representation learning . 1 INTRODUCTION . Mutual information ( MI ) measures the information that two random variables share . MI quantifies the statistical dependency — linear and non-linear — between two variables . This property has made MI a crucial measure in machine learning . In particular , recent work in unsupervised representation learning has built on optimizing MI between latent representations and observations ( Chen et al. , 2016 ; Zhao et al. , 2018 ; Oord et al. , 2018 ; Hjelm et al. , 2018 ; Tishby & Zaslavsky , 2015 ; Alemi et al. , 2018 ; Ver Steeg & Galstyan , 2014 ) . Maximization of MI has long been a default method for multi-modality image registration ( Maes et al. , 1997 ) , especially in medical applications ( Wells III et al. , 1996 ) , though in most work the dimensionality of the random variables is very low . Here , coordinate transformations on images are varied to maximize their MI . Estimating MI from finite data samples has been challenging and is intractable for most continuous probabilistic distributions . Traditional MI estimators ( Suzuki et al. , 2008 ; Darbellay & Vajda , 1999 ; Kraskov et al. , 2004 ; Gao et al. , 2015 ) do not scale well to modern machine learning problems with high-dimensional data . This impediment has motivated the construction of variational bounds for MI ( Nguyen et al. , 2010 ; Barber & Agakov , 2003 ) ; in recent years this has led to maximization procedures that use deep learning architectures to parameterize the space of functions , exploiting the expressive power of neural networks ( Song & Ermon , 2019 ; Belghazi et al. , 2018 ; Oord et al. , 2018 ; Mukherjee et al. , 2020 ) . Unfortunately , optimizing lower bounds on MI has serious statistical limitations . Specifically , McAllester & Stratos ( 2020 ) showed that any high-confidence distribution-free lower bound can not exceed O ( logN ) , where N is the number of samples . This implies that if the underlying MI is high , it can not be accurately and reliably estimated by variational methods like MINE ( Belghazi et al. , 2018 ) . Song & Ermon ( 2019 ) further categorized the state-of-the-art variational methods into “ generative ” and “ discriminative ” approaches , depending on whether they estimate the probability densities or the density ratios . They showed that the “ generative ” approaches perform poorly when the underlying MI is small and “ discriminative ” approaches perform poorly when MI is large ; moreover , certain approaches like MINE ( Belghazi et al. , 2018 ) are prone to high variances . We propose a simple discriminative approach that avoids the limitations of previous discriminative methods that are based on variational bounds . Instead of estimating density or attempting to predict one data variable from another , our method estimates the likelihood that a sample is drawn from the joint distribution versus the product of marginal distributions . A similar classifier-based approach was used by Lopez-Paz & Oquab ( 2017 ) for “ two sample testing ” – hypothesis tests about whether two samples are from the same distribution or not . If the two distributions are the joint and product of the marginals , then the test is for independence . A generalization of this work was used by Sen et al . ( 2017 ) to test for conditional independence . We show that accurate performance on this classification task provides an estimate of the log odds . This can greatly simplify the MI estimation task in comparison with generative approaches : estimating a single likelihood ratio may be easier than estimating three distributions ( the joint and the two marginals ) . Moreover , classification tasks are generally amicable to deep learning , while density estimation remains challenging in many cases . Our approach avoids the estimation of the partition function , which induces large variance in most discriminative methods ( Song & Ermon , 2019 ) . Our empirical results bear out these conceptual advantages . Our approach , as well as other sampling-based methods such as MINE , uses the given joint/paired data with derived “ unpaired ” data that captures the product of the marginal distributions p ( x ) p ( y ) . The unpaired data can be synthesized via permutations or resampling of the paired data . This construction , which synthesizes unpaired data and then defines a metric to encourage paired data points to map closer than the unpaired data in the latent space , has previously been used in other machine learning applications , such as audio-video and image-text joint representation learning ( Harwath et al. , 2016 ; Chauhan et al. , 2020 ) . Recent contrastive learning approaches ( Tian et al. , 2019 ; Hénaff et al. , 2019 ; Chen et al. , 2020 ; He et al. , 2020 ) further leverage a machine learning model to differentiate paired and unpaired data mostly in the context of unsupervised representation learning . Simonovsky et al . ( 2016 ) used paired and unpaired data in conjunction with a classifier-based loss function for patch-based image registration . This paper is organized as follows . In Section 2 , we derive our approach to estimating MI . Section 2.4 discusses connections to related approaches , including MINE . This is followed by empirical evaluation in Section 3 . Our experimental results on synthetic and real image data demonstrate the advantages of the proposed discriminative classification-based MI estimator , which has higher accuracy than the state-of-the-art variational approaches and a good bias/variance tradeoff . 2 METHODS . Let x ∈ X and y ∈ Y be two random variables generated by joint distribution p : X × Y → R+ . Mutual Information ( MI ) I ( x ; y ) ∆ = Ep ( x , y ) [ log p ( x , y ) p ( x ) p ( y ) ] ( 1 ) is a measure of dependence between x and y . Let D = { ( xi , yi ) ni=1 } be a set of n independent identically distributed ( i.i.d . ) samples from p ( x , y ) . The law of large numbers implies Îp ( D ) ∆ = 1 n n∑ i=1 log p ( xi , yi ) p ( xi ) p ( yi ) → I ( x ; y ) as n→∞ , ( 2 ) which suggests a simple estimation strategy via sampling . Unfortunately , the joint distribution p ( x , y ) is often unknown and therefore the estimate in Eq . ( 2 ) can not be explicitly computed . Here we develop an approach to accurately approximating the estimate Îp ( D ) based on discriminative learning . In our development , we will find it convenient to define a Bernoulli random variable z ∈ { 0 , 1 } and to “ lift ” the distribution p ( x , y ) to the product space X × Y × { 0 , 1 } . We thus define a family of distributions parametrized by α ∈ ( 0 , 1 ) as follows : p∗ ( x , y|z = 1 ; α ) = p ( x , y ) , ( 3 ) p∗ ( x , y|z = 0 ; α ) = p ( x ) p ( y ) , ( 4 ) p∗ ( z = 1 ; α ) = 1− p∗ ( z = 0 ; α ) = α . ( 5 ) Using Bayes ’ rule , we obtain p∗ ( z = 1|x , y ) p∗ ( z = 0|x , y ) = p∗ ( x , y , z = 1 ) p∗ ( x , y , z = 0 ) = p∗ ( x , y|z = 1 ) p∗ ( z = 1 ) p∗ ( x , y|z = 0 ) p∗ ( z = 0 ) = p ( x , y ) p ( x ) p ( y ) · α 1− α , ( 6 ) which implies that the estimate in ( 2 ) can be alternatively expressed as Îp = 1 n n∑ i=1 log p∗ ( z = 1|xi , yi ) p∗ ( z = 0|xi , yi ) − log α 1− α ( 7 ) = 1 n n∑ i=1 logit [ p∗ ( z = 1|xi , yi ) ] − logit [ α ] , ( 8 ) where logit [ u ] ∆= log u1−u is the log-odds function . Our key idea is to approximate the latent posterior distribution p∗ ( z = 1|x , y ) by a classifier that is trained to distinguish between the joint distribution p ( x , y ) and the product distribution p ( x ) p ( y ) as described below . 2.1 TRAINING SET CONSTRUCTION . We assume that we have access to a large collection D̂ of i.i.d . samples ( x , y ) from p ( x , y ) and define p̂ ( x , y ; D̂ ) , p̂ ( x ; D̂ ) , and p̂ ( y ; D̂ ) to be the empirical joint and marginal distributions respectively induced by data set D̂ . We construct the training set T = { ( xj , yj , zj ) } of m i.i.d . samples from our empirical approximation to the distribution p∗ ( x , y , z ) . Each sample is generated independently of all others as follows . First , a value zj ∈ { 0 , 1 } is sampled from the prior distribution p∗ ( z ) in ( 5 ) . If zj = 1 , then a pair ( xj , yj ) is sampled randomly from the empirical joint distribution p̂ ( x , y ; D̂ ) ; otherwise value xj is sampled randomly from the empirical marginal distribution p̂ ( x ; D̂ ) and value yj is sampled randomly from the empirical marginal distribution p̂ ( y ; D̂ ) , independently from xj . This sampling is easy to implement as it simply samples an element from a set of unique values in the original collection D̂ with frequencies adjusted to account for repeated appearances of the same value . It is straightforward to verify that any individual sample in the training set T is generated from distribution p∗ ( x , y , z ) up to the sampling of D̂ . Where D̂ is small , multiple samples may not be jointly from D̂ but from some idiosyncratic subset ; however , the empirical distribution induced by the set T converges to p∗ ( x , y , z ) as the size of available data D̂ and the size m of the training set T becomes large . | This paper proposed a discriminative estimator for mutual information, to alleviate the shortcomings of the existing estimators such as MINE and SMILE. A classifier was built to decide whether the sample is drawn from the joint distribution or the independent one (product of marginals). Theoretical justification and experimental results were provided to support the proposed estimator. The paper was written with clarity and easy to follow. | SP:810aaef2f0ad54bbd1a57053bae7860324e17602 |
DEMI: Discriminative Estimator of Mutual Information | Estimating mutual information between continuous random variables is often intractable and extremely challenging for high-dimensional data . Recent progress has leveraged neural networks to optimize variational lower bounds on mutual information . Although showing promise for this difficult problem , the variational methods have been theoretically and empirically proven to have serious statistical limitations : 1 ) many methods struggle to produce accurate estimates when the underlying mutual information is either low or high ; 2 ) the resulting estimators may suffer from high variance . Our approach is based on training a classifier that provides the probability that a data sample pair is drawn from the joint distribution rather than from the product of its marginal distributions . Moreover , we establish a direct connection between mutual information and the average log odds estimate produced by the classifier on a test set , leading to a simple and accurate estimator of mutual information . We show theoretically that our method and other variational approaches are equivalent when they achieve their optimum , while our method sidesteps the variational bound . Empirical results demonstrate high accuracy of our approach and the advantages of our estimator in the context of representation learning . 1 INTRODUCTION . Mutual information ( MI ) measures the information that two random variables share . MI quantifies the statistical dependency — linear and non-linear — between two variables . This property has made MI a crucial measure in machine learning . In particular , recent work in unsupervised representation learning has built on optimizing MI between latent representations and observations ( Chen et al. , 2016 ; Zhao et al. , 2018 ; Oord et al. , 2018 ; Hjelm et al. , 2018 ; Tishby & Zaslavsky , 2015 ; Alemi et al. , 2018 ; Ver Steeg & Galstyan , 2014 ) . Maximization of MI has long been a default method for multi-modality image registration ( Maes et al. , 1997 ) , especially in medical applications ( Wells III et al. , 1996 ) , though in most work the dimensionality of the random variables is very low . Here , coordinate transformations on images are varied to maximize their MI . Estimating MI from finite data samples has been challenging and is intractable for most continuous probabilistic distributions . Traditional MI estimators ( Suzuki et al. , 2008 ; Darbellay & Vajda , 1999 ; Kraskov et al. , 2004 ; Gao et al. , 2015 ) do not scale well to modern machine learning problems with high-dimensional data . This impediment has motivated the construction of variational bounds for MI ( Nguyen et al. , 2010 ; Barber & Agakov , 2003 ) ; in recent years this has led to maximization procedures that use deep learning architectures to parameterize the space of functions , exploiting the expressive power of neural networks ( Song & Ermon , 2019 ; Belghazi et al. , 2018 ; Oord et al. , 2018 ; Mukherjee et al. , 2020 ) . Unfortunately , optimizing lower bounds on MI has serious statistical limitations . Specifically , McAllester & Stratos ( 2020 ) showed that any high-confidence distribution-free lower bound can not exceed O ( logN ) , where N is the number of samples . This implies that if the underlying MI is high , it can not be accurately and reliably estimated by variational methods like MINE ( Belghazi et al. , 2018 ) . Song & Ermon ( 2019 ) further categorized the state-of-the-art variational methods into “ generative ” and “ discriminative ” approaches , depending on whether they estimate the probability densities or the density ratios . They showed that the “ generative ” approaches perform poorly when the underlying MI is small and “ discriminative ” approaches perform poorly when MI is large ; moreover , certain approaches like MINE ( Belghazi et al. , 2018 ) are prone to high variances . We propose a simple discriminative approach that avoids the limitations of previous discriminative methods that are based on variational bounds . Instead of estimating density or attempting to predict one data variable from another , our method estimates the likelihood that a sample is drawn from the joint distribution versus the product of marginal distributions . A similar classifier-based approach was used by Lopez-Paz & Oquab ( 2017 ) for “ two sample testing ” – hypothesis tests about whether two samples are from the same distribution or not . If the two distributions are the joint and product of the marginals , then the test is for independence . A generalization of this work was used by Sen et al . ( 2017 ) to test for conditional independence . We show that accurate performance on this classification task provides an estimate of the log odds . This can greatly simplify the MI estimation task in comparison with generative approaches : estimating a single likelihood ratio may be easier than estimating three distributions ( the joint and the two marginals ) . Moreover , classification tasks are generally amicable to deep learning , while density estimation remains challenging in many cases . Our approach avoids the estimation of the partition function , which induces large variance in most discriminative methods ( Song & Ermon , 2019 ) . Our empirical results bear out these conceptual advantages . Our approach , as well as other sampling-based methods such as MINE , uses the given joint/paired data with derived “ unpaired ” data that captures the product of the marginal distributions p ( x ) p ( y ) . The unpaired data can be synthesized via permutations or resampling of the paired data . This construction , which synthesizes unpaired data and then defines a metric to encourage paired data points to map closer than the unpaired data in the latent space , has previously been used in other machine learning applications , such as audio-video and image-text joint representation learning ( Harwath et al. , 2016 ; Chauhan et al. , 2020 ) . Recent contrastive learning approaches ( Tian et al. , 2019 ; Hénaff et al. , 2019 ; Chen et al. , 2020 ; He et al. , 2020 ) further leverage a machine learning model to differentiate paired and unpaired data mostly in the context of unsupervised representation learning . Simonovsky et al . ( 2016 ) used paired and unpaired data in conjunction with a classifier-based loss function for patch-based image registration . This paper is organized as follows . In Section 2 , we derive our approach to estimating MI . Section 2.4 discusses connections to related approaches , including MINE . This is followed by empirical evaluation in Section 3 . Our experimental results on synthetic and real image data demonstrate the advantages of the proposed discriminative classification-based MI estimator , which has higher accuracy than the state-of-the-art variational approaches and a good bias/variance tradeoff . 2 METHODS . Let x ∈ X and y ∈ Y be two random variables generated by joint distribution p : X × Y → R+ . Mutual Information ( MI ) I ( x ; y ) ∆ = Ep ( x , y ) [ log p ( x , y ) p ( x ) p ( y ) ] ( 1 ) is a measure of dependence between x and y . Let D = { ( xi , yi ) ni=1 } be a set of n independent identically distributed ( i.i.d . ) samples from p ( x , y ) . The law of large numbers implies Îp ( D ) ∆ = 1 n n∑ i=1 log p ( xi , yi ) p ( xi ) p ( yi ) → I ( x ; y ) as n→∞ , ( 2 ) which suggests a simple estimation strategy via sampling . Unfortunately , the joint distribution p ( x , y ) is often unknown and therefore the estimate in Eq . ( 2 ) can not be explicitly computed . Here we develop an approach to accurately approximating the estimate Îp ( D ) based on discriminative learning . In our development , we will find it convenient to define a Bernoulli random variable z ∈ { 0 , 1 } and to “ lift ” the distribution p ( x , y ) to the product space X × Y × { 0 , 1 } . We thus define a family of distributions parametrized by α ∈ ( 0 , 1 ) as follows : p∗ ( x , y|z = 1 ; α ) = p ( x , y ) , ( 3 ) p∗ ( x , y|z = 0 ; α ) = p ( x ) p ( y ) , ( 4 ) p∗ ( z = 1 ; α ) = 1− p∗ ( z = 0 ; α ) = α . ( 5 ) Using Bayes ’ rule , we obtain p∗ ( z = 1|x , y ) p∗ ( z = 0|x , y ) = p∗ ( x , y , z = 1 ) p∗ ( x , y , z = 0 ) = p∗ ( x , y|z = 1 ) p∗ ( z = 1 ) p∗ ( x , y|z = 0 ) p∗ ( z = 0 ) = p ( x , y ) p ( x ) p ( y ) · α 1− α , ( 6 ) which implies that the estimate in ( 2 ) can be alternatively expressed as Îp = 1 n n∑ i=1 log p∗ ( z = 1|xi , yi ) p∗ ( z = 0|xi , yi ) − log α 1− α ( 7 ) = 1 n n∑ i=1 logit [ p∗ ( z = 1|xi , yi ) ] − logit [ α ] , ( 8 ) where logit [ u ] ∆= log u1−u is the log-odds function . Our key idea is to approximate the latent posterior distribution p∗ ( z = 1|x , y ) by a classifier that is trained to distinguish between the joint distribution p ( x , y ) and the product distribution p ( x ) p ( y ) as described below . 2.1 TRAINING SET CONSTRUCTION . We assume that we have access to a large collection D̂ of i.i.d . samples ( x , y ) from p ( x , y ) and define p̂ ( x , y ; D̂ ) , p̂ ( x ; D̂ ) , and p̂ ( y ; D̂ ) to be the empirical joint and marginal distributions respectively induced by data set D̂ . We construct the training set T = { ( xj , yj , zj ) } of m i.i.d . samples from our empirical approximation to the distribution p∗ ( x , y , z ) . Each sample is generated independently of all others as follows . First , a value zj ∈ { 0 , 1 } is sampled from the prior distribution p∗ ( z ) in ( 5 ) . If zj = 1 , then a pair ( xj , yj ) is sampled randomly from the empirical joint distribution p̂ ( x , y ; D̂ ) ; otherwise value xj is sampled randomly from the empirical marginal distribution p̂ ( x ; D̂ ) and value yj is sampled randomly from the empirical marginal distribution p̂ ( y ; D̂ ) , independently from xj . This sampling is easy to implement as it simply samples an element from a set of unique values in the original collection D̂ with frequencies adjusted to account for repeated appearances of the same value . It is straightforward to verify that any individual sample in the training set T is generated from distribution p∗ ( x , y , z ) up to the sampling of D̂ . Where D̂ is small , multiple samples may not be jointly from D̂ but from some idiosyncratic subset ; however , the empirical distribution induced by the set T converges to p∗ ( x , y , z ) as the size of available data D̂ and the size m of the training set T becomes large . | This paper proposes DEMI, a discriminative approach to estimate mutual information (MI). The main idea is that, instead of learning (generative) distributions of joint and marginals, learning a single likelihood ratio that is discriminative and hence more tractable: a posterior $p(z | x, y)$ trying to distinguish between the joint distribution $p(x, y)$ and the product distribution $p(x)p(y)$. Once the posterior is learned, it can be used to estimate the MI. | SP:810aaef2f0ad54bbd1a57053bae7860324e17602 |
Non-robust Features through the Lens of Universal Perturbations | 1 INTRODUCTION . Modern deep neural networks perform extremely well across many prediction tasks , but they largely remain vulnerable to adversarial examples ( Szegedy et al. , 2014 ) . Models ’ brittleness to these small , imperceptible perturbations highlights one alarming way in which models deviate from humans . Recent work gives evidence that this deviation is due to the presence of useful non-robust features in our datasets ( Ilyas et al. , 2019 ) . These are brittle features that are sensitive to small perturbations—too small to be noticeable to humans , yet capture enough predictive signal to generalize well on the underlying classification task . When models rely on non-robust features , they become vulnerable to adversarial examples , as even small perturbations can flip the features ’ signal . While prior work gives evidence of non-robust features in natural datasets , we lack a more finegrained understanding of their properties . In general , we do not understand well how models make decisions , so it is unclear how much we can understand about these features that are believed to be imperceptible . A number of works suggest that these features may exploit certain properties of the dataset that are misaligned with human perception ( Ilyas et al. , 2019 ) , such as high-frequency information ( Yin et al. , 2019 ) , but much remains unknown . In this work , we illustrate how we can isolate more human-aligned non-robust features by imposing additional constraints on adversarial perturbations . In particular , we revisit universal adversarial perturbations ( Moosavi-Dezfooli et al. , 2017a ) , i.e . adversarial perturbations that generalize across many inputs . Prior works have observed that these perturbations appear to be semantic ( Hayes & Danezis , 2019 ; Khrulkov & Oseledets , 2018 ; Liu et al. , 2019 ) . We demonstrate that universal perturbations possess additional human-aligned properties different from standard adversarial perturbations , and analyze the non-robust features leveraged by these perturbations . Concretely , our findings are : Universal perturbations have more human-aligned properties . We show that universality adversarial perturbations have additional human-aligned properties that distinguish them from standard adversarial perturbations ( e.g. , Figure 1 ) . In particular , ( 1 ) the most semantically identifiable local patches inside universal perturbations also contain the most signal ; and ( 2 ) universal perturbations are approximately spatially invariant , in that they are still effective after translations . Non-robust features can be semantically meaningful . We show that universal perturbations are primarily relying on non-robust features rather than robust ones . Specifically , we compare the sensitivity of natural and ( adversarially ) robust models to rescalings of these perturbations to demonstrate that universal perturbations likely rely on non-robust features . Together with our first finding , this shows that some non-robust features can be human-aligned . Universal perturbations contain less non-robust signal . We find that the non-robust features leveraged by universal perturbations have less predictive signal than those leveraged by standard adversarial perturbations , despite being more human-aligned . We measure both ( 1 ) generalizability to the original test set and ( 2 ) transferability of perturbations across independent models , following the methodology of Ilyas et al . ( 2019 ) . Under these metrics , universal perturbations consistently obtain non-trivial but substantially worse performance than standard adversarial perturbations . 2 PRELIMINARIES . We consider a standard classification task : given input-label samples ( x , y ) ∈ X × Y from a data distribution D , the goal is to to learn a classifier C : X → Y that generalizes to new data . Non-robust vs. robust features . Following Ilyas et al . ( 2019 ) , we introduce the following terminology . A useful feature for classification is a function that is ( positively ) correlated with the correct label in expectation . A feature is robustly useful if , even under adversarial perturbations ( within a specified set of valid perturbations ∆ ) the feature is still useful . Finally , a useful , non-robust feature is a feature that is useful but not robustly useful . These features are useful for classification in the standard setting , but can hurt accuracy in the adversarial setting ( since their correlation with the label can be reversed ) . For conciseness , throughout this paper we will refer to such features simply as non-robust features . Universal perturbations . A universal adversarial perturbation ( or just universal perturbation for short ) , as introduced in Moosavi-Dezfooli et al . ( 2017a ) , is a perturbation δ that causes the classifier C to predict the wrong label on a large fraction of inputs from D. We focus on targeted universal perturbations that fool C into predicting a specific ( usually incorrect ) target label t. Thus , a ( targeted ) universal perturbation δ ∈ ∆ satisfies P ( x , y ) ∼D [ C ( x+δ ) = t ] = ρ , where ρ is the attack success rate ( ASR ) of the universal perturbation . The only technical difference between universal perturbations and ( standard ) adversarial perturbations is the use of a single perturbation vector δ that is applied to all inputs . Thus , one can think of universality as a constraint for the perturbation δ to be inputindependent . Universal perturbations can leverage non-robust features in data , as we show here ; we refer to these simply as universal non-robust features . ` p perturbations . We study the case where ∆ is the set of ` p-bounded perturbations , i.e . ∆ = { δ ∈ Rd | ||δ||p ≤ } for p = 2 , ∞ . This is the most widely studied setting for research on adversarial examples and has proven to be an effective benchmark ( Carlini et al. , 2019 ) . Additionally , ` p-robustness appears to be aligned to a certain degree with the human visual system ( Tsipras et al. , 2019 ) . 2.1 COMPUTING UNIVERSAL PERTURBATIONS . We compute universal perturbations by using projected gradient descent ( PGD ) on the following optimization problem : min δ∈∆ E ( x , y ) ∼D [ L ( f ( x+ δ ) , t ) ] ( 1 ) where L is the standard cross-entropy loss function for classification , and f are the logits prior to classification . and t is the target label . While many different algorithms have been developed for computing universal perturbations with varying attack success rates , we do not consider them as achieving the highest rate is not necessary for our investigations . As observed in Moosavi-Dezfooli et al . ( 2017a ) , universal perturbations trained on only a fraction of the dataset still generalize to the rest of the dataset , so in practice it suffices to approximate the expectation in equation 1 using a relatively small batch of data drawn from D. We call the batch we optimize over the base set , and use K to refer to its size . We describe the selection of all hyperparameters in Appendix B . 2.2 EXPERIMENTAL SETTINGS . Datasets . We conduct our experiments on a subset of ImageNet ( Deng et al. , 2009 ) and CIFAR-10 ( Krizhevsky et al. , 2009 ) . The Mixed10 ImageNet dataset ( Engstrom et al. , 2019 ) , which we refer to as ImageNet-M10 , is formed by sub-selecting and grouping together semantically similar classes from ImageNet ; it provides a more computationally efficient alternative to the full dataset , while retaining some of ImageNet ’ s complexity ( see Appendix B.1 for more details about the dataset ) . In the main text , we focus our results on ImageNet-M10 , and in the Appendices we provide additional results on CIFAR-10 as well as visualizations from a full ImageNet model . Models . We use the standard ResNet-18 architecture ( He et al. , 2016 ) unless mentioned otherwise . 3 PROPERTIES OF UNIVERSAL PERTURBATIONS . We find that universal perturbations , in contrast to adversarial perturbations , are much more aligned with human perception . Beyond visualizations , we demonstrate this in the following ways : ( 1 ) local patches that are most semantically identifiable with the target class also contain the most predictive signal ; and ( 2 ) universal perturbations are approximately spatially invariant , whereas standard perturbations are not . 3.1 PERCEPTUAL ALIGNMENT . Visual comparison with standard adversarial perturbations . Standard ` p adversarial perturbations are often thought to be incomprehensible to humans ( Szegedy et al. , 2014 ; Ilyas et al. , 2019 ) . Even when magnified for visualization , these perturbations are not identifiable with their target class . In contrast , universal perturbations are visually more interpretable : when amplified , they contain local regions that we can identify with the target class ( see Figure 2 for example universal perturbations , and Figure 1 for a comparison to standard perturbations ) . Prior works have also observed that universal perturbations resemble their target class ( Hayes & Danezis , 2019 ) and contain meaningful texture patterns ( Khrulkov & Oseledets , 2018 ; Liu et al. , 2019 ) . Next , we go beyond simple visualizations by identifying two additional human-aligned properties of universal perturbations . Predictive signals are localized to most semantically identifiable patches . While universal perturbations contain parts that are semantically identifiable with the target class , they also contain less identifiable regions ; a priori , it is unclear which parts influencing the model . To investigate this , we randomly select different local patches of the perturbation , evaluate their ASR in isolation , and inspect them visually . For ` 2 perturbations , the patches vary widely in norm , so a possible concern is that the model is only reacting to the patches with the highest norm ; to correct for this , we linearly scale up all patches to have the same norm as the largest norm patch . Even after normalization , the patches with the highest ASR are more semantically identifiable with the target class ( Figure 3 ) . For ` ∞ perturbations , where all patches have similar norms ( so no further normalization is done ) , we also observe that their ASR is proportional to their visual saliency . This demonstrates that the model is indeed reacting primarily to the most salient parts of the perturbation . do g ( 2 ) ASR : 0.494 0.237 0.220 0.205 0.098 0.098 do g ( ) ASR : 0.597 0.167 0.163 0.159 0.101 0.101 Figure 3 : Local analysis of universal perturbations on ImageNet-M10 : 64 random 80×80 patches are isolated and evaluated for their ASR . First column shows the original perturbation for the target class ( top : ` 2 ; bottom : ` ∞ ) ; next five columns show three patches with the highest ASR , and two with the lowest . Top of each perturbation indicates its ASR on the test set . Patches are normalized . 3.2 SPATIAL INVARIANCE . Adversarial perturbations are not only unintelligible but also extremely brittle to translations , as we demonstrate . In contrast , we find that universal perturbations are translationally invariant to a large degree . As spatial invariance is one of the key properties of the human visual system ( Hubel & Wiesel , 1968 ) , this illustrates another way that universal perturbations are more human-aligned than standard perturbations . We quantify spatial invariance by measuring the ASR of translated perturbations . Specifically , we compute targeted standard adversarial perturbations on a sample of 256 images from the ImageNetM10 test set . Then , we evaluate the ASR of different translated copies of these perturbations over the test set ( copies of each perturbation are evaluated only on its corresponding image ) . For comparison , we take a precomputed set of universal perturbations of the same norm , and evaluate them across all images . Figure 16 shows that universal perturbations still achieve non-trivial ASR after translations of varying magnitudes . In contrast , standard adversarial perturbations achieve a chance-level 10 % ASR when shifted by more than eight pixels ( two grid cells in Figure 16 ) . This illustrates that the model reacts differently to universal perturbations than to standard adversarial perturbations . | Prior works generally thought non-robust features, which are vulnerable to small perturbations, are not semantically meaningful but are useful for generalization. This work challenges these traditional beliefs by pointing out that non-robust features can also be human-perception aligned and be less useful for generalization, if these non-robust features are discovered via universal adversarial perturbations (rather than via image-dependent perturbations). Extensive experiments are provided to justified these arguments. | SP:3798e47ac56ab60bb2a913429c72ed2dff66531a |
Non-robust Features through the Lens of Universal Perturbations | 1 INTRODUCTION . Modern deep neural networks perform extremely well across many prediction tasks , but they largely remain vulnerable to adversarial examples ( Szegedy et al. , 2014 ) . Models ’ brittleness to these small , imperceptible perturbations highlights one alarming way in which models deviate from humans . Recent work gives evidence that this deviation is due to the presence of useful non-robust features in our datasets ( Ilyas et al. , 2019 ) . These are brittle features that are sensitive to small perturbations—too small to be noticeable to humans , yet capture enough predictive signal to generalize well on the underlying classification task . When models rely on non-robust features , they become vulnerable to adversarial examples , as even small perturbations can flip the features ’ signal . While prior work gives evidence of non-robust features in natural datasets , we lack a more finegrained understanding of their properties . In general , we do not understand well how models make decisions , so it is unclear how much we can understand about these features that are believed to be imperceptible . A number of works suggest that these features may exploit certain properties of the dataset that are misaligned with human perception ( Ilyas et al. , 2019 ) , such as high-frequency information ( Yin et al. , 2019 ) , but much remains unknown . In this work , we illustrate how we can isolate more human-aligned non-robust features by imposing additional constraints on adversarial perturbations . In particular , we revisit universal adversarial perturbations ( Moosavi-Dezfooli et al. , 2017a ) , i.e . adversarial perturbations that generalize across many inputs . Prior works have observed that these perturbations appear to be semantic ( Hayes & Danezis , 2019 ; Khrulkov & Oseledets , 2018 ; Liu et al. , 2019 ) . We demonstrate that universal perturbations possess additional human-aligned properties different from standard adversarial perturbations , and analyze the non-robust features leveraged by these perturbations . Concretely , our findings are : Universal perturbations have more human-aligned properties . We show that universality adversarial perturbations have additional human-aligned properties that distinguish them from standard adversarial perturbations ( e.g. , Figure 1 ) . In particular , ( 1 ) the most semantically identifiable local patches inside universal perturbations also contain the most signal ; and ( 2 ) universal perturbations are approximately spatially invariant , in that they are still effective after translations . Non-robust features can be semantically meaningful . We show that universal perturbations are primarily relying on non-robust features rather than robust ones . Specifically , we compare the sensitivity of natural and ( adversarially ) robust models to rescalings of these perturbations to demonstrate that universal perturbations likely rely on non-robust features . Together with our first finding , this shows that some non-robust features can be human-aligned . Universal perturbations contain less non-robust signal . We find that the non-robust features leveraged by universal perturbations have less predictive signal than those leveraged by standard adversarial perturbations , despite being more human-aligned . We measure both ( 1 ) generalizability to the original test set and ( 2 ) transferability of perturbations across independent models , following the methodology of Ilyas et al . ( 2019 ) . Under these metrics , universal perturbations consistently obtain non-trivial but substantially worse performance than standard adversarial perturbations . 2 PRELIMINARIES . We consider a standard classification task : given input-label samples ( x , y ) ∈ X × Y from a data distribution D , the goal is to to learn a classifier C : X → Y that generalizes to new data . Non-robust vs. robust features . Following Ilyas et al . ( 2019 ) , we introduce the following terminology . A useful feature for classification is a function that is ( positively ) correlated with the correct label in expectation . A feature is robustly useful if , even under adversarial perturbations ( within a specified set of valid perturbations ∆ ) the feature is still useful . Finally , a useful , non-robust feature is a feature that is useful but not robustly useful . These features are useful for classification in the standard setting , but can hurt accuracy in the adversarial setting ( since their correlation with the label can be reversed ) . For conciseness , throughout this paper we will refer to such features simply as non-robust features . Universal perturbations . A universal adversarial perturbation ( or just universal perturbation for short ) , as introduced in Moosavi-Dezfooli et al . ( 2017a ) , is a perturbation δ that causes the classifier C to predict the wrong label on a large fraction of inputs from D. We focus on targeted universal perturbations that fool C into predicting a specific ( usually incorrect ) target label t. Thus , a ( targeted ) universal perturbation δ ∈ ∆ satisfies P ( x , y ) ∼D [ C ( x+δ ) = t ] = ρ , where ρ is the attack success rate ( ASR ) of the universal perturbation . The only technical difference between universal perturbations and ( standard ) adversarial perturbations is the use of a single perturbation vector δ that is applied to all inputs . Thus , one can think of universality as a constraint for the perturbation δ to be inputindependent . Universal perturbations can leverage non-robust features in data , as we show here ; we refer to these simply as universal non-robust features . ` p perturbations . We study the case where ∆ is the set of ` p-bounded perturbations , i.e . ∆ = { δ ∈ Rd | ||δ||p ≤ } for p = 2 , ∞ . This is the most widely studied setting for research on adversarial examples and has proven to be an effective benchmark ( Carlini et al. , 2019 ) . Additionally , ` p-robustness appears to be aligned to a certain degree with the human visual system ( Tsipras et al. , 2019 ) . 2.1 COMPUTING UNIVERSAL PERTURBATIONS . We compute universal perturbations by using projected gradient descent ( PGD ) on the following optimization problem : min δ∈∆ E ( x , y ) ∼D [ L ( f ( x+ δ ) , t ) ] ( 1 ) where L is the standard cross-entropy loss function for classification , and f are the logits prior to classification . and t is the target label . While many different algorithms have been developed for computing universal perturbations with varying attack success rates , we do not consider them as achieving the highest rate is not necessary for our investigations . As observed in Moosavi-Dezfooli et al . ( 2017a ) , universal perturbations trained on only a fraction of the dataset still generalize to the rest of the dataset , so in practice it suffices to approximate the expectation in equation 1 using a relatively small batch of data drawn from D. We call the batch we optimize over the base set , and use K to refer to its size . We describe the selection of all hyperparameters in Appendix B . 2.2 EXPERIMENTAL SETTINGS . Datasets . We conduct our experiments on a subset of ImageNet ( Deng et al. , 2009 ) and CIFAR-10 ( Krizhevsky et al. , 2009 ) . The Mixed10 ImageNet dataset ( Engstrom et al. , 2019 ) , which we refer to as ImageNet-M10 , is formed by sub-selecting and grouping together semantically similar classes from ImageNet ; it provides a more computationally efficient alternative to the full dataset , while retaining some of ImageNet ’ s complexity ( see Appendix B.1 for more details about the dataset ) . In the main text , we focus our results on ImageNet-M10 , and in the Appendices we provide additional results on CIFAR-10 as well as visualizations from a full ImageNet model . Models . We use the standard ResNet-18 architecture ( He et al. , 2016 ) unless mentioned otherwise . 3 PROPERTIES OF UNIVERSAL PERTURBATIONS . We find that universal perturbations , in contrast to adversarial perturbations , are much more aligned with human perception . Beyond visualizations , we demonstrate this in the following ways : ( 1 ) local patches that are most semantically identifiable with the target class also contain the most predictive signal ; and ( 2 ) universal perturbations are approximately spatially invariant , whereas standard perturbations are not . 3.1 PERCEPTUAL ALIGNMENT . Visual comparison with standard adversarial perturbations . Standard ` p adversarial perturbations are often thought to be incomprehensible to humans ( Szegedy et al. , 2014 ; Ilyas et al. , 2019 ) . Even when magnified for visualization , these perturbations are not identifiable with their target class . In contrast , universal perturbations are visually more interpretable : when amplified , they contain local regions that we can identify with the target class ( see Figure 2 for example universal perturbations , and Figure 1 for a comparison to standard perturbations ) . Prior works have also observed that universal perturbations resemble their target class ( Hayes & Danezis , 2019 ) and contain meaningful texture patterns ( Khrulkov & Oseledets , 2018 ; Liu et al. , 2019 ) . Next , we go beyond simple visualizations by identifying two additional human-aligned properties of universal perturbations . Predictive signals are localized to most semantically identifiable patches . While universal perturbations contain parts that are semantically identifiable with the target class , they also contain less identifiable regions ; a priori , it is unclear which parts influencing the model . To investigate this , we randomly select different local patches of the perturbation , evaluate their ASR in isolation , and inspect them visually . For ` 2 perturbations , the patches vary widely in norm , so a possible concern is that the model is only reacting to the patches with the highest norm ; to correct for this , we linearly scale up all patches to have the same norm as the largest norm patch . Even after normalization , the patches with the highest ASR are more semantically identifiable with the target class ( Figure 3 ) . For ` ∞ perturbations , where all patches have similar norms ( so no further normalization is done ) , we also observe that their ASR is proportional to their visual saliency . This demonstrates that the model is indeed reacting primarily to the most salient parts of the perturbation . do g ( 2 ) ASR : 0.494 0.237 0.220 0.205 0.098 0.098 do g ( ) ASR : 0.597 0.167 0.163 0.159 0.101 0.101 Figure 3 : Local analysis of universal perturbations on ImageNet-M10 : 64 random 80×80 patches are isolated and evaluated for their ASR . First column shows the original perturbation for the target class ( top : ` 2 ; bottom : ` ∞ ) ; next five columns show three patches with the highest ASR , and two with the lowest . Top of each perturbation indicates its ASR on the test set . Patches are normalized . 3.2 SPATIAL INVARIANCE . Adversarial perturbations are not only unintelligible but also extremely brittle to translations , as we demonstrate . In contrast , we find that universal perturbations are translationally invariant to a large degree . As spatial invariance is one of the key properties of the human visual system ( Hubel & Wiesel , 1968 ) , this illustrates another way that universal perturbations are more human-aligned than standard perturbations . We quantify spatial invariance by measuring the ASR of translated perturbations . Specifically , we compute targeted standard adversarial perturbations on a sample of 256 images from the ImageNetM10 test set . Then , we evaluate the ASR of different translated copies of these perturbations over the test set ( copies of each perturbation are evaluated only on its corresponding image ) . For comparison , we take a precomputed set of universal perturbations of the same norm , and evaluate them across all images . Figure 16 shows that universal perturbations still achieve non-trivial ASR after translations of varying magnitudes . In contrast , standard adversarial perturbations achieve a chance-level 10 % ASR when shifted by more than eight pixels ( two grid cells in Figure 16 ) . This illustrates that the model reacts differently to universal perturbations than to standard adversarial perturbations . | This paper studies the link between non-robust features and universal adversarial perturbations. This paper shows that universal perturbation leverage non-robust features in data in a different way than standard adversarial attacks. Experiments are based on a universal version of projected gradient descent (PGD). The findings are that universal perturbations are more aligned with visual semantics and human perception that general adversarial attacks. Moreover, it is shown to be difficult to obtain generalisation or transferability between models based on universal signals, as opposed to standard adversarial samples. Generalization seems to decrease with the size of the set used for generating a given universal perturbation, while semantics of the features improve. | SP:3798e47ac56ab60bb2a913429c72ed2dff66531a |
Ablation Path Saliency | 1 Introduction The basic idea of saliency or attribution is to provide something from which a human can judge how a classifier arrived at its decision of the prediction it gives for a certain input . It is difficult to give a more mathematical definition , but various properties that such a method should fulfill have been proposed . Sundararajan et al . ( 2017 ) give axioms , of which sensitivity comes closest to the notion of saliency . Essentially , the features on which the output is most sensitive should be given a higher saliency value . The authors give further axioms to narrow it down – implementation invariance , completeness , linearity and symmetry-preservation – and obtain a corresponding method : the integrated gradient method . Note that we have another way to arrive at a similar method , see §4.1 Fong & Vedaldi ( 2017 ) is closer to our work : the authors directly compute the saliency of a given pixel by deleting , or altering that pixel , to see how this affects the output of the classifier . Our method is to define a proper maximisation problem as follows . First , we define ablation paths as time dependent smooth masks φ : [ 0 , 1 ] → C ( Ω , R ) , going a full mask to an empty mask , such that at each pixel the mask value decreases over time ( see Figure 1 ) . We also impose constant area speed : the area covered by the mask should increase linearly over time ( see §3 ) . Let F be the classifier , that outputs a probability between zero and one . We choose a current image of interest x0 and a baseline image x1 . The objective function is then P ( φ ) = ∫ 1 0 F ( x0 +φ ( t ) ( x1−x0 ) ) dt ( see §4 ) . Assuming that F ( x0 ) ≃ 1 and F ( x1 ) ≃ 0 , maximising the objective function means that we try to find an ablation path that stays as long as possible in the decision region of x0 . Intuitively , we try to replace as many pixels of x0 by pixels of x1 while staying in the same class as x0 . The main contribution of this paper is to formulate the saliency problem as an optimisation problem on paths . Doing so connects previous notions of saliency , notably integrated gradients Sundararajan et al . ( 2017 ) ( see §4.1 ) , the ablation tests Sturmfels et al . ( 2020 ) ( see §4.2 ) , and meaningful perturbations Fong & Vedaldi ( 2017 ) ; Fong et al . ( 2019 ) ( see § 4.3 ) . Our formulation is also resolution invariant ( it does not assume that images are defined on pixels ) ; this allows to make a clear difference between images and their duals , for instance , which gives guidance as to where regularisation is needed . 2 Related Work Simonyan et al . ( 2013 ) defines a saliency map as the gradient of the network output at the given image . This would appear to be a sensible definition , but the resulting saliency is very noisy because the network output is roughly constant around any particular image . Selvaraju et al . ( 2016 ) improves the situation by computing the gradient after each layer instead . This is , however , not a black-box method such as the one we propose . Koh & Liang ( 2017 ) computes an influence function , that is , a function that measures how the parameters would be changed by a change in the training data . Although it is a black-box method , it is not a saliency method per se . They use the gradient of the network output to find the pixel most likely to have a high saliency . The pixel that have most effect are given a higher saliency . By contrast , Petsiuk et al . ( 2018 ) proposes to directly evaluate the saliency by finding out which pixels most affect the output , similarly to Fong & Vedaldi ( 2017 ) , but without using any gradients . There are a number of meta-studies of saliency methods . Adebayo et al . ( 2018 ) lists essential properties , for instance the requirement that the results should depend on the training data in a sense that perturbing model parameters should change the saliency . Kindermans et al . ( 2017 ) proposes a number of property that saliency methods should satisfy . Ancona et al . ( 2017 ) compares several saliency methods and proposes a method to evaluate them ( the sensitiviy-n property ) . 3 Ablation Paths 3.1 Images and Masks We consider a compact domain Ω . Note that Ω may be discrete or continuous : in fact , we assume that Ω is endowed with a measure which could be the discrete measure ( if Ω is a set of pixels ) or the Lebesgue measure ( if Ω is a domain in R2 , for instance ) . In the sequel , ∫ Ω denotes integration with respect to that measure . Without loss of generality , we assume the mass of that measure to be one , i.e. , ∫ Ω 1 = 1 . We consider a module M of functions on Ω with values in a vector space V ( the dimensions of V represent the channels , and elements of M represent images ) . This module is equipped with a commutative ring R which represents masks . Concretely , in most of the paper we choose M : = C ( Ω , V ) R : = C ( Ω , R ) . The module structure simply means that masks can multiply images , i.e. , that the operation θx gives a new image inM when θ ∈ R and x ∈M , and that this operation is bilinear . 3.2 Ablation Paths Definition 3.1 . We define the setA of ablation paths as the set of functions φ : [ 0 , 1 ] → R fulfilling the following properties : Boundary conditions φ ( 0 ) = 0 and φ ( 1 ) = 1 Monotonicity t1 ≤ t2 =⇒ φ ( t1 ) ≤ φ ( t2 ) t1 , t2 ∈ [ 0 , 1 ] Constant speed ∫ Ω φ ( t ) = t t ∈ [ 0 , 1 ] . We will call monotone paths the paths that verify the first two conditions but not the third . Note that the set A of ablation paths is a convex subset of L∞ ( [ 0 , 1 ] , R ) . Some comments on each of those requirements are in order . ( i ) 0 and 1 denote here the constant functions zero and one ( which corresponds to the zero and one of the algebra R ) ( ii ) φ ( t1 ) ≤ φ ( t2 ) should be interpreted as usual as φ ( t2 ) − φ ( t1 ) being in the cone of nonnegative elements1 . ( iii ) If t 7→ ∫ Ω φ ( t ) is differentiable , this requirement can be rewritten as ddt ∫ Ω φ ( t ) = 1 , so it can be regarded as a constant speed requirement . This requirement is more a normalisation than a requirement , as is further detailed in Remark 3.3 . There is a canonical , simplest , ablation path between x0 and x1 : ℓ ( t ) : = t. ( 1 ) The mask is thus constant in space at each time t. The reader should check that all the requirements for an ablation path are fulfilled . Note that an ablation path without the constant-speed property can always be transformed into one that does fulfil it . This is clear if the function t 7→ ∫ Ω φ ( t ) is strictly increasing , as this is then just a time reparameterisation , but this is in fact always possible , in a canonical sense . The proof is in Appendix A. Lemma 3.2 . To any monotone path there corresponds a canonical ablation path . Since R is itself a function space , an ablation path φ is in fact a function of two arguments . In the sequel , we will abuse the notations and write φ as a function of one or two arguments depending on the context : φ ( t ) ≡ φ ( t , · ) . For instance , in the definition Definition 3.1 above , ∫ Ω φ ( t ) ≡∫ Ω φ ( t , · ) ≡ ∫ Ω φ ( t , r ) dr . Remark 3.3 . If the ablation path φ is differentiable in time , the requirements in Definition 3.1 admit a remarkable reformulation . Define ψ ( t ) : = ddtφ ( t ) . All the requirements in Definition 3.1 are equivalent to the following requirements for a function ψ : [ 0 , 1 ] × Ω→ R : ψ ( t , r ) ≥ 0 , ∫ Ω ψ ( t , r ) dr = 1 , ∫ [ 0,1 ] ψ ( t , r ) dt = 1 t ∈ [ 0 , 1 ] , r ∈ Ω The corresponding ablation path φ is then recovered by φ ( t ) : = ∫ t 0 ψ ( s ) ds . What this means is that differentiable ablation paths can be parameterised as densities of doubly stochastic Markov transition kernels on [ 0 , 1 ] × Ω . 3.3 Regularity of Ablation Paths Lemma 3.4 . If φ is an ablation path , then ∥φ ( t1 ) − φ ( t0 ) ∥L1 = |t1 − t0| . In particular , t 7→ φ ( t , · ) is continuous as a function [ 0 , 1 ] → L1 ( Ω ) . Proof . Choose t0 , t1 in [ 0 , 1 ] . Without loss of generality , assume t1 ≥ t0 . Then , ∫ Ω |φ ( t1 ) −φ ( t0 ) | =∫ Ω ( φ ( t1 ) − φ ( t0 ) ) = t1 − t0 , from which we conclude that φ ( t1 ) − φ ( t0 ) is in L1 and fulfils the equation above . 4 Score of an Ablation Path We now fix two points x0 ( the current image ) and x1 ( the baseline image ) in the space of imagesM . We propose the following measure of the score of an ablation path ( see Definition 3.1 ) with respect 1Here we can define the cone of nonnegative functions by { f ∈ C ( Ω , R ) | f ≥ 0 } . In a general star algebra , this cone would be defined as { x ∈ R | ∃y ∈ R x = y∗y } . to these two images . Given a mask θ ∈ R , we define the interpolated image [ x0 , x1 ] θ ∈M as [ x0 , x1 ] θ : = ( 1− θ ) x0 + θx1 . We now define the score function P : A → R from ablation paths to R by the integral P ( φ ) : = ∫ 1 0 F ( [ x0 , x1 ] φ ( t ) ) dt . ( 2 ) Note that , as F is bounded between zero and one , so is P ( φ ) for any ablation path φ . The main idea is that if F ( x0 ) ≃ 1 and F ( x1 ) ≃ 0 , the higher this value of P is , the better the path is to describe the salient parts of the image . Note that the function P is defined regardless of the constraints placed on ablation paths , i.e. , the score function P is defined on the vector space of functions φ : [ 0 , 1 ] → R. It is straightforward to compute its differential dP on that space : ⟨dP , δφ⟩ = ∫ 1 0 ⟨dF [ x0 , x1 ] φ ( t ) ︸ ︷︷ ︸ ∈M∗ , ( x1 − x0 ) ︸ ︷︷ ︸ ∈M δφ ( t ) ︸ ︷︷ ︸ ∈R ⟩ dt . So if we define the product of D ∈ M∗ and x ∈ M producing an element in R∗ by ⟨xD , φ⟩ : = ⟨D , xφ⟩ as is customary , we can rewrite this differential as ⟨dP , δφ⟩ = ∫ 1 0 ⟨ ( x1 − x0 ) dF [ x0 , x1 ] φ ( t ) , δφ ( t ) ⟩ dt . Note that we know that any ablation path is bounded , so φ ∈ L∞ ( [ 0 , 1 ] , R ) , so the differential of P at φ can be identified with the function dPφ = [ t 7→ ( x1 − x0 ) dF [ x0 , x1 ] φ ( t ) ] in L1 ( [ 0 , 1 ] , R∗ ) . 4.1 Relation with the Integrated Gradient Method When this differential is computed on the interpolation path ℓ ( 1 ) and then averaged , then this is exactly the integrated average gradient Sundararajan et al . ( 2017 ) . More precisely , the integrated gradient is exactly ∫ 1 0 dPℓ ( t ) dt . Note that this is in fact an integrated differential , since we obtain an element in the dual spaceM∗ , and this differential should be appropriately smoothed along the lines of §5.1 . 4.2 Relation to Pixel Ablation Given a saliency function σ ∈ R we can define a path by φ̃ ( t ) : = 1σ≤log ( t/ ( 1−t ) ) when t ∈ ( 0 , 1 ) and define φ̃ ( 0 ) : = 0 , φ̃ ( 1 ) : = 1 . This path is a monotone path , except in the module of images M = L2 ( Ω , V ) , equipped with the ring of masks R = L∞ ( Ω ) . To be an ablation path , it still needs to be transformed into a constant speed path , which is always possible as explained in Appendix A . Note that this is a generalisation of the ablation method in Sturmfels et al . ( 2020 ) . In that case , the set Ω would be a discrete set of pixels . Note that in the ranking , pixels with the same saliency would be ranked in an arbitrary way and added to the mask in that arbitrary order . In the method above , we add them all at once , but the time reparameterisation keeps that function constant longer for however many pixels were ranked the same . As long as the ranking is strict ( no two pixels have the same saliency ) , the two methods are the same . 4.3 Relation to Meaningful Perturbations In the saturated case , that is , if F only takes values zero and one ( or in the limit where it does ) , our method basically reduces to finding the interpolation with the largest mask on the boundary , in essence the approach of Fong & Vedaldi ( 2017 ) . Indeed , suppose that the ablation path φ crosses the boundary at time t∗ . It means that F ( [ x0 , x1 ] φ ( t ) ) has value one until t∗ and zero afterwards , so the score P defined in ( 2 ) is P ( φ ) = t∗ . By the constant speed property , t∗ = ∫ Ω φ ( t∗ ) , so we end up maximising the mask area on the boundary . 5 Optimisation Problem and Algorithm We proceed to define the optimisation problem at hand and how to solve it numerically . Conceptually we try to find the ablation path ( see Definition 3.1 ) that maximises the score P ( φ ) : max φ∈A P ( φ ) . Recall that the set A of ablation paths is convex ; however , since the objective function P is not convex , this is not a convex optimisation problem . The method we suggest is to follow a gradient direction . Such an approach is in general not guaranteed to approximate a global maximum , but empirically it does manage that quite well here . 5.1 Gradient and Metric Note that the differential is an element of L1 ( [ 0 , 1 ] , R∗ ) , so we need a map from that space to L∞ ( [ 0 , 1 ] , R ) . For now we assume that φ ∈ L2 ( [ 0 , 1 ] , R ) and dP ∈ L2 ( [ 0 , 1 ] , R∗ ) . However , we still need a covariance operatorK : R∗ → R. In practice , we use a covariance operator associated to a smoothing operator . For ameasureµ ∈ R∗ , ⟨Kµ , θ⟩ : = ⟨µ , ∫ Ω k ( ·−r ) θ ( r ) dr⟩ , where k is a suitable smoothing function , for instance k ( r ) = exp ( −∥r∥2/σ ) . This allows us to consider the gradient of P . Note that different choices of metric will influence on the algorithm . Since the optimisation problem is constrained ( since φ is constrained by the requirements in Definition 3.1 ) , following the gradient direction will lead us to violate the constraints . Since the constraints are convex , it is straightforward enough to project each gradient-updated version back to something that does fulfill them , and indeed that is the idea behind our algorithm , however in practice it does by itself not yield convergence without impractically many iterations . See Appendix C for the details of how we actually proceed . 6 Examples To test out our path-scoring approach and the saliency method based on its optimisation , we use a standard image classifier deep-CNN ( Inception v4 Szegedy et al . ( 2016 ) , pre-trained on ImageNet ) , with a selection of real-world images for both the current target and baseline inputs . For each example pair , we compare multiple saliency methods . Our algorithm yields a whole path of masks , which can not as a whole be visualised in one 2D view . Generally , the threshold mask , which we define as the mask right where the path crosses the decision boundary , is most insightful : it still preserves enough of the image to be classified correctly , but no more . All of the images in this section refer to that selection , and where the threshold lies in the path is indicated by the vertical black line in the score plots . To be precise , this is the mask that preserves as little of the image as possible whilst still resulting in the intended class keeping the highest probability among the classes in the classifier ’ s prediction . Note that although the threshold mask encapsulates a large part of our method ’ s useful output , we find that the additional information from the rest of the path , and the score-plot along the path , also provide good diagnostics especially in examples where the mask highlights an unexpected region of the image . Figure 2 is an example with particularly clear-cut interpretation : the vibrantly coloured rubber eraser is sufficient to retain the classification even in an almost completely ablated image . All of the compared methods manage to find a mask that focuses in on that , though with differences in the details . The unconstrained optimisation narrows it down to a few individual pixels , which gives an extremely good score ( somewhat unsurprisingly , since that is what is being optimised ) , but the result is hardly useful for interpretability purposes : this should be considered an adversarial example . One interpretation of this is that identifying the gradient with the differential implies that the space of masksR is essentially bounded functions wihout further regularity ( see §5.1 ) , similar to the mask space in §4.2 . The region boundary in that space seems to be extremely close to the baseline , and the optimisation method finds those adversarial examples . The integrated gradient method in principle also has this issue , and indeed the corresponding mask ( pixel ranking , cf . § 4.2 ) is quite grainy/noisy , without however behaving adversarially ( the entire pencil is highlighted ) . The authors in Fong & Vedaldi ( 2017 ) were confronted with similar problems . We use smoothing filters to compute the gradient , in order to both avoid adversarial examples and to have less noisy saliency masks . Using that , the path-optimisation still manages to achieve a high score , but now highlights the eraser as a single , clearly interpretable feature . Filtering can also be applied to integrated gradient before pixel-ranking . That does avoid the noisyness , but it also leads to a blobby shape of the masks . Comparison with a random-order ablation confirms that the good scores of the saliency methods really are a result of non-trivial feature highlighting , rather than something that comes out of the transition between the images automatically.2 In Figure 3 it is evident that the saliency methods do not in general agree so clearly . Here , the filtered optimal path again highlights a small , single region that is sufficient for a classification of the image as a house- rather than goldfinch . Arguably , this is again adversarial ( a human would certainly label the composite image gold- rather than house finch ) . However it does give rise to a useful interpretation : note that the highlighted region includes 2See Appendix E for a small , non-rigorous statistical study suggesting that scores > 0.9 are p < 0.01 significant against a null hypothesis of smoothly randommasks , and extremely unlikely with pixelwise-random masks . the house finch ’ s plumage , whilst covering specifically the wing of the gold finch ( which features a distinctive pattern not seen on house finches ) . So in this case , the saliency tells more about the baseline than about the current target . The integrated gradient meanwhile hardly manages to mask out anything at all , before the classification switches to gold finch . Practically speaking , saliency is particularly interesting in questions of whether a classification was actually correct . Figure 4 shows an example where the model misclassified an apple as a fig . The unstable scores in even the optimised ablation path are perhaps symptomatic of this ( we are not sure how representative this is ) ; nevertheless both our method and integrated gradients find a mask of less than half of the image that still retains the fig-classification . Whilst with integrated gradients , this mask includes the apple ( which might in a real-world unclear situation lead one to think the classification payed attention to the intended target , increasing credibility ) , out method highlights mainly a patch of background at the border of the image . The optimised paths depend not only on the model and current target , but also on the baseline ; notice for example that the pencil , of which in Figure 2 mostly the eraser was highlighted , is in Figure 5 mostly characterised by the eraser ’ s metallic joint as well as part of the blue shaft , which happens to coincide with the gold finch ’ s wings that were also masked out in Figure 3 . In Figure 6 it is something in between . Still the results ( with filtering ) tend to be relatively coherent across baselines , more so than with the Integrated Gradients or the adversarial unfiltered ones . One might ask why to use a true image as a baseline at all ( as opposed to a blurred image , a constant colour image , as in Sturmfels et al . ( 2020 ) or Fong & Vedaldi ( 2017 ) ) . The problem with artificial baselines is that the network missclassifies them ( a blurred goldfinch is classified as a power drill , for example ) , so the ablation path crosses regionwhere the network is extrapolatingwildly . The resulting saliency may be difficult to interpret since the –unknown– parts of the baseline which the networks considers as important ( which part of the blurred goldfinch lead to the power drill classification ? ) have an influence on the saliency of the current image . Ideally , we would like to have some result about saliency that gives good scores across many different baselines . Future research is needed . Another choice to be made is the regularisation . We used here Gaußian filters ; different sizes compared in Figure 6 . It is a tradeoff between blurring out the boundaries and inviting noisiness , however even a small filter appears to be enough to avoid the algorithm from converging to adversarial examples ( seemingly smaller than what Fong et al . ( 2019 ) require ) . It is even possible to scale down the filter during the optimisation to eventually give very sharp edges but not noise elsewhere , though it is somewhat dubious what sense this makes mathematically , from the point of view that the filtering represents just a metric on R. Again , further research is needed to assess the reliability . 7 Pointing game We evaluate our saliency algorithm using the pointing game method . This method was introduced in Zhang et al . ( 2017 ) and used , for instance , in Selvaraju et al . ( 2016 ) ; Fong & Vedaldi ( 2017 ) . The primary goal is to show that our method , applied to a good enough image classifier , typically gives results that match what a human would also think of as the important part of the image . Specifically , we check whether the maximum-salient pixel lies within the bounding box of the object that defines the class . Table 1 shows some results for our method on various images with blurred image as baseline . We show a few examples of this pointing game on Figure 7 . See Appendix D for details and caveats with these results . References Julius Adebayo , Justin Gilmer , Michael Muelly , Ian Goodfellow , Moritz Hardt , and Been Kim . Sanity checks for saliency maps . In S. Bengio , H. Wallach , H. Larochelle , K. Grauman , N. Cesa-Bianchi , and R. Garnett ( eds . ) , Advances in Neural Information Processing Systems 31 , pp . 9505–9515 . Curran Associates , Inc. , 2018 . URL http : //papers.nips.cc/paper/ 8160-sanity-checks-for-saliency-maps.pdf . Marco Ancona , Enea Ceolini , Cengiz Öztireli , and Markus Gross . Towards better understanding of gradient-based attribution methods for deep neural networks . CoRR , 2017 . Ruth Fong and Andrea Vedaldi . Interpretable explanations of black boxes by meaningful perturbation . CoRR , 2017 . URL http : //arxiv.org/abs/1704.03296v3 . Ruth Fong , Patrick Mandela , and Andrea Vedaldi . Understanding deep networks via extremal perturbations and smooth masks . ICCV , 2019 . URL https : //arxiv.org/abs/1910.08485 . Jacob Gildenblat . Pytorch implementation of interpretable explanations of black boxes by meaningful perturbation . https : //github.com/jacobgil/pytorch-explain-black-box , 2017 . Pieter-Jan Kindermans , Sara Hooker , Julius Adebayo , Maximilian Alber , Kristof T. Schütt , Sven Dähne , Dumitru Erhan , and Been Kim . The ( un ) reliability of saliency methods . CoRR , 2017 . URL http : //arxiv.org/abs/1711.00867v1 . PangWei Koh and Percy Liang . Understanding black-box predictions via influence functions . CoRR , 2017 . URL http : //arxiv.org/abs/1703.04730v2 . Vitali Petsiuk , Abir Das , and Kate Saenko . Rise : Randomized input sampling for explanation of black-box models . CoRR , 2018 . Olga Russakovsky , Jia Deng , Hao Su , Jonathan Krause , Sanjeev Satheesh , SeanMa , Zhiheng Huang , Andrej Karpathy , Aditya Khosla , Michael Bernstein , Alexander C. Berg , and Li Fei-Fei . ImageNet Large Scale Visual Recognition Challenge . International Journal of Computer Vision ( IJCV ) , 115 ( 3 ) :211–252 , 2015. doi : 10.1007/s11263-015-0816-y . Ramprasaath R. Selvaraju , Michael Cogswell , Abhishek Das , Ramakrishna Vedantam , Devi Parikh , and Dhruv Batra . Grad-cam : Visual explanations from deep networks via gradient-based localization . CoRR , 2016 . URL http : //arxiv.org/abs/1610.02391v4 . Karen Simonyan , Andrea Vedaldi , and Andrew Zisserman . Deep inside convolutional networks : Visualising image classification models and saliency maps . CoRR , 2013 . Pascal Sturmfels , Scott Lundberg , and Su-In Lee . Visualizing the impact of feature attribution baselines . Distill , 2020. doi : 10.23915/distill.00022 . https : //distill.pub/2020/attribution-baselines . Mukund Sundararajan , Ankur Taly , and Qiqi Yan . Axiomatic attribution for deep networks . CoRR , abs/1703.01365 , 2017 . URL http : //arxiv.org/abs/1703.01365 . Christian Szegedy , Sergey Ioffe , Vincent Vanhoucke , andAlexAlemi . Inception-v4 , inception-resnet and the impact of residual connections on learning , 2016 . Mingxing Tan and Quoc V. Le . Efficientnet : Rethinking model scaling for convolutional neural networks . CoRR , abs/1905.11946 , 2019 . URL http : //arxiv.org/abs/1905.11946 . Jianming Zhang , Sarah Adel Bargal , Zhe Lin , Jonathan Brandt , Xiaohui Shen , and Stan Sclaroff . Top-down neural attention by excitation backprop . International Journal of Computer Vision , 126 ( 10 ) :1084–1102 , 2017. doi : 10.1007/s11263-017-1059-x . A Canonical Time Reparametrisation Proof of Lemma 3.2 . The function m : [ 0 , 1 ] → R defined by m ( t ) : = ∫ Ω φ ( t ) is increasing and goes from zero to one ( since we assume that ∫ Ω 1 = 1 ) . Note first that if m ( t1 ) = m ( t2 ) , then φ ( t1 ) = φ ( t2 ) from the monotonicity property . Indeed , supposing for instance that t1 ≤ t2 , and defining the element θ : = φ ( t2 ) − φ ( t1 ) we see that on the one hand ∫ Ω θ = 0 , on the other hand , θ ≥ 0 , so θ = 0 and thus φ ( t1 ) = φ ( t2 ) . Now , define M : = m ( [ 0 , 1 ] ) = { s ∈ [ 0 , 1 ] | ∃t ∈ [ 0 , 1 ] m ( t ) = s } . Pick s ∈ [ 0 , 1 ] . If s ∈ M we define ψ ( s ) : = φ ( t ) where m ( t ) = s ( and this does not depend on which t fulfills m ( t ) = s from what we said above ) . We remark that ∫ Ω ψ ( s ) = ∫ Ω φ ( t ) = m ( t ) = s. Now suppose that s ̸∈ M. Define s1 : = sup ( M ∩ [ 0 , s ] ) and s2 : = inf ( M ∩ [ s , 1 ] ) ( neither set are empty since 0 ∈ M and 1 ∈ M ) . Since s1 ∈ M and s2 ∈ M , there are t1 ∈ [ 0 , 1 ] and t2 ∈ [ 0 , 1 ] such thatm ( t1 ) = s1 andm ( t2 ) = s2 . Finally define ψ ( s ) : = φ ( t1 ) + ( s− s1 ) φ ( t2 ) −φ ( t1 ) s2−s1 . In this case , ∫ Ω ψ ( s ) = m ( t1 ) + ( s − s1 ) m ( t2 ) −m ( t1 ) s2−s1 = s. The path ψ constructed this way is still monotone , and it has the constant speed property , so it is an ablation path . B L∞-optimal Monotonicity Projection The algorithm proposed in Appendix C for optimising monotone paths uses updates that can locally introduce nonmonotonicity in the candidate φ̂1 , so that it is needed to project back onto a monotone path φ1 . The following routine3 performs such a projection in a way that is optimal in the sense of minimising the L∞-distance4 , i.e . sup t ∣∣φ1 ( t , r ) − φ̂1 ( t , r ) ∣∣ ≤ sup t ∣∣ϑ ( t , r ) − φ̂1 ( t , r ) ∣∣ for all r ∈ Ω and any other monotone path ϑ . The algorithm works separately for each r , i.e . we express it as operating simply on continuous functions p : [ 0 , 1 ] → R. The final step effectively flattens out , in a minimal way , any region in Algorithm 1Make a function [ 0 , 1 ] → R nondecreasing ∪i [ li , ri ] ← { t ∈ [ 0 , 1 ] | p′ ( t ) ≤ 0 } ▷ Union of intervals where p decreases for i do mi ← p ( li ) +p ( ri ) 2 li ← max { t ∈ [ ri−1 , li ] | p ( t ) ≤ mi } ri ← min { t ∈ [ ri , li+1 ] | p ( t ) ≥ mi } end for for i , j do if [ li , ri ] ∩ [ lj , rj ] ̸= ∅ then ifmj < mi , merge the intervals and recomputem as the new center end if end for return t 7→ { p ( t ) if t ̸∈ ∪i [ li , ri ] mi if t ∈ [ li , ri ] which the function was decreasing . In practice , this algorithm is executed not on continuous functions but on a PCM-discretised representation ; this changes nothing about the algorithm except that instead as real numbers , l , r and t are represented by integral indices . C Path Optimisation Algorithm As said in tsection § 5 , our optimisation algorithm is essentially gradient descent of a path φ : it repeatedly seeks the direction within the space of all paths that ( first ignoring the monotonicity constraint ) would affect the largest increase to P ( φ ) as per ( 2 ) . As discussed before , this choice already requires a metric to obtain a vector-gradient from the covector-differential , which could be either the implicit ℓ2 metric on the discretised representation ( pixels ) , or a more physical kernel/filter-based metric . We conceptually use the latter , however for technical reasons do not immediately apply the corresponding filter to the differential but rather to the path , which is not quite equivalent but does have the effect of avoiding noise from creeping into the state . Unlike with the monotonisation condition , the update can easily be made to preserve speed-constness by construction , by projecting for each t the gradient g on the sub-tangent-space of zero change to 3 It is easy to come up with other algorithms for monotonising a ( discretised ) function . One could simply sort the array , but that is not optimal with respect to any of the usual function norms ; or clip the derivatives to be nonnegative and then rescale the entire function , but that is not robust against noise pertubations . 4Note that the optimum is not necessarily unique . Algorithm 2 Projected Gradient Descent 1 : φ← ( ( t , r ) 7→ t ) ▷ Start with linear-interpolation path 2 : while φ is not sufficiently saturated do 3 : for t in [ 0 , 1 ] do 4 : xφ , t : = ( 1− φ ( t ) ) x0 + φ ( t ) x1 5 : compute F ( xφ , t ) with gradient g : = ∇F ( xφ , t ) 6 : let ĝ : = g− ∫ Ω g ▷ ensure ĝ does not affect mass of φ ( t ) 7 : update φ ( t , r ) ← φ ( t , r ) − γ ⟨ĝ ( r ) | |x1 − x0⟩ , for r in Ω ▷ γ is learning rate 8 : ( optional ) apply a filter to φ ( t ) 9 : end for 10 : ( optional ) apply nonlinear gain to φ 11 : for r in Ω do 12 : re-monotonise t 7→ φ ( t , r ) , using Algorithm 1 13 : end for 14 : clamp φ ( t , r ) to [ 0 , 1 ] everywhere 15 : re-parametrise φ , such that ∫ Ω φ ( t ) = t for all t ( using Appendix A ) 16 : end while . ∫ Ω φ ( t ) , by subtracting the constant function times ∫ Ω g ( t ) . Note this requires the measure of Ω to be normalised , or else considered at this point . Then we apply these gradients time-wise as updates to the path , using a scalar product in the channelspace to obtain the best direction for φ itself ( as opposed to the corresponding image composit xφ , t ) . Simply projecting the updates path then again to the set of legal ( in the sense of Definition 3.1 ) ablation paths would presumably enough to converge towards a saturated path with high score , however in tests with artificial constant gradient we found out that this requires extremely many iterations , with the number apparently scaling with the image dimension . The problem here is that saturating updates tend to be undone again by the speed-normalising reparametrisation , except for the most affected pixel . ( Just increasing the learning rate does not help with this . ) If the gradients come from a deep CNN and for every pixel the monotonicity needs to be restored , such many iterations would be prohibitly computation-intensive . Fortunately we can dramatically speed up the convergence by artificially encouraging saturation . We tweak the ablation path φ pointwise with a sigmoidal function that brings values lower than 12 slightly closer to 0 , and values greater than 12 slightly closer to 1 . To this end , we use a perturbation of the identity function defined by x 7→ x+ ϵ ( x ) , and apply it pointwise to the path : φ ( r , t ) ← φ ( r , t ) + ϵ ( φ ( r , t ) ) The perturbation function ϵ : [ 0 , 1 ] → R has the property that x + ϵ ( x ) maps [ 0 , 1 ] into itself . The function ϵ we use is plotted on Figure 9 . Although this perturbation seems small , the examples in §6 now only require 20-40 iterations . As to the motivation behind the transformation φ→ φ+ ϵ ( φ ) , notice first that fully saturated masks – i.e. , those that choose for every pixel are either zero or one , selecting exactly the value of either the current target or the baseline – are fixpoints of the function x 7→ x+ ϵ ( x ) since ϵ ( 0 ) = ϵ ( 1 ) = 0 . So if such a mask is the optimum in the algorithm without artificial saturation ( while there is no guarantee for this in general , this seems fairly frequent in practice ) , then it will also be an optimum of the algorithm with artificial saturation . What is more , the dynamical system x 7→ x+ϵ ( x ) quickly converges to zero or one , which efficiently encourages saturation , without sacrificing precision , as the function ϵ we chose is quite small . Conversely , and unlike high learning rate , the saturation function is by construction monotone , symmetric and keeps the signal within the allowed bounds , so it avoids violating the ablation path constraints . The problem with high learning rates is that the algorithm gets caught in a sequence of alternating strong constraint-violating updates followed by a projection step that largely undoes the previous update . D Evaluation with Pointing Game The Pointing Game , the results of which we show in §7 , is a way to verify that the saliency method points at a region that a human would consider relevant to the classification . It is often the region of an image that contains the physical object which is being classified . Such evaluations of saliency methods clearly have caveats . One can for instance argue that the cases when the saliency points somewhere outside the bounding box are the most insightful ones , as they indicate that the classifier is using information from an unexpected part of the image ( for instance , the background ) . Another caveat is that , if winning at the pointing game is the goal , a saliency method is only as good as its underlying classifier is . Nevertheless , if a saliency method often hits the bounding box it is reasonable to conclude that both the classifier and the saliency method behave in an intuitive way , from a human perspective . Our measurements in Table 1 confirm that the ablation-path method indeed does this well . Our method has an advantage over other ones as it yields not only a single spatial map as the saliency but a whole path of masks . However , it does not directly give a saliency map . Here is howwe choose one point in the image from an ablation path . First , we choose a specific time , just as we did in the examples in §6 . In most cases , this means that we chose the time at which the probability has dropped by 20 % , that is the smallest time t such that F ( t ) ≤ 0.8 . When there is no such time , we pick the one for which F takes the maximum value on the path . Now that the time is chosen , we pick the point in the mask which have the smallest value . Note that , even though this selection may be unstable ( since many points are close to the minimum value , as the mask is typically saturated ) , it usually does not matter since the whole region selected by the mask is salient . The classifier in this experiment was an EfficientNet Tan & Le ( 2019 ) pre-trained on ImageNet , the test data set 360 images from three synsets out of ImageNet . As a comparison , we evaluated the pointing game with the same network and inputs also through the closely related Meaningful Perturbations method Fong & Vedaldi ( 2017 ) . We used a third-party PyTorch implementation Gildenblat ( 2017 ) . Note that this implementation uses a slightly simplified method of removing information for performance , and that we did not change any of the hyperparameters of the method , so it is very likely that these results are not optimal . We also note that Fong & Vedaldi ( 2017 ) themselves include results for the pointing game on different data , with better scores . Nevertheless , the point was to show that our method works reasonably well , and this may be due to the use of ablation paths : that increasing family of mask probably gives some stability to the saliency method , which improves the scores . E Random ablation paths In this section , following an idea of Sturmfels et al . ( 2020 ) , we compare our method to random ablation-paths . Figure 2 includes one such example – the random path , which has a quite fuzzy class transition in roughly the middle of the path . Figure 10 shows that this typical behaviour . In the unsmoothed case , the scores are almost compactly clustered in the middle , i.e. , paths consisting of random single-pixel transitions rarely have exceptional scores . If the random paths are spatially smoothed , outliers becomemore likely ( the paths could by coincidence mask out a whole particularly relevant region ) , but the scores are still really unlikely to reach 0.9 , something our optimisation approach routinely attains . F More examples We provide in Figure 11 a series of ablation path results for one class in the ILSVRC14 datasetRussakovsky et al . ( 2015 ) . | The paper describes the black box approach to saliency prediction using ablation paths gradually replacing the parts of the image of one class with the image of another one. The idea has certain novelty, but the reviewer cannot see that it is backed by the evidence. The following comments are describing the reasons for the current paper rating and must be addressed for the rating to be improved: | SP:e5f3f418dfcf0d45c37cfc237aee269a3b9bfad3 |
Ablation Path Saliency | 1 Introduction The basic idea of saliency or attribution is to provide something from which a human can judge how a classifier arrived at its decision of the prediction it gives for a certain input . It is difficult to give a more mathematical definition , but various properties that such a method should fulfill have been proposed . Sundararajan et al . ( 2017 ) give axioms , of which sensitivity comes closest to the notion of saliency . Essentially , the features on which the output is most sensitive should be given a higher saliency value . The authors give further axioms to narrow it down – implementation invariance , completeness , linearity and symmetry-preservation – and obtain a corresponding method : the integrated gradient method . Note that we have another way to arrive at a similar method , see §4.1 Fong & Vedaldi ( 2017 ) is closer to our work : the authors directly compute the saliency of a given pixel by deleting , or altering that pixel , to see how this affects the output of the classifier . Our method is to define a proper maximisation problem as follows . First , we define ablation paths as time dependent smooth masks φ : [ 0 , 1 ] → C ( Ω , R ) , going a full mask to an empty mask , such that at each pixel the mask value decreases over time ( see Figure 1 ) . We also impose constant area speed : the area covered by the mask should increase linearly over time ( see §3 ) . Let F be the classifier , that outputs a probability between zero and one . We choose a current image of interest x0 and a baseline image x1 . The objective function is then P ( φ ) = ∫ 1 0 F ( x0 +φ ( t ) ( x1−x0 ) ) dt ( see §4 ) . Assuming that F ( x0 ) ≃ 1 and F ( x1 ) ≃ 0 , maximising the objective function means that we try to find an ablation path that stays as long as possible in the decision region of x0 . Intuitively , we try to replace as many pixels of x0 by pixels of x1 while staying in the same class as x0 . The main contribution of this paper is to formulate the saliency problem as an optimisation problem on paths . Doing so connects previous notions of saliency , notably integrated gradients Sundararajan et al . ( 2017 ) ( see §4.1 ) , the ablation tests Sturmfels et al . ( 2020 ) ( see §4.2 ) , and meaningful perturbations Fong & Vedaldi ( 2017 ) ; Fong et al . ( 2019 ) ( see § 4.3 ) . Our formulation is also resolution invariant ( it does not assume that images are defined on pixels ) ; this allows to make a clear difference between images and their duals , for instance , which gives guidance as to where regularisation is needed . 2 Related Work Simonyan et al . ( 2013 ) defines a saliency map as the gradient of the network output at the given image . This would appear to be a sensible definition , but the resulting saliency is very noisy because the network output is roughly constant around any particular image . Selvaraju et al . ( 2016 ) improves the situation by computing the gradient after each layer instead . This is , however , not a black-box method such as the one we propose . Koh & Liang ( 2017 ) computes an influence function , that is , a function that measures how the parameters would be changed by a change in the training data . Although it is a black-box method , it is not a saliency method per se . They use the gradient of the network output to find the pixel most likely to have a high saliency . The pixel that have most effect are given a higher saliency . By contrast , Petsiuk et al . ( 2018 ) proposes to directly evaluate the saliency by finding out which pixels most affect the output , similarly to Fong & Vedaldi ( 2017 ) , but without using any gradients . There are a number of meta-studies of saliency methods . Adebayo et al . ( 2018 ) lists essential properties , for instance the requirement that the results should depend on the training data in a sense that perturbing model parameters should change the saliency . Kindermans et al . ( 2017 ) proposes a number of property that saliency methods should satisfy . Ancona et al . ( 2017 ) compares several saliency methods and proposes a method to evaluate them ( the sensitiviy-n property ) . 3 Ablation Paths 3.1 Images and Masks We consider a compact domain Ω . Note that Ω may be discrete or continuous : in fact , we assume that Ω is endowed with a measure which could be the discrete measure ( if Ω is a set of pixels ) or the Lebesgue measure ( if Ω is a domain in R2 , for instance ) . In the sequel , ∫ Ω denotes integration with respect to that measure . Without loss of generality , we assume the mass of that measure to be one , i.e. , ∫ Ω 1 = 1 . We consider a module M of functions on Ω with values in a vector space V ( the dimensions of V represent the channels , and elements of M represent images ) . This module is equipped with a commutative ring R which represents masks . Concretely , in most of the paper we choose M : = C ( Ω , V ) R : = C ( Ω , R ) . The module structure simply means that masks can multiply images , i.e. , that the operation θx gives a new image inM when θ ∈ R and x ∈M , and that this operation is bilinear . 3.2 Ablation Paths Definition 3.1 . We define the setA of ablation paths as the set of functions φ : [ 0 , 1 ] → R fulfilling the following properties : Boundary conditions φ ( 0 ) = 0 and φ ( 1 ) = 1 Monotonicity t1 ≤ t2 =⇒ φ ( t1 ) ≤ φ ( t2 ) t1 , t2 ∈ [ 0 , 1 ] Constant speed ∫ Ω φ ( t ) = t t ∈ [ 0 , 1 ] . We will call monotone paths the paths that verify the first two conditions but not the third . Note that the set A of ablation paths is a convex subset of L∞ ( [ 0 , 1 ] , R ) . Some comments on each of those requirements are in order . ( i ) 0 and 1 denote here the constant functions zero and one ( which corresponds to the zero and one of the algebra R ) ( ii ) φ ( t1 ) ≤ φ ( t2 ) should be interpreted as usual as φ ( t2 ) − φ ( t1 ) being in the cone of nonnegative elements1 . ( iii ) If t 7→ ∫ Ω φ ( t ) is differentiable , this requirement can be rewritten as ddt ∫ Ω φ ( t ) = 1 , so it can be regarded as a constant speed requirement . This requirement is more a normalisation than a requirement , as is further detailed in Remark 3.3 . There is a canonical , simplest , ablation path between x0 and x1 : ℓ ( t ) : = t. ( 1 ) The mask is thus constant in space at each time t. The reader should check that all the requirements for an ablation path are fulfilled . Note that an ablation path without the constant-speed property can always be transformed into one that does fulfil it . This is clear if the function t 7→ ∫ Ω φ ( t ) is strictly increasing , as this is then just a time reparameterisation , but this is in fact always possible , in a canonical sense . The proof is in Appendix A. Lemma 3.2 . To any monotone path there corresponds a canonical ablation path . Since R is itself a function space , an ablation path φ is in fact a function of two arguments . In the sequel , we will abuse the notations and write φ as a function of one or two arguments depending on the context : φ ( t ) ≡ φ ( t , · ) . For instance , in the definition Definition 3.1 above , ∫ Ω φ ( t ) ≡∫ Ω φ ( t , · ) ≡ ∫ Ω φ ( t , r ) dr . Remark 3.3 . If the ablation path φ is differentiable in time , the requirements in Definition 3.1 admit a remarkable reformulation . Define ψ ( t ) : = ddtφ ( t ) . All the requirements in Definition 3.1 are equivalent to the following requirements for a function ψ : [ 0 , 1 ] × Ω→ R : ψ ( t , r ) ≥ 0 , ∫ Ω ψ ( t , r ) dr = 1 , ∫ [ 0,1 ] ψ ( t , r ) dt = 1 t ∈ [ 0 , 1 ] , r ∈ Ω The corresponding ablation path φ is then recovered by φ ( t ) : = ∫ t 0 ψ ( s ) ds . What this means is that differentiable ablation paths can be parameterised as densities of doubly stochastic Markov transition kernels on [ 0 , 1 ] × Ω . 3.3 Regularity of Ablation Paths Lemma 3.4 . If φ is an ablation path , then ∥φ ( t1 ) − φ ( t0 ) ∥L1 = |t1 − t0| . In particular , t 7→ φ ( t , · ) is continuous as a function [ 0 , 1 ] → L1 ( Ω ) . Proof . Choose t0 , t1 in [ 0 , 1 ] . Without loss of generality , assume t1 ≥ t0 . Then , ∫ Ω |φ ( t1 ) −φ ( t0 ) | =∫ Ω ( φ ( t1 ) − φ ( t0 ) ) = t1 − t0 , from which we conclude that φ ( t1 ) − φ ( t0 ) is in L1 and fulfils the equation above . 4 Score of an Ablation Path We now fix two points x0 ( the current image ) and x1 ( the baseline image ) in the space of imagesM . We propose the following measure of the score of an ablation path ( see Definition 3.1 ) with respect 1Here we can define the cone of nonnegative functions by { f ∈ C ( Ω , R ) | f ≥ 0 } . In a general star algebra , this cone would be defined as { x ∈ R | ∃y ∈ R x = y∗y } . to these two images . Given a mask θ ∈ R , we define the interpolated image [ x0 , x1 ] θ ∈M as [ x0 , x1 ] θ : = ( 1− θ ) x0 + θx1 . We now define the score function P : A → R from ablation paths to R by the integral P ( φ ) : = ∫ 1 0 F ( [ x0 , x1 ] φ ( t ) ) dt . ( 2 ) Note that , as F is bounded between zero and one , so is P ( φ ) for any ablation path φ . The main idea is that if F ( x0 ) ≃ 1 and F ( x1 ) ≃ 0 , the higher this value of P is , the better the path is to describe the salient parts of the image . Note that the function P is defined regardless of the constraints placed on ablation paths , i.e. , the score function P is defined on the vector space of functions φ : [ 0 , 1 ] → R. It is straightforward to compute its differential dP on that space : ⟨dP , δφ⟩ = ∫ 1 0 ⟨dF [ x0 , x1 ] φ ( t ) ︸ ︷︷ ︸ ∈M∗ , ( x1 − x0 ) ︸ ︷︷ ︸ ∈M δφ ( t ) ︸ ︷︷ ︸ ∈R ⟩ dt . So if we define the product of D ∈ M∗ and x ∈ M producing an element in R∗ by ⟨xD , φ⟩ : = ⟨D , xφ⟩ as is customary , we can rewrite this differential as ⟨dP , δφ⟩ = ∫ 1 0 ⟨ ( x1 − x0 ) dF [ x0 , x1 ] φ ( t ) , δφ ( t ) ⟩ dt . Note that we know that any ablation path is bounded , so φ ∈ L∞ ( [ 0 , 1 ] , R ) , so the differential of P at φ can be identified with the function dPφ = [ t 7→ ( x1 − x0 ) dF [ x0 , x1 ] φ ( t ) ] in L1 ( [ 0 , 1 ] , R∗ ) . 4.1 Relation with the Integrated Gradient Method When this differential is computed on the interpolation path ℓ ( 1 ) and then averaged , then this is exactly the integrated average gradient Sundararajan et al . ( 2017 ) . More precisely , the integrated gradient is exactly ∫ 1 0 dPℓ ( t ) dt . Note that this is in fact an integrated differential , since we obtain an element in the dual spaceM∗ , and this differential should be appropriately smoothed along the lines of §5.1 . 4.2 Relation to Pixel Ablation Given a saliency function σ ∈ R we can define a path by φ̃ ( t ) : = 1σ≤log ( t/ ( 1−t ) ) when t ∈ ( 0 , 1 ) and define φ̃ ( 0 ) : = 0 , φ̃ ( 1 ) : = 1 . This path is a monotone path , except in the module of images M = L2 ( Ω , V ) , equipped with the ring of masks R = L∞ ( Ω ) . To be an ablation path , it still needs to be transformed into a constant speed path , which is always possible as explained in Appendix A . Note that this is a generalisation of the ablation method in Sturmfels et al . ( 2020 ) . In that case , the set Ω would be a discrete set of pixels . Note that in the ranking , pixels with the same saliency would be ranked in an arbitrary way and added to the mask in that arbitrary order . In the method above , we add them all at once , but the time reparameterisation keeps that function constant longer for however many pixels were ranked the same . As long as the ranking is strict ( no two pixels have the same saliency ) , the two methods are the same . 4.3 Relation to Meaningful Perturbations In the saturated case , that is , if F only takes values zero and one ( or in the limit where it does ) , our method basically reduces to finding the interpolation with the largest mask on the boundary , in essence the approach of Fong & Vedaldi ( 2017 ) . Indeed , suppose that the ablation path φ crosses the boundary at time t∗ . It means that F ( [ x0 , x1 ] φ ( t ) ) has value one until t∗ and zero afterwards , so the score P defined in ( 2 ) is P ( φ ) = t∗ . By the constant speed property , t∗ = ∫ Ω φ ( t∗ ) , so we end up maximising the mask area on the boundary . 5 Optimisation Problem and Algorithm We proceed to define the optimisation problem at hand and how to solve it numerically . Conceptually we try to find the ablation path ( see Definition 3.1 ) that maximises the score P ( φ ) : max φ∈A P ( φ ) . Recall that the set A of ablation paths is convex ; however , since the objective function P is not convex , this is not a convex optimisation problem . The method we suggest is to follow a gradient direction . Such an approach is in general not guaranteed to approximate a global maximum , but empirically it does manage that quite well here . 5.1 Gradient and Metric Note that the differential is an element of L1 ( [ 0 , 1 ] , R∗ ) , so we need a map from that space to L∞ ( [ 0 , 1 ] , R ) . For now we assume that φ ∈ L2 ( [ 0 , 1 ] , R ) and dP ∈ L2 ( [ 0 , 1 ] , R∗ ) . However , we still need a covariance operatorK : R∗ → R. In practice , we use a covariance operator associated to a smoothing operator . For ameasureµ ∈ R∗ , ⟨Kµ , θ⟩ : = ⟨µ , ∫ Ω k ( ·−r ) θ ( r ) dr⟩ , where k is a suitable smoothing function , for instance k ( r ) = exp ( −∥r∥2/σ ) . This allows us to consider the gradient of P . Note that different choices of metric will influence on the algorithm . Since the optimisation problem is constrained ( since φ is constrained by the requirements in Definition 3.1 ) , following the gradient direction will lead us to violate the constraints . Since the constraints are convex , it is straightforward enough to project each gradient-updated version back to something that does fulfill them , and indeed that is the idea behind our algorithm , however in practice it does by itself not yield convergence without impractically many iterations . See Appendix C for the details of how we actually proceed . 6 Examples To test out our path-scoring approach and the saliency method based on its optimisation , we use a standard image classifier deep-CNN ( Inception v4 Szegedy et al . ( 2016 ) , pre-trained on ImageNet ) , with a selection of real-world images for both the current target and baseline inputs . For each example pair , we compare multiple saliency methods . Our algorithm yields a whole path of masks , which can not as a whole be visualised in one 2D view . Generally , the threshold mask , which we define as the mask right where the path crosses the decision boundary , is most insightful : it still preserves enough of the image to be classified correctly , but no more . All of the images in this section refer to that selection , and where the threshold lies in the path is indicated by the vertical black line in the score plots . To be precise , this is the mask that preserves as little of the image as possible whilst still resulting in the intended class keeping the highest probability among the classes in the classifier ’ s prediction . Note that although the threshold mask encapsulates a large part of our method ’ s useful output , we find that the additional information from the rest of the path , and the score-plot along the path , also provide good diagnostics especially in examples where the mask highlights an unexpected region of the image . Figure 2 is an example with particularly clear-cut interpretation : the vibrantly coloured rubber eraser is sufficient to retain the classification even in an almost completely ablated image . All of the compared methods manage to find a mask that focuses in on that , though with differences in the details . The unconstrained optimisation narrows it down to a few individual pixels , which gives an extremely good score ( somewhat unsurprisingly , since that is what is being optimised ) , but the result is hardly useful for interpretability purposes : this should be considered an adversarial example . One interpretation of this is that identifying the gradient with the differential implies that the space of masksR is essentially bounded functions wihout further regularity ( see §5.1 ) , similar to the mask space in §4.2 . The region boundary in that space seems to be extremely close to the baseline , and the optimisation method finds those adversarial examples . The integrated gradient method in principle also has this issue , and indeed the corresponding mask ( pixel ranking , cf . § 4.2 ) is quite grainy/noisy , without however behaving adversarially ( the entire pencil is highlighted ) . The authors in Fong & Vedaldi ( 2017 ) were confronted with similar problems . We use smoothing filters to compute the gradient , in order to both avoid adversarial examples and to have less noisy saliency masks . Using that , the path-optimisation still manages to achieve a high score , but now highlights the eraser as a single , clearly interpretable feature . Filtering can also be applied to integrated gradient before pixel-ranking . That does avoid the noisyness , but it also leads to a blobby shape of the masks . Comparison with a random-order ablation confirms that the good scores of the saliency methods really are a result of non-trivial feature highlighting , rather than something that comes out of the transition between the images automatically.2 In Figure 3 it is evident that the saliency methods do not in general agree so clearly . Here , the filtered optimal path again highlights a small , single region that is sufficient for a classification of the image as a house- rather than goldfinch . Arguably , this is again adversarial ( a human would certainly label the composite image gold- rather than house finch ) . However it does give rise to a useful interpretation : note that the highlighted region includes 2See Appendix E for a small , non-rigorous statistical study suggesting that scores > 0.9 are p < 0.01 significant against a null hypothesis of smoothly randommasks , and extremely unlikely with pixelwise-random masks . the house finch ’ s plumage , whilst covering specifically the wing of the gold finch ( which features a distinctive pattern not seen on house finches ) . So in this case , the saliency tells more about the baseline than about the current target . The integrated gradient meanwhile hardly manages to mask out anything at all , before the classification switches to gold finch . Practically speaking , saliency is particularly interesting in questions of whether a classification was actually correct . Figure 4 shows an example where the model misclassified an apple as a fig . The unstable scores in even the optimised ablation path are perhaps symptomatic of this ( we are not sure how representative this is ) ; nevertheless both our method and integrated gradients find a mask of less than half of the image that still retains the fig-classification . Whilst with integrated gradients , this mask includes the apple ( which might in a real-world unclear situation lead one to think the classification payed attention to the intended target , increasing credibility ) , out method highlights mainly a patch of background at the border of the image . The optimised paths depend not only on the model and current target , but also on the baseline ; notice for example that the pencil , of which in Figure 2 mostly the eraser was highlighted , is in Figure 5 mostly characterised by the eraser ’ s metallic joint as well as part of the blue shaft , which happens to coincide with the gold finch ’ s wings that were also masked out in Figure 3 . In Figure 6 it is something in between . Still the results ( with filtering ) tend to be relatively coherent across baselines , more so than with the Integrated Gradients or the adversarial unfiltered ones . One might ask why to use a true image as a baseline at all ( as opposed to a blurred image , a constant colour image , as in Sturmfels et al . ( 2020 ) or Fong & Vedaldi ( 2017 ) ) . The problem with artificial baselines is that the network missclassifies them ( a blurred goldfinch is classified as a power drill , for example ) , so the ablation path crosses regionwhere the network is extrapolatingwildly . The resulting saliency may be difficult to interpret since the –unknown– parts of the baseline which the networks considers as important ( which part of the blurred goldfinch lead to the power drill classification ? ) have an influence on the saliency of the current image . Ideally , we would like to have some result about saliency that gives good scores across many different baselines . Future research is needed . Another choice to be made is the regularisation . We used here Gaußian filters ; different sizes compared in Figure 6 . It is a tradeoff between blurring out the boundaries and inviting noisiness , however even a small filter appears to be enough to avoid the algorithm from converging to adversarial examples ( seemingly smaller than what Fong et al . ( 2019 ) require ) . It is even possible to scale down the filter during the optimisation to eventually give very sharp edges but not noise elsewhere , though it is somewhat dubious what sense this makes mathematically , from the point of view that the filtering represents just a metric on R. Again , further research is needed to assess the reliability . 7 Pointing game We evaluate our saliency algorithm using the pointing game method . This method was introduced in Zhang et al . ( 2017 ) and used , for instance , in Selvaraju et al . ( 2016 ) ; Fong & Vedaldi ( 2017 ) . The primary goal is to show that our method , applied to a good enough image classifier , typically gives results that match what a human would also think of as the important part of the image . Specifically , we check whether the maximum-salient pixel lies within the bounding box of the object that defines the class . Table 1 shows some results for our method on various images with blurred image as baseline . We show a few examples of this pointing game on Figure 7 . See Appendix D for details and caveats with these results . References Julius Adebayo , Justin Gilmer , Michael Muelly , Ian Goodfellow , Moritz Hardt , and Been Kim . Sanity checks for saliency maps . In S. Bengio , H. Wallach , H. Larochelle , K. Grauman , N. Cesa-Bianchi , and R. Garnett ( eds . ) , Advances in Neural Information Processing Systems 31 , pp . 9505–9515 . Curran Associates , Inc. , 2018 . URL http : //papers.nips.cc/paper/ 8160-sanity-checks-for-saliency-maps.pdf . Marco Ancona , Enea Ceolini , Cengiz Öztireli , and Markus Gross . Towards better understanding of gradient-based attribution methods for deep neural networks . CoRR , 2017 . Ruth Fong and Andrea Vedaldi . Interpretable explanations of black boxes by meaningful perturbation . CoRR , 2017 . URL http : //arxiv.org/abs/1704.03296v3 . Ruth Fong , Patrick Mandela , and Andrea Vedaldi . Understanding deep networks via extremal perturbations and smooth masks . ICCV , 2019 . URL https : //arxiv.org/abs/1910.08485 . Jacob Gildenblat . Pytorch implementation of interpretable explanations of black boxes by meaningful perturbation . https : //github.com/jacobgil/pytorch-explain-black-box , 2017 . Pieter-Jan Kindermans , Sara Hooker , Julius Adebayo , Maximilian Alber , Kristof T. Schütt , Sven Dähne , Dumitru Erhan , and Been Kim . The ( un ) reliability of saliency methods . CoRR , 2017 . URL http : //arxiv.org/abs/1711.00867v1 . PangWei Koh and Percy Liang . Understanding black-box predictions via influence functions . CoRR , 2017 . URL http : //arxiv.org/abs/1703.04730v2 . Vitali Petsiuk , Abir Das , and Kate Saenko . Rise : Randomized input sampling for explanation of black-box models . CoRR , 2018 . Olga Russakovsky , Jia Deng , Hao Su , Jonathan Krause , Sanjeev Satheesh , SeanMa , Zhiheng Huang , Andrej Karpathy , Aditya Khosla , Michael Bernstein , Alexander C. Berg , and Li Fei-Fei . ImageNet Large Scale Visual Recognition Challenge . International Journal of Computer Vision ( IJCV ) , 115 ( 3 ) :211–252 , 2015. doi : 10.1007/s11263-015-0816-y . Ramprasaath R. Selvaraju , Michael Cogswell , Abhishek Das , Ramakrishna Vedantam , Devi Parikh , and Dhruv Batra . Grad-cam : Visual explanations from deep networks via gradient-based localization . CoRR , 2016 . URL http : //arxiv.org/abs/1610.02391v4 . Karen Simonyan , Andrea Vedaldi , and Andrew Zisserman . Deep inside convolutional networks : Visualising image classification models and saliency maps . CoRR , 2013 . Pascal Sturmfels , Scott Lundberg , and Su-In Lee . Visualizing the impact of feature attribution baselines . Distill , 2020. doi : 10.23915/distill.00022 . https : //distill.pub/2020/attribution-baselines . Mukund Sundararajan , Ankur Taly , and Qiqi Yan . Axiomatic attribution for deep networks . CoRR , abs/1703.01365 , 2017 . URL http : //arxiv.org/abs/1703.01365 . Christian Szegedy , Sergey Ioffe , Vincent Vanhoucke , andAlexAlemi . Inception-v4 , inception-resnet and the impact of residual connections on learning , 2016 . Mingxing Tan and Quoc V. Le . Efficientnet : Rethinking model scaling for convolutional neural networks . CoRR , abs/1905.11946 , 2019 . URL http : //arxiv.org/abs/1905.11946 . Jianming Zhang , Sarah Adel Bargal , Zhe Lin , Jonathan Brandt , Xiaohui Shen , and Stan Sclaroff . Top-down neural attention by excitation backprop . International Journal of Computer Vision , 126 ( 10 ) :1084–1102 , 2017. doi : 10.1007/s11263-017-1059-x . A Canonical Time Reparametrisation Proof of Lemma 3.2 . The function m : [ 0 , 1 ] → R defined by m ( t ) : = ∫ Ω φ ( t ) is increasing and goes from zero to one ( since we assume that ∫ Ω 1 = 1 ) . Note first that if m ( t1 ) = m ( t2 ) , then φ ( t1 ) = φ ( t2 ) from the monotonicity property . Indeed , supposing for instance that t1 ≤ t2 , and defining the element θ : = φ ( t2 ) − φ ( t1 ) we see that on the one hand ∫ Ω θ = 0 , on the other hand , θ ≥ 0 , so θ = 0 and thus φ ( t1 ) = φ ( t2 ) . Now , define M : = m ( [ 0 , 1 ] ) = { s ∈ [ 0 , 1 ] | ∃t ∈ [ 0 , 1 ] m ( t ) = s } . Pick s ∈ [ 0 , 1 ] . If s ∈ M we define ψ ( s ) : = φ ( t ) where m ( t ) = s ( and this does not depend on which t fulfills m ( t ) = s from what we said above ) . We remark that ∫ Ω ψ ( s ) = ∫ Ω φ ( t ) = m ( t ) = s. Now suppose that s ̸∈ M. Define s1 : = sup ( M ∩ [ 0 , s ] ) and s2 : = inf ( M ∩ [ s , 1 ] ) ( neither set are empty since 0 ∈ M and 1 ∈ M ) . Since s1 ∈ M and s2 ∈ M , there are t1 ∈ [ 0 , 1 ] and t2 ∈ [ 0 , 1 ] such thatm ( t1 ) = s1 andm ( t2 ) = s2 . Finally define ψ ( s ) : = φ ( t1 ) + ( s− s1 ) φ ( t2 ) −φ ( t1 ) s2−s1 . In this case , ∫ Ω ψ ( s ) = m ( t1 ) + ( s − s1 ) m ( t2 ) −m ( t1 ) s2−s1 = s. The path ψ constructed this way is still monotone , and it has the constant speed property , so it is an ablation path . B L∞-optimal Monotonicity Projection The algorithm proposed in Appendix C for optimising monotone paths uses updates that can locally introduce nonmonotonicity in the candidate φ̂1 , so that it is needed to project back onto a monotone path φ1 . The following routine3 performs such a projection in a way that is optimal in the sense of minimising the L∞-distance4 , i.e . sup t ∣∣φ1 ( t , r ) − φ̂1 ( t , r ) ∣∣ ≤ sup t ∣∣ϑ ( t , r ) − φ̂1 ( t , r ) ∣∣ for all r ∈ Ω and any other monotone path ϑ . The algorithm works separately for each r , i.e . we express it as operating simply on continuous functions p : [ 0 , 1 ] → R. The final step effectively flattens out , in a minimal way , any region in Algorithm 1Make a function [ 0 , 1 ] → R nondecreasing ∪i [ li , ri ] ← { t ∈ [ 0 , 1 ] | p′ ( t ) ≤ 0 } ▷ Union of intervals where p decreases for i do mi ← p ( li ) +p ( ri ) 2 li ← max { t ∈ [ ri−1 , li ] | p ( t ) ≤ mi } ri ← min { t ∈ [ ri , li+1 ] | p ( t ) ≥ mi } end for for i , j do if [ li , ri ] ∩ [ lj , rj ] ̸= ∅ then ifmj < mi , merge the intervals and recomputem as the new center end if end for return t 7→ { p ( t ) if t ̸∈ ∪i [ li , ri ] mi if t ∈ [ li , ri ] which the function was decreasing . In practice , this algorithm is executed not on continuous functions but on a PCM-discretised representation ; this changes nothing about the algorithm except that instead as real numbers , l , r and t are represented by integral indices . C Path Optimisation Algorithm As said in tsection § 5 , our optimisation algorithm is essentially gradient descent of a path φ : it repeatedly seeks the direction within the space of all paths that ( first ignoring the monotonicity constraint ) would affect the largest increase to P ( φ ) as per ( 2 ) . As discussed before , this choice already requires a metric to obtain a vector-gradient from the covector-differential , which could be either the implicit ℓ2 metric on the discretised representation ( pixels ) , or a more physical kernel/filter-based metric . We conceptually use the latter , however for technical reasons do not immediately apply the corresponding filter to the differential but rather to the path , which is not quite equivalent but does have the effect of avoiding noise from creeping into the state . Unlike with the monotonisation condition , the update can easily be made to preserve speed-constness by construction , by projecting for each t the gradient g on the sub-tangent-space of zero change to 3 It is easy to come up with other algorithms for monotonising a ( discretised ) function . One could simply sort the array , but that is not optimal with respect to any of the usual function norms ; or clip the derivatives to be nonnegative and then rescale the entire function , but that is not robust against noise pertubations . 4Note that the optimum is not necessarily unique . Algorithm 2 Projected Gradient Descent 1 : φ← ( ( t , r ) 7→ t ) ▷ Start with linear-interpolation path 2 : while φ is not sufficiently saturated do 3 : for t in [ 0 , 1 ] do 4 : xφ , t : = ( 1− φ ( t ) ) x0 + φ ( t ) x1 5 : compute F ( xφ , t ) with gradient g : = ∇F ( xφ , t ) 6 : let ĝ : = g− ∫ Ω g ▷ ensure ĝ does not affect mass of φ ( t ) 7 : update φ ( t , r ) ← φ ( t , r ) − γ ⟨ĝ ( r ) | |x1 − x0⟩ , for r in Ω ▷ γ is learning rate 8 : ( optional ) apply a filter to φ ( t ) 9 : end for 10 : ( optional ) apply nonlinear gain to φ 11 : for r in Ω do 12 : re-monotonise t 7→ φ ( t , r ) , using Algorithm 1 13 : end for 14 : clamp φ ( t , r ) to [ 0 , 1 ] everywhere 15 : re-parametrise φ , such that ∫ Ω φ ( t ) = t for all t ( using Appendix A ) 16 : end while . ∫ Ω φ ( t ) , by subtracting the constant function times ∫ Ω g ( t ) . Note this requires the measure of Ω to be normalised , or else considered at this point . Then we apply these gradients time-wise as updates to the path , using a scalar product in the channelspace to obtain the best direction for φ itself ( as opposed to the corresponding image composit xφ , t ) . Simply projecting the updates path then again to the set of legal ( in the sense of Definition 3.1 ) ablation paths would presumably enough to converge towards a saturated path with high score , however in tests with artificial constant gradient we found out that this requires extremely many iterations , with the number apparently scaling with the image dimension . The problem here is that saturating updates tend to be undone again by the speed-normalising reparametrisation , except for the most affected pixel . ( Just increasing the learning rate does not help with this . ) If the gradients come from a deep CNN and for every pixel the monotonicity needs to be restored , such many iterations would be prohibitly computation-intensive . Fortunately we can dramatically speed up the convergence by artificially encouraging saturation . We tweak the ablation path φ pointwise with a sigmoidal function that brings values lower than 12 slightly closer to 0 , and values greater than 12 slightly closer to 1 . To this end , we use a perturbation of the identity function defined by x 7→ x+ ϵ ( x ) , and apply it pointwise to the path : φ ( r , t ) ← φ ( r , t ) + ϵ ( φ ( r , t ) ) The perturbation function ϵ : [ 0 , 1 ] → R has the property that x + ϵ ( x ) maps [ 0 , 1 ] into itself . The function ϵ we use is plotted on Figure 9 . Although this perturbation seems small , the examples in §6 now only require 20-40 iterations . As to the motivation behind the transformation φ→ φ+ ϵ ( φ ) , notice first that fully saturated masks – i.e. , those that choose for every pixel are either zero or one , selecting exactly the value of either the current target or the baseline – are fixpoints of the function x 7→ x+ ϵ ( x ) since ϵ ( 0 ) = ϵ ( 1 ) = 0 . So if such a mask is the optimum in the algorithm without artificial saturation ( while there is no guarantee for this in general , this seems fairly frequent in practice ) , then it will also be an optimum of the algorithm with artificial saturation . What is more , the dynamical system x 7→ x+ϵ ( x ) quickly converges to zero or one , which efficiently encourages saturation , without sacrificing precision , as the function ϵ we chose is quite small . Conversely , and unlike high learning rate , the saturation function is by construction monotone , symmetric and keeps the signal within the allowed bounds , so it avoids violating the ablation path constraints . The problem with high learning rates is that the algorithm gets caught in a sequence of alternating strong constraint-violating updates followed by a projection step that largely undoes the previous update . D Evaluation with Pointing Game The Pointing Game , the results of which we show in §7 , is a way to verify that the saliency method points at a region that a human would consider relevant to the classification . It is often the region of an image that contains the physical object which is being classified . Such evaluations of saliency methods clearly have caveats . One can for instance argue that the cases when the saliency points somewhere outside the bounding box are the most insightful ones , as they indicate that the classifier is using information from an unexpected part of the image ( for instance , the background ) . Another caveat is that , if winning at the pointing game is the goal , a saliency method is only as good as its underlying classifier is . Nevertheless , if a saliency method often hits the bounding box it is reasonable to conclude that both the classifier and the saliency method behave in an intuitive way , from a human perspective . Our measurements in Table 1 confirm that the ablation-path method indeed does this well . Our method has an advantage over other ones as it yields not only a single spatial map as the saliency but a whole path of masks . However , it does not directly give a saliency map . Here is howwe choose one point in the image from an ablation path . First , we choose a specific time , just as we did in the examples in §6 . In most cases , this means that we chose the time at which the probability has dropped by 20 % , that is the smallest time t such that F ( t ) ≤ 0.8 . When there is no such time , we pick the one for which F takes the maximum value on the path . Now that the time is chosen , we pick the point in the mask which have the smallest value . Note that , even though this selection may be unstable ( since many points are close to the minimum value , as the mask is typically saturated ) , it usually does not matter since the whole region selected by the mask is salient . The classifier in this experiment was an EfficientNet Tan & Le ( 2019 ) pre-trained on ImageNet , the test data set 360 images from three synsets out of ImageNet . As a comparison , we evaluated the pointing game with the same network and inputs also through the closely related Meaningful Perturbations method Fong & Vedaldi ( 2017 ) . We used a third-party PyTorch implementation Gildenblat ( 2017 ) . Note that this implementation uses a slightly simplified method of removing information for performance , and that we did not change any of the hyperparameters of the method , so it is very likely that these results are not optimal . We also note that Fong & Vedaldi ( 2017 ) themselves include results for the pointing game on different data , with better scores . Nevertheless , the point was to show that our method works reasonably well , and this may be due to the use of ablation paths : that increasing family of mask probably gives some stability to the saliency method , which improves the scores . E Random ablation paths In this section , following an idea of Sturmfels et al . ( 2020 ) , we compare our method to random ablation-paths . Figure 2 includes one such example – the random path , which has a quite fuzzy class transition in roughly the middle of the path . Figure 10 shows that this typical behaviour . In the unsmoothed case , the scores are almost compactly clustered in the middle , i.e. , paths consisting of random single-pixel transitions rarely have exceptional scores . If the random paths are spatially smoothed , outliers becomemore likely ( the paths could by coincidence mask out a whole particularly relevant region ) , but the scores are still really unlikely to reach 0.9 , something our optimisation approach routinely attains . F More examples We provide in Figure 11 a series of ablation path results for one class in the ILSVRC14 datasetRussakovsky et al . ( 2015 ) . | Saliency problem for black-box classification is the main focus in this paper, which means to find out the part of the image that is most relevant for the current model decision. Authors propose to find an optimal ablation path between two images to get such saliency maps. The finding in this paper suggest a new view based on ablation path optimization. Several examples are presented to show the behavior of the proposed method for one image classification model. | SP:e5f3f418dfcf0d45c37cfc237aee269a3b9bfad3 |
A new framework for tensor PCA based on trace invariants | 1 INTRODUCTION . Powerful computers and acquisition devices have made it possible to capture and store real-world multidimensional data . For practical applications ( Kolda & Bader ( 2009 ) ) , analyzing and organizing these high dimensional arrays ( formally called tensors ) lead to the well known curse of dimensionality ( Gao et al . ( 2017 ) , Suzuki ( 2019 ) ) . Thus , dimensionality reduction is frequently employed to transform a high-dimensional data set by projecting it into a lower dimensional space while retaining most of the information and underlying structure . One of these techniques is Principal Component Analysis ( PCA ) , which has made remarkable progress in a large number of areas thanks to its simplicity and adaptability ( Jolliffe & Cadima ( 2016 ) ; Seddik et al . ( 2019 ) ) . In the Tensor PCA , as introduced by Richard & Montanari ( 2014 ) , we consider a model where we attempt to detect and retrieve an unknown unit vector v0 from noise-corrupted multi-linear measurements put in the form of a tensor T. Using the notations found below , our model consists in : T = βv⊗k0 + Z , ( 1 ) with Z a pure Gaussian noise tensor of order k and dimension n with identically independent distributed ( iid ) standard Gaussian entries : Zi1 , i2 , ... , ik ∼ N ( 0 , 1 ) and β the signal-to-noise ratio . To solve this important problem , many methods have been proposed . However , practical applications require optimizable and parallelizable algorithms that are able to avoid the high computationally cost due to an unsatisfactory scalability of some of these methods . A summary of the time and space requirement of some existent methods can be found in Anandkumar et al . ( 2017 ) . One way to achieve this parallelizable algorithm is through methods based on tensor contractions ( Kim et al . ( 2018 ) ) which are extensions of the matrix product . These last years , tools based on tensor contractions have been developed by theoretical physicists where random tensors have emerged as a generalization of random matrices . In this paper , we investigate the algorithmic threshold of tensor PCA and some of its variants using the theoretical physics approach and we show that it leads to new insights and knowledge in tensor PCA . Tensor PCA and tensor decomposition ( the recovery of multiple spikes ) is motivated by the increasing number of problems in which it is crucial to exploit the tensorial structure ( Sidiropoulos et al . ( 2017 ) ) . Recently it was successfully used to address important problems in unsupervised learning ( learning latent variable models , in particular latent Dirichlet allocation Anandkumar et al . ( 2014 ) , Anandkumar et al . ( 2015 ) ) , supervised learning ( training of two-layer neural networks , Janzamin et al . ( 2015 ) ) and reinforcement learning ( Azizzadenesheli et al . ( 2016 ) ) . Related work Tensor PCA was introduced by Richard & Montanari ( 2014 ) where the authors suggested and analyzed different methods to recover the signal vector like matrix unfolding and power iteration . Since then , various other methods were proposed . Hopkins et al . ( 2015 ) introduced algorithms based on the sum of squares hierarchy with the first proven algorithmic threshold of nk/4 . However this class of algorithm generally requires high computing resources and relies on complex mathematical tools ( which makes its algorithmic optimization difficult ) . Other studied methods have been inspired by different perspectives like homotopy in Anandkumar et al . ( 2017 ) , statistical physics ( Arous et al . ( 2020 ) , Ros et al . ( 2019 ) , Wein et al . ( 2019 ) and Biroli et al . ( 2020 ) ) , quantum computing ( Hastings ( 2020 ) ) as well as statistical query ( Dudeja & Hsu ( 2020 ) ) . Recently , a fundamentally different set of mathematical tools that have been developed for tensors in the context of high energy physics have been used to approach the problem . They consist in trace invariants of degree d ∈ N , obtained by contracting pair of indices of d copies of the tensor T. They have been used in Evnin ( 2020 ) to study the highest eigenvalue of a real symmetric Gaussian tensor . Subsequently , Gurau ( 2020 ) provided a theoretical study on a function based on an infinite sum of these invariants . Their results suggest a transition phase for the highest eigenvalue of a tensor for β around n1/2 in a similar way to the BBP transition in the matrix case ( Baik et al . ( 2005 ) ) . Thus , this function allows the detection of a spike . However evaluating it involves computing an integral over a n-dimensional space , which may not be possible in a polynomial time . The contribution of this paper is the use of these invariant tools to build tractable algorithms with polynomial complexity . In contrast to Gurau ( 2020 ) , instead of using a sum of an infinite number of invariants , we select one trace invariant with convenient properties to build our algorithms . It lets us detect the presence of the signal linearly in time and with a space requirement in O ( 1 ) . Moreover , in order to recover the signal vector besides simply detecting it , we introduce new tools in the form of matrices associated to this specific invariant . Within this framework , we show as particular cases , that the two simpler graphs ( of degree two ) are similar to the tensor unfolding and the homotopy algorithms ( which is equivalent to average gradient descent ) . These two algorithms are the main practical ones known from the point of view of space and time requirement ( Anandkumar et al . ( 2017 ) provides a table comparison ) . Notations We use bold characters T , M , v for tensors , matrices and vectors and Tijk , Mij , vi for their components . [ p ] denotes the set { 1 , . . . , n } . A real k−th order tensor is of order k if it is a member of the tensor product of Rni , i ∈ [ k ] : T ∈ ⊗k i=1 Rni . It is symmetric if Ti1 ... ik = Tτ ( i1 ) ... τ ( ik ) ∀τ ∈ Sk where Sk is the symmetric group ( more details are provided in Appendix ? ? ) . For a vector v ∈ Rn , we use v⊗p ≡ v⊗ v⊗ · · · ⊗ v ∈ ⊗pRn to denote its p-th tensor power . 〈v , w〉 denotes the scalar product of v and w. Let ’ s define the operator norm , which is equivalent to the highest eigenvalue of a tensor of any order : ‖X‖op ≡ max { Xi1 , ... , ik ( w1 ) i1 . . . ( wk ) ik , ∀i ∈ { 1 , . . . , n } , ‖wi‖ ≤ 1 } The trace of A is denoted Tr ( A ) . We denote the expectation of a variable X by E ( X ) and its variance by σ ( X ) . We say that a function f is negligible compared to a positive function g and we write f = o ( g ) if limn→∞ f/g → 0 . Einstein summation convention It is important to keep in mind throughout the paper that we will follow the Einstein summation convention : when an index variable appears twice in a single term and is not otherwise defined , it implies summation of that term over all the values of the index . For example : TijkTijk ≡ ∑ ijk TijkTijk . It is a common convention when addressing tensor problems that helps to make the equations more comprehensible . 2 GENERAL FRAMEWORK FOR SIGNAL DETECTION AND RECOVERY . 2.1 WHAT DO WE USE TO STUDY THE SIGNAL ? . An important concept in problems involving matrices is the spectral theory . It refers to the study of eigenvalues and eigenvectors of a matrix . It is of fundamental importance in many areas . In machine learning , the matrix PCA computes the eigenvectors and eigenvalues of the covariance matrix of the features to perform a dimensional reduction while ensuring most of the key information is maintained . In this case , the eigenvalues is a very efficient tool to describe data variability . In the case of signal processing , eigenvalue can contain information about the intensity of the signal , while the eigenvector points out to its direction . Lastly , a more theoretical example involves quantum physics where the spectrum of the matrix operator is used to calculate the energy levels and the state associated . In all of these examples , an important property of the eigenvalues of a n-dimensional matrix M is its invariance under orthogonal transformations { M → OMO−1 , O ∈ O ( n ) } where O ( n ) is the n-dimensional orthogonal group ( i.e . the group of real matrices that satisfies OO > = In , which should not be confused with the computational complexity O ( n ) ) . Since these transformations essentially just rotate the basis to define the coordinate system , they must not affect intrinsic information like data variability , signal intensity or the energy of a system . The eigenvalues are able to capture some of these inherent information , but recovering the complete general information requires computing their respective eigenvectors ( for example to find the principal component , the direction of the signal or the physical state ) . There are more such invariants than eigenvalues . Another important set worth mentioning are the traces of the n first matrix powers Tr ( A ) , Tr ( A2 ) , . . . , Tr ( An ) . Obtaining them uses slightly different methods than eigenvalues , but they contain the same information since each set can be inferred from the other through some basic algebraic operations . On the basis of the matrix case , we expect that for a tensor T ∈ ⊗k i=1 Rni , tensor quantities that are invariant under orthogonal transformations ( Ta1j ... akj → O ( 1 ) a1jb 1 j . . . O ( k ) akj b k j Tb1j ... bkj for O ( i ) ∈ O ( ni ) ∀i ∈ [ k ] ) should capture similar intrinsic information like the intensity of the signal , and conceivably , there should be other objects related to these quantities that are able to indicate the direction of the signal . However , the concept of eigenvalue and eigenvector is ill defined in the tensor case and not practical giving that the number of eigenvalues is exponential with the dimension n ( Qi ( 2005 ) , Cartwright & Sturmfels ( 2013 ) ) and computing them is very complicated . In contrast , we have a very convenient generalization of the traces of the power matrices for the tensors that we call trace invariants . They have been extensively studied during the last years in the context of high energy physics and many important properties have been proven ( Gurau ( 2017 ) ) . We first give a more formal definition of trace invariants . Let T be a tensor whose entries are Ti1 , ... , ik . Let ’ s define a contraction of a pair of indices as setting them equal to each other and summing over them , as in calculating the trace of a matrix ( Aij → ∑n i=1 Aii ) . The trace invariants of the tensor T correspond to the different way to contract pairs of indices in a product of an even number of copies of T. The degree of the trace invariants consists in the number of copies of T contracted . For example , ∑ i1 , i2 , i3 Ti1i2i3Ti1i2i3 and ∑ i1 , i2 , i3 Ti1i2i2Ti1i3i3 are trace invariants of degree 2 . In the remainder of this paper , we will use the Einstein summation convention defined in the notation subsection . A trace invariant of degree d of a tensor T of order k admits a practical graphical representation as an edge colored graph G obtained by following two steps : we first draw d vertices representing the d different copies of T. The indices of each copy is represented by k half-edges with a different color for each index position as shown in Figure 1a . Then , when two different indices are contracted in the tensor invariant , we connect their corresponding half-edges in G. Reciprocally , to obtain the tensor invariant associated to a graph G with d vertices , we take d copies of T ( one for each vertex ) , we associate a color for each index position , and we contract the indices of the d copies of T following the coloring of the edges connecting the vertices . We denote this invariant IG ( T ) . Three important examples of trace invariants are : the melon diagram ( Figure 1b ) and the tadpole ( 1c ) . Avohou et al . ( 2020 ) provides a thorough study about the number of trace invariants for a given degree d. A very useful asset of these invariants is that we are able to compute their expectation for tensors whose components are Gaussian using simple combinatorial analysis ( Gurau ( 2017 ) ) . | This paper studies the detection and recovery problem in spiked tensor models in the form T = \beta v0^\otimes k + Z, where v0 is the underlying spike signal and Z is a Gaussian noise. The authors claim that they propose a new framework to solve the problem, by looking at the trace invariants of tensors. The authors provide a detection algorithm (Algorithm 1) and a recovery algorithm (Algorithm 2), as well as the corresponding phases. The authors claim that: 1) they "build tractable algorithms with polynomial complexity", "a detection algorithm linear in time"; 2) the algorithms are very suitable for parallel architectures; 3) an improvement of the state of the art for the symmetric tensor PCA experimentally. The authors furthermore discuss the asymmetric case and the multiple spike case. | SP:a8d2b848db3e06293f0fd3c0a3a3a45e02dad92a |
A new framework for tensor PCA based on trace invariants | 1 INTRODUCTION . Powerful computers and acquisition devices have made it possible to capture and store real-world multidimensional data . For practical applications ( Kolda & Bader ( 2009 ) ) , analyzing and organizing these high dimensional arrays ( formally called tensors ) lead to the well known curse of dimensionality ( Gao et al . ( 2017 ) , Suzuki ( 2019 ) ) . Thus , dimensionality reduction is frequently employed to transform a high-dimensional data set by projecting it into a lower dimensional space while retaining most of the information and underlying structure . One of these techniques is Principal Component Analysis ( PCA ) , which has made remarkable progress in a large number of areas thanks to its simplicity and adaptability ( Jolliffe & Cadima ( 2016 ) ; Seddik et al . ( 2019 ) ) . In the Tensor PCA , as introduced by Richard & Montanari ( 2014 ) , we consider a model where we attempt to detect and retrieve an unknown unit vector v0 from noise-corrupted multi-linear measurements put in the form of a tensor T. Using the notations found below , our model consists in : T = βv⊗k0 + Z , ( 1 ) with Z a pure Gaussian noise tensor of order k and dimension n with identically independent distributed ( iid ) standard Gaussian entries : Zi1 , i2 , ... , ik ∼ N ( 0 , 1 ) and β the signal-to-noise ratio . To solve this important problem , many methods have been proposed . However , practical applications require optimizable and parallelizable algorithms that are able to avoid the high computationally cost due to an unsatisfactory scalability of some of these methods . A summary of the time and space requirement of some existent methods can be found in Anandkumar et al . ( 2017 ) . One way to achieve this parallelizable algorithm is through methods based on tensor contractions ( Kim et al . ( 2018 ) ) which are extensions of the matrix product . These last years , tools based on tensor contractions have been developed by theoretical physicists where random tensors have emerged as a generalization of random matrices . In this paper , we investigate the algorithmic threshold of tensor PCA and some of its variants using the theoretical physics approach and we show that it leads to new insights and knowledge in tensor PCA . Tensor PCA and tensor decomposition ( the recovery of multiple spikes ) is motivated by the increasing number of problems in which it is crucial to exploit the tensorial structure ( Sidiropoulos et al . ( 2017 ) ) . Recently it was successfully used to address important problems in unsupervised learning ( learning latent variable models , in particular latent Dirichlet allocation Anandkumar et al . ( 2014 ) , Anandkumar et al . ( 2015 ) ) , supervised learning ( training of two-layer neural networks , Janzamin et al . ( 2015 ) ) and reinforcement learning ( Azizzadenesheli et al . ( 2016 ) ) . Related work Tensor PCA was introduced by Richard & Montanari ( 2014 ) where the authors suggested and analyzed different methods to recover the signal vector like matrix unfolding and power iteration . Since then , various other methods were proposed . Hopkins et al . ( 2015 ) introduced algorithms based on the sum of squares hierarchy with the first proven algorithmic threshold of nk/4 . However this class of algorithm generally requires high computing resources and relies on complex mathematical tools ( which makes its algorithmic optimization difficult ) . Other studied methods have been inspired by different perspectives like homotopy in Anandkumar et al . ( 2017 ) , statistical physics ( Arous et al . ( 2020 ) , Ros et al . ( 2019 ) , Wein et al . ( 2019 ) and Biroli et al . ( 2020 ) ) , quantum computing ( Hastings ( 2020 ) ) as well as statistical query ( Dudeja & Hsu ( 2020 ) ) . Recently , a fundamentally different set of mathematical tools that have been developed for tensors in the context of high energy physics have been used to approach the problem . They consist in trace invariants of degree d ∈ N , obtained by contracting pair of indices of d copies of the tensor T. They have been used in Evnin ( 2020 ) to study the highest eigenvalue of a real symmetric Gaussian tensor . Subsequently , Gurau ( 2020 ) provided a theoretical study on a function based on an infinite sum of these invariants . Their results suggest a transition phase for the highest eigenvalue of a tensor for β around n1/2 in a similar way to the BBP transition in the matrix case ( Baik et al . ( 2005 ) ) . Thus , this function allows the detection of a spike . However evaluating it involves computing an integral over a n-dimensional space , which may not be possible in a polynomial time . The contribution of this paper is the use of these invariant tools to build tractable algorithms with polynomial complexity . In contrast to Gurau ( 2020 ) , instead of using a sum of an infinite number of invariants , we select one trace invariant with convenient properties to build our algorithms . It lets us detect the presence of the signal linearly in time and with a space requirement in O ( 1 ) . Moreover , in order to recover the signal vector besides simply detecting it , we introduce new tools in the form of matrices associated to this specific invariant . Within this framework , we show as particular cases , that the two simpler graphs ( of degree two ) are similar to the tensor unfolding and the homotopy algorithms ( which is equivalent to average gradient descent ) . These two algorithms are the main practical ones known from the point of view of space and time requirement ( Anandkumar et al . ( 2017 ) provides a table comparison ) . Notations We use bold characters T , M , v for tensors , matrices and vectors and Tijk , Mij , vi for their components . [ p ] denotes the set { 1 , . . . , n } . A real k−th order tensor is of order k if it is a member of the tensor product of Rni , i ∈ [ k ] : T ∈ ⊗k i=1 Rni . It is symmetric if Ti1 ... ik = Tτ ( i1 ) ... τ ( ik ) ∀τ ∈ Sk where Sk is the symmetric group ( more details are provided in Appendix ? ? ) . For a vector v ∈ Rn , we use v⊗p ≡ v⊗ v⊗ · · · ⊗ v ∈ ⊗pRn to denote its p-th tensor power . 〈v , w〉 denotes the scalar product of v and w. Let ’ s define the operator norm , which is equivalent to the highest eigenvalue of a tensor of any order : ‖X‖op ≡ max { Xi1 , ... , ik ( w1 ) i1 . . . ( wk ) ik , ∀i ∈ { 1 , . . . , n } , ‖wi‖ ≤ 1 } The trace of A is denoted Tr ( A ) . We denote the expectation of a variable X by E ( X ) and its variance by σ ( X ) . We say that a function f is negligible compared to a positive function g and we write f = o ( g ) if limn→∞ f/g → 0 . Einstein summation convention It is important to keep in mind throughout the paper that we will follow the Einstein summation convention : when an index variable appears twice in a single term and is not otherwise defined , it implies summation of that term over all the values of the index . For example : TijkTijk ≡ ∑ ijk TijkTijk . It is a common convention when addressing tensor problems that helps to make the equations more comprehensible . 2 GENERAL FRAMEWORK FOR SIGNAL DETECTION AND RECOVERY . 2.1 WHAT DO WE USE TO STUDY THE SIGNAL ? . An important concept in problems involving matrices is the spectral theory . It refers to the study of eigenvalues and eigenvectors of a matrix . It is of fundamental importance in many areas . In machine learning , the matrix PCA computes the eigenvectors and eigenvalues of the covariance matrix of the features to perform a dimensional reduction while ensuring most of the key information is maintained . In this case , the eigenvalues is a very efficient tool to describe data variability . In the case of signal processing , eigenvalue can contain information about the intensity of the signal , while the eigenvector points out to its direction . Lastly , a more theoretical example involves quantum physics where the spectrum of the matrix operator is used to calculate the energy levels and the state associated . In all of these examples , an important property of the eigenvalues of a n-dimensional matrix M is its invariance under orthogonal transformations { M → OMO−1 , O ∈ O ( n ) } where O ( n ) is the n-dimensional orthogonal group ( i.e . the group of real matrices that satisfies OO > = In , which should not be confused with the computational complexity O ( n ) ) . Since these transformations essentially just rotate the basis to define the coordinate system , they must not affect intrinsic information like data variability , signal intensity or the energy of a system . The eigenvalues are able to capture some of these inherent information , but recovering the complete general information requires computing their respective eigenvectors ( for example to find the principal component , the direction of the signal or the physical state ) . There are more such invariants than eigenvalues . Another important set worth mentioning are the traces of the n first matrix powers Tr ( A ) , Tr ( A2 ) , . . . , Tr ( An ) . Obtaining them uses slightly different methods than eigenvalues , but they contain the same information since each set can be inferred from the other through some basic algebraic operations . On the basis of the matrix case , we expect that for a tensor T ∈ ⊗k i=1 Rni , tensor quantities that are invariant under orthogonal transformations ( Ta1j ... akj → O ( 1 ) a1jb 1 j . . . O ( k ) akj b k j Tb1j ... bkj for O ( i ) ∈ O ( ni ) ∀i ∈ [ k ] ) should capture similar intrinsic information like the intensity of the signal , and conceivably , there should be other objects related to these quantities that are able to indicate the direction of the signal . However , the concept of eigenvalue and eigenvector is ill defined in the tensor case and not practical giving that the number of eigenvalues is exponential with the dimension n ( Qi ( 2005 ) , Cartwright & Sturmfels ( 2013 ) ) and computing them is very complicated . In contrast , we have a very convenient generalization of the traces of the power matrices for the tensors that we call trace invariants . They have been extensively studied during the last years in the context of high energy physics and many important properties have been proven ( Gurau ( 2017 ) ) . We first give a more formal definition of trace invariants . Let T be a tensor whose entries are Ti1 , ... , ik . Let ’ s define a contraction of a pair of indices as setting them equal to each other and summing over them , as in calculating the trace of a matrix ( Aij → ∑n i=1 Aii ) . The trace invariants of the tensor T correspond to the different way to contract pairs of indices in a product of an even number of copies of T. The degree of the trace invariants consists in the number of copies of T contracted . For example , ∑ i1 , i2 , i3 Ti1i2i3Ti1i2i3 and ∑ i1 , i2 , i3 Ti1i2i2Ti1i3i3 are trace invariants of degree 2 . In the remainder of this paper , we will use the Einstein summation convention defined in the notation subsection . A trace invariant of degree d of a tensor T of order k admits a practical graphical representation as an edge colored graph G obtained by following two steps : we first draw d vertices representing the d different copies of T. The indices of each copy is represented by k half-edges with a different color for each index position as shown in Figure 1a . Then , when two different indices are contracted in the tensor invariant , we connect their corresponding half-edges in G. Reciprocally , to obtain the tensor invariant associated to a graph G with d vertices , we take d copies of T ( one for each vertex ) , we associate a color for each index position , and we contract the indices of the d copies of T following the coloring of the edges connecting the vertices . We denote this invariant IG ( T ) . Three important examples of trace invariants are : the melon diagram ( Figure 1b ) and the tadpole ( 1c ) . Avohou et al . ( 2020 ) provides a thorough study about the number of trace invariants for a given degree d. A very useful asset of these invariants is that we are able to compute their expectation for tensors whose components are Gaussian using simple combinatorial analysis ( Gurau ( 2017 ) ) . | The paper presents a pair of interesting algorithms using trace invariants to detect the signal in the signal-plus-noise tensor PCA framework. The algorithms function by considering cutting an edge in the graph representation of the trace invariant, yielding a matrix whose leading eigenvector provides a (up to a rotation) estimate of the signal vector $v$. This algorithm appears to be very interesting and works well in a series of simulations. | SP:a8d2b848db3e06293f0fd3c0a3a3a45e02dad92a |
Image Augmentation Is All You Need: Regularizing Deep Reinforcement Learning from Pixels | 1 INTRODUCTION . Sample-efficient deep reinforcement learning ( RL ) algorithms capable of directly training from image pixels would open up many real-world applications in control and robotics . However , simultaneously training a convolutional encoder alongside a policy network is challenging when given limited environment interaction , strong correlation between samples and a typically sparse reward signal . Limited supervision is a common problem across AI and two approaches are commonly taken : ( i ) training with an additional auxiliary losses , such as those based on self-supervised learning ( SSL ) and ( ii ) training with data augmentation . A wide range of auxiliary loss functions have been proposed to augment supervised objectives , e.g . weight regularization , noise injection ( Hinton et al. , 2012 ) , or various forms of auto-encoder ( Kingma et al. , 2014 ) . In RL , reconstruction losses ( Jaderberg et al. , 2017 ; Yarats et al. , 2019 ) or SSL objectives ( Dwibedi et al. , 2018 ; Srinivas et al. , 2020 ) are used . However , these objectives are unrelated to the task at hand , thus have no guarantee of inducing an appropriate representation for the policy network . SSL losses are highly effective in the large data regime , e.g . in domains such as vision ( Chen et al. , 2020 ; He et al. , 2019 ) and NLP ( Collobert et al. , 2011 ; Devlin et al. , 2018 ) where large ( unlabeled ) datasets are readily available . However , in sample-efficient RL , training data is more limited due to restricted interaction between the agent and the environment , limiting their effectiveness . Data augmentation methods are widely used in vision and speech domains , where output-invariant perturbations can easily be applied to the labeled input examples . Surprisingly , data augmentation ∗Equal contribution . Author ordering determined by coin flip . Both authors are corresponding . has received little attention in the RL community . In this paper we propose augmentation approaches appropriate for sample-efficient RL and comprehensively evaluate them . The key idea of our approach is to use standard image transformations to perturb input observations , as well as regularizing the Q-function learned by the critic so that different transformations of the same input image have similar Q-function values . No further modifications to standard actor-critic algorithms are required . Our study is , to the best of our knowledge , the first careful examination of image augmentation in sample-efficient RL . The main contributions of the paper are as follows : ( i ) the first to demonstrate that data augmentation greatly improves performance when training model-free RL algorithms from images ; ( ii ) introducing a natural way to exploit MDP structure through two mechanisms for regularizing the value function , in a manner that is generally applicable to model-free RL and ( iii ) setting a new state-of-the-art performance on the standard DeepMind control suite ( Tassa et al. , 2018 ) , closing the gap between learning from states , and Atari 100k ( Kaiser et al. , 2019 ) benchmarks . 2 RELATED WORK . Data Augmentation in Computer Vision Data augmentation via image transformations has been used to improve generalization since the inception of convolutional networks ( Becker & Hinton , 1992 ; Simard et al. , 2003 ; LeCun et al. , 1989 ; Ciresan et al. , 2011 ; Ciregan et al. , 2012 ) . Following AlexNet ( Krizhevsky et al. , 2012 ) , they have become a standard part of training pipelines . For object classification tasks , the transformations are selected to avoid changing the semantic category , i.e . translations , scales , color shifts , etc . While a similar set of transformations are potentially applicable to control tasks , the RL context does require modifications to be made to the underlying algorithm . Data augmentation methods have also been used in the context of self-supervised learning . Dosovitskiy et al . ( 2016 ) use per-exemplar perturbations in a unsupervised classification framework . More recently , several approaches ( Chen et al. , 2020 ; He et al. , 2019 ; Misra & van der Maaten , 2019 ) have used invariance to imposed image transformations in contrastive learning schemes , producing state-of-the-art results on downstream recognition tasks . By contrast , our scheme addresses control tasks , utilizing different types of invariance . Data Augmentation in RL In contrast to computer vision , data augmentation is rarely used in RL . Certain approaches implicitly adopt it , for example Levine et al . ( 2018 ) ; Kalashnikov et al . ( 2018 ) use image augmentation as part of the AlexNet training pipeline without analysing the benefits occurring from it , thus being overlooked in subsequent work . HER ( Andrychowicz et al. , 2017 ) exploits information about the observation space by goal and reward relabeling , which can be viewed as a way to perform data augmentation . Other work uses data augmentation to improve generalization in domain transfer ( Cobbe et al. , 2018 ) . However , the classical image transformations used in vision have not previously been shown to definitively help on standard RL benchmarks . Concurrent with our work , RAD ( Laskin et al. , 2020 ) performs an exploration of different data augmentation approaches , but is limited to transformations of the image alone , without the additional augmentation of the Q-function used in our approach . Moreover , RAD can be regarded as a special case of our algorithm . Multiple follow ups to our initial preprint appeared on ArXiv ( Raileanu et al. , 2020 ; Okada & Taniguchi , 2020 ) , using similar techniques on other tasks , thus supporting the effectiveness and generality of data augmentation in RL . Continuous Control from Pixels There are a variety of methods addressing the sample-efficiency of RL algorithms that directly learn from pixels . The most prominent approaches for this can be classified into two groups , model-based and model-free methods . The model-based methods attempt to learn the system dynamics in order to acquire a compact latent representation of high-dimensional observations to later perform policy search ( Hafner et al. , 2018 ; Lee et al. , 2019 ; Hafner et al. , 2019 ) . In contrast , the model-free methods either learn the latent representation indirectly by optimizing the RL objective ( Barth-Maron et al. , 2018 ; Abdolmaleki et al. , 2018 ) or by employing auxiliary losses that provide additional supervision ( Yarats et al. , 2019 ; Srinivas et al. , 2020 ; Sermanet et al. , 2018 ; Dwibedi et al. , 2018 ) . Our approach is complementary to these methods and can be combined with them to improve performance . 3 BACKGROUND . Reinforcement Learning from Images We formulate image-based control as an infinite-horizon partially observable Markov decision process ( POMDP ) ( Bellman , 1957 ; Kaelbling et al. , 1998 ) . An POMDP can be described as the tuple ( O , A , p , r , γ ) , where O is the high-dimensional observation space ( image pixels ) , A is the action space , the transition dynamics p = Pr ( o′t|o≤t , at ) capture the probability distribution over the next observation o′t given the history of previous observations o≤t and current action at , r : O ×A → R is the reward function that maps the current observation and action to a reward rt = r ( o≤t , at ) , and γ ∈ [ 0 , 1 ) is a discount factor . Per common practice ( Mnih et al. , 2013 ) , throughout the paper the POMDP is converted into an MDP ( Bellman , 1957 ) by stacking several consecutive image observations into a state st = { ot , ot−1 , ot−2 , . . . } . For simplicity we redefine the transition dynamics p = Pr ( s′t|st , at ) and the reward function rt = r ( st , at ) . We then aim to find a policy π ( at|st ) that maximizes the cumulative discounted return Eπ [ ∑∞ t=1 γ trt|at ∼ π ( ·|st ) , s′t ∼ p ( ·|st , at ) , s1 ∼ p ( · ) ] . Soft Actor-Critic The Soft Actor-Critic ( SAC ) ( Haarnoja et al. , 2018 ) learns a state-action value function Qθ , a stochastic policy πθ and a temperature α to find an optimal policy for an MDP ( S , A , p , r , γ ) by optimizing a γ-discounted maximum-entropy objective ( Ziebart et al. , 2008 ) . θ is used generically to denote the parameters updated through training in each part of the model . Deep Q-learning DQN ( Mnih et al. , 2013 ) also learns a convolutional neural net to approximate Q-function over states and actions . The main difference is that DQN operates on discrete actions spaces , thus the policy can be directly inferred from Q-values . In practice , the standard version of DQN is frequently combined with a set of refinements that improve performance and training stability , commonly known as Rainbow ( van Hasselt et al. , 2015 ) . For simplicity , the rest of the paper describes a generic actor-critic algorithm rather than DQN or SAC in particular . Further background on DQN and SAC can be found in Appendix A . 4 SAMPLE EFFICIENT REINFORCEMENT LEARNING FROM PIXELS . 4.1 OPTIMALITY INVARIANT IMAGE TRANSFORMATIONS FOR Q FUNCTION . We first introduce a general framework for regularizing the value function through transformations of the input state . For a given task , we define an optimality invariant state transformation f : S×T → S as a mapping that preserves the Q-values Q ( s , a ) = Q ( f ( s , ν ) , a ) for all s ∈ S , a ∈ A and ν ∈ T . where ν are the parameters of f ( · ) , drawn from the set of all possible parameters T . One example of such transformations are the random image translations successfully applied in the previous section . For every state , the transformations allow the generation of several surrogate states with the same Q-values , thus providing a mechanism to reduce the variance of Q-function estimation . In particular , for an arbitrary distribution of states µ ( · ) and policy π , instead of using a single sample s∗ ∼ µ ( · ) , a∗ ∼ π ( ·|s∗ ) estimation of the following expectation E s∼µ ( · ) a∼π ( ·|s ) [ Q ( s , a ) ] ≈ Q ( s∗ , a∗ ) we generate K samples via random transformations and obtain an estimate with lower variance E s∼µ ( · ) a∼π ( ·|s ) [ Q ( s , a ) ] ≈ 1 K K∑ k=1 Q ( f ( s∗ , νk ) , ak ) where νk ∈ T and ak ∼ π ( ·|f ( s∗ , νk ) ) . This suggests two distinct ways to regularize Q-function . First , we use the data augmentation to compute the target values for every transition tuple ( si , ai , ri , s′i ) as yi = ri + γ 1 K K∑ k=1 Qθ ( f ( s ′ i , ν ′ i , k ) , a ′ i , k ) where a ′ i , k ∼ π ( ·|f ( s′i , ν′i , k ) ) ( 1 ) where ν′i , k ∈ T corresponds to a transformation parameter of s′i . Then the Q-function is updated using these targets through an SGD update using learning rate λθ θ ← θ − λθ∇θ 1 N N∑ i=1 ( Qθ ( f ( si , νi ) , ai ) − yi ) 2 . ( 2 ) In tandem , we note that the same target from Equation ( 1 ) can be used for different augmentations of si , resulting in the second regularization approach θ ← θ − λθ∇θ 1 NM N , M∑ i=1 , m=1 ( Qθ ( f ( si , νi , m ) , ai ) − yi ) 2 . ( 3 ) When both regularization methods are used , νi , m and ν′i , k are drawn independently . | This paper investigates data augmentation in the context of RL and proposes a novel augmentation algorithm to enabling robust learning directly from pixels without the need for auxiliary losses or pre-training. The authors propose to average both the Q function and its target over multiple image transformations. The experiments on DeepMind control suite and Atari 100k benchmark show that their method outperforms previous model-free, model-based and contrastive learning approaches. | SP:f68cb310366c55ef0bb74f3ec61cf95eb62f8f9c |
Image Augmentation Is All You Need: Regularizing Deep Reinforcement Learning from Pixels | 1 INTRODUCTION . Sample-efficient deep reinforcement learning ( RL ) algorithms capable of directly training from image pixels would open up many real-world applications in control and robotics . However , simultaneously training a convolutional encoder alongside a policy network is challenging when given limited environment interaction , strong correlation between samples and a typically sparse reward signal . Limited supervision is a common problem across AI and two approaches are commonly taken : ( i ) training with an additional auxiliary losses , such as those based on self-supervised learning ( SSL ) and ( ii ) training with data augmentation . A wide range of auxiliary loss functions have been proposed to augment supervised objectives , e.g . weight regularization , noise injection ( Hinton et al. , 2012 ) , or various forms of auto-encoder ( Kingma et al. , 2014 ) . In RL , reconstruction losses ( Jaderberg et al. , 2017 ; Yarats et al. , 2019 ) or SSL objectives ( Dwibedi et al. , 2018 ; Srinivas et al. , 2020 ) are used . However , these objectives are unrelated to the task at hand , thus have no guarantee of inducing an appropriate representation for the policy network . SSL losses are highly effective in the large data regime , e.g . in domains such as vision ( Chen et al. , 2020 ; He et al. , 2019 ) and NLP ( Collobert et al. , 2011 ; Devlin et al. , 2018 ) where large ( unlabeled ) datasets are readily available . However , in sample-efficient RL , training data is more limited due to restricted interaction between the agent and the environment , limiting their effectiveness . Data augmentation methods are widely used in vision and speech domains , where output-invariant perturbations can easily be applied to the labeled input examples . Surprisingly , data augmentation ∗Equal contribution . Author ordering determined by coin flip . Both authors are corresponding . has received little attention in the RL community . In this paper we propose augmentation approaches appropriate for sample-efficient RL and comprehensively evaluate them . The key idea of our approach is to use standard image transformations to perturb input observations , as well as regularizing the Q-function learned by the critic so that different transformations of the same input image have similar Q-function values . No further modifications to standard actor-critic algorithms are required . Our study is , to the best of our knowledge , the first careful examination of image augmentation in sample-efficient RL . The main contributions of the paper are as follows : ( i ) the first to demonstrate that data augmentation greatly improves performance when training model-free RL algorithms from images ; ( ii ) introducing a natural way to exploit MDP structure through two mechanisms for regularizing the value function , in a manner that is generally applicable to model-free RL and ( iii ) setting a new state-of-the-art performance on the standard DeepMind control suite ( Tassa et al. , 2018 ) , closing the gap between learning from states , and Atari 100k ( Kaiser et al. , 2019 ) benchmarks . 2 RELATED WORK . Data Augmentation in Computer Vision Data augmentation via image transformations has been used to improve generalization since the inception of convolutional networks ( Becker & Hinton , 1992 ; Simard et al. , 2003 ; LeCun et al. , 1989 ; Ciresan et al. , 2011 ; Ciregan et al. , 2012 ) . Following AlexNet ( Krizhevsky et al. , 2012 ) , they have become a standard part of training pipelines . For object classification tasks , the transformations are selected to avoid changing the semantic category , i.e . translations , scales , color shifts , etc . While a similar set of transformations are potentially applicable to control tasks , the RL context does require modifications to be made to the underlying algorithm . Data augmentation methods have also been used in the context of self-supervised learning . Dosovitskiy et al . ( 2016 ) use per-exemplar perturbations in a unsupervised classification framework . More recently , several approaches ( Chen et al. , 2020 ; He et al. , 2019 ; Misra & van der Maaten , 2019 ) have used invariance to imposed image transformations in contrastive learning schemes , producing state-of-the-art results on downstream recognition tasks . By contrast , our scheme addresses control tasks , utilizing different types of invariance . Data Augmentation in RL In contrast to computer vision , data augmentation is rarely used in RL . Certain approaches implicitly adopt it , for example Levine et al . ( 2018 ) ; Kalashnikov et al . ( 2018 ) use image augmentation as part of the AlexNet training pipeline without analysing the benefits occurring from it , thus being overlooked in subsequent work . HER ( Andrychowicz et al. , 2017 ) exploits information about the observation space by goal and reward relabeling , which can be viewed as a way to perform data augmentation . Other work uses data augmentation to improve generalization in domain transfer ( Cobbe et al. , 2018 ) . However , the classical image transformations used in vision have not previously been shown to definitively help on standard RL benchmarks . Concurrent with our work , RAD ( Laskin et al. , 2020 ) performs an exploration of different data augmentation approaches , but is limited to transformations of the image alone , without the additional augmentation of the Q-function used in our approach . Moreover , RAD can be regarded as a special case of our algorithm . Multiple follow ups to our initial preprint appeared on ArXiv ( Raileanu et al. , 2020 ; Okada & Taniguchi , 2020 ) , using similar techniques on other tasks , thus supporting the effectiveness and generality of data augmentation in RL . Continuous Control from Pixels There are a variety of methods addressing the sample-efficiency of RL algorithms that directly learn from pixels . The most prominent approaches for this can be classified into two groups , model-based and model-free methods . The model-based methods attempt to learn the system dynamics in order to acquire a compact latent representation of high-dimensional observations to later perform policy search ( Hafner et al. , 2018 ; Lee et al. , 2019 ; Hafner et al. , 2019 ) . In contrast , the model-free methods either learn the latent representation indirectly by optimizing the RL objective ( Barth-Maron et al. , 2018 ; Abdolmaleki et al. , 2018 ) or by employing auxiliary losses that provide additional supervision ( Yarats et al. , 2019 ; Srinivas et al. , 2020 ; Sermanet et al. , 2018 ; Dwibedi et al. , 2018 ) . Our approach is complementary to these methods and can be combined with them to improve performance . 3 BACKGROUND . Reinforcement Learning from Images We formulate image-based control as an infinite-horizon partially observable Markov decision process ( POMDP ) ( Bellman , 1957 ; Kaelbling et al. , 1998 ) . An POMDP can be described as the tuple ( O , A , p , r , γ ) , where O is the high-dimensional observation space ( image pixels ) , A is the action space , the transition dynamics p = Pr ( o′t|o≤t , at ) capture the probability distribution over the next observation o′t given the history of previous observations o≤t and current action at , r : O ×A → R is the reward function that maps the current observation and action to a reward rt = r ( o≤t , at ) , and γ ∈ [ 0 , 1 ) is a discount factor . Per common practice ( Mnih et al. , 2013 ) , throughout the paper the POMDP is converted into an MDP ( Bellman , 1957 ) by stacking several consecutive image observations into a state st = { ot , ot−1 , ot−2 , . . . } . For simplicity we redefine the transition dynamics p = Pr ( s′t|st , at ) and the reward function rt = r ( st , at ) . We then aim to find a policy π ( at|st ) that maximizes the cumulative discounted return Eπ [ ∑∞ t=1 γ trt|at ∼ π ( ·|st ) , s′t ∼ p ( ·|st , at ) , s1 ∼ p ( · ) ] . Soft Actor-Critic The Soft Actor-Critic ( SAC ) ( Haarnoja et al. , 2018 ) learns a state-action value function Qθ , a stochastic policy πθ and a temperature α to find an optimal policy for an MDP ( S , A , p , r , γ ) by optimizing a γ-discounted maximum-entropy objective ( Ziebart et al. , 2008 ) . θ is used generically to denote the parameters updated through training in each part of the model . Deep Q-learning DQN ( Mnih et al. , 2013 ) also learns a convolutional neural net to approximate Q-function over states and actions . The main difference is that DQN operates on discrete actions spaces , thus the policy can be directly inferred from Q-values . In practice , the standard version of DQN is frequently combined with a set of refinements that improve performance and training stability , commonly known as Rainbow ( van Hasselt et al. , 2015 ) . For simplicity , the rest of the paper describes a generic actor-critic algorithm rather than DQN or SAC in particular . Further background on DQN and SAC can be found in Appendix A . 4 SAMPLE EFFICIENT REINFORCEMENT LEARNING FROM PIXELS . 4.1 OPTIMALITY INVARIANT IMAGE TRANSFORMATIONS FOR Q FUNCTION . We first introduce a general framework for regularizing the value function through transformations of the input state . For a given task , we define an optimality invariant state transformation f : S×T → S as a mapping that preserves the Q-values Q ( s , a ) = Q ( f ( s , ν ) , a ) for all s ∈ S , a ∈ A and ν ∈ T . where ν are the parameters of f ( · ) , drawn from the set of all possible parameters T . One example of such transformations are the random image translations successfully applied in the previous section . For every state , the transformations allow the generation of several surrogate states with the same Q-values , thus providing a mechanism to reduce the variance of Q-function estimation . In particular , for an arbitrary distribution of states µ ( · ) and policy π , instead of using a single sample s∗ ∼ µ ( · ) , a∗ ∼ π ( ·|s∗ ) estimation of the following expectation E s∼µ ( · ) a∼π ( ·|s ) [ Q ( s , a ) ] ≈ Q ( s∗ , a∗ ) we generate K samples via random transformations and obtain an estimate with lower variance E s∼µ ( · ) a∼π ( ·|s ) [ Q ( s , a ) ] ≈ 1 K K∑ k=1 Q ( f ( s∗ , νk ) , ak ) where νk ∈ T and ak ∼ π ( ·|f ( s∗ , νk ) ) . This suggests two distinct ways to regularize Q-function . First , we use the data augmentation to compute the target values for every transition tuple ( si , ai , ri , s′i ) as yi = ri + γ 1 K K∑ k=1 Qθ ( f ( s ′ i , ν ′ i , k ) , a ′ i , k ) where a ′ i , k ∼ π ( ·|f ( s′i , ν′i , k ) ) ( 1 ) where ν′i , k ∈ T corresponds to a transformation parameter of s′i . Then the Q-function is updated using these targets through an SGD update using learning rate λθ θ ← θ − λθ∇θ 1 N N∑ i=1 ( Qθ ( f ( si , νi ) , ai ) − yi ) 2 . ( 2 ) In tandem , we note that the same target from Equation ( 1 ) can be used for different augmentations of si , resulting in the second regularization approach θ ← θ − λθ∇θ 1 NM N , M∑ i=1 , m=1 ( Qθ ( f ( si , νi , m ) , ai ) − yi ) 2 . ( 3 ) When both regularization methods are used , νi , m and ν′i , k are drawn independently . | To enable robust policy learning with image observations, the paper proposes a simple data augmentation technique that can be used with existing model-free reinforcement learning algorithms. It defines a notion of optimality invariant state transformation which preserves the Q function. An example of such transformations can be random image translations. It uses these transformations to (i) transform the input images, (ii) average the target Q values, and (iii) average the Q function themselves. Using this simple technique, they are able to get SOTA on DM control tasks and Atari 100k benchmark. On DM control tasks, it’s able to outperform SAC trained on state representations. Additionally, the paper provides ablation studies on different image transformations and robustness analysis with respect to hyperparameter settings. | SP:f68cb310366c55ef0bb74f3ec61cf95eb62f8f9c |
Bridging Graph Network to Lifelong Learning with Feature Interaction | 1 Introduction . Graph neural networks ( GNN ) have received increasing attention and proved to be useful for many tasks with graph-structured data , such as citation , social , and protein networks [ 1 ] . However , graph data is usually formed in a streaming fashion and real-world data are continuously evolving over time , thus learning a streaming graph is expected in many cases [ 2 ] . For example , in a social network , the number of users often grows over time and we expect that the model can learn continuously with new users . In this paper , we extend graph neural networks to lifelong learning , which is also known as continual or incremental learning [ 3 ] . However , lifelong learning easily suffers from “ catastrophic forgetting ” if the models are simply updated for new samples via back-propagation [ 4 ] . Although some strategies have been developed to alleviate the forgetting problem for convolutional neural networks ( CNN ) , lifelong learning is still difficult for graph networks . This is because existing graph models such as graph convolutional networks ( GCN ) [ 5 ] require the entire graph for training . This is infeasible for lifelong learning , since the graph size can increase over time and we have to drop off old data or samples to learn new knowledge . To reduce the memory consumption , some graph sampling strategies were proposed , but they are also difficult to directly apply to lifelong learning [ 6–8 ] , since they require a pre-processing of the entire graph [ 8 ] . Preprint . Under review . Recall that regular CNNs are trained in a mini-batch manner where the model can take samples as independent inputs [ 9 ] . Our question is : can we convert a graph task into a traditional CNN-like classification problem , so that ( i ) nodes can be predicted independently and ( ii ) the lifelong learning techniques developed for CNN can be easily adopted for GNN ? However , this is not straightforward as node connections can not be modeled by a regular CNN-like classification model . To solve this problem , we propose to construct a new graph topology , the feature graph in Fig . 1 , to bridge GNN to lifelong learning . It takes the features as nodes and turns the nodes into graphs . This converts the problem of node classification to graph classification and the increasing nodes become independent training samples , thus the feature graphs can be trained in a regular mini-batch manner . The contribution of this paper includes : ( 1 ) We introduce a new graph topology , i.e. , feature graph , to convert a problem of growing graph to increasing training samples , which makes lifelong learning techniques applicable to graph neural networks ; ( 2 ) We take the cross-correlation of neighbor features as the feature adjacency matrix , which is able to explicitly model feature “ interaction ” , that is crucial for many graph-structured tasks ; ( 3 ) Feature graph is of constant computational complexity with the increased learning tasks . We demonstrate its efficiency and effectiveness by applying it to classical graph datasets ; ( 4 ) We further demonstrate its superiority by applying it to a practical application , i.e. , distributed human action recognition based on subgraph classification using wearable devices . 2 Related Work . 2.1 Lifelong Learning . Non-rehearsal Methods Lifelong learning methods in this category do not preserve any old data . To alleviate the forgetting problem , progressive neural networks [ 10 ] leveraged prior knowledge via lateral connections to previously learned features . Learning without forgetting ( LwF ) [ 11 ] introduced a knowledge distillation loss [ 12 ] to neural networks , which encouraged the network output for new classes to be close to the original outputs . Distillation loss was also applied to learning object detectors incrementally [ 13 ] . Learning without memorizing ( LwM ) [ 14 ] extended LwF by adding an attention distillation term based on attention maps and demonstrated that it is helpful for retaining information of the old classes . EWC [ 15 ] remembered old tasks by slowing down learning on important weights . RWalk [ 16 ] generalized EWC and improved weight consolidation by adding a KL-divergence-based regularization . Memory aware synapses ( MAS ) [ 17 ] computed an importance value for each parameter in an unsupervised manner based on the sensitivity of output function to parameter changes . [ 18 ] presented an embedding framework for dynamic attributed network based on parameter regularization . A sparse writing protocol is introduced to a memory module [ 19 ] , ensuring that only a few memory spaces is affected during training . Rehearsal Methods Rehearsal lifelong learning methods can be roughly divided into rehearsal with synthetic data or rehearsal with exemplars from old data [ 20 ] . To ensure that the loss of exemplars does not increase , gradient episodic memory ( GEM ) [ 3 ] introduced orientation constraints during gradient updates . Inspired by GEM , [ 21 ] selected exemplars with a maximal cosine similarity of the gradient orientation . iCaRL [ 22 ] preserved a subset of images with a herding algorithm [ 23 ] and included the subset when updating the network for new classes . EEIL [ 24 ] extended iCaRL by learning the classifier in an end-to-end manner . [ 25 ] further extended iCaRL and discovered that updating the model with class-balanced exemplars further improved the performance . Similarly , [ 26 , 27 ] further added constraints to the loss function to mitigate the effect of imbalance . To reduce the memory consumption of exemplars , [ 28 ] applied the distillation loss to feature space without having to access to the corresponding images . Rehearsal approaches with synthetic data based on generative adversary networks ( GAN ) were used to reduce the dependence on old data [ 29–32 ] . 2.2 Graph Neural Networks . Graph neural networks have been widely used to solve problems about graph-structured data [ 33 ] . The spectral network was the first to extend convolution to the graph domain [ 34 ] . Later the graph convolutional network ( GCN ) [ 5 ] followed this idea and alleviated the problem of overfitting on local neighborhoods via first order Chebyshev expansion . This obtained a good generalization ability and inspired more recent work . To identify the importance of neighborhood features , graph attention network ( GAT ) [ 35 ] added an attention mechanism into GCN , which further improved the performance on citation networks and the protein-protein interaction dataset . GCN and its variants require the entire graph during training , thus they can not scale to large graphs . To solve this problem and train GNN with mini-batches , a sampling method , SAGE [ 6 ] is introduced to learn a function to generate node embedding by sampling and aggregating neighborhood features . JKNet [ 36 ] followed the same sampling strategy and demonstrated a significant accuracy improvement on GCN with jumping connections . DiffPool [ 37 ] learned a differentiable soft cluster assignment to map nodes to a set of clusters , which then formed a coarsened input for the next layer . [ 38 ] designed a training strategy that relied on harder-and-harder training examples to improve the robustness and convergence speed of the model . S-GCN [ 39 ] developed control variate-based algorithms to sample small neighbor sizes and used historical activation in the previous layer to avoid re-evaluation . FastGCN [ 7 ] applied importance sampling to reduce variance and performed node sampling for each layer independently , which resulted in a constant sample size in all layers . [ 40 ] sampled the lower layer conditioned on the top one ensuring higher accuracy and fixed-size sampling . Subgraph sampling techniques were also developed to reduce memory consumption . ClusterGCN [ 41 ] sampled a block of nodes in a dense subgraph identified by a clustering algorithm and restricted the neighborhood search within the subgraph . GraphSiant [ 8 ] constructed mini-batches by sampling the training graph . Nevertheless , most of the sampling techniques still require a pre-processing of the entire graph to determine the sampling process or require a complete graph structure , which makes those algorithms not directly applicable to lifelong learning . In this paper , we hypothesize that a different graph structure is required for lifelong learning , and the new structure is not necessary to maintain its original meaning . We noticed that there is some recent work focusing on continuously learning a graph problem , but they have different formulation . For example , several exemplar selection methods are tested in ER-GNN [ 42 ] . A weight preserving method is introduced to growing graph [ 43 ] . A combined strategy of regularization and data rehearsal is introduced to streaming graphs in [ 2 ] . To overcome the incomplete structure , learning a temporal graph in sliding window is introduced in [ 44 ] . 3 Problem Formulation . We start from defining regular graph learning before lifelong graph learning for coherence . An attribute graph is defined as G = ( V , E ) , where V is the set of nodes and E ⊆ { { va , vb } | ( va , vb ) ∈ V2 } is the set of edges . Each node v ∈ V is associated with a target zv ∈ Z and a multi-channel feature vector xv ∈ X ⊂ RF×C . Each edge e ∈ E is associated with a vector we ∈ W ⊂ RW . In regular graph learning , we aim to learn a predictor f to associate a node xv , v ∈ V ′ with a target zv , given graph G , node features X , edge vectorsW , and part of the targets zv , v ∈ V \ V ′ . In lifelong graph learning , we have the same objective with the regular graph learning , but we are only able to obtain the graph-structured data as a data continuum GL = { ( xi , ti , zi , Nk=1 : K ( xi ) , Wk=1 : K ( xi ) ) i=1 : N } , where each item is formed by a node feature xi ∈ X , a task descriptor ti ∈ T , a target vector zi ∈ Zti , a k-hop neighbor set Nk=1 : K ( xi ) , and an edge vector set Wk=1 : K ( xi ) associated with the k-hop neighbors . For simplicity , we will use the symbol N ( xi ) to denote the available neighbor set and their associated edges . We assume that every item ( xi , N ( xi ) , ti , zi ) satisfies ( xi , N ( xi ) , zi ) ∼ Pti ( X , N ( X ) , Z ) , where Pti is a probability distribution of a single learning task . In lifelong graph learning , we will observe , item by item , the continuum of the graph-structured data as ( x1 , N ( x1 ) , t1 , z1 ) , . . . , ( xN , N ( xN ) , tN , zN ) ( 1 ) While observing ( 1 ) , our goal is to learn a predictor fL to associate a test sample ( x , N ( x ) , t ) with a target z such that ( x , N ( x ) , z ) ∼ Pt . Such test sample can belong to a task that we have observed in the past , the current task , or a task that we will observe ( or not ) in the future . The task descriptors ti is defined for compatibility with lifelong learning that requires it [ 3 ] , but it is not used in this paper . Note that samples are not drawn locally identically and independently distributed ( iid ) from a fixed probability distribution , since we don ’ t know the task boundary . In the continuum , we only know the label of xi , but have no information about the labels of its neighbors N ( xi ) . Note that items in ( 1 ) are unavailable once they are observed and dropped off . This is in contrast to the settings in [ 2 ] , where all historical data are available during training . As shown in the experiments , lifelong graph learning in practice often requires that the number of GNN layers L is larger than the availability of K-hop neighbors , i.e. , L > K , which also leads many existing graph models inapplicable . | This paper aims to bridge GNNs with life-long learning so that the catastrophic forgetting problem in graph-structured tasks is alleviated. Specifically, the major contribution seems to be transforming the original graph into a feature graph so that the node classification problem is transferred into a graph classification problem with isolated samples. Meanwhile, feature interactions are modeled in constructing edges of the feature graph. Experiments on three citation graphs demonstrate the effectiveness of the proposed method. | SP:c86b5fd03baefacd2e70d21e5b41faf8b97bb29b |
Bridging Graph Network to Lifelong Learning with Feature Interaction | 1 Introduction . Graph neural networks ( GNN ) have received increasing attention and proved to be useful for many tasks with graph-structured data , such as citation , social , and protein networks [ 1 ] . However , graph data is usually formed in a streaming fashion and real-world data are continuously evolving over time , thus learning a streaming graph is expected in many cases [ 2 ] . For example , in a social network , the number of users often grows over time and we expect that the model can learn continuously with new users . In this paper , we extend graph neural networks to lifelong learning , which is also known as continual or incremental learning [ 3 ] . However , lifelong learning easily suffers from “ catastrophic forgetting ” if the models are simply updated for new samples via back-propagation [ 4 ] . Although some strategies have been developed to alleviate the forgetting problem for convolutional neural networks ( CNN ) , lifelong learning is still difficult for graph networks . This is because existing graph models such as graph convolutional networks ( GCN ) [ 5 ] require the entire graph for training . This is infeasible for lifelong learning , since the graph size can increase over time and we have to drop off old data or samples to learn new knowledge . To reduce the memory consumption , some graph sampling strategies were proposed , but they are also difficult to directly apply to lifelong learning [ 6–8 ] , since they require a pre-processing of the entire graph [ 8 ] . Preprint . Under review . Recall that regular CNNs are trained in a mini-batch manner where the model can take samples as independent inputs [ 9 ] . Our question is : can we convert a graph task into a traditional CNN-like classification problem , so that ( i ) nodes can be predicted independently and ( ii ) the lifelong learning techniques developed for CNN can be easily adopted for GNN ? However , this is not straightforward as node connections can not be modeled by a regular CNN-like classification model . To solve this problem , we propose to construct a new graph topology , the feature graph in Fig . 1 , to bridge GNN to lifelong learning . It takes the features as nodes and turns the nodes into graphs . This converts the problem of node classification to graph classification and the increasing nodes become independent training samples , thus the feature graphs can be trained in a regular mini-batch manner . The contribution of this paper includes : ( 1 ) We introduce a new graph topology , i.e. , feature graph , to convert a problem of growing graph to increasing training samples , which makes lifelong learning techniques applicable to graph neural networks ; ( 2 ) We take the cross-correlation of neighbor features as the feature adjacency matrix , which is able to explicitly model feature “ interaction ” , that is crucial for many graph-structured tasks ; ( 3 ) Feature graph is of constant computational complexity with the increased learning tasks . We demonstrate its efficiency and effectiveness by applying it to classical graph datasets ; ( 4 ) We further demonstrate its superiority by applying it to a practical application , i.e. , distributed human action recognition based on subgraph classification using wearable devices . 2 Related Work . 2.1 Lifelong Learning . Non-rehearsal Methods Lifelong learning methods in this category do not preserve any old data . To alleviate the forgetting problem , progressive neural networks [ 10 ] leveraged prior knowledge via lateral connections to previously learned features . Learning without forgetting ( LwF ) [ 11 ] introduced a knowledge distillation loss [ 12 ] to neural networks , which encouraged the network output for new classes to be close to the original outputs . Distillation loss was also applied to learning object detectors incrementally [ 13 ] . Learning without memorizing ( LwM ) [ 14 ] extended LwF by adding an attention distillation term based on attention maps and demonstrated that it is helpful for retaining information of the old classes . EWC [ 15 ] remembered old tasks by slowing down learning on important weights . RWalk [ 16 ] generalized EWC and improved weight consolidation by adding a KL-divergence-based regularization . Memory aware synapses ( MAS ) [ 17 ] computed an importance value for each parameter in an unsupervised manner based on the sensitivity of output function to parameter changes . [ 18 ] presented an embedding framework for dynamic attributed network based on parameter regularization . A sparse writing protocol is introduced to a memory module [ 19 ] , ensuring that only a few memory spaces is affected during training . Rehearsal Methods Rehearsal lifelong learning methods can be roughly divided into rehearsal with synthetic data or rehearsal with exemplars from old data [ 20 ] . To ensure that the loss of exemplars does not increase , gradient episodic memory ( GEM ) [ 3 ] introduced orientation constraints during gradient updates . Inspired by GEM , [ 21 ] selected exemplars with a maximal cosine similarity of the gradient orientation . iCaRL [ 22 ] preserved a subset of images with a herding algorithm [ 23 ] and included the subset when updating the network for new classes . EEIL [ 24 ] extended iCaRL by learning the classifier in an end-to-end manner . [ 25 ] further extended iCaRL and discovered that updating the model with class-balanced exemplars further improved the performance . Similarly , [ 26 , 27 ] further added constraints to the loss function to mitigate the effect of imbalance . To reduce the memory consumption of exemplars , [ 28 ] applied the distillation loss to feature space without having to access to the corresponding images . Rehearsal approaches with synthetic data based on generative adversary networks ( GAN ) were used to reduce the dependence on old data [ 29–32 ] . 2.2 Graph Neural Networks . Graph neural networks have been widely used to solve problems about graph-structured data [ 33 ] . The spectral network was the first to extend convolution to the graph domain [ 34 ] . Later the graph convolutional network ( GCN ) [ 5 ] followed this idea and alleviated the problem of overfitting on local neighborhoods via first order Chebyshev expansion . This obtained a good generalization ability and inspired more recent work . To identify the importance of neighborhood features , graph attention network ( GAT ) [ 35 ] added an attention mechanism into GCN , which further improved the performance on citation networks and the protein-protein interaction dataset . GCN and its variants require the entire graph during training , thus they can not scale to large graphs . To solve this problem and train GNN with mini-batches , a sampling method , SAGE [ 6 ] is introduced to learn a function to generate node embedding by sampling and aggregating neighborhood features . JKNet [ 36 ] followed the same sampling strategy and demonstrated a significant accuracy improvement on GCN with jumping connections . DiffPool [ 37 ] learned a differentiable soft cluster assignment to map nodes to a set of clusters , which then formed a coarsened input for the next layer . [ 38 ] designed a training strategy that relied on harder-and-harder training examples to improve the robustness and convergence speed of the model . S-GCN [ 39 ] developed control variate-based algorithms to sample small neighbor sizes and used historical activation in the previous layer to avoid re-evaluation . FastGCN [ 7 ] applied importance sampling to reduce variance and performed node sampling for each layer independently , which resulted in a constant sample size in all layers . [ 40 ] sampled the lower layer conditioned on the top one ensuring higher accuracy and fixed-size sampling . Subgraph sampling techniques were also developed to reduce memory consumption . ClusterGCN [ 41 ] sampled a block of nodes in a dense subgraph identified by a clustering algorithm and restricted the neighborhood search within the subgraph . GraphSiant [ 8 ] constructed mini-batches by sampling the training graph . Nevertheless , most of the sampling techniques still require a pre-processing of the entire graph to determine the sampling process or require a complete graph structure , which makes those algorithms not directly applicable to lifelong learning . In this paper , we hypothesize that a different graph structure is required for lifelong learning , and the new structure is not necessary to maintain its original meaning . We noticed that there is some recent work focusing on continuously learning a graph problem , but they have different formulation . For example , several exemplar selection methods are tested in ER-GNN [ 42 ] . A weight preserving method is introduced to growing graph [ 43 ] . A combined strategy of regularization and data rehearsal is introduced to streaming graphs in [ 2 ] . To overcome the incomplete structure , learning a temporal graph in sliding window is introduced in [ 44 ] . 3 Problem Formulation . We start from defining regular graph learning before lifelong graph learning for coherence . An attribute graph is defined as G = ( V , E ) , where V is the set of nodes and E ⊆ { { va , vb } | ( va , vb ) ∈ V2 } is the set of edges . Each node v ∈ V is associated with a target zv ∈ Z and a multi-channel feature vector xv ∈ X ⊂ RF×C . Each edge e ∈ E is associated with a vector we ∈ W ⊂ RW . In regular graph learning , we aim to learn a predictor f to associate a node xv , v ∈ V ′ with a target zv , given graph G , node features X , edge vectorsW , and part of the targets zv , v ∈ V \ V ′ . In lifelong graph learning , we have the same objective with the regular graph learning , but we are only able to obtain the graph-structured data as a data continuum GL = { ( xi , ti , zi , Nk=1 : K ( xi ) , Wk=1 : K ( xi ) ) i=1 : N } , where each item is formed by a node feature xi ∈ X , a task descriptor ti ∈ T , a target vector zi ∈ Zti , a k-hop neighbor set Nk=1 : K ( xi ) , and an edge vector set Wk=1 : K ( xi ) associated with the k-hop neighbors . For simplicity , we will use the symbol N ( xi ) to denote the available neighbor set and their associated edges . We assume that every item ( xi , N ( xi ) , ti , zi ) satisfies ( xi , N ( xi ) , zi ) ∼ Pti ( X , N ( X ) , Z ) , where Pti is a probability distribution of a single learning task . In lifelong graph learning , we will observe , item by item , the continuum of the graph-structured data as ( x1 , N ( x1 ) , t1 , z1 ) , . . . , ( xN , N ( xN ) , tN , zN ) ( 1 ) While observing ( 1 ) , our goal is to learn a predictor fL to associate a test sample ( x , N ( x ) , t ) with a target z such that ( x , N ( x ) , z ) ∼ Pt . Such test sample can belong to a task that we have observed in the past , the current task , or a task that we will observe ( or not ) in the future . The task descriptors ti is defined for compatibility with lifelong learning that requires it [ 3 ] , but it is not used in this paper . Note that samples are not drawn locally identically and independently distributed ( iid ) from a fixed probability distribution , since we don ’ t know the task boundary . In the continuum , we only know the label of xi , but have no information about the labels of its neighbors N ( xi ) . Note that items in ( 1 ) are unavailable once they are observed and dropped off . This is in contrast to the settings in [ 2 ] , where all historical data are available during training . As shown in the experiments , lifelong graph learning in practice often requires that the number of GNN layers L is larger than the availability of K-hop neighbors , i.e. , L > K , which also leads many existing graph models inapplicable . | This paper aims to solve the problem of lifelong graph learning. Thus far, the topic about graph learning and lifelong learning is still underexplored. This paper proposes a new graph topology based on feature interaction, which takes the features as nodes and turns the nodes into graphs, and thus formulates a regular lifelong learning problem by defining the feature graph continuum. The authors conduct experiments on three popular citation graph datasets including Cora, Citeseer, and Pubmed. | SP:c86b5fd03baefacd2e70d21e5b41faf8b97bb29b |
Simple Spectral Graph Convolution | 1 INTRODUCTION . In the past decade , deep learning has become mainstream in computer vision and machine learning . Although deep learning has been applied for extraction of features on the Euclidean lattice ( Euclidean grid-structured data ) with great success , the data in many practical scenarios lies on non-Euclidean structures , whose processing poses a challenge for deep learning . By defining a convolution operator between the graph and signal , Graph Convolutional Networks ( GCNs ) generalize Convolutional Neural Networks ( CNNs ) to graph-structured inputs which contain attributes . Message Passing Neural Networks ( MPNNs ) ( Gilmer et al. , 2017 ) unify the graph convolution as two functions : the transformation function and the aggregation function . MPNN iteratively propagates node features based on the adjacency of the graph in a number of rounds . Despite their enormous success in many applications like social media , traffic analysis , biology , recommendation systems and even computer vision , many of the current GCN models use fairly shallow setting as many of the recent models such as GCN ( Kipf & Welling , 2016 ) achieve their best performance given 2 layers . In other words , 2-layer GCN models aggregate nodes in two-hops neighborhood and thus have no ability to extract information in K-hops neighborhoods for K > 2 . Moreover , stacking more layers and adding a non-linearity tend to degrade the performance of these models . Such a phenomenon is called oversmoothing ( Li et al. , 2018a ) , characterized by the effect that as the number of layers increases , the representations of the nodes in GCNs tend to converge to a similar , non-distinctive from one another value . Even adding residual connections , an effective trick for training very deep CNNs , merely slows down the oversmoothing issue ( Kipf & Welling , 2016 ) in GCNs . It appears that deep GCN models gain nothing but the performance degradation from the deep architecture . One solution for that is to widen the receptive field of aggregation function while limiting the depth of network because the required neighborhood size and neural network depth can be regarded as ∗The corresponding author . The code is available at https : //github.com/allenhaozhu/SSGC . two separate aspects of design . To this end , SGC ( Wu et al. , 2019 ) captures the context from Khops neighbours in the graph by applying the K-th power of the normalized adjacency matrix in a single layer of neural network . This scheme is also used for attributed graph clustering ( Zhang et al. , 2019 ) . However , SGC also suffers from oversmoothing as K→∞ , as shown in Theorem 1 . PPNP and APPNP ( Klicpera et al. , 2019a ) replace the power of the normalized adjacency matrix with the Personalized PageRank matrix to solve the oversmoothing problem . Although APPNP relieves the oversmoothing problem , it employs a non-linear operation which requires costly computation of the derivative of the filter due to the non-linearity over the multiplication of feature matrix with learnable weights . In contrast , we show that our approach enjoys a free derivative computed in the feed-forward step due to the use of a linear model . Furthermore , APPNP aggregates over multiple k-hop neighborhoods ( k=0 , · · · , K ) but the weighting scheme favors either global or local context making it difficult if not impossible to find a good value of balancing parameter . In contrast , our approach aggregates over k-hop neighborhoods in a well-balanced manner . GDC ( Klicpera et al. , 2019b ) further extends APPNP by generalizing Personalized PageRank ( Page et al. , 1999 ) to an arbitrary graph diffusion process . GDC has more expressive power than SGC ( Wu et al. , 2019 ) , PPNP and APPNP ( Klicpera et al. , 2019a ) but it leads to a dense transition matrix which makes the computation and space storage intractable for large graphs , although authors suggest that the shrinkage method can be used to sparsify the generated transition matrix . Noteworthy are also orthogonal research directions of Sun et al . ( 2019 ) ; Koniusz & Zhang ( 2020 ) ; Elinas et al . ( 2020 ) which improve the performance of GCNs by the perturbation of graph , high-order aggregation of features , and the variational inference , respectively . To tackle the above issues , we propose a Simple Spectral Graph Convolution ( S2GC ) network for node clustering and node classification in semi-supervised and unsupervised settings . By analyzing the Markov Diffusion Kernel ( Fouss et al. , 2012 ) , we obtain a very simple and effective spectral filter : we aggregate k-step diffusion matrices over k = 0 , · · · , K steps , which is equivalent to aggregating over neighborhoods of gradually increasing sizes . Moreover , we show that our design incorporates larger neighborhoods compared to SGC and copes better with oversmoothing . We explain that limiting overdominance of the largest neighborhoods in the aggregation step limits oversmoothing while preserving the large context of each node . We also show via the spectral analysis that S2GC is a trade-off between the low- and high-pass filter bands which leads to capturing the global and local contexts of each node . Moreover , we show how S2GC and APPNP ( Klicpera et al. , 2019a ) are related and explain why S2GC captures a range of neighborhoods better than APPNP . Our experimental results include node clustering , unsupervised and semi-supervised node classification , node property prediction and supervised text classification . We show that S2GC is highly competitive , often significantly outperforming state-of-the-art methods . 2 PRELIMINARIES . Notations . Let G = ( V , E ) be a simple and connected undirected graph with n nodes and m edges . We use { 1 , · · · , n } to denote the node index of G , whereas dj denotes the degree of node j in G. Let A be the adjacency matrix and D be the diagonal degree matrix . Let à = A + In denote the adjacency matrix with added self-loops and the corresponding diagonal degree matrix D̃ , where In ∈ Sn++ is an identity matrix . Finally , let X ∈ Rn×d denote the node feature matrix , where each node v is associated with a d-dimensional feature vector Xv . The normalized graph Laplacian matrix is defined as L = In − D−1/2AD−1/2 ∈ Sn+ , that is , a symmetric positive semidefinite matrix with eigendecomposition UΛU > , where Λ is a diagonal matrix with eigenvalues of L , and U ∈ Rn×n is a unitary matrix that consists of the eigenvectors of L. Spectral Graph Convolution ( Defferrard et al. , 2016 ) . We consider spectral convolutions on graphs defined as the multiplication of signal x ∈ Rn with a filter gθ parameterized by θ ∈ Rn in the Fourier domain : gθ ( L ) ∗ x = Ug∗θ ( Λ ) U > x , ( 1 ) where the parameter θ ∈ Rn is a vector of spectral filter coefficients . One can understand gθ as a function operating on eigenvalues of L , that is , g∗θ ( Λ ) . To avoid eigendecomposition , gθ ( Λ ) can be approximated by a truncated expansion in terms of Chebyshev polynomials Tk ( Λ ) up to the K-th order ( Defferrard et al. , 2016 ) : g∗θ ( Λ ) ≈ K−1∑ k=0 θkTk ( Λ̃ ) , ( 2 ) with a rescaled Λ̃ = 12λmax Λ− In , where λmax denotes the largest eigenvalue of L and θ ∈ R K is now a vector of Chebyshev coefficients . Vanila Graph Convolutional Network ( GCN ) ( Kipf & Welling , 2016 ) . The vanilla GCN is a first-order approximation of spectral graph convolutions . If one sets K = 1 , θ0 = 2 , and θ1 = −1 for Eq . 2 , they obtain the convolution operation gθ ( L ) ∗ x = ( I + D−1/2AD−1/2 ) x . Finally , by the renormalization trick , replacing matrix I + D−1/2AD−1/2 by a normalized version T̃ = D̃−1/2ÃD̃−1/2 = ( D + In ) −1/2 ( A + In ) ( D + In ) −1/2 leads to the GCN layer with a non-linear function σ : H ( l+1 ) = σ ( T̃H ( l ) W ( l ) ) . ( 3 ) Graph Diffusion Convolution ( GDC ) ( Klicpera et al. , 2019b ) . A generalized graph diffusion is given by the diffusion matrix : S = ∞∑ k=0 θkT k , ( 4 ) with the weighting coefficients θk and the generalized transition matrix T. Eq . 4 can be regarded as related to the Taylor expansion of matrix-valued functions . Thus , the choice of θk and Tk must at least ensure that Eq . 4 converges . Klicpera et al . ( 2019b ) provide two special cases as low-pass filters ie. , the heat kernel and the kernel based on random walk with restarts . If S denotes the adjacency matrix and D is the diagonal degree matrix of S , the corresponding graph diffusion convolution is then defined as D−1/2SD−1/2x . Note that θk can be a learnable parameter , or it can be chosen in some other way . Many works use the expansion in Eq . 4 but different choices of θk realise very different filters , making each method unique . Simple Graph Convolution ( SGC ) ( Wu et al. , 2019 ) . A classical MPNN ( Gilmer et al. , 2017 ) averages ( in each layer ) the hidden representations among 1-hop neighbors . This implies that each node in the K-th layer obtains feature information from all nodes that are K-hops away in the graph . By hypothesizing that the non-linearity between GCN layers is not critical , SGC captures information from K-hops neighborhood in the graph by applying the K-th power of the transition matrix in a single neural network layer . The SGC can be regarded as a special case of GDC without non-linearity and without the normalization by D−1/2 if we set θK = 1 and θi < K = 0 in Eq . 4 , and T = T̃ , which yields : Ŷ = softmax ( T̃KXW ) . ( 5 ) Although SGC is an efficient and effective method , increasing K leads to oversmoothing . Thus , SGC uses a small K number of layers . Theorem 1 shows that oversmoothing is a result of convergence to the stationary distribution in the graph diffusion process when time t→∞ . Theorem 1 . ( Chung & Graham , 1997 ) Let λ2 denote the second largest eigenvalue of transition matrix T̃ = D−1A of a non-bipartite graph , p ( t ) be the probability distribution vector and π the stationary distribution . If walk starts from the vertex i , pi ( 0 ) = 1 , then after t steps for every vertex , we have : |pj ( t ) − πj | ≤ √ dj di λt2 . ( 6 ) APPNP . Klicpera et al . ( 2019a ) proposed to use the Personalized PageRank to derive a fixed filter of order K. Let fθ ( X ) denote the output of a two-layer fully connected neural network on the feature matrix X , then the PPNP model is defined as H = αIn − ( 1 − α ) T̃−1fθ ( X ) . To avoid calculating the inverse of matrix T̃ , Klicpera et al . ( 2019a ) also propose the Approximate PPNP ( APPNP ) , which replaces the costly inverse with an approximation by the truncated power iteration : H ( l+1 ) = ( 1− α ) T̃H ( l ) + αH ( 0 ) , ( 7 ) where H ( 0 ) = fθ ( X ) = ReLU ( XW ) or H ( 0 ) = fθ ( X ) = MLP ( X ) . By decoupling feature transformation and propagation steps , PPNP and APPNP aggregate information from multi-hop neighbors . | The paper proposes a spectral-based graph convolution layer, called Simple Spectral Graph Convolution (S$^2$GC), which is based on the Markov Diffusion Kernel (MDK). The authors show that S$^2$GC is capable of aggregating k-hop neighbourhood information without oversmoothing. The paper provides a spectral analysis on S$^2$GC and shows the connections to several previous methods, such as GDC, SGC and APPNP. The authors also show that their proposed S$^2$GC advantages from both spatial and spectral methods. They demonstrate that their S$^2$GC on a series of experiments, such as node clustering and node classification. | SP:79f20a38e4adada1f0757f8a01cd3d1b840b7b2e |
Simple Spectral Graph Convolution | 1 INTRODUCTION . In the past decade , deep learning has become mainstream in computer vision and machine learning . Although deep learning has been applied for extraction of features on the Euclidean lattice ( Euclidean grid-structured data ) with great success , the data in many practical scenarios lies on non-Euclidean structures , whose processing poses a challenge for deep learning . By defining a convolution operator between the graph and signal , Graph Convolutional Networks ( GCNs ) generalize Convolutional Neural Networks ( CNNs ) to graph-structured inputs which contain attributes . Message Passing Neural Networks ( MPNNs ) ( Gilmer et al. , 2017 ) unify the graph convolution as two functions : the transformation function and the aggregation function . MPNN iteratively propagates node features based on the adjacency of the graph in a number of rounds . Despite their enormous success in many applications like social media , traffic analysis , biology , recommendation systems and even computer vision , many of the current GCN models use fairly shallow setting as many of the recent models such as GCN ( Kipf & Welling , 2016 ) achieve their best performance given 2 layers . In other words , 2-layer GCN models aggregate nodes in two-hops neighborhood and thus have no ability to extract information in K-hops neighborhoods for K > 2 . Moreover , stacking more layers and adding a non-linearity tend to degrade the performance of these models . Such a phenomenon is called oversmoothing ( Li et al. , 2018a ) , characterized by the effect that as the number of layers increases , the representations of the nodes in GCNs tend to converge to a similar , non-distinctive from one another value . Even adding residual connections , an effective trick for training very deep CNNs , merely slows down the oversmoothing issue ( Kipf & Welling , 2016 ) in GCNs . It appears that deep GCN models gain nothing but the performance degradation from the deep architecture . One solution for that is to widen the receptive field of aggregation function while limiting the depth of network because the required neighborhood size and neural network depth can be regarded as ∗The corresponding author . The code is available at https : //github.com/allenhaozhu/SSGC . two separate aspects of design . To this end , SGC ( Wu et al. , 2019 ) captures the context from Khops neighbours in the graph by applying the K-th power of the normalized adjacency matrix in a single layer of neural network . This scheme is also used for attributed graph clustering ( Zhang et al. , 2019 ) . However , SGC also suffers from oversmoothing as K→∞ , as shown in Theorem 1 . PPNP and APPNP ( Klicpera et al. , 2019a ) replace the power of the normalized adjacency matrix with the Personalized PageRank matrix to solve the oversmoothing problem . Although APPNP relieves the oversmoothing problem , it employs a non-linear operation which requires costly computation of the derivative of the filter due to the non-linearity over the multiplication of feature matrix with learnable weights . In contrast , we show that our approach enjoys a free derivative computed in the feed-forward step due to the use of a linear model . Furthermore , APPNP aggregates over multiple k-hop neighborhoods ( k=0 , · · · , K ) but the weighting scheme favors either global or local context making it difficult if not impossible to find a good value of balancing parameter . In contrast , our approach aggregates over k-hop neighborhoods in a well-balanced manner . GDC ( Klicpera et al. , 2019b ) further extends APPNP by generalizing Personalized PageRank ( Page et al. , 1999 ) to an arbitrary graph diffusion process . GDC has more expressive power than SGC ( Wu et al. , 2019 ) , PPNP and APPNP ( Klicpera et al. , 2019a ) but it leads to a dense transition matrix which makes the computation and space storage intractable for large graphs , although authors suggest that the shrinkage method can be used to sparsify the generated transition matrix . Noteworthy are also orthogonal research directions of Sun et al . ( 2019 ) ; Koniusz & Zhang ( 2020 ) ; Elinas et al . ( 2020 ) which improve the performance of GCNs by the perturbation of graph , high-order aggregation of features , and the variational inference , respectively . To tackle the above issues , we propose a Simple Spectral Graph Convolution ( S2GC ) network for node clustering and node classification in semi-supervised and unsupervised settings . By analyzing the Markov Diffusion Kernel ( Fouss et al. , 2012 ) , we obtain a very simple and effective spectral filter : we aggregate k-step diffusion matrices over k = 0 , · · · , K steps , which is equivalent to aggregating over neighborhoods of gradually increasing sizes . Moreover , we show that our design incorporates larger neighborhoods compared to SGC and copes better with oversmoothing . We explain that limiting overdominance of the largest neighborhoods in the aggregation step limits oversmoothing while preserving the large context of each node . We also show via the spectral analysis that S2GC is a trade-off between the low- and high-pass filter bands which leads to capturing the global and local contexts of each node . Moreover , we show how S2GC and APPNP ( Klicpera et al. , 2019a ) are related and explain why S2GC captures a range of neighborhoods better than APPNP . Our experimental results include node clustering , unsupervised and semi-supervised node classification , node property prediction and supervised text classification . We show that S2GC is highly competitive , often significantly outperforming state-of-the-art methods . 2 PRELIMINARIES . Notations . Let G = ( V , E ) be a simple and connected undirected graph with n nodes and m edges . We use { 1 , · · · , n } to denote the node index of G , whereas dj denotes the degree of node j in G. Let A be the adjacency matrix and D be the diagonal degree matrix . Let à = A + In denote the adjacency matrix with added self-loops and the corresponding diagonal degree matrix D̃ , where In ∈ Sn++ is an identity matrix . Finally , let X ∈ Rn×d denote the node feature matrix , where each node v is associated with a d-dimensional feature vector Xv . The normalized graph Laplacian matrix is defined as L = In − D−1/2AD−1/2 ∈ Sn+ , that is , a symmetric positive semidefinite matrix with eigendecomposition UΛU > , where Λ is a diagonal matrix with eigenvalues of L , and U ∈ Rn×n is a unitary matrix that consists of the eigenvectors of L. Spectral Graph Convolution ( Defferrard et al. , 2016 ) . We consider spectral convolutions on graphs defined as the multiplication of signal x ∈ Rn with a filter gθ parameterized by θ ∈ Rn in the Fourier domain : gθ ( L ) ∗ x = Ug∗θ ( Λ ) U > x , ( 1 ) where the parameter θ ∈ Rn is a vector of spectral filter coefficients . One can understand gθ as a function operating on eigenvalues of L , that is , g∗θ ( Λ ) . To avoid eigendecomposition , gθ ( Λ ) can be approximated by a truncated expansion in terms of Chebyshev polynomials Tk ( Λ ) up to the K-th order ( Defferrard et al. , 2016 ) : g∗θ ( Λ ) ≈ K−1∑ k=0 θkTk ( Λ̃ ) , ( 2 ) with a rescaled Λ̃ = 12λmax Λ− In , where λmax denotes the largest eigenvalue of L and θ ∈ R K is now a vector of Chebyshev coefficients . Vanila Graph Convolutional Network ( GCN ) ( Kipf & Welling , 2016 ) . The vanilla GCN is a first-order approximation of spectral graph convolutions . If one sets K = 1 , θ0 = 2 , and θ1 = −1 for Eq . 2 , they obtain the convolution operation gθ ( L ) ∗ x = ( I + D−1/2AD−1/2 ) x . Finally , by the renormalization trick , replacing matrix I + D−1/2AD−1/2 by a normalized version T̃ = D̃−1/2ÃD̃−1/2 = ( D + In ) −1/2 ( A + In ) ( D + In ) −1/2 leads to the GCN layer with a non-linear function σ : H ( l+1 ) = σ ( T̃H ( l ) W ( l ) ) . ( 3 ) Graph Diffusion Convolution ( GDC ) ( Klicpera et al. , 2019b ) . A generalized graph diffusion is given by the diffusion matrix : S = ∞∑ k=0 θkT k , ( 4 ) with the weighting coefficients θk and the generalized transition matrix T. Eq . 4 can be regarded as related to the Taylor expansion of matrix-valued functions . Thus , the choice of θk and Tk must at least ensure that Eq . 4 converges . Klicpera et al . ( 2019b ) provide two special cases as low-pass filters ie. , the heat kernel and the kernel based on random walk with restarts . If S denotes the adjacency matrix and D is the diagonal degree matrix of S , the corresponding graph diffusion convolution is then defined as D−1/2SD−1/2x . Note that θk can be a learnable parameter , or it can be chosen in some other way . Many works use the expansion in Eq . 4 but different choices of θk realise very different filters , making each method unique . Simple Graph Convolution ( SGC ) ( Wu et al. , 2019 ) . A classical MPNN ( Gilmer et al. , 2017 ) averages ( in each layer ) the hidden representations among 1-hop neighbors . This implies that each node in the K-th layer obtains feature information from all nodes that are K-hops away in the graph . By hypothesizing that the non-linearity between GCN layers is not critical , SGC captures information from K-hops neighborhood in the graph by applying the K-th power of the transition matrix in a single neural network layer . The SGC can be regarded as a special case of GDC without non-linearity and without the normalization by D−1/2 if we set θK = 1 and θi < K = 0 in Eq . 4 , and T = T̃ , which yields : Ŷ = softmax ( T̃KXW ) . ( 5 ) Although SGC is an efficient and effective method , increasing K leads to oversmoothing . Thus , SGC uses a small K number of layers . Theorem 1 shows that oversmoothing is a result of convergence to the stationary distribution in the graph diffusion process when time t→∞ . Theorem 1 . ( Chung & Graham , 1997 ) Let λ2 denote the second largest eigenvalue of transition matrix T̃ = D−1A of a non-bipartite graph , p ( t ) be the probability distribution vector and π the stationary distribution . If walk starts from the vertex i , pi ( 0 ) = 1 , then after t steps for every vertex , we have : |pj ( t ) − πj | ≤ √ dj di λt2 . ( 6 ) APPNP . Klicpera et al . ( 2019a ) proposed to use the Personalized PageRank to derive a fixed filter of order K. Let fθ ( X ) denote the output of a two-layer fully connected neural network on the feature matrix X , then the PPNP model is defined as H = αIn − ( 1 − α ) T̃−1fθ ( X ) . To avoid calculating the inverse of matrix T̃ , Klicpera et al . ( 2019a ) also propose the Approximate PPNP ( APPNP ) , which replaces the costly inverse with an approximation by the truncated power iteration : H ( l+1 ) = ( 1− α ) T̃H ( l ) + αH ( 0 ) , ( 7 ) where H ( 0 ) = fθ ( X ) = ReLU ( XW ) or H ( 0 ) = fθ ( X ) = MLP ( X ) . By decoupling feature transformation and propagation steps , PPNP and APPNP aggregate information from multi-hop neighbors . | One of the most important component of GCN is coming with suitable graph filters and crucial towards designing better GCNs. In this regard, authors proposed Simple Spectral Graph Convolution with Markov diffusion kernel as a graph filter which combines strengths of both spatial and spectral methods. The paper is written-well and easy to follow. Simplicity and empirically strong results are the main contributions of the paper. However, experiments on graph classification, comparison with other graph filters and theoretical justification can help make the stronger case. | SP:79f20a38e4adada1f0757f8a01cd3d1b840b7b2e |
Robust Curriculum Learning: from clean label detection to noisy label self-correction | 1 INTRODUCTION . The expressive power and high capacity of deep neural networks ( DNNs ) result in accurate modeling and promising generalization if provided with sufficient data and clean ( correct ) labels . However , recent studies show that the training process is fragile and can easily overfit on noisy labels ( Zhang et al. , 2017 ) , which commonly appear in real-world data since precise annotation is not always available or affordable . Hence , it is important to study the training dynamics affected by imperfect labels and develop robust learning strategies that ideally eliminate the negative impact of noisy labels while fully exploiting the information from all the available data . Numerous approaches have been developed to address this challenge from various perspectives , e.g. , loss correction ( Xiao et al. , 2015 ; Vahdat , 2017 ; Lee et al. , 2018 ; Veit et al. , 2017 ; Li et al. , 2017b ) , robust loss functions ( Ghosh et al. , 2017 ; Zhang & Sabuncu , 2018 ; Wang et al. , 2019 ; Ma et al. , 2020 ) with provable noise tolerance , sample re-weighting ( Patrini et al. , 2017 ) , curriculum learning ( Kumar et al. , 2010 ; Jiang et al. , 2018 ; Guo et al. , 2018 ) , model co-teaching ( Han et al. , 2018 ) , etc . A principal methodology behind a variety of methods is to detect clean labels while discard/downweigh the data with wrong labels , so the model mainly learns from correct labels . A broadly applied criterion is to select the samples with small losses and treat them as clean data . It is inspired by empirical observations that DNNs learn simple patterns first before overfitting on the noisy labels ( Zhang et al. , 2017 ; Arpit et al. , 2017 ) . Several curriculum learning methods utilize this criterion ( Kumar et al. , 2010 ; Jiang et al. , 2014 ) , and in each step , select/upweigh samples with small losses . Robust loss functions also suppress the large losses associated with the possibly wrong labels . More recent approaches use mixture models ( Arazo et al. , 2019 ) to estimate the distribution of losses for clean and noisy data . However , the instantaneous loss ( i.e. , the loss evaluated at the current step ) of an individual sample is an unstable signal that can rapidly fluctuate due to DNN training ’ s randomness . The error generated by such an unstable metric accumulates when the selected samples are used to train the model producing the losses . Co-teaching methods alleviate this problem by training two DNNs and using the loss computed on one model to guild the other . Also , as the model changes during training , each sample ’ s loss needs to be re-evaluated even when it is not selected , which requires extra inference cost . MentorNet ( Jiang et al. , 2018 ) and Data Parameters ( Saxena et al. , 2019 ) train an extra model to produce the sample weights or selection results without computing the loss . Furthermore , it may not be efficient to repeatedly train the model only on clean data that consistently have small losses , since the model have already learned , well memorized or overfitted to them . A primary drawback of training only on clean labels detected is that discarding the whole data pairs ( x , y ) with wrong labels y removes potentially useful information about the data distribution p ( x ) ( Arazo et al. , 2019 ) . Hence , there has been growing interest in leveraging noisy data . Loss correction methods aim to correct the predicted class probabilities based on an estimated mislabeling probability between classes . Some other methods seek to relabel them by using the model itself ( e.g. , bootstrapping loss ( Reed et al. , 2014 ) ) or another model/mechanism ( e.g. , directed graphical models , conditional random fields , or CNNs ) trained on an additional set of clean data , which , however , is not always available . Self-training and unsupervised learning techniques ( Rasmus et al. , 2015 ; Berthelot et al. , 2019 ) have also been employed to generate pseudo labels to replace noisy labels ( Arazo et al. , 2019 ) . The pseudo labels are optimized together with the model or generated by the model with data augmentations to encourage the output consistency on the same sample ’ s augmentations . Unfortunately , the pseudo labels ’ quality may vary across different samples and significantly degenerate when the noise ratio is high , or the model fails to produce stable and correct predictions . In such a case , the relabeling error on some samples can be accumulated during training . In this paper , we address the aforementioned problems of noise-label learning by developing a curriculum learning strategy called Robust Curriculum Learning ( RoCL ) that smoothly transitions between two phases : ( 1 ) detection and supervised training on clean data ; and ( 2 ) relabeling and self-supervision on noisy data . Specifically , we train the model for multiple episodes , each starting from phase ( 1 ) and gradually moving to phase ( 2 ) . Unlike existing approaches , we only select samples with accurate given/pseudo labels that are most informative to the current model training . Our data selection criterion takes both the dynamics of per-sample loss and output consistency ( across multiple data augmentations ) into account . Using an exponential moving average of the loss and consistency over training history , it overcomes the instability of instantaneous losses and does not incur any additional inference cost . In addition , by adjusting a temperature parameter , the criterion can interpolate between the two phases and keep the training focusing on the data that the model mostly needs to improve on , e.g. , clean data with unsatisfying output consistency or wrongly-labeled data with accurate pseudo labels . Thus , we can fully exploit both clean and noisy data more efficiently with less risk of introducing extra noise or error accumulation . We further show that our data selection can be derived from a novel optimization formulation for robust curriculum learning . We evaluate our method on multiple noisy learning benchmarks and show that our method outperforms a diverse set of recent noisy-label learning approaches . 1.1 RELATED WORK . Early curriculum learning ( CL ) ( Khan et al. , 2011 ; Basu & Christensen , 2013 ; Spitkovsky et al. , 2009 ; Zhou et al. , 2021 ) seeks an optimized sequence of training samples ( i.e. , a curriculum , which can be designed by human experts ) to improve model performance . Self-paced learning ( SPL ) ( Kumar et al. , 2010 ; Tang et al. , 2012a ; Supancic III & Ramanan , 2013 ; Tang et al. , 2012b ) selects easy samples with smaller losses . It starts with selecting a few samples of small loss and gradually increases the selection size to cover all the training data . Self-paced curriculum learning ( Jiang et al. , 2015 ) combines the human expert in CL and loss-adaptation in SPL . SPL with diversity ( SPLD ) ( Jiang et al. , 2014 ) applies a negative group sparse regularization to SPL to promote the diversity of selected samples . Minimax curriculum learning Zhou & Bilmes ( 2018 ) promotes the diversity of samples during early learning to encourage exploration and focus on hard samples in later stages . In the context of robust learning with noisy labels , label correction methods aim to identify the wrong labels and possibly correct them to get more consistent labels for training . Previous work often apply an extra noise model ( directed graphical model ( Xiao et al. , 2015 ) , conditional random fields ( Vahdat , 2017 ) , neural network ( Lee et al. , 2018 ; Veit et al. , 2017 ) , knowledge graph ( Li et al. , 2017b ) ) to correct the noisy labels , which often require extra clean data and as well as training/inference of the noise model . Another line of research focuses on loss correction , which modifies the loss or prediction probabilities during training to correct the misinformation from the noisy labels . Patrini et al . ( 2017 ) uses two noise transition ( backward and forward ) matrices to correct the prediction probabilities . Label Smoothing Regularization ( Szegedy et al. , 2016 ; Pereyra et al. , 2017 ) alleviates the overfitting to noisy labels by using soft labels instead of one-hot labels . Reed et al . ( 2014 ) augments the loss with a notion of perceptual consistency . Jiang et al . ( 2018 ) trains a mentor network to reweigh samples duri ‘ ng the training of a student network . Guo et al . ( 2018 ) designs a curriculum by ranking the complexity of data using its distribution density in a feature space . Ren et al . ( 2018 ) proposes a meta-learning algorithm that learns to assign weights to samples based on their gradients in training compared to those of validation data , which requires extra clean data . Co-teaching ( Han et al. , 2018 ) feeds in the network with the most confident samples of another network to reduce confirmation bias . Amid et al . ( 2019 ) generalizes the logistic loss and the exponents in the softmax by applying a temperature to each of them and makes the training more robust to noise . Hu et al . ( 2019 ) trains a network on noisy labels in the weakly supervised setting and uses it as a regularization term to improve the training on clean data . Some approaches focus on designing loss functions that have robust behaviors and provable tolerance to label noise . Ghosh et al . ( 2017 ) theoretically proves that the Mean Absolute Error ( MAE ) is a robust loss . The Generalized Cross Entropy ( Zhang & Sabuncu , 2018 ) uses a negative Box-Cox transformation to obtain a loss function that generalizes MAE and Cross Entropy loss . Wang et al . ( 2019 ) proposes a Symmetric Cross Entropy that combines Cross Entropy loss and Reverse Cross Entropy loss . Ma et al . ( 2020 ) proposes a loss normalization method and shows that any loss can be made robust to noisy labels . RoCL shares similar ideas with some CL methods in that RoCL starts with learning easy and clean samples and gradually moves to hard and noisy ones . RoCL is more related to the loss correction approach in noisy-label learning literature as RoCL generates a curriculum dynamically assigning weight ( probability ) to each sample . RoCL differs from existing methods in : ( 1 ) it only selects a subset of informative and reliable labels for training in each epoch ; ( 2 ) it is a smooth transition not only from clean data to noisy data but also from supervised learning to self-supervision ; ( 3 ) it runs multiple episodes of the curriculum to avoid getting in a local minimum dominated by a small set of clean/noisy data or a specific type of loss ; ( 4 ) it does not assume the availability of an extra set of clean data ; ( 5 ) it does not require extra computation or any modification to the model . 2 DYNAMIC PATTERNS OF CLEAN/NOISY LABELS IN TRAINING . 2.1 LOSS DYNAMICS AND CLEAN LABEL DETECTION . A key challenge for most noise-label learning methods is to design a reliable criterion to select/reweigh clean data and distinguish them from the noisy data , so all the clean data can be fully exploited while most noisy labels are filtered out of the training process . Loss computed at an instantaneous step have been widely used for this purpose according to the observation that the loss on clean data is usually smaller than noisy data . One important reason is that the clean labels are mutually consistent with each other in producing gradient updates , and therefore , the model can fit them better and faster . On the other hand , the noisy labels may contain mutually inconsistent information , creating a form of long-lasting “ tug of war ” amongst themselves . For example , it can be hard for the model to find consistent visual patterns from images with noisy labels to make the desired predictions . However , instantaneous loss suffers from high variance across training epochs ( as shown in the first plot of Figure 1 ) and is inaccurate for clean data detection under high noise ratio ( i.e. , the proportion of wrong labels is high ) and the randomness of DNN training , e.g. , random initialization , random data augmentation , etc . Moreover , it needs to evaluate the instantaneous loss for all samples in each step , resulting in extra inference cost on unselected samples . The dynamic patterns of losses ( Zhou et al. , 2020b ) over the course of training give us a new insight for better clean data detection even when the noise ratio ( proportion of wrong labels ) is high . In particular , we hypothesize that a sample ’ s label is more likely to be correct if its losses persistently retain low values over training steps . Given a sample ( xi , yi ) with xi being the features and yi being the label , we describe its loss dynamics using a simple exponential moving average ( EMA ) of the instantaneous loss ` ( f ( xi ; θt ) , yi ) ( where f ( xi ; θt ) denotes the model output and θt is the model parameters at step t * along the training history , which is defined and computed recursively as lt+1 ( i ) = { γ × ` ( f ( xi ; θt ) , yi ) + ( 1− γ ) × lt ( i ) if i ∈ St lt ( i ) else , ( 1 ) Where γ ∈ [ 0 , 1 ] is a discounting factor , V is the set of all n training samples , and St ⊆ V is the set of samples selected ( by a certain curriculum ) for training at epoch t. We only update the EMA loss for selected samples using the byproduct lt ( i ) of training without requiring extra inference . In the first and the third plots of Figure 1 , we show how the losses and EMA losses associated with clean/noisy data change throughout the training process . Specifically , we train a ResNet34 ( He et al. , 2016 ) model on CIFAR10 with 60 % of the original labels randomly changed to a wrong class . To avoid quick overfitting to the noise , we train the model for multiple episodes ( each composed of several epochs over all data with a cosine annealing learning rate ) and alternate between the supervised learning episode that minimizes the cross-entropy loss against the given noisy labels and the self-supervision episode that minimizes the consistency loss Eq . ( 2 ) against the pseudo labels . Comparing the shaded areas ( std ) of instantaneous loss and EMA loss and the gap between curves in the two plots , we see that EMA leads to smaller variance within each group and larger gap between the clean and noisy groups , demonstrating the effectiveness of EMA loss for clean data detection . | This paper proposes a curriculum learning method to handle noisily labeled data. The idea is to introduce a consistency measure instead of directly apply a loss function for the typical supervised learning, where the specific consistency is measure for both temporal dimension along neighboring steps and spatial dimension over different data augmentation samples for a given real sample. The consistency measure is applied for self-supervision while the loss function is applied for supervised learning. The final optimization is managed between the two components through weighting parameters, such that the training is made through a migration from a supervised learning to self-supervision by gradually adapting the weighting parameters. Evaluations are reported on Cifar10/100, WebVision, and ILSVRC2012. | SP:c7e7a9e3047b95af8862d79681b3c47ada2642b2 |
Robust Curriculum Learning: from clean label detection to noisy label self-correction | 1 INTRODUCTION . The expressive power and high capacity of deep neural networks ( DNNs ) result in accurate modeling and promising generalization if provided with sufficient data and clean ( correct ) labels . However , recent studies show that the training process is fragile and can easily overfit on noisy labels ( Zhang et al. , 2017 ) , which commonly appear in real-world data since precise annotation is not always available or affordable . Hence , it is important to study the training dynamics affected by imperfect labels and develop robust learning strategies that ideally eliminate the negative impact of noisy labels while fully exploiting the information from all the available data . Numerous approaches have been developed to address this challenge from various perspectives , e.g. , loss correction ( Xiao et al. , 2015 ; Vahdat , 2017 ; Lee et al. , 2018 ; Veit et al. , 2017 ; Li et al. , 2017b ) , robust loss functions ( Ghosh et al. , 2017 ; Zhang & Sabuncu , 2018 ; Wang et al. , 2019 ; Ma et al. , 2020 ) with provable noise tolerance , sample re-weighting ( Patrini et al. , 2017 ) , curriculum learning ( Kumar et al. , 2010 ; Jiang et al. , 2018 ; Guo et al. , 2018 ) , model co-teaching ( Han et al. , 2018 ) , etc . A principal methodology behind a variety of methods is to detect clean labels while discard/downweigh the data with wrong labels , so the model mainly learns from correct labels . A broadly applied criterion is to select the samples with small losses and treat them as clean data . It is inspired by empirical observations that DNNs learn simple patterns first before overfitting on the noisy labels ( Zhang et al. , 2017 ; Arpit et al. , 2017 ) . Several curriculum learning methods utilize this criterion ( Kumar et al. , 2010 ; Jiang et al. , 2014 ) , and in each step , select/upweigh samples with small losses . Robust loss functions also suppress the large losses associated with the possibly wrong labels . More recent approaches use mixture models ( Arazo et al. , 2019 ) to estimate the distribution of losses for clean and noisy data . However , the instantaneous loss ( i.e. , the loss evaluated at the current step ) of an individual sample is an unstable signal that can rapidly fluctuate due to DNN training ’ s randomness . The error generated by such an unstable metric accumulates when the selected samples are used to train the model producing the losses . Co-teaching methods alleviate this problem by training two DNNs and using the loss computed on one model to guild the other . Also , as the model changes during training , each sample ’ s loss needs to be re-evaluated even when it is not selected , which requires extra inference cost . MentorNet ( Jiang et al. , 2018 ) and Data Parameters ( Saxena et al. , 2019 ) train an extra model to produce the sample weights or selection results without computing the loss . Furthermore , it may not be efficient to repeatedly train the model only on clean data that consistently have small losses , since the model have already learned , well memorized or overfitted to them . A primary drawback of training only on clean labels detected is that discarding the whole data pairs ( x , y ) with wrong labels y removes potentially useful information about the data distribution p ( x ) ( Arazo et al. , 2019 ) . Hence , there has been growing interest in leveraging noisy data . Loss correction methods aim to correct the predicted class probabilities based on an estimated mislabeling probability between classes . Some other methods seek to relabel them by using the model itself ( e.g. , bootstrapping loss ( Reed et al. , 2014 ) ) or another model/mechanism ( e.g. , directed graphical models , conditional random fields , or CNNs ) trained on an additional set of clean data , which , however , is not always available . Self-training and unsupervised learning techniques ( Rasmus et al. , 2015 ; Berthelot et al. , 2019 ) have also been employed to generate pseudo labels to replace noisy labels ( Arazo et al. , 2019 ) . The pseudo labels are optimized together with the model or generated by the model with data augmentations to encourage the output consistency on the same sample ’ s augmentations . Unfortunately , the pseudo labels ’ quality may vary across different samples and significantly degenerate when the noise ratio is high , or the model fails to produce stable and correct predictions . In such a case , the relabeling error on some samples can be accumulated during training . In this paper , we address the aforementioned problems of noise-label learning by developing a curriculum learning strategy called Robust Curriculum Learning ( RoCL ) that smoothly transitions between two phases : ( 1 ) detection and supervised training on clean data ; and ( 2 ) relabeling and self-supervision on noisy data . Specifically , we train the model for multiple episodes , each starting from phase ( 1 ) and gradually moving to phase ( 2 ) . Unlike existing approaches , we only select samples with accurate given/pseudo labels that are most informative to the current model training . Our data selection criterion takes both the dynamics of per-sample loss and output consistency ( across multiple data augmentations ) into account . Using an exponential moving average of the loss and consistency over training history , it overcomes the instability of instantaneous losses and does not incur any additional inference cost . In addition , by adjusting a temperature parameter , the criterion can interpolate between the two phases and keep the training focusing on the data that the model mostly needs to improve on , e.g. , clean data with unsatisfying output consistency or wrongly-labeled data with accurate pseudo labels . Thus , we can fully exploit both clean and noisy data more efficiently with less risk of introducing extra noise or error accumulation . We further show that our data selection can be derived from a novel optimization formulation for robust curriculum learning . We evaluate our method on multiple noisy learning benchmarks and show that our method outperforms a diverse set of recent noisy-label learning approaches . 1.1 RELATED WORK . Early curriculum learning ( CL ) ( Khan et al. , 2011 ; Basu & Christensen , 2013 ; Spitkovsky et al. , 2009 ; Zhou et al. , 2021 ) seeks an optimized sequence of training samples ( i.e. , a curriculum , which can be designed by human experts ) to improve model performance . Self-paced learning ( SPL ) ( Kumar et al. , 2010 ; Tang et al. , 2012a ; Supancic III & Ramanan , 2013 ; Tang et al. , 2012b ) selects easy samples with smaller losses . It starts with selecting a few samples of small loss and gradually increases the selection size to cover all the training data . Self-paced curriculum learning ( Jiang et al. , 2015 ) combines the human expert in CL and loss-adaptation in SPL . SPL with diversity ( SPLD ) ( Jiang et al. , 2014 ) applies a negative group sparse regularization to SPL to promote the diversity of selected samples . Minimax curriculum learning Zhou & Bilmes ( 2018 ) promotes the diversity of samples during early learning to encourage exploration and focus on hard samples in later stages . In the context of robust learning with noisy labels , label correction methods aim to identify the wrong labels and possibly correct them to get more consistent labels for training . Previous work often apply an extra noise model ( directed graphical model ( Xiao et al. , 2015 ) , conditional random fields ( Vahdat , 2017 ) , neural network ( Lee et al. , 2018 ; Veit et al. , 2017 ) , knowledge graph ( Li et al. , 2017b ) ) to correct the noisy labels , which often require extra clean data and as well as training/inference of the noise model . Another line of research focuses on loss correction , which modifies the loss or prediction probabilities during training to correct the misinformation from the noisy labels . Patrini et al . ( 2017 ) uses two noise transition ( backward and forward ) matrices to correct the prediction probabilities . Label Smoothing Regularization ( Szegedy et al. , 2016 ; Pereyra et al. , 2017 ) alleviates the overfitting to noisy labels by using soft labels instead of one-hot labels . Reed et al . ( 2014 ) augments the loss with a notion of perceptual consistency . Jiang et al . ( 2018 ) trains a mentor network to reweigh samples duri ‘ ng the training of a student network . Guo et al . ( 2018 ) designs a curriculum by ranking the complexity of data using its distribution density in a feature space . Ren et al . ( 2018 ) proposes a meta-learning algorithm that learns to assign weights to samples based on their gradients in training compared to those of validation data , which requires extra clean data . Co-teaching ( Han et al. , 2018 ) feeds in the network with the most confident samples of another network to reduce confirmation bias . Amid et al . ( 2019 ) generalizes the logistic loss and the exponents in the softmax by applying a temperature to each of them and makes the training more robust to noise . Hu et al . ( 2019 ) trains a network on noisy labels in the weakly supervised setting and uses it as a regularization term to improve the training on clean data . Some approaches focus on designing loss functions that have robust behaviors and provable tolerance to label noise . Ghosh et al . ( 2017 ) theoretically proves that the Mean Absolute Error ( MAE ) is a robust loss . The Generalized Cross Entropy ( Zhang & Sabuncu , 2018 ) uses a negative Box-Cox transformation to obtain a loss function that generalizes MAE and Cross Entropy loss . Wang et al . ( 2019 ) proposes a Symmetric Cross Entropy that combines Cross Entropy loss and Reverse Cross Entropy loss . Ma et al . ( 2020 ) proposes a loss normalization method and shows that any loss can be made robust to noisy labels . RoCL shares similar ideas with some CL methods in that RoCL starts with learning easy and clean samples and gradually moves to hard and noisy ones . RoCL is more related to the loss correction approach in noisy-label learning literature as RoCL generates a curriculum dynamically assigning weight ( probability ) to each sample . RoCL differs from existing methods in : ( 1 ) it only selects a subset of informative and reliable labels for training in each epoch ; ( 2 ) it is a smooth transition not only from clean data to noisy data but also from supervised learning to self-supervision ; ( 3 ) it runs multiple episodes of the curriculum to avoid getting in a local minimum dominated by a small set of clean/noisy data or a specific type of loss ; ( 4 ) it does not assume the availability of an extra set of clean data ; ( 5 ) it does not require extra computation or any modification to the model . 2 DYNAMIC PATTERNS OF CLEAN/NOISY LABELS IN TRAINING . 2.1 LOSS DYNAMICS AND CLEAN LABEL DETECTION . A key challenge for most noise-label learning methods is to design a reliable criterion to select/reweigh clean data and distinguish them from the noisy data , so all the clean data can be fully exploited while most noisy labels are filtered out of the training process . Loss computed at an instantaneous step have been widely used for this purpose according to the observation that the loss on clean data is usually smaller than noisy data . One important reason is that the clean labels are mutually consistent with each other in producing gradient updates , and therefore , the model can fit them better and faster . On the other hand , the noisy labels may contain mutually inconsistent information , creating a form of long-lasting “ tug of war ” amongst themselves . For example , it can be hard for the model to find consistent visual patterns from images with noisy labels to make the desired predictions . However , instantaneous loss suffers from high variance across training epochs ( as shown in the first plot of Figure 1 ) and is inaccurate for clean data detection under high noise ratio ( i.e. , the proportion of wrong labels is high ) and the randomness of DNN training , e.g. , random initialization , random data augmentation , etc . Moreover , it needs to evaluate the instantaneous loss for all samples in each step , resulting in extra inference cost on unselected samples . The dynamic patterns of losses ( Zhou et al. , 2020b ) over the course of training give us a new insight for better clean data detection even when the noise ratio ( proportion of wrong labels ) is high . In particular , we hypothesize that a sample ’ s label is more likely to be correct if its losses persistently retain low values over training steps . Given a sample ( xi , yi ) with xi being the features and yi being the label , we describe its loss dynamics using a simple exponential moving average ( EMA ) of the instantaneous loss ` ( f ( xi ; θt ) , yi ) ( where f ( xi ; θt ) denotes the model output and θt is the model parameters at step t * along the training history , which is defined and computed recursively as lt+1 ( i ) = { γ × ` ( f ( xi ; θt ) , yi ) + ( 1− γ ) × lt ( i ) if i ∈ St lt ( i ) else , ( 1 ) Where γ ∈ [ 0 , 1 ] is a discounting factor , V is the set of all n training samples , and St ⊆ V is the set of samples selected ( by a certain curriculum ) for training at epoch t. We only update the EMA loss for selected samples using the byproduct lt ( i ) of training without requiring extra inference . In the first and the third plots of Figure 1 , we show how the losses and EMA losses associated with clean/noisy data change throughout the training process . Specifically , we train a ResNet34 ( He et al. , 2016 ) model on CIFAR10 with 60 % of the original labels randomly changed to a wrong class . To avoid quick overfitting to the noise , we train the model for multiple episodes ( each composed of several epochs over all data with a cosine annealing learning rate ) and alternate between the supervised learning episode that minimizes the cross-entropy loss against the given noisy labels and the self-supervision episode that minimizes the consistency loss Eq . ( 2 ) against the pseudo labels . Comparing the shaded areas ( std ) of instantaneous loss and EMA loss and the gap between curves in the two plots , we see that EMA leads to smaller variance within each group and larger gap between the clean and noisy groups , demonstrating the effectiveness of EMA loss for clean data detection . | This article is concerned with the problem of training models under noisy data. The authors first adopt the loss and output consistency for data selection. EMA method is used for smoothing to obtain more accurate clean label detection. Meanwhile, through the introduction of temperature hyperparameters, the model gradually completes the transition from supervised learning using clean labels to self-supervised learning using noisy labels. | SP:c7e7a9e3047b95af8862d79681b3c47ada2642b2 |
Byzantine-Robust Learning on Heterogeneous Datasets via Resampling | 1 INTRODUCTION . Distributed or federated machine learning , where the data is distributed across multiple workers , has become an increasingly important learning paradigm both due to growing sizes of datasets , as well as privacy and security concerns . In such a setting , the workers collaborate to train a single model without transmitting their data directly over the networks ( McMahan et al. , 2016 ; Bonawitz et al. , 2019 ; Kairouz et al. , 2019 ) . Due to the presence of either actively malicious agents in the network , or simply due to system and network failures , some workers may disobey the protocols and send arbitrary messages ; such workers are also known as Byzantine workers ( Lamport et al. , 2019 ) . Byzantine robust optimization algorithms combine the gradients received by all workers using robust aggregation rules , to ensure that the training is not impacted by the malicious workers . While this problem has received significant recent attention , ( Alistarh et al. , 2018 ; Blanchard et al. , 2017 ; Yin et al. , 2018a ) , most of the current approaches assume that the data present on each different worker has identical distribution . In this work , we show that existing Byzantine-robust methods catastrophically fail in the realistic setting when the data is distributed heterogeneously across the workers . We then propose a simple resampling scheme which can be readily combined with existing aggregation rules to allow robust training on heterogeneous data . Contribution . Concretely , our contributions in this work are • We show that when the data across workers is heterogeneous , existing robust rules might not converge , even without any Byzantine adversaries . • We propose two new attacks , normalized gradient and mimic , which take advantage of data heterogeneity and circumvent median and sign-based defenses ( Blanchard et al. , 2017 ; Pillutla et al. , 2019 ; Li et al. , 2019 ) . • We propose a simple new resampling step which can be used before any existing robust aggregation rule . We instantiate our scheme with KRUM and theoretically prove that the resampling generalizes it to the setting of heterogeneous data . • Our experiments evaluate the proposed resampling scheme against known and new attacks and show that it drastically improves the performance of 3 existing schemes on realistic heterogeneously distributed datasets . Setup and notations . We study the general distributed optimization problem L ? = minx∈Rd { L ( x ) : = 1n ∑n i=1 Li ( x ) } ( 1 ) where Li : Rd → R are the individual loss functions distributed among n workers , each having its own ( heterogeneous ) data distribution { Di } ni=1 . The case of empirical risk minimization with mi datapoints ξi ∼ Di on worker i is obtained when using Li ( x ) : = 1mi ∑mi j=1 Li ( x , ξ j i ) . The ( stochastic ) gradient computed by a good node i with sample j is given as gi ( x ) : = ∇Li ( x , ξji ) with mean µi and variance σ2i . We also assume that the heterogeneity ( variance across good workers ) is bounded i.e . Ei‖∇Li ( x ) −∇L ( x ) ‖2 ≤ σ̄2 , ∀x . We write gi instead of gi ( xt ) when there is no ambiguity . A distributed training step using an aggregation rule is given as xt+1 : = xt − γtAggr ( { gi ( xt ) : i ∈ [ n ] } ) ( 2 ) If the aggregation rule is the arithmetic mean , then ( 2 ) recovers standard minibatch SGD . Byzantine attack model . In each iteration , there is a set Byz of at most f Byzantine workers . The remaining workers are good , thus follow the described protocol . A Byzantine worker j ∈Byz can deviate from protocol and send an arbitrary vecter to the server . Besides , we also allow that Byzantine workers can collude with each other and know every state of the system . Unlike martingale-based approaches like ( Alistarh et al. , 2018 ) , we allow the set Byz to change over time ( Blanchard et al. , 2017 ; Chen et al. , 2017 ; Mhamdi et al. , 2018 ) . 2 RELATED WORK . There has been significant recent work of the case when the workers have identical data distributions ( Blanchard et al. , 2017 ; Chen et al. , 2017 ; Mhamdi et al. , 2018 ; Alistarh et al. , 2018 ; Mhamdi et al. , 2018 ; Yin et al. , 2018a ; b ; Su & Xu , 2018 ; Damaskinos et al. , 2019 ) . We discuss the most pertinent of these methods next . Blanchard et al . ( 2017 ) formalize the Byzantine robust setup and propose a distance-based approach KRUM which selects a worker whose gradient is very close to at least half the other workers . A different approach involves using the median and its variants ( Blanchard et al. , 2017 ; Pillutla et al. , 2019 ; Yin et al. , 2018a ) . Yin et al . ( 2018a ) propose to use and analyze the coordinate-wise median method ( CM ) . Pillutla et al . ( 2019 ) use a smoothed version of Weiszfeld ’ s algorithm to iteratively compute an approximate geometric median of the input gradients . In a third approach , ( Bernstein et al. , 2018 ) propose to use the signs of the gradients and then aggregate them by majority vote , however , ( Karimireddy et al. , 2019 ) show that it may not always converge . Finally , Alistarh et al . ( 2018 ) use a martingale-based aggregation rule which gives a sample complexity optimal algorithm for iid data . The distance-based approach of KRUM was later extended in Mhamdi et al . ( 2018 ) who propose BULYAN to overcome the dimensional leeway attack . This is the so called strong Byzantine resilience and is orthogonal to the question of non-iid-ness we study here . Recently , ( Peng & Ling , 2020 ; Yang & Bajwa , 2019a ; b ) studied Byzantine-resilient algorithms in the decentralized setting where there is no central server available . Extending our techniques to the decentralized setting is an important direction for future work . In a different line of work , ( Lai et al. , 2016 ; Diakonikolas et al. , 2019 ) develop sophisticated spectral techniques to robust estimate the mean of a high dimensional multi-variate standard Gaussian distribution where samples are evenly distributed in all directions and the attackers are concentrated in one direction . Very recent work ( Data & Diggavi , 2020 ) extend the theoretical analysis to non-convex , strongly-convex and non-i.i.d setup under a gradient dissimilarity assumption and propose a gradient compression scheme on top of it . Our resampling trick can be combined with it to further reduce gradient dissimilarity . Many attacks have been devised for distributed training . For the iid setting , the state-of-the-art attacks are ( Baruch et al. , 2019 ; Xie et al. , 2019b ) . The latter attack is very strong when the fraction of adversaries is large ( nearly half ) , but in this work we focus on settings when this fraction is quite small ( e.g . ≤ 0.2 ) . Further our normalized mean attack Section 3.2 is inspired by ( Xie et al. , 2019b ) . The former work focuses on attacks which are coordinated across time steps . Developing strong practical defenses even in the iid case against such time-coordinated attacks remains an open problem . In this work , we sidestep this issue by restricting ourselves to new attacks made possible by non-iid data and studying how to overcome them . We focus on schemes which work in the iid setting , but fail with non-iid data . Once a new method which can defend against ( Baruch et al. , 2019 ) is developed , our proposed scheme shows how to adapt such a method to the important non-iid case . For the non-iid setting , backdoor attacks are designed to take advantage of heavy-tailed data and manipulate model inference on specific subtask , rather than lower the overall accuracies of training ( Bagdasaryan et al. , 2018 ; Bhagoji et al. , 2018 ) . In contrast , this paper is not intended to address aforementioned challenges but rather to defend the attacks that lower the training accuracies in the non-iid setting . As far as we are aware , only ( Li et al. , 2019 ; Ghosh et al. , 2019 ; Sattler et al. , 2020 ) explicitly investigate Byzantine robustness with non-iid workers . Li et al . ( 2019 ) proposes an SGD variant ( RSA ) which modifies the original objective by adding an ` 1 penalty . Ghosh et al . ( 2019 ) ; Sattler et al . ( 2020 ) assume that all workers belong to an apriori fixed number of clusters and use an outlier-robust clustering method to recover these clusters . If we assume that the server has the entire training dataset and can control the distribution of samples to good workers , Xie et al . ( 2019a ) ; Chen et al . ( 2018 ) ; Rajput et al . ( 2019 ) show that non-iid-ness can be overcome . Typical examples of this is distributed training of neural networks on public cloud , or volunteer computing Meeds et al . ( 2015 ) ; Miura & Harada ( 2015 ) . However , none of these methods are applicable in the standard federated learning setup we consider here . We aim to minimize the original loss function over workers while respecting the non-iid data locality , i.e . the partition of the given heterogeneous dataset over the workers , without data transfer . 3 ATTACKS AGAINST EXISTING AGGREGATION SCHEMES . In this section we show that when the data across the workers is heterogeneous ( non-iid ) , then we can design new attacks which take advantage of the heterogeneity , leading to the failure of existing aggregation schemes . We study three classes of robust aggregation schemes : i ) schemes which select a representative worker in each round ( e.g . KRUM ( Blanchard et al. , 2017 ) ) , ii ) schemes which use normalized means ( e.g . RSA ( Li et al. , 2019 ) ) , and iii ) those which use the median ( e.g . RFA ( Pillutla et al. , 2019 ) ) . We show realistic settings under which each of these classes would fail when faced with heterogeneous data . 3.1 FAILURE OF REPRESENTATIVE WORKER SCHEMES ON NON-IID DATA . Algorithms like KRUM select workers who are representative of a majority of the workers , by relying on statistics such as pairwise differences between the various worker updates . Let ( g1 , . . . , gn ) be the gradients by the workers , f of which are Byzantine ( e.g . n ≥ 2f + 3 for KRUM ) . For i 6= j , let i→ j denote that gj belongs to the n− f − 2 closest vectors to gi . Then KRUM is defined as follows KRUM ( g1 , . . . , gn ) : = arg mini ∑ i→j ‖gi − gj‖2 ( 3 ) However , when the data across the workers is heterogeneous , there is no ‘ representative ’ worker . This is because each worker computes their local gradient over vastly different local data . Hence , for convergence it is important to not only select a good ( non-Byzantine ) worker , but also ensure that each of the good workers is selected with roughly equal frequency . Hence KRUM suffers a significant loss in performance with heterogeneous data , even when there are no Byzantine workers . For example , when KRUM is used for iid datasets without adversary ( f =0 , see left of Figure 1a ) , the test accuracy is close to simple average and the gap can be filled by MULTI-KRUM ( Blanchard et al. , 2017 ) . The right plot of Figure 1a also shows that KRUM ’ s selection of gradients is biased towards certain nodes . When KRUM is applied to non-iid datasets ( the middle of Figure 1a ) , KRUM performs poorly even without any attack . This is because KRUM mostly selects gradients from a few nodes whose distribution is closer to others ( the right of Figure 1a ) . This is an example of how robust aggregation rules may fail on realistic non-iid datasets . | The paper studies Byzantine robustness in the context of distributed learning from heterogeneous datasets. This problem has been widely studied previously, but under the additional assumption that the data of the good workers is i.i.d.. The authors give examples of situations and poisoning attacks with which current defences designed for the i.i.d. situation can be overcome. They also propose a simple resampling scheme that can be used as a preprocessing step before applying any standard robust aggregator from the i.i.d. literature. They provide theoretical guarantees for their resampling scheme when used together with KRUM. The also test their algorithm against the i.i.d. baselines and multiple attacks. | SP:72f25cb455c7d0e0a2ce818d3baab4a916376dd3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.