paper_name stringlengths 11 170 | text stringlengths 8.07k 307k | summary stringlengths 152 6.16k | paper_id stringlengths 43 43 |
|---|---|---|---|
Graph-Based Continual Learning | 1 INTRODUCTION . Recent breakthroughs of deep neural networks often hinge on the ability to repeatedly iterate over stationary batches of training data . When exposed to incrementally available data from non-stationary distributions , such networks often fail to learn new information without forgetting much of its previously acquired knowledge , a phenomenon often known as catastrophic forgetting ( Ratcliff , 1990 ; McCloskey & Cohen , 1989 ; French , 1999 ) . Despite significant advances , the limitation has remained a long-standing challenge for computational systems that aim to continually learn from dynamic data distributions ( Parisi et al. , 2019 ) . Among various proposed solutions , rehearsal approaches that store samples from previous tasks in an episodic memory and regularly replay them are one of the earliest and most successful strategies against catastrophic forgetting ( Lin , 1992 ; Rolnick et al. , 2019 ) . An episodic memory is typically implemented as an array of independent slots ; each slot holds one example coupled with its label . During training , these samples are interleaved with those from the new task , allowing for simultaneous multi-task learning as if the resulting data were independently and identically distributed . While such approaches are effective in simple settings , they require sizable memory and are often impaired by memory constraints , performing rather poorly on complex datasets . A possible explanation is that slot-based memories fail to utilize relational structure between samples ; semantically similar items are treated independently both during training and at test time . In marked contrast , relational memory is a prominent feature of biological systems that has been strongly linked to successful memory retrieval and generalization ( Prince et al. , 2005 ) . Humans , for example , encode event features into cortical representations and bind them together in the medial temporal lobe , resulting in a durable , yet flexible form of memory ( Shimamura , 2011 ) . In this paper , we introduce a novel Graph-based Continual Learning model ( GCL ) that resembles some characteristics of relational memory . More specifically , we explicitly model pairwise similarities between samples , including both those in the episodic memory and those found in the current task . These similarities allow for representation transfer between samples and provide a resilient mean to guard against catastrophic forgetting . Our contributions are twofold : ( 1 ) We propose the use of random graphs to represent relational structures between samples . While similar notions of dependencies have been proposed in the literature ( Louizos et al. , 2019 ; Yao et al. , 2020 ) , the application of random graphs in task-free continual learning is novel , at least to the best of our knowledge . x ( 2 ) We introduce a new regularization objective that leverages such random graphs to alleviate catastrophic forgetting . In contrast to previous work ( Rebuffi et al. , 2017 ; Li & Hoiem , 2017 ) based on knowledge distillation ( Hinton et al. , 2015 ) , the objective penalizes the model for forgetting learned edges between samples rather than their output predictions . Our approach performs competitively on four commonly used datasets , improving accuracy by up to 19.7 % and reducing forgetting by almost 37 % in the best case when bench-marked against competitive baselines in task-free continual learning . 2 PROBLEM FORMULATION . In this work , we follow the learning protocol for image classification from Lopez-Paz & Ranzato ( 2017 ) . More specifically , we consider a training set D = { D1 , · · · , DT } consisting of T tasks where the dataset for the t-th task Dt = { ( xti , yti ) } nt i=1 contains nt input-target pairs ( x t i , y t i ) ∈ X × Y . While the tasks arrive sequentially and exclusively , we assume the input-target pairs ( xti , y t i ) in each task are independent and identically distributed ( i.i.d. ) . The goal is to learn a supervised model fθ : X → Y , parametrized by θ , that outputs a class label y ∈ Y given an unseen image x ∈ X . Following prior work ( Lopez-Paz & Ranzato , 2017 ; Riemer et al. , 2018 ; Chaudhry et al. , 2019 ) , we consider online streams of tasks in which samples from different tasks arrive at different times . As an additional constraint , we insist that the model can only revisit a small amount of data chosen to be stored in a fixed-size episodic memoryM . For clarity , we refer to the data in such an episodic memory as context images and context labels and denote by XC = { xi } i∈C and YC = { yi } i∈C , respectively . These images and labels are to be distinguished from those in the current task , which we refer to as target images and target labels and denote by XT = { xj } j∈T and YT = { yj } j∈T , respectively . While the model is allowed to update the context samples during training , the episodic memory is necessarily frozen at test time . 3 GRAPH-BASED CONTINUAL LEARNING . In this section , we propose a Graph-based Continual Learning ( GCL ) algorithm . While most rehearsal approaches ignore the correlations between images and independently pass them through a network to compute predictions ( Rebuffi et al. , 2017 ; Chaudhry et al. , 2019 ; Aljundi et al. , 2019c ) , we model pairwise similarities between the images with learnable edges in random graphs ( see Figure 1 ) . Intuitively , although it might be easy for the model to forget any particular sample , the multiple connections it forms with similar neighbors are harder to be forgotten altogether . If trained well , the random graphs can therefore equip the model with a plastic and durable means to fight against catastrophic forgetting . Graph Construction . Given a minibatch of target images XT from the current task , our model makes predictions based on the context images XC and context labels YC that span several previously seen tasks , up to and including the current one . In particular , we explicitly build two random graphs of pairwise dependencies : an undirected graph G between the context images XC and a directed , bipartite graph A from the context images XC to the target images XT . Since an undirected graph can be thought of as a directed graph between its vertices and a copy of itself , we treat the context graph G as such and build it analogously to the context-target graph A . Specifically , the high-dimensional context images XC and target images XT are first mapped to the image embeddings UC and UT , respectively , using an image encoder fθ1 : X → Rd1 . Following Louizos et al . ( 2019 ) , we then represent the edges in each graph by independent Bernoulli random variables whose means are specified by a kernel function in the embedding space . More precisely , the distribution of the resulting Erdős-Rényi random graphs ( Erdös & Rényi , 1959 ) can be defined as p ( G |UC ) = ∏ i∈C ∏ k∈C Ber ( Gik |κτ ( ui , uk ) ) , ( 1 ) p ( A |UT , UC ) = ∏ j∈T ∏ k∈C Ber ( Ajk |κτ ( uj , uk ) ) , ( 2 ) for all i , k ∈ C and j ∈ T where κτ : Rd1 × Rd1 → [ 0 , ∞ ) is a kernel function that encodes similarities between image embeddings such as the RBF kernel κτ ( ui , uj ) = exp ( − τ2‖ui − uj‖ 2 2 ) . Here , with a slight abuse of notation , we also use G and A to denote the corresponding adjacency matrices ; Ajk ∈ { 0 , 1 } , for example , represents the presence or absence of a directed edge between the j-th target image and the k-th context image . Predictive Distribution . Given a context graph G and a context-target graph A that encode pairwise similarities to the context images , our next step is to propagate information from the context images XC and context labels YC to make predictions . To that end , we embed XC by another image encoder fθ2 with weights partially tied to the previous one fθ1 , and encode YC by a linear label encoder before concatenating the resulting embeddings into latent representations VC ∈ R|C|×d2 . In combination with the distributions of G and A , we compute context-aware representations for the context images and target images , denoted by { zi } i∈C and { zj } j∈T , respectively : p ( zi |UC , VC ) = ∫ G I { G̃iVC } ( zi ) dP ( G |UC ) ( 3 ) p ( zj |UT , UC , VC ) = ∫ A I { ÃjVC } ( zj ) dP ( A |UT , UC ) . ( 4 ) where G̃i and Ãj indicate the i-th and j-th row of G and A , each normalized to sum to 1 , and IS ( · ) denotes the indicator function on a set S . Intuitively , the representations VC are linearly weighted by each graph sample , and the normalization step ensures proper scaling in case the numbers of edges formed with the context images vary . Once we summarize each image by the context samples , a final network fθ3 : Rd2 → Y takes as input the context-aware representations and produces predictive distributions : p ( yi |XC ) = ∫ zi p ( yi | fθ3 ( zi ) ) dP ( zi |UC , VC ) , ( 5 ) p ( yj |xj , XC ) = ∫ zj p ( yj | fθ3 ( zj ) ) dP ( zj |UT , UC , VC ) . ( 6 ) Since the numbers of random binary graphs G and A are exponential , we approximate the integrals in ( 1 ) - ( 6 ) by Monte Carlo samples . More specifically , we use one sample of G and A during training and 30 samples of A during testing . Also , these graph samples are inherently non-differentiable , so we use the Gumbel-Softmax relaxations of the Bernoulli random variables during training ( Maddison et al. , 2016 ; Jang et al. , 2016 ) . The degree of approximation is controlled by temperature hyperparameters , which exert significant influence over the density of the graph samples . We find that a small temperature for G and a larger temperature for A work well . There are several reasons for making the graphs G and A random . First , the stochasticity induced by the Bernoulli random variables allows us to output multiple predictions and average these predictions , and such ensemble techniques have been quite successful in continual learning settings ( Coop et al. , 2013 ; Fernando et al. , 2017 ) . Perhaps more importantly , we find that the deterministic version with the Bernoulli random variables replaced by their parameters results in very sparse graphs where samples from the same classes are often deemed dissimilar . In a similar fashion to dropout ( Srivastava et al. , 2014 ) , the random edges encourage the model to be less reliant on a few particular edges and therefore promote knowledge transfer between samples . By a similar reasoning , we remove self-edges in the context graph and also observe more connections between samples . Graph Regularization . As training switches to new tasks , the distributional shifts to the target images necessarily result in changes to both the context graph G and the context-target graph A . In addition , the context images are regularly updated to be representative of the data distribution up to that point , so any well-learned connections between the context images are also susceptible to catastrophic forgetting . As a remedy , we save the parameters of the Bernoulli edges to the episodic memory in conjunction with the context images and context labels , and introduce a regularization term that discourages the model from forgetting previously learned edges : L ( b ) G ( θ1 ) , 1 |I ( b ) | ` ( p ( G ( b−1 ) I ( b ) ) , p ( G ( b ) I ( b ) ) ) . ( 7 ) Here , ` ( · , · ) denotes the cross-entropy between two probability distributions , I ( b ) the index set of edges to be regularized in the bth minibatch , and G ( b−1 ) the adjacency matrix learned from the beginning up to the previous minibatch . The selection strategies I ( b ) are discussed in the next subsection . Besides the regularization term , our training objective includes two other cross-entropy losses , one for the context images and another for the target images : L ( θ1 , θ2 , θ3 ) = λC |C| ∑ i∈C ` ( yi , ŷ ( s ) i ) + λT |T | ∑ j∈T ` ( yj , ŷ ( s ) j ) + λGL ( b ) G ( θ1 ) , ( 8 ) where ŷ ( s ) i = fθ3 ( z ( s ) i ) , ŷ ( s ) j = fθ3 ( z ( s ) j ) and z ( s ) i ∼ p ( zi |UC , VC ) , z ( s ) j ∼ p ( zj |UT , UC , VC ) are context-aware samples from Equations 3 and 4 , and λC , λT , λG are hyperparameters . While the graph regularization term appears similar to knowledge distillation ( Hinton et al. , 2015 ) , we emphasize that the former aims to preserve the covariance structures between the outputs of the image encoder fθ1 rather than the outputs themselves . We believe that in light of new data , the image encoder should be able to update its potentially superficial representations of previously seen samples as long as it keeps the correlations between them unchanged . Indeed , some of the early regularization approaches based on knowledge distillation ( Li & Hoiem , 2017 ; Rebuffi et al. , 2017 ) are sometimes too restrictive and reportedly underperform in certain scenarios ( Kemker & Kanan , 2017 ) . Task-Free Knowledge Consolidation . When task identities are not available , we use reservoir sampling ( Vitter , 1985 ) to update the context images and context labels as in Riemer et al . ( 2018 ) . The sampling strategy takes as input a stream of data and randomly replaces a context sample in the episodic memory with a target sample , with probability proportional to the number of samples observed so far . Despite its simplicity , reservoir sampling has been shown to yield strong performance in recent work ( Chaudhry et al. , 2019 ; Riemer et al. , 2018 ; Rolnick et al. , 2019 ) . While most prior work uses task boundaries to perform knowledge consolidation at the end of each task ( Kirkpatrick et al. , 2017 ; Rebuffi et al. , 2017 ) , we update the context graph in memory after every minibatch of training data . In addition , such updates are performed at the sample level to maximize flexibility ; we keep track of the cross entropy loss on each context sample and only update its edges in the graph when the model reaches a new low ( denoted by I ( b ) previously ) . Intuitively , the loss measures how well the model has learned the context image through the connections it forms with others , so meaningful relations are most likely obtained at the bottom of the loss surface . Though samples from the same task often provide more support for each other , the task-agnostic mechanism for updating the context graph also allows for knowledge transfer across tasks when necessary . Memory and Time Complexity . The inclusion of pairwise similarities and graph regularization result in a time and memory complexity ofO ( |M|2+ |M|N ) andO ( |M|2 ) , respectively , where |M| denotes the size of the episodic memory and N the batch size for target images . The quadratic costs in |M| , however , are not concerning in practice , as we deliberately use a small , fixed-size episodic memory . The cost of storing G is often dwarfed by the memory required for storing high-dimensional images , as each edge only needs one floating point number ( see Appendix E for more details on memory usage ) . | The paper proposes a novel way of using random graphs to improve task-free continual learning method. It builds to random graphs, G and A, based on the similarity of images stored in the memory and those of the current tasks, and utilize the relative information to build representation of the images and predict. The idea is well-formulated, and carried out in a sound way. The graph regularization term resembles the knowledge-distillation, as the authors also mentioned, but it serves different purpose of preserving the covariance structure of the outputs of the image encoders. | SP:4e23c046f8234b35d88e3957b0725fb7a3d06374 |
Active Learning in CNNs via Expected Improvement Maximization | 1 INTRODUCTION . Deep learning models ( LeCun et al. , 2015 ) have achieved remarkable performance on many challenging prediction tasks , with applications spanning computer vision ( Voulodimos et al. , 2018 ) , computational biology ( Angermueller et al. , 2016 ) , and natural language processing ( Socher et al. , 2012 ) . However , training effective deep learning models often requires a large dataset , and assembling such a dataset may be difficult given limited resources and time . Active learning ( AL ) addresses this issue by providing a framework in which training can begin with a small initial dataset and , based on an objective function known as an acquisition function , choosing what data would be the most useful to have labelled ( Settles , 2009 ) . AL has successfully streamlined and economized data collection across many disciplines ( Warmuth et al. , 2003 ; Tong & Koller , 2001 ; Danziger et al. , 2009 ; Tuia et al. , 2009 ; Hoi et al. , 2006 ; Thompson et al. , 1999 ) . In particular , pool-based AL selects points from a given set of unlabeled pool points for labelling by an external oracle ( e.g . a human expert or biological experiment ) . The resulting labeled points are then added to the training set , and can be leveraged to improve the model and potentially query additional pool points ( Settles , 2011 ) . Until recently , few AL approaches have been formulated for deep neural networks such as CNNs due to their lack of efficient methods for computing predictive uncertainty . Most acquisition functions used in AL require reliable estimates of model uncertainty in order to make informed decisions about which data labels to request . However , recent developments have led to the possibility of computationally tractable predictive uncertainty estimation in deep neural networks . In particular , a framework for deep learning models has been developed viewing dropout ( Srivastava et al. , 2014 ) as an approximation to Bayesian variational inference that enables efficient estimation of predictive uncertainty ( Gal & Ghahramani , 2016 ) . Our approach , which we call “ Dropout-based Expected IMprOvementS ” ( DEIMOS ) , builds upon prior work aiming to make statistically optimal AL queries by selecting those points that minimize expected test error ( Cohn et al. , 1996 ; Gorodetsky & Marzouk , 2016 ; Binois et al. , 2019 ; Roy & McCallum , 2001 ) . We extend such approaches to CNNs through a flexible and computationally efficient algorithm that is primarily motivated by the regression setting , for which relatively few AL methods have been proposed , and extends to classification . Many AL approaches query the single point in the pool that optimizes a certain acquisition function . However , querying points one at a time necessitates model retraining after every acquisition , which can be computationally-expensive , and can lead to time-consuming data collection ( Chen & Krause , 2013 ) . Simply greedily selecting a certain number of points with the best acquisition function values typically reduces performance due to querying similar points ( Sener & Savarese , 2018 ) . Here we leverage uncertainty estimates provided by dropout in CNNs to create a dynamic representation of predictive uncertainty across a large , representative sample of points . Importantly , we consider the full joint covariance rather than just point-wise variances . DEIMOS acquires the point that maximizes the expected reduction in predictive uncertainty across all points , which we show is equivalent to maximizing the expected improvement ( EI ) . DEIMOS extends to batch-mode AL , where batches are assembled sequentially by dynamically updating a representation of predictive uncertainty such that each queried point is expected to result in a significant , non-redundant reduction in predictive uncertainty . We evaluate DEIMOS and find strong performance compared to existing benchmarks in several AL experiments spanning handwritten digit recognition , alternative splicing prediction , and face age prediction . 2 RELATED WORK . AL is often formulated using information theory ( MacKay , 1992b ) . Such approaches include querying the maximally informative batch of points as measured using Fisher information in logistic regression ( Hoi et al. , 2006 ) , and Bayesian AL by Disagreement ( BALD ) ( Houlsby et al. , 2011 ) , which acquires the point that maximizes the mutual information between the unknown output and the model parameters . Many AL algorithms have been developed based on uncertainty sampling , where the model queries points about which it is most uncertain ( Lewis & Catlett , 1994 ; Juszczak & Duin , 2003 ) . AL via uncertainty sampling has been applied to SVMs using margin-based uncertainty measures ( Joshi et al. , 2009 ) . AL has also been cast as an uncertainty sampling problem with explicit diversity maximization ( Yang et al. , 2015 ) to avoid querying correlated points . EI has been used as an acquisition function in Bayesian optimization for hyperparameter tuning ( Eggensperger et al. , 2013 ) . Other AL objectives similar to ours have been explored in ( Cohn et al. , 1996 ; Gorodetsky & Marzouk , 2016 ; Binois et al. , 2019 ; Roy & McCallum , 2001 ) , making statistically optimal queries that minimize expected prediction error , which often reduces to querying the point that is expected to minimize the learner ’ s variance integrated over possible inputs . DEIMOS extends EI and integrated variance approaches , which have traditionally been applied to Gaussian Processes , mixtures of Gaussians , and locally weighted regression , to deep neural networks . Until recently , few AL approaches have proven effective in deep learning models such as CNNs , largely due to difficulties in uncertainty estimation . Although Bayesian frameworks for neural networks ( MacKay , 1992a ; Neal , 1995 ) have been widely studied , these methods have not seen widespread adoption due to increased computational cost . However , theoretical advances have shown that dropout , a common regularization technique , can be viewed as performing approximate variational inference and enables estimation of model and predictive uncertainty ( Gal & Ghahramani , 2016 ) . Simple dropout-based AL objectives in CNNs have shown promising results in computer vision classification applications ( Gal et al. , 2017 ) . Several new algorithms show promising results for batch-mode AL on complex datasets . Batchbald ( Kirsch et al. , 2019 ) extends BALD to batch-mode while avoiding redundancy by greedily constructing a query batch that maximizes the mutual information between the joint distribution over the unknown outputs and the model parameters . Batch-mode AL in CNN classification has also been formulated as a core-set selection problem ( Sener & Savarese , 2018 ) with data points represented ( embedded ) using the activations of the model ’ s penultimate fully-connected layer . The queried batch of points then corresponds to the centers optimizing a robust ( i.e . outlier-tolerant ) k-Center objective for these embeddings . In spite of these recent advances , there are no frameworks for batch-mode AL in CNNs that model the full joint ( rather than point-wise ) uncertainty and do not require a vector space embedding of the data . Additionally , few AL approaches for CNNs have been assessed ( or even proposed ) for regression as compared to classification . 3 ACTIVE LEARNING VIA EXPECTED IMPROVEMENT ( EI ) MAXIMIZATION . 3.1 MOTIVATION . Our pool-based AL via EI maximization framework , DEIMOS , aims to maximally reduce expected ( squared ) prediction error on a large , representative sample of points by querying as few points from the pool as possible . Let Dsamp = ( Xsamp , Ysamp ) be an sufficiently large random sample from the training and pool points that it can be assumed representative of the dataset as a whole . Let Dpool = ( Xpool , Ypool ) denote the available pool of unlabelled data , ( xnew , ynew ) ∈ Dpool a candidate point for acquisition , θ the model parameters with approximate posterior q ( θ ) , and ŷi ( θ ) the model prediction for an input xi . Note that Ypool is not known and Ysamp is only partially known in AL as the pool consists of unlabeled points . For brevity , conditioning on model input is omitted in subsequent equations ( e.g . Eq [ ŷi ( θ ) | xnew , xi ] will be written as Eq [ ŷi ( θ ) | xnew ] ) . We seek to maximize EI by acquiring the pool point that minimizes expected prediction error on Dsamp . The expected prediction error on Dsamp conditioned on some xnew ∈ Xpool is , 1 |Ysamp| ∑ ( xi , yi ) ∈Dsamp Eq , n [ ( yi − ŷi ( θ ) ) 2 | xnew ] = 1 |Ysamp| ∑ ( xi , yi ) ∈Dsamp Eq [ ( ŷi ( θ ) − E [ ŷi ( θ ) ] ) 2 | xnew ] + ( Eq [ ŷi ( θ ) | xnew ] − En [ yi ] ) 2 + En [ ( yi − En [ yi ] ) 2 ] ( 1 ) where Eq and En denote expectation over q ( θ ) and observation noise , respectively , and Eq , n denotes joint expectation over q ( θ ) and observation noise . Here we see the terms contributing to the model ’ s expected prediction error on Dsamp are ( from left to right ) : 1 ) the trace of the predictive variance matrix , 2 ) the sum of the predictive biases squared , and 3 ) the sum of the noise variances across all observations ( a constant in xnew ) ( Cohn et al. , 1996 ) . For a purely supervised model , expected predictions remain the same unless the training set of input-output pairs is modified . Therefore , expected model predictions are unchanged conditioned on any unlabeled point xnew : Eq [ ŷi ( θ ) | xnew ] = Eq [ ŷi ( θ ) ] , and the predictive bias squared for any point ( xi , yi ) stays the same conditioned on xnew : ( Eq [ ŷi ( θ ) | xnew ] −En [ yi ] ) 2 = ( Eq [ ŷi ( θ ) ] −En [ yi ] ) 2 . Substituting accordingly in equation 1 , the pool point that would minimize expected prediction error on Dsamp if queried is : x∗ = arg min xnew∈Xpool 1 |Ysamp| tr ( Varq ( Ŷsamp ( θ ) | xnew ) ) ( 2 ) where Ŷsamp ( θ ) denotes the model predictions for input Xsamp and fixed parameters θ and Varq denotes variance over the approximate posterior . Therefore , the xnew that minimizes expected prediction error upon being queried is that expected to minimize average prediction variance ( specifically the trace of the predictive covariance matrix ) . Under our assumptions , knowing xnew is sufficient to calculate the predictive variance contribution to expected prediction error conditioned on ( xnew , ynew ) , even when ynew is unknown . Importantly , it follows that , even though Ypool is not known in AL , DEIMOS is still able to identify and query the pool point xnew ∈ Xpool that minimizes expected prediction error across Dsamp after ( xnew , ynew ) is incorporated into the training set . 3.2 MC DROPOUT VARIANCE ESTIMATION . The proposed approach can be implemented with any uncertainty estimation method that enables calculation of the variance and covariance of model predictions . In our experiments , we use MC dropout ( Gal & Ghahramani , 2016 ) to obtain estimates of model uncertainty in CNNs . Models are trained with dropout preceding all fully-connected layers and dropout is used at test time to generate T approximate samples from the posterior predictive distribution . The predictive mean is obtained as the average of these samples . In order to estimate the predictive covariance matrix for all sample points , J dropout masks are randomly generated for all dropout layers in the neural network . Crucially , the same J dropout masks are used to make test-time predictions across all sample points to enable estimating correlation between them . From the dropout sample covariance matrix Varq ( Ŷsamp , dropout ( θ ) ) capturing the sample variances and covariances of the J dropout predictions for each sample point , one can estimate the prediction covariance matrix ( Gal & Ghahramani , 2016 ) , Varq ( Ŷsamp ( θ ) ) = τ−1I + Varq ( Ŷsamp , dropout ( θ ) ) . ( 3 ) Here τ = ( 1−p ) l 2 2Nλ represents the model precision in regression tasks , where p is the dropout probability , l is a prior length-scale parameter , N is the number of training points , and λ represents the weight decay ( Gal & Ghahramani , 2016 ) . In the classification setting , τ−1 = 0 . | The paper proposes a method for pool-based active learning in CNNs, selecting the next (batch of) data from an unlabeled pool to query their labels to expedite the learning process. The method computes the expected reduction in the predictive variance across a representative set of points and selects the next data point to be queried from the same set. In batch settings, the data points are sequentially selected in a batch (in a greedy way), with predictive variance representation updated after each selection. Experiments are performed on MNIST classification, and regression tasks of alternative splicing prediction, and face age prediction. | SP:f7ff3ea337acc5902d501c41e453471c43887711 |
Active Learning in CNNs via Expected Improvement Maximization | 1 INTRODUCTION . Deep learning models ( LeCun et al. , 2015 ) have achieved remarkable performance on many challenging prediction tasks , with applications spanning computer vision ( Voulodimos et al. , 2018 ) , computational biology ( Angermueller et al. , 2016 ) , and natural language processing ( Socher et al. , 2012 ) . However , training effective deep learning models often requires a large dataset , and assembling such a dataset may be difficult given limited resources and time . Active learning ( AL ) addresses this issue by providing a framework in which training can begin with a small initial dataset and , based on an objective function known as an acquisition function , choosing what data would be the most useful to have labelled ( Settles , 2009 ) . AL has successfully streamlined and economized data collection across many disciplines ( Warmuth et al. , 2003 ; Tong & Koller , 2001 ; Danziger et al. , 2009 ; Tuia et al. , 2009 ; Hoi et al. , 2006 ; Thompson et al. , 1999 ) . In particular , pool-based AL selects points from a given set of unlabeled pool points for labelling by an external oracle ( e.g . a human expert or biological experiment ) . The resulting labeled points are then added to the training set , and can be leveraged to improve the model and potentially query additional pool points ( Settles , 2011 ) . Until recently , few AL approaches have been formulated for deep neural networks such as CNNs due to their lack of efficient methods for computing predictive uncertainty . Most acquisition functions used in AL require reliable estimates of model uncertainty in order to make informed decisions about which data labels to request . However , recent developments have led to the possibility of computationally tractable predictive uncertainty estimation in deep neural networks . In particular , a framework for deep learning models has been developed viewing dropout ( Srivastava et al. , 2014 ) as an approximation to Bayesian variational inference that enables efficient estimation of predictive uncertainty ( Gal & Ghahramani , 2016 ) . Our approach , which we call “ Dropout-based Expected IMprOvementS ” ( DEIMOS ) , builds upon prior work aiming to make statistically optimal AL queries by selecting those points that minimize expected test error ( Cohn et al. , 1996 ; Gorodetsky & Marzouk , 2016 ; Binois et al. , 2019 ; Roy & McCallum , 2001 ) . We extend such approaches to CNNs through a flexible and computationally efficient algorithm that is primarily motivated by the regression setting , for which relatively few AL methods have been proposed , and extends to classification . Many AL approaches query the single point in the pool that optimizes a certain acquisition function . However , querying points one at a time necessitates model retraining after every acquisition , which can be computationally-expensive , and can lead to time-consuming data collection ( Chen & Krause , 2013 ) . Simply greedily selecting a certain number of points with the best acquisition function values typically reduces performance due to querying similar points ( Sener & Savarese , 2018 ) . Here we leverage uncertainty estimates provided by dropout in CNNs to create a dynamic representation of predictive uncertainty across a large , representative sample of points . Importantly , we consider the full joint covariance rather than just point-wise variances . DEIMOS acquires the point that maximizes the expected reduction in predictive uncertainty across all points , which we show is equivalent to maximizing the expected improvement ( EI ) . DEIMOS extends to batch-mode AL , where batches are assembled sequentially by dynamically updating a representation of predictive uncertainty such that each queried point is expected to result in a significant , non-redundant reduction in predictive uncertainty . We evaluate DEIMOS and find strong performance compared to existing benchmarks in several AL experiments spanning handwritten digit recognition , alternative splicing prediction , and face age prediction . 2 RELATED WORK . AL is often formulated using information theory ( MacKay , 1992b ) . Such approaches include querying the maximally informative batch of points as measured using Fisher information in logistic regression ( Hoi et al. , 2006 ) , and Bayesian AL by Disagreement ( BALD ) ( Houlsby et al. , 2011 ) , which acquires the point that maximizes the mutual information between the unknown output and the model parameters . Many AL algorithms have been developed based on uncertainty sampling , where the model queries points about which it is most uncertain ( Lewis & Catlett , 1994 ; Juszczak & Duin , 2003 ) . AL via uncertainty sampling has been applied to SVMs using margin-based uncertainty measures ( Joshi et al. , 2009 ) . AL has also been cast as an uncertainty sampling problem with explicit diversity maximization ( Yang et al. , 2015 ) to avoid querying correlated points . EI has been used as an acquisition function in Bayesian optimization for hyperparameter tuning ( Eggensperger et al. , 2013 ) . Other AL objectives similar to ours have been explored in ( Cohn et al. , 1996 ; Gorodetsky & Marzouk , 2016 ; Binois et al. , 2019 ; Roy & McCallum , 2001 ) , making statistically optimal queries that minimize expected prediction error , which often reduces to querying the point that is expected to minimize the learner ’ s variance integrated over possible inputs . DEIMOS extends EI and integrated variance approaches , which have traditionally been applied to Gaussian Processes , mixtures of Gaussians , and locally weighted regression , to deep neural networks . Until recently , few AL approaches have proven effective in deep learning models such as CNNs , largely due to difficulties in uncertainty estimation . Although Bayesian frameworks for neural networks ( MacKay , 1992a ; Neal , 1995 ) have been widely studied , these methods have not seen widespread adoption due to increased computational cost . However , theoretical advances have shown that dropout , a common regularization technique , can be viewed as performing approximate variational inference and enables estimation of model and predictive uncertainty ( Gal & Ghahramani , 2016 ) . Simple dropout-based AL objectives in CNNs have shown promising results in computer vision classification applications ( Gal et al. , 2017 ) . Several new algorithms show promising results for batch-mode AL on complex datasets . Batchbald ( Kirsch et al. , 2019 ) extends BALD to batch-mode while avoiding redundancy by greedily constructing a query batch that maximizes the mutual information between the joint distribution over the unknown outputs and the model parameters . Batch-mode AL in CNN classification has also been formulated as a core-set selection problem ( Sener & Savarese , 2018 ) with data points represented ( embedded ) using the activations of the model ’ s penultimate fully-connected layer . The queried batch of points then corresponds to the centers optimizing a robust ( i.e . outlier-tolerant ) k-Center objective for these embeddings . In spite of these recent advances , there are no frameworks for batch-mode AL in CNNs that model the full joint ( rather than point-wise ) uncertainty and do not require a vector space embedding of the data . Additionally , few AL approaches for CNNs have been assessed ( or even proposed ) for regression as compared to classification . 3 ACTIVE LEARNING VIA EXPECTED IMPROVEMENT ( EI ) MAXIMIZATION . 3.1 MOTIVATION . Our pool-based AL via EI maximization framework , DEIMOS , aims to maximally reduce expected ( squared ) prediction error on a large , representative sample of points by querying as few points from the pool as possible . Let Dsamp = ( Xsamp , Ysamp ) be an sufficiently large random sample from the training and pool points that it can be assumed representative of the dataset as a whole . Let Dpool = ( Xpool , Ypool ) denote the available pool of unlabelled data , ( xnew , ynew ) ∈ Dpool a candidate point for acquisition , θ the model parameters with approximate posterior q ( θ ) , and ŷi ( θ ) the model prediction for an input xi . Note that Ypool is not known and Ysamp is only partially known in AL as the pool consists of unlabeled points . For brevity , conditioning on model input is omitted in subsequent equations ( e.g . Eq [ ŷi ( θ ) | xnew , xi ] will be written as Eq [ ŷi ( θ ) | xnew ] ) . We seek to maximize EI by acquiring the pool point that minimizes expected prediction error on Dsamp . The expected prediction error on Dsamp conditioned on some xnew ∈ Xpool is , 1 |Ysamp| ∑ ( xi , yi ) ∈Dsamp Eq , n [ ( yi − ŷi ( θ ) ) 2 | xnew ] = 1 |Ysamp| ∑ ( xi , yi ) ∈Dsamp Eq [ ( ŷi ( θ ) − E [ ŷi ( θ ) ] ) 2 | xnew ] + ( Eq [ ŷi ( θ ) | xnew ] − En [ yi ] ) 2 + En [ ( yi − En [ yi ] ) 2 ] ( 1 ) where Eq and En denote expectation over q ( θ ) and observation noise , respectively , and Eq , n denotes joint expectation over q ( θ ) and observation noise . Here we see the terms contributing to the model ’ s expected prediction error on Dsamp are ( from left to right ) : 1 ) the trace of the predictive variance matrix , 2 ) the sum of the predictive biases squared , and 3 ) the sum of the noise variances across all observations ( a constant in xnew ) ( Cohn et al. , 1996 ) . For a purely supervised model , expected predictions remain the same unless the training set of input-output pairs is modified . Therefore , expected model predictions are unchanged conditioned on any unlabeled point xnew : Eq [ ŷi ( θ ) | xnew ] = Eq [ ŷi ( θ ) ] , and the predictive bias squared for any point ( xi , yi ) stays the same conditioned on xnew : ( Eq [ ŷi ( θ ) | xnew ] −En [ yi ] ) 2 = ( Eq [ ŷi ( θ ) ] −En [ yi ] ) 2 . Substituting accordingly in equation 1 , the pool point that would minimize expected prediction error on Dsamp if queried is : x∗ = arg min xnew∈Xpool 1 |Ysamp| tr ( Varq ( Ŷsamp ( θ ) | xnew ) ) ( 2 ) where Ŷsamp ( θ ) denotes the model predictions for input Xsamp and fixed parameters θ and Varq denotes variance over the approximate posterior . Therefore , the xnew that minimizes expected prediction error upon being queried is that expected to minimize average prediction variance ( specifically the trace of the predictive covariance matrix ) . Under our assumptions , knowing xnew is sufficient to calculate the predictive variance contribution to expected prediction error conditioned on ( xnew , ynew ) , even when ynew is unknown . Importantly , it follows that , even though Ypool is not known in AL , DEIMOS is still able to identify and query the pool point xnew ∈ Xpool that minimizes expected prediction error across Dsamp after ( xnew , ynew ) is incorporated into the training set . 3.2 MC DROPOUT VARIANCE ESTIMATION . The proposed approach can be implemented with any uncertainty estimation method that enables calculation of the variance and covariance of model predictions . In our experiments , we use MC dropout ( Gal & Ghahramani , 2016 ) to obtain estimates of model uncertainty in CNNs . Models are trained with dropout preceding all fully-connected layers and dropout is used at test time to generate T approximate samples from the posterior predictive distribution . The predictive mean is obtained as the average of these samples . In order to estimate the predictive covariance matrix for all sample points , J dropout masks are randomly generated for all dropout layers in the neural network . Crucially , the same J dropout masks are used to make test-time predictions across all sample points to enable estimating correlation between them . From the dropout sample covariance matrix Varq ( Ŷsamp , dropout ( θ ) ) capturing the sample variances and covariances of the J dropout predictions for each sample point , one can estimate the prediction covariance matrix ( Gal & Ghahramani , 2016 ) , Varq ( Ŷsamp ( θ ) ) = τ−1I + Varq ( Ŷsamp , dropout ( θ ) ) . ( 3 ) Here τ = ( 1−p ) l 2 2Nλ represents the model precision in regression tasks , where p is the dropout probability , l is a prior length-scale parameter , N is the number of training points , and λ represents the weight decay ( Gal & Ghahramani , 2016 ) . In the classification setting , τ−1 = 0 . | The paper considers the problem of active learning for training convolutional neural networks (CNN) in a sample-efficient manner. The proposed approach is built upon the existing idea of selecting points that maximally reduce expected mean squared error (MSE) on a large representative sample of points. MC-dropout is used for obtaining the estimates of model uncertainty. This idea is used for active learning in regression and classification problems with CNNs. A greedy method is proposed to select a batch of points by maximizing the acquisition function score sequentially obtained by updating the covariance matrix on previous points selected in the batch. Experiments are performed on two regression and one classification task. | SP:f7ff3ea337acc5902d501c41e453471c43887711 |
Hindsight Curriculum Generation Based Multi-Goal Experience Replay | 1 INTRODUCTION . Multi-goal tasks with sparse rewards present a big challenge for training a reliable RL agent . In multi-goal tasks ( Plappert et al. , 2018 ) , an agent learns to achieve multiple different goals and receives no positive feedback until it reaches the position defined by the desired goal . Such a sparse rewards problem makes it difficult to reuse past experiences for that the positive feedback to reinforce policy is rare . It ’ s impractical to carefully engineer a shaped reward function ( Ng et al. , 1999 ; Popov et al. , 2017 ) that aligns with each task or assign a set of general auxiliary tasks ( Riedmiller et al. , 2018 ) , which relies on expert knowledge . To enrich the positive feedback , Andrychowicz et al . ( 2017 ) provides HER , a novel multi-goal experience replay strategy , which enables an agent to learn from unshaped reward , e.g . a binary signal indicating successful task solving . Specifically , HER replaces the desired goals with the achieved ones then recalculates the rewards of sampled experiences . By relabeling experiences with pseudo goals , it expands experiences without further exploration and is likely to turn failed experiences into successful ones with positive feedback . Experience relabeling makes better use of failed experiences . However , not all the achieved goals lead the origin experience to a reliable state-action visitation under the current policy . ( For simplicity , we denote state-goal pairs as augmented states . ) A Value function of a policy for a specific state-action pair can generalize to similar ones , in return the estimate of the value function may get worse without sufficient visitation near the state-action pair . For HER , it almost replays uniform samples of past experiences whilst goals for exploring are finite . When performing a value update , the current policy could not give a credible estimate of the universal value function ( Schaul et al. , 2015 ) , if the state-action pair is not well-explored . In other words , the current policy may have difficulty in generalizing to the state-action pair . Recent works focus on improving HER by evaluating the past experiences where we sample pseudo goals from . HER with Energy-Based Prioritization ( EBP ) ( Zhao & Tresp , 2018 ) defines a trajectory energy function as the sum of the transition energy of the target object over the trajectory . Curriculum-guided HER ( CHER ) ( Fang et al. , 2019b ) adaptively selects the failed experiences according to the proximity to the true goals and the curiosity of exploration over diverse pseudo goals with gradually changed proportion . Though these variants select valuable goals for replay , it remains a challenge that the agent will not further explore most of the pseudo goals then it is risky to directly generalize over pseudo goals . Humans show great capability in abstracting and generalizing knowledge but it takes a large number of experiences to learn to represent similar states with similar features . Fortunately , states with different achieved goals and desired goals may be similar intrinsically if the states and distance between them are similar . During an episode , the distance varies widely for a fixed desired goal , which has the potential for generalization . Therefore , we take advantage of relative goals-distances between the achieved goals and the desired goals-to transform data . The relative goals strategy alleviates the challenge of generalization without sufficient data . By explicitly discovering similar states in the replay buffer , it enables us to see the density of state-action visitations for unexplored goals more conveniently . The density reflects the likelihood of the corresponding state-action pair , indicating whether it is well explored . Besides , the generalization over relative goals is feasible only if the explored relative goals are widely distributed ( Schaul et al. , 2015 ) . In a word , it is significant to ensure sufficient state-action visitations and maintain a balanced distribution over valid goals . In this paper , we present to resample hindsight experiences with a relative goals strategy . The main criterion to sample experiences for a reliable generalization is based on 1 ) the likelihood of the corresponding state-action pair under the current policy ; 2 ) the overall distribution of the relative goals . By constantly adjusting the distribution of goals , we propose Hindsight Curriculum Generation ( HCG ) , which generates a replay curriculum to progressively expand the range of experiences for training . The main advantage is that it makes efficient use of hindsight experiences as well as tries to ensure the generalization over state-action pairs . From the perspective of curriculum learning , the generated curriculum can be seen as a sequence of weights on the training experiences , which guide the learning by automatically generating suitable replay goals . Furthermore , we implemented HCG with the vanilla Deep Deterministic Policy Gradient ( DDPG ) ( P. et al. , 2015 ) on various Robotic Control problems . The robot , a 7-DOF Fetch Robotics arm which has a two-fingered parallel gripper or an anthropomorphic robotic hand with 24 degrees of freedom , performs the training procedure using the MuJoCo simulated physics engine ( Todorov et al. , 2012 ) . During the training procedure , our method extracts and leverages information from hindsight experiences with various state-goal pairs . We experimentally demonstrated that our method improves the sample efficiency of the vanilla HER in solving multi-goal tasks with sparse rewards . Ablation studies show that our method is robust on the major hyperparameters . 2 BACKGROUND . In this section we briefly introduce the multi-goal RL framework , universal value function approximators and hindsight experience replay strategy used in the paper . 2.1 MULTI-GOAL RL . Consider an infinite-horizon discounted Markov decision process ( MDP ) , defined by the tuple ( S , A , G , P , r , γ ) , where S is a set of states , A is a set of actions , G is a set of goals , P : S×A×S → R is the transition probability distribution , r : S ×A×G → R is the reward function , and γ ∈ ( 0 , 1 ) is the discount factor . In multi-goal RL , an agent interacts with its discounted MDP environment in a sequence of episodes . At the beginning of each episode , the agent receives a goal state g ∈ G. In this paper we set that each g ∈ G corresponds to a goal state sg ∈ S . Moreover , we assume that given a state s we can easily find a goal g which is satisfied in this state . At each timestep t , the agent observes a state st ∈ S , chooses and executes an action at ∈ A . And the agent will receive a resulting reward r ( st , at , g ) at the next timestep t + 1 . ( For simplicity , we denote rt = r ( st , at , g ) . ) In multi-goal RL , the reward function r is a binary sparse signal indicating whether the agent achieves the desired goal state : rt = { 1 , ||ϕ ( st+1 ) − g||2 ≤ δg 0 , otherwise where ϕ : S → G , a known and tractable mapping , defines the corresponding goal representation of each state , and δg is a task-specific tolerance threshold defined in Plappert et al . ( 2018 ) . 2.2 UNIVERSAL VALUE FUNCTION APPROXIMATORS . Problems following the multi-goal RL framework ( Plappert et al. , 2018 ) tell RL agent what to do using an additional goal as input . The goal is fixed in each episode whilst there is more than one goal to achieve . In the continuous control problems , the agent could not afford to learn a policy for each goal . Instead , the policy should generalize not just over states but also over goals via deep neural networks . Formally , Universal Value Function Approximators ( UVFA ) ( Schaul et al. , 2015 ) factor observed values into separate embedding vectors for states and goals , then learn a mapping from ( s , g ) pairs to factored embedding vectors . Let τ = s1 , a1 , s2 , a2 , . . . , sT−1 , aT−1 , sT denote a trajectory , which is also an episode , Rt = ∑T i=t γ i−tri denote its discounted return at every timestep t ∈ [ 1 , T ] . Let π : S × G → A denote a universal policy , V π : S × G → R denote its value function . The objective of the agent is to learn a general value function parameterized by θ that represents the expected discounted return , i.e . V π ( st , g ) : = E [ Rt|θ ] , or to learn a policy π that maximizes expected discounted return . The Q-function Qπ : S×G×A → R also depends on goals . Notice that the transition probability distribution is independent of goals , it is possible to train an approximator to the Q-function using direct bootstrapping from the Bellman equation Qπ ( st , g , at ) : = Est+1 [ rt + γV π ( st+1 , g ) ] . ( 1 ) 2.3 HINDSIGHT EXPERIENCE REPLAY . Experience replay is the key strategy of off-policy RL to remember and reuse past experiences , which has shown great power in solving large sequential decision-making problems , such as Atari Games ( Mnih et al. , 2015 ) and Robotic Control ( P. et al. , 2015 ) . By resampling experiences for agent training , it makes better use of experiences than on-policy RL . Let µ : S × G → A denote a universal behavior policy and π denote the target policy . In off-policy RL , the target policy can learn from experiences generated by any behavior policy as long as if P ( a = π ( st , g ) ) > 0 , we have P ( a = µ ( st , g ) ) > 0 at each t. If any state-action pair ( st , g , a ) is unavailable for behabior policy , there will be approximation error in the estimation of Qπ ( st , g , at ) . For any off-policy RL algorithm , HER modifies the desired goals g in the replay transitions to some achieved goals g′ sampled from failed episodes . Specifically , it stores transitions not only with the original goal used for its episode but also with a subset of other goals . Notice that for UVFAs , Eq . ( 1 ) holds with relabeled experiences , which makes it possible to relabel past experiences with additional goals . HER generates additional goals using hand-crafted heuristics . It proposes various goals generation strategies , e.g . future strategy that replays with m random states which come from the same episode as the transition being replayed and were observed after it . The hyperparameter m controls the ratio of relabeled experiences to those coming from normal experience replay . The unexplored goal g′ affects the estimation of Qπ ( st , g′ , at ) , which is performed by a variant of Eq . ( 1 ) Qπ ( st , g ′ , at ) = Est+1 [ rt + γQπ ( st+1 , g′ , a ) ] , ( 2 ) where a is sampled from π . The target policy may select an unfamiliar action a at the next stategoal pair in the backed-up value estimate . More generally , the estimate , Qπ ( st+1 , g′ , a ) , will be unreliable in lack of sufficient visitations near ( st+1 , g′ , a ) . Especially when relabeling experiences without further exploration , the universal value function could not generalize well over pseudo goals . | This paper focuses on the problem of goal conditioned reinforcement learning. The authors propose an alternative way of performing Bellman updates for goal conditioned value function. Specifically, the proposed method first partitions the space of state goal pairs by performing a K-means clustering, and then estimates the visitation frequency of a state goal pair to be inversely proportional to the maximum difference of Q values within the cluster. For state goal pairs with low visitation frequency, the authors construct a lower bound of the Bellman target value by finding the Q value of a near state goal pair and subtracting the Lipchitz value multiplied by the distance. The authors then use this lower bound as target value to update the Q function. To generate goals for hindsight replay, the authors adopted a skew-fit type method to the empirical distribution of the K-means clusters to sample goals for replay. | SP:3f20bfebcca1b1ff3743a3427ad44221c71e598a |
Hindsight Curriculum Generation Based Multi-Goal Experience Replay | 1 INTRODUCTION . Multi-goal tasks with sparse rewards present a big challenge for training a reliable RL agent . In multi-goal tasks ( Plappert et al. , 2018 ) , an agent learns to achieve multiple different goals and receives no positive feedback until it reaches the position defined by the desired goal . Such a sparse rewards problem makes it difficult to reuse past experiences for that the positive feedback to reinforce policy is rare . It ’ s impractical to carefully engineer a shaped reward function ( Ng et al. , 1999 ; Popov et al. , 2017 ) that aligns with each task or assign a set of general auxiliary tasks ( Riedmiller et al. , 2018 ) , which relies on expert knowledge . To enrich the positive feedback , Andrychowicz et al . ( 2017 ) provides HER , a novel multi-goal experience replay strategy , which enables an agent to learn from unshaped reward , e.g . a binary signal indicating successful task solving . Specifically , HER replaces the desired goals with the achieved ones then recalculates the rewards of sampled experiences . By relabeling experiences with pseudo goals , it expands experiences without further exploration and is likely to turn failed experiences into successful ones with positive feedback . Experience relabeling makes better use of failed experiences . However , not all the achieved goals lead the origin experience to a reliable state-action visitation under the current policy . ( For simplicity , we denote state-goal pairs as augmented states . ) A Value function of a policy for a specific state-action pair can generalize to similar ones , in return the estimate of the value function may get worse without sufficient visitation near the state-action pair . For HER , it almost replays uniform samples of past experiences whilst goals for exploring are finite . When performing a value update , the current policy could not give a credible estimate of the universal value function ( Schaul et al. , 2015 ) , if the state-action pair is not well-explored . In other words , the current policy may have difficulty in generalizing to the state-action pair . Recent works focus on improving HER by evaluating the past experiences where we sample pseudo goals from . HER with Energy-Based Prioritization ( EBP ) ( Zhao & Tresp , 2018 ) defines a trajectory energy function as the sum of the transition energy of the target object over the trajectory . Curriculum-guided HER ( CHER ) ( Fang et al. , 2019b ) adaptively selects the failed experiences according to the proximity to the true goals and the curiosity of exploration over diverse pseudo goals with gradually changed proportion . Though these variants select valuable goals for replay , it remains a challenge that the agent will not further explore most of the pseudo goals then it is risky to directly generalize over pseudo goals . Humans show great capability in abstracting and generalizing knowledge but it takes a large number of experiences to learn to represent similar states with similar features . Fortunately , states with different achieved goals and desired goals may be similar intrinsically if the states and distance between them are similar . During an episode , the distance varies widely for a fixed desired goal , which has the potential for generalization . Therefore , we take advantage of relative goals-distances between the achieved goals and the desired goals-to transform data . The relative goals strategy alleviates the challenge of generalization without sufficient data . By explicitly discovering similar states in the replay buffer , it enables us to see the density of state-action visitations for unexplored goals more conveniently . The density reflects the likelihood of the corresponding state-action pair , indicating whether it is well explored . Besides , the generalization over relative goals is feasible only if the explored relative goals are widely distributed ( Schaul et al. , 2015 ) . In a word , it is significant to ensure sufficient state-action visitations and maintain a balanced distribution over valid goals . In this paper , we present to resample hindsight experiences with a relative goals strategy . The main criterion to sample experiences for a reliable generalization is based on 1 ) the likelihood of the corresponding state-action pair under the current policy ; 2 ) the overall distribution of the relative goals . By constantly adjusting the distribution of goals , we propose Hindsight Curriculum Generation ( HCG ) , which generates a replay curriculum to progressively expand the range of experiences for training . The main advantage is that it makes efficient use of hindsight experiences as well as tries to ensure the generalization over state-action pairs . From the perspective of curriculum learning , the generated curriculum can be seen as a sequence of weights on the training experiences , which guide the learning by automatically generating suitable replay goals . Furthermore , we implemented HCG with the vanilla Deep Deterministic Policy Gradient ( DDPG ) ( P. et al. , 2015 ) on various Robotic Control problems . The robot , a 7-DOF Fetch Robotics arm which has a two-fingered parallel gripper or an anthropomorphic robotic hand with 24 degrees of freedom , performs the training procedure using the MuJoCo simulated physics engine ( Todorov et al. , 2012 ) . During the training procedure , our method extracts and leverages information from hindsight experiences with various state-goal pairs . We experimentally demonstrated that our method improves the sample efficiency of the vanilla HER in solving multi-goal tasks with sparse rewards . Ablation studies show that our method is robust on the major hyperparameters . 2 BACKGROUND . In this section we briefly introduce the multi-goal RL framework , universal value function approximators and hindsight experience replay strategy used in the paper . 2.1 MULTI-GOAL RL . Consider an infinite-horizon discounted Markov decision process ( MDP ) , defined by the tuple ( S , A , G , P , r , γ ) , where S is a set of states , A is a set of actions , G is a set of goals , P : S×A×S → R is the transition probability distribution , r : S ×A×G → R is the reward function , and γ ∈ ( 0 , 1 ) is the discount factor . In multi-goal RL , an agent interacts with its discounted MDP environment in a sequence of episodes . At the beginning of each episode , the agent receives a goal state g ∈ G. In this paper we set that each g ∈ G corresponds to a goal state sg ∈ S . Moreover , we assume that given a state s we can easily find a goal g which is satisfied in this state . At each timestep t , the agent observes a state st ∈ S , chooses and executes an action at ∈ A . And the agent will receive a resulting reward r ( st , at , g ) at the next timestep t + 1 . ( For simplicity , we denote rt = r ( st , at , g ) . ) In multi-goal RL , the reward function r is a binary sparse signal indicating whether the agent achieves the desired goal state : rt = { 1 , ||ϕ ( st+1 ) − g||2 ≤ δg 0 , otherwise where ϕ : S → G , a known and tractable mapping , defines the corresponding goal representation of each state , and δg is a task-specific tolerance threshold defined in Plappert et al . ( 2018 ) . 2.2 UNIVERSAL VALUE FUNCTION APPROXIMATORS . Problems following the multi-goal RL framework ( Plappert et al. , 2018 ) tell RL agent what to do using an additional goal as input . The goal is fixed in each episode whilst there is more than one goal to achieve . In the continuous control problems , the agent could not afford to learn a policy for each goal . Instead , the policy should generalize not just over states but also over goals via deep neural networks . Formally , Universal Value Function Approximators ( UVFA ) ( Schaul et al. , 2015 ) factor observed values into separate embedding vectors for states and goals , then learn a mapping from ( s , g ) pairs to factored embedding vectors . Let τ = s1 , a1 , s2 , a2 , . . . , sT−1 , aT−1 , sT denote a trajectory , which is also an episode , Rt = ∑T i=t γ i−tri denote its discounted return at every timestep t ∈ [ 1 , T ] . Let π : S × G → A denote a universal policy , V π : S × G → R denote its value function . The objective of the agent is to learn a general value function parameterized by θ that represents the expected discounted return , i.e . V π ( st , g ) : = E [ Rt|θ ] , or to learn a policy π that maximizes expected discounted return . The Q-function Qπ : S×G×A → R also depends on goals . Notice that the transition probability distribution is independent of goals , it is possible to train an approximator to the Q-function using direct bootstrapping from the Bellman equation Qπ ( st , g , at ) : = Est+1 [ rt + γV π ( st+1 , g ) ] . ( 1 ) 2.3 HINDSIGHT EXPERIENCE REPLAY . Experience replay is the key strategy of off-policy RL to remember and reuse past experiences , which has shown great power in solving large sequential decision-making problems , such as Atari Games ( Mnih et al. , 2015 ) and Robotic Control ( P. et al. , 2015 ) . By resampling experiences for agent training , it makes better use of experiences than on-policy RL . Let µ : S × G → A denote a universal behavior policy and π denote the target policy . In off-policy RL , the target policy can learn from experiences generated by any behavior policy as long as if P ( a = π ( st , g ) ) > 0 , we have P ( a = µ ( st , g ) ) > 0 at each t. If any state-action pair ( st , g , a ) is unavailable for behabior policy , there will be approximation error in the estimation of Qπ ( st , g , at ) . For any off-policy RL algorithm , HER modifies the desired goals g in the replay transitions to some achieved goals g′ sampled from failed episodes . Specifically , it stores transitions not only with the original goal used for its episode but also with a subset of other goals . Notice that for UVFAs , Eq . ( 1 ) holds with relabeled experiences , which makes it possible to relabel past experiences with additional goals . HER generates additional goals using hand-crafted heuristics . It proposes various goals generation strategies , e.g . future strategy that replays with m random states which come from the same episode as the transition being replayed and were observed after it . The hyperparameter m controls the ratio of relabeled experiences to those coming from normal experience replay . The unexplored goal g′ affects the estimation of Qπ ( st , g′ , at ) , which is performed by a variant of Eq . ( 1 ) Qπ ( st , g ′ , at ) = Est+1 [ rt + γQπ ( st+1 , g′ , a ) ] , ( 2 ) where a is sampled from π . The target policy may select an unfamiliar action a at the next stategoal pair in the backed-up value estimate . More generally , the estimate , Qπ ( st+1 , g′ , a ) , will be unreliable in lack of sufficient visitations near ( st+1 , g′ , a ) . Especially when relabeling experiences without further exploration , the universal value function could not generalize well over pseudo goals . | This paper developed methods for resampling from the hindsight experience replay buffer. The resampling strategy was developed based on the current policy, and the overall distribution of the relative goals. As the distribution over goals evolves over time, the multi-goal agent's replay curriculum is adjusted throughout the learning process. The developed approach, called hindsight curriculum generation (HCG), was applied to DDPG, and evaluated using a set of four robot control problems. Results show that HCG performed better than a few baseline methods, and its performance was claimed to be insensitive to the choice of hyper-parameters. | SP:3f20bfebcca1b1ff3743a3427ad44221c71e598a |
Convex Potential Flows: Universal Probability Distributions with Optimal Transport and Convex Optimization | 1 INTRODUCTION . Normalizing flows ( Dinh et al. , 2014 ; Rezende & Mohamed , 2015 ) have recently gathered much interest within the machine learning community , ever since its recent breakthrough in modelling high dimensional image data ( Dinh et al. , 2017 ; Kingma & Dhariwal , 2018 ) . They are characterized by an invertible mapping that can reshape the distribution of its input data into a simpler or more complex one . To enable efficient training , numerous tricks have been proposed to impose structural constraints on its parameterization , such that the density of the model can be tractably computed . We ask the following question : “ what is the natural way to parameterize a normalizing flow ? ” To gain a bit more intuition , we start from the one-dimension case . If a function f : R ! R is continuous , it is invertible ( injective onto its image ) if and only if it is strictly monotonic . This means that if we are only allowed to move the probability mass continuously without flipping the order of the particles , then we can only rearrange them by changing the distance in between . In this work , we seek to generalize the above intuition of monotone rearrangement in 1D . We do so by motivating the parameterization of normalizing flows from an optimal transport perspective , which allows us to define some notion of rearrangement cost ( Villani , 2008 ) . It turns out , if we want the output of a flow to follow some desired distribution , under mild regularity conditions , we can characterize the unique optimal mapping by a convex potential ( Brenier , 1991 ) . In light of this , we propose to parameterize normalizing flows by the gradient map of a ( strongly ) convex potential . Owing to this theoretical insight , the proposed method is provably universal and optimal ; this means the proposed flow family can approximate arbitrary distributions and requires the least amount of transport cost . Furthermore , the parameterization with convex potentials allows us to formulate model inversion and gradient estimation as convex optimization problems . As such , we make use of existing tools from the convex optimization literature to cheaply and efficiently estimate all quantities of interest . In terms of the benefits of parameterizing a flow as a gradient field , the convex potential is an Rd ! R function , which is different from most existing discrete-time flows which are Rd ! Rd . This makes CP-Flow relatively compact . It is also arguably easier to design a convex architecture , as we do not need to satisfy constraints such as orthogonality or Lipschitzness ; the latter two usually require a direct or an iterative reparameterization of the parameters . Finally , it is possible to incorporate additional structure such as equivariance ( Cohen & Welling , 2016 ; Zaheer et al. , 2017 ) into the flow ’ s parameterization , making CP-Flow a more flexible general purpose density model . 2 BACKGROUND : NORMALIZING FLOWS AND OPTIMAL TRANSPORT . Normalizing flows are characterized by a differentiable , invertible neural network f such that the probability density of the network ’ s output can be computed conveniently using the change-ofvariable formula pY ( f ( x ) ) = pX ( x ) @ f ( x ) @ x 1 ( ) pY ( y ) = pX ( f 1 ( y ) ) @ f 1 ( y ) @ y ( 1 ) where the Jacobian determinant term captures the local expansion or contraction of the density near x ( resp . y ) induced by the mapping f ( resp . f 1 ) , and pX is the density of a random variable X . The invertibility requirement has led to the design of many special neural network parameterizations such as triangular maps , ordinary differential equations , orthogonality or Lipschitz constraints . Universal Flows For a general learning framework to be meaningful , a model needs to be flexible enough to capture variations in the data distribution . In the context of density modeling , this corresponds to the model ’ s capability to represent arbitrary probability distributions of interest . Even though there exists a long history of literature on universal approximation capability of deep neural networks ( Cybenko , 1989 ; Lu et al. , 2017 ; Lin & Jegelka , 2018 ) , invertible neural networks generally have limited expressivity and can not approximate arbitrary functions . However , for the purpose of approximating a probability distribution , it suffices to show that the distribution induced by a normalizing flow is universal . Among many ways to establish distributional universality of flow based methods ( e.g . Huang et al . 2018 ; 2020b ; Teshima et al . 2020 ; Kong & Chaudhuri 2020 ) , one particular approach is to approximate a deterministic coupling between probability measures . Given a pair of probability densities pX and pY , a deterministic coupling is a mapping g such that g ( X ) ⇠ pY if X ⇠ pX . We seek to find a coupling that is invertible , or at least can be approximated by invertible mappings . Optimal Transport Let c ( x , y ) be a cost function . The Monge problem ( Villani , 2008 ) pertains to finding the optimal transport map g that realizes the minimal expected cost Jc ( pX , pY ) = inf eg : eg ( X ) ⇠pY EX⇠pX [ c ( X , eg ( X ) ) ] ( 2 ) When the second moments of X and Y are both finite , and X is regular enough ( e.g . having a density ) , then the special case of c ( x , y ) = ||x y||2 has an interesting solution , a celebrated theorem due to Brenier ( 1987 ; 1991 ) : Theorem 1 ( Brenier ’ s Theorem , Theorem 1.22 of Santambrogio ( 2015 ) ) . Let µ , ⌫ be probability measures with a finite second moment , and assume µ has a Lebesgue density pX . Then there exists a convex potential G such that the gradient map g : = rG ( defined up to a null set ) uniquely solves the Monge problem in eq . ( 2 ) with the quadratic cost function c ( x , y ) = ||x y||2 . Some recent works are also inspired by Brenier ’ s theorem and utilize a convex potential to parameterize a critic model , starting from Taghvaei & Jalali ( 2019 ) , and further built upon by Makkuva et al . ( 2019 ) who parameterize a generator with a convex potential and concurrently by Korotin et al . ( 2019 ) . Our work sets itself apart from these prior works in that it is entirely likelihood-based , minimizing the ( empirical ) KL divergence as opposed to an approximate optimal transport cost . 3 CONVEX POTENTIAL FLOWS . Given a strictly convex potential F , we can define an injective map ( invertible from its image ) via its gradient f = rF , since the Jacobian of f is the Hessian matrix of F , and is thus positive definite . In this section , we discuss the parameterization of the convex potential F ( 3.1 ) , and then address gradient estimation for CP-Flows ( 3.2 ) . We examine the connection to other parameterization of normalizing flows ( 3.3 ) , and finally rigorously prove universality in the next section . 3.1 MODELING . Input Convex Neural Networks We use L ( x ) to denote a linear layer , and L+ ( x ) to denote a linear layer with positive weights . We use the ( fully ) input-convex neural network ( ICNN , Amos et al . ( 2017 ) ) to parameterize the convex potential , which has the following form F ( x ) = L+ K+1 ( s ( zK ) ) + LK+1 ( x ) zk : = L + k ( s ( zk 1 ) ) + Lk ( x ) z1 : = L1 ( x ) where s is a non-decreasing , convex activation function . In this work , we use softplus-type activation functions , which is a rich family of activation functions that can be shown to uniformly approximate the ReLU activation . See Appendix B for details . Algorithm 1 Inverting CP-Flow . 1 : procedure INVERT ( F , y , CvxSolver ) 2 : Initialize x y 3 : def closure ( ) : 4 : Compute loss : l F ( x ) y > x 5 : return l 6 : x CvxSolver ( closure , x ) 7 : return x Invertibility and Inversion Procedure If the activation s is twice differentiable , then the Hessian HF is positive semi-definite . We can make it strongly convex by adding a quadratic term F↵ ( x ) = ↵ 2 ||x|| 2 2 + F ( x ) , such that HF↵ ⌫ ↵I 0 . This means the gradient map f↵ = rF↵ is injective onto its image . Furthermore , it is surjective since for any y 2 Rd , the potential x 7 ! F↵ ( x ) y > x has a unique minimizer1 satisfying the first order condition rF↵ ( x ) = y , due to the strong convexity and differentiability . We refer to this invertible mapping f↵ as the convex potential flow , or the CP-Flow . The above discussion also implies we can plug in a black-box convex solver to invert the gradient map f↵ , which we summarize in Algorithm 1 . Inverting a batch of independent inputs is as simple as summing the convex potential over all inputs : since all of the entries of the scalar l in the minibatch are independent of each other , computing the gradient all l ’ s wrt all x ’ s amounts to computing the gradient of the summation of l ’ s wrt all x ’ s . Due to the convex nature of the problem , a wide selection of algorithms can be used with convergence guarantees ( Nesterov , 1998 ) . In practice , we use the L-BFGS algorithm ( Byrd et al. , 1995 ) as our CvxSolver . 1The minimizer x⇤ corresponds to the gradient map of the convex conjugate of the potential . See Appendix A for a formal discussion . Estimating Log Probability Following equation ( 1 ) , computing the log density for CP-Flows requires taking the log determinant of a symmetric positive definite Jacobian matrix ( as it is the Hessian of the potential ) . There exists numerous works on estimating spectral densities ( e.g . TalEzer & Kosloff , 1984 ; Silver & Röder , 1994 ; Han et al. , 2018 ; Adams et al. , 2018 ) , of which this quantity is a special case . See Lin et al . ( 2016 ) for an overview of methods that only require access to Hessian-vector products . Hessian-vector products ( hvp ) are cheap to compute with reverse-mode automatic differentiation ( Baydin et al. , 2017 ) , which does not require constructing the full Hessian matrix and has the same asymptotic cost as evaluating F↵ . In particular , the log determinant can be rewritten in the form of a generalized trace tr logH . Chen et al . ( 2019a ) limit the spectral norm ( i.e . eigenvalues ) of H and directly use the Taylor expansion of the matrix logarithm . Since our H has unbounded eigenvalues , we use a more complex algorithm designed for symmetric matrices , the stochastic Lanczos quadrature ( SLQ ; Ubaru et al. , 2017 ) . At the core of SLQ is the Lanczos method , which computes m eigenvalues of H by first constructing a symmetric tridiagonal matrix T 2 Rm⇥m and computing the eigenvalues of T . The Lanczos procedure only requires Hessian-vector products , and it can be combined with a stochastic trace estimator to provide a stochastic estimate of our log probability . We chose SLQ because it has shown theoretically and empirically to have low variance ( Ubaru et al. , 2017 ) . 3.2 O ( 1 ) -MEMORY UNBIASED r log detH ESTIMATOR We would also like to have an estimator for the gradient of the log determinant to enable variants of stochastic gradient descent for optimization . Unfortunately , directly backpropagating through the log determinant estimator is not ideal . Two major drawbacks of directly differentiating through SLQ are that it requires ( i ) differentiating through an eigendecomposition routine and ( ii ) storing all Hessian-vector products in memory ( see fig . 2 ) . Problem ( i ) is more specific to SLQ , because the gradient of an eigendecomposition is not defined when the eigenvalues are not unique ( Seeger et al. , 2017 ) . Consequently , we have empirically observed that differentiating through SLQ can be unstable , frequently resulting in NaNs due to the eigendecomposition . Problem ( ii ) will hold true for other algorithms that also estimate log detH with Hessian-vector products , and generally the only difference is that a different numerical routine would need to be differentiated through . Due to these problems , we do not differentiate through SLQ , but we still use it as an efficient method for monitoring training progress . Instead , it is possible to construct an alternative formulation of the gradient as the solution of a convex optimization problem , foregoing the necessity of differentiating through an estimation routine of the log determinant . We adapt the gradient formula from Chen et al . ( 2019a , Appendix C ) to the context of convex potentials . Using Jacobi ’ s formula⇤ and the adjugate representation of the matrix inverse† , for any invertible matrix H with parameter ✓ , we have the following identity : @ @ ✓ log detH = 1detH @ @ ✓ detH ⇤ = 1detH tr adj ( H ) @ H @ ✓ † = tr H 1 @ H @ ✓ = Ev ⇥ v > H 1 @ H @ ✓ v ⇤ . ( 3 ) Notably , in the last equality , we used the Hutchinson trace estimator ( Hutchinson , 1989 ) with a Rademacher random vector v , leading to a O ( 1 ) -memory , unbiased Monte Carlo gradient estimator . Computing the quantity v > H 1 in eq . ( 3 ) by constructing and inverting the full Hessian requires d calls to an automatic differentiation routine and is too costly for our purposes . However , we can recast this quantity as the solution of a quadratic optimization problem argmin z ⇢ 1 2 z > Hz v > z ( 4 ) which has the unique minimizer z⇤ = H 1v since H is symmetric positive definite . Algorithm 2 Surrogate training objective . 1 : procedure SURROGATEOBJ ( F , x , CG ) 2 : Obtain the gradient f ( x ) , rxF ( x ) 3 : Sample Rademacher random vector r 4 : def hvp ( v ) : 5 : return v > @ @ x f ( x ) 6 : z stop gradient ( CG ( hvp , r ) ) 7 : return hvp ( z ) > r We use the conjugate gradient ( CG ) method , which is specifically designed for solving the unconstrained optimization problems in eq . ( 4 ) with symmetric positive definite H . It uses only Hessian-vector products and is straightforward to parallelize . Conjugate gradient is guaranteed to return the exact solution z⇤ within d iterations , and the error of the approximation is known to converge exponentially fast ||zm z⇤||H 2 m||z0 z⇤||H , where zm is the estimate after m iterations . The rate of convergence < 1 relates to the condition number of H . For more details , see Nocedal & Wright ( 2006 , Ch . 5 ) . In practice , we terminate CG when ||Hzm v||1 < ⌧ is satisfied for some user-controlled tolerance . Empirically , we find that stringent tolerance values are unnecessary for stochastic optimization ( see appendix F ) . Estimating the full quantity in eq . ( 3 ) is then simply a matter of computing and differentiating a scalar quantity ( a surrogate objective ) involving another Hessian-vector product : d d✓ ( zm ) > Hv , where only H is differentiated through ( since zm is only used to approximate v > H 1 as a modifier of the gradient ) . We summarize this procedure in Algorithm 2 . Similar to inversion , the hvp can also be computed in batch by summing over the data index , since all entries are independent . | This paper proposes the flow based representation of a probability distribution so that the corresponding density remains tractable. In particular, the push-forward map that generates the desired distribution is characterized by the gradient of a strongly convex potential function. The invertability of the mapping as well as the Jacobian of the mapping is hence guaranteed by such a convexity property of the potential function. The proposed CP-flows are proved to be universal density approximators and are optimal in the OT (2-Wasserstein) sense. | SP:00578dd55a640c10dbf22f647b736e49f6ee3c32 |
Convex Potential Flows: Universal Probability Distributions with Optimal Transport and Convex Optimization | 1 INTRODUCTION . Normalizing flows ( Dinh et al. , 2014 ; Rezende & Mohamed , 2015 ) have recently gathered much interest within the machine learning community , ever since its recent breakthrough in modelling high dimensional image data ( Dinh et al. , 2017 ; Kingma & Dhariwal , 2018 ) . They are characterized by an invertible mapping that can reshape the distribution of its input data into a simpler or more complex one . To enable efficient training , numerous tricks have been proposed to impose structural constraints on its parameterization , such that the density of the model can be tractably computed . We ask the following question : “ what is the natural way to parameterize a normalizing flow ? ” To gain a bit more intuition , we start from the one-dimension case . If a function f : R ! R is continuous , it is invertible ( injective onto its image ) if and only if it is strictly monotonic . This means that if we are only allowed to move the probability mass continuously without flipping the order of the particles , then we can only rearrange them by changing the distance in between . In this work , we seek to generalize the above intuition of monotone rearrangement in 1D . We do so by motivating the parameterization of normalizing flows from an optimal transport perspective , which allows us to define some notion of rearrangement cost ( Villani , 2008 ) . It turns out , if we want the output of a flow to follow some desired distribution , under mild regularity conditions , we can characterize the unique optimal mapping by a convex potential ( Brenier , 1991 ) . In light of this , we propose to parameterize normalizing flows by the gradient map of a ( strongly ) convex potential . Owing to this theoretical insight , the proposed method is provably universal and optimal ; this means the proposed flow family can approximate arbitrary distributions and requires the least amount of transport cost . Furthermore , the parameterization with convex potentials allows us to formulate model inversion and gradient estimation as convex optimization problems . As such , we make use of existing tools from the convex optimization literature to cheaply and efficiently estimate all quantities of interest . In terms of the benefits of parameterizing a flow as a gradient field , the convex potential is an Rd ! R function , which is different from most existing discrete-time flows which are Rd ! Rd . This makes CP-Flow relatively compact . It is also arguably easier to design a convex architecture , as we do not need to satisfy constraints such as orthogonality or Lipschitzness ; the latter two usually require a direct or an iterative reparameterization of the parameters . Finally , it is possible to incorporate additional structure such as equivariance ( Cohen & Welling , 2016 ; Zaheer et al. , 2017 ) into the flow ’ s parameterization , making CP-Flow a more flexible general purpose density model . 2 BACKGROUND : NORMALIZING FLOWS AND OPTIMAL TRANSPORT . Normalizing flows are characterized by a differentiable , invertible neural network f such that the probability density of the network ’ s output can be computed conveniently using the change-ofvariable formula pY ( f ( x ) ) = pX ( x ) @ f ( x ) @ x 1 ( ) pY ( y ) = pX ( f 1 ( y ) ) @ f 1 ( y ) @ y ( 1 ) where the Jacobian determinant term captures the local expansion or contraction of the density near x ( resp . y ) induced by the mapping f ( resp . f 1 ) , and pX is the density of a random variable X . The invertibility requirement has led to the design of many special neural network parameterizations such as triangular maps , ordinary differential equations , orthogonality or Lipschitz constraints . Universal Flows For a general learning framework to be meaningful , a model needs to be flexible enough to capture variations in the data distribution . In the context of density modeling , this corresponds to the model ’ s capability to represent arbitrary probability distributions of interest . Even though there exists a long history of literature on universal approximation capability of deep neural networks ( Cybenko , 1989 ; Lu et al. , 2017 ; Lin & Jegelka , 2018 ) , invertible neural networks generally have limited expressivity and can not approximate arbitrary functions . However , for the purpose of approximating a probability distribution , it suffices to show that the distribution induced by a normalizing flow is universal . Among many ways to establish distributional universality of flow based methods ( e.g . Huang et al . 2018 ; 2020b ; Teshima et al . 2020 ; Kong & Chaudhuri 2020 ) , one particular approach is to approximate a deterministic coupling between probability measures . Given a pair of probability densities pX and pY , a deterministic coupling is a mapping g such that g ( X ) ⇠ pY if X ⇠ pX . We seek to find a coupling that is invertible , or at least can be approximated by invertible mappings . Optimal Transport Let c ( x , y ) be a cost function . The Monge problem ( Villani , 2008 ) pertains to finding the optimal transport map g that realizes the minimal expected cost Jc ( pX , pY ) = inf eg : eg ( X ) ⇠pY EX⇠pX [ c ( X , eg ( X ) ) ] ( 2 ) When the second moments of X and Y are both finite , and X is regular enough ( e.g . having a density ) , then the special case of c ( x , y ) = ||x y||2 has an interesting solution , a celebrated theorem due to Brenier ( 1987 ; 1991 ) : Theorem 1 ( Brenier ’ s Theorem , Theorem 1.22 of Santambrogio ( 2015 ) ) . Let µ , ⌫ be probability measures with a finite second moment , and assume µ has a Lebesgue density pX . Then there exists a convex potential G such that the gradient map g : = rG ( defined up to a null set ) uniquely solves the Monge problem in eq . ( 2 ) with the quadratic cost function c ( x , y ) = ||x y||2 . Some recent works are also inspired by Brenier ’ s theorem and utilize a convex potential to parameterize a critic model , starting from Taghvaei & Jalali ( 2019 ) , and further built upon by Makkuva et al . ( 2019 ) who parameterize a generator with a convex potential and concurrently by Korotin et al . ( 2019 ) . Our work sets itself apart from these prior works in that it is entirely likelihood-based , minimizing the ( empirical ) KL divergence as opposed to an approximate optimal transport cost . 3 CONVEX POTENTIAL FLOWS . Given a strictly convex potential F , we can define an injective map ( invertible from its image ) via its gradient f = rF , since the Jacobian of f is the Hessian matrix of F , and is thus positive definite . In this section , we discuss the parameterization of the convex potential F ( 3.1 ) , and then address gradient estimation for CP-Flows ( 3.2 ) . We examine the connection to other parameterization of normalizing flows ( 3.3 ) , and finally rigorously prove universality in the next section . 3.1 MODELING . Input Convex Neural Networks We use L ( x ) to denote a linear layer , and L+ ( x ) to denote a linear layer with positive weights . We use the ( fully ) input-convex neural network ( ICNN , Amos et al . ( 2017 ) ) to parameterize the convex potential , which has the following form F ( x ) = L+ K+1 ( s ( zK ) ) + LK+1 ( x ) zk : = L + k ( s ( zk 1 ) ) + Lk ( x ) z1 : = L1 ( x ) where s is a non-decreasing , convex activation function . In this work , we use softplus-type activation functions , which is a rich family of activation functions that can be shown to uniformly approximate the ReLU activation . See Appendix B for details . Algorithm 1 Inverting CP-Flow . 1 : procedure INVERT ( F , y , CvxSolver ) 2 : Initialize x y 3 : def closure ( ) : 4 : Compute loss : l F ( x ) y > x 5 : return l 6 : x CvxSolver ( closure , x ) 7 : return x Invertibility and Inversion Procedure If the activation s is twice differentiable , then the Hessian HF is positive semi-definite . We can make it strongly convex by adding a quadratic term F↵ ( x ) = ↵ 2 ||x|| 2 2 + F ( x ) , such that HF↵ ⌫ ↵I 0 . This means the gradient map f↵ = rF↵ is injective onto its image . Furthermore , it is surjective since for any y 2 Rd , the potential x 7 ! F↵ ( x ) y > x has a unique minimizer1 satisfying the first order condition rF↵ ( x ) = y , due to the strong convexity and differentiability . We refer to this invertible mapping f↵ as the convex potential flow , or the CP-Flow . The above discussion also implies we can plug in a black-box convex solver to invert the gradient map f↵ , which we summarize in Algorithm 1 . Inverting a batch of independent inputs is as simple as summing the convex potential over all inputs : since all of the entries of the scalar l in the minibatch are independent of each other , computing the gradient all l ’ s wrt all x ’ s amounts to computing the gradient of the summation of l ’ s wrt all x ’ s . Due to the convex nature of the problem , a wide selection of algorithms can be used with convergence guarantees ( Nesterov , 1998 ) . In practice , we use the L-BFGS algorithm ( Byrd et al. , 1995 ) as our CvxSolver . 1The minimizer x⇤ corresponds to the gradient map of the convex conjugate of the potential . See Appendix A for a formal discussion . Estimating Log Probability Following equation ( 1 ) , computing the log density for CP-Flows requires taking the log determinant of a symmetric positive definite Jacobian matrix ( as it is the Hessian of the potential ) . There exists numerous works on estimating spectral densities ( e.g . TalEzer & Kosloff , 1984 ; Silver & Röder , 1994 ; Han et al. , 2018 ; Adams et al. , 2018 ) , of which this quantity is a special case . See Lin et al . ( 2016 ) for an overview of methods that only require access to Hessian-vector products . Hessian-vector products ( hvp ) are cheap to compute with reverse-mode automatic differentiation ( Baydin et al. , 2017 ) , which does not require constructing the full Hessian matrix and has the same asymptotic cost as evaluating F↵ . In particular , the log determinant can be rewritten in the form of a generalized trace tr logH . Chen et al . ( 2019a ) limit the spectral norm ( i.e . eigenvalues ) of H and directly use the Taylor expansion of the matrix logarithm . Since our H has unbounded eigenvalues , we use a more complex algorithm designed for symmetric matrices , the stochastic Lanczos quadrature ( SLQ ; Ubaru et al. , 2017 ) . At the core of SLQ is the Lanczos method , which computes m eigenvalues of H by first constructing a symmetric tridiagonal matrix T 2 Rm⇥m and computing the eigenvalues of T . The Lanczos procedure only requires Hessian-vector products , and it can be combined with a stochastic trace estimator to provide a stochastic estimate of our log probability . We chose SLQ because it has shown theoretically and empirically to have low variance ( Ubaru et al. , 2017 ) . 3.2 O ( 1 ) -MEMORY UNBIASED r log detH ESTIMATOR We would also like to have an estimator for the gradient of the log determinant to enable variants of stochastic gradient descent for optimization . Unfortunately , directly backpropagating through the log determinant estimator is not ideal . Two major drawbacks of directly differentiating through SLQ are that it requires ( i ) differentiating through an eigendecomposition routine and ( ii ) storing all Hessian-vector products in memory ( see fig . 2 ) . Problem ( i ) is more specific to SLQ , because the gradient of an eigendecomposition is not defined when the eigenvalues are not unique ( Seeger et al. , 2017 ) . Consequently , we have empirically observed that differentiating through SLQ can be unstable , frequently resulting in NaNs due to the eigendecomposition . Problem ( ii ) will hold true for other algorithms that also estimate log detH with Hessian-vector products , and generally the only difference is that a different numerical routine would need to be differentiated through . Due to these problems , we do not differentiate through SLQ , but we still use it as an efficient method for monitoring training progress . Instead , it is possible to construct an alternative formulation of the gradient as the solution of a convex optimization problem , foregoing the necessity of differentiating through an estimation routine of the log determinant . We adapt the gradient formula from Chen et al . ( 2019a , Appendix C ) to the context of convex potentials . Using Jacobi ’ s formula⇤ and the adjugate representation of the matrix inverse† , for any invertible matrix H with parameter ✓ , we have the following identity : @ @ ✓ log detH = 1detH @ @ ✓ detH ⇤ = 1detH tr adj ( H ) @ H @ ✓ † = tr H 1 @ H @ ✓ = Ev ⇥ v > H 1 @ H @ ✓ v ⇤ . ( 3 ) Notably , in the last equality , we used the Hutchinson trace estimator ( Hutchinson , 1989 ) with a Rademacher random vector v , leading to a O ( 1 ) -memory , unbiased Monte Carlo gradient estimator . Computing the quantity v > H 1 in eq . ( 3 ) by constructing and inverting the full Hessian requires d calls to an automatic differentiation routine and is too costly for our purposes . However , we can recast this quantity as the solution of a quadratic optimization problem argmin z ⇢ 1 2 z > Hz v > z ( 4 ) which has the unique minimizer z⇤ = H 1v since H is symmetric positive definite . Algorithm 2 Surrogate training objective . 1 : procedure SURROGATEOBJ ( F , x , CG ) 2 : Obtain the gradient f ( x ) , rxF ( x ) 3 : Sample Rademacher random vector r 4 : def hvp ( v ) : 5 : return v > @ @ x f ( x ) 6 : z stop gradient ( CG ( hvp , r ) ) 7 : return hvp ( z ) > r We use the conjugate gradient ( CG ) method , which is specifically designed for solving the unconstrained optimization problems in eq . ( 4 ) with symmetric positive definite H . It uses only Hessian-vector products and is straightforward to parallelize . Conjugate gradient is guaranteed to return the exact solution z⇤ within d iterations , and the error of the approximation is known to converge exponentially fast ||zm z⇤||H 2 m||z0 z⇤||H , where zm is the estimate after m iterations . The rate of convergence < 1 relates to the condition number of H . For more details , see Nocedal & Wright ( 2006 , Ch . 5 ) . In practice , we terminate CG when ||Hzm v||1 < ⌧ is satisfied for some user-controlled tolerance . Empirically , we find that stringent tolerance values are unnecessary for stochastic optimization ( see appendix F ) . Estimating the full quantity in eq . ( 3 ) is then simply a matter of computing and differentiating a scalar quantity ( a surrogate objective ) involving another Hessian-vector product : d d✓ ( zm ) > Hv , where only H is differentiated through ( since zm is only used to approximate v > H 1 as a modifier of the gradient ) . We summarize this procedure in Algorithm 2 . Similar to inversion , the hvp can also be computed in batch by summing over the data index , since all entries are independent . | The authors introduce CP-Flows, a way to parameterize normalizing flows by constructing an input-convex neural net with softplus-type activation functions and considering its gradient as the flow. They add a quadratic term to ensure invertibility. Using convex optimization techniques their method only needs access to convex optimization solvers. They show that this architecture is universal (that is, starting from a measure $\mu$, there is a sequence of CP-Flows converging weakly to a desired distribution $\nu$). They also prove that the constructed flow converges pointwise to the optimal Brenier map for Euclidean cost. They perform a set of experiments on synthetic and real-world datasets, and show their method delivers its promises. | SP:00578dd55a640c10dbf22f647b736e49f6ee3c32 |
Multi-Prize Lottery Ticket Hypothesis: Finding Accurate Binary Neural Networks by Pruning A Randomly Weighted Network | Recently , Frankle & Carbin ( 2019 ) demonstrated that randomly-initialized dense networks contain subnetworks that once found can be trained to reach test accuracy comparable to the trained dense network . However , finding these high performing trainable subnetworks is expensive , requiring iterative process of training and pruning weights . In this paper , we propose ( and prove ) a stronger Multi-Prize Lottery Ticket Hypothesis : A sufficiently over-parameterized neural network with random weights contains several subnetworks ( winning tickets ) that ( a ) have comparable accuracy to a dense target network with learned weights ( prize 1 ) , ( b ) do not require any further training to achieve prize 1 ( prize 2 ) , and ( c ) is robust to extreme forms of quantization ( i.e. , binary weights and/or activation ) ( prize 3 ) . This provides a new paradigm for learning compact yet highly accurate binary neural networks simply by pruning and quantizing randomly weighted full precision neural networks . We also propose an algorithm for finding multi-prize tickets ( MPTs ) and test it by performing a series of experiments on CIFAR-10 and ImageNet datasets . Empirical results indicate that as models grow deeper and wider , multi-prize tickets start to reach similar ( and sometimes even higher ) test accuracy compared to their significantly larger and full-precision counterparts that have been weight-trained . Without ever updating the weight values , our MPTs-1/32 not only set new binary weight network state-of-the-art ( SOTA ) Top-1 accuracy – 94.8 % on CIFAR-10 and 74.03 % on ImageNet – but also outperform their full-precision counterparts by 1.78 % and 0.76 % , respectively . Further , our MPT-1/1 achieves SOTA Top-1 accuracy ( 91.9 % ) for binary neural networks on CIFAR-10 . Code and pre-trained models are available at : https : //github.com/chrundle/biprop . 1 INTRODUCTION . Deep learning ( DL ) has made a significant breakthroughs in a wide range of applications ( Goodfellow et al. , 2016 ) . These performance improvements can be attributed to the significant growth in the model size and the availability of massive computational resources to train such models . Therefore , these gains have come at the cost of large memory consumption , high inference time , and increased power consumption . This not only limits the potential applications where DL can make an impact but also have some serious consequences , such as , ( a ) generating huge carbon footprint , and ( b ) creating roadblocks to the democratization of AI . Note that significant parameter redundancy and a large number of floating-point operations are key factors incurring the these costs . Thus , for discarding the redundancy from DNNs , one can either ( a ) Prune : remove non-essential connections from an existing dense network , or ( b ) Quantize : constrain the full-precision ( FP ) weight and activation values to a set of discrete values which allows them to be represented using fewer bits . Further , one can exploit the complementary nature of pruning and quantization to combine their strengths . Although pruning and quantization1 are typical approaches used for compressing DNNs ( Neill , 2020 ) , it is not clear under what conditions and to what extent compression can be achieved without sacrificing the accuracy . The most extreme form of quanitization is binarization , where weights and/or activations can only have two possible values , namely−1 ( 0 ) or +1 ( the interest of this paper ) . In addition to saving memory , binarization results in more power efficient networks with significant computation acceleration since expensive multiply-accumulate operations ( MACs ) can be replaced by cheap XNOR and bit-counting operations ( Qin et al. , 2020a ) . In light of these benefits , it is of interest to question if conditions exists such that a binarized DNN can be pruned to achieve accuracy comparable to the dense FP DNN . More importantly , even if these favourable conditions are met then how do we find these extremely compressed ( or compact ) and highly accurate subnetworks ? Traditional pruning schemes have shown that a pretrained DNN can be pruned without a significant loss in the performance . Recently , ( Frankle & Carbin , 2019 ) made a breakthrough by showing that dense network contain sparse subnetworks that can match the performance of the original network when trained from scratch with weights being reset to their initialization ( Lottery Ticket Hypothesis ) . Although the original approach to find these subnetworks still required training the dense network , some efforts ( Wang et al. , 2020b ; You et al. , 2019 ; Wang et al. , 2020a ) have been carried out to overcome this limitation . Recently a more intriguing phenomenon has been reported – a dense network with random initialization contains subnetworks that achieve high accuracy , without any further training ( Zhou et al. , 2019 ; Ramanujan et al. , 2020 ; Malach et al. , 2020 ; Orseau et al. , 2020 ) . These trends highlight good progress being made towards efficiently and accurately pruning DNNs . In contrast to these positive developments for pruning , results on binarizing DNNs have been mostly negative . To the best of our knowledge , post-training schemes have not been successful in binarizing pretrained models without retraining . Even with training binary neural networks ( BNNs ) from scratch ( though inefficient ) , the community has not been able to make BNNs achieve comparable results to their full precision counterparts . The main reason being that network structures and weight optimization techniques are predominantly developed for full precision DNNs and may not be suitable for training BNNs . Thus , closing the gap in accuracy between the full precision and the binarized version may require a paradigm shift . Furthermore , this also makes one wonder if efficiently and accurately binarizing DNNs similar to the recent trends in pruning is ever feasible . In this paper , we show that a randomly initialized dense network contains extremely sparse binary subnetworks that without any weight training ( i.e. , efficient ) have comparable performance to their trained dense and full-precision counterparts ( i.e. , accurate ) . Based on this , we state our hypothesis : Multi-Prize Lottery Ticket Hypothesis . A sufficiently over-parameterized neural network with random weights contains several subnetworks ( winning tickets ) that ( a ) have comparable accuracy to a dense target network with learned weights ( prize 1 ) , ( b ) do not require any further training to achieve prize 1 ( prize 2 ) , and ( c ) is robust to extreme forms of quantization ( i.e. , binary weights and/or activation ) ( prize 3 ) . Contributions . First , we propose the multi-prize lottery ticket hypothesis as a new perspective on finding neural networks with drastically reduced memory size , much faster test-time inference and 1A detailed discussion on related work on pruning and quantization is provided in Appendix F. lower power consumption compared to their dense and full-precision counterparts . Next , we provide theoretical evidence of the existence of highly accurate binary subnetworks within a randomly weighted DNN ( i.e. , proving the multi-prize lottery ticket hypothesis ) . Specifically , we mathematically prove that we can find an ε-approximation of a fully-connected ReLU DNN with width n and depth ` using a sparse binary-weight DNN of sufficient width . Our proof indicates that this can be accomplished by pruning and binarizing the weights of a randomly weighted neural network that is a factor O ( n3/2 ` /ε ) wider and 2 ` deeper . To the best of our knowledge , this is the first theoretical work proving the existence of highly accurate binary subnetworks within a sufficiently overparameterized randomly initialized neural network . Finally , we provide biprop ( binarize-prune optimizer ) in Algorithm 1 to identify MPTs within randomly weighted DNNs and empirically test our hypothesis . This provides a completely new way to learn BNNs without relying on weight-optimization . Results . We explore two variants of multi-prize tickets – one with binary weights ( MPT-1/32 ) and other with binary weights and activation ( MPT-1/1 ) where x/y denotes x and y bits to represent weights and activation , respectively . MPTs we find have 60 − 80 % fewer parameters than the original network . We perform a series of experiments on on small and large scale datasets for image recognition , namely CIFAR-10 ( Krizhevsky et al. , 2009 ) and ImageNet ( Deng et al. , 2009 ) . On CIFAR-10 , we test the performance of multi-prize tickets against the trend of making the model deeper and wider . We found that as models grow deeper and wider , both variants of multi-prize tickets start to reach similar ( and sometimes even higher ) test accuracy compared to the dense and full precision original network with learned weights . In other words , the performance of multiprize tickets improves with the amount of redundancy in the original network . We also carry out experiments with state-of-the-art ( SOTA ) architectures on CIFAR-10 and ImageNet datasets with an aim to investigate their redundancy . We find that within most randomly weighted SOTA DNNs reside extremely compact ( i.e. , sparse and binary ) subnetworks which are smaller than , but match the performance of trained target dense and full precision networks . Furthermore , with minimal hyperparameter tuning , our MPTs achieve Top-1 accuracy comparable to ( or higher than ) SOTA BNNs . The performance of MPTs is further improved by allowing the parameters in BatchNorm layer to be learned . Finally , on both CIFAR-10 and ImageNet , MPT-1/32 subnetworks outperform their significantly larger and full-precision counterparts that have been weight-trained . 2 MULTI-PRIZE LOTTERY TICKETS : THEORY AND ALGORITHMS . We first prove the existence of MPTs in an overparameterized randomly weighted DNN . For ease of presentation , we state an informal version of Theorem 2 which can be found in Appendix B . We then explore two variants of tickets ( MPT-1/32 and MPT-1/1 ) and provide an algorithm to find them . 2.1 PROVING THE MULTI-PRIZE LOTTERY TICKETS HYPOTHESIS . In this section we seek to answer the following question : What is the required amount of overparameterization such that a randomly weighted neural network can be compressed to a sparse binary subnetwork that approximates a dense trained target network ? Theorem 1 . ( Informal Statement of Theorem 2 ) Let ε , δ > 0 . For every fully-connected ( FC ) target network with ReLU activations of depth ` and width n with bounded weights , a random binary FC network with ReLU activations of depth 2 ` and width O ( ( ` n3/2/ε ) + ` n log ( ` n/δ ) ) contains with probability ( 1− δ ) a binary subnetwork that approximates the target network with error at most ε . Sketch of Proof . Consider a FC ReLU network F ( x ) = W ( ` ) σ ( W ( ` −1 ) · · ·σ ( W ( 1 ) x ) ) , where σ ( x ) = max { 0 , x } , x ∈ Rd , W ( i ) ∈ Rki×ki−1 , k0 = d , and i ∈ [ ` ] . Additionally , consider a FC network with binary weights given by G ( x ) = B ( ` ′ ) σ ( B ( ` ′−1 ) · · ·σ ( B ( 1 ) x ) ) , where B ( i ) ∈ { −1 , +1 } k ′ i×k ′ i−1 , k′0 = d , and i ∈ [ ` ′ ] . Our goal is to determine a lower bound on the depth , ` ′ , and the widths , { k′i } ` ′ i=1 , such that with probability ( 1− δ ) the network G ( x ) contains a subnetwork G̃ ( x ) satisfying ‖G̃ ( x ) − F ( x ) ‖ ≤ ε , for any ε > 0 and δ ∈ ( 0 , 1 ) . We first establish lower bounds on the width of a network of the form g ( x ) = B ( 2 ) σ ( B ( 1 ) x ) such that with probability ( 1 − δ′ ) there exists a subnetwork g̃ ( x ) of g ( x ) s.t . ‖g̃ ( x ) − σ ( Wx ) ‖ ≤ ε′ , for any ε′ > 0 and δ′ ∈ ( 0 , 1 ) . This process is carried out in detail in Lemmas 1 , 2 , and 3 in Appendix B . We have now approximated a single layer FC real-valued network using a subnetwork of a two-layer FC binary network . Hence , we can take ` ′ = 2 ` and Lemma 3 provides lower bounds on the width of each intermediate layer such that with probability ( 1 − δ ) there exists a subnetwork G̃ ( x ) of G ( x ) satisfying ‖G̃ ( x ) − F ( x ) ‖ ≤ ε . This is accomplished in Theorem 2 in Appendix B . To the best of our knowledge this is the first theoretical result proving that a sparse binary-weight DNN that can approximate a real-valued target DNN . As it has been established that real-valued DNNs are universal approximators ( Scarselli & Tsoi , 1998 ) , our result carries the implication that sparse binary-weight DNNs are also universal approximators . In relation to the first result establishing the existence of real-valued subnetworks in a randomly weighted DNN approximating a realvalued target DNN ( Malach et al. , 2020 ) , the lower bound on the width established in Theorem 2 is better than their lower bound of O ( ` 2n2 log ( ` n/δ ) /ε2 ) . | The paper proposes an innovate method based on lottery ticket hypothesis to prune a BNN (parameters are only -1(0) and +1, it can be viewed as an extreme case of quantization) from a dense NN. It focuses on learning a mask to prune the NN instead of the traditional method (pruning on an already trained network). In addition, not only experiments but theortical proof are given and have a highly brief result. | SP:34c5488e2ff0ef69e35e7000998cd1f105774c33 |
Multi-Prize Lottery Ticket Hypothesis: Finding Accurate Binary Neural Networks by Pruning A Randomly Weighted Network | Recently , Frankle & Carbin ( 2019 ) demonstrated that randomly-initialized dense networks contain subnetworks that once found can be trained to reach test accuracy comparable to the trained dense network . However , finding these high performing trainable subnetworks is expensive , requiring iterative process of training and pruning weights . In this paper , we propose ( and prove ) a stronger Multi-Prize Lottery Ticket Hypothesis : A sufficiently over-parameterized neural network with random weights contains several subnetworks ( winning tickets ) that ( a ) have comparable accuracy to a dense target network with learned weights ( prize 1 ) , ( b ) do not require any further training to achieve prize 1 ( prize 2 ) , and ( c ) is robust to extreme forms of quantization ( i.e. , binary weights and/or activation ) ( prize 3 ) . This provides a new paradigm for learning compact yet highly accurate binary neural networks simply by pruning and quantizing randomly weighted full precision neural networks . We also propose an algorithm for finding multi-prize tickets ( MPTs ) and test it by performing a series of experiments on CIFAR-10 and ImageNet datasets . Empirical results indicate that as models grow deeper and wider , multi-prize tickets start to reach similar ( and sometimes even higher ) test accuracy compared to their significantly larger and full-precision counterparts that have been weight-trained . Without ever updating the weight values , our MPTs-1/32 not only set new binary weight network state-of-the-art ( SOTA ) Top-1 accuracy – 94.8 % on CIFAR-10 and 74.03 % on ImageNet – but also outperform their full-precision counterparts by 1.78 % and 0.76 % , respectively . Further , our MPT-1/1 achieves SOTA Top-1 accuracy ( 91.9 % ) for binary neural networks on CIFAR-10 . Code and pre-trained models are available at : https : //github.com/chrundle/biprop . 1 INTRODUCTION . Deep learning ( DL ) has made a significant breakthroughs in a wide range of applications ( Goodfellow et al. , 2016 ) . These performance improvements can be attributed to the significant growth in the model size and the availability of massive computational resources to train such models . Therefore , these gains have come at the cost of large memory consumption , high inference time , and increased power consumption . This not only limits the potential applications where DL can make an impact but also have some serious consequences , such as , ( a ) generating huge carbon footprint , and ( b ) creating roadblocks to the democratization of AI . Note that significant parameter redundancy and a large number of floating-point operations are key factors incurring the these costs . Thus , for discarding the redundancy from DNNs , one can either ( a ) Prune : remove non-essential connections from an existing dense network , or ( b ) Quantize : constrain the full-precision ( FP ) weight and activation values to a set of discrete values which allows them to be represented using fewer bits . Further , one can exploit the complementary nature of pruning and quantization to combine their strengths . Although pruning and quantization1 are typical approaches used for compressing DNNs ( Neill , 2020 ) , it is not clear under what conditions and to what extent compression can be achieved without sacrificing the accuracy . The most extreme form of quanitization is binarization , where weights and/or activations can only have two possible values , namely−1 ( 0 ) or +1 ( the interest of this paper ) . In addition to saving memory , binarization results in more power efficient networks with significant computation acceleration since expensive multiply-accumulate operations ( MACs ) can be replaced by cheap XNOR and bit-counting operations ( Qin et al. , 2020a ) . In light of these benefits , it is of interest to question if conditions exists such that a binarized DNN can be pruned to achieve accuracy comparable to the dense FP DNN . More importantly , even if these favourable conditions are met then how do we find these extremely compressed ( or compact ) and highly accurate subnetworks ? Traditional pruning schemes have shown that a pretrained DNN can be pruned without a significant loss in the performance . Recently , ( Frankle & Carbin , 2019 ) made a breakthrough by showing that dense network contain sparse subnetworks that can match the performance of the original network when trained from scratch with weights being reset to their initialization ( Lottery Ticket Hypothesis ) . Although the original approach to find these subnetworks still required training the dense network , some efforts ( Wang et al. , 2020b ; You et al. , 2019 ; Wang et al. , 2020a ) have been carried out to overcome this limitation . Recently a more intriguing phenomenon has been reported – a dense network with random initialization contains subnetworks that achieve high accuracy , without any further training ( Zhou et al. , 2019 ; Ramanujan et al. , 2020 ; Malach et al. , 2020 ; Orseau et al. , 2020 ) . These trends highlight good progress being made towards efficiently and accurately pruning DNNs . In contrast to these positive developments for pruning , results on binarizing DNNs have been mostly negative . To the best of our knowledge , post-training schemes have not been successful in binarizing pretrained models without retraining . Even with training binary neural networks ( BNNs ) from scratch ( though inefficient ) , the community has not been able to make BNNs achieve comparable results to their full precision counterparts . The main reason being that network structures and weight optimization techniques are predominantly developed for full precision DNNs and may not be suitable for training BNNs . Thus , closing the gap in accuracy between the full precision and the binarized version may require a paradigm shift . Furthermore , this also makes one wonder if efficiently and accurately binarizing DNNs similar to the recent trends in pruning is ever feasible . In this paper , we show that a randomly initialized dense network contains extremely sparse binary subnetworks that without any weight training ( i.e. , efficient ) have comparable performance to their trained dense and full-precision counterparts ( i.e. , accurate ) . Based on this , we state our hypothesis : Multi-Prize Lottery Ticket Hypothesis . A sufficiently over-parameterized neural network with random weights contains several subnetworks ( winning tickets ) that ( a ) have comparable accuracy to a dense target network with learned weights ( prize 1 ) , ( b ) do not require any further training to achieve prize 1 ( prize 2 ) , and ( c ) is robust to extreme forms of quantization ( i.e. , binary weights and/or activation ) ( prize 3 ) . Contributions . First , we propose the multi-prize lottery ticket hypothesis as a new perspective on finding neural networks with drastically reduced memory size , much faster test-time inference and 1A detailed discussion on related work on pruning and quantization is provided in Appendix F. lower power consumption compared to their dense and full-precision counterparts . Next , we provide theoretical evidence of the existence of highly accurate binary subnetworks within a randomly weighted DNN ( i.e. , proving the multi-prize lottery ticket hypothesis ) . Specifically , we mathematically prove that we can find an ε-approximation of a fully-connected ReLU DNN with width n and depth ` using a sparse binary-weight DNN of sufficient width . Our proof indicates that this can be accomplished by pruning and binarizing the weights of a randomly weighted neural network that is a factor O ( n3/2 ` /ε ) wider and 2 ` deeper . To the best of our knowledge , this is the first theoretical work proving the existence of highly accurate binary subnetworks within a sufficiently overparameterized randomly initialized neural network . Finally , we provide biprop ( binarize-prune optimizer ) in Algorithm 1 to identify MPTs within randomly weighted DNNs and empirically test our hypothesis . This provides a completely new way to learn BNNs without relying on weight-optimization . Results . We explore two variants of multi-prize tickets – one with binary weights ( MPT-1/32 ) and other with binary weights and activation ( MPT-1/1 ) where x/y denotes x and y bits to represent weights and activation , respectively . MPTs we find have 60 − 80 % fewer parameters than the original network . We perform a series of experiments on on small and large scale datasets for image recognition , namely CIFAR-10 ( Krizhevsky et al. , 2009 ) and ImageNet ( Deng et al. , 2009 ) . On CIFAR-10 , we test the performance of multi-prize tickets against the trend of making the model deeper and wider . We found that as models grow deeper and wider , both variants of multi-prize tickets start to reach similar ( and sometimes even higher ) test accuracy compared to the dense and full precision original network with learned weights . In other words , the performance of multiprize tickets improves with the amount of redundancy in the original network . We also carry out experiments with state-of-the-art ( SOTA ) architectures on CIFAR-10 and ImageNet datasets with an aim to investigate their redundancy . We find that within most randomly weighted SOTA DNNs reside extremely compact ( i.e. , sparse and binary ) subnetworks which are smaller than , but match the performance of trained target dense and full precision networks . Furthermore , with minimal hyperparameter tuning , our MPTs achieve Top-1 accuracy comparable to ( or higher than ) SOTA BNNs . The performance of MPTs is further improved by allowing the parameters in BatchNorm layer to be learned . Finally , on both CIFAR-10 and ImageNet , MPT-1/32 subnetworks outperform their significantly larger and full-precision counterparts that have been weight-trained . 2 MULTI-PRIZE LOTTERY TICKETS : THEORY AND ALGORITHMS . We first prove the existence of MPTs in an overparameterized randomly weighted DNN . For ease of presentation , we state an informal version of Theorem 2 which can be found in Appendix B . We then explore two variants of tickets ( MPT-1/32 and MPT-1/1 ) and provide an algorithm to find them . 2.1 PROVING THE MULTI-PRIZE LOTTERY TICKETS HYPOTHESIS . In this section we seek to answer the following question : What is the required amount of overparameterization such that a randomly weighted neural network can be compressed to a sparse binary subnetwork that approximates a dense trained target network ? Theorem 1 . ( Informal Statement of Theorem 2 ) Let ε , δ > 0 . For every fully-connected ( FC ) target network with ReLU activations of depth ` and width n with bounded weights , a random binary FC network with ReLU activations of depth 2 ` and width O ( ( ` n3/2/ε ) + ` n log ( ` n/δ ) ) contains with probability ( 1− δ ) a binary subnetwork that approximates the target network with error at most ε . Sketch of Proof . Consider a FC ReLU network F ( x ) = W ( ` ) σ ( W ( ` −1 ) · · ·σ ( W ( 1 ) x ) ) , where σ ( x ) = max { 0 , x } , x ∈ Rd , W ( i ) ∈ Rki×ki−1 , k0 = d , and i ∈ [ ` ] . Additionally , consider a FC network with binary weights given by G ( x ) = B ( ` ′ ) σ ( B ( ` ′−1 ) · · ·σ ( B ( 1 ) x ) ) , where B ( i ) ∈ { −1 , +1 } k ′ i×k ′ i−1 , k′0 = d , and i ∈ [ ` ′ ] . Our goal is to determine a lower bound on the depth , ` ′ , and the widths , { k′i } ` ′ i=1 , such that with probability ( 1− δ ) the network G ( x ) contains a subnetwork G̃ ( x ) satisfying ‖G̃ ( x ) − F ( x ) ‖ ≤ ε , for any ε > 0 and δ ∈ ( 0 , 1 ) . We first establish lower bounds on the width of a network of the form g ( x ) = B ( 2 ) σ ( B ( 1 ) x ) such that with probability ( 1 − δ′ ) there exists a subnetwork g̃ ( x ) of g ( x ) s.t . ‖g̃ ( x ) − σ ( Wx ) ‖ ≤ ε′ , for any ε′ > 0 and δ′ ∈ ( 0 , 1 ) . This process is carried out in detail in Lemmas 1 , 2 , and 3 in Appendix B . We have now approximated a single layer FC real-valued network using a subnetwork of a two-layer FC binary network . Hence , we can take ` ′ = 2 ` and Lemma 3 provides lower bounds on the width of each intermediate layer such that with probability ( 1 − δ ) there exists a subnetwork G̃ ( x ) of G ( x ) satisfying ‖G̃ ( x ) − F ( x ) ‖ ≤ ε . This is accomplished in Theorem 2 in Appendix B . To the best of our knowledge this is the first theoretical result proving that a sparse binary-weight DNN that can approximate a real-valued target DNN . As it has been established that real-valued DNNs are universal approximators ( Scarselli & Tsoi , 1998 ) , our result carries the implication that sparse binary-weight DNNs are also universal approximators . In relation to the first result establishing the existence of real-valued subnetworks in a randomly weighted DNN approximating a realvalued target DNN ( Malach et al. , 2020 ) , the lower bound on the width established in Theorem 2 is better than their lower bound of O ( ` 2n2 log ( ` n/δ ) /ε2 ) . | The authors propose a stronger lottery ticket hypothesis in this paper – the multi-prize lottery ticket hypothesis. In particular, the new hypothesis seeks answer to the required amount of over-parameterization for a randomly initialized network to become able to compress to a sparse untrained binary subnetwork with on-par accuracy. The authors prove the existence of such subnetwork and show the bounds on over-parameterization. The paper proposes new methods to get the binary-weight tickets and the binary-activation tickets, where binary-weight tickets are subnetworks with weights as binary, and binary-activation tickets have the activation function in the forward propagation as binary. As binary networks can largely reduce the computational complexity for inference, this work has practical importance especially for applications with constraints for memory and power. The paper has many simulation results to support the theoretical guarantees, and the proposed approach on binary-weight networks has advantages over existing methods. | SP:34c5488e2ff0ef69e35e7000998cd1f105774c33 |
Fully Unsupervised Diversity Denoising with Convolutional Variational Autoencoders | 1 INTRODUCTION . The goal of scientific image analysis is to analyze pixel-data and measure the properties of objects of interest in images . Pixel intensities are subject to undesired noise and other distortions , motivating an initial preprocessing step called image restoration . Image restoration is the task of removing unwanted noise and distortions , giving us clean images that are closer to the true but unknown signal . In the past years , Deep Learning ( DL ) has enabled tremendous progress in image restoration ( Mao et al. , 2016 ; Zhang et al. , 2017b ; Zhang et al. , 2017 ; Weigert et al. , 2018 ) . Supervised DL methods use corresponding pairs of clean and distorted images to learn a mapping between the two quality levels . The utility of this approach is especially pronounced for microscopy image data of biological samples ( Weigert et al. , 2017 ; 2018 ; Ouyang et al. , 2018 ; Wang et al. , 2019 ) , where quantitative downstream analysis is essential . More recently , unsupervised content-aware image restoration ˚Shared first authors . : Shared last authors . ( CARE ) methods ( Lehtinen et al. , 2018 ; Krull et al. , 2019 ; Batson & Royer , 2019 ; Buchholz et al. , 2019 ) have emerged . They can , enabled by sensible assumptions about the statistics of imaging noise , learn a mapping from noisy to clean images , without ever seeing clean data during training . Some of these methods additionally include a probabilistic model of the imaging noise ( Krull et al. , 2020 ; Laine et al. , 2019 ; Prakash et al. , 2020 ; Khademi et al. , 2020 ) to further improve their performance . Note that such denoisers can directly be trained on a given body of noisy images . All existing approaches have a common flaw : distortions degrade some of the information content in images , generally making it impossible to fully recover the desired clean signal with certainty . Even an ideal method can not know which of many possible clean images really has given rise to the degraded observation at hand . Hence , any restoration method has to make a compromise between possible solutions when predicting a restored image . Generative models , such as VAEs , are a canonical choice when a distribution over a set of variables needs to be learned . Still , so far VAEs have been overlooked as a method to solve unsupervised image denoising problems . This might also be due to the fact that vanilla VAEs ( Kingma & Welling , 2014 ; Rezende et al. , 2014 ) show sub-par performance on denoising problems ( see Section 6 ) . Here we introduce DIVNOISING , a principled approach to incorporate explicit models of the imaging noise distribution in the decoder of a VAE . Such noise models can be either measured or derived ( bootstrapped ) from the noisy image data alone ( Krull et al. , 2020 ; Prakash et al. , 2020 ) . Additionally we propose a way to co-learn a suitable noise model during training , rendering DIVNOISING fully unsupervised . We show on 13 datasets that fully convolutional VAEs , trained with our proposed DIVNOISING framework , yield competitive results , in 8 cases actually becoming the new state-ofthe-art ( see Fig . 2 and Table 1 ) . Still , the key benefit of DIVNOISING is that the method does not need to commit to a single prediction , but is instead capable of generating diverse samples from an approximate posterior of possible true signals . ( Note that point estimates can still be inferred if desired , as shown in Fig . 4 . ) Other unsupervised denoising methods only provide a single solution ( point estimate ) of that posterior ( Krull et al. , 2019 ; Lehtinen et al. , 2018 ; Batson & Royer , 2019 ) or predict an independent posterior distribution of intensities per pixel ( Krull et al. , 2020 ; Laine et al. , 2019 ; Prakash et al. , 2020 ; Khademi et al. , 2020 ) . Hence , DIVNOISING is the first method that learns to approximate the posterior over meaningful structures in a given body of images . We believe that DIVNOISING will be hugely beneficial for computational biology applications in biomedical imaging , where noise is typically unavoidable and huge datasets need to be processed on a daily basis . Here , DIVNOISING enables unsupervised diverse SOTA denoising while requiring only comparatively little computational resources , rendering our approach particularly practical . Finally , we discuss the utility of diverse denoising results for OCR and showcase it for a ubiquitous analysis task in biology – the instance segmentation of cells in microscopy images ( see Fig . 5 ) . Hence , DIVNOISING has the potential to be useful for many real-world applications and will not only generate state-of-the-art ( SOTA ) restored images , but also enrich quantitative downstream processing . 2 RELATED WORK . Classical Denoising . The denoising problem has been addressed by a variety of filtering approaches . Arguably some of the most prominent ones are Non-Local Means ( Buades et al. , 2005 ) and BM3D ( Dabov et al. , 2007 ) , which implement a sophisticated non-local filtering scheme . A comprehensive survey and in-depth discussion of such methods can be found in ( Milanfar , 2012 ) . DL Based Denoising . Deep Learning methods which directly learn a mapping from a noisy image to its clean counterpart ( see e.g . ( Zhang et al. , 2017a ) and ( Weigert et al. , 2018 ) ) have outperformed classical denoising methods in recent years . Two well known contributions are the seminal works by Zhang et al . ( 2017a ) and later by Weigert et al . ( 2018 ) . More recently , a number of unsupervised variations have been proposed , and in Section 1 we have described their advantages and disadvantages in detail . One additional interesting contribution was made by Ulyanov et al . ( 2018 ) , introducing a quite different kind of unsupervised restoration approach . Their method , Deep Image Prior , trains a network separately for each noisy input image in the training set , making this approach computationally rather expensive . Furthermore , training has to be stopped after a suitable but a priori unknown number of training steps . Recently , Quan et al . ( 2020 ) proposed an interesting method called SELF2SELF which trains a U-NET like architecture requiring only single noisy images . The key idea of this approach is to use blind spot masking , similar to Krull et al . ( 2019 ) , together with dropout ( Srivastava et al. , 2014 ) , which avoids overfitting and allows sampling of diverse solutions . Similar to DIVNOISING , the single denoised result is obtained by averaging many diverse predictions . Diverse results obtained via dropout are generally considered to capture the so called epistemic or model uncertainty ( Gal & Ghahramani , 2016 ; Lakshminarayanan et al. , 2017 ) , i.e . the uncertainty arising from the fact that we have a limited amount of training data available . In contrast , DIVNOISING combines a VAE and a model of the imaging noise to capture what is known as aleatoric or data uncertainty ( Böhm et al. , 2019 ; Sensoy et al. , 2020 ) , i.e . the unavoidable uncertainty about the true signal resulting from noisy measurements . Like in Ulyanov et al . ( 2018 ) , also SELF2SELF trains separately on each image that has to be denoised . While this renders the method universally applicable , it is computationally prohibitive when applied to large datasets . The same is true for real time applications such as facial denoising . DIVNOISING , on the other hand , is trained only once on a given body of data . Afterwards , it can be efficiently applied to new images . A detailed comparison of SELF2SELF and DIVNOISING in terms of denoising performance , run time and GPU memory requirements can be found in Appendix A.14 and Appendix Table 2 . Denoising ( Variational ) Autoencoders . Despite the suggestive name , denoising variational autoencoders ( Im et al. , 2017 ) are not solving denoising problems . Instead , this method proposes to add noise to the input data in order to boost the quality of encoder distributions . This , in turn , can lead to stronger generative models . Other methods also follow a similar approach to improve overall performance of autoencoders ( Vincent et al. , 2008 ; 2010 ; Jiao et al. , 2020 ) . VAEs for Diverse Solution Sampling . Although not explored in the context of unsupervised denoising , VAEs are designed to sample diverse solutions from trained posteriors . The probabilistic U-NET ( Kohl et al. , 2018 ; 2019 ) uses conditional VAEs to learn a conditional distribution over segmentations . Baumgartner et al . ( 2019 ) improve the diversity of segmentation samples by introducing a hierarchy of latent variables to model segmentations at multiple resolutions . Unlike DIVNOISING , both methods rely on paired training data . Nazabal et al . ( 2020 ) employ VAEs to learn the distribution of incomplete and heterogeneous data in a fully unsupervised manner . Babaeizadeh et al . ( 2017 ) build upon a VAE style framework to predict multiple plausible future frames of videos conditioned on given context frames . A variational inference approach was used by Balakrishnan et al . ( 2019 ) to generate multiple deprojected samples for images and videos collapsed in either spatial or temporal dimensions . Unlike all these approaches , we address the uncertainty introduced by common imaging noise and show how denoised samples can improve downstream processing . 3 THE DENOISING TASK . Image restoration is the task of estimating a clean signal s “ ps1 , . . . , sN q from a corrupted observation x “ px1 , . . . , xN q , where si and xi , refer to the respective pixel intensities . The corrupted x is thought to be drawn from a probability distribution pNMpx|sq , which we call the observation likelihood or the noise model . In this work we focus on restoring images that suffer from insufficient illumination and detector/camera imperfections . Contrary to existing methods , DIVNOISING is designed to capture the inherent uncertainty of the denoising problem by learning a suitable posterior distribution . Formally , the posterior we are interested in is pps|xq9ppx|sqppsq and depends on two components : the prior distribution ppsq of the signal as well as the observation likelihood pNMpx|sq we introduced above . While the prior is a highly complex distribution , the likelihood ppx|sq of a given imaging system ( camera/microscope ) can be described analytically ( Krull et al. , 2020 ) . Models of Imaging Noise . The noise model is usually thought to factorize as a product of pixels , implying that the corruption , given the underlying signal , is occurring independently in each pixel as ppx|sq “ N ź i pNMpxi|siq . ( 1 ) This assumption is known to hold true for Poisson shot noise and camera readout noise ( Zhang et al. , 2019 ; Krull et al. , 2020 ; Prakash et al. , 2020 ) . We will refer to the probability pNMpxi|siq of observing a particular noisy value xi at a pixel i given clean signal si as the pixel noise model . Various types of pixel noise models have been proposed , ranging from physics based analytical models ( Zhang et al. , 2019 ; Luisier et al. , 2010 ; Foi et al. , 2008 ) to simple histograms ( Krull et al. , 2020 ) . In this work , we follow the Gaussian Mixture Model ( GMM ) based noise model description of ( Prakash et al. , 2020 ) . The parameters of a noise model can be estimated whenever pairs px1 , s1q of corresponding noisy and clean calibration images are available ( Krull et al. , 2020 ) . The signal s1 « 1M řM j “ 0 x 1j can then be computed by averaging these noisy observations ( Prakash et al. , 2020 ) . In a case where no calibration data can be acquired , s1 can be estimated by a bootstrapping approach ( Prakash et al. , 2020 ) . Later , we additionally show how a suitable noise model can be co-learned during training . | This paper proposes a new method of noise removal using convolutional VAE. An observed image with noise is input to VAE, and after the expression $z$ in the latent space, the noise removed image is finally output. After that, it is possible to generate a pseudo noisy observation image according to the noise model. The noise model part is flexibly designed using the Gaussian mixture model. In the training, VAE and noise model can be learned at the same time. Since VAE is a generative model, and a clean denoising image can be obtained by averaging a large number of candidates of clean images, $s$, sampled from the periphery of the latent space representation $z$. | SP:5d41c9d8df0e7ce2dc9328a938e0f4c9cf2b3bd6 |
Fully Unsupervised Diversity Denoising with Convolutional Variational Autoencoders | 1 INTRODUCTION . The goal of scientific image analysis is to analyze pixel-data and measure the properties of objects of interest in images . Pixel intensities are subject to undesired noise and other distortions , motivating an initial preprocessing step called image restoration . Image restoration is the task of removing unwanted noise and distortions , giving us clean images that are closer to the true but unknown signal . In the past years , Deep Learning ( DL ) has enabled tremendous progress in image restoration ( Mao et al. , 2016 ; Zhang et al. , 2017b ; Zhang et al. , 2017 ; Weigert et al. , 2018 ) . Supervised DL methods use corresponding pairs of clean and distorted images to learn a mapping between the two quality levels . The utility of this approach is especially pronounced for microscopy image data of biological samples ( Weigert et al. , 2017 ; 2018 ; Ouyang et al. , 2018 ; Wang et al. , 2019 ) , where quantitative downstream analysis is essential . More recently , unsupervised content-aware image restoration ˚Shared first authors . : Shared last authors . ( CARE ) methods ( Lehtinen et al. , 2018 ; Krull et al. , 2019 ; Batson & Royer , 2019 ; Buchholz et al. , 2019 ) have emerged . They can , enabled by sensible assumptions about the statistics of imaging noise , learn a mapping from noisy to clean images , without ever seeing clean data during training . Some of these methods additionally include a probabilistic model of the imaging noise ( Krull et al. , 2020 ; Laine et al. , 2019 ; Prakash et al. , 2020 ; Khademi et al. , 2020 ) to further improve their performance . Note that such denoisers can directly be trained on a given body of noisy images . All existing approaches have a common flaw : distortions degrade some of the information content in images , generally making it impossible to fully recover the desired clean signal with certainty . Even an ideal method can not know which of many possible clean images really has given rise to the degraded observation at hand . Hence , any restoration method has to make a compromise between possible solutions when predicting a restored image . Generative models , such as VAEs , are a canonical choice when a distribution over a set of variables needs to be learned . Still , so far VAEs have been overlooked as a method to solve unsupervised image denoising problems . This might also be due to the fact that vanilla VAEs ( Kingma & Welling , 2014 ; Rezende et al. , 2014 ) show sub-par performance on denoising problems ( see Section 6 ) . Here we introduce DIVNOISING , a principled approach to incorporate explicit models of the imaging noise distribution in the decoder of a VAE . Such noise models can be either measured or derived ( bootstrapped ) from the noisy image data alone ( Krull et al. , 2020 ; Prakash et al. , 2020 ) . Additionally we propose a way to co-learn a suitable noise model during training , rendering DIVNOISING fully unsupervised . We show on 13 datasets that fully convolutional VAEs , trained with our proposed DIVNOISING framework , yield competitive results , in 8 cases actually becoming the new state-ofthe-art ( see Fig . 2 and Table 1 ) . Still , the key benefit of DIVNOISING is that the method does not need to commit to a single prediction , but is instead capable of generating diverse samples from an approximate posterior of possible true signals . ( Note that point estimates can still be inferred if desired , as shown in Fig . 4 . ) Other unsupervised denoising methods only provide a single solution ( point estimate ) of that posterior ( Krull et al. , 2019 ; Lehtinen et al. , 2018 ; Batson & Royer , 2019 ) or predict an independent posterior distribution of intensities per pixel ( Krull et al. , 2020 ; Laine et al. , 2019 ; Prakash et al. , 2020 ; Khademi et al. , 2020 ) . Hence , DIVNOISING is the first method that learns to approximate the posterior over meaningful structures in a given body of images . We believe that DIVNOISING will be hugely beneficial for computational biology applications in biomedical imaging , where noise is typically unavoidable and huge datasets need to be processed on a daily basis . Here , DIVNOISING enables unsupervised diverse SOTA denoising while requiring only comparatively little computational resources , rendering our approach particularly practical . Finally , we discuss the utility of diverse denoising results for OCR and showcase it for a ubiquitous analysis task in biology – the instance segmentation of cells in microscopy images ( see Fig . 5 ) . Hence , DIVNOISING has the potential to be useful for many real-world applications and will not only generate state-of-the-art ( SOTA ) restored images , but also enrich quantitative downstream processing . 2 RELATED WORK . Classical Denoising . The denoising problem has been addressed by a variety of filtering approaches . Arguably some of the most prominent ones are Non-Local Means ( Buades et al. , 2005 ) and BM3D ( Dabov et al. , 2007 ) , which implement a sophisticated non-local filtering scheme . A comprehensive survey and in-depth discussion of such methods can be found in ( Milanfar , 2012 ) . DL Based Denoising . Deep Learning methods which directly learn a mapping from a noisy image to its clean counterpart ( see e.g . ( Zhang et al. , 2017a ) and ( Weigert et al. , 2018 ) ) have outperformed classical denoising methods in recent years . Two well known contributions are the seminal works by Zhang et al . ( 2017a ) and later by Weigert et al . ( 2018 ) . More recently , a number of unsupervised variations have been proposed , and in Section 1 we have described their advantages and disadvantages in detail . One additional interesting contribution was made by Ulyanov et al . ( 2018 ) , introducing a quite different kind of unsupervised restoration approach . Their method , Deep Image Prior , trains a network separately for each noisy input image in the training set , making this approach computationally rather expensive . Furthermore , training has to be stopped after a suitable but a priori unknown number of training steps . Recently , Quan et al . ( 2020 ) proposed an interesting method called SELF2SELF which trains a U-NET like architecture requiring only single noisy images . The key idea of this approach is to use blind spot masking , similar to Krull et al . ( 2019 ) , together with dropout ( Srivastava et al. , 2014 ) , which avoids overfitting and allows sampling of diverse solutions . Similar to DIVNOISING , the single denoised result is obtained by averaging many diverse predictions . Diverse results obtained via dropout are generally considered to capture the so called epistemic or model uncertainty ( Gal & Ghahramani , 2016 ; Lakshminarayanan et al. , 2017 ) , i.e . the uncertainty arising from the fact that we have a limited amount of training data available . In contrast , DIVNOISING combines a VAE and a model of the imaging noise to capture what is known as aleatoric or data uncertainty ( Böhm et al. , 2019 ; Sensoy et al. , 2020 ) , i.e . the unavoidable uncertainty about the true signal resulting from noisy measurements . Like in Ulyanov et al . ( 2018 ) , also SELF2SELF trains separately on each image that has to be denoised . While this renders the method universally applicable , it is computationally prohibitive when applied to large datasets . The same is true for real time applications such as facial denoising . DIVNOISING , on the other hand , is trained only once on a given body of data . Afterwards , it can be efficiently applied to new images . A detailed comparison of SELF2SELF and DIVNOISING in terms of denoising performance , run time and GPU memory requirements can be found in Appendix A.14 and Appendix Table 2 . Denoising ( Variational ) Autoencoders . Despite the suggestive name , denoising variational autoencoders ( Im et al. , 2017 ) are not solving denoising problems . Instead , this method proposes to add noise to the input data in order to boost the quality of encoder distributions . This , in turn , can lead to stronger generative models . Other methods also follow a similar approach to improve overall performance of autoencoders ( Vincent et al. , 2008 ; 2010 ; Jiao et al. , 2020 ) . VAEs for Diverse Solution Sampling . Although not explored in the context of unsupervised denoising , VAEs are designed to sample diverse solutions from trained posteriors . The probabilistic U-NET ( Kohl et al. , 2018 ; 2019 ) uses conditional VAEs to learn a conditional distribution over segmentations . Baumgartner et al . ( 2019 ) improve the diversity of segmentation samples by introducing a hierarchy of latent variables to model segmentations at multiple resolutions . Unlike DIVNOISING , both methods rely on paired training data . Nazabal et al . ( 2020 ) employ VAEs to learn the distribution of incomplete and heterogeneous data in a fully unsupervised manner . Babaeizadeh et al . ( 2017 ) build upon a VAE style framework to predict multiple plausible future frames of videos conditioned on given context frames . A variational inference approach was used by Balakrishnan et al . ( 2019 ) to generate multiple deprojected samples for images and videos collapsed in either spatial or temporal dimensions . Unlike all these approaches , we address the uncertainty introduced by common imaging noise and show how denoised samples can improve downstream processing . 3 THE DENOISING TASK . Image restoration is the task of estimating a clean signal s “ ps1 , . . . , sN q from a corrupted observation x “ px1 , . . . , xN q , where si and xi , refer to the respective pixel intensities . The corrupted x is thought to be drawn from a probability distribution pNMpx|sq , which we call the observation likelihood or the noise model . In this work we focus on restoring images that suffer from insufficient illumination and detector/camera imperfections . Contrary to existing methods , DIVNOISING is designed to capture the inherent uncertainty of the denoising problem by learning a suitable posterior distribution . Formally , the posterior we are interested in is pps|xq9ppx|sqppsq and depends on two components : the prior distribution ppsq of the signal as well as the observation likelihood pNMpx|sq we introduced above . While the prior is a highly complex distribution , the likelihood ppx|sq of a given imaging system ( camera/microscope ) can be described analytically ( Krull et al. , 2020 ) . Models of Imaging Noise . The noise model is usually thought to factorize as a product of pixels , implying that the corruption , given the underlying signal , is occurring independently in each pixel as ppx|sq “ N ź i pNMpxi|siq . ( 1 ) This assumption is known to hold true for Poisson shot noise and camera readout noise ( Zhang et al. , 2019 ; Krull et al. , 2020 ; Prakash et al. , 2020 ) . We will refer to the probability pNMpxi|siq of observing a particular noisy value xi at a pixel i given clean signal si as the pixel noise model . Various types of pixel noise models have been proposed , ranging from physics based analytical models ( Zhang et al. , 2019 ; Luisier et al. , 2010 ; Foi et al. , 2008 ) to simple histograms ( Krull et al. , 2020 ) . In this work , we follow the Gaussian Mixture Model ( GMM ) based noise model description of ( Prakash et al. , 2020 ) . The parameters of a noise model can be estimated whenever pairs px1 , s1q of corresponding noisy and clean calibration images are available ( Krull et al. , 2020 ) . The signal s1 « 1M řM j “ 0 x 1j can then be computed by averaging these noisy observations ( Prakash et al. , 2020 ) . In a case where no calibration data can be acquired , s1 can be estimated by a bootstrapping approach ( Prakash et al. , 2020 ) . Later , we additionally show how a suitable noise model can be co-learned during training . | This paper devises a novel unsupervised denoising paradigm, DIVNOISING, that allows us, for the first time, to generate diverse and plausible denoising solutions, sampled from a learned posterior. This approach only requires noisy images and a suitable description of the imaging noise distribution, providing a new perspective for the image denoising field. It has demonstrated that the quality of denoised images is highly competitive, typically outperforming the unsupervised state-of-the-art, and at times even improving on supervised results. This paper is well-written and good-organized. However, the reviewer has the following concerns. | SP:5d41c9d8df0e7ce2dc9328a938e0f4c9cf2b3bd6 |
Success-Rate Targeted Reinforcement Learning by Disorientation Penalty | Current reinforcement learning generally uses discounted return as its learning objective . However , real-world tasks may often demand a high success rate , which can be quite different from optimizing rewards . In this paper , we explicitly formulate the success rate as an undiscounted form of return with { 0 , 1 } -binary reward function . Unfortunately , applying traditional Bellman updates to value function learning can be problematic for learning undiscounted return , and thus not suitable for optimizing success rate . From our theoretical analysis , we discover that values across different states tend to converge to the same value , resulting in the agent wandering around those states without making any actual progress . This further leads to reduced learning efficiency and inability to complete a task in time . To combat the aforementioned issue , we propose a new method , which introduces Loop Penalty ( LP ) into value function learning , to penalize disoriented cycling behaviors in agent ’ s decision-making . We demonstrate the effectiveness of our proposed LP on three environments , including grid-world cliff-walking , Doom first-person navigation and robot arm control , and compare our method with Qlearning , Monte-Carlo and Proximal Policy Optimization ( PPO ) . Empirically , LP improves the convergence of training and achieves a higher success rate . 1 INTRODUCTION . Reinforcement learning usually adopts expected discounted return as objective , and has been applied in many tasks to find the best solution , e.g . finding the shortest path and achieving the highest score ( Sutton & Barto , 2018 ; Mnih et al. , 2015 ; Shao et al. , 2018 ) . However , many real-world tasks , such as robot control or autonomous driving , may demand more in success rate ( i.e . the probability for the agent to fulfill task requirements ) since failures in these tasks may cause severe damage or consequences . Previous works commonly treat optimizing rewards equivalent to maximizing success rate ( Zhu et al. , 2018 ; Peng et al. , 2018 ; Kalashnikov et al. , 2018 ) , but their results can be error-prone when applied to real-world applications . We believe that success rate is different from expected discounted return . The reasons are as follows : 1 ) expected discounted return commonly provides dense reward signals for transitions in an episode , while success or not is a sparse binary signal only obtained at the end of an episode ; 2 ) expected discounted return commonly weights results in the immediate future more than potential rewards in the distant future , whereas success or not does not have such a weighting and is only concerned about the overall or the final result . Policies with high expected discounted returns are often more demanding in short-term performance than those with high success rates and optimizing success rates often leads to multiple solutions . As a result , policies with high success rates tend to be more reliable and risk-averse while policies with high expected discounted returns tend to be risk-seeking . See the cliff-walking example in Fig . 1 where the objective is to walk from the origin state marked with a triangle to the destination state marked with a circle . The “ Slip ” area in light grey winds with a certain probability pfall = 0.1 , making the agent uncontrollably move down ; the dark gray area at the bottom row denotes “ Cliff ” . In Fig . 1 , the blue trajectory shown on the left is shorter but riskier than the green one shown on the right . In commonly-used hyperparameter settings , such as γ = 0.9 , the agent tends to follow the blue trajectory rather than the green one , although the green trajectory has a higher success rate . We acknowledge that for this simple example , optimizing expected discounted return with a careful design of γ that meets ( 1 − pfall ) 4 < γ9−5 can produce a policy with the highest success rate . However , this result relies on task-specific knowledge about the environment , generally not available in more complex tasks . These findings lead us to the following question : can we express success rate in a general form so that it can be directly optimized ? In this paper , we discover a universal way of representing success rate is to 1 ) use a { 0 , 1 } -binary reward indicates whether or not a trajectory is successful , and 2 ) set γ = 1 so that the binary signal back-propagates without any discount . Unfortunately , this expression belongs to undiscounted problems and the convergence of value iteration often can not be guaranteed ( Xu et al. , 2018 ) . Nevertheless , we can still explicitly solve the Bellman equation in a matrix form for the special undiscounted return ( success rate ) . We derive that if the transition dynamics of the environment permit existence of an irreducible ergodic set of states , γ = 1 will lead to an undesirable situation : state or state-action values tend to converge to the same value , which we refer to as uniformity . As shown in Fig . 2 for the contour of state values in our cliff-walking example , uniformity is reflected as a plateau in the right figure , which is caused by non-discounting and does not exist in discounting cases ( left figure ) . Uniformity makes the selection of actions purposeless within the plateau , resulting in disoriented and time-consuming behaviors in the agent ’ s decision-making , and unsatisfactory success rates . Based on the above analysis , we introduce Loop-Penalty ( LP ) into value function learning to penalize disoriented and cycling behaviors in trajectories . We derive that this penalty can be realized by multiplying a special mask function to the original value function . Note that our strategy is general and is applicable to many RL algorithms . We provide concrete loss functions for three popular algorithms in this paper : Monte Carlo , Deep Q-learning and Proximal Policy Optimization ( Schulman et al. , 2017 ) . We verify the effectiveness in three representative environments : grid-world cliffwalking , vision-based robot grasping , and first-person navigation in 3D Vizdoom ( Kempka et al. , 2016 ) , showing that LP can alleviate the uniformity problem and achieve better performance . Finally , we summarize the major contributions of our paper in the following : • We formally introduce the objective of “ success rate ” in reinforcement learning . Our formulation of success rate is general and is applicable for many different RL tasks . • We theoretically analyze the difficulty in optimizing success rate and show that the uniformity among state values and the resulting loops in trajectories are the key challenges . • We propose LP which can be combined with any general RL algorithm . We demonstrate empirically that LP can alleviate the problem of “ uniformity ” among state values and significantly improve success rates in both discrete and continuous control tasks . 2 RELATED WORK . To the best of our knowledge , currently there is no research that adopts success rate directly as the learning objective . The reason is that success rate is usually not the main criterion in tasks investigated by RL , e.g . video games and simulated robot control . Although some studies used success rate to evaluate the performance of the policies ( Andrychowicz et al. , 2017 ; Tobin et al. , 2018 ; Ghosh et al. , 2018 ; Kalashnikov et al. , 2018 ) , they used task-specific reward design and discounted return during training , instead of directly optimizing success rate . The notion of “ success ” may be reflected in constraints considered in the domain of safe RL ( Garcı́a & Fernández , 2015 ) . Geibel & Wysotzki ( 2005 ) considered constraints on the agent ’ s behavior and discouraged the agent from moving to error states . Geibel ( 2006 ) studied constraints on the expected return to ensure acceptable performance . A . & Ghavamzadeh ( 2013 ) proposed constraints on the variance of some measurements to pursue an invariable performance . Previous studies have also considered safety in the exploration process ( Garcı́a & Fernández-Rebollo , 2012 ; Mannucci et al. , 2018 ) . Although these studies deemed success rate as an additional constraint in learning , they either simply assumed that the constraint can be certainly satisfied or penalized constraint violations . The deficiency of expected discounted return as a training objective has been recognized by many studies . Instead of just optimizing expected return , Heger ( 1994 ) ; Tamar et al . ( 2013 ) adopted the minimax criterion that optimizes the worst possible values of the return . By doing so , occasional small returns would not be ignored at test time . Gilbert & Weng ( 2016 ) ; Chow et al . ( 2017 ) extended this idea to arbitrary quantiles of the return . However , all these studies are not optimizing success rate directly since they are based on a quantitative measurement of performance and are unnecessarily sensitive to the worst cases . In contrast , success rate is based on a binary signal which only distinguishes between success and failure . Our work involves optimization of an undiscounted return . The instability in training towards an undiscounted return has been mentioned by Schwartz ( 1993 ) ; Xu et al . ( 2018 ) . However , most studies on undiscounted return focused on continuous settings and considered the average reward as objectives ( Schwartz , 1993 ; Ortner & Ryabko , 2012 ; Zahavy et al. , 2020 ) . There seems to be a general view that the instability in training towards undiscounted return only exists in continuous cases but not in episodic cases ( Pitis , 2019 ) . Contrary to this view , we propose that training instability also exists in episodic cases . For optimizing success rate , we provide a theoretical analysis and show the existence of training instability and propose a practical method that alleviates this problem . 3 SUCCESS RATE IN REINFORCEMENT LEARNING . In this section we provide a formal definition of success rate , explain its relationship with expected discounted sum of rewards , and analyze the problems in optimizing success rate . 3.1 SUCCESS RATE . In RL , given a policy π , success rate specifically refers to the ratio of the successful trajectories to all trajectories . As in a general setting of RL , a trajectory is expressed as τ = { ( s0 , a0 , r0 ) , . . . , ( sT , aT , rT ) , sT+1 } rolled out by following policy π , where st ∈ S is state , at ∈ A denotes action , rt represents immediate reward and T is the length of the trajectory . Because the notion of success should only depend on the visited states in a trajectory , we concisely express “ success ” by defining a set of desired states Sg ⊂ S that denote task completion , e.g . the destination state in our cliff-walking example . At a high level , the goal of the agent is to reach any state in Sg within a given planning horizon T , and the environment terminates either upon arriving at a desired state or reaching a maximum allocated timestep T . Without loss of generality , we say that “ a trajectory τ is successful ” if and only if τ−1 ∈ Sg , where τ−1 is the last state in τ . Formally , we use an indicator function I ( s ∈ Sg ) to denote success , where I ( · ) takes value of 1 when the input statement is true and 0 otherwise . Since this expression is task-independent , our analysis can be widely applicable . Accordingly , we formally define the success rate as follows : Definition 1 . The success rate of a given policy π is defined as βπ ( s0 ) = ∑ τ pπ ( τ |s0 ) I ( τ−1 ∈ Sg ) ( 1 ) where pπ ( τ |s0 ) = ∏T t=0 π ( at|st ) p ( st+1|st , at ) is the probability of observing trajectory τ . In order to find a policy that optimizes success rate , we derive a recursive form of policy evaluation similar to the Bellman equation ( Sutton & Barto , 2018 ) , as shown in Theorem 1 . Theorem 1 . The success rate is a state-value function represented as an expected sum of undiscounted return , with the reward function R ( s ) defined to take the value of 1 if s ∈ Sg , 0 otherwise . Proof sketch : We segment the trajectories and generate sub-trajectories , τ ∈ Γ , τ0 : k ∈ Γ̂ , where k ∈ ( 0 , T ] . Note that Γ = Γ̂ , because 1 ) ∀τ ∈ Γ , we have τ0 : T ∈ Γ̂ = τ , Γ ⊆ Γ̂ , 2 ) τ0 : k is a trajectory , Γ̂ ⊆ Γ . Then the success rate βπ ( st ) can be rewritten as the product sum of the probability of reaching st+k and the indicator I ( τst+k ∈ Sg ) for all st+k : βπ ( st ) = T−t∑ k=1 ∑ st+k pπ ( st+k|st ) I ( st+k ∈ Sg ) ( 2 ) where pπ ( st+k|st ) the probability of reaching st+k from st . Complete proof is in appendix . Therefore , we can optimize success rate through setting the above { 0 , 1 } -binary reward function and adopting an undiscounted form of return . The problem is that this formulation falls into optimizing the undiscounted form of return and may have problems in training stability ( Xu et al. , 2018 ) . | The authors propose a new set-up for reinforcement learning which considers undiscounted episodic returns and introduces a loop-penalty to ensure that all episodes terminate and that the returns are bounded. In the tabular case, the loop-penalty zeros out the reward if a loop is detected in the current episode. For continuous state-spaces, the authors propose to detect loops using methods that estimate state-similarity. | SP:060eedc158b8ebcd2a593500513c1055e1ca158b |
Success-Rate Targeted Reinforcement Learning by Disorientation Penalty | Current reinforcement learning generally uses discounted return as its learning objective . However , real-world tasks may often demand a high success rate , which can be quite different from optimizing rewards . In this paper , we explicitly formulate the success rate as an undiscounted form of return with { 0 , 1 } -binary reward function . Unfortunately , applying traditional Bellman updates to value function learning can be problematic for learning undiscounted return , and thus not suitable for optimizing success rate . From our theoretical analysis , we discover that values across different states tend to converge to the same value , resulting in the agent wandering around those states without making any actual progress . This further leads to reduced learning efficiency and inability to complete a task in time . To combat the aforementioned issue , we propose a new method , which introduces Loop Penalty ( LP ) into value function learning , to penalize disoriented cycling behaviors in agent ’ s decision-making . We demonstrate the effectiveness of our proposed LP on three environments , including grid-world cliff-walking , Doom first-person navigation and robot arm control , and compare our method with Qlearning , Monte-Carlo and Proximal Policy Optimization ( PPO ) . Empirically , LP improves the convergence of training and achieves a higher success rate . 1 INTRODUCTION . Reinforcement learning usually adopts expected discounted return as objective , and has been applied in many tasks to find the best solution , e.g . finding the shortest path and achieving the highest score ( Sutton & Barto , 2018 ; Mnih et al. , 2015 ; Shao et al. , 2018 ) . However , many real-world tasks , such as robot control or autonomous driving , may demand more in success rate ( i.e . the probability for the agent to fulfill task requirements ) since failures in these tasks may cause severe damage or consequences . Previous works commonly treat optimizing rewards equivalent to maximizing success rate ( Zhu et al. , 2018 ; Peng et al. , 2018 ; Kalashnikov et al. , 2018 ) , but their results can be error-prone when applied to real-world applications . We believe that success rate is different from expected discounted return . The reasons are as follows : 1 ) expected discounted return commonly provides dense reward signals for transitions in an episode , while success or not is a sparse binary signal only obtained at the end of an episode ; 2 ) expected discounted return commonly weights results in the immediate future more than potential rewards in the distant future , whereas success or not does not have such a weighting and is only concerned about the overall or the final result . Policies with high expected discounted returns are often more demanding in short-term performance than those with high success rates and optimizing success rates often leads to multiple solutions . As a result , policies with high success rates tend to be more reliable and risk-averse while policies with high expected discounted returns tend to be risk-seeking . See the cliff-walking example in Fig . 1 where the objective is to walk from the origin state marked with a triangle to the destination state marked with a circle . The “ Slip ” area in light grey winds with a certain probability pfall = 0.1 , making the agent uncontrollably move down ; the dark gray area at the bottom row denotes “ Cliff ” . In Fig . 1 , the blue trajectory shown on the left is shorter but riskier than the green one shown on the right . In commonly-used hyperparameter settings , such as γ = 0.9 , the agent tends to follow the blue trajectory rather than the green one , although the green trajectory has a higher success rate . We acknowledge that for this simple example , optimizing expected discounted return with a careful design of γ that meets ( 1 − pfall ) 4 < γ9−5 can produce a policy with the highest success rate . However , this result relies on task-specific knowledge about the environment , generally not available in more complex tasks . These findings lead us to the following question : can we express success rate in a general form so that it can be directly optimized ? In this paper , we discover a universal way of representing success rate is to 1 ) use a { 0 , 1 } -binary reward indicates whether or not a trajectory is successful , and 2 ) set γ = 1 so that the binary signal back-propagates without any discount . Unfortunately , this expression belongs to undiscounted problems and the convergence of value iteration often can not be guaranteed ( Xu et al. , 2018 ) . Nevertheless , we can still explicitly solve the Bellman equation in a matrix form for the special undiscounted return ( success rate ) . We derive that if the transition dynamics of the environment permit existence of an irreducible ergodic set of states , γ = 1 will lead to an undesirable situation : state or state-action values tend to converge to the same value , which we refer to as uniformity . As shown in Fig . 2 for the contour of state values in our cliff-walking example , uniformity is reflected as a plateau in the right figure , which is caused by non-discounting and does not exist in discounting cases ( left figure ) . Uniformity makes the selection of actions purposeless within the plateau , resulting in disoriented and time-consuming behaviors in the agent ’ s decision-making , and unsatisfactory success rates . Based on the above analysis , we introduce Loop-Penalty ( LP ) into value function learning to penalize disoriented and cycling behaviors in trajectories . We derive that this penalty can be realized by multiplying a special mask function to the original value function . Note that our strategy is general and is applicable to many RL algorithms . We provide concrete loss functions for three popular algorithms in this paper : Monte Carlo , Deep Q-learning and Proximal Policy Optimization ( Schulman et al. , 2017 ) . We verify the effectiveness in three representative environments : grid-world cliffwalking , vision-based robot grasping , and first-person navigation in 3D Vizdoom ( Kempka et al. , 2016 ) , showing that LP can alleviate the uniformity problem and achieve better performance . Finally , we summarize the major contributions of our paper in the following : • We formally introduce the objective of “ success rate ” in reinforcement learning . Our formulation of success rate is general and is applicable for many different RL tasks . • We theoretically analyze the difficulty in optimizing success rate and show that the uniformity among state values and the resulting loops in trajectories are the key challenges . • We propose LP which can be combined with any general RL algorithm . We demonstrate empirically that LP can alleviate the problem of “ uniformity ” among state values and significantly improve success rates in both discrete and continuous control tasks . 2 RELATED WORK . To the best of our knowledge , currently there is no research that adopts success rate directly as the learning objective . The reason is that success rate is usually not the main criterion in tasks investigated by RL , e.g . video games and simulated robot control . Although some studies used success rate to evaluate the performance of the policies ( Andrychowicz et al. , 2017 ; Tobin et al. , 2018 ; Ghosh et al. , 2018 ; Kalashnikov et al. , 2018 ) , they used task-specific reward design and discounted return during training , instead of directly optimizing success rate . The notion of “ success ” may be reflected in constraints considered in the domain of safe RL ( Garcı́a & Fernández , 2015 ) . Geibel & Wysotzki ( 2005 ) considered constraints on the agent ’ s behavior and discouraged the agent from moving to error states . Geibel ( 2006 ) studied constraints on the expected return to ensure acceptable performance . A . & Ghavamzadeh ( 2013 ) proposed constraints on the variance of some measurements to pursue an invariable performance . Previous studies have also considered safety in the exploration process ( Garcı́a & Fernández-Rebollo , 2012 ; Mannucci et al. , 2018 ) . Although these studies deemed success rate as an additional constraint in learning , they either simply assumed that the constraint can be certainly satisfied or penalized constraint violations . The deficiency of expected discounted return as a training objective has been recognized by many studies . Instead of just optimizing expected return , Heger ( 1994 ) ; Tamar et al . ( 2013 ) adopted the minimax criterion that optimizes the worst possible values of the return . By doing so , occasional small returns would not be ignored at test time . Gilbert & Weng ( 2016 ) ; Chow et al . ( 2017 ) extended this idea to arbitrary quantiles of the return . However , all these studies are not optimizing success rate directly since they are based on a quantitative measurement of performance and are unnecessarily sensitive to the worst cases . In contrast , success rate is based on a binary signal which only distinguishes between success and failure . Our work involves optimization of an undiscounted return . The instability in training towards an undiscounted return has been mentioned by Schwartz ( 1993 ) ; Xu et al . ( 2018 ) . However , most studies on undiscounted return focused on continuous settings and considered the average reward as objectives ( Schwartz , 1993 ; Ortner & Ryabko , 2012 ; Zahavy et al. , 2020 ) . There seems to be a general view that the instability in training towards undiscounted return only exists in continuous cases but not in episodic cases ( Pitis , 2019 ) . Contrary to this view , we propose that training instability also exists in episodic cases . For optimizing success rate , we provide a theoretical analysis and show the existence of training instability and propose a practical method that alleviates this problem . 3 SUCCESS RATE IN REINFORCEMENT LEARNING . In this section we provide a formal definition of success rate , explain its relationship with expected discounted sum of rewards , and analyze the problems in optimizing success rate . 3.1 SUCCESS RATE . In RL , given a policy π , success rate specifically refers to the ratio of the successful trajectories to all trajectories . As in a general setting of RL , a trajectory is expressed as τ = { ( s0 , a0 , r0 ) , . . . , ( sT , aT , rT ) , sT+1 } rolled out by following policy π , where st ∈ S is state , at ∈ A denotes action , rt represents immediate reward and T is the length of the trajectory . Because the notion of success should only depend on the visited states in a trajectory , we concisely express “ success ” by defining a set of desired states Sg ⊂ S that denote task completion , e.g . the destination state in our cliff-walking example . At a high level , the goal of the agent is to reach any state in Sg within a given planning horizon T , and the environment terminates either upon arriving at a desired state or reaching a maximum allocated timestep T . Without loss of generality , we say that “ a trajectory τ is successful ” if and only if τ−1 ∈ Sg , where τ−1 is the last state in τ . Formally , we use an indicator function I ( s ∈ Sg ) to denote success , where I ( · ) takes value of 1 when the input statement is true and 0 otherwise . Since this expression is task-independent , our analysis can be widely applicable . Accordingly , we formally define the success rate as follows : Definition 1 . The success rate of a given policy π is defined as βπ ( s0 ) = ∑ τ pπ ( τ |s0 ) I ( τ−1 ∈ Sg ) ( 1 ) where pπ ( τ |s0 ) = ∏T t=0 π ( at|st ) p ( st+1|st , at ) is the probability of observing trajectory τ . In order to find a policy that optimizes success rate , we derive a recursive form of policy evaluation similar to the Bellman equation ( Sutton & Barto , 2018 ) , as shown in Theorem 1 . Theorem 1 . The success rate is a state-value function represented as an expected sum of undiscounted return , with the reward function R ( s ) defined to take the value of 1 if s ∈ Sg , 0 otherwise . Proof sketch : We segment the trajectories and generate sub-trajectories , τ ∈ Γ , τ0 : k ∈ Γ̂ , where k ∈ ( 0 , T ] . Note that Γ = Γ̂ , because 1 ) ∀τ ∈ Γ , we have τ0 : T ∈ Γ̂ = τ , Γ ⊆ Γ̂ , 2 ) τ0 : k is a trajectory , Γ̂ ⊆ Γ . Then the success rate βπ ( st ) can be rewritten as the product sum of the probability of reaching st+k and the indicator I ( τst+k ∈ Sg ) for all st+k : βπ ( st ) = T−t∑ k=1 ∑ st+k pπ ( st+k|st ) I ( st+k ∈ Sg ) ( 2 ) where pπ ( st+k|st ) the probability of reaching st+k from st . Complete proof is in appendix . Therefore , we can optimize success rate through setting the above { 0 , 1 } -binary reward function and adopting an undiscounted form of return . The problem is that this formulation falls into optimizing the undiscounted form of return and may have problems in training stability ( Xu et al. , 2018 ) . | This paper proposes an alternative surrogate objective for optimizing success rate in episodic tasks with bounded time horizon. Rather than optimize a discounted 0-1 loss (say with discount factor 0.99), the authors suggest to optimize the undiscounted 0-1 loss where reward is counted only for trajectories that do not contain loops. They call this a loop penalty, and show that it can work in 3 appropriate environments. | SP:060eedc158b8ebcd2a593500513c1055e1ca158b |
Learning Curves for Analysis of Deep Networks | A learning curve models a classifier ’ s test error as a function of the number of training samples . Prior works show that learning curves can be used to select model parameters and extrapolate performance . We investigate how to use learning curves to analyze the impact of design choices , such as pretraining , architecture , and data augmentation . We propose a method to robustly estimate learning curves , abstract their parameters into error and data-reliance , and evaluate the effectiveness of different parameterizations . We also provide several interesting observations based on learning curves for a variety of image classification models . 1 INTRODUCTION . What gets measured gets optimized . We need better measures of learning ability to design better classifiers and predict the payoff of collecting more data . Currently , classifiers are evaluated and compared by measuring performance on one or more datasets according to a fixed train/test split . Ablation studies help evaluate the impact of design decisions . However , one of the most important characteristics of a classifier , how it performs with varying numbers of training samples , is rarely measured or modeled . In this paper , we refine the idea of learning curves that model error as a function of training set size . Learning curves were introduced nearly thirty years ( e.g . by Cortes et al . ( 1993 ) ) to accelerate model selection of deep networks . Recent works have demonstrated the predictability of performance improvements with more data ( Hestness et al. , 2017 ; Johnson & Nguyen , 2017 ; Kaplan et al. , 2020 ; Rosenfeld et al. , 2020 ) or more network parameters ( Kaplan et al. , 2020 ; Rosenfeld et al. , 2020 ) . But such studies have typically required large-scale experiments that are outside the computational budgets of many research groups , and their purpose is extrapolation rather than validating design choices . We find that a generalized power law function provides the best learning curve fit , while a model linear in n−0.5 , where n is the number of training samples ( or “ training size ” ) , provides a good local approximation . We abstract the curve into two key parameters : eN and βN . eN is error at n = N , and βN is a measure of data-reliance , revealing how much a classifier ’ s error will change if the training set size changes . Learning curves provide valuable insights that can not be obtained by single-point comparisons of performance . Our aim is to promote the use of learning curves as part of a standard learning system evaluation . Our key contributions : • Investigate how to best model , estimate , characterize , and display learning curves for use in classifier analysis • Use learning curves to analyze impact on error and data-reliance due to network architecture , depth , width , fine-tuning , data augmentation , and pretraining Table 1 shows validated and rejected popular beliefs that single-point comparisons often overlook . In the following sections , we investigate how to model learning curves ( Sec . 2 ) , how to estimate them ( Sec . 3 ) , and what they can tell us about the impact of design decisions ( Sec . 4 ) , with discussion of limitations and future work in Sec . 5 . 2 MODELING LEARNING CURVES . The learning curve measures test error etest as a function of the number of training samples n for a given classification model and learning method . Previous empirical observations suggest a functional form etest ( n ) = α + ηnγ , with bias-variance trade-off and generalization theories typically indicating γ = −0.5 . We summarize what bias-variance trade-off and generalization theories ( Sec . 2.1 ) and empirical studies ( Sec . 2.2 ) can tell us about learning curves , and describe our proposed abstraction in Sec . 2.3 . 2.1 BIAS-VARIANCE TRADE-OFF AND GENERALIZATION THEORY . The bias-variance trade-off is an intuitive and theoretical way to think about generalization . The “ bias ” is error due to inability of the classifier to encode the optimal decision function , and the “ variance ” is error due to variations in predictions due to limited availability of training samples for parameter estimation . This is called a trade-off because a classifier with more parameters tends to have less bias but higher variance . Geman et al . ( 1992 ) decompose mean squared regression error into bias and variance and explore the implications for neural networks , leading to the conclusion that “ identifying the right preconditions is the substantial problem in neural modeling ” . This conclusion foreshadows the importance of pretraining , though Geman et al . thought the preconditions must be built in rather than learned . Domingos ( 2000 ) extends the analysis to classification . Theoretically , the mean squared error ( MSE ) can be modeled as e2test ( n ) = bias 2 + noise2 + var ( n ) , where “ noise ” is irreducible error due to non-unique mapping from inputs to labels , and variance can be modeled as var ( n ) = σ2/n for n training samples . The ηn−0.5 term appears throughout machine learning generalization theory . For example , the bounds based on hypothesis VC-dimension ( Vapnik & Chervonenkis , 1971 ) and Rademacher Complexity ( Gnecco & Sanguineti , 2008 ) are both O ( cn−0.5 ) where c depends on the complexity of the classification model . More recent work also follows this form . We give some examples of bounds in Table 2 without describing all of the parameters because the point is that the test error bounds vary with training size n as a function of n−0.5 , for all approaches . 2.2 EMPIRICAL STUDIES . Some recent empirical studies ( e.g . Sun et al . ( 2017 ) ) claim a log-linear relationship between error and training size , but this holds only when asymptotic error is zero . Hestness et al . ( 2017 ) model error as etest ( n ) = α + ηnγ but often find γ much smaller in magnitude than −0.5 and suggest that poor fits indicate need for better hyperparameter tuning . This raises an interesting point that sample efficiency depends both on the classification model and on the efficacy of the optimization algorithm and parameters . Johnson & Nguyen ( 2017 ) also find a better fit with this extended power law model than by restricting γ = −0.5 or α = 0 . We find that , by selecting the learning rate through validation on one training size and using the Ranger optimizer ( Wright , 2019 ) , we can achieve a good approximate fit with γ = −0.5 and best fit with −0.3 < γ < −0.7 . In the language domain , learning curves are used in a fascinating study by Kaplan et al . ( 2020 ) . For natural language transformers , they show that a power law relationship between logistic loss , model size , compute time , and dataset size is maintained if ( and only if ) each is increased in tandem . We draw some similar conclusions to their study , such as that increasing model size tends to improve performance especially for small training sets ( which surprised us ) . However , the studies are largely complementary , as we study convolutional nets in computer vision , classification error ( instead of logistic loss ) , and a broader range of design choices such as effects across depth , width , data augmentation , pretraining source , architecture , and dataset . Also related , Rosenfeld et al . ( 2020 ) model error as a function of both training size and number of model parameters with a five-parameter function that accounts for training size , model parameter size , and chance performance . A key difference in our work is that we focus on how to best draw insights about design choices from learning curves , rather than on extrapolation . As such , we propose methods to estimate learning curves and their variance from a relatively small number of trained models . 2.3 PROPOSED CHARACTERIZATION OF LEARNING CURVES FOR EVALUATION . A classifier ’ s performance can be characterized in terms of its error and data-reliance , or how quickly the error changes with training size n. With e ( n ) = α + ηnγ , we find that γ = −0.5 provides a good local approximation but that fitting γ significantly improves leave-one-size-out RMS error and extrapolation accuracy , as we detail in Sec . 4 . However , α , η , and γ can not be meaningfully compared across curves because the parameters have high covariance with small data perturbations , and comparing η values is not meaningful unless γ is fixed and vice-versa . We propose to report error and sensitivity to training size in a way that can be derived from various learning curve models and is insensitive to data perturbations . The curve is characterized by error eN = α + ηN γ and data-reliance βN at N , and we typically choose N as the full dataset size . Noting that most learning curves are locally well approximated by a model linear in n−0.5 , we compute data-reliance as βN = N−0.5 ∂e∂n−0.5 ∣∣ n=N = −2ηγNγ . When the error is plotted against n−0.5 , βN is the slope at N scaled by N−0.5 , where the scaling was chosen to make the practical implications of βN more intuitive . This yields a simple predictor for error when changing training size by a factor of d : e ( d ·N ) = eN + ( 1√ d − 1 ) βN . ( 1 ) Thus , by this linearized estimate , asymptotic error is eN −βN , a 4-fold increase in data ( e.g . 400→ 1600 ) reduces error by 0.5βN , and using only one quarter of the dataset ( e.g . 400→ 100 ) increases the error by βN . For two models with similar eN , the one with a larger βN would outperform with more data but underperform with less . Note that ( eN , βN , γ ) is a complete re-parameterization of the extended power law , with γ + 0.5 indicating the curvature in n−0.5 scale . 3 ESTIMATING LEARNING CURVES . We now describe the method for estimating the learning curve from error measurements with confidence bounds on the estimate . Let eij denote the random variable corresponding to test error when the model is trained on the jth fold of ni samples ( either per class or in total ) . We assume { eij } Fij=1 are i.i.d according to N ( µi , σ2i ) . We want to estimate learning curve parameters α ( asymptotic error ) , η , and γ , such that eij = α + ηn γ i + ij where ij ∼ N ( 0 , σ2i ) and µij = E [ eij ] = µi . Sections 3.1 and 3.2 describe how to estimate mean and variance of α and η for a given γ , and Sec . 3.3 describes our approach for estimating γ . 3.1 WEIGHTED LEAST SQUARES FORMULATION . We estimate learning curve parameters { α , η } by optimizing a weighted least squares objective : G ( γ ) = min α , η S∑ i=1 Fi∑ j=1 wij ( eij − α− ηnγ ) 2 ( 2 ) wherewij = 1/ ( Fiσ2i ) . Fi is the number of models trained with data size ni and is used to normalize the weight so that the total weight for observations from each training size does not depend on Fi . The factor of σ2i accounts for the variance of ij . Assuming constant σ 2 i and removing the Fi factor would yield unweighted least squares . The variance of the estimate of σ2i from Fi samples is 2σ 4 i /Fi , which can lead to over- or underweighting data for particular i if Fi is small . Recall that each sample eij requires training an entire model , so Fi is always small in our experiments . We would expect the variance to have the form σ2i = σ 2 0 + σ̂ 2/ni , where σ20 is the variance due to random initialization and optimization and σ̂ 2/ni is the variance due to randomness in selecting ni samples . Indeed , by averaging over the variance estimates for many different network models on the CIFAR-100 ( Krizhevsky , 2012 ) dataset , we find a good fit with σ20 = 0.2 . This enables us to estimate a single σ̂ 2 parameter from all samples e in a given learning curve as a least squares fit and also upper-bounds wij < = 5 even if two models happen to have the same error . This attention to wij may seem fussy , but without such care we find that the learning curve often fails to account sufficiently for all the data in some cases . | This paper advocates for studying the effect of design choices in deep learning via their effect on entire *learning curves* (test error vs num samples N), as opposed to their effect only for a fixed N. This is a valid and important message, and it is indeed an aspect that is often overlooked in certain domains. However, although this paper addresses an important issue, there are methodological concerns (described below) which prevent me from recommending acceptance. In summary, the paper oversimplifies certain important aspects in both the setup and the experiments. | SP:503051a1584c3f2fe519fb8154c63b9066bb4a26 |
Learning Curves for Analysis of Deep Networks | A learning curve models a classifier ’ s test error as a function of the number of training samples . Prior works show that learning curves can be used to select model parameters and extrapolate performance . We investigate how to use learning curves to analyze the impact of design choices , such as pretraining , architecture , and data augmentation . We propose a method to robustly estimate learning curves , abstract their parameters into error and data-reliance , and evaluate the effectiveness of different parameterizations . We also provide several interesting observations based on learning curves for a variety of image classification models . 1 INTRODUCTION . What gets measured gets optimized . We need better measures of learning ability to design better classifiers and predict the payoff of collecting more data . Currently , classifiers are evaluated and compared by measuring performance on one or more datasets according to a fixed train/test split . Ablation studies help evaluate the impact of design decisions . However , one of the most important characteristics of a classifier , how it performs with varying numbers of training samples , is rarely measured or modeled . In this paper , we refine the idea of learning curves that model error as a function of training set size . Learning curves were introduced nearly thirty years ( e.g . by Cortes et al . ( 1993 ) ) to accelerate model selection of deep networks . Recent works have demonstrated the predictability of performance improvements with more data ( Hestness et al. , 2017 ; Johnson & Nguyen , 2017 ; Kaplan et al. , 2020 ; Rosenfeld et al. , 2020 ) or more network parameters ( Kaplan et al. , 2020 ; Rosenfeld et al. , 2020 ) . But such studies have typically required large-scale experiments that are outside the computational budgets of many research groups , and their purpose is extrapolation rather than validating design choices . We find that a generalized power law function provides the best learning curve fit , while a model linear in n−0.5 , where n is the number of training samples ( or “ training size ” ) , provides a good local approximation . We abstract the curve into two key parameters : eN and βN . eN is error at n = N , and βN is a measure of data-reliance , revealing how much a classifier ’ s error will change if the training set size changes . Learning curves provide valuable insights that can not be obtained by single-point comparisons of performance . Our aim is to promote the use of learning curves as part of a standard learning system evaluation . Our key contributions : • Investigate how to best model , estimate , characterize , and display learning curves for use in classifier analysis • Use learning curves to analyze impact on error and data-reliance due to network architecture , depth , width , fine-tuning , data augmentation , and pretraining Table 1 shows validated and rejected popular beliefs that single-point comparisons often overlook . In the following sections , we investigate how to model learning curves ( Sec . 2 ) , how to estimate them ( Sec . 3 ) , and what they can tell us about the impact of design decisions ( Sec . 4 ) , with discussion of limitations and future work in Sec . 5 . 2 MODELING LEARNING CURVES . The learning curve measures test error etest as a function of the number of training samples n for a given classification model and learning method . Previous empirical observations suggest a functional form etest ( n ) = α + ηnγ , with bias-variance trade-off and generalization theories typically indicating γ = −0.5 . We summarize what bias-variance trade-off and generalization theories ( Sec . 2.1 ) and empirical studies ( Sec . 2.2 ) can tell us about learning curves , and describe our proposed abstraction in Sec . 2.3 . 2.1 BIAS-VARIANCE TRADE-OFF AND GENERALIZATION THEORY . The bias-variance trade-off is an intuitive and theoretical way to think about generalization . The “ bias ” is error due to inability of the classifier to encode the optimal decision function , and the “ variance ” is error due to variations in predictions due to limited availability of training samples for parameter estimation . This is called a trade-off because a classifier with more parameters tends to have less bias but higher variance . Geman et al . ( 1992 ) decompose mean squared regression error into bias and variance and explore the implications for neural networks , leading to the conclusion that “ identifying the right preconditions is the substantial problem in neural modeling ” . This conclusion foreshadows the importance of pretraining , though Geman et al . thought the preconditions must be built in rather than learned . Domingos ( 2000 ) extends the analysis to classification . Theoretically , the mean squared error ( MSE ) can be modeled as e2test ( n ) = bias 2 + noise2 + var ( n ) , where “ noise ” is irreducible error due to non-unique mapping from inputs to labels , and variance can be modeled as var ( n ) = σ2/n for n training samples . The ηn−0.5 term appears throughout machine learning generalization theory . For example , the bounds based on hypothesis VC-dimension ( Vapnik & Chervonenkis , 1971 ) and Rademacher Complexity ( Gnecco & Sanguineti , 2008 ) are both O ( cn−0.5 ) where c depends on the complexity of the classification model . More recent work also follows this form . We give some examples of bounds in Table 2 without describing all of the parameters because the point is that the test error bounds vary with training size n as a function of n−0.5 , for all approaches . 2.2 EMPIRICAL STUDIES . Some recent empirical studies ( e.g . Sun et al . ( 2017 ) ) claim a log-linear relationship between error and training size , but this holds only when asymptotic error is zero . Hestness et al . ( 2017 ) model error as etest ( n ) = α + ηnγ but often find γ much smaller in magnitude than −0.5 and suggest that poor fits indicate need for better hyperparameter tuning . This raises an interesting point that sample efficiency depends both on the classification model and on the efficacy of the optimization algorithm and parameters . Johnson & Nguyen ( 2017 ) also find a better fit with this extended power law model than by restricting γ = −0.5 or α = 0 . We find that , by selecting the learning rate through validation on one training size and using the Ranger optimizer ( Wright , 2019 ) , we can achieve a good approximate fit with γ = −0.5 and best fit with −0.3 < γ < −0.7 . In the language domain , learning curves are used in a fascinating study by Kaplan et al . ( 2020 ) . For natural language transformers , they show that a power law relationship between logistic loss , model size , compute time , and dataset size is maintained if ( and only if ) each is increased in tandem . We draw some similar conclusions to their study , such as that increasing model size tends to improve performance especially for small training sets ( which surprised us ) . However , the studies are largely complementary , as we study convolutional nets in computer vision , classification error ( instead of logistic loss ) , and a broader range of design choices such as effects across depth , width , data augmentation , pretraining source , architecture , and dataset . Also related , Rosenfeld et al . ( 2020 ) model error as a function of both training size and number of model parameters with a five-parameter function that accounts for training size , model parameter size , and chance performance . A key difference in our work is that we focus on how to best draw insights about design choices from learning curves , rather than on extrapolation . As such , we propose methods to estimate learning curves and their variance from a relatively small number of trained models . 2.3 PROPOSED CHARACTERIZATION OF LEARNING CURVES FOR EVALUATION . A classifier ’ s performance can be characterized in terms of its error and data-reliance , or how quickly the error changes with training size n. With e ( n ) = α + ηnγ , we find that γ = −0.5 provides a good local approximation but that fitting γ significantly improves leave-one-size-out RMS error and extrapolation accuracy , as we detail in Sec . 4 . However , α , η , and γ can not be meaningfully compared across curves because the parameters have high covariance with small data perturbations , and comparing η values is not meaningful unless γ is fixed and vice-versa . We propose to report error and sensitivity to training size in a way that can be derived from various learning curve models and is insensitive to data perturbations . The curve is characterized by error eN = α + ηN γ and data-reliance βN at N , and we typically choose N as the full dataset size . Noting that most learning curves are locally well approximated by a model linear in n−0.5 , we compute data-reliance as βN = N−0.5 ∂e∂n−0.5 ∣∣ n=N = −2ηγNγ . When the error is plotted against n−0.5 , βN is the slope at N scaled by N−0.5 , where the scaling was chosen to make the practical implications of βN more intuitive . This yields a simple predictor for error when changing training size by a factor of d : e ( d ·N ) = eN + ( 1√ d − 1 ) βN . ( 1 ) Thus , by this linearized estimate , asymptotic error is eN −βN , a 4-fold increase in data ( e.g . 400→ 1600 ) reduces error by 0.5βN , and using only one quarter of the dataset ( e.g . 400→ 100 ) increases the error by βN . For two models with similar eN , the one with a larger βN would outperform with more data but underperform with less . Note that ( eN , βN , γ ) is a complete re-parameterization of the extended power law , with γ + 0.5 indicating the curvature in n−0.5 scale . 3 ESTIMATING LEARNING CURVES . We now describe the method for estimating the learning curve from error measurements with confidence bounds on the estimate . Let eij denote the random variable corresponding to test error when the model is trained on the jth fold of ni samples ( either per class or in total ) . We assume { eij } Fij=1 are i.i.d according to N ( µi , σ2i ) . We want to estimate learning curve parameters α ( asymptotic error ) , η , and γ , such that eij = α + ηn γ i + ij where ij ∼ N ( 0 , σ2i ) and µij = E [ eij ] = µi . Sections 3.1 and 3.2 describe how to estimate mean and variance of α and η for a given γ , and Sec . 3.3 describes our approach for estimating γ . 3.1 WEIGHTED LEAST SQUARES FORMULATION . We estimate learning curve parameters { α , η } by optimizing a weighted least squares objective : G ( γ ) = min α , η S∑ i=1 Fi∑ j=1 wij ( eij − α− ηnγ ) 2 ( 2 ) wherewij = 1/ ( Fiσ2i ) . Fi is the number of models trained with data size ni and is used to normalize the weight so that the total weight for observations from each training size does not depend on Fi . The factor of σ2i accounts for the variance of ij . Assuming constant σ 2 i and removing the Fi factor would yield unweighted least squares . The variance of the estimate of σ2i from Fi samples is 2σ 4 i /Fi , which can lead to over- or underweighting data for particular i if Fi is small . Recall that each sample eij requires training an entire model , so Fi is always small in our experiments . We would expect the variance to have the form σ2i = σ 2 0 + σ̂ 2/ni , where σ20 is the variance due to random initialization and optimization and σ̂ 2/ni is the variance due to randomness in selecting ni samples . Indeed , by averaging over the variance estimates for many different network models on the CIFAR-100 ( Krizhevsky , 2012 ) dataset , we find a good fit with σ20 = 0.2 . This enables us to estimate a single σ̂ 2 parameter from all samples e in a given learning curve as a least squares fit and also upper-bounds wij < = 5 even if two models happen to have the same error . This attention to wij may seem fussy , but without such care we find that the learning curve often fails to account sufficiently for all the data in some cases . | In this paper, the authors first propose a simple weighted least squares method to compute the "learning curve" (error plotted against dataset size) , where error is modelled with the form error = alpha - eta*n^gamma, for parameters alpha, eta, gamma. Gamma is taken to be - 0.5, while alpha, eta are estimated from the data. This also allows an estimate of "data reliance", in essence the slope of error wrt dataset size, computing how much error decrease is dependent on dataset size. | SP:503051a1584c3f2fe519fb8154c63b9066bb4a26 |
Whitening and second order optimization both destroy information about the dataset, and can make generalization impossible | 1 INTRODUCTION . Whitening is a data preprocessing step that removes correlations between input features ( see Fig . 1 ) . It is used across many scientific disciplines , including geology ( Gillespie et al. , 1986 ) , physics ( Jenet et al. , 2005 ) , machine learning ( Le Cun et al. , 1998 ) , linguistics ( Abney , 2007 ) , and chemistry ( Bro & Smilde , 2014 ) . It has a particularly rich history in neuroscience , where it has been proposed as a mechanism by which biological vision realizes Barlow ’ s redundancy reduction hypothesis ( Attneave , 1954 ; Barlow , 1961 ; Atick & Redlich , 1992 ; Dan et al. , 1996 ; Simoncelli & Olshausen , 2001 ) . Whitening is often recommended since , by standardizing the variances in each direction in feature space , it typically speeds up the convergence of learning algorithms ( Le Cun et al. , 1998 ; Wiesler & Ney , 2011 ) , and causes models to better capture contributions from low variance feature directions . Whitening can also encourage models to focus on more fundamental higher order statistics in data , by removing second order statistics ( Hyvärinen et al. , 2009 ) . Whitening has further been a direct inspiration for deep learning techniques such as batch normalization ( Ioffe & Szegedy , 2015 ) and dynamical isometry ( Pennington et al. , 2017 ; Xiao et al. , 2018 ) . 1.1 WHITENING DESTROYS INFORMATION USEFUL FOR GENERALIZATION . In the high dimensional setting , for any model with a fully connected first layer , we show theoretically and experimentally that whitening the data and then training with gradient descent or stochastic gradient descent ( SGD ) results in a model with poor or nonexistent generalization ability , depending on how the whitening transform is computed . We emphasize that , analytically , this result applies to any model whose first layer is fully connected , and is not restricted to linear models . Empirically , the results hold in an even larger context , including in convolutional networks . Here , the high dimensional setting corresponds to a number of input features which is comparable to or larger than the number of datapoints . While this setting does not usually arise in modern neural network applications , it is of particular relevance in fields where data collection is expensive or otherwise prohibitive ( Levesque et al. , 2012 ) , or where the data is intrinsically high dimensional ( Stringer et al. , 2019 ; Fusi et al. , 2016 ; Shyr , 2012 ; Martínez-Ramón et al. , 2006 ; Bruce et al. , 2002 ) , and is also the focus of increasing interest in statistics ( Wainwright , 2019 ) . The loss of generalization ability for high dimensional whitened datasets is due to the fact that whitening destroys information in the dataset , and that in high dimensional datasets whitening destroys all information which can be used for prediction . This is related to investigations of information loss due to PCA projection ( Geiger & Kubin , 2012 ) . Our result is not restricted to neural networks , and applies to any model in which the input is transformed by a dense matrix with isotropic weight initialization . 1.2 SECOND ORDER OPTIMIZATION HARMS GENERALIZATION SIMILARLY TO WHITENING . Second order optimization algorithms take advantage of information about the curvature of the loss landscape to take a more direct route to a minimum ( Boyd & Vandenberghe , 2004 ; Bottou et al. , 2018 ) . There are many approaches to second order or quasi-second order optimization ( Martens & Grosse , 2015 ; Dennis Jr & Moré , 1977 ; Broyden , 1970 ; Fletcher , 1970 ; Goldfarb , 1970 ; Shanno , 1970 ; Liu & Nocedal , 1989 ; Schraudolph et al. , 2007 ; Sunehag et al. , 2009 ; Martens , 2010 ; Byrd et al. , 2011 ; Vinyals & Povey , 2011 ; Lin et al. , 2008 ; Hennig , 2013 ; Byrd et al. , 2014 ; Sohl-Dickstein et al. , 2014 ; Desjardins et al. , 2015 ; Grosse & Martens , 2016 ; Martens et al. , 2018 ; George et al. , 2018 ; Zhang et al. , 2017 ; Botev et al. , 2017 ; Bollapragada et al. , 2018 ; Berahas et al. , 2019 ; Gupta et al. , 2018 ; Agarwal et al. , 2016 ; Duchi et al. , 2011 ; Shazeer & Stern , 2018 ; Anil et al. , 2019 ; Agarwal et al. , 2019 ; Lu et al. , 2018 ; Kingma & Ba , 2014 ; Zeiler , 2012 ; Tieleman & Hinton , 2012 ; Osawa et al. , 2020 ) , and there is active debate over whether second order optimization harms generalization ( Wilson et al. , 2017 ; Zhang et al. , 2018 ; 2019 ; Amari et al. , 2020 ; Vaswani et al. , 2020 ) . The measure of curvature used in these algorithms is often related to feature-feature covariance matrices of the input , and of intermediate activations ( Martens & Grosse , 2015 ) . In some situations , it is already known that second order optimization is equivalent to steepest descent training on whitened data ( Sohl-Dickstein , 2012 ; Martens & Grosse , 2015 ) . The similarities between whitening and second order optimization allow us to argue that pure second order optimization also prevents information about the input distribution from being leveraged during training , and can harm generalization ( see Figs . 3 , 4 ) . We do find , however , that when strongly regularized and carefully tuned , second order methods can lead to superior performance ( Fig . 5 ) . 2 THEORY OF WHITENING , SECOND ORDER OPTIMIZATION , AND GENERALIZATION . Consider a dataset X ∈ Rd×n consisting of n independent d-dimensional examples . We write F for the feature-feature second moment matrix and K for the sample-sample second moment matrix : F = XX > ∈ Rd×d , K = X > X ∈ Rn×n . ( 1 ) We assume that at least one of F or K is full rank . We omit normalization factors of 1/n and 1/d in the definitions of F and K , respectively , for notational simplicity in later sections . Note that as defined , K is also the Gram matrix of X . Definition 2.0.1 ( Whitening ) . Any linear transformation M s.t . X̂ = MX maps the eigenspectrum of F to ones and zeros , with the multiplicity of ones given by rank ( F ) . We consider the two cases n ≤ d and n ≥ d ( when n = d both cases apply ) . n ≥ d : F̂ = Id×d , K̂ = d∑ i=1 ûiû > i . n ≤ d : F̂ = n∑ j=1 v̂j v̂ > j , K̂ = I n×n . ( 2 ) Here , F̂ and K̂ denote the whitened second moment matrices , and the vectors ûi and v̂j are orthogonal unit vectors of dimension n and d respectively . Eq . 2 follows directly from the fact that X > X and XX > share nonzero eigenvalues . We are interested in understanding the effect of whitening on the performance of a trained model when evaluated on a test set . We will see that for models with a dense first layer ( eg , fully connected neural networks ) , the trained model depends on the training inputs only through K. In general , training dynamics and generalization performance can depend non-trivially on K. However , whitening trivializes K , and so eliminates the ability of the network and training algorithm to take advantage of information contained in it . 2.1 TRAINING DYNAMICS DEPEND ON THE TRAINING DATA ONLY THROUGH ITS SECOND MOMENTS . Consider a model f with a dense first layer Z : f ( X ) = gθ ( Z ) , Z = WX , ( 3 ) where W denotes the first layer weights and θ denotes all remaining parameters ( see Fig . 2 ( a ) ) . The structure of gθ ( · ) is unrestricted . W is initialized from an isotropic distribution . We study a supervised learning problem , in which each vector Xi corresponds to a label Yi.1 We adopt the notation Xtrain ∈ Rd×ntrain and Ytrain for the training inputs and labels , and write the corresponding second moment matrices as Ftrain and Ktrain . We consider models with loss L ( f ( X ) ; Y ) trained by SGD . The update rules are θt+1 = θt − η ∂L t ∂θt and W t+1 = W t − η ∂L t ∂W t = W t − η ∂L t ∂Zttrain X > train , ( 4 ) where t denotes the current training step , η is the learning rate , and Lt is the loss evaluated only on the minibatch used at step t. As a result , the activations Ztrain evolve as Zt+1train = Z t train − η ∂Lt ∂Zttrain X > trainXtrain = Z t train − η ∂Lt ∂Zttrain Ktrain . ( 5 ) Treating the weights , activations , and function predictions as random variables , with distributions induced by the initial distribution over W 0 , the update rules ( Eqs . 4-5 ) can be represented by the causal diagram in Fig . 2 ( b ) . We can now state one of our main results . Theorem 2.1.1 . Let f ( X ) be a function as in Eq . 3 , with linear first layer Z = WX , and additional parameters θ . Let W be initialized from an isotropic distribution . Further , let f ( X ) be trained via gradient descent on a training dataset Xtrain . The learned weights θt and first layer activations Zttrain are independent of Xtrain conditioned on Ktrain and Ytrain . In terms of mutual information I , we have I ( Zttrain , θt ; Xtrain | Ktrain , Ytrain ) = 0 ∀t . ( 6 ) Proof . To establish this result , we note that the first layer activation at initialization , Z0train , is a random variable due to random weight initialization , and only depends on Xtrain through Ktrain : I ( Z0train ; Xtrain | Ktrain ) = 0 . ( 7 ) This is a consequence of the isotropy of the initial weight distribution , explained in detail in Appendix A . Combining this with Eqs . 4-5 , the causal diagram for all of training is given by ( the black part of ) Fig . 2 ( c ) . The conditional independence of Eq . 6 follows from this diagram . 2.2 TEST SET PREDICTIONS DEPEND ON TRAIN AND TEST INPUTS ONLY THROUGH THEIR SECOND MOMENTS . Let Xtest ∈ Rd×ntest and Ytest be the test data . The test predictions ftest = f ( Xtest ) are determined by Zttest = W tXtest and θt . So far we have discussed the evolution of Ztrain . To identify sources of data dependence , we can write the evolution of the test set predictions Ztest over the course of training in a similar fashion : Zt+1test = Z t test − η ∂Lt ∂Zttrain Ktrain×test , ( 8 ) where Ktrain×test = X > trainXtest ∈ Rntrain×ntest . The initial first layer activations are independent of the training data , and depend on Xtest only through Ktest : I ( Z0test ; X | Ktest ) = 0 , ( 9 ) where X is the combined training and test data . If we denote the second moment matrix over this combined set by K , then the evolution of the test predictions is described by the ( purple part of the ) causal diagram in Fig . 2 ( c ) , from which we conclude the following . Theorem 2.2.1 . For a function f ( X ) as in Eq . 3 , trained with the update rules Eqs . 4-5 from an isotropic weight initialization , test predictions depend on the training data only through K and Ytrain . This is summarized in the mutual information statement I ( ftest ; X | K , Ytrain ) = 0 . ( 10 ) We emphasize that Theorem 2.2.1 applies to any model with a dense first layer , and is not limited to linear models . 1Our results also apply to unsupervised learning , which can be viewed as a special case of supervised learning where Yi contains no information . | In supervised learning tasks, it is common in practice to apply a *whitening* transformation to remove correlations between input features. This can improve the conditioning of the underlying data manifold, enabling faster convergence. This paper shows that for a large class of models --- models $f$ consisting of a fully-connected layer followed by an arbitrary parameterized function, $f(X) = g_\theta(WX)$ --- data whitening removes all information that is relevant for generalization. Furthermore, this has implications for the generalization ability of second-order methods such as Newton's method due to a well-known equivalence between Newton's method and steepest-descent applied to whitened data. The effects suggested by the presented theory are verified empirically, and the are additionally observed in convolutional neural networks, suggesting that the phenomenon could apply more broadly to more complicated connectionist models as well. | SP:5ad585e3d6d5f9f620d0d73d958de52ed90255e0 |
Whitening and second order optimization both destroy information about the dataset, and can make generalization impossible | 1 INTRODUCTION . Whitening is a data preprocessing step that removes correlations between input features ( see Fig . 1 ) . It is used across many scientific disciplines , including geology ( Gillespie et al. , 1986 ) , physics ( Jenet et al. , 2005 ) , machine learning ( Le Cun et al. , 1998 ) , linguistics ( Abney , 2007 ) , and chemistry ( Bro & Smilde , 2014 ) . It has a particularly rich history in neuroscience , where it has been proposed as a mechanism by which biological vision realizes Barlow ’ s redundancy reduction hypothesis ( Attneave , 1954 ; Barlow , 1961 ; Atick & Redlich , 1992 ; Dan et al. , 1996 ; Simoncelli & Olshausen , 2001 ) . Whitening is often recommended since , by standardizing the variances in each direction in feature space , it typically speeds up the convergence of learning algorithms ( Le Cun et al. , 1998 ; Wiesler & Ney , 2011 ) , and causes models to better capture contributions from low variance feature directions . Whitening can also encourage models to focus on more fundamental higher order statistics in data , by removing second order statistics ( Hyvärinen et al. , 2009 ) . Whitening has further been a direct inspiration for deep learning techniques such as batch normalization ( Ioffe & Szegedy , 2015 ) and dynamical isometry ( Pennington et al. , 2017 ; Xiao et al. , 2018 ) . 1.1 WHITENING DESTROYS INFORMATION USEFUL FOR GENERALIZATION . In the high dimensional setting , for any model with a fully connected first layer , we show theoretically and experimentally that whitening the data and then training with gradient descent or stochastic gradient descent ( SGD ) results in a model with poor or nonexistent generalization ability , depending on how the whitening transform is computed . We emphasize that , analytically , this result applies to any model whose first layer is fully connected , and is not restricted to linear models . Empirically , the results hold in an even larger context , including in convolutional networks . Here , the high dimensional setting corresponds to a number of input features which is comparable to or larger than the number of datapoints . While this setting does not usually arise in modern neural network applications , it is of particular relevance in fields where data collection is expensive or otherwise prohibitive ( Levesque et al. , 2012 ) , or where the data is intrinsically high dimensional ( Stringer et al. , 2019 ; Fusi et al. , 2016 ; Shyr , 2012 ; Martínez-Ramón et al. , 2006 ; Bruce et al. , 2002 ) , and is also the focus of increasing interest in statistics ( Wainwright , 2019 ) . The loss of generalization ability for high dimensional whitened datasets is due to the fact that whitening destroys information in the dataset , and that in high dimensional datasets whitening destroys all information which can be used for prediction . This is related to investigations of information loss due to PCA projection ( Geiger & Kubin , 2012 ) . Our result is not restricted to neural networks , and applies to any model in which the input is transformed by a dense matrix with isotropic weight initialization . 1.2 SECOND ORDER OPTIMIZATION HARMS GENERALIZATION SIMILARLY TO WHITENING . Second order optimization algorithms take advantage of information about the curvature of the loss landscape to take a more direct route to a minimum ( Boyd & Vandenberghe , 2004 ; Bottou et al. , 2018 ) . There are many approaches to second order or quasi-second order optimization ( Martens & Grosse , 2015 ; Dennis Jr & Moré , 1977 ; Broyden , 1970 ; Fletcher , 1970 ; Goldfarb , 1970 ; Shanno , 1970 ; Liu & Nocedal , 1989 ; Schraudolph et al. , 2007 ; Sunehag et al. , 2009 ; Martens , 2010 ; Byrd et al. , 2011 ; Vinyals & Povey , 2011 ; Lin et al. , 2008 ; Hennig , 2013 ; Byrd et al. , 2014 ; Sohl-Dickstein et al. , 2014 ; Desjardins et al. , 2015 ; Grosse & Martens , 2016 ; Martens et al. , 2018 ; George et al. , 2018 ; Zhang et al. , 2017 ; Botev et al. , 2017 ; Bollapragada et al. , 2018 ; Berahas et al. , 2019 ; Gupta et al. , 2018 ; Agarwal et al. , 2016 ; Duchi et al. , 2011 ; Shazeer & Stern , 2018 ; Anil et al. , 2019 ; Agarwal et al. , 2019 ; Lu et al. , 2018 ; Kingma & Ba , 2014 ; Zeiler , 2012 ; Tieleman & Hinton , 2012 ; Osawa et al. , 2020 ) , and there is active debate over whether second order optimization harms generalization ( Wilson et al. , 2017 ; Zhang et al. , 2018 ; 2019 ; Amari et al. , 2020 ; Vaswani et al. , 2020 ) . The measure of curvature used in these algorithms is often related to feature-feature covariance matrices of the input , and of intermediate activations ( Martens & Grosse , 2015 ) . In some situations , it is already known that second order optimization is equivalent to steepest descent training on whitened data ( Sohl-Dickstein , 2012 ; Martens & Grosse , 2015 ) . The similarities between whitening and second order optimization allow us to argue that pure second order optimization also prevents information about the input distribution from being leveraged during training , and can harm generalization ( see Figs . 3 , 4 ) . We do find , however , that when strongly regularized and carefully tuned , second order methods can lead to superior performance ( Fig . 5 ) . 2 THEORY OF WHITENING , SECOND ORDER OPTIMIZATION , AND GENERALIZATION . Consider a dataset X ∈ Rd×n consisting of n independent d-dimensional examples . We write F for the feature-feature second moment matrix and K for the sample-sample second moment matrix : F = XX > ∈ Rd×d , K = X > X ∈ Rn×n . ( 1 ) We assume that at least one of F or K is full rank . We omit normalization factors of 1/n and 1/d in the definitions of F and K , respectively , for notational simplicity in later sections . Note that as defined , K is also the Gram matrix of X . Definition 2.0.1 ( Whitening ) . Any linear transformation M s.t . X̂ = MX maps the eigenspectrum of F to ones and zeros , with the multiplicity of ones given by rank ( F ) . We consider the two cases n ≤ d and n ≥ d ( when n = d both cases apply ) . n ≥ d : F̂ = Id×d , K̂ = d∑ i=1 ûiû > i . n ≤ d : F̂ = n∑ j=1 v̂j v̂ > j , K̂ = I n×n . ( 2 ) Here , F̂ and K̂ denote the whitened second moment matrices , and the vectors ûi and v̂j are orthogonal unit vectors of dimension n and d respectively . Eq . 2 follows directly from the fact that X > X and XX > share nonzero eigenvalues . We are interested in understanding the effect of whitening on the performance of a trained model when evaluated on a test set . We will see that for models with a dense first layer ( eg , fully connected neural networks ) , the trained model depends on the training inputs only through K. In general , training dynamics and generalization performance can depend non-trivially on K. However , whitening trivializes K , and so eliminates the ability of the network and training algorithm to take advantage of information contained in it . 2.1 TRAINING DYNAMICS DEPEND ON THE TRAINING DATA ONLY THROUGH ITS SECOND MOMENTS . Consider a model f with a dense first layer Z : f ( X ) = gθ ( Z ) , Z = WX , ( 3 ) where W denotes the first layer weights and θ denotes all remaining parameters ( see Fig . 2 ( a ) ) . The structure of gθ ( · ) is unrestricted . W is initialized from an isotropic distribution . We study a supervised learning problem , in which each vector Xi corresponds to a label Yi.1 We adopt the notation Xtrain ∈ Rd×ntrain and Ytrain for the training inputs and labels , and write the corresponding second moment matrices as Ftrain and Ktrain . We consider models with loss L ( f ( X ) ; Y ) trained by SGD . The update rules are θt+1 = θt − η ∂L t ∂θt and W t+1 = W t − η ∂L t ∂W t = W t − η ∂L t ∂Zttrain X > train , ( 4 ) where t denotes the current training step , η is the learning rate , and Lt is the loss evaluated only on the minibatch used at step t. As a result , the activations Ztrain evolve as Zt+1train = Z t train − η ∂Lt ∂Zttrain X > trainXtrain = Z t train − η ∂Lt ∂Zttrain Ktrain . ( 5 ) Treating the weights , activations , and function predictions as random variables , with distributions induced by the initial distribution over W 0 , the update rules ( Eqs . 4-5 ) can be represented by the causal diagram in Fig . 2 ( b ) . We can now state one of our main results . Theorem 2.1.1 . Let f ( X ) be a function as in Eq . 3 , with linear first layer Z = WX , and additional parameters θ . Let W be initialized from an isotropic distribution . Further , let f ( X ) be trained via gradient descent on a training dataset Xtrain . The learned weights θt and first layer activations Zttrain are independent of Xtrain conditioned on Ktrain and Ytrain . In terms of mutual information I , we have I ( Zttrain , θt ; Xtrain | Ktrain , Ytrain ) = 0 ∀t . ( 6 ) Proof . To establish this result , we note that the first layer activation at initialization , Z0train , is a random variable due to random weight initialization , and only depends on Xtrain through Ktrain : I ( Z0train ; Xtrain | Ktrain ) = 0 . ( 7 ) This is a consequence of the isotropy of the initial weight distribution , explained in detail in Appendix A . Combining this with Eqs . 4-5 , the causal diagram for all of training is given by ( the black part of ) Fig . 2 ( c ) . The conditional independence of Eq . 6 follows from this diagram . 2.2 TEST SET PREDICTIONS DEPEND ON TRAIN AND TEST INPUTS ONLY THROUGH THEIR SECOND MOMENTS . Let Xtest ∈ Rd×ntest and Ytest be the test data . The test predictions ftest = f ( Xtest ) are determined by Zttest = W tXtest and θt . So far we have discussed the evolution of Ztrain . To identify sources of data dependence , we can write the evolution of the test set predictions Ztest over the course of training in a similar fashion : Zt+1test = Z t test − η ∂Lt ∂Zttrain Ktrain×test , ( 8 ) where Ktrain×test = X > trainXtest ∈ Rntrain×ntest . The initial first layer activations are independent of the training data , and depend on Xtest only through Ktest : I ( Z0test ; X | Ktest ) = 0 , ( 9 ) where X is the combined training and test data . If we denote the second moment matrix over this combined set by K , then the evolution of the test predictions is described by the ( purple part of the ) causal diagram in Fig . 2 ( c ) , from which we conclude the following . Theorem 2.2.1 . For a function f ( X ) as in Eq . 3 , trained with the update rules Eqs . 4-5 from an isotropic weight initialization , test predictions depend on the training data only through K and Ytrain . This is summarized in the mutual information statement I ( ftest ; X | K , Ytrain ) = 0 . ( 10 ) We emphasize that Theorem 2.2.1 applies to any model with a dense first layer , and is not limited to linear models . 1Our results also apply to unsupervised learning , which can be viewed as a special case of supervised learning where Yi contains no information . | The authors analyse the training dynamics of a machine learning model consisting in a linear unit, followed by any parametrized function. The authors in particular focus on the impact of whitening the data beforehand or using second order methods. They show that the learned parameters of the model only depend on the training data through its Gram matrix. Since whitening trivializes the Gram matrix, the authors argue that whitening destroys important information. | SP:5ad585e3d6d5f9f620d0d73d958de52ed90255e0 |
Self-Supervised Policy Adaptation during Deployment | 1 INTRODUCTION . Deep reinforcement learning ( RL ) has achieved considerable success when combined with convolutional neural networks for deriving actions from image pixels ( Mnih et al. , 2013 ; Levine et al. , 2016 ; Nair et al. , 2018 ; Yan et al. , 2020 ; Andrychowicz et al. , 2020 ) . However , one significant challenge for real-world deployment of vision-based RL remains : a policy trained in one environment might not generalize to other new environments not seen during training . Already hard for RL alone , the challenge is exacerbated when a policy faces high-dimensional visual inputs . A well explored class of solutions is to learn robust policies that are simply invariant to changes in the environment ( Rajeswaran et al. , 2016 ; Tobin et al. , 2017 ; Sadeghi & Levine , 2016 ; Pinto et al. , 2017b ; Lee et al. , 2019 ) . For example , domain randomization ( Tobin et al. , 2017 ; Peng et al. , 2018 ; Pinto et al. , 2017a ; Yang et al. , 2019 ) applies data augmentation in a simulated environment to train a single robust policy , with the hope that the augmented environment covers enough factors of variation in the test environment . However , this hope may be difficult to realize when the test environment is truly unknown . With too much randomization , training a policy that can simultaneously fit numerous augmented environments requires much larger model and sample complexity . With too little randomization , the actual changes in the test environment might not be covered , and domain randomization may do more harm than good since the randomized factors are now irrelevant . Both phenomena have been observed in our experiments . In all cases , this class of solutions requires human experts to anticipate the changes before the test environment is seen . This can not scale as more test environments are added with more diverse changes . Instead of learning a robust policy invariant to all possible environmental changes , we argue that it is better for a policy to keep learning during deployment and adapt to its actual new environment . A naive way to implement this in RL is to fine-tune the policy in the new environment using rewards as supervision ( Rusu et al. , 2016 ; Kalashnikov et al. , 2018 ; Julian et al. , 2020 ) . However , while it is relatively easy to craft a dense reward function during training ( Gu et al. , 2017 ; Pinto & Gupta , 2016 ) , during deployment it is often impractical and may require substantial engineering efforts . 1Webpage and implementation : https : //nicklashansen.github.io/PAD/ In this paper , we tackle an alternative problem setting in vision-based RL : adapting a pre-trained policy to an unknown environment without any reward . We do this by introducing self-supervision to obtain “ free ” training signal during deployment . Standard self-supervised learning employs auxiliary tasks designed to automatically create training labels using only the input data ( see Section 2 for details ) . Inspired by this , our policy is jointly trained with two objectives : a standard RL objective and , additionally , a self-supervised objective applied on an intermediate representation of the policy network . During training , both objectives are active , maximizing expected reward and simultaneously constraining the intermediate representation through self-supervision . During testing / deployment , only the self-supervised objective ( on the raw observational data ) remains active , forcing the intermediate representation to adapt to the new environment . We perform experiments both in simulation and with a real robot . In simulation , we evaluate on two sets of environments : DeepMind Control suite ( Tassa et al. , 2018 ) and the CRLMaze ViZDoom ( Lomonaco et al. , 2019 ; Wydmuch et al. , 2018 ) navigation task . We evaluate generalization by testing in new environments with visual changes unknown during training . Our method improves generalization in 19 out of 22 test environments across various tasks in DeepMind Control suite , and in all considered test environments on CRLMaze . Besides simulations , we also perform Sim2Real transfer on both reaching and pushing tasks with a Kinova Gen3 robot . After training in simulation , we successfully transfer and adapt policies to 6 different environments , including continuously changing disco lights , on a real robot operating solely from an uncalibrated camera . In both simulation and real experiments , our approach outperforms domain randomization in most environments . 2 RELATED WORK . Self-supervised learning is a powerful way to learn visual representations from unlabeled data ( Vincent et al. , 2008 ; Doersch et al. , 2015 ; Wang & Gupta , 2015 ; Zhang et al. , 2016 ; Pathak et al. , 2016 ; Noroozi & Favaro , 2016 ; Zhang et al. , 2017 ; Gidaris et al. , 2018 ) . Researchers have proposed to use auxiliary data prediction tasks , such as undoing rotation ( Gidaris et al. , 2018 ) , solving a jigsaw puzzle ( Noroozi & Favaro , 2016 ) , tracking ( Wang et al. , 2019 ) , etc . to provide supervision in lieu of labels . In RL , the idea of learning visual representations and action at the same time has been investigated ( Lange & Riedmiller , 2010 ; Jaderberg et al. , 2016 ; Pathak et al. , 2017 ; Ha & Schmidhuber , 2018 ; Yarats et al. , 2019 ; Srinivas et al. , 2020 ; Laskin et al. , 2020 ; Yan et al. , 2020 ) . For example , Srinivas et al . ( 2020 ) use self-supervised contrastive learning techniques ( Chen et al. , 2020 ; Hénaff et al. , 2019 ; Wu et al. , 2018 ; He et al. , 2020 ) to improve sample efficiency in RL by jointly training the self-supervised objective and RL objective . However , this has not been shown to generalize to unseen environments . Other works have applied self-supervision for better generalization across environments ( Pathak et al. , 2017 ; Ebert et al. , 2018 ; Sekar et al. , 2020 ) . For example , Pathak et al . ( 2017 ) use a self-supervised prediction task to provide dense rewards for exploration in novel environments . While results on environment exploration from scratch are encouraging , how to transfer a trained policy ( with extrinsic reward ) to a novel environment remains unclear . Hence , these methods are not directly applicable to the proposed problem in our paper . Generalization across different distributions is a central challenge in machine learning . In domain adaptation , target domain data is assumed to be accessible ( Geirhos et al. , 2018 ; Tzeng et al. , 2017 ; Ganin et al. , 2016 ; Gong et al. , 2012 ; Long et al. , 2016 ; Sun et al. , 2019 ; Julian et al. , 2020 ) . For example , Tzeng et al . ( 2017 ) use adversarial learning to align the feature representations in both the source and target domain during training . Similarly , the setting of domain generalization ( Ghifary et al. , 2015 ; Li et al. , 2018 ; Matsuura & Harada , 2019 ) assumes that all domains are sampled from the same meta distribution , but the same challenge remains and now becomes generalization across meta-distributions . Our work focuses instead on the setting of generalizing to truly unseen changes in the environment which can not be anticipated at training time . There have been several recent benchmarks in our setting for image recognition ( Hendrycks & Dietterich , 2018 ; Recht et al. , 2018 ; 2019 ; Shankar et al. , 2019 ) . For example , in Hendrycks & Dietterich ( 2018 ) , a classifier trained on regular images is tested on corrupted images , with corruption types unknown during training ; the method of Hendrycks et al . ( 2019 ) is proposed to improve robustness on this benchmark . Following similar spirit , in the context of RL , domain randomization ( Tobin et al. , 2017 ; Pinto et al. , 2017a ; Peng et al. , 2018 ; Ramos et al. , 2019 ; Yang et al. , 2019 ; James et al. , 2019 ) helps a policy trained in simulation to generalize to real robots . For example , Tobin et al . ( 2017 ) ; Sadeghi & Levine ( 2016 ) propose to render the simulation environment with random textures and train the policy on top . The learned policy is shown to generalize to real robot manipulation tasks . Instead of deploying a fixed policy , we train and adapt the policy to the new environment with observational data that is naturally revealed during deployment . Test-time adaptation for deep learning is starting to be used in computer vision ( Shocher et al. , 2017 ; 2018 ; Bau et al. , 2019 ; Mullapudi et al. , 2019 ; Sun et al. , 2020 ; Wortsman et al. , 2018 ) . For example , Shocher et al . ( 2018 ) shows that image super-resolution can be learned at test time ( from scratch ) simply by trying to upsample a downsampled version of the input image . Bau et al . ( 2019 ) show that adapting the prior of a generative adversarial network to the statistics of the test image improves photo manipulation tasks . Our work is closely related to the test-time training method of Sun et al . ( 2020 ) , which performs joint optimization of image recognition and self-supervised learning with rotation prediction ( Gidaris et al. , 2018 ) , then uses the self-supervised objective to adapt the representation of individual images during testing . Instead of image recognition , we perform test-time adaptation for RL with visual inputs in an online fashion . As the agent interacts with an environment , we keep obtaining new observational data in a stream for training the visual representations . 3 METHOD . In this section , we describe our proposed Policy Adaptation during Deployment ( PAD ) approach . It can be implemented on top of any policy network and standard RL algorithm ( both on-policy and off-policy ) that can be described by minimizing some RL objective J ( θ ) w.r.t . the collection of parameters θ using stochastic gradient descent . 3.1 NETWORK ARCHITECTURE . We design the network architecture to allow the policy and the self-supervised prediction to share features . For the collection of parameters θ of a given policy network π , we split it sequentially into θ = ( θe , θa ) , where θe collects the parameters of the feature extractor , and θa is the head that outputs a distribution over actions . We define networks πe with parameters θe and πa with parameters θa such that π ( s ; θ ) = πa ( πe ( s ) ) , where s represents an image observation . Intuitively , one can think of πe as a feature extractor , and πa as a controller based on these features . The goal of our method is to update πe at test-time using gradients from a self-supervised task , such that πe ( and consequently πθ ) can generalize . Let πs with parameters θs be the self-supervised prediction head and its collection of parameters , and the input to πs be the output of πe ( as illustrated in Figure 1 ) . In this work , the self-supervised task is inverse dynamics prediction for control , and rotation prediction for navigation . | This paper studies an important problem in vision-based RL: how to adapt a pre-trained policy to an unseen environment in a self-supervised manner. To do this, the authors introduce an auxiliary task branch that can be used to tune the intermediate representation of the policy network on the fly in a self-supervised manner(e.g. inverse dynamic prediction). The experiments in the DeepMind Control suite, CRLMaze, and robot manipulation tasks show the generalization and effectiveness of the proposed method in various vision-based RL problems. | SP:ee3f3ba07e22b31ba47ef01b1fc523bbbddddd5c |
Self-Supervised Policy Adaptation during Deployment | 1 INTRODUCTION . Deep reinforcement learning ( RL ) has achieved considerable success when combined with convolutional neural networks for deriving actions from image pixels ( Mnih et al. , 2013 ; Levine et al. , 2016 ; Nair et al. , 2018 ; Yan et al. , 2020 ; Andrychowicz et al. , 2020 ) . However , one significant challenge for real-world deployment of vision-based RL remains : a policy trained in one environment might not generalize to other new environments not seen during training . Already hard for RL alone , the challenge is exacerbated when a policy faces high-dimensional visual inputs . A well explored class of solutions is to learn robust policies that are simply invariant to changes in the environment ( Rajeswaran et al. , 2016 ; Tobin et al. , 2017 ; Sadeghi & Levine , 2016 ; Pinto et al. , 2017b ; Lee et al. , 2019 ) . For example , domain randomization ( Tobin et al. , 2017 ; Peng et al. , 2018 ; Pinto et al. , 2017a ; Yang et al. , 2019 ) applies data augmentation in a simulated environment to train a single robust policy , with the hope that the augmented environment covers enough factors of variation in the test environment . However , this hope may be difficult to realize when the test environment is truly unknown . With too much randomization , training a policy that can simultaneously fit numerous augmented environments requires much larger model and sample complexity . With too little randomization , the actual changes in the test environment might not be covered , and domain randomization may do more harm than good since the randomized factors are now irrelevant . Both phenomena have been observed in our experiments . In all cases , this class of solutions requires human experts to anticipate the changes before the test environment is seen . This can not scale as more test environments are added with more diverse changes . Instead of learning a robust policy invariant to all possible environmental changes , we argue that it is better for a policy to keep learning during deployment and adapt to its actual new environment . A naive way to implement this in RL is to fine-tune the policy in the new environment using rewards as supervision ( Rusu et al. , 2016 ; Kalashnikov et al. , 2018 ; Julian et al. , 2020 ) . However , while it is relatively easy to craft a dense reward function during training ( Gu et al. , 2017 ; Pinto & Gupta , 2016 ) , during deployment it is often impractical and may require substantial engineering efforts . 1Webpage and implementation : https : //nicklashansen.github.io/PAD/ In this paper , we tackle an alternative problem setting in vision-based RL : adapting a pre-trained policy to an unknown environment without any reward . We do this by introducing self-supervision to obtain “ free ” training signal during deployment . Standard self-supervised learning employs auxiliary tasks designed to automatically create training labels using only the input data ( see Section 2 for details ) . Inspired by this , our policy is jointly trained with two objectives : a standard RL objective and , additionally , a self-supervised objective applied on an intermediate representation of the policy network . During training , both objectives are active , maximizing expected reward and simultaneously constraining the intermediate representation through self-supervision . During testing / deployment , only the self-supervised objective ( on the raw observational data ) remains active , forcing the intermediate representation to adapt to the new environment . We perform experiments both in simulation and with a real robot . In simulation , we evaluate on two sets of environments : DeepMind Control suite ( Tassa et al. , 2018 ) and the CRLMaze ViZDoom ( Lomonaco et al. , 2019 ; Wydmuch et al. , 2018 ) navigation task . We evaluate generalization by testing in new environments with visual changes unknown during training . Our method improves generalization in 19 out of 22 test environments across various tasks in DeepMind Control suite , and in all considered test environments on CRLMaze . Besides simulations , we also perform Sim2Real transfer on both reaching and pushing tasks with a Kinova Gen3 robot . After training in simulation , we successfully transfer and adapt policies to 6 different environments , including continuously changing disco lights , on a real robot operating solely from an uncalibrated camera . In both simulation and real experiments , our approach outperforms domain randomization in most environments . 2 RELATED WORK . Self-supervised learning is a powerful way to learn visual representations from unlabeled data ( Vincent et al. , 2008 ; Doersch et al. , 2015 ; Wang & Gupta , 2015 ; Zhang et al. , 2016 ; Pathak et al. , 2016 ; Noroozi & Favaro , 2016 ; Zhang et al. , 2017 ; Gidaris et al. , 2018 ) . Researchers have proposed to use auxiliary data prediction tasks , such as undoing rotation ( Gidaris et al. , 2018 ) , solving a jigsaw puzzle ( Noroozi & Favaro , 2016 ) , tracking ( Wang et al. , 2019 ) , etc . to provide supervision in lieu of labels . In RL , the idea of learning visual representations and action at the same time has been investigated ( Lange & Riedmiller , 2010 ; Jaderberg et al. , 2016 ; Pathak et al. , 2017 ; Ha & Schmidhuber , 2018 ; Yarats et al. , 2019 ; Srinivas et al. , 2020 ; Laskin et al. , 2020 ; Yan et al. , 2020 ) . For example , Srinivas et al . ( 2020 ) use self-supervised contrastive learning techniques ( Chen et al. , 2020 ; Hénaff et al. , 2019 ; Wu et al. , 2018 ; He et al. , 2020 ) to improve sample efficiency in RL by jointly training the self-supervised objective and RL objective . However , this has not been shown to generalize to unseen environments . Other works have applied self-supervision for better generalization across environments ( Pathak et al. , 2017 ; Ebert et al. , 2018 ; Sekar et al. , 2020 ) . For example , Pathak et al . ( 2017 ) use a self-supervised prediction task to provide dense rewards for exploration in novel environments . While results on environment exploration from scratch are encouraging , how to transfer a trained policy ( with extrinsic reward ) to a novel environment remains unclear . Hence , these methods are not directly applicable to the proposed problem in our paper . Generalization across different distributions is a central challenge in machine learning . In domain adaptation , target domain data is assumed to be accessible ( Geirhos et al. , 2018 ; Tzeng et al. , 2017 ; Ganin et al. , 2016 ; Gong et al. , 2012 ; Long et al. , 2016 ; Sun et al. , 2019 ; Julian et al. , 2020 ) . For example , Tzeng et al . ( 2017 ) use adversarial learning to align the feature representations in both the source and target domain during training . Similarly , the setting of domain generalization ( Ghifary et al. , 2015 ; Li et al. , 2018 ; Matsuura & Harada , 2019 ) assumes that all domains are sampled from the same meta distribution , but the same challenge remains and now becomes generalization across meta-distributions . Our work focuses instead on the setting of generalizing to truly unseen changes in the environment which can not be anticipated at training time . There have been several recent benchmarks in our setting for image recognition ( Hendrycks & Dietterich , 2018 ; Recht et al. , 2018 ; 2019 ; Shankar et al. , 2019 ) . For example , in Hendrycks & Dietterich ( 2018 ) , a classifier trained on regular images is tested on corrupted images , with corruption types unknown during training ; the method of Hendrycks et al . ( 2019 ) is proposed to improve robustness on this benchmark . Following similar spirit , in the context of RL , domain randomization ( Tobin et al. , 2017 ; Pinto et al. , 2017a ; Peng et al. , 2018 ; Ramos et al. , 2019 ; Yang et al. , 2019 ; James et al. , 2019 ) helps a policy trained in simulation to generalize to real robots . For example , Tobin et al . ( 2017 ) ; Sadeghi & Levine ( 2016 ) propose to render the simulation environment with random textures and train the policy on top . The learned policy is shown to generalize to real robot manipulation tasks . Instead of deploying a fixed policy , we train and adapt the policy to the new environment with observational data that is naturally revealed during deployment . Test-time adaptation for deep learning is starting to be used in computer vision ( Shocher et al. , 2017 ; 2018 ; Bau et al. , 2019 ; Mullapudi et al. , 2019 ; Sun et al. , 2020 ; Wortsman et al. , 2018 ) . For example , Shocher et al . ( 2018 ) shows that image super-resolution can be learned at test time ( from scratch ) simply by trying to upsample a downsampled version of the input image . Bau et al . ( 2019 ) show that adapting the prior of a generative adversarial network to the statistics of the test image improves photo manipulation tasks . Our work is closely related to the test-time training method of Sun et al . ( 2020 ) , which performs joint optimization of image recognition and self-supervised learning with rotation prediction ( Gidaris et al. , 2018 ) , then uses the self-supervised objective to adapt the representation of individual images during testing . Instead of image recognition , we perform test-time adaptation for RL with visual inputs in an online fashion . As the agent interacts with an environment , we keep obtaining new observational data in a stream for training the visual representations . 3 METHOD . In this section , we describe our proposed Policy Adaptation during Deployment ( PAD ) approach . It can be implemented on top of any policy network and standard RL algorithm ( both on-policy and off-policy ) that can be described by minimizing some RL objective J ( θ ) w.r.t . the collection of parameters θ using stochastic gradient descent . 3.1 NETWORK ARCHITECTURE . We design the network architecture to allow the policy and the self-supervised prediction to share features . For the collection of parameters θ of a given policy network π , we split it sequentially into θ = ( θe , θa ) , where θe collects the parameters of the feature extractor , and θa is the head that outputs a distribution over actions . We define networks πe with parameters θe and πa with parameters θa such that π ( s ; θ ) = πa ( πe ( s ) ) , where s represents an image observation . Intuitively , one can think of πe as a feature extractor , and πa as a controller based on these features . The goal of our method is to update πe at test-time using gradients from a self-supervised task , such that πe ( and consequently πθ ) can generalize . Let πs with parameters θs be the self-supervised prediction head and its collection of parameters , and the input to πs be the output of πe ( as illustrated in Figure 1 ) . In this work , the self-supervised task is inverse dynamics prediction for control , and rotation prediction for navigation . | The authors present a method for online policy adaptation during domain transfer in the case no reward is available in the target domain. They achieve this by adding an auxiliary self-supervised task, such as inverse dynamics prediction, that helps shape a set of features shared with the policy during training. At test time, gradient updates are then performed on these shared features based on only the self-supervised loss. The authors evaluate their method on a number of visual continuous control tasks and discrete navigation tasks and show a significant improvement over direct transfer, domain randomisation, and using self-supervision only during training. | SP:ee3f3ba07e22b31ba47ef01b1fc523bbbddddd5c |
A Neural Network MCMC sampler that maximizes Proposal Entropy | 1 INTRODUCTION . Sampling from unnormalized distributions is important for many applications , including statistics , simulations of physical systems , and machine learning . However , the inefficiency of state-of-the-art sampling methods remains a main bottleneck for many challenging applications , such as protein folding ( Noé et al. , 2019 ) , energy-based model training ( Nijkamp et al. , 2019 ) , etc . A prominent strategy for sampling is the Markov Chain Monte Carlo ( MCMC ) method ( Neal , 1993 ) . In MCMC , one chooses a transition kernel that leaves the target distribution invariant and constructs a Markov Chain by applying the kernel repeatedly . The MCMC method relies only on the ergodicity assumption , other than that it is general . If enough computation is performed , the Markov chain generates correct samples from any target distribution , no matter how complex the distribution is . However , the performance of MCMC depends critically on how well the chosen transition kernel explores the state space of the problem . If exploration is ineffective , samples will be highly correlated and of very limited use for downstream applications . Despite some favorable theoretical argument on the effectiveness of some MCMC algorithms , practical implementation of them may still suffer from inefficiencies . Take , for example , the Hamiltonian Monte Carlo ( HMC ) ( Neal et al. , 2011 ) algorithm , a type of MCMC technique . HMC is regarded state-of-the-art for sampling in continuous spaces Radivojević & Akhmatskaya ( 2020 ) . It uses a set of auxiliary momentum variables and generates new samples by simulating a Hamiltonian dynamics starting from the previous sample . This allows the sample to travel in state space much further than possible with other techniques , most of whom have more pronounced random walk behavior . Theoretical analysis shows that the cost of traversing a d-dimensional state space and generating an uncorrelated proposal is O ( d 1 4 ) for HMC , which is lower than O ( d 1 3 ) for Langevine Monte Carlo , and O ( d ) for random walk . However , unfavorable geometry of a target distribution may still cause HMC to be ineffective because the Hamiltonian dynamics has to be simulated numerically . Numerical errors in the simulation are commonly corrected by a Metropolis-Hastings ( MH ) accept-reject step for a proposed sample . If the the target distribution has unfavorable geometric properties , for example , very different variances along different directions , the numerical integrator in HMC will have high error , leading to a very low accept probability ( Betancourt et al. , 2017 ) . For simple distributions this inefficiency can be mitigated by an adaptive re-scaling matrix ( Neal et al. , 2011 ) . For analytically tractable distributions , one can also use the Riemann manifold HMC method ( Girolami & Calderhead , 2011 ) . But in most other cases , the Hessian required in Riemann manifold HMC algorithm is often intractable or expensive to compute , preventing its application . Recently , approaches have been proposed that possess the exact sampling property of the MCMC method , while potentially mitigating the described issues with unfavorable geometry . Such approaches include MCMC samplers augmented with neural networks ( Song et al. , 2017 ; Levy et al. , 2018 ; Gu et al. , 2019 ) , and neural transport MCMC techniques ( Hoffman et al. , 2019 ; Nijkamp et al. , 2020 ) . A disadvantage of these recent techniques is that their objectives optimize the quality of proposed samples , but do not explicitly encourage exploration speed of the sampler . One notable exception is L2HMC ( Levy et al. , 2018 ) , a method whose objective includes the size of the expected L2 jump , thereby encouraging exploration . But the L2 expected jump objective is not very general , it only works for simple distributions ( see Figure 1 , and below ) . Another recent work ( Titsias & Dellaportas , 2019 ) proposed a quite general objective to encourage exploration speed by maximizing the entropy of the proposal distribution . In continuous space , the entropy of a distribution is essentially the logarithm of its volume in state space . Thus , the entropy objective naturally encourages the proposal distribution to “ fill up ” the target state space as well as possible , independent of the geometry of the target distribution . The authors demonstrated the effectiveness of this objective on samplers with simple linear adaptive parameters . Here we employ the entropy-based objective in a neural network MCMC sampler for optimizing exploration speed . To build the model , we design a flexible proposal distribution for which the optimization of the entropy objective is tractable . Inspired by the HMC algorithm , the proposed sampler uses special architecture that utilizes the gradient of the target distribution to aid sampling . For a 2-D distribution the behavior of the proposed model is illustrated in Figure 1 . The sampler , trained with the entropy-based objective , generates samples that explore the target distribution quite well , while it is simple to construct a proposal with higher L2 expected jump ( right panel ) . Later we show the newly proposed method achieves significant improvement in sampling efficiency compared to previous techniques , we then apply the method to the training of an energy-based image model . 2 PRELIMINARY : MCMC METHODS , FROM VANILLA TO LEARNED . Consider the problem of sampling from a target distribution p ( x ) = e−U ( x ) /Z defined by the energy function U ( x ) in a continuous state space . MCMC methods solve the problem by constructing and running a Markov Chain , with transition probability p ( x′|x ) , that leaves p ( x ) invariant . The most general invariance condition is : p ( x′ ) = ∫ p ( x′|x ) p ( x ) dx for all x′ , which is typically enforced by the simpler but more stringent condition ofdetailed balance : p ( x ) p ( x′|x ) = p ( x′ ) p ( x|x′ ) . For a general distribution p ( x ) it is difficult to directly construct p ( x′|x ) that satisfies detailed balance , but one can easily1 make any transition probability satisfy it by including an additional Metropolis-Hastings accept-reject step ( Hastings , 1970 ) . When we sample x′ at step t from an arbitrary proposal distribution q ( x′|xt ) , the M-H accept-reject process accepts the new sample xt+1 = x′ with probability A ( x′ , x ) = min ( 1 , p ( x ′ ) q ( xt|x′ ) p ( xt ) q ( x′|xt ) ) . If x′ is rejected , the new sample is set to the previous state xt+1 = xt . This transition kernel p ( x′|x ) constructed from q ( x′|x ) and A ( x′ , x ) leaves any target distribution p ( x ) invariant . The most popular MCMC techniques use the described M-H accept-reject step to enforce detailed balance , for example , Random Walk Metropolis ( RWM ) , Metropolis-Adjusted Langevin Algorithm ( MALA ) and Hamiltonian Monte Carlo ( HMC ) . For brevity , we will focus on MCMC methods that use the M-H step , although some alternatives do exist ( Sohl-Dickstein et al. , 2014 ) . All these methods share the requirement that the accept probability in the M-H step must be tractable to compute . For two of the mentioned MCMC methods this is indeed the case . In the Gaussian random-walk sampler , the proposal distribution is a Gaussian around the current position : x′ = x+ ∗N ( 0 , I ) , which has the form x′ = x+z . Thus , forward and reverse proposal probabilities are given by q ( x′|x ) = pN [ ( x′ − x ) / ] and q ( x|x′ ) = pN [ − ( x′ − x ) / ] , where pN denote the density function of Gaussian . The probability ratio q ( x t|x′ ) q ( x′|xt ) used in the M-H step is therefore equal to 1 . In MALA the proposal distribution is a single step of Langevin dynamics with step size : x′ = x+ z with z = − 2 2 ∂xU ( x ) + N ( 0 , I ) . We then have q ( x ′|x ) = pN [ ( x′ − x ) / + 2∂xU ( x ) ] and q ( x|x′ ) = pN [ − ( x′ − x ) / + 2∂x′U ( x ′ ) ] . Both , the forward and reverse proposal probability are tractable since they are the density of Gaussians evaluated at a known location . Next we show how the HMC sampler can also be formulated as a M-H sampler . Basic HMC involves a Gaussian auxiliary variable v of the same dimension as x , which plays the role of the momentum in Physics . HMC sampling consists of two steps : 1 . The momentum is sampled from a normal distribution N ( v ; 0 , I ) . 2 . The Hamiltonian dynamics is simulated for a certain duration with initial condition x and v , typically by running a few steps of the leapfrog integrator . Then , a M-H accept-reject process with accept probability A ( x′ , v′ , x , v ) = min ( 1 , p ( x ′ , v′ ) q ( x , v|x′ , v′ ) p ( x , v ) q ( x′ , v′|x , v ) ) = min ( 1 , p ( x ′ ) pN ( v ′ ) p ( x ) pN ( v ) ) is performed to correct for error in the integration process . We have q ( x , v|x′ , v′ ) q ( x′ , v′|x , v ) = 1 since the Hamiltonian transition is volume-preserving over ( x , v ) . Both HMC steps leave the joint distribution p ( x , v ) invariant , therefore HMC samples from the correct distribution p ( x ) after marginalizing over v. To express basic HMC in the standard M-H scheme , step 1 and 2 can be aggregated into a single proposal distribution on x with the proposal probability : q ( x′|x ) = pN ( v ) and q ( x|x′ ) = pN ( v′ ) . Note , although the probability q ( x′|x ) can be calculated after the Hamiltonian dynamics is simulated , this term is intractable for general x and x′ . The reason is that it is difficult to solve for the v at x to make the transition to x′ using the Hamiltonian dynamics . This issue is absent in RWM and MALA , where q ( x′|x ) is tractable for any x and x′ . Previous work on augmenting MCMC sampler with neural networks also relied on the M-H procedure to ensure asymptotic correctness of the sampling process , for example ( Song et al. , 2017 ) and ( Levy et al. , 2018 ) . They used HMC style accept-reject probabilities that lead to intractable q ( x′|x ) . Here , we strive for a flexible sampler for which q ( x′|x ) is tractable . This maintains the tractable M-H step while allowing us to train this sampler to explores the state space by directly optimizing the proposal entropy objective , which is a function of q ( x′|x ) . | The paper argues that a better objective to train neural MCMC kernels is to maximize the proposal entropy (Titsias & Dellaportas, 2019) and demonstrate a method on doing so. The method shows improved sampling efficiency compared to previous method, especially one that optimize the alternative L2 expected jump. The novelty is not of the training objective but a neural instantiation with improved sampling efficiency. | SP:e6d26523e1b8f59840142193dcdd740ded86e9fa |
A Neural Network MCMC sampler that maximizes Proposal Entropy | 1 INTRODUCTION . Sampling from unnormalized distributions is important for many applications , including statistics , simulations of physical systems , and machine learning . However , the inefficiency of state-of-the-art sampling methods remains a main bottleneck for many challenging applications , such as protein folding ( Noé et al. , 2019 ) , energy-based model training ( Nijkamp et al. , 2019 ) , etc . A prominent strategy for sampling is the Markov Chain Monte Carlo ( MCMC ) method ( Neal , 1993 ) . In MCMC , one chooses a transition kernel that leaves the target distribution invariant and constructs a Markov Chain by applying the kernel repeatedly . The MCMC method relies only on the ergodicity assumption , other than that it is general . If enough computation is performed , the Markov chain generates correct samples from any target distribution , no matter how complex the distribution is . However , the performance of MCMC depends critically on how well the chosen transition kernel explores the state space of the problem . If exploration is ineffective , samples will be highly correlated and of very limited use for downstream applications . Despite some favorable theoretical argument on the effectiveness of some MCMC algorithms , practical implementation of them may still suffer from inefficiencies . Take , for example , the Hamiltonian Monte Carlo ( HMC ) ( Neal et al. , 2011 ) algorithm , a type of MCMC technique . HMC is regarded state-of-the-art for sampling in continuous spaces Radivojević & Akhmatskaya ( 2020 ) . It uses a set of auxiliary momentum variables and generates new samples by simulating a Hamiltonian dynamics starting from the previous sample . This allows the sample to travel in state space much further than possible with other techniques , most of whom have more pronounced random walk behavior . Theoretical analysis shows that the cost of traversing a d-dimensional state space and generating an uncorrelated proposal is O ( d 1 4 ) for HMC , which is lower than O ( d 1 3 ) for Langevine Monte Carlo , and O ( d ) for random walk . However , unfavorable geometry of a target distribution may still cause HMC to be ineffective because the Hamiltonian dynamics has to be simulated numerically . Numerical errors in the simulation are commonly corrected by a Metropolis-Hastings ( MH ) accept-reject step for a proposed sample . If the the target distribution has unfavorable geometric properties , for example , very different variances along different directions , the numerical integrator in HMC will have high error , leading to a very low accept probability ( Betancourt et al. , 2017 ) . For simple distributions this inefficiency can be mitigated by an adaptive re-scaling matrix ( Neal et al. , 2011 ) . For analytically tractable distributions , one can also use the Riemann manifold HMC method ( Girolami & Calderhead , 2011 ) . But in most other cases , the Hessian required in Riemann manifold HMC algorithm is often intractable or expensive to compute , preventing its application . Recently , approaches have been proposed that possess the exact sampling property of the MCMC method , while potentially mitigating the described issues with unfavorable geometry . Such approaches include MCMC samplers augmented with neural networks ( Song et al. , 2017 ; Levy et al. , 2018 ; Gu et al. , 2019 ) , and neural transport MCMC techniques ( Hoffman et al. , 2019 ; Nijkamp et al. , 2020 ) . A disadvantage of these recent techniques is that their objectives optimize the quality of proposed samples , but do not explicitly encourage exploration speed of the sampler . One notable exception is L2HMC ( Levy et al. , 2018 ) , a method whose objective includes the size of the expected L2 jump , thereby encouraging exploration . But the L2 expected jump objective is not very general , it only works for simple distributions ( see Figure 1 , and below ) . Another recent work ( Titsias & Dellaportas , 2019 ) proposed a quite general objective to encourage exploration speed by maximizing the entropy of the proposal distribution . In continuous space , the entropy of a distribution is essentially the logarithm of its volume in state space . Thus , the entropy objective naturally encourages the proposal distribution to “ fill up ” the target state space as well as possible , independent of the geometry of the target distribution . The authors demonstrated the effectiveness of this objective on samplers with simple linear adaptive parameters . Here we employ the entropy-based objective in a neural network MCMC sampler for optimizing exploration speed . To build the model , we design a flexible proposal distribution for which the optimization of the entropy objective is tractable . Inspired by the HMC algorithm , the proposed sampler uses special architecture that utilizes the gradient of the target distribution to aid sampling . For a 2-D distribution the behavior of the proposed model is illustrated in Figure 1 . The sampler , trained with the entropy-based objective , generates samples that explore the target distribution quite well , while it is simple to construct a proposal with higher L2 expected jump ( right panel ) . Later we show the newly proposed method achieves significant improvement in sampling efficiency compared to previous techniques , we then apply the method to the training of an energy-based image model . 2 PRELIMINARY : MCMC METHODS , FROM VANILLA TO LEARNED . Consider the problem of sampling from a target distribution p ( x ) = e−U ( x ) /Z defined by the energy function U ( x ) in a continuous state space . MCMC methods solve the problem by constructing and running a Markov Chain , with transition probability p ( x′|x ) , that leaves p ( x ) invariant . The most general invariance condition is : p ( x′ ) = ∫ p ( x′|x ) p ( x ) dx for all x′ , which is typically enforced by the simpler but more stringent condition ofdetailed balance : p ( x ) p ( x′|x ) = p ( x′ ) p ( x|x′ ) . For a general distribution p ( x ) it is difficult to directly construct p ( x′|x ) that satisfies detailed balance , but one can easily1 make any transition probability satisfy it by including an additional Metropolis-Hastings accept-reject step ( Hastings , 1970 ) . When we sample x′ at step t from an arbitrary proposal distribution q ( x′|xt ) , the M-H accept-reject process accepts the new sample xt+1 = x′ with probability A ( x′ , x ) = min ( 1 , p ( x ′ ) q ( xt|x′ ) p ( xt ) q ( x′|xt ) ) . If x′ is rejected , the new sample is set to the previous state xt+1 = xt . This transition kernel p ( x′|x ) constructed from q ( x′|x ) and A ( x′ , x ) leaves any target distribution p ( x ) invariant . The most popular MCMC techniques use the described M-H accept-reject step to enforce detailed balance , for example , Random Walk Metropolis ( RWM ) , Metropolis-Adjusted Langevin Algorithm ( MALA ) and Hamiltonian Monte Carlo ( HMC ) . For brevity , we will focus on MCMC methods that use the M-H step , although some alternatives do exist ( Sohl-Dickstein et al. , 2014 ) . All these methods share the requirement that the accept probability in the M-H step must be tractable to compute . For two of the mentioned MCMC methods this is indeed the case . In the Gaussian random-walk sampler , the proposal distribution is a Gaussian around the current position : x′ = x+ ∗N ( 0 , I ) , which has the form x′ = x+z . Thus , forward and reverse proposal probabilities are given by q ( x′|x ) = pN [ ( x′ − x ) / ] and q ( x|x′ ) = pN [ − ( x′ − x ) / ] , where pN denote the density function of Gaussian . The probability ratio q ( x t|x′ ) q ( x′|xt ) used in the M-H step is therefore equal to 1 . In MALA the proposal distribution is a single step of Langevin dynamics with step size : x′ = x+ z with z = − 2 2 ∂xU ( x ) + N ( 0 , I ) . We then have q ( x ′|x ) = pN [ ( x′ − x ) / + 2∂xU ( x ) ] and q ( x|x′ ) = pN [ − ( x′ − x ) / + 2∂x′U ( x ′ ) ] . Both , the forward and reverse proposal probability are tractable since they are the density of Gaussians evaluated at a known location . Next we show how the HMC sampler can also be formulated as a M-H sampler . Basic HMC involves a Gaussian auxiliary variable v of the same dimension as x , which plays the role of the momentum in Physics . HMC sampling consists of two steps : 1 . The momentum is sampled from a normal distribution N ( v ; 0 , I ) . 2 . The Hamiltonian dynamics is simulated for a certain duration with initial condition x and v , typically by running a few steps of the leapfrog integrator . Then , a M-H accept-reject process with accept probability A ( x′ , v′ , x , v ) = min ( 1 , p ( x ′ , v′ ) q ( x , v|x′ , v′ ) p ( x , v ) q ( x′ , v′|x , v ) ) = min ( 1 , p ( x ′ ) pN ( v ′ ) p ( x ) pN ( v ) ) is performed to correct for error in the integration process . We have q ( x , v|x′ , v′ ) q ( x′ , v′|x , v ) = 1 since the Hamiltonian transition is volume-preserving over ( x , v ) . Both HMC steps leave the joint distribution p ( x , v ) invariant , therefore HMC samples from the correct distribution p ( x ) after marginalizing over v. To express basic HMC in the standard M-H scheme , step 1 and 2 can be aggregated into a single proposal distribution on x with the proposal probability : q ( x′|x ) = pN ( v ) and q ( x|x′ ) = pN ( v′ ) . Note , although the probability q ( x′|x ) can be calculated after the Hamiltonian dynamics is simulated , this term is intractable for general x and x′ . The reason is that it is difficult to solve for the v at x to make the transition to x′ using the Hamiltonian dynamics . This issue is absent in RWM and MALA , where q ( x′|x ) is tractable for any x and x′ . Previous work on augmenting MCMC sampler with neural networks also relied on the M-H procedure to ensure asymptotic correctness of the sampling process , for example ( Song et al. , 2017 ) and ( Levy et al. , 2018 ) . They used HMC style accept-reject probabilities that lead to intractable q ( x′|x ) . Here , we strive for a flexible sampler for which q ( x′|x ) is tractable . This maintains the tractable M-H step while allowing us to train this sampler to explores the state space by directly optimizing the proposal entropy objective , which is a function of q ( x′|x ) . | This paper proposes a new MCMC transition kernel. This kernel is parameterized by neural networks and is optimized through an objective maximizing the proposal entropy. Specifically, the authors use a combination of a flow model and non-volume preserving flow in [Dinh et al., 2016] as the neural network parameterized kernel. Then they use the objective in [Titsias & Dellaportas, 2019] which maximizes the proposal entropy to optimize the kernel. The proposed method is tested on synthetic datasets, Bayesian logistic regression and a deep energy-based model. | SP:e6d26523e1b8f59840142193dcdd740ded86e9fa |
Learning to Recombine and Resample Data For Compositional Generalization | 1 INTRODUCTION How can we build machine learning models with the ability to learn new concepts in context from little data ? Human language learners acquire new word meanings from a single exposure ( Carey & Bartlett , 1978 ) , and immediately incorporate words and their meanings productively and compositionally into larger linguistic and conceptual systems ( Berko , 1958 ; Piantadosi & Aslin , 2016 ) . Despite the remarkable success of neural network models on many learning problems in recent years—including one-shot learning of classifiers and policies ( Santoro et al. , 2016 ; Wang et al. , 2016 ) —this kind of few-shot learning of composable concepts remains beyond the reach of standard neural models in both diagnostic and naturalistic settings ( Lake & Baroni , 2018 ; Bahdanau et al. , 2019a ) . Consider the few-shot morphology learning problem shown in Fig . 1 , in which a learner must predict various linguistic features ( e.g . 3rd person , SinGular , PRESent tense ) from word forms , with only a small number of examples of the PAST tense in the training set . Neural sequenceto-sequence models ( e.g . Bahdanau et al. , 2015 ) trained on this kind of imbalanced data fail to predict past-tense tags on held-out inputs of any kind ( Section 5 ) . Previous attempts to address this and related shortcomings in neural models have focused on explicitly encouraging rule-like behavior by e.g . modeling data with symbolic grammars ( Jia & Liang , 2016 ; Xiao et al. , 2016 ; Cai et al. , 2017 ) or applying rule-based data augmentation ( Andreas , 2020 ) . These procedures involve highly task-specific models or generative assumptions , preventing them from generalizing effectively to less structured problems that combine rule-like and exceptional behavior . More fundamentally , they fail to answer the question of whether explicit rules are necessary for compositional inductive bias , and whether it is possible to obtain “ rule-like ” inductive bias without appeal to an underlying symbolic generative process . This paper describes a procedure for improving few-shot compositional generalization in neural sequence models without symbolic scaffolding . Our key insight is that even fixed , imbalanced training datasets provide a rich source of supervision for few-shot learning of concepts and composition rules . In particular , we propose a new class of prototype-based neural sequence models ( c.f . Gu et al. , 2018 ) that can be directly trained to perform the kinds of generalization exhibited in Fig . 1 by explicitly recombining fragments of training examples to reconstruct other examples . Even when these prototype-based models are not effective as general-purpose predictors , we can resample their outputs to select high-quality synthetic examples of rare phenomena . Ordinary neural sequence models may then be trained on datasets augmented with these synthetic examples , distilling the learned regularities into more flexible predictors . This procedure , which we abbreviate R & R , promotes efficient generalization in both challenging synthetic sequence modeling tasks ( Lake & Baroni , 2018 ) and morphological analysis in multiple natural languages ( Cotterell et al. , 2018 ) . By directly optimizing for the kinds of generalization that symbolic representations are supposed to support , we can bypass the need for symbolic representations themselves : R & R gives performance comparable to or better than state-of-the-art neuro-symbolic approaches on tests of compositional generalization . Our results suggest that some failures of systematicity in neural models can be explained by simpler structural constraints on data distributions and corrected with weaker inductive bias than previously described.1 2 BACKGROUND AND RELATED WORK . Compositional generalization Systematic compositionality—the capacity to identify rule-like regularities from limited data and generalize these rules to novel situations—is an essential feature of human reasoning ( Fodor et al. , 1988 ) . While details vary , a common feature of existing attempts to formalize systematicity in sequence modeling problems ( e.g . Gordon et al. , 2020 ) is the intuition that learners should make accurate predictions in situations featuring novel combinations of previously observed input or output subsequences . For example , learners should generalize from actions seen in isolation to more complex commands involving those actions ( Lake et al. , 2019 ) , and from relations of the form r ( a , b ) to r ( b , a ) ( Keysers et al. , 2020 ; Bahdanau et al. , 2019b ) . In machine learning , previous studies have found that standard neural architectures fail to generalize systematically even when they achieve high in-distribution accuracy in a variety of settings ( Lake & Baroni , 2018 ; Bastings et al. , 2018 ; Johnson et al. , 2017 ) . Data augmentation and resampling Learning to predict sequential outputs with rare or novel subsequences is related to the widely studied problem of class imbalance in classification problems . There , undersampling of the majority class or oversampling of the minority class has been found to improve the quality of predictions for rare phenomena ( Japkowicz et al. , 2000 ) . This can be combined with targeted data augmentation with synthetic examples of the minority class ( Chawla et al. , 2002 ) . Generically , given a training dataset D , learning with class resampling and data augmentation involves defining an augmentation distribution p̃ ( x , y | D ) and sample weighting function u ( x , y ) and maximizing a training objective of the form : L ( θ ) = 1|D| ∑ x∈D log pθ ( y | x ) ︸ ︷︷ ︸ Original training data + E ( x , y ) ∼p̃ u ( x , y ) log pθ ( y | x ) ︸ ︷︷ ︸ Augmented data . ( 1 ) In addition to task-specific model architectures ( Andreas et al. , 2016 ; Russin et al. , 2019 ) , recent years have seen a renewed interest in data augmentation as a flexible and model-agnostic tool for encouraging controlled generalization ( Ratner et al. , 2017 ) . Existing proposals for sequence models are mainly rule-based—in sequence modeling problems , specifying a synchronous context-free grammar ( Jia & Liang , 2016 ) or string rewriting system ( Andreas , 2020 ) to generate new examples . Rule-based data augmentation schemes that recombine multiple training examples have been proposed 1Code for all experiments in this paper is available at https : //github.com/ekinakyurek/compgen . We implemented our experiments in Knet ( Yuret , 2016 ) using Julia ( Bezanson et al. , 2017 ) . for image classification ( Inoue , 2018 ) and machine translation ( Fadaee et al. , 2017 ) . While rulebased data augmentation is highly effective in structured problems featuring crisp correspondences between inputs and outputs , the effectiveness of such approaches involving more complicated , context-dependent relationships between inputs and outputs has not been well-studied . Learned data augmentation What might compositional data augmentation look like without rules as a source of inductive bias ? As Fig . 1 suggests , an ideal data augmentation procedure ( p̃ in Eq . 1 ) should automatically identify valid ways of transforming and combining examples , without pre-committing to a fixed set of transformations.2 A promising starting point is provided by prototype-based models , a number of which ( Gu et al. , 2018 ; Guu et al. , 2018 ; Khandelwal et al. , 2020 ) have been recently proposed for sequence modeling . Such models generate data according to : d ∼ prewrite ( · | d′ ; θ ) where d′ ∼ Unif ( D ) ; ( 2 ) for a datasetD and a learned sequence rewriting model prewrite ( d | d′ ; θ ) . ( To avoid confusion , we will use the symbol d to denote a datum . Because a data augmentation procedure must produce complete input–output examples , each d is an ( x , y ) pair for the conditional tasks evaluated in this paper . ) While recent variants implement prewrite with neural networks , these models are closely related to classical kernel density estimators ( Rosenblatt , 1956 ) . But additionally—building on the motivation in Section 1—they may be viewed as one-shot learners trained to generate new data d from a single example . Existing work uses prototype-based models as replacements for standard sequence models . We will show here that they are even better suited to use as data augmentation procedures : they can produce high-precision examples in the neighborhood of existing training data , then be used to bootstrap simpler predictors that extrapolate more effectively . But our experiments will also show that existing prototype-based models give mixed results on challenging generalizations of the kind depicted in Fig . 1 when used for either direct prediction or data augmentation—performing well in some settings but barely above baseline in others . Accordingly , R & R is built on two model components that transform prototype-based language models into an effective learned data augmentation scheme . Section 3 describes an implementation of prewrite that encourages greater sample diversity and well-formedness via a multi-prototype copying mechanism ( a two-shot learner ) . Section 4 describes heuristics for sampling prototypes d′ and model outputs d to focus data augmentation on the most informative examples . Section 5 investigates the empirical performance of both components of the approach , finding that they together provide they a simple but surprisingly effective tool for enabling compositional generalization . 3 PROTOTYPE-BASED SEQUENCE MODELS FOR DATA RECOMBINATION . We begin with a brief review of existing prototype-based sequence models . Our presentation mostly follows the retrieve-and-edit approach of Guu et al . ( 2018 ) , but versions of the approach in this paper could also be built on retrieval-based models implemented with memory networks ( Miller et al. , 2016 ; Gu et al. , 2018 ) or transformers ( Khandelwal et al. , 2020 ; Guu et al. , 2020 ) . The generative process described in Eq . 2 implies a marginal sequence probability : p ( d ) = 1 |D| ∑ d′∈D prewrite ( d | d′ ; θ ) ( 3 ) Maximizing this quantity over the training set with respect to θ will encourage prewrite to act as a model of valid data transformations : To be assigned high probability , every training example must be explained by at least one other example and a parametric rewriting operation . ( The trivial solution where pθ is the identity function , with pθ ( d | d′ = d ) = 1 , can be ruled out manually in 2As a concrete example of the potential advantage of learned data augmentation , consider applying the GECA procedure of Andreas ( 2020 ) to the language of strings anbn . GECA produces a training set that is substitutable in the sense of Clark & Eyraud ( 2007 ) ; as noted there , anbn is not substitutable . GECA will infer that a can be replaced with aab based on their common context in ( aabb , aaabbb ) , then generate the malformed example aaababbb by replacing an a in the wrong position . In contrast , recurrent neural networks can accurately model anbn ( Weiss et al. , 2018 ; Gers & Schmidhuber , 2001 ) . Of course , this language can also be generated using even more constrained procedures than GECA , but in general learned sequence models can capture a broader set of both formal regularities and exceptions compared to rule-based procedures . the design of pθ . ) When D is large , the sum in Eq . 3 is too large to enumerate exhaustively when computing the marginal likelihood . Instead , we can optimize a lower bound by restricting the sum to a neighborhood N ( d ) ⊂ D of training examples around each d : p ( d ) ≥ 1 |D| ∑ d′∈N ( d ) prewrite ( d | d′ ; θ ) . ( 4 ) The choice of N is discussed in more detail in Section 4 . Now observe that : log p ( d ) ≥ log ( |N ( d ) | ∑ d′∈N ( d ) 1 |N ( d ) | prewrite ( d | d′ ; θ ) ) − log |D| ( 5 ) ≥ 1 |N ( d ) | ∑ d′∈N ( d ) log prewrite ( d | d′ ; θ ) + log ( |N ( d ) | |D| ) ( 6 ) where the second step uses Jensen ’ s inequality . If all |N ( d ) | are the same size , maximizing this lower bound on log-likelihood is equivalent to simply maximizing∑ d′∈N ( d ) log prewrite ( d | d′ ; θ ) ( 7 ) over D—this is the ordinary conditional likelihood for a string transducer ( Ristad & Yianilos , 1998 ) or sequence-to-sequence model ( Sutskever et al. , 2014 ) with examples d , d′ ∈ N ( d ) .3 We have motivated prototype-based models by arguing that prewrite learns a model of transformations licensed by the training data . However , when generalization involves complex compositions , we will show that neither a basic RNN implementation of prewrite or a single prototype is enough ; we must provide the learned rewriting model with a larger inventory of parts and encourage reuse of those parts as faithfully as possible . This motivates the two improvements on the prototype-based modeling framework described in the remainder of this section : generalization to multiple prototypes ( Section 3.1 ) and a new rewriting model ( Section 3.2 ) . 3.1 n-PROTOTYPE MODELS To improve compositionality in prototype-based models , we equip them with the ability to condition on multiple examples simultaneously . We extend the basic prototype-based language model to n prototypes , which we now refer to as a recombination model precomb : d ∼ precomb ( · | d′1 : n ; θ ) where d′1 : n def = ( d′1 , d ′ 2 , . . . , d ′ n ) ∼ pΩ ( · ) ( 9 ) A multi-protype model may be viewed as a meta-learner ( Thrun & Pratt , 1998 ; Santoro et al. , 2016 ) : it maps from a small number of examples ( the prototypes ) to a distribution over new datapoints consistent with those examples . By choosing the neighborhood and implementation of precomb appropriately , we can train this meta-learner to specialize in one-shot concept learning ( by reusing a fragment exhibited in a single prototype ) or compositional generalization ( by assembling fragments of prototypes into a novel configuration ) . To enable this behavior , we define a set of compatible prototypes Ω ⊂ Dn ( Section 4 ) and let pΩ def = Unif ( Ω ) . We update Eq . 6 to feature a corresponding multi-prototype neighborhood N : D → Ω . The only terms that have changed are the conditioning variable and the constant term , and it is again sufficient to choose θ to optimize ∑ d′1 : n∈N ( d ) log precomb ( d | d′1 : n ) over D , implementing precomb as described next . | To tackle situations where compositionality is mostly required at inference time, the paper proposes a novel data augmentation method with an RNN based generator (recombination); to make the generator generate highly compositional patterns, the paper proposes a resampling method. The methods have been tested on two benchmarks focusing on the issue, SCAN and morphological analysis. The system performs on par with recently proposed GECA for SCAN and favorably to GECA on morphological analysis. | SP:0edafd92d3e0c42274852ec5c726e65cc79b0931 |
Learning to Recombine and Resample Data For Compositional Generalization | 1 INTRODUCTION How can we build machine learning models with the ability to learn new concepts in context from little data ? Human language learners acquire new word meanings from a single exposure ( Carey & Bartlett , 1978 ) , and immediately incorporate words and their meanings productively and compositionally into larger linguistic and conceptual systems ( Berko , 1958 ; Piantadosi & Aslin , 2016 ) . Despite the remarkable success of neural network models on many learning problems in recent years—including one-shot learning of classifiers and policies ( Santoro et al. , 2016 ; Wang et al. , 2016 ) —this kind of few-shot learning of composable concepts remains beyond the reach of standard neural models in both diagnostic and naturalistic settings ( Lake & Baroni , 2018 ; Bahdanau et al. , 2019a ) . Consider the few-shot morphology learning problem shown in Fig . 1 , in which a learner must predict various linguistic features ( e.g . 3rd person , SinGular , PRESent tense ) from word forms , with only a small number of examples of the PAST tense in the training set . Neural sequenceto-sequence models ( e.g . Bahdanau et al. , 2015 ) trained on this kind of imbalanced data fail to predict past-tense tags on held-out inputs of any kind ( Section 5 ) . Previous attempts to address this and related shortcomings in neural models have focused on explicitly encouraging rule-like behavior by e.g . modeling data with symbolic grammars ( Jia & Liang , 2016 ; Xiao et al. , 2016 ; Cai et al. , 2017 ) or applying rule-based data augmentation ( Andreas , 2020 ) . These procedures involve highly task-specific models or generative assumptions , preventing them from generalizing effectively to less structured problems that combine rule-like and exceptional behavior . More fundamentally , they fail to answer the question of whether explicit rules are necessary for compositional inductive bias , and whether it is possible to obtain “ rule-like ” inductive bias without appeal to an underlying symbolic generative process . This paper describes a procedure for improving few-shot compositional generalization in neural sequence models without symbolic scaffolding . Our key insight is that even fixed , imbalanced training datasets provide a rich source of supervision for few-shot learning of concepts and composition rules . In particular , we propose a new class of prototype-based neural sequence models ( c.f . Gu et al. , 2018 ) that can be directly trained to perform the kinds of generalization exhibited in Fig . 1 by explicitly recombining fragments of training examples to reconstruct other examples . Even when these prototype-based models are not effective as general-purpose predictors , we can resample their outputs to select high-quality synthetic examples of rare phenomena . Ordinary neural sequence models may then be trained on datasets augmented with these synthetic examples , distilling the learned regularities into more flexible predictors . This procedure , which we abbreviate R & R , promotes efficient generalization in both challenging synthetic sequence modeling tasks ( Lake & Baroni , 2018 ) and morphological analysis in multiple natural languages ( Cotterell et al. , 2018 ) . By directly optimizing for the kinds of generalization that symbolic representations are supposed to support , we can bypass the need for symbolic representations themselves : R & R gives performance comparable to or better than state-of-the-art neuro-symbolic approaches on tests of compositional generalization . Our results suggest that some failures of systematicity in neural models can be explained by simpler structural constraints on data distributions and corrected with weaker inductive bias than previously described.1 2 BACKGROUND AND RELATED WORK . Compositional generalization Systematic compositionality—the capacity to identify rule-like regularities from limited data and generalize these rules to novel situations—is an essential feature of human reasoning ( Fodor et al. , 1988 ) . While details vary , a common feature of existing attempts to formalize systematicity in sequence modeling problems ( e.g . Gordon et al. , 2020 ) is the intuition that learners should make accurate predictions in situations featuring novel combinations of previously observed input or output subsequences . For example , learners should generalize from actions seen in isolation to more complex commands involving those actions ( Lake et al. , 2019 ) , and from relations of the form r ( a , b ) to r ( b , a ) ( Keysers et al. , 2020 ; Bahdanau et al. , 2019b ) . In machine learning , previous studies have found that standard neural architectures fail to generalize systematically even when they achieve high in-distribution accuracy in a variety of settings ( Lake & Baroni , 2018 ; Bastings et al. , 2018 ; Johnson et al. , 2017 ) . Data augmentation and resampling Learning to predict sequential outputs with rare or novel subsequences is related to the widely studied problem of class imbalance in classification problems . There , undersampling of the majority class or oversampling of the minority class has been found to improve the quality of predictions for rare phenomena ( Japkowicz et al. , 2000 ) . This can be combined with targeted data augmentation with synthetic examples of the minority class ( Chawla et al. , 2002 ) . Generically , given a training dataset D , learning with class resampling and data augmentation involves defining an augmentation distribution p̃ ( x , y | D ) and sample weighting function u ( x , y ) and maximizing a training objective of the form : L ( θ ) = 1|D| ∑ x∈D log pθ ( y | x ) ︸ ︷︷ ︸ Original training data + E ( x , y ) ∼p̃ u ( x , y ) log pθ ( y | x ) ︸ ︷︷ ︸ Augmented data . ( 1 ) In addition to task-specific model architectures ( Andreas et al. , 2016 ; Russin et al. , 2019 ) , recent years have seen a renewed interest in data augmentation as a flexible and model-agnostic tool for encouraging controlled generalization ( Ratner et al. , 2017 ) . Existing proposals for sequence models are mainly rule-based—in sequence modeling problems , specifying a synchronous context-free grammar ( Jia & Liang , 2016 ) or string rewriting system ( Andreas , 2020 ) to generate new examples . Rule-based data augmentation schemes that recombine multiple training examples have been proposed 1Code for all experiments in this paper is available at https : //github.com/ekinakyurek/compgen . We implemented our experiments in Knet ( Yuret , 2016 ) using Julia ( Bezanson et al. , 2017 ) . for image classification ( Inoue , 2018 ) and machine translation ( Fadaee et al. , 2017 ) . While rulebased data augmentation is highly effective in structured problems featuring crisp correspondences between inputs and outputs , the effectiveness of such approaches involving more complicated , context-dependent relationships between inputs and outputs has not been well-studied . Learned data augmentation What might compositional data augmentation look like without rules as a source of inductive bias ? As Fig . 1 suggests , an ideal data augmentation procedure ( p̃ in Eq . 1 ) should automatically identify valid ways of transforming and combining examples , without pre-committing to a fixed set of transformations.2 A promising starting point is provided by prototype-based models , a number of which ( Gu et al. , 2018 ; Guu et al. , 2018 ; Khandelwal et al. , 2020 ) have been recently proposed for sequence modeling . Such models generate data according to : d ∼ prewrite ( · | d′ ; θ ) where d′ ∼ Unif ( D ) ; ( 2 ) for a datasetD and a learned sequence rewriting model prewrite ( d | d′ ; θ ) . ( To avoid confusion , we will use the symbol d to denote a datum . Because a data augmentation procedure must produce complete input–output examples , each d is an ( x , y ) pair for the conditional tasks evaluated in this paper . ) While recent variants implement prewrite with neural networks , these models are closely related to classical kernel density estimators ( Rosenblatt , 1956 ) . But additionally—building on the motivation in Section 1—they may be viewed as one-shot learners trained to generate new data d from a single example . Existing work uses prototype-based models as replacements for standard sequence models . We will show here that they are even better suited to use as data augmentation procedures : they can produce high-precision examples in the neighborhood of existing training data , then be used to bootstrap simpler predictors that extrapolate more effectively . But our experiments will also show that existing prototype-based models give mixed results on challenging generalizations of the kind depicted in Fig . 1 when used for either direct prediction or data augmentation—performing well in some settings but barely above baseline in others . Accordingly , R & R is built on two model components that transform prototype-based language models into an effective learned data augmentation scheme . Section 3 describes an implementation of prewrite that encourages greater sample diversity and well-formedness via a multi-prototype copying mechanism ( a two-shot learner ) . Section 4 describes heuristics for sampling prototypes d′ and model outputs d to focus data augmentation on the most informative examples . Section 5 investigates the empirical performance of both components of the approach , finding that they together provide they a simple but surprisingly effective tool for enabling compositional generalization . 3 PROTOTYPE-BASED SEQUENCE MODELS FOR DATA RECOMBINATION . We begin with a brief review of existing prototype-based sequence models . Our presentation mostly follows the retrieve-and-edit approach of Guu et al . ( 2018 ) , but versions of the approach in this paper could also be built on retrieval-based models implemented with memory networks ( Miller et al. , 2016 ; Gu et al. , 2018 ) or transformers ( Khandelwal et al. , 2020 ; Guu et al. , 2020 ) . The generative process described in Eq . 2 implies a marginal sequence probability : p ( d ) = 1 |D| ∑ d′∈D prewrite ( d | d′ ; θ ) ( 3 ) Maximizing this quantity over the training set with respect to θ will encourage prewrite to act as a model of valid data transformations : To be assigned high probability , every training example must be explained by at least one other example and a parametric rewriting operation . ( The trivial solution where pθ is the identity function , with pθ ( d | d′ = d ) = 1 , can be ruled out manually in 2As a concrete example of the potential advantage of learned data augmentation , consider applying the GECA procedure of Andreas ( 2020 ) to the language of strings anbn . GECA produces a training set that is substitutable in the sense of Clark & Eyraud ( 2007 ) ; as noted there , anbn is not substitutable . GECA will infer that a can be replaced with aab based on their common context in ( aabb , aaabbb ) , then generate the malformed example aaababbb by replacing an a in the wrong position . In contrast , recurrent neural networks can accurately model anbn ( Weiss et al. , 2018 ; Gers & Schmidhuber , 2001 ) . Of course , this language can also be generated using even more constrained procedures than GECA , but in general learned sequence models can capture a broader set of both formal regularities and exceptions compared to rule-based procedures . the design of pθ . ) When D is large , the sum in Eq . 3 is too large to enumerate exhaustively when computing the marginal likelihood . Instead , we can optimize a lower bound by restricting the sum to a neighborhood N ( d ) ⊂ D of training examples around each d : p ( d ) ≥ 1 |D| ∑ d′∈N ( d ) prewrite ( d | d′ ; θ ) . ( 4 ) The choice of N is discussed in more detail in Section 4 . Now observe that : log p ( d ) ≥ log ( |N ( d ) | ∑ d′∈N ( d ) 1 |N ( d ) | prewrite ( d | d′ ; θ ) ) − log |D| ( 5 ) ≥ 1 |N ( d ) | ∑ d′∈N ( d ) log prewrite ( d | d′ ; θ ) + log ( |N ( d ) | |D| ) ( 6 ) where the second step uses Jensen ’ s inequality . If all |N ( d ) | are the same size , maximizing this lower bound on log-likelihood is equivalent to simply maximizing∑ d′∈N ( d ) log prewrite ( d | d′ ; θ ) ( 7 ) over D—this is the ordinary conditional likelihood for a string transducer ( Ristad & Yianilos , 1998 ) or sequence-to-sequence model ( Sutskever et al. , 2014 ) with examples d , d′ ∈ N ( d ) .3 We have motivated prototype-based models by arguing that prewrite learns a model of transformations licensed by the training data . However , when generalization involves complex compositions , we will show that neither a basic RNN implementation of prewrite or a single prototype is enough ; we must provide the learned rewriting model with a larger inventory of parts and encourage reuse of those parts as faithfully as possible . This motivates the two improvements on the prototype-based modeling framework described in the remainder of this section : generalization to multiple prototypes ( Section 3.1 ) and a new rewriting model ( Section 3.2 ) . 3.1 n-PROTOTYPE MODELS To improve compositionality in prototype-based models , we equip them with the ability to condition on multiple examples simultaneously . We extend the basic prototype-based language model to n prototypes , which we now refer to as a recombination model precomb : d ∼ precomb ( · | d′1 : n ; θ ) where d′1 : n def = ( d′1 , d ′ 2 , . . . , d ′ n ) ∼ pΩ ( · ) ( 9 ) A multi-protype model may be viewed as a meta-learner ( Thrun & Pratt , 1998 ; Santoro et al. , 2016 ) : it maps from a small number of examples ( the prototypes ) to a distribution over new datapoints consistent with those examples . By choosing the neighborhood and implementation of precomb appropriately , we can train this meta-learner to specialize in one-shot concept learning ( by reusing a fragment exhibited in a single prototype ) or compositional generalization ( by assembling fragments of prototypes into a novel configuration ) . To enable this behavior , we define a set of compatible prototypes Ω ⊂ Dn ( Section 4 ) and let pΩ def = Unif ( Ω ) . We update Eq . 6 to feature a corresponding multi-prototype neighborhood N : D → Ω . The only terms that have changed are the conditioning variable and the constant term , and it is again sufficient to choose θ to optimize ∑ d′1 : n∈N ( d ) log precomb ( d | d′1 : n ) over D , implementing precomb as described next . | This paper presents a prototype-based method for data augmentation based on a generative model without rule/template based requirements. The generative model creates new input-output pairs from training fragments (recombination: rewrite model conditioned on multiple examples), and samples in low-density places (rare words) of the training data (resampling). Empirical results show that the in combination recombination and resampling perform on par with a recently introduced rule-based method, GECA. | SP:0edafd92d3e0c42274852ec5c726e65cc79b0931 |
Selecting Treatment Effects Models for Domain Adaptation Using Causal Knowledge | 1 INTRODUCTION . Causal inference models for estimating individualized treatment effects ( ITE ) are designed to provide actionable intelligence as part of decision support systems and , when deployed on mission-critical domains , such as healthcare , require safety and robustness above all ( Shalit et al. , 2017 ; Alaa & van der Schaar , 2017 ) . In healthcare , it is often the case that the observational data used to train an ITE model may come from a setting where the distribution of patient features is different from the one in the deployment ( target ) environment , for example , when transferring models across hospitals or countries . Because of this , it is imperative to select ITE models that are robust to these covariate shifts across disparate patient populations . In this paper , we address the problem of ITE model selection in the unsupervised domain adaptation ( UDA ) setting where we have access to the response to treatments for patients on a source domain , and we desire to select ITE models that can reliably estimate treatment effects on a target domain containing only unlabeled data , i.e. , patient features . UDA has been successfully studied in the predictive setting to transfer knowledge from existing labeled data in the source domain to unlabeled target data ( Ganin et al. , 2016 ; Tzeng et al. , 2017 ) . In this context , several model selection scores have been proposed to select predictive models that are most robust to the covariate shifts between domains ( Sugiyama et al. , 2007 ; You et al. , 2019 ) . These methods approximate the performance of a model on the target domain ( target risk ) by weighting the performance on the validation set ( source risk ) with known ( or estimated ) density ratios . However , ITE model selection for UDA differs significantly in comparison to selecting predictive models for UDA ( Stuart et al. , 2013 ) . Notably , we can only approximate the estimated counterfactual error ( Alaa & van der Schaar , 2019 ) , since we only observe the factual outcome for the received treatment and can not observe the counterfactual outcomes under other treatment options ( Spirtes et al. , 2000 ) . Consequently , existing methods for selecting predictive models for UDA that compute a weighted sum of the validation error as a proxy of the target risk ( You et al. , 2019 ) is suboptimal for selecting ITE models , as their validation error in itself is only an approximation of the model ’ s ability to estimate counterfactual outcomes on the source domain . To better approximate target risk , we propose to leverage the invariance of causal graphs across domains and select ITE models whose predictions of the treatment effects also satisfy known or discovered causal relationships . It is well-known that causality is a property of the physical world , and therefore the physical ( functional ) relationships between variables remain invariant across domains ( Schoelkopf et al. , 2012 ; Bareinboim & Pearl , 2016 ; RojasCarulla et al. , 2018 ; Magliacane et al. , 2018 ) . As shown in Figure 1 , we assume the existence of an underlying causal graph that describes the generating process of the observational data . We represent the selection bias present in the source observational datasets by arrows between the features { X1 , X2 } , and treatment T . In the target domain , we only have access to the patient features , and we want to estimate the patient outcome ( Y ) under different settings of the treatment ( intervention ) . When performing such interventions , the causal structure remains unchanged except for the arrows into the treatment node , which are removed . Contributions . To the best of our knowledge , we present the first UDA selection method specifically tailored for machine learning models that estimate ITE . Our ITE model selection score uniquely leverages the estimated patient outcomes under different treatment settings on the target domain by incorporating a measurement of how well these outcomes satisfy the causal relationships in the interventional causal graph GT . This measure , which we refer to as causal risk , is computed using a log-likelihood function quantifying the model predictions ’ fitness to the underlying causal graph . We provide a theoretical justification for using the causal risk , and we show that our proposed ITE model selection metric for UDA prefers models whose predictions satisfy the conditional independence relationships in GT and are thus more robust to changes in the distribution of the patient features . We also show experimentally that adding the causal risk to existing state-of-the-art model selection scores for UDA results in selecting ITE models with improved performance on the target domain . We provide an illustrative example of model selection for several real-world datasets for UDA , including ventilator assignment for COVID-19 . 2 RELATED WORKS . Our work is related to causal inference and domain adaptation . In this section , we describe existing methods for ITE estimation , UDA model selection in the predictive setting , and domain adaptation from a causal perspective . ITE models . Recently , a large number of machine learning methods for estimating heterogeneous ITE from observational data have been developed , leveraging ideas from representation learning ( Johansson et al. , 2016 ; Shalit et al. , 2017 ; Yao et al. , 2018 ) , adversarial training , ( Yoon et al. , 2018 ) , causal random forests ( Wager & Athey , 2018 ) and Gaussian processes ( Alaa & van der Schaar , 2017 ; 2018 ) . Nevertheless , no single model will achieve the best performance on all types of observational data ( Dorie et al. , 2019 ) and even for the same model , different hyperparameter settings or training iterations will yield different performance . ITE model selection . Evaluating ITE models ’ performance is challenging since counterfactual data is unavailable , and consequently , the true causal effects can not be computed . Several heuristics for estimating model performance have been used in practice ( Schuler et al. , 2018 ; Van der Laan & Robins , 2003 ) . Factual model selection only computes the error of the ITE model in estimating the factual patient outcomes . Alternatively , inverse propensity weighted ( IPTW ) selection uses the estimated propensity score to weigh each sample ’ s factual error and thus obtain an unbiased estimate ( Van der Laan & Robins , 2003 ) . Alaa & van der Schaar ( 2017 ) propose using influence functions to approximate ITE models ’ error in predicting both factual and counterfactual outcomes . Influence function ( IF ) based validation currently represents the state-of-the-art method in selecting ITE models . However , existing ITE selection methods are not designed to select models robust to distributional changes in the patient populations , i.e. , for domain adaptation . UDA model selection . UDA is a special case of domain adaptation , where we have access to unlabeled samples from the test or target domain . Several methods for selecting predictive models for UDA have been proposed ( Pan & Yang , 2010 ) . Here we focus on the ones that can be adapted for the ITE setting . The first unsupervised model selection method was proposed by Long et al . ( 2018 ) , who used Importance-Weighted Cross-Validation ( IWCV ) ( Sugiyama et al. , 2007 ) to select hyperparameters and models for covariate shift . IWCV requires that the importance weights ( or density ratio ) be provided or known ahead of time , which is not always feasible in practice . Later , Deep Embedded Validation ( DEV ) , proposed by You et al . ( 2019 ) , was built on IWCV by using a discriminative neural network to learn the target distribution density ratio to provide an unbiased estimation of the target risk with bounded variance . However , these proposed methods do not consider model predictions on the target domain and are agnostic of causal structure . Causal structure for domain adaptation . Recently , Kyono & van der Schaar ( 2019 ) proposed Causal Assurance ( CA ) as a domain adaptation selection method for predictive models that leverages prior knowledge in the form of a causal graph . Because their work is centered around predictive models , it is suboptimal for ITE models , where the edges into the treatment ( or intervention ) will capture the selection bias of the observational data . Furthermore , their method does not allow for examining the target domain predictions , which is a key novelty of this work . We leverage do-calculus ( Pearl , 2009 ) to manipulate the underlying directed acyclical graph ( DAG ) into an interventional DAG that more appropriately fits the ITE regime . More recently , researchers have focused on leveraging the causal structure for predictive models by identifying subsets of variables that serve as invariant conditionals ( Rojas-Carulla et al. , 2018 ; Magliacane et al. , 2018 ) . 3 PRELIMINARIES . 3.1 INDIVIDUALIZED TREATMENT EFFECTS AND MODEL SELECTION FOR UDA . Consider a training dataset Dsrc = { ( xsrci , tsrci , ysrci ) } Nsrci=1 consisting of Nsrc independent realizations , one for each individual i , of the random variables ( X , T , Y ) drawn from the source joint distribution pµ ( X , T , Y ) . Let pµ ( X ) be the marginal distribution of X . Assume that we also have access to a test dataset Dtgt = { xtgti } Ntgt i=1 from the target domain , consisting of Ntgt independent realizations of X drawn from the target distribution pπ ( X ) , where pµ ( X ) 6= pπ ( X ) . Let the random variable X ∈ X represent the context ( e.g . patient features ) and let T ∈ T describe the intervention ( treatment ) assigned to the patient . Without loss of generality , consider the case when the treatment is binary , such that T = { 0 , 1 } . However , note that our model selection method is also applicable for any number of treatments . We use the potential outcomes framework ( Rubin , 2005 ) to describe the result of performing an intervention t ∈ T as the potential outcome Y ( t ) ∈ Y . Let Y ( 1 ) represent the potential outcome under treatment and Y ( 0 ) the potential outcome under control . Note that for each individual , we can only observe one of potential outcomes Y ( 0 ) or Y ( 1 ) . We assume that the potential outcomes have a stationary distribution pµ ( Y ( t ) | X ) = pπ ( Y ( t ) | X ) given the context X ; this represents the covariate shift assumption in domain adaptation ( Shimodaira , 2000 ) . Observational data can be used to estimate E [ Y | X = x , T = t ] through regression . Assumption 1 describes the causal identification conditions ( Rosenbaum & Rubin , 1983 ) , such that the potential outcomes are the same as the conditional expectation : E [ Y ( t ) | X = x ] = E [ Y | X = x , T = t ] . Assumption 1 ( Consistency , Ignorability and Overlap ) . For any individual ( unit ) i , receiving treatment ti , we observe Yi = Y ( ti ) . Moreover , { Y ( 0 ) , Y ( 1 ) } and the data generating process p ( X , T , Y ) satisfy strong ignorability Y ( 0 ) , Y ( 1 ) ⊥⊥ T | X and overlap ∀x : P ( T | X = x ) > 0 . The ignorability assumption , also known as the no hidden confounders ( unconfoundedness ) assumptions , means that we observe all variables X that causally affect the assignment of the intervention and the outcome . Under unconfoundedness , X blocks all backdoor paths between Y and A ( Pearl , 2009 ) . Under Assumption 1 , the conditional expectation of the potential outcomes can also be written as the interventional distribution obtained by applying the do−operator under the causal framework of Pearl ( 2009 ) : E [ Y ( t ) | X = x ] = E [ Y | X = x , do ( T = t ) ] . This equivalence will enable us to reason about causal graphs and interventions on causal graphs in the context of selecting ITE methods for estimating potential outcomes . Evaluating ITE models . Methods for estimating ITE learn predictors f : X × T → Y such that f ( x , t ) approximates E [ Y | X = x , T = t ] = E [ Y ( t ) | X = x ] = E [ Y | X = x , do ( T = t ) ] . The goal is to estimate the ITE , also known as the conditional average treatment effect ( CATE ) : τ ( x ) = E [ Y ( 1 ) | X = x ] − E [ Y ( 0 ) | X = x ] ( 1 ) = E [ Y | X = x , do ( T = 1 ) ] − E [ Y | X = x , do ( T = 0 ) ] . ( 2 ) The CATE is essential for individualized decision making as it guides treatment assignment policies . A trained ITE predictor f ( x , t ) approximates CATE as : τ̂ ( x ) = f ( x , 1 ) − f ( x , 0 ) . Commonly used to assess ITE models is the precision of estimating heterogeneous effects ( PEHE ) ( Hill , 2011 ) : PEHE = Ex∼p ( x ) [ ( τ ( x ) − τ̂ ( x ) ) 2 ] , ( 3 ) which quantifies a model ’ s estimate of the heterogeneous treatment effects for patients in a population . UDA model selection . Given a set F = { f1 , . . . fm } of candidate ITE models trained on the source domain Dsrc , our aim is to select the model that achieves the lowest target risk , that is the lowest PEHE on the target domain Dtgt . Thus , ITE model selection for UDA involves finding : f̂ = arg min f∈F Ex∼pπ ( x ) [ ( τ ( x ) − τ̂ ( x ) ) 2 ] = arg min f∈F Ex∼pπ ( x ) [ ( τ ( x ) − ( f ( x , 1 ) − f ( x , 0 ) ) ) 2 ] . ( 4 ) For this purpose , we propose using the invariance of causal graphs across domains to select ITE predictors that are robust to distributional shifts in the marginal distribution of X . | the paper attacks the problem of model selection for individual treatement effect (ITE) models when the domain of learning and prediction differ. Proposal is to use causal consistency as an additional "regularizer" in existing domain adaptation (DA) model selection methods. The "regularizer" would be scoring to which extent replacing factual outcomes by their counterfactual predictions would preserve conditional independence relations (induced by the causal graph) in the prediction domain. Experiments on a variety of datasets are conducted to show the added performance induced by using the "regularizer". | SP:a877e36694e5ce6ac8fd441a765229a6574a3c16 |
Selecting Treatment Effects Models for Domain Adaptation Using Causal Knowledge | 1 INTRODUCTION . Causal inference models for estimating individualized treatment effects ( ITE ) are designed to provide actionable intelligence as part of decision support systems and , when deployed on mission-critical domains , such as healthcare , require safety and robustness above all ( Shalit et al. , 2017 ; Alaa & van der Schaar , 2017 ) . In healthcare , it is often the case that the observational data used to train an ITE model may come from a setting where the distribution of patient features is different from the one in the deployment ( target ) environment , for example , when transferring models across hospitals or countries . Because of this , it is imperative to select ITE models that are robust to these covariate shifts across disparate patient populations . In this paper , we address the problem of ITE model selection in the unsupervised domain adaptation ( UDA ) setting where we have access to the response to treatments for patients on a source domain , and we desire to select ITE models that can reliably estimate treatment effects on a target domain containing only unlabeled data , i.e. , patient features . UDA has been successfully studied in the predictive setting to transfer knowledge from existing labeled data in the source domain to unlabeled target data ( Ganin et al. , 2016 ; Tzeng et al. , 2017 ) . In this context , several model selection scores have been proposed to select predictive models that are most robust to the covariate shifts between domains ( Sugiyama et al. , 2007 ; You et al. , 2019 ) . These methods approximate the performance of a model on the target domain ( target risk ) by weighting the performance on the validation set ( source risk ) with known ( or estimated ) density ratios . However , ITE model selection for UDA differs significantly in comparison to selecting predictive models for UDA ( Stuart et al. , 2013 ) . Notably , we can only approximate the estimated counterfactual error ( Alaa & van der Schaar , 2019 ) , since we only observe the factual outcome for the received treatment and can not observe the counterfactual outcomes under other treatment options ( Spirtes et al. , 2000 ) . Consequently , existing methods for selecting predictive models for UDA that compute a weighted sum of the validation error as a proxy of the target risk ( You et al. , 2019 ) is suboptimal for selecting ITE models , as their validation error in itself is only an approximation of the model ’ s ability to estimate counterfactual outcomes on the source domain . To better approximate target risk , we propose to leverage the invariance of causal graphs across domains and select ITE models whose predictions of the treatment effects also satisfy known or discovered causal relationships . It is well-known that causality is a property of the physical world , and therefore the physical ( functional ) relationships between variables remain invariant across domains ( Schoelkopf et al. , 2012 ; Bareinboim & Pearl , 2016 ; RojasCarulla et al. , 2018 ; Magliacane et al. , 2018 ) . As shown in Figure 1 , we assume the existence of an underlying causal graph that describes the generating process of the observational data . We represent the selection bias present in the source observational datasets by arrows between the features { X1 , X2 } , and treatment T . In the target domain , we only have access to the patient features , and we want to estimate the patient outcome ( Y ) under different settings of the treatment ( intervention ) . When performing such interventions , the causal structure remains unchanged except for the arrows into the treatment node , which are removed . Contributions . To the best of our knowledge , we present the first UDA selection method specifically tailored for machine learning models that estimate ITE . Our ITE model selection score uniquely leverages the estimated patient outcomes under different treatment settings on the target domain by incorporating a measurement of how well these outcomes satisfy the causal relationships in the interventional causal graph GT . This measure , which we refer to as causal risk , is computed using a log-likelihood function quantifying the model predictions ’ fitness to the underlying causal graph . We provide a theoretical justification for using the causal risk , and we show that our proposed ITE model selection metric for UDA prefers models whose predictions satisfy the conditional independence relationships in GT and are thus more robust to changes in the distribution of the patient features . We also show experimentally that adding the causal risk to existing state-of-the-art model selection scores for UDA results in selecting ITE models with improved performance on the target domain . We provide an illustrative example of model selection for several real-world datasets for UDA , including ventilator assignment for COVID-19 . 2 RELATED WORKS . Our work is related to causal inference and domain adaptation . In this section , we describe existing methods for ITE estimation , UDA model selection in the predictive setting , and domain adaptation from a causal perspective . ITE models . Recently , a large number of machine learning methods for estimating heterogeneous ITE from observational data have been developed , leveraging ideas from representation learning ( Johansson et al. , 2016 ; Shalit et al. , 2017 ; Yao et al. , 2018 ) , adversarial training , ( Yoon et al. , 2018 ) , causal random forests ( Wager & Athey , 2018 ) and Gaussian processes ( Alaa & van der Schaar , 2017 ; 2018 ) . Nevertheless , no single model will achieve the best performance on all types of observational data ( Dorie et al. , 2019 ) and even for the same model , different hyperparameter settings or training iterations will yield different performance . ITE model selection . Evaluating ITE models ’ performance is challenging since counterfactual data is unavailable , and consequently , the true causal effects can not be computed . Several heuristics for estimating model performance have been used in practice ( Schuler et al. , 2018 ; Van der Laan & Robins , 2003 ) . Factual model selection only computes the error of the ITE model in estimating the factual patient outcomes . Alternatively , inverse propensity weighted ( IPTW ) selection uses the estimated propensity score to weigh each sample ’ s factual error and thus obtain an unbiased estimate ( Van der Laan & Robins , 2003 ) . Alaa & van der Schaar ( 2017 ) propose using influence functions to approximate ITE models ’ error in predicting both factual and counterfactual outcomes . Influence function ( IF ) based validation currently represents the state-of-the-art method in selecting ITE models . However , existing ITE selection methods are not designed to select models robust to distributional changes in the patient populations , i.e. , for domain adaptation . UDA model selection . UDA is a special case of domain adaptation , where we have access to unlabeled samples from the test or target domain . Several methods for selecting predictive models for UDA have been proposed ( Pan & Yang , 2010 ) . Here we focus on the ones that can be adapted for the ITE setting . The first unsupervised model selection method was proposed by Long et al . ( 2018 ) , who used Importance-Weighted Cross-Validation ( IWCV ) ( Sugiyama et al. , 2007 ) to select hyperparameters and models for covariate shift . IWCV requires that the importance weights ( or density ratio ) be provided or known ahead of time , which is not always feasible in practice . Later , Deep Embedded Validation ( DEV ) , proposed by You et al . ( 2019 ) , was built on IWCV by using a discriminative neural network to learn the target distribution density ratio to provide an unbiased estimation of the target risk with bounded variance . However , these proposed methods do not consider model predictions on the target domain and are agnostic of causal structure . Causal structure for domain adaptation . Recently , Kyono & van der Schaar ( 2019 ) proposed Causal Assurance ( CA ) as a domain adaptation selection method for predictive models that leverages prior knowledge in the form of a causal graph . Because their work is centered around predictive models , it is suboptimal for ITE models , where the edges into the treatment ( or intervention ) will capture the selection bias of the observational data . Furthermore , their method does not allow for examining the target domain predictions , which is a key novelty of this work . We leverage do-calculus ( Pearl , 2009 ) to manipulate the underlying directed acyclical graph ( DAG ) into an interventional DAG that more appropriately fits the ITE regime . More recently , researchers have focused on leveraging the causal structure for predictive models by identifying subsets of variables that serve as invariant conditionals ( Rojas-Carulla et al. , 2018 ; Magliacane et al. , 2018 ) . 3 PRELIMINARIES . 3.1 INDIVIDUALIZED TREATMENT EFFECTS AND MODEL SELECTION FOR UDA . Consider a training dataset Dsrc = { ( xsrci , tsrci , ysrci ) } Nsrci=1 consisting of Nsrc independent realizations , one for each individual i , of the random variables ( X , T , Y ) drawn from the source joint distribution pµ ( X , T , Y ) . Let pµ ( X ) be the marginal distribution of X . Assume that we also have access to a test dataset Dtgt = { xtgti } Ntgt i=1 from the target domain , consisting of Ntgt independent realizations of X drawn from the target distribution pπ ( X ) , where pµ ( X ) 6= pπ ( X ) . Let the random variable X ∈ X represent the context ( e.g . patient features ) and let T ∈ T describe the intervention ( treatment ) assigned to the patient . Without loss of generality , consider the case when the treatment is binary , such that T = { 0 , 1 } . However , note that our model selection method is also applicable for any number of treatments . We use the potential outcomes framework ( Rubin , 2005 ) to describe the result of performing an intervention t ∈ T as the potential outcome Y ( t ) ∈ Y . Let Y ( 1 ) represent the potential outcome under treatment and Y ( 0 ) the potential outcome under control . Note that for each individual , we can only observe one of potential outcomes Y ( 0 ) or Y ( 1 ) . We assume that the potential outcomes have a stationary distribution pµ ( Y ( t ) | X ) = pπ ( Y ( t ) | X ) given the context X ; this represents the covariate shift assumption in domain adaptation ( Shimodaira , 2000 ) . Observational data can be used to estimate E [ Y | X = x , T = t ] through regression . Assumption 1 describes the causal identification conditions ( Rosenbaum & Rubin , 1983 ) , such that the potential outcomes are the same as the conditional expectation : E [ Y ( t ) | X = x ] = E [ Y | X = x , T = t ] . Assumption 1 ( Consistency , Ignorability and Overlap ) . For any individual ( unit ) i , receiving treatment ti , we observe Yi = Y ( ti ) . Moreover , { Y ( 0 ) , Y ( 1 ) } and the data generating process p ( X , T , Y ) satisfy strong ignorability Y ( 0 ) , Y ( 1 ) ⊥⊥ T | X and overlap ∀x : P ( T | X = x ) > 0 . The ignorability assumption , also known as the no hidden confounders ( unconfoundedness ) assumptions , means that we observe all variables X that causally affect the assignment of the intervention and the outcome . Under unconfoundedness , X blocks all backdoor paths between Y and A ( Pearl , 2009 ) . Under Assumption 1 , the conditional expectation of the potential outcomes can also be written as the interventional distribution obtained by applying the do−operator under the causal framework of Pearl ( 2009 ) : E [ Y ( t ) | X = x ] = E [ Y | X = x , do ( T = t ) ] . This equivalence will enable us to reason about causal graphs and interventions on causal graphs in the context of selecting ITE methods for estimating potential outcomes . Evaluating ITE models . Methods for estimating ITE learn predictors f : X × T → Y such that f ( x , t ) approximates E [ Y | X = x , T = t ] = E [ Y ( t ) | X = x ] = E [ Y | X = x , do ( T = t ) ] . The goal is to estimate the ITE , also known as the conditional average treatment effect ( CATE ) : τ ( x ) = E [ Y ( 1 ) | X = x ] − E [ Y ( 0 ) | X = x ] ( 1 ) = E [ Y | X = x , do ( T = 1 ) ] − E [ Y | X = x , do ( T = 0 ) ] . ( 2 ) The CATE is essential for individualized decision making as it guides treatment assignment policies . A trained ITE predictor f ( x , t ) approximates CATE as : τ̂ ( x ) = f ( x , 1 ) − f ( x , 0 ) . Commonly used to assess ITE models is the precision of estimating heterogeneous effects ( PEHE ) ( Hill , 2011 ) : PEHE = Ex∼p ( x ) [ ( τ ( x ) − τ̂ ( x ) ) 2 ] , ( 3 ) which quantifies a model ’ s estimate of the heterogeneous treatment effects for patients in a population . UDA model selection . Given a set F = { f1 , . . . fm } of candidate ITE models trained on the source domain Dsrc , our aim is to select the model that achieves the lowest target risk , that is the lowest PEHE on the target domain Dtgt . Thus , ITE model selection for UDA involves finding : f̂ = arg min f∈F Ex∼pπ ( x ) [ ( τ ( x ) − τ̂ ( x ) ) 2 ] = arg min f∈F Ex∼pπ ( x ) [ ( τ ( x ) − ( f ( x , 1 ) − f ( x , 0 ) ) ) 2 ] . ( 4 ) For this purpose , we propose using the invariance of causal graphs across domains to select ITE predictors that are robust to distributional shifts in the marginal distribution of X . | This paper proposes a novel interventional causal model selection (ICMS) score to select individualized treatment effects (ITE) models under the unsupervised domain adaption (UDA) setting. The problem is fundamentally challenging as counterfactual outcomes cannot be observed. The authors make an assumption that the underlying causal structure across domains remains unchanged when adapting the ITE models from one domain to another. The authors propose Theorem 1 that the conditional independence relationships in the interventional DAG are equal to that in the interventional distribution for the target domain, followed by augmenting the target domain data with the model's prediction of the potential outcomes. Then the model that generates the best augmented target data in the sense that matches best with the interventional DAG is selected. To access this fitness, authors use the negative log-likelihood of the interventional DAG given the augmented data on the target domain. Finally, results with both synthetic data and real-world COVID-19 dataset show improvement for all ITE models. | SP:a877e36694e5ce6ac8fd441a765229a6574a3c16 |
Interactive Visualization for Debugging RL | 1 INTRODUCTION . Machine learning systems have made impressive advances due to their ability to learn high dimensional models from large amounts of data ( LeCun et al. , 2015 ) . However , high dimensional models are hard to understand and trust ( Doshi-Velez & Kim , 2017 ) . Many tools exist for addressing this challenge in the supervised learning setting , which find usage in tracking metrics ( Abadi et al. , 2015 ; Satyanarayan et al. , 2017 ) , generating graphs of model internals ( Wongsuphasawat et al. , 2018 ) , and visualizing embeddings ( van der Maaten & Hinton , 2008 ) . However , there is no corresponding set of tools for the reinforcement learning setting . At first glance , it appears we may repurpose existing tools for this task . However , we quickly run into limitations , that arise due to the intent with which these tools were designed . Reinforcement learning ( RL ) is a more interactive science ( Neftci & Averbeck , 2019 ) compared to supervised learning , due to a stronger feedback loop between the researcher and the agent . Whereas supervised learning involves a static dataset , RL often entails collecting new data . To fully understand an RL algorithm , we must understand the effect it has on the data collected . Note that in supervised learning , the learned model has no effect on a fixed dataset . Visualization systems are important for overcoming these challenges . At their core visualization systems , consist of two components : representation and interaction . Representation is concerned with how data is mapped to a representation and then rendered . Interaction is concerned with the dialog between the user and the system as the user explores the data to uncover insights ( Yi et al. , 2007 ) . Though appearing to be disparate , these two processes have a symbiotic influence on each other . The tools we use for representation affect how we interact with the system , and our interaction affects the representations that we create . Thus , while designing visualization systems , it is important to think about the application domain from which the data originates , in this case , reinforcement learning . Using existing tools we can plot descriptive metrics such as cumulative reward , TD-error , and action values , to name a few . However , it is harder to pose and easily answer questions such as : - How does the agent state-visitation distribution change as training progresses ? - What effect do noteworthy , influential states have on the policy ? 1An interactive ( anonymized ) demo of the system can be found at https : //vizarel-demo . herokuapp.com - Are there repetitive patterns across space and time that result in the observed agent behavior ? These are far from an exhaustive list of questions that a researcher may pose while training agent policies , but are chosen to illustrate the limitations created by our current set of tools that prevent us from being able to easily answer such questions . This paper describes our attempt at constructing Vizarel 2 , an interactive visualization system to help interpret RL algorithms , debug RL policies , and help RL researchers pose and answer questions of this nature . Towards these goals , we identify features that an interactive system for interpretable reinforcement learning should encapsulate and build a prototype of these ideas . We complement this by providing a walkthrough example of how this system could fit into the RL debugging workflow and be used in a real scenario to debug a policy . 2 RELATED WORK . As we have argued in the introduction , existing visualization tools for machine learning primarily focus on the supervised learning setting . However , the process of designing and debugging RL algorithms requires a different set of tools , that can complement the strengths and overcome the weaknesses of offerings in the current ecosystem . In the rest of this section , we highlight aspects of prior work upon which our system builds . To the best of our knowledge , there do not exist visualization systems built for interpretable reinforcement learning that effectively address the broader goals we have identified . There exists prior work , aspects of which are relevant to features which the current system encapsulates , that we now detail . Visual Interpretability Related work for increasing understanding in machine learning models using visual explanations includes : feature visualization in neural networks ( Olah et al. , 2017 ; Simonyan et al. , 2014 ; Zeiler & Fergus , 2013 ) , visual analysis tools for variants of machine learning models ( Strobelt et al. , 2017 ; Kahng et al. , 2017 ; Kapoor et al. , 2010 ; Krause et al. , 2016 ; Yosinski et al . ) , treating existing methods as composable building blocks for user interfaces ( Olah et al. , 2018 ) , and visualization techniques for increasing explainability in reinforcement learning ( Rupprecht et al. , 2020 ; Atrey et al. , 2020 ; McGregor et al. , 2015 ) Explaining agent behavior There exists related work that tries to explain agent behavior . Amir & Amir summarize agent behavior by displaying important trajectories . van der Waa et al . ( 2018 ) introduce a method to provide contrastive explanations between user derived and agent learned policies . Huang et al . ( 2017 ) show maximally informative examples to guide the user towards understanding 2Vizarel is a portmanteau of visualization + reinforcement learning . the agent objective function . Hayes & Shah ( 2017 ) present algorithms and a system for robots to synthesize policy descriptions and respond to human queries . Explainable reinforcement learning Puiutta & Veith ( 2020 ) provide a survey of techniques for explainable reinforcement learning . Related work in this theme includes Puri et al . ( 2020 ) ; Reddy et al . ( 2019 ) ; Calvaresi et al . ( 2019 ) ; Juozapaitis et al . ( 2019 ) ; Sequeira & Gervasio ( 2020 ) ; Fukuchi et al . ( 2017 ) ; Madumal et al . ( 2020 ) Similar to Amir & Amir ; van der Waa et al . ( 2018 ) ; Huang et al . ( 2017 ) , this work is motivated by the aim to provide the researcher relevant information to explore a possible space of solutions while debugging the policy . Similar to Hayes & Shah ( 2017 ) , we present a functioning system that can respond to human queries to provide explanations . However , in contrast , the interactive system we present is built around the RL training workflow , and designed to evolve beyond the explanatory use case to complement the existing ecosystem of tools ( Abadi et al. , 2015 ; Satyanarayan et al. , 2017 ) . In contrast to the techniques surveyed in Puiutta & Veith ( 2020 ) , the contribution here is not on any single technique to increase interpretability , but a whole suite of visualizations built on an extensible platform to help researchers better design and debug RL agent policies for their task . 3 PRELIMINARIES . We use the standard reinforcement learning setup ( Sutton & Barto , 2018 ) . An agent interacting with an environment at discrete timesteps t , receiving a scalar reward r ( st , at ) ∈ R. The agent ’ s behavior is defined by a policy π , which maps states s ∈ S , to a probability distribution over actions , π : S → P ( A ) . The environment can be stochastic , which is modeled by a Markov decision process with a state space S , action space A ∈ Rn , an initial state distribution p ( s0 ) , a transition function p ( st+1 | st , a ) , and a reward function r ( st , at ) . The future discounted return from a state st and action at is defined as Rt = ∑T i=t γ i−tr ( st , at ) , with a discount factor γ ∈ [ 0 , 1 ] . We use a replay buffer ( Mnih et al. , 2013 ; Lin ) to store the agent ’ s experiences et = ( st , at , rt , st+1 ) in a buffer B = { e0 , e1 , ... , eT } . 4 VIZAREL : A TOOL FOR INTERACTIVE VISUALIZATION OF RL This section describes how our interactive visualization system ( Vizarel ) , is currently designed . The system offers different views that allow the user to analyze agent policies along spatial and temporal dimensions ( described later in further detail ) . The tool consists of a set of viewports , that provide the user with different representations of the data , contingent on the underlying data stream . Viewports are generated by chaining together different visualization elements , such as : 1. image buffers : visualize observation spaces ( image and non-image based ) 2. line plots : visualize sequentially ordered data , such as action values or rewards across time 3. scatter plots : to visualize embedding spaces or compare tensors along specified dimensions 4. histograms : visualize frequency counts of specified tensors or probability distributions The current implementation provides core viewports ( detailed further ) , but can easily be extended by the user to generate additional viewports to explore different visualization ideas . This design naturally leads to the idea of an ecosystem of plugins that could be integrated into the core system , and distributed for use among a community of users to support different visualization schemes and algorithms . For example , the user could combine image buffers and line plots in novel ways to create a viewport to visualize the the state-action value function Sutton & Barto ( 2018 ) . In the rest of this section , we provide details and distinguish between two types viewports currently implemented in Vizarel : temporal viewports and spatial viewports . Discussion on viewports beyond these has been deferred to the appendix . Comprehensive information on adding new viewports is beyond the scope of the paper , but has been described at length in the system documentation3 . 4.1 TEMPORAL VIEWS . Temporal views are oriented around visualizing the data stream ( e.g . images , actions , rewards ) as a sequence of events ordered along the time dimension . We have implemented three types of temporal viewports : state viewports , action viewports , and reward viewports , which we now detail . 4.1.1 STATE VIEWPORT . For visualization , we can classify states as either image-based or non-image based . The type of observation space influences the corresponding viewport used for visualization . We provide two examples that illustrate how these differing observation spaces can result in different viewports . Consider a non-image based observation space , such as that for the inverted pendulum task . Here , the state vector ~s = { sin ( θ ) , cos ( θ ) , θ̇ } , where θ is the angle which the pendulum makes with the vertical . We can visualize the state vector components individually , which provides insight into how states vary across episode timesteps ( Figure 2 ) . Since images are easier for humans to interpret , we can generate an additional viewport using image buffers , that tracks changes in state space to the corresponding changes in image space . Having this simultaneous visualization is useful since it now enables us to jump back and forth between the state representation which the agent receives , and the corresponding image representation , by simply hovering over the desired timestep in the state viewport . 3Vizarel is planned to be released as an open source tool For environments that have higher dimensional state spaces , such as that of a robotic arm with multiple degrees of freedom , we can visualize individual state components . However , since this may not be intuitive , we can also generate an additional viewport to display an image rendering of the environment to help increase interpretability . | The paper deals with debugging of black-box deep reinforcement learning (RL) agents to better understand and fix their policies. The authors propose diverse tools for, among others, visualizing the state space in terms of calculated statistics, analyzing the taken actions across learning episodes or exploring the replay buffer. The authors also propose a workflow for using the proposed tools. The resulting Vizarel tool is evaluated in terms of an exemplary walkthrough. | SP:d8cd0216bc99e82a957d527a342bcefc5b69ec3c |
Interactive Visualization for Debugging RL | 1 INTRODUCTION . Machine learning systems have made impressive advances due to their ability to learn high dimensional models from large amounts of data ( LeCun et al. , 2015 ) . However , high dimensional models are hard to understand and trust ( Doshi-Velez & Kim , 2017 ) . Many tools exist for addressing this challenge in the supervised learning setting , which find usage in tracking metrics ( Abadi et al. , 2015 ; Satyanarayan et al. , 2017 ) , generating graphs of model internals ( Wongsuphasawat et al. , 2018 ) , and visualizing embeddings ( van der Maaten & Hinton , 2008 ) . However , there is no corresponding set of tools for the reinforcement learning setting . At first glance , it appears we may repurpose existing tools for this task . However , we quickly run into limitations , that arise due to the intent with which these tools were designed . Reinforcement learning ( RL ) is a more interactive science ( Neftci & Averbeck , 2019 ) compared to supervised learning , due to a stronger feedback loop between the researcher and the agent . Whereas supervised learning involves a static dataset , RL often entails collecting new data . To fully understand an RL algorithm , we must understand the effect it has on the data collected . Note that in supervised learning , the learned model has no effect on a fixed dataset . Visualization systems are important for overcoming these challenges . At their core visualization systems , consist of two components : representation and interaction . Representation is concerned with how data is mapped to a representation and then rendered . Interaction is concerned with the dialog between the user and the system as the user explores the data to uncover insights ( Yi et al. , 2007 ) . Though appearing to be disparate , these two processes have a symbiotic influence on each other . The tools we use for representation affect how we interact with the system , and our interaction affects the representations that we create . Thus , while designing visualization systems , it is important to think about the application domain from which the data originates , in this case , reinforcement learning . Using existing tools we can plot descriptive metrics such as cumulative reward , TD-error , and action values , to name a few . However , it is harder to pose and easily answer questions such as : - How does the agent state-visitation distribution change as training progresses ? - What effect do noteworthy , influential states have on the policy ? 1An interactive ( anonymized ) demo of the system can be found at https : //vizarel-demo . herokuapp.com - Are there repetitive patterns across space and time that result in the observed agent behavior ? These are far from an exhaustive list of questions that a researcher may pose while training agent policies , but are chosen to illustrate the limitations created by our current set of tools that prevent us from being able to easily answer such questions . This paper describes our attempt at constructing Vizarel 2 , an interactive visualization system to help interpret RL algorithms , debug RL policies , and help RL researchers pose and answer questions of this nature . Towards these goals , we identify features that an interactive system for interpretable reinforcement learning should encapsulate and build a prototype of these ideas . We complement this by providing a walkthrough example of how this system could fit into the RL debugging workflow and be used in a real scenario to debug a policy . 2 RELATED WORK . As we have argued in the introduction , existing visualization tools for machine learning primarily focus on the supervised learning setting . However , the process of designing and debugging RL algorithms requires a different set of tools , that can complement the strengths and overcome the weaknesses of offerings in the current ecosystem . In the rest of this section , we highlight aspects of prior work upon which our system builds . To the best of our knowledge , there do not exist visualization systems built for interpretable reinforcement learning that effectively address the broader goals we have identified . There exists prior work , aspects of which are relevant to features which the current system encapsulates , that we now detail . Visual Interpretability Related work for increasing understanding in machine learning models using visual explanations includes : feature visualization in neural networks ( Olah et al. , 2017 ; Simonyan et al. , 2014 ; Zeiler & Fergus , 2013 ) , visual analysis tools for variants of machine learning models ( Strobelt et al. , 2017 ; Kahng et al. , 2017 ; Kapoor et al. , 2010 ; Krause et al. , 2016 ; Yosinski et al . ) , treating existing methods as composable building blocks for user interfaces ( Olah et al. , 2018 ) , and visualization techniques for increasing explainability in reinforcement learning ( Rupprecht et al. , 2020 ; Atrey et al. , 2020 ; McGregor et al. , 2015 ) Explaining agent behavior There exists related work that tries to explain agent behavior . Amir & Amir summarize agent behavior by displaying important trajectories . van der Waa et al . ( 2018 ) introduce a method to provide contrastive explanations between user derived and agent learned policies . Huang et al . ( 2017 ) show maximally informative examples to guide the user towards understanding 2Vizarel is a portmanteau of visualization + reinforcement learning . the agent objective function . Hayes & Shah ( 2017 ) present algorithms and a system for robots to synthesize policy descriptions and respond to human queries . Explainable reinforcement learning Puiutta & Veith ( 2020 ) provide a survey of techniques for explainable reinforcement learning . Related work in this theme includes Puri et al . ( 2020 ) ; Reddy et al . ( 2019 ) ; Calvaresi et al . ( 2019 ) ; Juozapaitis et al . ( 2019 ) ; Sequeira & Gervasio ( 2020 ) ; Fukuchi et al . ( 2017 ) ; Madumal et al . ( 2020 ) Similar to Amir & Amir ; van der Waa et al . ( 2018 ) ; Huang et al . ( 2017 ) , this work is motivated by the aim to provide the researcher relevant information to explore a possible space of solutions while debugging the policy . Similar to Hayes & Shah ( 2017 ) , we present a functioning system that can respond to human queries to provide explanations . However , in contrast , the interactive system we present is built around the RL training workflow , and designed to evolve beyond the explanatory use case to complement the existing ecosystem of tools ( Abadi et al. , 2015 ; Satyanarayan et al. , 2017 ) . In contrast to the techniques surveyed in Puiutta & Veith ( 2020 ) , the contribution here is not on any single technique to increase interpretability , but a whole suite of visualizations built on an extensible platform to help researchers better design and debug RL agent policies for their task . 3 PRELIMINARIES . We use the standard reinforcement learning setup ( Sutton & Barto , 2018 ) . An agent interacting with an environment at discrete timesteps t , receiving a scalar reward r ( st , at ) ∈ R. The agent ’ s behavior is defined by a policy π , which maps states s ∈ S , to a probability distribution over actions , π : S → P ( A ) . The environment can be stochastic , which is modeled by a Markov decision process with a state space S , action space A ∈ Rn , an initial state distribution p ( s0 ) , a transition function p ( st+1 | st , a ) , and a reward function r ( st , at ) . The future discounted return from a state st and action at is defined as Rt = ∑T i=t γ i−tr ( st , at ) , with a discount factor γ ∈ [ 0 , 1 ] . We use a replay buffer ( Mnih et al. , 2013 ; Lin ) to store the agent ’ s experiences et = ( st , at , rt , st+1 ) in a buffer B = { e0 , e1 , ... , eT } . 4 VIZAREL : A TOOL FOR INTERACTIVE VISUALIZATION OF RL This section describes how our interactive visualization system ( Vizarel ) , is currently designed . The system offers different views that allow the user to analyze agent policies along spatial and temporal dimensions ( described later in further detail ) . The tool consists of a set of viewports , that provide the user with different representations of the data , contingent on the underlying data stream . Viewports are generated by chaining together different visualization elements , such as : 1. image buffers : visualize observation spaces ( image and non-image based ) 2. line plots : visualize sequentially ordered data , such as action values or rewards across time 3. scatter plots : to visualize embedding spaces or compare tensors along specified dimensions 4. histograms : visualize frequency counts of specified tensors or probability distributions The current implementation provides core viewports ( detailed further ) , but can easily be extended by the user to generate additional viewports to explore different visualization ideas . This design naturally leads to the idea of an ecosystem of plugins that could be integrated into the core system , and distributed for use among a community of users to support different visualization schemes and algorithms . For example , the user could combine image buffers and line plots in novel ways to create a viewport to visualize the the state-action value function Sutton & Barto ( 2018 ) . In the rest of this section , we provide details and distinguish between two types viewports currently implemented in Vizarel : temporal viewports and spatial viewports . Discussion on viewports beyond these has been deferred to the appendix . Comprehensive information on adding new viewports is beyond the scope of the paper , but has been described at length in the system documentation3 . 4.1 TEMPORAL VIEWS . Temporal views are oriented around visualizing the data stream ( e.g . images , actions , rewards ) as a sequence of events ordered along the time dimension . We have implemented three types of temporal viewports : state viewports , action viewports , and reward viewports , which we now detail . 4.1.1 STATE VIEWPORT . For visualization , we can classify states as either image-based or non-image based . The type of observation space influences the corresponding viewport used for visualization . We provide two examples that illustrate how these differing observation spaces can result in different viewports . Consider a non-image based observation space , such as that for the inverted pendulum task . Here , the state vector ~s = { sin ( θ ) , cos ( θ ) , θ̇ } , where θ is the angle which the pendulum makes with the vertical . We can visualize the state vector components individually , which provides insight into how states vary across episode timesteps ( Figure 2 ) . Since images are easier for humans to interpret , we can generate an additional viewport using image buffers , that tracks changes in state space to the corresponding changes in image space . Having this simultaneous visualization is useful since it now enables us to jump back and forth between the state representation which the agent receives , and the corresponding image representation , by simply hovering over the desired timestep in the state viewport . 3Vizarel is planned to be released as an open source tool For environments that have higher dimensional state spaces , such as that of a robotic arm with multiple degrees of freedom , we can visualize individual state components . However , since this may not be intuitive , we can also generate an additional viewport to display an image rendering of the environment to help increase interpretability . | a. This article contributes a framework and tool for visualising data collected from a policy during RL training. It also contributes a set of views for visualising RL training data that could be used in general. Finally, the paper contributes a high-level workflow and a set of example use cases for how this tool might impact debugging a training session. | SP:d8cd0216bc99e82a957d527a342bcefc5b69ec3c |
Center-wise Local Image Mixture For Contrastive Representation Learning | 1 INTRODUCTION . Learning general representations that can be transferable to different downstream tasks is a key challenge in computer vision . This is usually achieved by fully supervised learning paradigm , e.g. , making use of ImageNet labels for pretraining over the past several years . Recently , self-supervised learning has attracted more attention due to its free of human labels . In self-supervised learning , the network aims at exploring the intrinsic distributions of images via a series of predefined pretext tasks ( Doersch et al. , 2015 ; Gidaris et al. , 2018 ; Noroozi & Favaro , 2016 ; Pathak et al. , 2016 ) . Among them , instance discrimination ( Wu et al. , 2018 ) based methods have achieved remarkable progress ( Chen et al. , 2020a ; He et al. , 2020 ; Grill et al. , 2020 ; Caron et al. , 2020 ) . The core idea of instance discrimination is to push away different images , and encourage the representation of different transformations ( augmentations ) of the same image to be similar . Following this paradigm , self-supervised models are able to generate features that are comparable or even better than those produced by supervised pretraining when evaluated on some downstream tasks , e.g. , COCO detection and segmentation ( Chen et al. , 2020c ; b ) . In contrastive learning , the positive pairs are simply constrained within different transformations of the same image , e.g. , cropping , color distortion , Gaussian blur , rotation , etc .. Recent advances have demonstrated that better data augmentations ( Chen et al. , 2020a ) really help to improve the representation robustness . However , contrasting two images that are de facto similar in semantic space is not applicable for general representations . It is intuitive to pull semantically similar images for better transferability . DeepCluster ( Caron et al. , 2018 ) and Local Aggregation ( Zhuang et al. , 2019 ) relax the extreme instance discrimination task via discriminating groups of images instead of an individual image . However , due to the lack of labels , it is inevitable that the positive pairs contain noisy samples , which limits the performance . In this paper , we target at expanding instance discrimination by exploring local similarities among images . Towards this goal , one need to solve two issues : i ) how to select similar images as positive pairs of an image , and ii ) how to incorporate these positive pairs , which inevitably contain noisy assignments , into contrastive learning . We propose a new kind of data augmentation , named Centerwise Local Image Mixture , to tackle the above two issues in a robust and efficient way . CLIM consists of two core elements , i.e. , a center-wise positive sample selection , as well as a data mixing operation . For positive sample selection , the motivation is that a good representation should be endowed with high intra-class similarity , and we find that although MoCo ( He et al. , 2020 ) does not explicitly model invariance to similar images , the intra-class similarity becomes higher as the training process goes . Based on this observation , we explicitly enforce semantically similar images towards the center of clusters , and generate representation with higher intra-class similarity , which we find is beneficial for few shot learning . This is achieved by searching nearest neighbors of an image , and only retaining similar samples that are closer to the corresponding cluster center , which we denote as center-wise local sample selection . As a result , an image is pulled towards the center while do not break the local similarity . Once similar samples are selected , a direct way is to treat these similar samples as multiple positives for contrastive learning . However , since feature representation in high dimensional space is complex , the returned positive samples inevitably contain noisy assignments , which should not be overconfident . Instead , we rely on data mixing as augmented samples , which can be treated as a smoothing regularization in unsupervised learning . In particular , we apply Cutmix ( Yun et al. , 2019 ) , a widely used data augmentation in supervised learning , where patches are cut and pasted among the positive pairs to generate new samples . Benefit from the center-wise sample selection , the Cutmix augmentation is only constrained within the local neighborhood of an image , and can be treated as an expansion of current neighborhood space . In this way , similar samples are pulled together in a smoother and robust way , which we find is beneficial for general representation . Furthermore , we propose multi-resolution augmentation , which aims at contrasting the same image ( patch ) at different resolutions explicitly , to enable the representation to be scale invariant . We argue that although previous operations such as crop and resize introduce multi-resolution implicitly , they do not compare the same patch at different resolutions directly . As comparisons , multi-resolution incorporates scale invariance into contrastive learning , and significantly boosts the performance even based on a strong baseline . The multi-resolution strategy is simple but effective , and can be combined with current data augmentations for further improving performance . We evaluate the feature representation on several self-supervised learning benchmarks . In particular , on ImageNet linear evaluation protocol , we achieve 75.5 % top-1 accuracy with a standard ResNet50 . In few shot setting , when finetuned with only 1 % labels , we achieve 59.3 % top-1 accuracy , surpassing previous works by a large margin . We also validate its transferring ability on several downstream tasks , and consistently outperform the fully supervised counterparts . 2 RELATED WORK . Unsupervised Representation Learning . Unsupervised learning aims at exploring the intrinsic distribution of data samples via constructing a series of pretext tasks without human labels . These pretext tasks take many forms and vary in utilizing different properties of images . Among them , one family of methods takes advantage of the spatial properties of images , typical pretext tasks include predicting the relative spatial positions of patches ( Doersch et al. , 2015 ; Noroozi & Favaro , 2016 ) , or inferring the missing parts of images by inpainting ( Pathak et al. , 2016 ) , colorization ( Zhang et al. , 2016 ) , or rotation prediction ( Gidaris et al. , 2018 ) . Recent progress in self-supervised learning mainly benefits from instance discrimination , which regards each image ( and augmentations of itself ) as one class for contrastive learning . The motivation behind these works is the InfoMax principle , which aims at maximizing mutual information ( Tian et al. , 2019 ; Wu et al. , 2018 ) across different augmentations of the same image ( He et al. , 2020 ; Chen et al. , 2020a ) , ( Tian et al. , 2019 ) . Data Augmentation . Instance discrimination makes use of several data augmentations , e.g. , random cropping , color jittering , horizontal flipping , to define a large view set of vicinities for each image . As has been demonstrated ( Chen et al. , 2020a ; Tian et al. , 2020 ) , the effectiveness of instance discrimination methods strongly relies on the type of augmentations . Hoping that the network holds invariance in the local vicinities of each sample . However , current data augmentations are mostly constrained within a single image . An exception is ( Shen et al. , 2020 ) , where image mixture is used for flattened contrastive predictions . However , such mixture strategy is conducted among all images , which destroys the local similarity when contrasting mixed samples that are semantic dissimilar . Beyond self-supervised learning , mixing samples from different images is widely used to help alleviate overfitting in training deep networks . In particular , Mixup ( Zhang et al. , 2017 ) combines two samples linearly on pixel level , where the target of the synthetic image was a linear combination of one-hot labels . Following Mixup , there are a few variants ( Verma et al. , 2018 ) as well as a recent effort named Cutmix ( Yun et al. , 2019 ) , which combined Mixup and Cutout ( DeVries & Taylor , 2017 ) by cutting and pasting patches . 3 METHOD . In this section , we start by reviewing contrastive learning for unsupervised representation learning . Then we elaborate our proposed CLIM data augmentation , which targets at pulling similar samples via center-wise similar sample selection , followed by a cutmix data augmentation . We also present multi-resolution augmentation that we observe further improves the performance , as well as detailed analysis with recent methods that share similar targets with our method . 3.1 CONTRASTIVE LEARNING . Contrastive learning targets at training an encoder to map positive pairs to similar representations while pushing away the negative samples in the embedding space . Given unlabeled training set X = { x1 , x2 , ... , xn } . Instance-wise contrastive learning aims to learn an encoder fq that maps the samples X to embedding space V = { v1 , v2 , ... , vn } by optimizing a contrastive loss . Take the Noise Contrastive Estimator ( NCE ) ( Oord et al. , 2018 ) as an example , the contrastive loss is defined as : Lnce ( xi , x′i ) = −log exp ( fq ( xi ) · fk ( x′i ) /τ ) exp ( fq ( xi ) · fk ( x′i ) /τ ) + ∑K j=1 exp ( fq ( xi ) · fk ( x′j ) /τ ) ) , ( 1 ) where τ is the temperature parameter , and x′i and x ′ j denote the positive and negative samples of xi , respectively . The encoder fk can be shared ( Chen et al. , 2020a ; Caron et al. , 2020 ) or momentum update of the encoder fq ( He et al. , 2020 ) . 3.2 CLIM : CENTER-WISE LOCAL IMAGE MIXTURE . In contrastive learning , each sample as well as its augmentations is treated as a separate class , while all other samples are regarded as negative examples and pushed away . In principle , semantically similar samples should have similar feature representation in the embedding space , while current contrastive strategies do not consider the semantic similarities among different samples , and only choose different views of the same sample as positive pairs . To solve this issue , we propose a new kind of data augmentation , termed as Center-wise Local Image Mixture , which pulls samples that are semantically similar in an efficient and robust way . The proposed CLIM augmentation consists of two elements , i.e. , center-wise local similar sample selection , and a cutmix data augmentation , which would be described in details in the following . 3.2.1 CENTER-WISE LOCAL POSITIVE SAMPLE SELECTION . As noted by ( Wang & Isola , 2020 ) , a good representation should satisfy both alignment and uniformity , which encourages similar images to have similar representation in the embedding space , and meanwhile , semantically similar features are well-clustered . Towards this goal , we propose a positive sample selection strategy that considers both local similarity and global aggregation . This is achieved by searching similar samples within a cluster that the anchor sample belongs to , and only retaining samples that are closer to the corresponding cluster center . We denote it as center-wise local selection as these samples are picked out towards the cluster center among the local neighborhood of an image . In this way , similar samples are progressively pulled to the predefined cluster centers , while do not break the local similarity . Specifically , given a set of unlabeled images X= { x1 , x2 , ... , xn } and the corresponding embedding V = { v1 , v2 , ... , vn } with encoder fθ , where vi = fθ ( xi ) . We cluster the representations V using a standard k-means algorithm , and obtainm centers C = { c1 , c2 , ... , cm } . Given an anchor xi with its assigned cluster c ( xi ) ∈ C , denote the sample set that belongs to c ( xi ) as Ω1 = { x|c ( x ) = c ( xi ) } . We search the k nearest neighbors of xi over the entire space with L2 distance , obtaining sample set Ω2 = { xi1 , ... , xik } . The positive samples are selected based on the following rule : Ωp = { x|d ( fθ ( x ) , vc ( xi ) ) ≤ d ( fθ ( xi ) , vc ( xi ) ) , x ∈ Ω1 ∩Ω2 } , ( 2 ) where d ( · , · ) denotes the L2 distance of two samples , and vc ( xi ) denotes the feature representation of the corresponding cluster center , respectively . In this way , the samples are aggregated towards the predefined clusters , and meanwhile maintaining the local similarity . Our method combines the advantages of cluster and nearest neighbor methods . An illustration comparing the three methods is shown in Fig . 2 . Cluster-based method regards all samples that belong to the same center as positive pairs , which breaks the local similarity among samples especially when the anchor is around the boundary . While nearest neighbor-based method independently pulling samples of an anchor , and does not encourage the well-clustered goal . As a result , the embedding space is not highly concentrated among multiple similar anchors . As comparisons , by center-wise sample selection , similar samples are progressively pulled to the predefined center as well as considering the local similarity . In the experimental section , we would compare the performance of the three methods , and validate the superior performance of our proposed selection strategy . | This paper focuses on contrastive learning for performing self-supervised network pre-training. Two components are proposed: First, to select semantically similar images that are pulled together in the contrastive learning, the paper proposes "center-wise local image mixture" (CLIM) - both k-means clustering and knn neighbors are computed, and then for a given anchor image x, and images x' that fall within the same cluster and are a knn neighbor (and additionally closer to the cluster center than x) are selected as a positive match to x. This is motivated from the perspective of allowing for consideration of both local similarity and global aggregation. This selection is further modified by the use of cutmix data augmentation, where (x, x') are combined via a binary mask. This is motivated from the perspective of allowing for some smoothing regularization to handle potentially noisy matches from CLIM. | SP:41f62bc0a7b3a9d4debaa2b1345538727a3f680e |
Center-wise Local Image Mixture For Contrastive Representation Learning | 1 INTRODUCTION . Learning general representations that can be transferable to different downstream tasks is a key challenge in computer vision . This is usually achieved by fully supervised learning paradigm , e.g. , making use of ImageNet labels for pretraining over the past several years . Recently , self-supervised learning has attracted more attention due to its free of human labels . In self-supervised learning , the network aims at exploring the intrinsic distributions of images via a series of predefined pretext tasks ( Doersch et al. , 2015 ; Gidaris et al. , 2018 ; Noroozi & Favaro , 2016 ; Pathak et al. , 2016 ) . Among them , instance discrimination ( Wu et al. , 2018 ) based methods have achieved remarkable progress ( Chen et al. , 2020a ; He et al. , 2020 ; Grill et al. , 2020 ; Caron et al. , 2020 ) . The core idea of instance discrimination is to push away different images , and encourage the representation of different transformations ( augmentations ) of the same image to be similar . Following this paradigm , self-supervised models are able to generate features that are comparable or even better than those produced by supervised pretraining when evaluated on some downstream tasks , e.g. , COCO detection and segmentation ( Chen et al. , 2020c ; b ) . In contrastive learning , the positive pairs are simply constrained within different transformations of the same image , e.g. , cropping , color distortion , Gaussian blur , rotation , etc .. Recent advances have demonstrated that better data augmentations ( Chen et al. , 2020a ) really help to improve the representation robustness . However , contrasting two images that are de facto similar in semantic space is not applicable for general representations . It is intuitive to pull semantically similar images for better transferability . DeepCluster ( Caron et al. , 2018 ) and Local Aggregation ( Zhuang et al. , 2019 ) relax the extreme instance discrimination task via discriminating groups of images instead of an individual image . However , due to the lack of labels , it is inevitable that the positive pairs contain noisy samples , which limits the performance . In this paper , we target at expanding instance discrimination by exploring local similarities among images . Towards this goal , one need to solve two issues : i ) how to select similar images as positive pairs of an image , and ii ) how to incorporate these positive pairs , which inevitably contain noisy assignments , into contrastive learning . We propose a new kind of data augmentation , named Centerwise Local Image Mixture , to tackle the above two issues in a robust and efficient way . CLIM consists of two core elements , i.e. , a center-wise positive sample selection , as well as a data mixing operation . For positive sample selection , the motivation is that a good representation should be endowed with high intra-class similarity , and we find that although MoCo ( He et al. , 2020 ) does not explicitly model invariance to similar images , the intra-class similarity becomes higher as the training process goes . Based on this observation , we explicitly enforce semantically similar images towards the center of clusters , and generate representation with higher intra-class similarity , which we find is beneficial for few shot learning . This is achieved by searching nearest neighbors of an image , and only retaining similar samples that are closer to the corresponding cluster center , which we denote as center-wise local sample selection . As a result , an image is pulled towards the center while do not break the local similarity . Once similar samples are selected , a direct way is to treat these similar samples as multiple positives for contrastive learning . However , since feature representation in high dimensional space is complex , the returned positive samples inevitably contain noisy assignments , which should not be overconfident . Instead , we rely on data mixing as augmented samples , which can be treated as a smoothing regularization in unsupervised learning . In particular , we apply Cutmix ( Yun et al. , 2019 ) , a widely used data augmentation in supervised learning , where patches are cut and pasted among the positive pairs to generate new samples . Benefit from the center-wise sample selection , the Cutmix augmentation is only constrained within the local neighborhood of an image , and can be treated as an expansion of current neighborhood space . In this way , similar samples are pulled together in a smoother and robust way , which we find is beneficial for general representation . Furthermore , we propose multi-resolution augmentation , which aims at contrasting the same image ( patch ) at different resolutions explicitly , to enable the representation to be scale invariant . We argue that although previous operations such as crop and resize introduce multi-resolution implicitly , they do not compare the same patch at different resolutions directly . As comparisons , multi-resolution incorporates scale invariance into contrastive learning , and significantly boosts the performance even based on a strong baseline . The multi-resolution strategy is simple but effective , and can be combined with current data augmentations for further improving performance . We evaluate the feature representation on several self-supervised learning benchmarks . In particular , on ImageNet linear evaluation protocol , we achieve 75.5 % top-1 accuracy with a standard ResNet50 . In few shot setting , when finetuned with only 1 % labels , we achieve 59.3 % top-1 accuracy , surpassing previous works by a large margin . We also validate its transferring ability on several downstream tasks , and consistently outperform the fully supervised counterparts . 2 RELATED WORK . Unsupervised Representation Learning . Unsupervised learning aims at exploring the intrinsic distribution of data samples via constructing a series of pretext tasks without human labels . These pretext tasks take many forms and vary in utilizing different properties of images . Among them , one family of methods takes advantage of the spatial properties of images , typical pretext tasks include predicting the relative spatial positions of patches ( Doersch et al. , 2015 ; Noroozi & Favaro , 2016 ) , or inferring the missing parts of images by inpainting ( Pathak et al. , 2016 ) , colorization ( Zhang et al. , 2016 ) , or rotation prediction ( Gidaris et al. , 2018 ) . Recent progress in self-supervised learning mainly benefits from instance discrimination , which regards each image ( and augmentations of itself ) as one class for contrastive learning . The motivation behind these works is the InfoMax principle , which aims at maximizing mutual information ( Tian et al. , 2019 ; Wu et al. , 2018 ) across different augmentations of the same image ( He et al. , 2020 ; Chen et al. , 2020a ) , ( Tian et al. , 2019 ) . Data Augmentation . Instance discrimination makes use of several data augmentations , e.g. , random cropping , color jittering , horizontal flipping , to define a large view set of vicinities for each image . As has been demonstrated ( Chen et al. , 2020a ; Tian et al. , 2020 ) , the effectiveness of instance discrimination methods strongly relies on the type of augmentations . Hoping that the network holds invariance in the local vicinities of each sample . However , current data augmentations are mostly constrained within a single image . An exception is ( Shen et al. , 2020 ) , where image mixture is used for flattened contrastive predictions . However , such mixture strategy is conducted among all images , which destroys the local similarity when contrasting mixed samples that are semantic dissimilar . Beyond self-supervised learning , mixing samples from different images is widely used to help alleviate overfitting in training deep networks . In particular , Mixup ( Zhang et al. , 2017 ) combines two samples linearly on pixel level , where the target of the synthetic image was a linear combination of one-hot labels . Following Mixup , there are a few variants ( Verma et al. , 2018 ) as well as a recent effort named Cutmix ( Yun et al. , 2019 ) , which combined Mixup and Cutout ( DeVries & Taylor , 2017 ) by cutting and pasting patches . 3 METHOD . In this section , we start by reviewing contrastive learning for unsupervised representation learning . Then we elaborate our proposed CLIM data augmentation , which targets at pulling similar samples via center-wise similar sample selection , followed by a cutmix data augmentation . We also present multi-resolution augmentation that we observe further improves the performance , as well as detailed analysis with recent methods that share similar targets with our method . 3.1 CONTRASTIVE LEARNING . Contrastive learning targets at training an encoder to map positive pairs to similar representations while pushing away the negative samples in the embedding space . Given unlabeled training set X = { x1 , x2 , ... , xn } . Instance-wise contrastive learning aims to learn an encoder fq that maps the samples X to embedding space V = { v1 , v2 , ... , vn } by optimizing a contrastive loss . Take the Noise Contrastive Estimator ( NCE ) ( Oord et al. , 2018 ) as an example , the contrastive loss is defined as : Lnce ( xi , x′i ) = −log exp ( fq ( xi ) · fk ( x′i ) /τ ) exp ( fq ( xi ) · fk ( x′i ) /τ ) + ∑K j=1 exp ( fq ( xi ) · fk ( x′j ) /τ ) ) , ( 1 ) where τ is the temperature parameter , and x′i and x ′ j denote the positive and negative samples of xi , respectively . The encoder fk can be shared ( Chen et al. , 2020a ; Caron et al. , 2020 ) or momentum update of the encoder fq ( He et al. , 2020 ) . 3.2 CLIM : CENTER-WISE LOCAL IMAGE MIXTURE . In contrastive learning , each sample as well as its augmentations is treated as a separate class , while all other samples are regarded as negative examples and pushed away . In principle , semantically similar samples should have similar feature representation in the embedding space , while current contrastive strategies do not consider the semantic similarities among different samples , and only choose different views of the same sample as positive pairs . To solve this issue , we propose a new kind of data augmentation , termed as Center-wise Local Image Mixture , which pulls samples that are semantically similar in an efficient and robust way . The proposed CLIM augmentation consists of two elements , i.e. , center-wise local similar sample selection , and a cutmix data augmentation , which would be described in details in the following . 3.2.1 CENTER-WISE LOCAL POSITIVE SAMPLE SELECTION . As noted by ( Wang & Isola , 2020 ) , a good representation should satisfy both alignment and uniformity , which encourages similar images to have similar representation in the embedding space , and meanwhile , semantically similar features are well-clustered . Towards this goal , we propose a positive sample selection strategy that considers both local similarity and global aggregation . This is achieved by searching similar samples within a cluster that the anchor sample belongs to , and only retaining samples that are closer to the corresponding cluster center . We denote it as center-wise local selection as these samples are picked out towards the cluster center among the local neighborhood of an image . In this way , similar samples are progressively pulled to the predefined cluster centers , while do not break the local similarity . Specifically , given a set of unlabeled images X= { x1 , x2 , ... , xn } and the corresponding embedding V = { v1 , v2 , ... , vn } with encoder fθ , where vi = fθ ( xi ) . We cluster the representations V using a standard k-means algorithm , and obtainm centers C = { c1 , c2 , ... , cm } . Given an anchor xi with its assigned cluster c ( xi ) ∈ C , denote the sample set that belongs to c ( xi ) as Ω1 = { x|c ( x ) = c ( xi ) } . We search the k nearest neighbors of xi over the entire space with L2 distance , obtaining sample set Ω2 = { xi1 , ... , xik } . The positive samples are selected based on the following rule : Ωp = { x|d ( fθ ( x ) , vc ( xi ) ) ≤ d ( fθ ( xi ) , vc ( xi ) ) , x ∈ Ω1 ∩Ω2 } , ( 2 ) where d ( · , · ) denotes the L2 distance of two samples , and vc ( xi ) denotes the feature representation of the corresponding cluster center , respectively . In this way , the samples are aggregated towards the predefined clusters , and meanwhile maintaining the local similarity . Our method combines the advantages of cluster and nearest neighbor methods . An illustration comparing the three methods is shown in Fig . 2 . Cluster-based method regards all samples that belong to the same center as positive pairs , which breaks the local similarity among samples especially when the anchor is around the boundary . While nearest neighbor-based method independently pulling samples of an anchor , and does not encourage the well-clustered goal . As a result , the embedding space is not highly concentrated among multiple similar anchors . As comparisons , by center-wise sample selection , similar samples are progressively pulled to the predefined center as well as considering the local similarity . In the experimental section , we would compare the performance of the three methods , and validate the superior performance of our proposed selection strategy . | The paper addresses the problem of contrastive representation learning, and proposes a new data augmentation, dubbed CLIM, that leverages similarity between images. Instead of generating positives pairs using different transformation of the same image -as it is standard in contrastive learning-, positive pairs are generated using those similar images to the anchor image: after clustering the representation space using k-means, the nearest neighbours that are closer to the corresponding center of the cluster where the anchor belongs to are selected. Then, positive pairs are constructed following Cutmix, which can be seen as a regulariser, and which consists in cutting and pasting patches among these pairs to generate new samples. Finally, the paper also proposes a multi-resolution augmentation, which consists in random zooms in (ie. random crop + resize) at different scales to enable scale invariance. | SP:41f62bc0a7b3a9d4debaa2b1345538727a3f680e |
USING OBJECT-FOCUSED IMAGES AS AN IMAGE AUGMENTATION TECHNIQUE TO IMPROVE THE ACCURACY OF IMAGE-CLASSIFICATION MODELS WHEN VERY LIMITED DATA SETS ARE AVAILABLE | Today , many of the machine learning models are extremely data hungry . On the other hand , the accuracy of the algorithms used is very often affected by the amount of the training data available , which is , unfortunately , rarely abundant . Fortunately , image augmentation is one of the very powerful techniques that can be used by computer-vision engineers to expand their existing image data sets . This paper presents an innovative way for creating a variation of existing images and introduces the idea of using an Object-Focused Image ( OFI ) . This is when an image includes only the labeled object and everything else is made transparent . The objective of OFI method is to expand the existing image data set and hence improve the accuracy of the model used to classify images . This paper also elaborates on the OFI approach and compares the accuracy of five different models with the same network design and settings but with different content of the training data set . The experiments presented in this paper show that using OFIs along with the original images can lead to an increase in the validation accuracy of the used model . In fact , when the OFI technique is used , the number of the images supplied nearly doubles . 1 INTRODUCTION . Nowadays , Convolutional Neural Networks ( CNNs ) are among the most common tools used for image classification . For machine learning ( ML ) problems such as image classification , the size of the training image set is very important to build high-accuracy classifiers . As the popularity of CNNs grows , so does the interest in data augmentation . Although augmented data sets are sometimes artificial , they are very similar to the original data sets . Thus , augmentation can make a network learn more useful representations because of the increase of training data . In this paper , the researchers propose a new method to produce new images from existing ones and therefore augment data . Several experiments were conducted to validate that the model could benefit further from using the mixed data set of old and new images . This paper compares five models with the same design and settings . The only difference is the set of supplied images . The first model uses the original 2,000 images of dogs and cats . The second and the third use the OFI version of those 2,000 images . The fourth and the fifth use all the images : the original images as well as the OFI images . There are two methods to obtain the OFIs . The automated method uses an Application Programming Interface ( API ) to remove the background of the image and leave only the labeled object ( a cat or a dog ) in the foreground . The OFIs produced by the first method are called automatic OFIs . The other method is executed manually : every image is edited by a human expert who will remove the background or any additional object in the image . The OFIs produced by this second method are called manual OFIs . The manual method is more accurate than the automated API method and might lead to better results . The only difference between the second and the third models is the fact that the second model uses the automatic method while the third model uses the manual method . This is also the difference between the fourth and the fifth models . In this paper , the five models are tested to answer the following questions : • Will the model have a better validation accuracy when only the original set of images is used ? • Will it have better validation accuracy when only the set of OFIs is used ? • Will we have better validation accuracy when both sets are used ? • Are models with manual OFIs more accurate than those which use automatic OFIs ? 2 RELATED WORK . In deep learning , augmentation is a commonly used practice since the 80 ’ s and early 90 ’ s ( Simard et al. , 1992 ) . It is considered a critical component of many ML models ( Ciresan et al. , 2010 ; Krizhevsky et al. , 2012 ; LeCun et al. , 2015 ) . Augmentation is of paramount importance in extreme cases where only few training examples are available ( Vinyals et al. , 2016 ) . In fact , it has been considered an extremely important element of numerous successful modern models . Among these models are : the AlexNet model ( Krizhevsky et al. , 2012 ) , All-CNN model ( Springenberg et al. , 2014 ) , and the ResNet model ( He et al. , 2016 ) . In some implementations , experts were able to rely on data augmentation , apply it heavily , and achieve successful results ( Wu et al. , 2015 ) . This is not the case with computer vision only . Data augmentation was effective with other domains also like text categorization ( Lu et al. , 2006 ) , speech recognition ( Jaitly & Hinton , 2013 ) , and music source separation ( Uhlich et al. , 2017 ) . When given sufficient data , deep neural networks were providing exceptional results . They have been studied , proven , and demonstrated in many domains ( Gu et al. , 2015 ) , including : image classification ( Krizhevsky et al. , 2012 ; Huang et al. , 2016 ) , natural language processing ( Gu et al. , 2015 ) , reinforcement learning ( Mnih et al. , 2015 ; Foerster et al. , 2016 ; Silver et al. , 2016 ; Gu et al. , 2016 ; Van Hasselt et al. , 2016 ) , machine translation ( Wu et al. , 2016 ) , synthesis ( Wang et al. , 2017 ) , and many more . In all these experiments and implementations , used datasets have been significantly large . Augmentation is a vital technique , not only for cases where datasets are small but also for any size of dataset . Indeed , even those models trained on enormous datasets such as Imagenet ( Deng et al. , 2009 ) could benefit from data augmentation . Without data augmentation , deep neural networks may suffer from the lack of generalization ( Perez & Wang , 2017 ) and adversarial vulnerability ( Zhang et al. , 2017 ) . Although CNNs have led to substantial achievements in image-processing tasks and image classification ( Zeiler and Fergus , 2014 ; Sermanet et al. , 2014 ) , CNNs with abundant parameters might over fit . This is due to the fact that they learn very detailed features of supplied training images that do not generalize to images unseen during training ( Zeiler and Fergus , 2014 ; Zintgraf et al. , 2017 ) . Data augmentation has been considered a solution to this overfitting problem ( Krizhevsky et al. , 2012 ; He et al. , 2016 ; DeVries and Taylor , 2017 ) . Nowadays , data augmentation techniques are gaining continuous attention ( DeVries and Taylor , 2017 ; Zhong et al. , 2017 ; Zhang et al. , 2017 ) . When it comes to image recognition , data augmentation is one of the fundamental building blocks for almost all state-of-the-art results ( Ciresan et al. , 2010 ; Dosovitskiy et al. , 2016 ; Graham , 2014 ; Sajjadi et al. , 2016 ) . Nonetheless , because augmentation strategies may have a large impact on the model performance , they require extensive selection and tuning ( Ratner et al. , 2017 ) . In fact , data augmentation experts proposed cutout ( DeVries and Taylor , 2017 ) . At every training step , cutout randomly masks out a square region in an image . It is an extension of dropout . Random erasing is similar to cutout ( Zhong et al . 2017 ) , as it masks out a subregion in an image but with the following three differences : i ) It randomly chooses whether or not to mask out ; ii ) It uses a random size ; and iii ) It uses a random aspect ratio of the masked region . On the other hand , Mixup α-blends two images to form a new image ( Zhang et al. , 2017 ) . Mixup also behaves like class label smoothing . It mixes the class labels of two images with the ratio α : 1 − α ( Szegedy et al. , 2016 ) . Other researchers proposed techniques such as random-cropping and horizontal-flipping ( Krizhevsky et al. , 2012 ) . These useful augmentation methods have been applied to modern deep CNNs . They were proven to be very efficient and demonstrated the added value of data augmentation . After ResNet was proposed ( He et al. , 2016 ) , new network architectures have been proposed as well ( Zagoruyko and Komodakis , 2016 ; Han et al. , 2017 ) . Pixel-dropping , however , injects noise into the image ( Sietsma and Dow , 1991 ) . In short , there are numerous data augmentation techniques . Figure 1 summarizes them . Each line with a shape in Figure 1 tells which data augmentation method is used by the corresponding meta-learning scheme . For instance , meta-learning using mixing images is covered in smart augmentation ( Perez & Wang , 2017 ) . 3 THE OFI TECHNIQUE . Computer-vision engineers use images to train their models . These images include the object that needs to be correctly classified . There is , nevertheless , a small problem with these images : they include other objects that we do not want to train the model on . If we want to train a model to classify images of dogs and cats , we should always ask ourselves the following questions : • Why should we train the model on something that might not be seen later ? • Why , for example , should we train the model on a cat with a ball behind it , but when the training ends , we ’ ll ask the model to classify an image without a ball ? • Once the model is trained , it will classify an image of a cat with a tree , a fence , or a couch behind it , so why train the model on a cat with a ball , while real-life images might include millions of other things ? It is a good practice to try to train a model using images that include the labeled object only and nothing else . This is what the OFI technique attempts to do . For every image in the training set , another image is generated where the labeled object is kept untouched and everything in the background is made transparent as shown in Figure 2 . When such an image is supplied as a part of the training set , the model is instructed to focus only on the labeled object . There will be no other objects for the network to be trained on . Here , the scenario can be seen exactly as training a baby on what a cat is . When that baby sees only a cat in the image , s/he would not get confused which object is the cat . Otherwise , some questions need to be answered : • What if there were many balls in the many images we have ? • Would our model get a little confused by those additional objects and try to be trained on ? • Would our model keep changing its parameters and weights based on the additional objects in the image ? | Authors propose an augmentation technique for image classification. The augmented image is obtained by segmenting the salient object and masking the background. Therefore the technique gives one additional augmented image per each training image. The authors show an improved performance when using this augmentation on binary classification task (cats vs. dogs) using a dataset of 2000 images. | SP:500d68ce2d8f1e6fea4fa54703101c6823ba2b6c |
USING OBJECT-FOCUSED IMAGES AS AN IMAGE AUGMENTATION TECHNIQUE TO IMPROVE THE ACCURACY OF IMAGE-CLASSIFICATION MODELS WHEN VERY LIMITED DATA SETS ARE AVAILABLE | Today , many of the machine learning models are extremely data hungry . On the other hand , the accuracy of the algorithms used is very often affected by the amount of the training data available , which is , unfortunately , rarely abundant . Fortunately , image augmentation is one of the very powerful techniques that can be used by computer-vision engineers to expand their existing image data sets . This paper presents an innovative way for creating a variation of existing images and introduces the idea of using an Object-Focused Image ( OFI ) . This is when an image includes only the labeled object and everything else is made transparent . The objective of OFI method is to expand the existing image data set and hence improve the accuracy of the model used to classify images . This paper also elaborates on the OFI approach and compares the accuracy of five different models with the same network design and settings but with different content of the training data set . The experiments presented in this paper show that using OFIs along with the original images can lead to an increase in the validation accuracy of the used model . In fact , when the OFI technique is used , the number of the images supplied nearly doubles . 1 INTRODUCTION . Nowadays , Convolutional Neural Networks ( CNNs ) are among the most common tools used for image classification . For machine learning ( ML ) problems such as image classification , the size of the training image set is very important to build high-accuracy classifiers . As the popularity of CNNs grows , so does the interest in data augmentation . Although augmented data sets are sometimes artificial , they are very similar to the original data sets . Thus , augmentation can make a network learn more useful representations because of the increase of training data . In this paper , the researchers propose a new method to produce new images from existing ones and therefore augment data . Several experiments were conducted to validate that the model could benefit further from using the mixed data set of old and new images . This paper compares five models with the same design and settings . The only difference is the set of supplied images . The first model uses the original 2,000 images of dogs and cats . The second and the third use the OFI version of those 2,000 images . The fourth and the fifth use all the images : the original images as well as the OFI images . There are two methods to obtain the OFIs . The automated method uses an Application Programming Interface ( API ) to remove the background of the image and leave only the labeled object ( a cat or a dog ) in the foreground . The OFIs produced by the first method are called automatic OFIs . The other method is executed manually : every image is edited by a human expert who will remove the background or any additional object in the image . The OFIs produced by this second method are called manual OFIs . The manual method is more accurate than the automated API method and might lead to better results . The only difference between the second and the third models is the fact that the second model uses the automatic method while the third model uses the manual method . This is also the difference between the fourth and the fifth models . In this paper , the five models are tested to answer the following questions : • Will the model have a better validation accuracy when only the original set of images is used ? • Will it have better validation accuracy when only the set of OFIs is used ? • Will we have better validation accuracy when both sets are used ? • Are models with manual OFIs more accurate than those which use automatic OFIs ? 2 RELATED WORK . In deep learning , augmentation is a commonly used practice since the 80 ’ s and early 90 ’ s ( Simard et al. , 1992 ) . It is considered a critical component of many ML models ( Ciresan et al. , 2010 ; Krizhevsky et al. , 2012 ; LeCun et al. , 2015 ) . Augmentation is of paramount importance in extreme cases where only few training examples are available ( Vinyals et al. , 2016 ) . In fact , it has been considered an extremely important element of numerous successful modern models . Among these models are : the AlexNet model ( Krizhevsky et al. , 2012 ) , All-CNN model ( Springenberg et al. , 2014 ) , and the ResNet model ( He et al. , 2016 ) . In some implementations , experts were able to rely on data augmentation , apply it heavily , and achieve successful results ( Wu et al. , 2015 ) . This is not the case with computer vision only . Data augmentation was effective with other domains also like text categorization ( Lu et al. , 2006 ) , speech recognition ( Jaitly & Hinton , 2013 ) , and music source separation ( Uhlich et al. , 2017 ) . When given sufficient data , deep neural networks were providing exceptional results . They have been studied , proven , and demonstrated in many domains ( Gu et al. , 2015 ) , including : image classification ( Krizhevsky et al. , 2012 ; Huang et al. , 2016 ) , natural language processing ( Gu et al. , 2015 ) , reinforcement learning ( Mnih et al. , 2015 ; Foerster et al. , 2016 ; Silver et al. , 2016 ; Gu et al. , 2016 ; Van Hasselt et al. , 2016 ) , machine translation ( Wu et al. , 2016 ) , synthesis ( Wang et al. , 2017 ) , and many more . In all these experiments and implementations , used datasets have been significantly large . Augmentation is a vital technique , not only for cases where datasets are small but also for any size of dataset . Indeed , even those models trained on enormous datasets such as Imagenet ( Deng et al. , 2009 ) could benefit from data augmentation . Without data augmentation , deep neural networks may suffer from the lack of generalization ( Perez & Wang , 2017 ) and adversarial vulnerability ( Zhang et al. , 2017 ) . Although CNNs have led to substantial achievements in image-processing tasks and image classification ( Zeiler and Fergus , 2014 ; Sermanet et al. , 2014 ) , CNNs with abundant parameters might over fit . This is due to the fact that they learn very detailed features of supplied training images that do not generalize to images unseen during training ( Zeiler and Fergus , 2014 ; Zintgraf et al. , 2017 ) . Data augmentation has been considered a solution to this overfitting problem ( Krizhevsky et al. , 2012 ; He et al. , 2016 ; DeVries and Taylor , 2017 ) . Nowadays , data augmentation techniques are gaining continuous attention ( DeVries and Taylor , 2017 ; Zhong et al. , 2017 ; Zhang et al. , 2017 ) . When it comes to image recognition , data augmentation is one of the fundamental building blocks for almost all state-of-the-art results ( Ciresan et al. , 2010 ; Dosovitskiy et al. , 2016 ; Graham , 2014 ; Sajjadi et al. , 2016 ) . Nonetheless , because augmentation strategies may have a large impact on the model performance , they require extensive selection and tuning ( Ratner et al. , 2017 ) . In fact , data augmentation experts proposed cutout ( DeVries and Taylor , 2017 ) . At every training step , cutout randomly masks out a square region in an image . It is an extension of dropout . Random erasing is similar to cutout ( Zhong et al . 2017 ) , as it masks out a subregion in an image but with the following three differences : i ) It randomly chooses whether or not to mask out ; ii ) It uses a random size ; and iii ) It uses a random aspect ratio of the masked region . On the other hand , Mixup α-blends two images to form a new image ( Zhang et al. , 2017 ) . Mixup also behaves like class label smoothing . It mixes the class labels of two images with the ratio α : 1 − α ( Szegedy et al. , 2016 ) . Other researchers proposed techniques such as random-cropping and horizontal-flipping ( Krizhevsky et al. , 2012 ) . These useful augmentation methods have been applied to modern deep CNNs . They were proven to be very efficient and demonstrated the added value of data augmentation . After ResNet was proposed ( He et al. , 2016 ) , new network architectures have been proposed as well ( Zagoruyko and Komodakis , 2016 ; Han et al. , 2017 ) . Pixel-dropping , however , injects noise into the image ( Sietsma and Dow , 1991 ) . In short , there are numerous data augmentation techniques . Figure 1 summarizes them . Each line with a shape in Figure 1 tells which data augmentation method is used by the corresponding meta-learning scheme . For instance , meta-learning using mixing images is covered in smart augmentation ( Perez & Wang , 2017 ) . 3 THE OFI TECHNIQUE . Computer-vision engineers use images to train their models . These images include the object that needs to be correctly classified . There is , nevertheless , a small problem with these images : they include other objects that we do not want to train the model on . If we want to train a model to classify images of dogs and cats , we should always ask ourselves the following questions : • Why should we train the model on something that might not be seen later ? • Why , for example , should we train the model on a cat with a ball behind it , but when the training ends , we ’ ll ask the model to classify an image without a ball ? • Once the model is trained , it will classify an image of a cat with a tree , a fence , or a couch behind it , so why train the model on a cat with a ball , while real-life images might include millions of other things ? It is a good practice to try to train a model using images that include the labeled object only and nothing else . This is what the OFI technique attempts to do . For every image in the training set , another image is generated where the labeled object is kept untouched and everything in the background is made transparent as shown in Figure 2 . When such an image is supplied as a part of the training set , the model is instructed to focus only on the labeled object . There will be no other objects for the network to be trained on . Here , the scenario can be seen exactly as training a baby on what a cat is . When that baby sees only a cat in the image , s/he would not get confused which object is the cat . Otherwise , some questions need to be answered : • What if there were many balls in the many images we have ? • Would our model get a little confused by those additional objects and try to be trained on ? • Would our model keep changing its parameters and weights based on the additional objects in the image ? | This work proposes to augment object focused image to improve image classification. Essentially, this work tries to remove background from original image using an existing algorithm and human editor, and train an image classification model using different combinations of original images and background-removed image. Five simple models are trained and their performance is compared to show that using background-removed images together with original images can help improve accuracy on validation set on a simple dataset. | SP:500d68ce2d8f1e6fea4fa54703101c6823ba2b6c |
Fast MNAS: Uncertainty-aware Neural Architecture Search with Lifelong Learning | Sampling-based neural architecture search ( NAS ) always guarantees better convergence yet suffers from huge computational resources compared with gradient-based approaches , due to the rollout bottleneck – exhaustive training for each sampled generation on proxy tasks . This work provides a general pipeline to accelerate the convergence of the rollout process as well as the RL learning process in samplingbased NAS . It is motivated by the interesting observation that both the architecture and the parameter knowledge can be transferred between different experiments and even different tasks . We first introduce an uncertainty-aware critic ( value function ) in PPO to utilize the architecture knowledge in previous experiments , which stabilizes the training process and reduces the searching time by 4 times . Further , a life-long knowledge pool together with a block similarity function is proposed to utilize lifelong parameter knowledge and reduces the searching time by 2 times . It is the first to introduce block-level weight sharing in RL-based NAS . The block similarity function guarantees a 100 % hitting ratio with strict fairness . Besides , we show a simply designed off-policy correction factor that enables “ replay buffer ” in RL optimization and further reduces half of the searching time . Experiments on the MNAS search space show the proposed FNAS accelerates standard RL-based NAS process by ∼10x ( e.g . ∼256 2x2 TPUv2 * days / 20,000 GPU * hour→ 2,000 GPU * hour for MNAS ) , and guarantees better performance on various vision tasks . 1 INTRODUCTION . Neural architecture search ( NAS ) has made great progress in different tasks such as image classification ( Tan & Le , 2019 ) and object detection ( Tan et al. , 2019b ) . And usually , there are four commonly used NAS algorithms : differentiable , one-shot , evolutional , and reinforcement learning ( RL ) based method . The RL-based method , due to its fair sampling and training processes , has often achieved a great performance among different tasks . However , one of the biggest challenges of it is the high demand for computing resources , which makes it hard to follow by the research community . RL-based NAS consumes a large number of computing powers on two aspects : a ) the need for sampling a large number of architectures to optimize the RL agent and b ) the tedious training and testing process of these samples on proxy tasks . For example , the originator of NAS ( Zoph & Le , 2016 ) requires 12,800 generations of architecture and current state-of-the-art MNAS ( Tan et al. , 2019a ) and MobileNet-V3 ( Howard et al. , 2019 ) require 8000 or more generations to find the optimal architectures . Besides , each generation is usually trained for 5 epochs . All in all , it costs nearly 64 TPUv2 devices for 96 hours or 20,000 GPU hours on V100 for just one single searching process . With such a severe drawback , researchers start looking for other options like differential ( Liu et al. , 2018b ; Chen et al. , 2019 ) , or one-shot based ( Bender , 2019 ; Guo et al. , 2019 ) method for NAS . The one-shot family has drawn lots of attention recently due to its efficiency . It applies a single super-network based search space with that all the architectures , also called sub-networks , share parameters with the super-network during the training process . In this way , the training process is condensed from training thousands of sub-networks into training a super-network . However , this share-weight strategy may bring problems for the performance estimation of sub-networks . For example , two sub-networks may propagate conflicting gradients to their shared components , and the shared components may converge to favor one of the sub-networks and repel the other randomly . This conflicting phenomenon may result in instability of the search process and inferior final architectures , compared with RL-based methods . In this work , we seek to combine the privilege of RL-based methods and one-shot methods , by leveraging the knowledge from previous NAS experiments . The proposed method is based on two key observations : First , the optimal architectures for different tasks have common architecture knowledge . Second , the parameter knowledge can also be transferred across experiments and even tasks . Based on the observations , for transferable architecture knowledge , we develop Uncertainty-Aware Critic ( UAC ) to learn the architecture-performance joint distribution from other experiments even other tasks in an unbiased manner , utilizing the transferability of the structural knowledge , which reduces the sample ’ s training time by 50 % and the result is shown in Figure 1 ( with UAC ) ; For the transferable parameter knowledge , we propose Lifelong Knowledge Pool ( LKP ) to restore the block-level parameters and fairly share them to new samples ’ initialization , which speeds up each samples ’ convergence for 2 times , as shown in Figure 1 ( with LKP ) ; Finally , we also developed an Architecture Experience Buffer ( AEB ) with a significant off-policy correctness factor to store the old models for reusing in RL optimization , with half of the time saved . And this is shown in Figure 1 ( with AEB ) . Under the strictly same environment as MNAS and MobileNet-v3 , FNAS speed up the searching process by 10× and the performances are even better . 2 REVISITING SAMPLING-BASED NAS . 2.1 NAS FAMILY . From the perspective of how to derive the performance estimation of an architecture , NAS methods can be split into two categories , sampling-based and share-weight based . Sampling-based methods usually sample many architectures from the search space and train them independently . Based on the performance of these well-trained architectures , several ways can be utilized to fetch the best one , such as Bayesian optimization ( Kandasamy et al. , 2018 ) , evolutionary algorithm ( Real et al. , 2019 ) , and training an RL agent ( Zoph & Le , 2016 ) . The main drawback of these methods is a huge time and resource consumption of training the sampled architectures . To alleviate this issue , a common practice is to shorten the training epochs and use proxy networks with fewer filters and cells ( Zoph et al. , 2018 ; Tan et al. , 2019a ) . Liu et al . ( Liu et al. , 2018a ) propose to train a network to predict the final performance . Different from these methods , we leverage the accumulated knowledge to accelerate the training process . Instead of training many architectures independently , the second kind of methods resorts to train a super-network and estimate the performance of architectures with weights shared from the supernetwork ( Bender , 2019 ; Wu et al. , 2019 ; Liu et al. , 2018b ; Chen et al. , 2019 ; Xu et al. , 2019 ; Cai et al. , 2019 ; Stamoulis et al. , 2019 ; Guo et al. , 2019 ) . With the easy access of performance estimation , DARTS ( Liu et al. , 2018b ) proposes a gradient-based method to search for the best architecture in an end-to-end manner . However , as pointed in ( Li & Talwalkar , 2019 ) , the performance estimation based on shared weights may be unreliable . Chen et al . ( Chen et al. , 2019 ) proposes to progressively shrink the search space so that the estimation can be more and more accurate . Cai et al . ( Cai et al. , 2019 ) introduces a shrinking based method to train the supernet so as to generate networks of different scales without retraining . We also share weights between architectures but in different ways . We construct a general weight pool with many trained architectures , and when we want to train a new architecture , we initialize it by the trained architectures in the pool . In this way , the number of training epochs can be reduced without harming reliability . 3 KNOWLEDGE BETWEEN NAS EXPERIMENTS IS TRANSFERABLE . RL-based NAS consumes a lot of computing resources . MNAS , as it ’ s said before , trains 8,000 models for the agent to converge , which costs 20,000 GPU hours on V100 . And all the samples trained for one experiment will not be used anymore . However , the active differentiable-based NAS demonstrates that with various weight-sharing techniques , the NAS algorithms can be accelerated a lot . In this section , we will show that the knowledge of previous searched experiments can be reused by the following two observations , which helps the follow-up experiment greatly . 3.1 ARCHITECTURE KNOWLEDGE CAN BE TRANSFERRED . Optimal architectures for different tasks have common architecture knowledge . One always holds the assumption that the performance of a model is consistent among different tasks . A common practice of this assumption is applying good ImageNet ( Deng et al. , 2009 ) models to COCO object detection ( Lin et al. , 2014 ) as the backbone . In NAS , however , this assumption needs to be carefully checked as the huge search space of it requires the hypothesis to be well generalized . Here , We statistically verify this assumption . In Figure 4 , we sample 100 optimal models on face recognition and ImageNet classification tasks respectively . For each model , we firstly expand each digit of its embedding ( i.e . a 35 dimension vector ) to one-hot : e.g . from `` 4 '' to `` 1000 '' ; `` 3 '' to `` 0100 '' . In this way , the original embedding is expanded to 112-dim from 35-dim . After that , we calculate the expectation for each digit of this expended vector among the top 100 optimal architectures on the face recognition and ImageNet classification respectively . Shown in Figure 4 , we get an observation that the operators can be divided into two spaces , i.e . exclusive space , where the probability difference is large and common space , where the probability difference is small . Many previous works ( Liu et al. , 2018a ; Kokiopoulou et al. , 2019 ; Luo et al. , 2018 ; Wen et al. , 2019 ; Luo et al. , 2020 ) use a predictor to predict a model ’ s performance to speed up the NAS process . However , as the predictor requires thousands of samples to train , they usually implement in a progressive ( Liu et al. , 2018a ) or semi-supervised manner ( Luo et al. , 2020 ) . Inspired by the interesting observation above , we implement it in a unified way where different tasks ’ samples are used together to train a unified value network to predict a model ’ s performance . When searching architecture on a new task , we just use directly the unified network trained by the old data and keep updating it in the new task during the search process , which speeds up the convergence of the value network . Showing in Figure 5a , when transferring a value network trained on ImageNet to face recognition task , the network converges much faster . 3.2 PARAMETER KNOWLEDGE CAN BE TRANSFERRED . Initializing the network by ImageNet pre-trained models and training the model on other tasks has nearly been a standard way as it can always speed up the convergence process . However , pretraining has been ignored in the NAS area as it may break the rank of different models . In our experiments , we observe that the trained checkpoint , we call it parameter knowledge , can help us to get the real rank faster than training from scratch . Besides , this feature holds regardless of the data distribution . We randomly sample 50 models and train them on ImageNet in two ways : from scratch or by initializing with parameter knowledge from face experiment . Then , we compare the rank correlation with real rank ( i.e . fully trained rank ) along the training process . Showing in Figure 5b and 5c , with parameter knowledge from face experiment , one gets more accurate rank in fewer epochs . | The paper propose a few improvements to the sampling-based NAS using RL: 1) an uncertainty-aware critic to decide whether the sample needs to be trained; 2) a life-long knowledge pool to initialize the sample that needs training; and 3) an architecture experience buffer to reuse old samples for RL training. The experiments are done on ImageNet, facial recognition and transferability on object detection. The proposed methods are compared with related works. Finally the paper finishes with ablation studies on both the effectiveness and transferability of the proposed modules. | SP:5c6f72812c5b61731e649e7b37d31629dfd9a7ba |
Fast MNAS: Uncertainty-aware Neural Architecture Search with Lifelong Learning | Sampling-based neural architecture search ( NAS ) always guarantees better convergence yet suffers from huge computational resources compared with gradient-based approaches , due to the rollout bottleneck – exhaustive training for each sampled generation on proxy tasks . This work provides a general pipeline to accelerate the convergence of the rollout process as well as the RL learning process in samplingbased NAS . It is motivated by the interesting observation that both the architecture and the parameter knowledge can be transferred between different experiments and even different tasks . We first introduce an uncertainty-aware critic ( value function ) in PPO to utilize the architecture knowledge in previous experiments , which stabilizes the training process and reduces the searching time by 4 times . Further , a life-long knowledge pool together with a block similarity function is proposed to utilize lifelong parameter knowledge and reduces the searching time by 2 times . It is the first to introduce block-level weight sharing in RL-based NAS . The block similarity function guarantees a 100 % hitting ratio with strict fairness . Besides , we show a simply designed off-policy correction factor that enables “ replay buffer ” in RL optimization and further reduces half of the searching time . Experiments on the MNAS search space show the proposed FNAS accelerates standard RL-based NAS process by ∼10x ( e.g . ∼256 2x2 TPUv2 * days / 20,000 GPU * hour→ 2,000 GPU * hour for MNAS ) , and guarantees better performance on various vision tasks . 1 INTRODUCTION . Neural architecture search ( NAS ) has made great progress in different tasks such as image classification ( Tan & Le , 2019 ) and object detection ( Tan et al. , 2019b ) . And usually , there are four commonly used NAS algorithms : differentiable , one-shot , evolutional , and reinforcement learning ( RL ) based method . The RL-based method , due to its fair sampling and training processes , has often achieved a great performance among different tasks . However , one of the biggest challenges of it is the high demand for computing resources , which makes it hard to follow by the research community . RL-based NAS consumes a large number of computing powers on two aspects : a ) the need for sampling a large number of architectures to optimize the RL agent and b ) the tedious training and testing process of these samples on proxy tasks . For example , the originator of NAS ( Zoph & Le , 2016 ) requires 12,800 generations of architecture and current state-of-the-art MNAS ( Tan et al. , 2019a ) and MobileNet-V3 ( Howard et al. , 2019 ) require 8000 or more generations to find the optimal architectures . Besides , each generation is usually trained for 5 epochs . All in all , it costs nearly 64 TPUv2 devices for 96 hours or 20,000 GPU hours on V100 for just one single searching process . With such a severe drawback , researchers start looking for other options like differential ( Liu et al. , 2018b ; Chen et al. , 2019 ) , or one-shot based ( Bender , 2019 ; Guo et al. , 2019 ) method for NAS . The one-shot family has drawn lots of attention recently due to its efficiency . It applies a single super-network based search space with that all the architectures , also called sub-networks , share parameters with the super-network during the training process . In this way , the training process is condensed from training thousands of sub-networks into training a super-network . However , this share-weight strategy may bring problems for the performance estimation of sub-networks . For example , two sub-networks may propagate conflicting gradients to their shared components , and the shared components may converge to favor one of the sub-networks and repel the other randomly . This conflicting phenomenon may result in instability of the search process and inferior final architectures , compared with RL-based methods . In this work , we seek to combine the privilege of RL-based methods and one-shot methods , by leveraging the knowledge from previous NAS experiments . The proposed method is based on two key observations : First , the optimal architectures for different tasks have common architecture knowledge . Second , the parameter knowledge can also be transferred across experiments and even tasks . Based on the observations , for transferable architecture knowledge , we develop Uncertainty-Aware Critic ( UAC ) to learn the architecture-performance joint distribution from other experiments even other tasks in an unbiased manner , utilizing the transferability of the structural knowledge , which reduces the sample ’ s training time by 50 % and the result is shown in Figure 1 ( with UAC ) ; For the transferable parameter knowledge , we propose Lifelong Knowledge Pool ( LKP ) to restore the block-level parameters and fairly share them to new samples ’ initialization , which speeds up each samples ’ convergence for 2 times , as shown in Figure 1 ( with LKP ) ; Finally , we also developed an Architecture Experience Buffer ( AEB ) with a significant off-policy correctness factor to store the old models for reusing in RL optimization , with half of the time saved . And this is shown in Figure 1 ( with AEB ) . Under the strictly same environment as MNAS and MobileNet-v3 , FNAS speed up the searching process by 10× and the performances are even better . 2 REVISITING SAMPLING-BASED NAS . 2.1 NAS FAMILY . From the perspective of how to derive the performance estimation of an architecture , NAS methods can be split into two categories , sampling-based and share-weight based . Sampling-based methods usually sample many architectures from the search space and train them independently . Based on the performance of these well-trained architectures , several ways can be utilized to fetch the best one , such as Bayesian optimization ( Kandasamy et al. , 2018 ) , evolutionary algorithm ( Real et al. , 2019 ) , and training an RL agent ( Zoph & Le , 2016 ) . The main drawback of these methods is a huge time and resource consumption of training the sampled architectures . To alleviate this issue , a common practice is to shorten the training epochs and use proxy networks with fewer filters and cells ( Zoph et al. , 2018 ; Tan et al. , 2019a ) . Liu et al . ( Liu et al. , 2018a ) propose to train a network to predict the final performance . Different from these methods , we leverage the accumulated knowledge to accelerate the training process . Instead of training many architectures independently , the second kind of methods resorts to train a super-network and estimate the performance of architectures with weights shared from the supernetwork ( Bender , 2019 ; Wu et al. , 2019 ; Liu et al. , 2018b ; Chen et al. , 2019 ; Xu et al. , 2019 ; Cai et al. , 2019 ; Stamoulis et al. , 2019 ; Guo et al. , 2019 ) . With the easy access of performance estimation , DARTS ( Liu et al. , 2018b ) proposes a gradient-based method to search for the best architecture in an end-to-end manner . However , as pointed in ( Li & Talwalkar , 2019 ) , the performance estimation based on shared weights may be unreliable . Chen et al . ( Chen et al. , 2019 ) proposes to progressively shrink the search space so that the estimation can be more and more accurate . Cai et al . ( Cai et al. , 2019 ) introduces a shrinking based method to train the supernet so as to generate networks of different scales without retraining . We also share weights between architectures but in different ways . We construct a general weight pool with many trained architectures , and when we want to train a new architecture , we initialize it by the trained architectures in the pool . In this way , the number of training epochs can be reduced without harming reliability . 3 KNOWLEDGE BETWEEN NAS EXPERIMENTS IS TRANSFERABLE . RL-based NAS consumes a lot of computing resources . MNAS , as it ’ s said before , trains 8,000 models for the agent to converge , which costs 20,000 GPU hours on V100 . And all the samples trained for one experiment will not be used anymore . However , the active differentiable-based NAS demonstrates that with various weight-sharing techniques , the NAS algorithms can be accelerated a lot . In this section , we will show that the knowledge of previous searched experiments can be reused by the following two observations , which helps the follow-up experiment greatly . 3.1 ARCHITECTURE KNOWLEDGE CAN BE TRANSFERRED . Optimal architectures for different tasks have common architecture knowledge . One always holds the assumption that the performance of a model is consistent among different tasks . A common practice of this assumption is applying good ImageNet ( Deng et al. , 2009 ) models to COCO object detection ( Lin et al. , 2014 ) as the backbone . In NAS , however , this assumption needs to be carefully checked as the huge search space of it requires the hypothesis to be well generalized . Here , We statistically verify this assumption . In Figure 4 , we sample 100 optimal models on face recognition and ImageNet classification tasks respectively . For each model , we firstly expand each digit of its embedding ( i.e . a 35 dimension vector ) to one-hot : e.g . from `` 4 '' to `` 1000 '' ; `` 3 '' to `` 0100 '' . In this way , the original embedding is expanded to 112-dim from 35-dim . After that , we calculate the expectation for each digit of this expended vector among the top 100 optimal architectures on the face recognition and ImageNet classification respectively . Shown in Figure 4 , we get an observation that the operators can be divided into two spaces , i.e . exclusive space , where the probability difference is large and common space , where the probability difference is small . Many previous works ( Liu et al. , 2018a ; Kokiopoulou et al. , 2019 ; Luo et al. , 2018 ; Wen et al. , 2019 ; Luo et al. , 2020 ) use a predictor to predict a model ’ s performance to speed up the NAS process . However , as the predictor requires thousands of samples to train , they usually implement in a progressive ( Liu et al. , 2018a ) or semi-supervised manner ( Luo et al. , 2020 ) . Inspired by the interesting observation above , we implement it in a unified way where different tasks ’ samples are used together to train a unified value network to predict a model ’ s performance . When searching architecture on a new task , we just use directly the unified network trained by the old data and keep updating it in the new task during the search process , which speeds up the convergence of the value network . Showing in Figure 5a , when transferring a value network trained on ImageNet to face recognition task , the network converges much faster . 3.2 PARAMETER KNOWLEDGE CAN BE TRANSFERRED . Initializing the network by ImageNet pre-trained models and training the model on other tasks has nearly been a standard way as it can always speed up the convergence process . However , pretraining has been ignored in the NAS area as it may break the rank of different models . In our experiments , we observe that the trained checkpoint , we call it parameter knowledge , can help us to get the real rank faster than training from scratch . Besides , this feature holds regardless of the data distribution . We randomly sample 50 models and train them on ImageNet in two ways : from scratch or by initializing with parameter knowledge from face experiment . Then , we compare the rank correlation with real rank ( i.e . fully trained rank ) along the training process . Showing in Figure 5b and 5c , with parameter knowledge from face experiment , one gets more accurate rank in fewer epochs . | This paper proposes a fast general framework (FNAS) for neural architecture search (NAS) problem to enhance the processing efficiency up to 10x times. Three interesting strategies (UAC, LKP, AEB) for reinforcement learning (RL) processing are introduced in the proposed FNAS and evaluated by extensive experiments to show their efficacy. In particular, the assumption that architecture knowledge is transferable has been verified by real observation. | SP:5c6f72812c5b61731e649e7b37d31629dfd9a7ba |
Decoupling Exploration and Exploitation for Meta-Reinforcement Learning without Sacrifices | 1 INTRODUCTION . A general-purpose agent should be able to perform multiple related tasks across multiple related environments . Our goal is to develop agents that can perform a variety of tasks in novel environments , based on previous experience and only a small amount of experience in the new environment . For example , we may want a robot to cook a meal ( a new task ) in a new kitchen ( the environment ) after it has learned to cook other meals in other kitchens . To adapt to a new kitchen , the robot must both explore to find the ingredients , and use this information to cook . Existing meta-reinforcement learning ( meta-RL ) methods can adapt to new tasks and environments , but , as we identify in this work , struggle when adaptation requires complex exploration . In the meta-RL setting , the agent is presented with a set of meta-training problems , each in an environment ( e.g. , a kitchen ) with some task ( e.g. , make pizza ) ; at meta-test time , the agent is given a new , but related environment and task . It is allowed to gather information in a few initial ( exploration ) episodes , and its goal is to then maximize returns on all subsequent ( exploitation ) episodes , using this information . A common meta-RL approach is to learn to explore and exploit end-to-end by training a policy and updating exploration behavior based on how well the policy later exploits using the information discovered from exploration ( Duan et al. , 2016 ; Wang et al. , 2016a ; Stadie et al. , 2018 ; Zintgraf et al. , 2019 ; Humplik et al. , 2019 ) . With enough model capacity , such approaches can express optimal exploration and exploitation , but they create a chicken-and-egg problem that leads to bad local optima and poor sample efficiency : Learning to explore requires good exploitation to gauge the exploration ’ s utility , but learning to exploit requires information gathered via exploration ; therefore , with only final performance as signal , one can not be learned without already having learned the other . For example , a robot chef is only incentivized to explore and find the ingredients if it already knows how to cook , but the robot can only learn to cook if it can already find the ingredients by exploration . To avoid the chicken-and-egg problem , we propose to optimize separate objectives for exploration and exploitation by leveraging the problem ID—an easy-to-provide unique one-hot for each training meta- 1Project web page : https : //anonymouspapersubmission.github.io/dream/ training task and environment . Such a problem ID can be realistically available in real-world meta-RL tasks : e.g. , in a robot chef factory , each training kitchen ( problem ) can be easily assigned a unique ID , and in a recommendation system that provides tailored recommendations to each user , each user ( problem ) is typically identified by a unique username . Some prior works ( Humplik et al. , 2019 ; Kamienny et al. , 2020 ) also use these problem IDs , but not in a way that avoids the chicken-and-egg problem . Others ( Rakelly et al. , 2019 ; Zhou et al. , 2019b ; Gupta et al. , 2018 ; Gurumurthy et al. , 2019 ; Zhang et al. , 2020 ) also optimize separate objectives , but their exploration objectives learn suboptimal policies that gather task-irrelevant information ( e.g. , the color of the walls ) . Instead , we propose an exploitation objective that automatically identifies task-relevant information , and an exploration objective to recover only this information . We learn an exploitation policy without the need for exploration , by conditioning on a learned representation of the problem ID , which provides taskrelevant information ( e.g. , by memorizing the locations of the ingredients for each ID / kitchen ) . We also apply an information bottleneck to this representation to encourage discarding of any information not required by the exploitation policy ( i.e. , task-irrelevant information ) . Then , we learn an exploration policy to only discover task-relevant information by training it to produce trajectories containing the same information as the learned ID representation ( Section 4 ) . Crucially , unlike prior work , we prove that our separate objectives are consistent : optimizing them yields optimal exploration and exploitation , assuming expressive-enough policy classes and enough meta-training data ( Section 5.1 ) . Overall , we present two core contributions : ( i ) we articulate and formalize a chicken-and-egg coupling problem between optimizing exploration and exploitation in meta-RL ( Section 4.1 ) ; and ( ii ) we overcome this with a consistent decoupled approach , called DREAM : Decoupling exploRation and ExploitAtion in Meta-RL ( Section 4.2 ) . Theoretically , in a simple tabular example , we show that addressing the coupling problem with DREAM provably improves sample complexity over existing end-to-end approaches by a factor exponential in the horizon ( Section 5 ) . Empirically , we stress test DREAM ’ s ability to learn sophisticated exploration strategies on 3 challenging , didactic benchmarks and a sparse-reward 3D visual navigation benchmark . On these , DREAM learns to optimally explore and exploit , achieving 90 % higher returns than existing state-of-the-art approaches ( PEARL , E-RL2 , IMPORT , VARIBAD ) , which struggle to learn an effective exploration strategy ( Section 6 ) . 2 RELATED WORK . We draw on a long line of work on learning to adapt to related tasks ( Schmidhuber , 1987 ; Thrun & Pratt , 2012 ; Naik & Mammone , 1992 ; Bengio et al. , 1991 ; 1992 ; Hochreiter et al. , 2001 ; Andrychowicz et al. , 2016 ; Santoro et al. , 2016 ) . Many meta-RL works focus on adapting efficiently to a new task from few samples without optimizing the sample collection process , via updating the policy parameters ( Finn et al. , 2017 ; Agarwal et al. , 2019 ; Yang et al. , 2019 ; Houthooft et al. , 2018 ; Mendonca et al. , 2019 ) , learning a model ( Nagabandi et al. , 2018 ; Sæmundsson et al. , 2018 ; Hiraoka et al. , 2020 ) , multi-task learning ( Fakoor et al. , 2019 ) , or leveraging demonstrations ( Zhou et al. , 2019a ) . In contrast , we focus on problems where targeted exploration is critical for few-shot adaptation . Approaches that specifically explore to obtain the most informative samples fall into two main categories : end-to-end and decoupled approaches . End-to-end approaches optimize exploration and exploitation end-to-end by updating exploration behavior from returns achieved by exploitation ( Duan et al. , 2016 ; Wang et al. , 2016a ; Mishra et al. , 2017 ; Rothfuss et al. , 2018 ; Stadie et al. , 2018 ; Zintgraf et al. , 2019 ; Humplik et al. , 2019 ; Kamienny et al. , 2020 ; Dorfman & Tamar , 2020 ) . These approaches can represent the optimal policy ( Kaelbling et al. , 1998 ) , but they struggle to escape local optima due to a chicken-and-egg problem between learning to explore and learning to exploit ( Section 4.1 ) . Several of these approaches ( Humplik et al. , 2019 ; Kamienny et al. , 2020 ) also leverage the problem ID during meta-training , but they still learn end-to-end , so the chicken-and-egg problem remains . Decoupled approaches instead optimize separate exploration and exploitation objectives , via , e.g. , Thompson-sampling ( TS ) ( Thompson , 1933 ; Rakelly et al. , 2019 ) , obtaining exploration trajectories predictive of dynamics or rewards ( Zhou et al. , 2019b ; Gurumurthy et al. , 2019 ; Zhang et al. , 2020 ) , or exploration noise ( Gupta et al. , 2018 ) . While these works do not identify the chicken-and-egg problem , decoupled approaches coincidentally avoid it . However , existing decoupled approaches , including those ( Rakelly et al. , 2019 ; Zhang et al. , 2020 ) that leverage the problem ID , do not learn optimal exploration : TS ( Rakelly et al. , 2019 ) explores by guessing the task and executing a policy for that task , and hence can not represent exploration behaviors that are different from exploitation ( Russo et al. , 2017 ) . Predicting the dynamics ( Zhou et al. , 2019b ; Gurumurthy et al. , 2019 ; Zhang et al. , 2020 ) is inefficient when only a small subset of the dynamics are relevant to solving the task . In contrast , we propose a separate mutual information objective for exploration , which both avoids the chicken-and-egg problem and yields optimal exploration when optimized ( Section 5 ) . Past work ( Gregor et al. , 2016 ; Houthooft et al. , 2016 ; Eysenbach et al. , 2018 ; Warde-Farley et al. , 2018 ) also optimize mutual information objectives , but not for meta-RL . Exploration in general RL . The general RL setting ( i.e. , learning from scratch ) also requires targeted exploration to gather informative samples that enables learning a policy to solve the problem . In contrast to exploration algorithms for general RL ( Bellemare et al. , 2016 ; Pathak et al. , 2017 ; Burda et al. , 2018 ; Leibfried et al. , 2019 ) , which must visit many novel states to find regions with high reward , exploration in meta-RL can be even more targeted by leveraging prior experience from different problems during meta-training . As a result , DREAM can learn new tasks in just two episodes ( Section 6 ) , while learning from scratch can require thousands or even millions of episodes . 3 PRELIMINARIES . Meta-reinforcement learning . The meta-RL setting considers a family of Markov decision processes ( MDPs ) 〈S , A , Rµ , Tµ〉 with states S , actions A , rewardsRµ , and dynamics Tµ , indexed by a onehot problem ID µ ∈M , drawn from a distribution p ( µ ) . Colloquially , we refer to the dynamics as the environment , the rewards as the task , and the entire MDP as the problem . Borrowing terminology from Duan et al . ( 2016 ) , meta-training and meta-testing both consist of repeatedly running trials . Each trial consists of sampling a problem ID µ ∼ p ( µ ) and running N + 1 episodes on the corresponding problem . Following prior evaluation settings ( Finn et al. , 2017 ; Rakelly et al. , 2019 ; Rothfuss et al. , 2018 ; Fakoor et al. , 2019 ) , we designate the first episode in a trial as an exploration episode consisting of T steps for gathering information , and define the goal as maximizing the returns in the subsequent N exploitation episodes ( Figure 1 ) . Following Rakelly et al . ( 2019 ) ; Humplik et al . ( 2019 ) ; Kamienny et al . ( 2020 ) , the easy-to-provide problem ID is available for meta-training , but not meta-testing trials . We formally express the goal in terms of an exploration policy πexp used in the exploration episode and an exploitation policy πtask used in exploitation episodes , but these policies may be the same or share parameters . Rolling out πexp in the exploration episode produces an exploration trajectory τ exp = ( s0 , a0 , r0 , . . . , sT ) , which contains information discovered via exploration . The exploitation policy πtask may then condition on τ exp and optionally , its history across all exploitation episodes in a trial , to maximize exploitation episode returns . The goal is therefore to maximize : J ( πexp , πtask ) = Eµ∼p ( µ ) , τ exp∼πexp [ V task ( τ exp ; µ ) ] , ( 1 ) where V task ( τ exp ; µ ) is the expected returns of πtask conditioned on τ exp , summed over the N exploitation episodes in a trial with problem ID µ. End-to-end meta-RL . A common meta-RL approach ( Wang et al. , 2016a ; Duan et al. , 2016 ; Rothfuss et al. , 2018 ; Zintgraf et al. , 2019 ; Kamienny et al. , 2020 ; Humplik et al. , 2019 ) is to learn to explore and exploit end-to-end by directly optimizing J in ( 1 ) , updating both from rewards achieved during exploitation . These approaches typically learn a single recurrent policy π ( at | st , τ : t ) for both exploration and exploitation ( i.e. , πtask = πexp = π ) , which takes action at given state st and history of experiences spanning all episodes in a trial τ : t = ( s0 , a0 , r0 , . . . , st−1 , at−1 , rt−1 ) . Intuitively , this policy is learned by rolling out a trial , producing an exploration trajectory τ exp and , conditioned on τ exp and the exploitation experiences so far , yielding some exploitation episode returns . Then , credit is assigned to both exploration ( producing τ exp ) and exploitation by backpropagating the exploitation returns through the recurrent policy . Critically , estimates of the expected exploitation returns in ( 1 ) ( e.g. , from a single roll-out or value-function approximation ) form the learning signal for exploration . Directly optimizing the objective J this way can learn optimal exploration and exploitation strategies , but optimization is challenging , which we show in Section 4.1 . | This paper introduces DREAM, a meta-RL approach that decouples exploration from exploitation. An exploitation policy learns to maximize rewards that are conditioned on an encoder that learns task relevant information. Then an exploration policy learns to collect data that maximizes the mutual information between the encoder and explored states. The work is compared against multiple baselines in simple tasks. | SP:29d472b7efdb02e3449a9edebeb54165b5f2becd |
Decoupling Exploration and Exploitation for Meta-Reinforcement Learning without Sacrifices | 1 INTRODUCTION . A general-purpose agent should be able to perform multiple related tasks across multiple related environments . Our goal is to develop agents that can perform a variety of tasks in novel environments , based on previous experience and only a small amount of experience in the new environment . For example , we may want a robot to cook a meal ( a new task ) in a new kitchen ( the environment ) after it has learned to cook other meals in other kitchens . To adapt to a new kitchen , the robot must both explore to find the ingredients , and use this information to cook . Existing meta-reinforcement learning ( meta-RL ) methods can adapt to new tasks and environments , but , as we identify in this work , struggle when adaptation requires complex exploration . In the meta-RL setting , the agent is presented with a set of meta-training problems , each in an environment ( e.g. , a kitchen ) with some task ( e.g. , make pizza ) ; at meta-test time , the agent is given a new , but related environment and task . It is allowed to gather information in a few initial ( exploration ) episodes , and its goal is to then maximize returns on all subsequent ( exploitation ) episodes , using this information . A common meta-RL approach is to learn to explore and exploit end-to-end by training a policy and updating exploration behavior based on how well the policy later exploits using the information discovered from exploration ( Duan et al. , 2016 ; Wang et al. , 2016a ; Stadie et al. , 2018 ; Zintgraf et al. , 2019 ; Humplik et al. , 2019 ) . With enough model capacity , such approaches can express optimal exploration and exploitation , but they create a chicken-and-egg problem that leads to bad local optima and poor sample efficiency : Learning to explore requires good exploitation to gauge the exploration ’ s utility , but learning to exploit requires information gathered via exploration ; therefore , with only final performance as signal , one can not be learned without already having learned the other . For example , a robot chef is only incentivized to explore and find the ingredients if it already knows how to cook , but the robot can only learn to cook if it can already find the ingredients by exploration . To avoid the chicken-and-egg problem , we propose to optimize separate objectives for exploration and exploitation by leveraging the problem ID—an easy-to-provide unique one-hot for each training meta- 1Project web page : https : //anonymouspapersubmission.github.io/dream/ training task and environment . Such a problem ID can be realistically available in real-world meta-RL tasks : e.g. , in a robot chef factory , each training kitchen ( problem ) can be easily assigned a unique ID , and in a recommendation system that provides tailored recommendations to each user , each user ( problem ) is typically identified by a unique username . Some prior works ( Humplik et al. , 2019 ; Kamienny et al. , 2020 ) also use these problem IDs , but not in a way that avoids the chicken-and-egg problem . Others ( Rakelly et al. , 2019 ; Zhou et al. , 2019b ; Gupta et al. , 2018 ; Gurumurthy et al. , 2019 ; Zhang et al. , 2020 ) also optimize separate objectives , but their exploration objectives learn suboptimal policies that gather task-irrelevant information ( e.g. , the color of the walls ) . Instead , we propose an exploitation objective that automatically identifies task-relevant information , and an exploration objective to recover only this information . We learn an exploitation policy without the need for exploration , by conditioning on a learned representation of the problem ID , which provides taskrelevant information ( e.g. , by memorizing the locations of the ingredients for each ID / kitchen ) . We also apply an information bottleneck to this representation to encourage discarding of any information not required by the exploitation policy ( i.e. , task-irrelevant information ) . Then , we learn an exploration policy to only discover task-relevant information by training it to produce trajectories containing the same information as the learned ID representation ( Section 4 ) . Crucially , unlike prior work , we prove that our separate objectives are consistent : optimizing them yields optimal exploration and exploitation , assuming expressive-enough policy classes and enough meta-training data ( Section 5.1 ) . Overall , we present two core contributions : ( i ) we articulate and formalize a chicken-and-egg coupling problem between optimizing exploration and exploitation in meta-RL ( Section 4.1 ) ; and ( ii ) we overcome this with a consistent decoupled approach , called DREAM : Decoupling exploRation and ExploitAtion in Meta-RL ( Section 4.2 ) . Theoretically , in a simple tabular example , we show that addressing the coupling problem with DREAM provably improves sample complexity over existing end-to-end approaches by a factor exponential in the horizon ( Section 5 ) . Empirically , we stress test DREAM ’ s ability to learn sophisticated exploration strategies on 3 challenging , didactic benchmarks and a sparse-reward 3D visual navigation benchmark . On these , DREAM learns to optimally explore and exploit , achieving 90 % higher returns than existing state-of-the-art approaches ( PEARL , E-RL2 , IMPORT , VARIBAD ) , which struggle to learn an effective exploration strategy ( Section 6 ) . 2 RELATED WORK . We draw on a long line of work on learning to adapt to related tasks ( Schmidhuber , 1987 ; Thrun & Pratt , 2012 ; Naik & Mammone , 1992 ; Bengio et al. , 1991 ; 1992 ; Hochreiter et al. , 2001 ; Andrychowicz et al. , 2016 ; Santoro et al. , 2016 ) . Many meta-RL works focus on adapting efficiently to a new task from few samples without optimizing the sample collection process , via updating the policy parameters ( Finn et al. , 2017 ; Agarwal et al. , 2019 ; Yang et al. , 2019 ; Houthooft et al. , 2018 ; Mendonca et al. , 2019 ) , learning a model ( Nagabandi et al. , 2018 ; Sæmundsson et al. , 2018 ; Hiraoka et al. , 2020 ) , multi-task learning ( Fakoor et al. , 2019 ) , or leveraging demonstrations ( Zhou et al. , 2019a ) . In contrast , we focus on problems where targeted exploration is critical for few-shot adaptation . Approaches that specifically explore to obtain the most informative samples fall into two main categories : end-to-end and decoupled approaches . End-to-end approaches optimize exploration and exploitation end-to-end by updating exploration behavior from returns achieved by exploitation ( Duan et al. , 2016 ; Wang et al. , 2016a ; Mishra et al. , 2017 ; Rothfuss et al. , 2018 ; Stadie et al. , 2018 ; Zintgraf et al. , 2019 ; Humplik et al. , 2019 ; Kamienny et al. , 2020 ; Dorfman & Tamar , 2020 ) . These approaches can represent the optimal policy ( Kaelbling et al. , 1998 ) , but they struggle to escape local optima due to a chicken-and-egg problem between learning to explore and learning to exploit ( Section 4.1 ) . Several of these approaches ( Humplik et al. , 2019 ; Kamienny et al. , 2020 ) also leverage the problem ID during meta-training , but they still learn end-to-end , so the chicken-and-egg problem remains . Decoupled approaches instead optimize separate exploration and exploitation objectives , via , e.g. , Thompson-sampling ( TS ) ( Thompson , 1933 ; Rakelly et al. , 2019 ) , obtaining exploration trajectories predictive of dynamics or rewards ( Zhou et al. , 2019b ; Gurumurthy et al. , 2019 ; Zhang et al. , 2020 ) , or exploration noise ( Gupta et al. , 2018 ) . While these works do not identify the chicken-and-egg problem , decoupled approaches coincidentally avoid it . However , existing decoupled approaches , including those ( Rakelly et al. , 2019 ; Zhang et al. , 2020 ) that leverage the problem ID , do not learn optimal exploration : TS ( Rakelly et al. , 2019 ) explores by guessing the task and executing a policy for that task , and hence can not represent exploration behaviors that are different from exploitation ( Russo et al. , 2017 ) . Predicting the dynamics ( Zhou et al. , 2019b ; Gurumurthy et al. , 2019 ; Zhang et al. , 2020 ) is inefficient when only a small subset of the dynamics are relevant to solving the task . In contrast , we propose a separate mutual information objective for exploration , which both avoids the chicken-and-egg problem and yields optimal exploration when optimized ( Section 5 ) . Past work ( Gregor et al. , 2016 ; Houthooft et al. , 2016 ; Eysenbach et al. , 2018 ; Warde-Farley et al. , 2018 ) also optimize mutual information objectives , but not for meta-RL . Exploration in general RL . The general RL setting ( i.e. , learning from scratch ) also requires targeted exploration to gather informative samples that enables learning a policy to solve the problem . In contrast to exploration algorithms for general RL ( Bellemare et al. , 2016 ; Pathak et al. , 2017 ; Burda et al. , 2018 ; Leibfried et al. , 2019 ) , which must visit many novel states to find regions with high reward , exploration in meta-RL can be even more targeted by leveraging prior experience from different problems during meta-training . As a result , DREAM can learn new tasks in just two episodes ( Section 6 ) , while learning from scratch can require thousands or even millions of episodes . 3 PRELIMINARIES . Meta-reinforcement learning . The meta-RL setting considers a family of Markov decision processes ( MDPs ) 〈S , A , Rµ , Tµ〉 with states S , actions A , rewardsRµ , and dynamics Tµ , indexed by a onehot problem ID µ ∈M , drawn from a distribution p ( µ ) . Colloquially , we refer to the dynamics as the environment , the rewards as the task , and the entire MDP as the problem . Borrowing terminology from Duan et al . ( 2016 ) , meta-training and meta-testing both consist of repeatedly running trials . Each trial consists of sampling a problem ID µ ∼ p ( µ ) and running N + 1 episodes on the corresponding problem . Following prior evaluation settings ( Finn et al. , 2017 ; Rakelly et al. , 2019 ; Rothfuss et al. , 2018 ; Fakoor et al. , 2019 ) , we designate the first episode in a trial as an exploration episode consisting of T steps for gathering information , and define the goal as maximizing the returns in the subsequent N exploitation episodes ( Figure 1 ) . Following Rakelly et al . ( 2019 ) ; Humplik et al . ( 2019 ) ; Kamienny et al . ( 2020 ) , the easy-to-provide problem ID is available for meta-training , but not meta-testing trials . We formally express the goal in terms of an exploration policy πexp used in the exploration episode and an exploitation policy πtask used in exploitation episodes , but these policies may be the same or share parameters . Rolling out πexp in the exploration episode produces an exploration trajectory τ exp = ( s0 , a0 , r0 , . . . , sT ) , which contains information discovered via exploration . The exploitation policy πtask may then condition on τ exp and optionally , its history across all exploitation episodes in a trial , to maximize exploitation episode returns . The goal is therefore to maximize : J ( πexp , πtask ) = Eµ∼p ( µ ) , τ exp∼πexp [ V task ( τ exp ; µ ) ] , ( 1 ) where V task ( τ exp ; µ ) is the expected returns of πtask conditioned on τ exp , summed over the N exploitation episodes in a trial with problem ID µ. End-to-end meta-RL . A common meta-RL approach ( Wang et al. , 2016a ; Duan et al. , 2016 ; Rothfuss et al. , 2018 ; Zintgraf et al. , 2019 ; Kamienny et al. , 2020 ; Humplik et al. , 2019 ) is to learn to explore and exploit end-to-end by directly optimizing J in ( 1 ) , updating both from rewards achieved during exploitation . These approaches typically learn a single recurrent policy π ( at | st , τ : t ) for both exploration and exploitation ( i.e. , πtask = πexp = π ) , which takes action at given state st and history of experiences spanning all episodes in a trial τ : t = ( s0 , a0 , r0 , . . . , st−1 , at−1 , rt−1 ) . Intuitively , this policy is learned by rolling out a trial , producing an exploration trajectory τ exp and , conditioned on τ exp and the exploitation experiences so far , yielding some exploitation episode returns . Then , credit is assigned to both exploration ( producing τ exp ) and exploitation by backpropagating the exploitation returns through the recurrent policy . Critically , estimates of the expected exploitation returns in ( 1 ) ( e.g. , from a single roll-out or value-function approximation ) form the learning signal for exploration . Directly optimizing the objective J this way can learn optimal exploration and exploitation strategies , but optimization is challenging , which we show in Section 4.1 . | The paper investigates the exploration-exploitation problem in meta-learning. The authors explain the problem of coupled exploration and validate it through a toy example. To overcome this issue, the paper introduces DREAM, a meta-algorithm decoupling exploration and exploitation. In the first step, DREAM learns an exploitation policy and a task embedding by maximizing the cumulative reward of the given task (task identifier is known at train). In the second step, DREAM learns an exploration policy that is "compatible" with the embeddings generated by the exploitation policy. DREAM outperformed the state-of-the-art algorithms in several experiments. | SP:29d472b7efdb02e3449a9edebeb54165b5f2becd |
Graph Deformer Network | 1 INTRODUCTION . Graph is a flexible and universal data structure consisting of a set of nodes and edges , where node can represent any kind of objects and edge indicates some relationship between a pair of nodes . Research on graphs is not only important in theory , but also beneficial to in wide backgrounds of applications . Recently , advanced by the powerful representation capability of convolutional neural networks ( CNNs ) on grid-shaped data , the study of convolution on graphs is drawing increasing attention in the fields of artificial intelligence and data mining . So far , Many graph convolution methods ( Wu et al. , 2017 ; Atwood & Towsley , 2016 ; Hamilton et al. , 2017 ; Velickovic et al. , 2017 ) have been proposed , and raise a promising direction . The main challenge is the irregularity and complexity of graph topology , causing difficulty in constructing convolutional kernels . Most existing works take the plain summation or average aggregation scheme , and share a kernel for all nodes as shown in Fig . 1 ( a ) . However , there exist two nonignorable weaknesses for them : i ) losing the structure information of nodes in the local neighborhood , and ii ) causing signal entanglements of nodes due to collapsing to one central node . Thereby , an accompanying problem is that the discriminative ability of node representation would be impaired , and further non-isomorphic graphs/subgraphs may produce the same responses . Contrastively , in the standard convolutional kernel used for images , it is important to encode the variations of local receptive fields . For example , a 3 × 3 kernel on images can well encode local variations of 3× 3 patches . An important reason is that the kernel is anisotropic to spacial positions , where each pixel position is assigned to a different mapping . However , due to the irregularity of graphs , defining and operating such an anisotropic kernel on graphs are intractable . To deal with this problem , Niepert et al . ( Niepert et al. , 2016 ) attempted to sort and prune neighboring nodes , and then run different kernels on the ranked size-fixed nodes . However , this deterministic method is sensitive to node ranking and more prone to being affected by graph noises . Furthermore , some graph convolution methods ( Velickovic et al. , 2017 ; Wang et al. , 2019 ) introduce an attention mechanism to learn the importances of nodes . Such methods emphasize on mining those significant struc- tures/features rather than designing anisotropic convolution kernels , so they can not well represent local variations of structures in essence . In this work , we propose a novel yet effective graph deformer network ( GDN ) to implement anisotropic convolutional filtering on graphs as shown in Fig . 1 ( b ) , exactly behaving like the standard convolution on images . Inspired by image-based convolution , we deform local neighborhoods of different sizes into a virtual coordinate space , implicitly spanned by several anchor nodes , where each space granularity corresponds to one anchor node . In order to perform space transformation , we define the correlations between neighbors and anchor nodes , and project neighboring nodes into the regular anchor space . Thereby , irregular neighborhoods are deformed into the anchorcoordinated space . Then , the image-like anisotropic convolution kernels can be imposed on the anchor-coordinated plane , and local variations of neighborhoods can be perceived effectively . Due to the importance of anchors , we also deform anchor nodes with adaptive parameters to match the feature space of nodes . As anisotropic convolution kernels are endowed with the fine-grained encoding ability , our method can better perceive subtle variations of local neighborhood regions as well as reduce signal confusion . We also show its connection to previous work , and theoretically analyze the stronger expressive power and the satisfactory property of the isomorphism test . Extensive experiments on graph/node classification further demonstrate the effectiveness of the proposed GDN . 2 OUR APPROACH . In this section , we elaborate on the proposed graph deformer method . Below we first give an abstract formulation for our method and then elaborate on the details . Denote G = ( V , E ) as an undirected graph , where V represents a set of nodes with |V| = n and E is a set of edges with |E| = e. According to the link relations in E , the corresponding adjacency matrix can be defined as A ∈ Rn×n . And X ∈ Rn×d is the feature matrix . To state conveniently , we use Xi· or xi to denote the feature of the i-th node . Besides , for a node vi , the first-order neighborhood consists of nodes directly connected to vi , which is denoted as N 1vi = { vj | ( vj , vi ) ∈ E } . Accordingly , we can define s-order neighborhood N svi as the set of s-hop reachable nodes . 2.1 A BASIC FORMULATION . Given a reference node vr in graph G , we need to learn its representation based on the node itself as well as its contextual neighborhood Nvr . However , the irregularity causes difficulty in designing anisotropic spatial convolution . To address this problem , we introduce anchor nodes to deform the neighborhood . All neighboring nodes are calibrated into a pseudo space spanned by anchors . We denote the set of anchor nodes by V = { v0 , v1 , ... , vm−1 } . The convolution onNvr is formulated as : x̃r = ( G ∗ f ) ( vr ) = C ( F ( r ) , K ) , ( 1 ) F ( r ) i = ∑ vt∈Nvr Dvt→vi ( xi , xt , Θ ) , ( 2 ) where • v· , x· : an anchor node and a pseudo coordinate vector ( a.k.a . feature vector ) . Please see Section 2.2 for anchor generation . • D : the deformer function . It transforms node vt into a virtual coordinate space spanned by anchors . Θ is the deformer parameter to be learned . Please see Section 2.3.1 for details . • F ( r ) ∈ Rm×d : the deformed multi-granularity feature from the neighborhood of node vr . Each granularities F ( r ) i corresponds to an anchor node vi . • C , K : the anisotropic convolution operation on anchor space and convolution kernel . G ∗ f represents filter f acting on graph G. The relationship between anchor nodes can be built by some metrics such as Cosine distance , and anchor nodes may be format as a pseudo 2-D grid just like the patch in images . Please see the details in Section 2.3.2 . 2.2 ANCHOR GENERATION . Anchor nodes are crucial to the graph convolution process , because neighborhood regions are unitedly calibrated with them . Rigid anchors will not adapt to the variations of the feature space during convolution learning . Thus we choose to optimize anchor nodes as one part of the entire network learning . In the beginning , we cluster some nodes randomly sampled from the graph as initial anchors . When enough anchors cover the space of neighborhood nodes , the anchors can be endowed with a strong expressive ability to encode neighborhoods like a code dictionary . Formally , we use the K-means clustering to generate initial anchors , V ← Clustering { ( vi , xi ) |vi ∈ Vsampling } , ( 3 ) where Vsampling are the sampled node set , in which each node is randomly sampled from the graph , V = { ( vk , xk ) } |m−1k=0 is the initial anchor set generated by clustering , in which vk represents kth anchor node and xk represents its feature vector , m is the number of anchor nodes . Note that when given anchor nodes , the response of our method will be invariant however to permute nodes of one graph during the training stage as well as testing stage . The clustering algorithm might affect the final anchors due to random sampling for initialization , but it can not affect the property of permutation invariance , which just like random initialization on the network parameters . A larger m could increase the expression capacity of anchors , but causes more redundancy and a larger computational cost . Due to the sparsity of graphs , in practice , several anchors are sufficient to encode each neighborhood region . To better collaborate with node/feature variations during graph convolution learning , we transform the initial anchors into a proper space by parameterizing them : ak = ReLU ( WAxk + bA ) , k = 0 , 1 , · · · , m− 1 , ( 4 ) where WA , bA are the learnable parameters , and ReLU is the classic activation function . Besides , other flexible multi-layer networks may be selected to learn deformable anchors . 2.3 DEFORMER CONVOLUTION . 2.3.1 SPACE TRANSFORMATION . Now we define the deformer function D in Eqn . ( 2 ) , which transforms neighborhood nodes to the anchor space . For each node vj ∈ Nvr , we derive the anchor-related feature ( also query feature ) and value feature vectors as qj = ReLU ( WQxj + bQ ) , j = 0 , 1 , · · · , nr − 1 , ( 5 ) uj = ReLU ( WUxj + bU ) , j = 0 , 1 , · · · , nr − 1 , ( 6 ) where WQ , WU are the learnable weight matrices , and bQ , bU are the biases . The query feature qj indicates how to transform vj to the anchor space by interacting with anchors , and the value vector uj is the transformable component to the anchor space . For the neighborhood Nvr , the correlation to anchors defines a set of weights α = { α1,1 , · · · , α1 , m , · · · , αnr,1 , · · · , αnr , m } , which measures the scores of all nodes within the neighborhood projected onto the directions of anchor nodes . Formally , αj , k = exp ( 〈qj , ak〉 ) ∑ k′ exp ( 〈qj , ak′〉 ) , k′ = 0 , 1 , · · · , m− 1 , ( 7 ) where 〈· , ·〉 denotes the inner production , then normalization is done by softmax function . αj , k may be viewed as the attention score of the node vj w.r.t . the anchor vk . After obtaining the attention score , the irregular neighborhood can be transformed into the anchor-coordinated space , ũk = ∑ j αj , kuj , j = 0 , 1 , · · · , nr − 1 . ( 8 ) The deformed components are accumulated on each anchor , and form the final deformed features . Thus , any neighborhood with different sizes can be deformed into the virtual normalized space coordinated by anchors . In experiment , for simplicity , the query feature and value feature are shared with the same parameters in Eqns . ( 5 ) and ( 6 ) . 2.3.2 ANISOTROPIC CONVOLUTION IN THE ANCHOR SPACE . Afterward , s-hop neighborhood of node vr is deformed into the size-fixed anchor space , i.e. , N svr → { ũ0 , ũ1 , · · · , ũm−1 } . The anisotropic graph convolution can be implemented by imposing different mapping on each anchor as x̃ ( s ) r = ReLU ( ∑ i Kᵀi ũi + b ) , i = 0 , 1 , · · · , m− 1 , ( 9 ) where x̃ ( s ) r ∈ Rd ′ , the matrix Ki is a d × d′ weight parameter imposed on the features w.r.t . an anchor , and b is the bias vector . In the convolution process , different filter weights are imposed on different features of anchor nodes , which is an anisotropic filtering operation . For an intuitive description , we assume the simplest case of 2-D space , which of course can be extended higher dimension . Assuming in 2-D , we project all neighborhood nodes onto anchor nodes , then employ different filters on different anchor nodes in 2-D plane , which likes the standard convolution , so called anisotropic convolution . In contrast to the traditional aggregation method , the deformer convolution has two aspects of advantages : i ) well preserving structure information and reducing signal entanglement ; ii ) transforming different-sized neighborhoods into the size-fixed anchor space to well advocate anisotropic convolution like the standard convolution on images . | In order to perform anisotropic convolution on graphs, this paper proposes to project a local neighborhood into a unified virtual space by introducing anchor nodes. A theoretical analysis is provided to show the expressive power of the proposed graph deformer operation on graph isomorphism test. Extensive experiments are performed on several node classification and graph classification datasets. | SP:80503d1fec17a71f526e1bf17459a7379f89383b |
Graph Deformer Network | 1 INTRODUCTION . Graph is a flexible and universal data structure consisting of a set of nodes and edges , where node can represent any kind of objects and edge indicates some relationship between a pair of nodes . Research on graphs is not only important in theory , but also beneficial to in wide backgrounds of applications . Recently , advanced by the powerful representation capability of convolutional neural networks ( CNNs ) on grid-shaped data , the study of convolution on graphs is drawing increasing attention in the fields of artificial intelligence and data mining . So far , Many graph convolution methods ( Wu et al. , 2017 ; Atwood & Towsley , 2016 ; Hamilton et al. , 2017 ; Velickovic et al. , 2017 ) have been proposed , and raise a promising direction . The main challenge is the irregularity and complexity of graph topology , causing difficulty in constructing convolutional kernels . Most existing works take the plain summation or average aggregation scheme , and share a kernel for all nodes as shown in Fig . 1 ( a ) . However , there exist two nonignorable weaknesses for them : i ) losing the structure information of nodes in the local neighborhood , and ii ) causing signal entanglements of nodes due to collapsing to one central node . Thereby , an accompanying problem is that the discriminative ability of node representation would be impaired , and further non-isomorphic graphs/subgraphs may produce the same responses . Contrastively , in the standard convolutional kernel used for images , it is important to encode the variations of local receptive fields . For example , a 3 × 3 kernel on images can well encode local variations of 3× 3 patches . An important reason is that the kernel is anisotropic to spacial positions , where each pixel position is assigned to a different mapping . However , due to the irregularity of graphs , defining and operating such an anisotropic kernel on graphs are intractable . To deal with this problem , Niepert et al . ( Niepert et al. , 2016 ) attempted to sort and prune neighboring nodes , and then run different kernels on the ranked size-fixed nodes . However , this deterministic method is sensitive to node ranking and more prone to being affected by graph noises . Furthermore , some graph convolution methods ( Velickovic et al. , 2017 ; Wang et al. , 2019 ) introduce an attention mechanism to learn the importances of nodes . Such methods emphasize on mining those significant struc- tures/features rather than designing anisotropic convolution kernels , so they can not well represent local variations of structures in essence . In this work , we propose a novel yet effective graph deformer network ( GDN ) to implement anisotropic convolutional filtering on graphs as shown in Fig . 1 ( b ) , exactly behaving like the standard convolution on images . Inspired by image-based convolution , we deform local neighborhoods of different sizes into a virtual coordinate space , implicitly spanned by several anchor nodes , where each space granularity corresponds to one anchor node . In order to perform space transformation , we define the correlations between neighbors and anchor nodes , and project neighboring nodes into the regular anchor space . Thereby , irregular neighborhoods are deformed into the anchorcoordinated space . Then , the image-like anisotropic convolution kernels can be imposed on the anchor-coordinated plane , and local variations of neighborhoods can be perceived effectively . Due to the importance of anchors , we also deform anchor nodes with adaptive parameters to match the feature space of nodes . As anisotropic convolution kernels are endowed with the fine-grained encoding ability , our method can better perceive subtle variations of local neighborhood regions as well as reduce signal confusion . We also show its connection to previous work , and theoretically analyze the stronger expressive power and the satisfactory property of the isomorphism test . Extensive experiments on graph/node classification further demonstrate the effectiveness of the proposed GDN . 2 OUR APPROACH . In this section , we elaborate on the proposed graph deformer method . Below we first give an abstract formulation for our method and then elaborate on the details . Denote G = ( V , E ) as an undirected graph , where V represents a set of nodes with |V| = n and E is a set of edges with |E| = e. According to the link relations in E , the corresponding adjacency matrix can be defined as A ∈ Rn×n . And X ∈ Rn×d is the feature matrix . To state conveniently , we use Xi· or xi to denote the feature of the i-th node . Besides , for a node vi , the first-order neighborhood consists of nodes directly connected to vi , which is denoted as N 1vi = { vj | ( vj , vi ) ∈ E } . Accordingly , we can define s-order neighborhood N svi as the set of s-hop reachable nodes . 2.1 A BASIC FORMULATION . Given a reference node vr in graph G , we need to learn its representation based on the node itself as well as its contextual neighborhood Nvr . However , the irregularity causes difficulty in designing anisotropic spatial convolution . To address this problem , we introduce anchor nodes to deform the neighborhood . All neighboring nodes are calibrated into a pseudo space spanned by anchors . We denote the set of anchor nodes by V = { v0 , v1 , ... , vm−1 } . The convolution onNvr is formulated as : x̃r = ( G ∗ f ) ( vr ) = C ( F ( r ) , K ) , ( 1 ) F ( r ) i = ∑ vt∈Nvr Dvt→vi ( xi , xt , Θ ) , ( 2 ) where • v· , x· : an anchor node and a pseudo coordinate vector ( a.k.a . feature vector ) . Please see Section 2.2 for anchor generation . • D : the deformer function . It transforms node vt into a virtual coordinate space spanned by anchors . Θ is the deformer parameter to be learned . Please see Section 2.3.1 for details . • F ( r ) ∈ Rm×d : the deformed multi-granularity feature from the neighborhood of node vr . Each granularities F ( r ) i corresponds to an anchor node vi . • C , K : the anisotropic convolution operation on anchor space and convolution kernel . G ∗ f represents filter f acting on graph G. The relationship between anchor nodes can be built by some metrics such as Cosine distance , and anchor nodes may be format as a pseudo 2-D grid just like the patch in images . Please see the details in Section 2.3.2 . 2.2 ANCHOR GENERATION . Anchor nodes are crucial to the graph convolution process , because neighborhood regions are unitedly calibrated with them . Rigid anchors will not adapt to the variations of the feature space during convolution learning . Thus we choose to optimize anchor nodes as one part of the entire network learning . In the beginning , we cluster some nodes randomly sampled from the graph as initial anchors . When enough anchors cover the space of neighborhood nodes , the anchors can be endowed with a strong expressive ability to encode neighborhoods like a code dictionary . Formally , we use the K-means clustering to generate initial anchors , V ← Clustering { ( vi , xi ) |vi ∈ Vsampling } , ( 3 ) where Vsampling are the sampled node set , in which each node is randomly sampled from the graph , V = { ( vk , xk ) } |m−1k=0 is the initial anchor set generated by clustering , in which vk represents kth anchor node and xk represents its feature vector , m is the number of anchor nodes . Note that when given anchor nodes , the response of our method will be invariant however to permute nodes of one graph during the training stage as well as testing stage . The clustering algorithm might affect the final anchors due to random sampling for initialization , but it can not affect the property of permutation invariance , which just like random initialization on the network parameters . A larger m could increase the expression capacity of anchors , but causes more redundancy and a larger computational cost . Due to the sparsity of graphs , in practice , several anchors are sufficient to encode each neighborhood region . To better collaborate with node/feature variations during graph convolution learning , we transform the initial anchors into a proper space by parameterizing them : ak = ReLU ( WAxk + bA ) , k = 0 , 1 , · · · , m− 1 , ( 4 ) where WA , bA are the learnable parameters , and ReLU is the classic activation function . Besides , other flexible multi-layer networks may be selected to learn deformable anchors . 2.3 DEFORMER CONVOLUTION . 2.3.1 SPACE TRANSFORMATION . Now we define the deformer function D in Eqn . ( 2 ) , which transforms neighborhood nodes to the anchor space . For each node vj ∈ Nvr , we derive the anchor-related feature ( also query feature ) and value feature vectors as qj = ReLU ( WQxj + bQ ) , j = 0 , 1 , · · · , nr − 1 , ( 5 ) uj = ReLU ( WUxj + bU ) , j = 0 , 1 , · · · , nr − 1 , ( 6 ) where WQ , WU are the learnable weight matrices , and bQ , bU are the biases . The query feature qj indicates how to transform vj to the anchor space by interacting with anchors , and the value vector uj is the transformable component to the anchor space . For the neighborhood Nvr , the correlation to anchors defines a set of weights α = { α1,1 , · · · , α1 , m , · · · , αnr,1 , · · · , αnr , m } , which measures the scores of all nodes within the neighborhood projected onto the directions of anchor nodes . Formally , αj , k = exp ( 〈qj , ak〉 ) ∑ k′ exp ( 〈qj , ak′〉 ) , k′ = 0 , 1 , · · · , m− 1 , ( 7 ) where 〈· , ·〉 denotes the inner production , then normalization is done by softmax function . αj , k may be viewed as the attention score of the node vj w.r.t . the anchor vk . After obtaining the attention score , the irregular neighborhood can be transformed into the anchor-coordinated space , ũk = ∑ j αj , kuj , j = 0 , 1 , · · · , nr − 1 . ( 8 ) The deformed components are accumulated on each anchor , and form the final deformed features . Thus , any neighborhood with different sizes can be deformed into the virtual normalized space coordinated by anchors . In experiment , for simplicity , the query feature and value feature are shared with the same parameters in Eqns . ( 5 ) and ( 6 ) . 2.3.2 ANISOTROPIC CONVOLUTION IN THE ANCHOR SPACE . Afterward , s-hop neighborhood of node vr is deformed into the size-fixed anchor space , i.e. , N svr → { ũ0 , ũ1 , · · · , ũm−1 } . The anisotropic graph convolution can be implemented by imposing different mapping on each anchor as x̃ ( s ) r = ReLU ( ∑ i Kᵀi ũi + b ) , i = 0 , 1 , · · · , m− 1 , ( 9 ) where x̃ ( s ) r ∈ Rd ′ , the matrix Ki is a d × d′ weight parameter imposed on the features w.r.t . an anchor , and b is the bias vector . In the convolution process , different filter weights are imposed on different features of anchor nodes , which is an anisotropic filtering operation . For an intuitive description , we assume the simplest case of 2-D space , which of course can be extended higher dimension . Assuming in 2-D , we project all neighborhood nodes onto anchor nodes , then employ different filters on different anchor nodes in 2-D plane , which likes the standard convolution , so called anisotropic convolution . In contrast to the traditional aggregation method , the deformer convolution has two aspects of advantages : i ) well preserving structure information and reducing signal entanglement ; ii ) transforming different-sized neighborhoods into the size-fixed anchor space to well advocate anisotropic convolution like the standard convolution on images . | This work proposes the Graph Deformer Network (GDN), whose key component is the proposed Graph Deformer Convolution (GDC). The GDC is based on the attention mechanism, where a fixed number of query vector comes from a clustering process of some randomly sampled nodes (In my opinion, the q vector in the paper should be named the key vector instead query vector, according to [1]). The attention thus yields a fixed number of ordered vectors as outputs, where an anisotropic convolution can be applied on. Experimental results on both node and graph classification tasks demonstrate the effectiveness of the proposed GDC. | SP:80503d1fec17a71f526e1bf17459a7379f89383b |
Federated Generalized Bayesian Learning via Distributed Stein Variational Gradient Descent | 1 INTRODUCTION . Federated learning refers to the collaborative training of a machine learning model across agents with distinct data sets , and it applies at different scales , from industrial data silos to mobile devices ( Kairouz et al. , 2019 ) . While some common challenges exist , such as the general statistical heterogeneity – “ non-iidnes ” – of the distributed data sets , each setting also brings its own distinct problems . In this paper , we are specifically interested in a small-scale federated learning setting consisting of mobile or embedded devices , each having a limited data set and running a small-sized model due to their constrained memory . As an example , consider the deployment of health monitors based on data from smart-watch ECG data . In this context , we argue that it is essential to tackle the following challenges , which are largely not addressed by existing solutions : • Trustworthiness : In applications such as personal health assistants , the learning agents ’ recommendations need to be reliable and trustworthy , e.g. , to decide when to contact a doctor in case of a possible emergency ; • Number of communication rounds : When models are small , the payload per communication round may not be the main contributor to the overall latency of the training process . In contrast , accommodating many communication rounds requiring arbitrating channel access among multiple devices may yield slow wall-clock time convergence ( Lin et al. , 2020 ) . Most existing federated learning algorithms , such as Federated Averaging ( FedAvg ) ( McMahan et al. , 2017 ) , are based on frequentist principles , relying on the identification of a single model parameter vector . Frequentist learning is known to be unable to capture epistemic uncertainty , yielding overconfident decisions ( Guo et al. , 2017 ) . Furthermore , the focus of most existing works is on reducing the load per-communication round via compression , rather than decreasing the number of rounds by providing more informative updates at each round ( Kairouz et al. , 2019 ) . This paper introduces a trustworthy solution that is able to reduce the number of communication rounds via a non-parametric variational inference-based implementation of federated Bayesian learning . Federated Bayesian learning has the general aim of computing the global posterior distribution in the model parameter space . Existing decentralized , or federated , Bayesian learning protocols are either based on Variational Inference ( VI ) ( Angelino et al. , 2016 ; Neiswanger et al. , 2015 ; Broderick et al. , 2013 ; Corinzia & Buhmann , 2019b ) or Monte Carlo ( MC ) sampling ( Ahn et al. , 2014 ; Mesquita et al. , 2020 ; Wei & Conlon , 2019 ) . State-of-the-art methods in either category include Partitioned Variational Inference ( PVI ) , which has been recently introduced as a unifying distributed VI framework that relies on the optimization over parametric posteriors ; and Distributed Stochastic Gradient Langevin Dynamics ( DSGLD ) , which is an MC sampling technique that maintains a number of Markov chains updated via local Stochastic Gradient Descent ( SGD ) with the addition of Gaussian noise ( Ahn et al. , 2014 ; Welling & Teh , 2011 ) . The performance of VI-based protocols is generally limited by the bias entailed by the variational approximation , while MC sampling is slow and suffers from the difficulty of assessing convergence ( Angelino et al. , 2016 ) . Stein Variational Gradient Descent ( SVGD ) has been introduced in ( Liu & Wang , 2016 ) as a nonparametric Bayesian framework that approximates a target posterior distribution via non-random and interacting particles . SVGD inherits the flexibility of non-parametric Bayesian inference methods , while improving the convergence speed of MC sampling ( Liu & Wang , 2016 ) . By controlling the number of particles , SVGD can provide flexible performance in terms of bias , convergence speed , and per-iteration complexity . This paper introduces a novel non-parametric distributed learning algorithm , termed Distributed Stein Variational Gradient Descent ( DSVGD ) , that transfers the mentioned benefits of SVGD to federated learning . As illustrated in Fig . 1 , DSVGD targets a generalized Bayesian learning formulation , with arbitrary loss functions ( Knoblauch et al. , 2019 ) ; and maintains a number of non-random and interacting particles at a central server to represent the current iterate of the global posterior . At each iteration , the particles are downloaded and updated by one of the agents by minimizing a local free energy functional before being uploaded to the server . DSVGD is shown to enable ( i ) a trade-off between per-iteration communication load and number of communication rounds by varying the number of particles ; while ( ii ) being able to make trustworthy decisions through Bayesian inference . 2 SYSTEM SET-UP . We consider the federated learning set-up in Fig . 1 , where each agent k = 1 , . . . , K has a distinct local dataset with associated training loss Lk ( θ ) for model parameter θ . The agents communicate through a central node with the goal of computing the global posterior distribution q ( θ ) over the shared model parameter θ ∈ Rd for some prior distribution p0 ( θ ) ( Angelino et al. , 2016 ) . Specifically , following the generalized Bayesian learning framework ( Knoblauch et al. , 2019 ) , the agents aim at obtaining the distribution q ( θ ) that minimizes the global free energy min q ( θ ) { F ( q ( θ ) ) = K∑ k=1 Eθ∼q ( θ ) [ Lk ( θ ) ] + αD ( q ( θ ) ||p0 ( θ ) ) } , ( 1 ) where α > 0 is a temperature parameter . The ( generalized , or Gibbs ) global posterior qopt ( θ ) solving problem ( 1 ) must strike a balance between minimizing the sum loss function ( first term in F ( q ) ) and the model complexity defined by the divergence from a reference prior ( second term in F ( q ) ) . It is given as qopt ( θ ) = 1 Z · q̃opt ( θ ) , with q̃opt ( θ ) = p0 ( θ ) exp ( − 1 α K∑ k=1 Lk ( θ ) ) , ( 2 ) where we denoted as Z the normalization constant . It is useful to note that the global free energy can also be written as the scaled KL F ( q ( θ ) ) = αD ( q ( θ ) ||q̃opt ( θ ) ) . The main challenge in computing the optimal posterior qopt ( θ ) in a distributed manner is that each agent k is only aware of its local loss Lk ( θ ) . By exchanging information through the server , the K agents wish to obtain an estimate of the global posterior ( 2 ) without disclosing their local datasets neither to the server nor to the other agents . In this paper , we introduce a novel non-parametric distributed generalized Bayesian learning framework that addresses this challenge by integrating Distributed VI ( DVI ) and SVGD ( Liu & Wang , 2016 ) . 3 DISTRIBUTED VARIATIONAL INFERENCE . In this section , we describe a general Expectation Propagation ( EP ) -based framework ( Vehtari et al. , 2020 ) , which we term as DVI , that aims at computing the global posterior in a federated fashion ( Bui et al. , 2018 ; Corinzia & Buhmann , 2019b ) . DVI starts from the observation that the posterior ( 2 ) factorizes as the product q ( θ ) = p0 ( θ ) K∏ k=1 tk ( θ ) , ( 3 ) where the term tk ( · ) is given by the scaled local likelihood exp ( α−1Lk ( θ ) ) /Z . Since the normalization constant Z depends on all data sets , the true scaled local likelihood tk ( · ) can not be directly computed at agent k. The idea of DVI is to iteratively update approximate likelihood factors tk ( θ ) for k = 1 , ... , K by means of local optimization steps at the agents and communication through the server , with the aim of minimizing the global free energy ( 1 ) over distribution ( 3 ) . We give here the standard implementation of DVI in which a single agent is schedule at each time , although parallel implementations are possible and discussed below . Accordingly , at each communication round i = 1 , 2 , ... , the server maintains the current iterate q ( i−1 ) ( θ ) of the global posterior , and schedules an agent k ∈ { 1 , 2 , . . . , K } , which proceeds as follows : 1 . Agent k downloads the current global variational posterior distribution q ( i−1 ) ( θ ) from the server ( see Fig . 1 ( a ) , step 1 ) ; 2 . Agent k updates the global posterior by minimizing the local free energy F ( i ) k ( q ( θ ) ) ( see Fig . 1 ( a ) , step 2 ) q ( i ) ( θ ) = argmin q ( θ ) { F ( i ) k ( q ( θ ) ) = Eθ∼q ( θ ) [ Lk ( θ ) ] + αD ( q ( θ ) ||p̂ ( i ) k ( θ ) ) } , ( 4 ) where we have defined the ( unnormalized ) cavity distribution p̂ ( i ) k ( θ ) as p̂ ( i ) k ( θ ) = q ( i−1 ) ( θ ) t ( i−1 ) k ( θ ) . ( 5 ) The cavity distribution p̂ ( i ) k ( θ ) , which removes the contribution of the current approximate likelihood of agent k from the current global posterior iterate , serves as a prior for the update in ( 4 ) . In a manner similar to ( 2 ) , the local free energy is minimized by the tilted distribution p ( i ) k ( θ ) ∝ p̃ ( i ) k ( θ ) with p̃ ( i ) k ( θ ) = p̂ ( i ) k ( θ ) exp ( − 1 α Lk ( θ ) ) ; ( 6 ) 3 . Agent k sends the updated posterior q ( i ) ( · ) = p ( i ) k ( · ) to the server ( see Fig . 1 ( a ) , step 3 ) , and updates its approximate likelihood accordingly as t ( i ) k ( θ ) = q ( i ) ( θ ) q ( i−1 ) ( θ ) t ( i−1 ) k ( θ ) ; ( 7 ) Finally , non-scheduled agents k′ 6= k set t ( i ) k′ ( θ ) = t ( i−1 ) k′ ( θ ) , and the server sets the next iterate as q ( i ) ( θ ) . We have the following key property of DVI . Theorem 1 . The global posterior qopt ( θ ) in ( 2 ) is the unique fixed point of the DVI algorithm . The fixed-point property in Theorem 1 can be verified directly by setting q ( i−1 ) ( θ ) = qopt ( θ ) and t ( i−1 ) k ( θ ) = exp ( α −1Lk ( θ ) ) /Z and by observing that this leads to the fixed point condition q ( i ) ( θ ) = q ( i−1 ) ( θ ) = qopt ( θ ) . The proof is provided in Sec . A.6 . Importantly , this property is not tied to the sequential implementation detailed above , and it applies also if multiple devices are scheduled in parallel , as long as one sets the next iterate as q ( i ) ( θ ) = p0 ( θ ) ∏ k∈K ( i ) t ( i ) k ( θ ) ∏ k′ 6∈K ( i ) t ( i ) k′ ( θ ) , where K ( i ) denotes the set of scheduled agents at communication round i and we have t ( i ) k′ ( θ ) = t ( i−1 ) k′ ( θ ) and t ( i ) k ( θ ) updated following ( 7 ) . | This paper proposes distributed SVGD, which maintains N particles both on the server and on the client. The communication between the server and the client is conducted by uploading/downloading these N particles. The learning of local client is formulated as inferring corresponding tilted distribution. Experiments are conducted on synthetic Gaussian 1D mixture, Bayesian logistic regression on Covertype and Twonorm dataset and Bayesian NN on the UCI dataset. | SP:81d2d5d9bfe2974415843ec016c72b80a761a20e |
Federated Generalized Bayesian Learning via Distributed Stein Variational Gradient Descent | 1 INTRODUCTION . Federated learning refers to the collaborative training of a machine learning model across agents with distinct data sets , and it applies at different scales , from industrial data silos to mobile devices ( Kairouz et al. , 2019 ) . While some common challenges exist , such as the general statistical heterogeneity – “ non-iidnes ” – of the distributed data sets , each setting also brings its own distinct problems . In this paper , we are specifically interested in a small-scale federated learning setting consisting of mobile or embedded devices , each having a limited data set and running a small-sized model due to their constrained memory . As an example , consider the deployment of health monitors based on data from smart-watch ECG data . In this context , we argue that it is essential to tackle the following challenges , which are largely not addressed by existing solutions : • Trustworthiness : In applications such as personal health assistants , the learning agents ’ recommendations need to be reliable and trustworthy , e.g. , to decide when to contact a doctor in case of a possible emergency ; • Number of communication rounds : When models are small , the payload per communication round may not be the main contributor to the overall latency of the training process . In contrast , accommodating many communication rounds requiring arbitrating channel access among multiple devices may yield slow wall-clock time convergence ( Lin et al. , 2020 ) . Most existing federated learning algorithms , such as Federated Averaging ( FedAvg ) ( McMahan et al. , 2017 ) , are based on frequentist principles , relying on the identification of a single model parameter vector . Frequentist learning is known to be unable to capture epistemic uncertainty , yielding overconfident decisions ( Guo et al. , 2017 ) . Furthermore , the focus of most existing works is on reducing the load per-communication round via compression , rather than decreasing the number of rounds by providing more informative updates at each round ( Kairouz et al. , 2019 ) . This paper introduces a trustworthy solution that is able to reduce the number of communication rounds via a non-parametric variational inference-based implementation of federated Bayesian learning . Federated Bayesian learning has the general aim of computing the global posterior distribution in the model parameter space . Existing decentralized , or federated , Bayesian learning protocols are either based on Variational Inference ( VI ) ( Angelino et al. , 2016 ; Neiswanger et al. , 2015 ; Broderick et al. , 2013 ; Corinzia & Buhmann , 2019b ) or Monte Carlo ( MC ) sampling ( Ahn et al. , 2014 ; Mesquita et al. , 2020 ; Wei & Conlon , 2019 ) . State-of-the-art methods in either category include Partitioned Variational Inference ( PVI ) , which has been recently introduced as a unifying distributed VI framework that relies on the optimization over parametric posteriors ; and Distributed Stochastic Gradient Langevin Dynamics ( DSGLD ) , which is an MC sampling technique that maintains a number of Markov chains updated via local Stochastic Gradient Descent ( SGD ) with the addition of Gaussian noise ( Ahn et al. , 2014 ; Welling & Teh , 2011 ) . The performance of VI-based protocols is generally limited by the bias entailed by the variational approximation , while MC sampling is slow and suffers from the difficulty of assessing convergence ( Angelino et al. , 2016 ) . Stein Variational Gradient Descent ( SVGD ) has been introduced in ( Liu & Wang , 2016 ) as a nonparametric Bayesian framework that approximates a target posterior distribution via non-random and interacting particles . SVGD inherits the flexibility of non-parametric Bayesian inference methods , while improving the convergence speed of MC sampling ( Liu & Wang , 2016 ) . By controlling the number of particles , SVGD can provide flexible performance in terms of bias , convergence speed , and per-iteration complexity . This paper introduces a novel non-parametric distributed learning algorithm , termed Distributed Stein Variational Gradient Descent ( DSVGD ) , that transfers the mentioned benefits of SVGD to federated learning . As illustrated in Fig . 1 , DSVGD targets a generalized Bayesian learning formulation , with arbitrary loss functions ( Knoblauch et al. , 2019 ) ; and maintains a number of non-random and interacting particles at a central server to represent the current iterate of the global posterior . At each iteration , the particles are downloaded and updated by one of the agents by minimizing a local free energy functional before being uploaded to the server . DSVGD is shown to enable ( i ) a trade-off between per-iteration communication load and number of communication rounds by varying the number of particles ; while ( ii ) being able to make trustworthy decisions through Bayesian inference . 2 SYSTEM SET-UP . We consider the federated learning set-up in Fig . 1 , where each agent k = 1 , . . . , K has a distinct local dataset with associated training loss Lk ( θ ) for model parameter θ . The agents communicate through a central node with the goal of computing the global posterior distribution q ( θ ) over the shared model parameter θ ∈ Rd for some prior distribution p0 ( θ ) ( Angelino et al. , 2016 ) . Specifically , following the generalized Bayesian learning framework ( Knoblauch et al. , 2019 ) , the agents aim at obtaining the distribution q ( θ ) that minimizes the global free energy min q ( θ ) { F ( q ( θ ) ) = K∑ k=1 Eθ∼q ( θ ) [ Lk ( θ ) ] + αD ( q ( θ ) ||p0 ( θ ) ) } , ( 1 ) where α > 0 is a temperature parameter . The ( generalized , or Gibbs ) global posterior qopt ( θ ) solving problem ( 1 ) must strike a balance between minimizing the sum loss function ( first term in F ( q ) ) and the model complexity defined by the divergence from a reference prior ( second term in F ( q ) ) . It is given as qopt ( θ ) = 1 Z · q̃opt ( θ ) , with q̃opt ( θ ) = p0 ( θ ) exp ( − 1 α K∑ k=1 Lk ( θ ) ) , ( 2 ) where we denoted as Z the normalization constant . It is useful to note that the global free energy can also be written as the scaled KL F ( q ( θ ) ) = αD ( q ( θ ) ||q̃opt ( θ ) ) . The main challenge in computing the optimal posterior qopt ( θ ) in a distributed manner is that each agent k is only aware of its local loss Lk ( θ ) . By exchanging information through the server , the K agents wish to obtain an estimate of the global posterior ( 2 ) without disclosing their local datasets neither to the server nor to the other agents . In this paper , we introduce a novel non-parametric distributed generalized Bayesian learning framework that addresses this challenge by integrating Distributed VI ( DVI ) and SVGD ( Liu & Wang , 2016 ) . 3 DISTRIBUTED VARIATIONAL INFERENCE . In this section , we describe a general Expectation Propagation ( EP ) -based framework ( Vehtari et al. , 2020 ) , which we term as DVI , that aims at computing the global posterior in a federated fashion ( Bui et al. , 2018 ; Corinzia & Buhmann , 2019b ) . DVI starts from the observation that the posterior ( 2 ) factorizes as the product q ( θ ) = p0 ( θ ) K∏ k=1 tk ( θ ) , ( 3 ) where the term tk ( · ) is given by the scaled local likelihood exp ( α−1Lk ( θ ) ) /Z . Since the normalization constant Z depends on all data sets , the true scaled local likelihood tk ( · ) can not be directly computed at agent k. The idea of DVI is to iteratively update approximate likelihood factors tk ( θ ) for k = 1 , ... , K by means of local optimization steps at the agents and communication through the server , with the aim of minimizing the global free energy ( 1 ) over distribution ( 3 ) . We give here the standard implementation of DVI in which a single agent is schedule at each time , although parallel implementations are possible and discussed below . Accordingly , at each communication round i = 1 , 2 , ... , the server maintains the current iterate q ( i−1 ) ( θ ) of the global posterior , and schedules an agent k ∈ { 1 , 2 , . . . , K } , which proceeds as follows : 1 . Agent k downloads the current global variational posterior distribution q ( i−1 ) ( θ ) from the server ( see Fig . 1 ( a ) , step 1 ) ; 2 . Agent k updates the global posterior by minimizing the local free energy F ( i ) k ( q ( θ ) ) ( see Fig . 1 ( a ) , step 2 ) q ( i ) ( θ ) = argmin q ( θ ) { F ( i ) k ( q ( θ ) ) = Eθ∼q ( θ ) [ Lk ( θ ) ] + αD ( q ( θ ) ||p̂ ( i ) k ( θ ) ) } , ( 4 ) where we have defined the ( unnormalized ) cavity distribution p̂ ( i ) k ( θ ) as p̂ ( i ) k ( θ ) = q ( i−1 ) ( θ ) t ( i−1 ) k ( θ ) . ( 5 ) The cavity distribution p̂ ( i ) k ( θ ) , which removes the contribution of the current approximate likelihood of agent k from the current global posterior iterate , serves as a prior for the update in ( 4 ) . In a manner similar to ( 2 ) , the local free energy is minimized by the tilted distribution p ( i ) k ( θ ) ∝ p̃ ( i ) k ( θ ) with p̃ ( i ) k ( θ ) = p̂ ( i ) k ( θ ) exp ( − 1 α Lk ( θ ) ) ; ( 6 ) 3 . Agent k sends the updated posterior q ( i ) ( · ) = p ( i ) k ( · ) to the server ( see Fig . 1 ( a ) , step 3 ) , and updates its approximate likelihood accordingly as t ( i ) k ( θ ) = q ( i ) ( θ ) q ( i−1 ) ( θ ) t ( i−1 ) k ( θ ) ; ( 7 ) Finally , non-scheduled agents k′ 6= k set t ( i ) k′ ( θ ) = t ( i−1 ) k′ ( θ ) , and the server sets the next iterate as q ( i ) ( θ ) . We have the following key property of DVI . Theorem 1 . The global posterior qopt ( θ ) in ( 2 ) is the unique fixed point of the DVI algorithm . The fixed-point property in Theorem 1 can be verified directly by setting q ( i−1 ) ( θ ) = qopt ( θ ) and t ( i−1 ) k ( θ ) = exp ( α −1Lk ( θ ) ) /Z and by observing that this leads to the fixed point condition q ( i ) ( θ ) = q ( i−1 ) ( θ ) = qopt ( θ ) . The proof is provided in Sec . A.6 . Importantly , this property is not tied to the sequential implementation detailed above , and it applies also if multiple devices are scheduled in parallel , as long as one sets the next iterate as q ( i ) ( θ ) = p0 ( θ ) ∏ k∈K ( i ) t ( i ) k ( θ ) ∏ k′ 6∈K ( i ) t ( i ) k′ ( θ ) , where K ( i ) denotes the set of scheduled agents at communication round i and we have t ( i ) k′ ( θ ) = t ( i−1 ) k′ ( θ ) and t ( i ) k ( θ ) updated following ( 7 ) . | This paper proposes a Bayesian optimization algorithm in the context of federated learning. The whole framework is built on top of generalized Bayesian learning. To overcome the locality of clients' distributions, the authors propose their solution as an integration of Partitioned Variational Inference (PVI) and Stein Variational Gradient Descent (SVGD). Numerical experiments have been conducted on a synthetic dataset and some standard benchmark datasets, and evaluated on both regression and classification tasks. | SP:81d2d5d9bfe2974415843ec016c72b80a761a20e |
Neighbourhood Distillation: On the benefits of non end-to-end distillation | 1 INTRODUCTION . As Deep Neural Networks improve on challenging tasks , they also become deeper and bigger . Image classification convolutional neural networks grew from 5 layers in LeNet ( LeCun et al. , 1998 ) to more than a 100 in the latest ResNet models ( He et al. , 2016 ) . However , as models grow in size , training by back propagating gradients through the entire network becomes more challenging and computationally expensive . Convergence in a highly non-convex space can be slow and requires the development of sophisticated optimizers to escape local optima ( Kingma & Ba , 2014 ) . Gradients vanish or explode as they get passed through an increasing number of layers . Very deep neural networks that are trained end-to-end also require accelerators , and time to train to completion . Our work seeks to overcome the limitations of training very deep networks by breaking away from the end-to-end training paradigm . We address the procedure of distilling knowledge from a teacher model and propose to break a deep architecture into smaller components which are distilled independently . There are multiple benefits to working on small neighbourhoods as compared to full models : training a neighbourhood takes significantly less compute than a larger model ; during training , gradients in a neighbourhood only back-propagate through a small number of layers making it unlikely that they will suffer from vanishing or exploding gradients . By breaking a model into smaller neighbourhoods , training can be done in parallel , significantly reducing wall-time for training as well as enabling training on CPUs which are cheaper than custom accelerators but are seldom used in Deep Learning as they are too slow for larger models . Supervision to train the components is provided by a pre-trained teacher architecture , as is commonly used in Knowledge Distillation ( Hinton et al. , 2015 ) , a popular model compression technique that encourages a student architecture to reproduce the outputs of the teacher . For this reason , we call our method Neighbourhood Distillation . In this paper , we explore the idea of Neighbourhood Distillation on a number of different applications , demonstrate its benefits , and advocate for more research into non end-to-end training . Contributions • We provide empirical evidence of the thresholding effect , a phenomenon that highlights deep neural networks ’ resilience to local perturbations of their weights . This observation motivates the idea of Neighbourhood Distillation . • We show that Neighbourhood Distillation is up to 4x faster than Knowledge Distillation while producing models of the same quality . We demonstrate this on model compression and sparsification . • Then , we show that neighbourhoods trained independently can be used in a search algorithm that efficiently explores an exponential number of possibilities to find an optimal student architecture . • Finally , we show applications of Neighbourhood Distillation to zero-data settings . Shallow neighbourhoods model less complex functions which we can distill using only Gaussian noise as a training input . 2 RELATED WORK . Non end-to-end training Before the democratization of deep learning , machine learning methods relied on multi-stage pipelines . For example , the face detection algorithm designed by Viola & Jones ( 2001 ) is a multi-stage pipeline relying first on handcrafted feature extraction and then on a classifier trained to detect faces from the features . Then came the idea of directly learning classification from the input image , leaving the model to learn all parts of the pipeline through a series of hidden layers ( LeCun et al. , 1998 ; Fukushima & Miyake , 1982 ) that could be trained with end-to-end with gradient back-propagation ( Rumelhart et al. , 1986 ) or layerwise training ( Vincent et al. , 2008 ) . Endto -end deep learning gained traction with the success of the AlexNet model ( Krizhevsky et al. , 2012 ) in image classification . It is now the main component of various state-of-the art approaches in object detection ( Redmon et al. , 2016 ; Ren et al. , 2015 ) , image segmentation ( He et al. , 2017 ) , speech processing ( Senior et al. , 2012 ) , machine translation ( Seo et al. , 2016 ; Vaswani et al. , 2017 ) . However , gradient-based end-to-end learning comes with a cost . Highly non-convex losses are harder to optimize ; models of bigger sizes also require more data to fully train ; they suffer from vanishing and exploding gradients ( Hochreiter , 1998 ; Pascanu et al. , 2012 ) . Approaches to overcome these issues can be broken down into three categories . First , several methods have been introduced to ease the training of deep models , such as residual connections ( He et al. , 2016 ) , gated recurrent units ( Cho et al. , 2014 ) , normalization layers ( Ioffe & Szegedy , 2015 ; Ba et al. , 2016 ; Salimans & Kingma , 2016 ) , and more powerful optimizers ( Kingma & Ba , 2014 ; Hinton et al . ; Duchi et al. , 2011 ) . Second , engineering best practices have adapted to rise to the challenges raised by deep learning : pre-trained models trained on large-datasets can be reused for transfer learning , only requiring the fine-tuning of a portion of the model for specific tasks ( Devlin et al. , 2018 ; Dahl et al. , 2011 ) . Distributed training ( Krizhevsky et al. , 2012 ; Dean et al. , 2012 ) and custom hardware accelerators ( Jouppi et al. , 2017 ) were also crucial in accelerating training . The last category , which our work falls into , investigates non end-to-end training methods for deep neural networks . One class of non end-to-end learning method relies on splitting a deep network into gradient-isolated modules trained with local objectives ( Löwe et al. , 2019 ; Nøkland & Eidnes , 2019 ) . Layerwise training ( Belilovsky et al. , 2018 ; Huang et al. , 2017 ) also divides the target network into modules that are sequentially trained in a bottom-up approach . Difference Target Propagation ( Lee et al. , 2015 ) seeks to optimize each layer to output activations close to a given target value . These values are computed by propagating inverses from downstream layers while ours are provided by a pre-trained teacher model . All of these approaches also differ from ours as modules still depend on each other , while our neighbourhoods are distilled independently . Knowledge Distillation Our work specifically draws from Knowledge Distillation ( Hinton et al. , 2015 ) , a general-purpose model compression method that has been successfully applied to vision ( Crowley et al. , 2018 ) and language problems ( Hahn & Choi , 2019 ) . Knowledge Distillation transfers knowledge from a teacher in the form of its predicted soft logits . Various variations have been developed to improve distillation . One direction is to transfer additional knowledge in the form of intermediate activations ( Romero et al. , 2014 ; Aguilar et al. , 2019 ; Zhang et al. , 2017 ) , attention maps ( Zagoruyko & Komodakis , 2016 ) , weight projections ( Hyun Lee et al. , 2018 ) or layer interactions ( Yim et al. , 2017 ) . Other methods also seek to directly address the capacity gap between a teacher and student ( Cho & Hariharan , 2019 ) by distilling from a series of intermediate teachers ( Mirzadeh et al. , 2019 ; Jin et al. , 2019 ) . These methods all distill the student end-to-end . Neural Architecture Search Recent papers study how to combine Knowledge Distillation with Neural Architecture Search methods , which automate the design process by exploring a given search space ( Liu et al. , 2018 ; Pham et al. , 2018 ; Liu et al. , 2017 ; Tan & Le , 2019 ; Zoph et al. , 2017 ) . These methods have successfully been applied to find better suited students for a given teacher ( Kang et al. , 2019 ; Liu et al. , 2020 ) . Closely related to our work , Li et al . ( 2020 ) divide a supernet into blocks and use Knowledge Distillation to train it . However , they only focus on extracting the architectural knowledge from the teacher , ignoring the parameters learned during the search process . 3 THRESHOLDING EFFECT . Due to their size , modern neural networks are usually overparameterized . Their learned representations are redundant and recent empirical studies conducted on ResNets ( Zhang et al. , 2019 ; Veit et al. , 2016 ) showed that it is possible to drop or reset layers in a trained network without hurting their performance . We hypothesize further that less drastic modifications in a network , such as replacing part or all of their sub-components by imperfect approximations , will not result in dramatic error accumulation . In the following section , we provide empirical evidence of an interesting property that supports this : sub-components of a trained model may be perturbed without damaging the model ’ s accuracy , as long as individual local errors remain under a certain threshold . We call this phenomenon the thresholding effect . First , we introduce the notion of neighbourhood that will be used throughout the rest of the paper . Deep neural networks are built by stacking a succession of blocks of operations such as convolutions and non-linear layers . We express this by defining a network T as a composition of n sub-networks : ∀i ∈ { 1 . . . n } , Ti : RFi −→ RFi+1 T = Tn ◦ Tn−1 ◦ · · · ◦ T1 ( 1 ) We call neighbourhood any portion of the network that is delimited by one sub-network Ti . This neighbourhood represents an arbitrary logical construction block in the network and may be replaced by variants of its architecture that have the same input and output shapes . For any given netwrok , one can define multiple ways to break it up into neighbourhoods . The question we set out to answer is the following . Imagine we want to replace part or all the neighbourhoods by imperfect approximations , how good do these approximations need to be to prevent a drastic loss of performance in the modified model ? We consider different pre-trained models and estimate how their accuracy is impacted by perturbations of the network ’ s intermediate features . To do so , we perturb each neighbourhood by artificially introducing some gaussian noise of amplitude to each activation output . Si = Ti + δ ( 2 ) δ ∼ N ( 0 , 2 ) The students are then composed into a full network S = Sn ◦ Sn−1 · · · ◦ S1 which we evaluate . On CIFAR-10 ( Krizhevsky et al. , 2009 ) , we train a ResNetV1-20 ( He et al. , 2016 ) model and define a neighbourhood as one bottleneck block which consists of a two-layer convolutional network and a skip connection . We reiterate a similar experiment on a large-scale dataset . On ImageNet ( Deng et al. , 2009 ) , we train several EfficientNet ( Tan & Le , 2019 ) models and define a neighbourhood as one mobile inverted bottleneck block . Figure 1 shows how errors of different amplitudes accumulate across networks when replacing some or all neighbourhoods by approximations . In particular , we consistently witness a thresholding effect in all networks . When the amplitude of the noise is small enough , the final accuracy of the network is not impacted by accumulated perturbations . This threshold appears to depend on the number of neighbourhoods . ( a ) ResNetV1-20 with 91.6 % accuracy on CIFAR-10 . Each line represents a different number of perturbed blocks . ( b ) EfficientNet models trained on ImageNet . Each line represents a different EfficientNet model for which all neighbourhoods have been perturbed . Figure 1 : We perturb the intermediate outputs at regular locations in the network using a gaussian noise of amplitude and measure the effect of these perturbations on the accuracy of the model . We show that accuracy remains stable ( accuracy change close to 0 ) as long as remains under a certain threshold . The threshold differs between network architectures and number of perturbed neighbourhoods . Note that for all models , even when perturbing all neighborhoods , there is still a range for which there is virtually no loss in accuracy . ( a ) Computational Graphs ( b ) Neighbourhoods for parameter reduction . Figure 2 : ( a ) Computation graphs for Neighbourhood Distillation . Top : the teacher and the student neighbourhoods receive activations from the root of the teacher network . The student neighbourhood is trained to reproduce the output of the teacher . Bottom : the teacher and student outputs are propagated to the head of the teacher network and additional activations between teacher and student networks are compared . The look-ahead loss gives an additional training signal for the student to reproduce the teacher . ( b ) Example of teacher and student neighbourhoods . Our experiments on the thresholding effect show that it is possible to locally replace sub-components of a model without hurting the performance of the reconstructed model . This observation is what motivates Neighbourhood Distillation : neighbourhoods trained to approximate their teacher outputs can be used to reconstruct student networks with no or limited accuracy drop . In the appendix , we also present preliminary results on understanding the thresholding effect and show how regularizing the teacher network can impact the threshold . | This paper introduces Neighbourhood Distillation (ND), a new training pipeline for knowledge distillation (KD), which splits the student network into smaller neighbourhoods and trains them independently. The authors breaks away from the end-to-end paradigm in previous KD methods and provides empirical evidence to reveal feasibility and effectiveness of ND. Specially, ND can: 1) speed up convergence, 2) reuse in neural architecture search and 3) adapt to the synthetic data. | SP:be68300138280bab710e907dfc81395c16a270cf |
Neighbourhood Distillation: On the benefits of non end-to-end distillation | 1 INTRODUCTION . As Deep Neural Networks improve on challenging tasks , they also become deeper and bigger . Image classification convolutional neural networks grew from 5 layers in LeNet ( LeCun et al. , 1998 ) to more than a 100 in the latest ResNet models ( He et al. , 2016 ) . However , as models grow in size , training by back propagating gradients through the entire network becomes more challenging and computationally expensive . Convergence in a highly non-convex space can be slow and requires the development of sophisticated optimizers to escape local optima ( Kingma & Ba , 2014 ) . Gradients vanish or explode as they get passed through an increasing number of layers . Very deep neural networks that are trained end-to-end also require accelerators , and time to train to completion . Our work seeks to overcome the limitations of training very deep networks by breaking away from the end-to-end training paradigm . We address the procedure of distilling knowledge from a teacher model and propose to break a deep architecture into smaller components which are distilled independently . There are multiple benefits to working on small neighbourhoods as compared to full models : training a neighbourhood takes significantly less compute than a larger model ; during training , gradients in a neighbourhood only back-propagate through a small number of layers making it unlikely that they will suffer from vanishing or exploding gradients . By breaking a model into smaller neighbourhoods , training can be done in parallel , significantly reducing wall-time for training as well as enabling training on CPUs which are cheaper than custom accelerators but are seldom used in Deep Learning as they are too slow for larger models . Supervision to train the components is provided by a pre-trained teacher architecture , as is commonly used in Knowledge Distillation ( Hinton et al. , 2015 ) , a popular model compression technique that encourages a student architecture to reproduce the outputs of the teacher . For this reason , we call our method Neighbourhood Distillation . In this paper , we explore the idea of Neighbourhood Distillation on a number of different applications , demonstrate its benefits , and advocate for more research into non end-to-end training . Contributions • We provide empirical evidence of the thresholding effect , a phenomenon that highlights deep neural networks ’ resilience to local perturbations of their weights . This observation motivates the idea of Neighbourhood Distillation . • We show that Neighbourhood Distillation is up to 4x faster than Knowledge Distillation while producing models of the same quality . We demonstrate this on model compression and sparsification . • Then , we show that neighbourhoods trained independently can be used in a search algorithm that efficiently explores an exponential number of possibilities to find an optimal student architecture . • Finally , we show applications of Neighbourhood Distillation to zero-data settings . Shallow neighbourhoods model less complex functions which we can distill using only Gaussian noise as a training input . 2 RELATED WORK . Non end-to-end training Before the democratization of deep learning , machine learning methods relied on multi-stage pipelines . For example , the face detection algorithm designed by Viola & Jones ( 2001 ) is a multi-stage pipeline relying first on handcrafted feature extraction and then on a classifier trained to detect faces from the features . Then came the idea of directly learning classification from the input image , leaving the model to learn all parts of the pipeline through a series of hidden layers ( LeCun et al. , 1998 ; Fukushima & Miyake , 1982 ) that could be trained with end-to-end with gradient back-propagation ( Rumelhart et al. , 1986 ) or layerwise training ( Vincent et al. , 2008 ) . Endto -end deep learning gained traction with the success of the AlexNet model ( Krizhevsky et al. , 2012 ) in image classification . It is now the main component of various state-of-the art approaches in object detection ( Redmon et al. , 2016 ; Ren et al. , 2015 ) , image segmentation ( He et al. , 2017 ) , speech processing ( Senior et al. , 2012 ) , machine translation ( Seo et al. , 2016 ; Vaswani et al. , 2017 ) . However , gradient-based end-to-end learning comes with a cost . Highly non-convex losses are harder to optimize ; models of bigger sizes also require more data to fully train ; they suffer from vanishing and exploding gradients ( Hochreiter , 1998 ; Pascanu et al. , 2012 ) . Approaches to overcome these issues can be broken down into three categories . First , several methods have been introduced to ease the training of deep models , such as residual connections ( He et al. , 2016 ) , gated recurrent units ( Cho et al. , 2014 ) , normalization layers ( Ioffe & Szegedy , 2015 ; Ba et al. , 2016 ; Salimans & Kingma , 2016 ) , and more powerful optimizers ( Kingma & Ba , 2014 ; Hinton et al . ; Duchi et al. , 2011 ) . Second , engineering best practices have adapted to rise to the challenges raised by deep learning : pre-trained models trained on large-datasets can be reused for transfer learning , only requiring the fine-tuning of a portion of the model for specific tasks ( Devlin et al. , 2018 ; Dahl et al. , 2011 ) . Distributed training ( Krizhevsky et al. , 2012 ; Dean et al. , 2012 ) and custom hardware accelerators ( Jouppi et al. , 2017 ) were also crucial in accelerating training . The last category , which our work falls into , investigates non end-to-end training methods for deep neural networks . One class of non end-to-end learning method relies on splitting a deep network into gradient-isolated modules trained with local objectives ( Löwe et al. , 2019 ; Nøkland & Eidnes , 2019 ) . Layerwise training ( Belilovsky et al. , 2018 ; Huang et al. , 2017 ) also divides the target network into modules that are sequentially trained in a bottom-up approach . Difference Target Propagation ( Lee et al. , 2015 ) seeks to optimize each layer to output activations close to a given target value . These values are computed by propagating inverses from downstream layers while ours are provided by a pre-trained teacher model . All of these approaches also differ from ours as modules still depend on each other , while our neighbourhoods are distilled independently . Knowledge Distillation Our work specifically draws from Knowledge Distillation ( Hinton et al. , 2015 ) , a general-purpose model compression method that has been successfully applied to vision ( Crowley et al. , 2018 ) and language problems ( Hahn & Choi , 2019 ) . Knowledge Distillation transfers knowledge from a teacher in the form of its predicted soft logits . Various variations have been developed to improve distillation . One direction is to transfer additional knowledge in the form of intermediate activations ( Romero et al. , 2014 ; Aguilar et al. , 2019 ; Zhang et al. , 2017 ) , attention maps ( Zagoruyko & Komodakis , 2016 ) , weight projections ( Hyun Lee et al. , 2018 ) or layer interactions ( Yim et al. , 2017 ) . Other methods also seek to directly address the capacity gap between a teacher and student ( Cho & Hariharan , 2019 ) by distilling from a series of intermediate teachers ( Mirzadeh et al. , 2019 ; Jin et al. , 2019 ) . These methods all distill the student end-to-end . Neural Architecture Search Recent papers study how to combine Knowledge Distillation with Neural Architecture Search methods , which automate the design process by exploring a given search space ( Liu et al. , 2018 ; Pham et al. , 2018 ; Liu et al. , 2017 ; Tan & Le , 2019 ; Zoph et al. , 2017 ) . These methods have successfully been applied to find better suited students for a given teacher ( Kang et al. , 2019 ; Liu et al. , 2020 ) . Closely related to our work , Li et al . ( 2020 ) divide a supernet into blocks and use Knowledge Distillation to train it . However , they only focus on extracting the architectural knowledge from the teacher , ignoring the parameters learned during the search process . 3 THRESHOLDING EFFECT . Due to their size , modern neural networks are usually overparameterized . Their learned representations are redundant and recent empirical studies conducted on ResNets ( Zhang et al. , 2019 ; Veit et al. , 2016 ) showed that it is possible to drop or reset layers in a trained network without hurting their performance . We hypothesize further that less drastic modifications in a network , such as replacing part or all of their sub-components by imperfect approximations , will not result in dramatic error accumulation . In the following section , we provide empirical evidence of an interesting property that supports this : sub-components of a trained model may be perturbed without damaging the model ’ s accuracy , as long as individual local errors remain under a certain threshold . We call this phenomenon the thresholding effect . First , we introduce the notion of neighbourhood that will be used throughout the rest of the paper . Deep neural networks are built by stacking a succession of blocks of operations such as convolutions and non-linear layers . We express this by defining a network T as a composition of n sub-networks : ∀i ∈ { 1 . . . n } , Ti : RFi −→ RFi+1 T = Tn ◦ Tn−1 ◦ · · · ◦ T1 ( 1 ) We call neighbourhood any portion of the network that is delimited by one sub-network Ti . This neighbourhood represents an arbitrary logical construction block in the network and may be replaced by variants of its architecture that have the same input and output shapes . For any given netwrok , one can define multiple ways to break it up into neighbourhoods . The question we set out to answer is the following . Imagine we want to replace part or all the neighbourhoods by imperfect approximations , how good do these approximations need to be to prevent a drastic loss of performance in the modified model ? We consider different pre-trained models and estimate how their accuracy is impacted by perturbations of the network ’ s intermediate features . To do so , we perturb each neighbourhood by artificially introducing some gaussian noise of amplitude to each activation output . Si = Ti + δ ( 2 ) δ ∼ N ( 0 , 2 ) The students are then composed into a full network S = Sn ◦ Sn−1 · · · ◦ S1 which we evaluate . On CIFAR-10 ( Krizhevsky et al. , 2009 ) , we train a ResNetV1-20 ( He et al. , 2016 ) model and define a neighbourhood as one bottleneck block which consists of a two-layer convolutional network and a skip connection . We reiterate a similar experiment on a large-scale dataset . On ImageNet ( Deng et al. , 2009 ) , we train several EfficientNet ( Tan & Le , 2019 ) models and define a neighbourhood as one mobile inverted bottleneck block . Figure 1 shows how errors of different amplitudes accumulate across networks when replacing some or all neighbourhoods by approximations . In particular , we consistently witness a thresholding effect in all networks . When the amplitude of the noise is small enough , the final accuracy of the network is not impacted by accumulated perturbations . This threshold appears to depend on the number of neighbourhoods . ( a ) ResNetV1-20 with 91.6 % accuracy on CIFAR-10 . Each line represents a different number of perturbed blocks . ( b ) EfficientNet models trained on ImageNet . Each line represents a different EfficientNet model for which all neighbourhoods have been perturbed . Figure 1 : We perturb the intermediate outputs at regular locations in the network using a gaussian noise of amplitude and measure the effect of these perturbations on the accuracy of the model . We show that accuracy remains stable ( accuracy change close to 0 ) as long as remains under a certain threshold . The threshold differs between network architectures and number of perturbed neighbourhoods . Note that for all models , even when perturbing all neighborhoods , there is still a range for which there is virtually no loss in accuracy . ( a ) Computational Graphs ( b ) Neighbourhoods for parameter reduction . Figure 2 : ( a ) Computation graphs for Neighbourhood Distillation . Top : the teacher and the student neighbourhoods receive activations from the root of the teacher network . The student neighbourhood is trained to reproduce the output of the teacher . Bottom : the teacher and student outputs are propagated to the head of the teacher network and additional activations between teacher and student networks are compared . The look-ahead loss gives an additional training signal for the student to reproduce the teacher . ( b ) Example of teacher and student neighbourhoods . Our experiments on the thresholding effect show that it is possible to locally replace sub-components of a model without hurting the performance of the reconstructed model . This observation is what motivates Neighbourhood Distillation : neighbourhoods trained to approximate their teacher outputs can be used to reconstruct student networks with no or limited accuracy drop . In the appendix , we also present preliminary results on understanding the thresholding effect and show how regularizing the teacher network can impact the threshold . | This paper studies knowledge distillation in the context of parallelly training sub-networks (called neighbourhoods) instead of commonly used end-to-end training paradigm. The authors explore the applications of the proposed neighbourhoods distillation in improving sparse networks, searching a good student structure given the teacher and knowledge distillation merely using synthetic data. Both CIFAR and ImageNet datasets are considered in the experiments. | SP:be68300138280bab710e907dfc81395c16a270cf |
Learning from Noisy Data with Robust Representation Learning | 1 INTRODUCTION . Data in real life is noisy . However , deep models with remarkable performance are mostly trained on clean datasets with high-quality human annotations . Manual data cleaning and labeling is an expensive process that is difficult to scale . On the other hand , there exists almost infinite amount of noisy data online . It is crucial that deep neural networks ( DNNs ) could harvest noisy training data . However , it has been shown that DNNs are susceptible to overfitting to noise ( Zhang et al. , 2017 ) . As shown in Figure 1 , a real-world noisy image dataset often consists of multiple types of noise . Label noise refers to samples that are wrongly labeled as another class ( e.g . flower labeled as orange ) . Out-of-distribution input refers to samples that do not belong to any known classes . Input corruption refers to image-level distortion ( e.g . low brightness ) that causes data shift between training and test . Most of the methods in literature focus on addressing the more detrimental label noise . Two dominant approaches include : ( 1 ) find clean samples as those with smaller loss and assign larger weights to them ( Han et al. , 2018 ; Yu et al. , 2019 ; Shen & Sanghavi , 2019 ; Arazo et al. , 2019 ) ; ( 2 ) relabel noisy samples using model ’ s predictions ( Reed et al. , 2015 ; Ma et al. , 2018 ; Tanaka et al. , 2018 ; Yi & Wu , 2019 ) . The recently proposed DivideMix ( Li et al. , 2020a ) integrates both approaches in a co-training framework , but it also increases computation cost . Previous methods that focus on addressing label noise do not consider out-of-distribution input or input corruption , which limits their performance in real-world scenarios . Furthermore , using a model ’ s own prediction to relabel samples could cause confirmation bias , where the prediction error accumulates and harms performance . We propose a new direction for effective learning from noisy data . Our method embeds images into noise-robust low-dimensional representations , and regularizes the geometric structure of the representations with contrastive learning . Specifically , our algorithmic contributions include : • We propose noise-robust contrastive learning , which introduces two contrastive losses . The first is an unsupervised consistency contrastive loss . It enforces inputs with perturbations to have similar normalized embeddings , which helps learn robust and discriminative representation . • Our second contrastive loss is a weakly-supervised mixup prototypical loss . We compute class prototypes as normalized mean embeddings , and enforces each sample ’ s embedding to be closer to 1Code is in the supplementary material its class prototype . Inspired by Mixup ( Zhang et al. , 2018 ) , we construct virtual training samples as linear interpolation of inputs , and encourage the same linear relationship w.r.t the class prototypes . • We train a linear autoencoder to reconstruct the high-dimensional features using low-dimensional embeddings . The autoendoer enables the high-dimensional features to maximally preserve the robustness of the low-dimensional embeddings , thus regularizing the classifier . • We propose a new noise cleaning method which exploits the structure of the learned representations . For each sample , we aggregate information from its top-k neighbors to create a pseudo-label . A subset of training samples with confident pseudo-labels are selected to compute the weaklysupervised losses . This process can effectively clean both label noise and out-of-distribution ( OOD ) noise . Our experimental contributions include : • We experimentally show that our method is robust to label noise , OOD input , and input corruption . Experiments are performed on multiple datasets with controlled noise and real-world noise , where our method achieves state-of-the-art performance . • We demonstrate that the proposed noise cleaning method can effectively clean a majority of label noise . It also learns a curriculum that gradually leverages more samples to compute the weakly-supervised losses as the pseudo-labels become more accurate . • We validate the robustness of the learned low-dimensional representation by showing ( 1 ) k-nearest neighbor classification outperforms the softmax classifier . ( 2 ) OOD samples can be separated from in-distribution samples . The efficacy of the proposed autoencoder is also verified . 2 RELATED WORK . Label noise learning . Learning from noisy labels have been extensively studied in the literature . While some methods require access to a small set of clean samples ( Xiao et al. , 2015 ; Vahdat , 2017 ; Veit et al. , 2017 ; Lee et al. , 2018 ; Hendrycks et al. , 2018 ) , most methods focus on the more challenging scenario where no clean labels are available . These methods can be categorized into two major types . The first type performs label correction using predictions from the network ( Reed et al. , 2015 ; Ma et al. , 2018 ; Tanaka et al. , 2018 ; Yi & Wu , 2019 ) . The second type tries to separate clean samples from corrupted samples , and trains the model on clean samples ( Han et al. , 2018 ; Arazo et al. , 2019 ; Jiang et al. , 2018 ; 2020 ; Wang et al. , 2018 ; Chen et al. , 2019 ; Lyu & Tsang , 2020 ) . The recently proposed DivideMix ( Li et al. , 2020a ) effectively combines label correction and sample selection with the Mixup ( Zhang et al. , 2018 ) data augmentation under a co-training framework . However , it cost 2⇥ the computational resource of our method . Different from existing methods , our method combats noise by learning noise-robust low-dimensional representations . We propose a more effective noise cleaning method by leveraging the structure of the learned representations . Furthermore , our model is robust not only to label noise , but also to out-of-distribution and corrupted input . A previous work has studied open-set noisy labels ( Wang et al. , 2018 ) , but their method does not enjoy the same level of robustness as ours . Contrastive learning . Contrastive learning is at the core of recent self-supervised representation learning methods ( Chen et al. , 2020 ; He et al. , 2019 ; Oord et al. , 2018 ; Wu et al. , 2018 ) . In selfsupervised contrastive learning , two randomly augmented images are generated for each input image . Then a contrastive loss is applied to pull embeddings from the same source image closer , while pushing embeddings from different source images apart . Recently , prototypical contrastive learning ( PCL ) ( Li et al. , 2020b ) has been proposed , which uses cluster centroids as prototypes , and trains the network by pulling an image embedding closer to its assigned prototypes . Different from previous methods , our method performs contrastive learning in the principal subspace of the high-dimensional feature space , by training a linear autoencoder . Furthermore , our supervised contrastive loss improves PCL ( Li et al. , 2020b ) with Mixup ( Zhang et al. , 2018 ) . Different from the original Mixup where learning happens at the classification layer , our learning takes places in the low-dimensional subspace . 3 METHOD . Given a noisy training dataset D = { ( xi , yi ) } ni=1 , where xi is an image and yi 2 { 1 , ... , C } is its class label . We aim to train a network that is robust to the noise in training data ( i.e . label noise , OOD input , input corruption ) and achieves high accuracy on a clean test set . The proposed network consists of three components : ( 1 ) a deep encoder ( a convolutional neural network ) that encodes an image xi to a high-dimensional feature vi ; ( 2 ) a classifier ( a fully-connected layer followed by softmax ) that receives vi as input and outputs class predictions ; ( 3 ) a linear autoencoder that projects vi into a low-dimensional embedding zi 2 Rd . We show an illustration of our method in Figure 2 , and a pseudo-code in appendix B . Next , we delineate its details . 3.1 CONTRASTIVE LEARNING IN ROBUST LOW-DIMENSIONAL SUBSPACE . Let zi = Wevi be the linear projection from high-dimensional features to low-dimensional embeddings , and ẑi = zi/ kzik2 be the normalized embeddings . We aim to learn robust embeddings with two contrastive losses : unsupervised consistency loss and weakly-supervised mixup prototypical loss . Unsupervised consistency contrastive loss . Following the NT-Xent ( Chen et al. , 2020 ) loss for selfsupervised representation learning , our consistency contrastive loss enforces images with semanticpreserving perturbations to have similar embeddings . Specifically , given a minibatch of b images , we apply weak-augmentation and strong-augmentation to each image , and obtain 2b inputs { xi } 2bi=1 . Weak augmentation is a standard flip-and-shift augmentation strategy , while strong augmentation consists of color and brightness changes with details given in Section 4.1 . We project the inputs into the low-dimensional space to obtain their normalized embeddings { ẑi } 2bi=1 . Let i 2 { 1 , ... , b } be the index of a weakly-augmented input , and j ( i ) be the index of the strong- augmented input from the same source image , the consistency contrastive loss is defined as : Lcc = bX i=1 log exp ( ẑi · ẑj ( i ) /⌧ ) P2b k=1 i 6=k exp ( ẑi · ẑk/⌧ ) , ( 1 ) where ⌧ is a scalar temperature parameter . The consistency contrastive loss maximizes the inner product between the pair of positive embeddings ẑi and ẑj ( i ) , while minimizing the inner product between 2 ( b 1 ) pairs of negative embeddings . By mapping different views ( augmentations ) of the same image to neighboring embeddings , the consistency contrastive loss encourages the network to learn discriminative representation that is robust to low-level image corruption . Weakly-supervised mixup prototypical contrastive loss . Our second contrastive loss injects structural knowledge of classes into the embedding space . Let Ic denote indices for the subset of images in D labeled with class c , we calculate the class prototype as the normalized mean embedding : zc = 1 |Ic| X i2Ic ẑi , ẑ c = zc kzck2 , ( 2 ) where ẑi is the embedding of a center-cropped image , and the class prototypes are calculated at the beginning of each epoch . The prototypical contrastive loss enforces an image embedding ẑi to be more similar to its corresponding class prototype ẑyi , in contrast to other class prototypes : Lpc ( ẑi , yi ) = log exp ( ẑi · ẑyi/⌧ ) PC c=1 exp ( ẑi · ẑc/⌧ ) . ( 3 ) Since the label yi is noisy , we would like to regularize the encoder from memorizing training labels . Mixup ( Zhang et al. , 2018 ) has been shown to be an effective method against label noise ( Arazo et al. , 2019 ; Li et al. , 2020a ) . Inspired by it , we create virtual training samples by linearly interpolating a sample ( indexed by i ) with another sample ( indexed by m ( i ) ) randomly chosen from the same minibatch : xmi = xi + ( 1 ) xm ( i ) , ( 4 ) where ⇠ Beta ( ↵ , ↵ ) . Let ẑmi be the normalized embedding for xmi , the mixup version of the prototypical contrastive loss is defined as a weighted combination of the two Lpc w.r.t class yi and ym ( i ) . It enforces the embedding for the interpolated input to have the same linear relationship w.r.t . the class prototypes . Lpc mix = 2bX i=1 Lpc ( ẑmi , yi ) + ( 1 ) Lpc ( ẑmi , ym ( i ) ) . ( 5 ) Reconstruction loss . We also train a linear decoder Wd to reconstruct the high-dimensional feature vi based on zi . The reconstruction loss is defined as : Lrecon = 2bX i=1 kvi Wdzik22 . ( 6 ) There are several benefits for training the autoencoder . First , with an optimal linear autoencoder , We will project vi into its low-dimensional principal subspace and can be understood as applying PCA ( Baldi & Hornik , 1989 ) . Thus the low-dimensional representation zi is intrinsically robust to input noise . Second , minimizing the reconstruction error is maximizing a lower bound of the mutual information between vi and zi ( Vincent et al. , 2010 ) . Therefore , knowledge learned from the proposed contrastive losses can be maximally preserved in the high-dimensional representation , which helps regularize the classifier . Classification loss . Given the softmax output from the classifier , p ( y ; xi ) , we define the classification loss as the cross-entropy loss . Note that it is only applied to the weakly-augmented inputs . Lce = bX i=1 log p ( yi ; xi ) . ( 7 ) The overall training objective is to minimize a weighted sum of all losses : L = Lce + ! ccLcc + ! pcLpc mix + ! reconLrecon ( 8 ) For all experiments , we fix ! cc = 1 , ! recon = 1 , and change ! pc only across datasets . | The authors of the paper propose to use the contrastive loss, the mixup prototypical loss, and a reconstruction loss to regularize the learned representation in order to achieve robustness under various kinds of noise like label noise, out-of-distribution input, and input corruption. A noise-cleaning process based on the learned representation is also introduced to further enhance the results. Extensive experiments were conducted to demonstrate the effectiveness of the method. | SP:9699e0e908af5e3404df56498afe3d6c7333f431 |
Learning from Noisy Data with Robust Representation Learning | 1 INTRODUCTION . Data in real life is noisy . However , deep models with remarkable performance are mostly trained on clean datasets with high-quality human annotations . Manual data cleaning and labeling is an expensive process that is difficult to scale . On the other hand , there exists almost infinite amount of noisy data online . It is crucial that deep neural networks ( DNNs ) could harvest noisy training data . However , it has been shown that DNNs are susceptible to overfitting to noise ( Zhang et al. , 2017 ) . As shown in Figure 1 , a real-world noisy image dataset often consists of multiple types of noise . Label noise refers to samples that are wrongly labeled as another class ( e.g . flower labeled as orange ) . Out-of-distribution input refers to samples that do not belong to any known classes . Input corruption refers to image-level distortion ( e.g . low brightness ) that causes data shift between training and test . Most of the methods in literature focus on addressing the more detrimental label noise . Two dominant approaches include : ( 1 ) find clean samples as those with smaller loss and assign larger weights to them ( Han et al. , 2018 ; Yu et al. , 2019 ; Shen & Sanghavi , 2019 ; Arazo et al. , 2019 ) ; ( 2 ) relabel noisy samples using model ’ s predictions ( Reed et al. , 2015 ; Ma et al. , 2018 ; Tanaka et al. , 2018 ; Yi & Wu , 2019 ) . The recently proposed DivideMix ( Li et al. , 2020a ) integrates both approaches in a co-training framework , but it also increases computation cost . Previous methods that focus on addressing label noise do not consider out-of-distribution input or input corruption , which limits their performance in real-world scenarios . Furthermore , using a model ’ s own prediction to relabel samples could cause confirmation bias , where the prediction error accumulates and harms performance . We propose a new direction for effective learning from noisy data . Our method embeds images into noise-robust low-dimensional representations , and regularizes the geometric structure of the representations with contrastive learning . Specifically , our algorithmic contributions include : • We propose noise-robust contrastive learning , which introduces two contrastive losses . The first is an unsupervised consistency contrastive loss . It enforces inputs with perturbations to have similar normalized embeddings , which helps learn robust and discriminative representation . • Our second contrastive loss is a weakly-supervised mixup prototypical loss . We compute class prototypes as normalized mean embeddings , and enforces each sample ’ s embedding to be closer to 1Code is in the supplementary material its class prototype . Inspired by Mixup ( Zhang et al. , 2018 ) , we construct virtual training samples as linear interpolation of inputs , and encourage the same linear relationship w.r.t the class prototypes . • We train a linear autoencoder to reconstruct the high-dimensional features using low-dimensional embeddings . The autoendoer enables the high-dimensional features to maximally preserve the robustness of the low-dimensional embeddings , thus regularizing the classifier . • We propose a new noise cleaning method which exploits the structure of the learned representations . For each sample , we aggregate information from its top-k neighbors to create a pseudo-label . A subset of training samples with confident pseudo-labels are selected to compute the weaklysupervised losses . This process can effectively clean both label noise and out-of-distribution ( OOD ) noise . Our experimental contributions include : • We experimentally show that our method is robust to label noise , OOD input , and input corruption . Experiments are performed on multiple datasets with controlled noise and real-world noise , where our method achieves state-of-the-art performance . • We demonstrate that the proposed noise cleaning method can effectively clean a majority of label noise . It also learns a curriculum that gradually leverages more samples to compute the weakly-supervised losses as the pseudo-labels become more accurate . • We validate the robustness of the learned low-dimensional representation by showing ( 1 ) k-nearest neighbor classification outperforms the softmax classifier . ( 2 ) OOD samples can be separated from in-distribution samples . The efficacy of the proposed autoencoder is also verified . 2 RELATED WORK . Label noise learning . Learning from noisy labels have been extensively studied in the literature . While some methods require access to a small set of clean samples ( Xiao et al. , 2015 ; Vahdat , 2017 ; Veit et al. , 2017 ; Lee et al. , 2018 ; Hendrycks et al. , 2018 ) , most methods focus on the more challenging scenario where no clean labels are available . These methods can be categorized into two major types . The first type performs label correction using predictions from the network ( Reed et al. , 2015 ; Ma et al. , 2018 ; Tanaka et al. , 2018 ; Yi & Wu , 2019 ) . The second type tries to separate clean samples from corrupted samples , and trains the model on clean samples ( Han et al. , 2018 ; Arazo et al. , 2019 ; Jiang et al. , 2018 ; 2020 ; Wang et al. , 2018 ; Chen et al. , 2019 ; Lyu & Tsang , 2020 ) . The recently proposed DivideMix ( Li et al. , 2020a ) effectively combines label correction and sample selection with the Mixup ( Zhang et al. , 2018 ) data augmentation under a co-training framework . However , it cost 2⇥ the computational resource of our method . Different from existing methods , our method combats noise by learning noise-robust low-dimensional representations . We propose a more effective noise cleaning method by leveraging the structure of the learned representations . Furthermore , our model is robust not only to label noise , but also to out-of-distribution and corrupted input . A previous work has studied open-set noisy labels ( Wang et al. , 2018 ) , but their method does not enjoy the same level of robustness as ours . Contrastive learning . Contrastive learning is at the core of recent self-supervised representation learning methods ( Chen et al. , 2020 ; He et al. , 2019 ; Oord et al. , 2018 ; Wu et al. , 2018 ) . In selfsupervised contrastive learning , two randomly augmented images are generated for each input image . Then a contrastive loss is applied to pull embeddings from the same source image closer , while pushing embeddings from different source images apart . Recently , prototypical contrastive learning ( PCL ) ( Li et al. , 2020b ) has been proposed , which uses cluster centroids as prototypes , and trains the network by pulling an image embedding closer to its assigned prototypes . Different from previous methods , our method performs contrastive learning in the principal subspace of the high-dimensional feature space , by training a linear autoencoder . Furthermore , our supervised contrastive loss improves PCL ( Li et al. , 2020b ) with Mixup ( Zhang et al. , 2018 ) . Different from the original Mixup where learning happens at the classification layer , our learning takes places in the low-dimensional subspace . 3 METHOD . Given a noisy training dataset D = { ( xi , yi ) } ni=1 , where xi is an image and yi 2 { 1 , ... , C } is its class label . We aim to train a network that is robust to the noise in training data ( i.e . label noise , OOD input , input corruption ) and achieves high accuracy on a clean test set . The proposed network consists of three components : ( 1 ) a deep encoder ( a convolutional neural network ) that encodes an image xi to a high-dimensional feature vi ; ( 2 ) a classifier ( a fully-connected layer followed by softmax ) that receives vi as input and outputs class predictions ; ( 3 ) a linear autoencoder that projects vi into a low-dimensional embedding zi 2 Rd . We show an illustration of our method in Figure 2 , and a pseudo-code in appendix B . Next , we delineate its details . 3.1 CONTRASTIVE LEARNING IN ROBUST LOW-DIMENSIONAL SUBSPACE . Let zi = Wevi be the linear projection from high-dimensional features to low-dimensional embeddings , and ẑi = zi/ kzik2 be the normalized embeddings . We aim to learn robust embeddings with two contrastive losses : unsupervised consistency loss and weakly-supervised mixup prototypical loss . Unsupervised consistency contrastive loss . Following the NT-Xent ( Chen et al. , 2020 ) loss for selfsupervised representation learning , our consistency contrastive loss enforces images with semanticpreserving perturbations to have similar embeddings . Specifically , given a minibatch of b images , we apply weak-augmentation and strong-augmentation to each image , and obtain 2b inputs { xi } 2bi=1 . Weak augmentation is a standard flip-and-shift augmentation strategy , while strong augmentation consists of color and brightness changes with details given in Section 4.1 . We project the inputs into the low-dimensional space to obtain their normalized embeddings { ẑi } 2bi=1 . Let i 2 { 1 , ... , b } be the index of a weakly-augmented input , and j ( i ) be the index of the strong- augmented input from the same source image , the consistency contrastive loss is defined as : Lcc = bX i=1 log exp ( ẑi · ẑj ( i ) /⌧ ) P2b k=1 i 6=k exp ( ẑi · ẑk/⌧ ) , ( 1 ) where ⌧ is a scalar temperature parameter . The consistency contrastive loss maximizes the inner product between the pair of positive embeddings ẑi and ẑj ( i ) , while minimizing the inner product between 2 ( b 1 ) pairs of negative embeddings . By mapping different views ( augmentations ) of the same image to neighboring embeddings , the consistency contrastive loss encourages the network to learn discriminative representation that is robust to low-level image corruption . Weakly-supervised mixup prototypical contrastive loss . Our second contrastive loss injects structural knowledge of classes into the embedding space . Let Ic denote indices for the subset of images in D labeled with class c , we calculate the class prototype as the normalized mean embedding : zc = 1 |Ic| X i2Ic ẑi , ẑ c = zc kzck2 , ( 2 ) where ẑi is the embedding of a center-cropped image , and the class prototypes are calculated at the beginning of each epoch . The prototypical contrastive loss enforces an image embedding ẑi to be more similar to its corresponding class prototype ẑyi , in contrast to other class prototypes : Lpc ( ẑi , yi ) = log exp ( ẑi · ẑyi/⌧ ) PC c=1 exp ( ẑi · ẑc/⌧ ) . ( 3 ) Since the label yi is noisy , we would like to regularize the encoder from memorizing training labels . Mixup ( Zhang et al. , 2018 ) has been shown to be an effective method against label noise ( Arazo et al. , 2019 ; Li et al. , 2020a ) . Inspired by it , we create virtual training samples by linearly interpolating a sample ( indexed by i ) with another sample ( indexed by m ( i ) ) randomly chosen from the same minibatch : xmi = xi + ( 1 ) xm ( i ) , ( 4 ) where ⇠ Beta ( ↵ , ↵ ) . Let ẑmi be the normalized embedding for xmi , the mixup version of the prototypical contrastive loss is defined as a weighted combination of the two Lpc w.r.t class yi and ym ( i ) . It enforces the embedding for the interpolated input to have the same linear relationship w.r.t . the class prototypes . Lpc mix = 2bX i=1 Lpc ( ẑmi , yi ) + ( 1 ) Lpc ( ẑmi , ym ( i ) ) . ( 5 ) Reconstruction loss . We also train a linear decoder Wd to reconstruct the high-dimensional feature vi based on zi . The reconstruction loss is defined as : Lrecon = 2bX i=1 kvi Wdzik22 . ( 6 ) There are several benefits for training the autoencoder . First , with an optimal linear autoencoder , We will project vi into its low-dimensional principal subspace and can be understood as applying PCA ( Baldi & Hornik , 1989 ) . Thus the low-dimensional representation zi is intrinsically robust to input noise . Second , minimizing the reconstruction error is maximizing a lower bound of the mutual information between vi and zi ( Vincent et al. , 2010 ) . Therefore , knowledge learned from the proposed contrastive losses can be maximally preserved in the high-dimensional representation , which helps regularize the classifier . Classification loss . Given the softmax output from the classifier , p ( y ; xi ) , we define the classification loss as the cross-entropy loss . Note that it is only applied to the weakly-augmented inputs . Lce = bX i=1 log p ( yi ; xi ) . ( 7 ) The overall training objective is to minimize a weighted sum of all losses : L = Lce + ! ccLcc + ! pcLpc mix + ! reconLrecon ( 8 ) For all experiments , we fix ! cc = 1 , ! recon = 1 , and change ! pc only across datasets . | The paper proposes noise-robust contrastive learning to combat label noise, out-of-distribution input and input corruption simultaneously. In particular, this paper embeds images into low-dimensional representations by training an autoencoder, and regularizes the geometric structure of the representations by contrastive learning. Furthermore, this paper introduces a new noise cleaning method based on the structure of the representations. Training samples with confident pseudo-labels are selected for supervised learning to clean both label noise and out-of-distribution noise. The effectiveness of the proposed method has been evaluated on multiple simulated and real-world noisy datasets. | SP:9699e0e908af5e3404df56498afe3d6c7333f431 |
Rethinking Soft Labels for Knowledge Distillation: A Bias–Variance Tradeoff Perspective | 1 INTRODUCTION . For deep neural networks ( Goodfellow et al. , 2016 ) , knowledge distillation ( KD ) ( Ba & Caruana , 2014 ; Hinton et al. , 2015 ) refers to the technique that uses well-trained networks to guide the training of another network . Typically , the well-trained network is named as the teacher network while the network to be trained is named as the student network . For distillation , the predictions from the teacher network are leveraged and referred to as the soft labels ( Balan et al. , 2015 ; Müller et al. , 2019 ) . Soft labels generated by the teacher network have been proven effective in large-scale empirical studies ( Liang et al. , 2019 ; Tian et al. , 2020 ; Zagoruyko & Komodakis , 2017 ; Romero et al. , 2015 ) as well as recent theoretical studies ( Phuong & Lampert , 2019 ) . However , the reason why soft labels are beneficial to the student network is still not well explained . Giving a clear theoretical explanation is challenging : The optimization details of a deep network with the common one-hot labels are still not well-studied ( Nagarajan & Kolter , 2019 ) , not to mention training with the soft labels . Nevertheless , two recent studies ( Müller et al. , 2019 ; Yuan et al. , 2020 ) shed light on the intuitions about how the soft labels work . Specifically , label smoothing , which is a special case of soft labels based training , is shown to regularize the activations of the penultimate layer to the network ( Müller et al. , 2019 ) . The regularization property of soft labels is further explored in ( Yuan et al. , 2020 ) . They hypothesize that in KD , one main reason why the soft labels work is the regularization introduced by soft labels . Based on the assumption , the authors ∗These authors contributed equally to this work . †Work done while the author was a research intern at Horizon Robotics . design a teacher-free distillation method by turning the predictions of the student network into soft labels . Considering that soft labels are targets for distillation , the evidence of the regularization brought by soft labels drives us to rethink soft labels for KD : Soft labels are both supervisory signals and regularizers . Meanwhile , it is known that there is a tradeoff between fitting the data and imposing regularizations , i.e. , the bias-variance dilemma ( Kohavi & Wolpert , 1996 ; Bishop , 2006 ) , but it is unclear how bias and variance change for distillation with soft labels . Since the bias-variance tradeoff is an important issue in statistical learning , we investigate whether the bias-variance tradeoff exists for soft labels and how the tradeoff affects distillation performance . We first compare the bias and variance decomposition of direct training with that of distillation with soft labels , noticing that distillation results in a larger bias error and a smaller variance . Then , we rewrite distillation loss into the form of a regularization loss adding the direct training loss . Through inspecting the gradients of the two terms during training , we notice that for soft labels , the biasvariance tradeoff varies sample-wisely . Moreover , by looking into a conclusion from ( Müller et al. , 2019 ) , we observe that under the same temperature setting , the distillation performance is negatively associated with the number of some certain samples . These samples lead to bias increase and variance decrease and we name them as regularization samples . To investigate how regularization samples affect distillation , we first examine if we can design ad hoc filters for soft labels to avoid training with regularization samples . But completely filtering out regularization samples also deteriorates distillation performance , leading us to speculate that regularization samples are not well handled by standard KD . In the light of these findings , we propose weighted soft labels for distillation to handle the sample-wise bias-variance tradeoff , by adaptively assigning a lower weight to regularization samples and a larger weight to the others . To sum up , our contributions are : • For knowledge distillation , we analyze how the soft labels work from a perspective of biasvariance tradeoff . • We discover that the bias-variance tradeoff varies sample-wisely . Also , we discover that if we fix the distillation temperature , the number of regularization samples is negatively associated with the distillation performance . • We design straightforward schemes to alleviate negative impacts from regularization sam- ples and then propose the novel weighted soft labels for distillation . Experiments on large scale datasets validate the effectiveness of the proposed weighted soft labels . 2 RELATED WORKS . Knowledge distillation . Hinton et al . ( 2015 ) proposed to distill outputs from large and cumbersome models into smaller and faster models , which is named as knowledge distillation . The outputs for large networks are averaged and formulated as soft labels . Also , other kinds of soft labels have been widely used for training deep neural networks ( Szegedy et al. , 2016 ; Pereyra et al. , 2017 ) . Treating soft labels as regularizers were pointed out in ( Hinton et al. , 2015 ) since a lot of helpful information can be carried in soft labels . More recently , Müller et al . ( 2019 ) showed the adverse effect of label smoothing upon distillation . It is a thought-provoking discovery for the reason that both label smoothing and distillation are exploiting the regularization property behind soft labels . Yuan et al . ( 2020 ) further investigated the regularization property of soft labels and then proposed a teacher free distillation scheme . Distillation loss . One of our main contributions is that we improve the distillation loss . For adaptively adjusting the distillation loss , Tang et al . ( 2019 ) pays attention to hard-to-learn and hard-tomimic samples , and the latter is weighted based on the prediction gap between teacher and student . However , it does not consider that the teacher may give an incorrect guide to the student , under which the prediction gap is still large and such a method may lead to the performance being hurt . Saputra et al . ( 2019 ) transfers teacher ’ s guidance only on the samples where the performance of the teacher surpasses the student , while Wen et al . ( 2019 ) deals with the incorrect guidance by probability shifting strategy . Our approach is different from the above methods , in terms of motivations as well as the proposed solutions . Bias-variance tradeoff . Bias-variance tradeoff is a well-studied topic in machine learning ( Kohavi & Wolpert , 1996 ; Domingos , 2000 ; Valentini & Dietterich , 2004 ; Bishop , 2006 ) and for neural networks ( Geman et al. , 1992 ; Neal et al. , 2018 ; Belkin et al. , 2019 ; Yang et al. , 2020 ) . Existing methods are mainly concerned with the variance brought by the choice of network models . Our perspective is different from the previous methods since we focus on the behavior of samples during training . In our work , based on the results from Heskes ( 1998 ) , we present the decomposition of distillation loss , which is defined by Kullback-Leibler divergence . Besides , our main contribution is not to study how to theoretically analyze the tradeoff , but how to adaptively tune the sample-wise tradeoff during training . 3 BIAS-VARIANCE TRADEOFF FOR SOFT LABELS One-hot Label Soft LabelLabel set B Label set A Bias Variance Figure 1 : Bias and variance . Soft labels play the role of supervisory signals and regularizations at the same time , which inspires us to rethink soft labels from the perspective of the bias-variance tradeoff . We begin our analysis with some mathematical descriptions . For a sample x labeled as i-th class , let the ground-truth label be a one-hot vector y where yi = 1 and other entries are 0 . Then for x and softmax output temperature τ , the soft label predicted by the teacher network is denoted as ŷtτ and the output from the student is denoted as ŷsτ . The soft label ŷtτ is then used for training the student by the distillation loss , i.e . Lkd = −τ2 ∑ k ŷ t k , τ log ŷ s k , τ , where ŷsk , τ , ŷ t k , τ means the k-th element of the student ’ s output ŷ s τ and the teacher ’ s output ŷ t τ , respectively . With the above notations , the cross-entropy loss for training with one-hot labels is Lce = −yk log ŷsk,1 . We now present the bias-variance decomposition for Lce and Lkd , based on the definition and notations from Heskes ( 1998 ) . First , we denote the train dataset as D and the output distribution on a sample x of the network trained without distillation as ŷce = fce ( x ; D ) . For the network trained with distillation , the model also depends on the teacher network , so we define the output on x as ŷkd = fkd ( x ; D , T ) , where T is the selected teacher network . Then , let the averaged output of ŷkd and ŷce be ȳkd and ȳce , that is , ȳce = 1 Zce exp ( ED [ log ŷce ] ) , ȳkd = 1 Zkd exp ( ED , T [ log ŷkd ] ) , ( 1 ) where Zce , Zkd are two normalization constant . Then according to Heskes ( 1998 ) , we have the following decomposition for the expected error on the sample x and y = t ( x ) is the ground truth label : errorce = Ex , D [ −y log ŷce ] = Ex , D [ −y logy + y log y ȳce + y log ȳce ŷce ] = Ex [ −y logy ] + Ex [ y log y ȳce ] + ED [ Ex [ y log ȳce ŷce ] ] = Ex [ −y logy ] +DKL ( y , ȳce ) + ED [ DKL ( ȳce , ŷce ) ] = intrinsic noise + bias + variance , ( 2 ) where DKL is the Kullback-Leibler divergence . The derivation of the variance term is based on the facts that log ȳceED [ log ŷce ] is a constant and Ex [ y ] = Ex [ ȳce ] = 1 . Detailed derivations can be found from Eq . ( 4 ) in Heskes ( 1998 ) . Next , we analyze the bias-variance decomposition of Lkd . As mentioned above , when training with soft labels , extra randomness is introduced for the selection of a teacher network . In Fig . 1 , we illustrate the corresponding bias and variance for the selection process of a set of soft labels , which are generated by a teacher network . In this case , a high variance model indicates the model ( grey point ) is closer to the one-hot trained model ( black point ) , while a low variance model indicates that the model is closer to other possible models trained with soft labels ( red points ) . Although for KD there are more sources introducing randomness , the overall variance brought by Lkd is not necessarily higher than Lce . In fact , existing empirical results strongly suggest that the overall variance is smaller with KD . For example , students trained with soft labels are better calibrated than one-hot baselines ( Müller et al. , 2019 ) and KD makes the predictions of students more consistent when facing adversarial noise ( Papernot et al. , 2016 ) . Here , we present these empirical evidence as an assumption : Assumption 1 The variance brought by KD is smaller than direct training , that is , ED , T [ DKL ( ȳkd , ŷkd ) ] 6 ED [ DKL ( ȳce , ŷce ) ] . Similar to Eq . ( 2 ) , we write the decomposition for Lkd as errorkd = Ex [ −y logy ] +DKL ( y , ȳce ) + Ex [ y log ( ȳce ȳkd ) ] + ED , T [ DKL ( ȳkd , ŷkd ) ] . ( 3 ) An observation here is that ȳce converges to one-hot labels while ȳkd converges to soft labels , so ȳce is closer to the one-hot ground-truth distribution y than ȳkd , i.e. , Ex [ y log ( ȳce ȳkd ) ] > 0 . If we rewrite Lkd as Lkd = Lkd − Lce + Lce , then Lkd − Lce causes that the bias increases by Ex [ y log ( ȳce ȳkd ) ] and the variance decreases by ED [ DKL ( ȳce , ŷce ) ] − ED , T [ DKL ( ȳkd , ŷkd ) ] . From the above analysis , we separate Lkd into two terms , and Lkd−Lce leads to variance reduction , and Lce leads to bias reduction . In the following sections , we first analyze how Lkd − Lce links to the bias-variance tradeoff during training . Then we analyze the changes in the relative importance between bias reduction and variance reduction during training with soft labels . | In this paper, the authors studied the soft labels for knowledge distillation from a bias-variance tradeoff perspective. Specifically, the authors first provide a mathematically descriptions of the bias-variance decomposition in knowledge distillation. Then, based on the theoretically analysis and experiments, the authors proposed an novel weighted soft labels to help the network adaptively handle the sample-wise bias-variance tradeoff. | SP:7d26e683800476ec3617f4bdb759f690b3b7daed |
Rethinking Soft Labels for Knowledge Distillation: A Bias–Variance Tradeoff Perspective | 1 INTRODUCTION . For deep neural networks ( Goodfellow et al. , 2016 ) , knowledge distillation ( KD ) ( Ba & Caruana , 2014 ; Hinton et al. , 2015 ) refers to the technique that uses well-trained networks to guide the training of another network . Typically , the well-trained network is named as the teacher network while the network to be trained is named as the student network . For distillation , the predictions from the teacher network are leveraged and referred to as the soft labels ( Balan et al. , 2015 ; Müller et al. , 2019 ) . Soft labels generated by the teacher network have been proven effective in large-scale empirical studies ( Liang et al. , 2019 ; Tian et al. , 2020 ; Zagoruyko & Komodakis , 2017 ; Romero et al. , 2015 ) as well as recent theoretical studies ( Phuong & Lampert , 2019 ) . However , the reason why soft labels are beneficial to the student network is still not well explained . Giving a clear theoretical explanation is challenging : The optimization details of a deep network with the common one-hot labels are still not well-studied ( Nagarajan & Kolter , 2019 ) , not to mention training with the soft labels . Nevertheless , two recent studies ( Müller et al. , 2019 ; Yuan et al. , 2020 ) shed light on the intuitions about how the soft labels work . Specifically , label smoothing , which is a special case of soft labels based training , is shown to regularize the activations of the penultimate layer to the network ( Müller et al. , 2019 ) . The regularization property of soft labels is further explored in ( Yuan et al. , 2020 ) . They hypothesize that in KD , one main reason why the soft labels work is the regularization introduced by soft labels . Based on the assumption , the authors ∗These authors contributed equally to this work . †Work done while the author was a research intern at Horizon Robotics . design a teacher-free distillation method by turning the predictions of the student network into soft labels . Considering that soft labels are targets for distillation , the evidence of the regularization brought by soft labels drives us to rethink soft labels for KD : Soft labels are both supervisory signals and regularizers . Meanwhile , it is known that there is a tradeoff between fitting the data and imposing regularizations , i.e. , the bias-variance dilemma ( Kohavi & Wolpert , 1996 ; Bishop , 2006 ) , but it is unclear how bias and variance change for distillation with soft labels . Since the bias-variance tradeoff is an important issue in statistical learning , we investigate whether the bias-variance tradeoff exists for soft labels and how the tradeoff affects distillation performance . We first compare the bias and variance decomposition of direct training with that of distillation with soft labels , noticing that distillation results in a larger bias error and a smaller variance . Then , we rewrite distillation loss into the form of a regularization loss adding the direct training loss . Through inspecting the gradients of the two terms during training , we notice that for soft labels , the biasvariance tradeoff varies sample-wisely . Moreover , by looking into a conclusion from ( Müller et al. , 2019 ) , we observe that under the same temperature setting , the distillation performance is negatively associated with the number of some certain samples . These samples lead to bias increase and variance decrease and we name them as regularization samples . To investigate how regularization samples affect distillation , we first examine if we can design ad hoc filters for soft labels to avoid training with regularization samples . But completely filtering out regularization samples also deteriorates distillation performance , leading us to speculate that regularization samples are not well handled by standard KD . In the light of these findings , we propose weighted soft labels for distillation to handle the sample-wise bias-variance tradeoff , by adaptively assigning a lower weight to regularization samples and a larger weight to the others . To sum up , our contributions are : • For knowledge distillation , we analyze how the soft labels work from a perspective of biasvariance tradeoff . • We discover that the bias-variance tradeoff varies sample-wisely . Also , we discover that if we fix the distillation temperature , the number of regularization samples is negatively associated with the distillation performance . • We design straightforward schemes to alleviate negative impacts from regularization sam- ples and then propose the novel weighted soft labels for distillation . Experiments on large scale datasets validate the effectiveness of the proposed weighted soft labels . 2 RELATED WORKS . Knowledge distillation . Hinton et al . ( 2015 ) proposed to distill outputs from large and cumbersome models into smaller and faster models , which is named as knowledge distillation . The outputs for large networks are averaged and formulated as soft labels . Also , other kinds of soft labels have been widely used for training deep neural networks ( Szegedy et al. , 2016 ; Pereyra et al. , 2017 ) . Treating soft labels as regularizers were pointed out in ( Hinton et al. , 2015 ) since a lot of helpful information can be carried in soft labels . More recently , Müller et al . ( 2019 ) showed the adverse effect of label smoothing upon distillation . It is a thought-provoking discovery for the reason that both label smoothing and distillation are exploiting the regularization property behind soft labels . Yuan et al . ( 2020 ) further investigated the regularization property of soft labels and then proposed a teacher free distillation scheme . Distillation loss . One of our main contributions is that we improve the distillation loss . For adaptively adjusting the distillation loss , Tang et al . ( 2019 ) pays attention to hard-to-learn and hard-tomimic samples , and the latter is weighted based on the prediction gap between teacher and student . However , it does not consider that the teacher may give an incorrect guide to the student , under which the prediction gap is still large and such a method may lead to the performance being hurt . Saputra et al . ( 2019 ) transfers teacher ’ s guidance only on the samples where the performance of the teacher surpasses the student , while Wen et al . ( 2019 ) deals with the incorrect guidance by probability shifting strategy . Our approach is different from the above methods , in terms of motivations as well as the proposed solutions . Bias-variance tradeoff . Bias-variance tradeoff is a well-studied topic in machine learning ( Kohavi & Wolpert , 1996 ; Domingos , 2000 ; Valentini & Dietterich , 2004 ; Bishop , 2006 ) and for neural networks ( Geman et al. , 1992 ; Neal et al. , 2018 ; Belkin et al. , 2019 ; Yang et al. , 2020 ) . Existing methods are mainly concerned with the variance brought by the choice of network models . Our perspective is different from the previous methods since we focus on the behavior of samples during training . In our work , based on the results from Heskes ( 1998 ) , we present the decomposition of distillation loss , which is defined by Kullback-Leibler divergence . Besides , our main contribution is not to study how to theoretically analyze the tradeoff , but how to adaptively tune the sample-wise tradeoff during training . 3 BIAS-VARIANCE TRADEOFF FOR SOFT LABELS One-hot Label Soft LabelLabel set B Label set A Bias Variance Figure 1 : Bias and variance . Soft labels play the role of supervisory signals and regularizations at the same time , which inspires us to rethink soft labels from the perspective of the bias-variance tradeoff . We begin our analysis with some mathematical descriptions . For a sample x labeled as i-th class , let the ground-truth label be a one-hot vector y where yi = 1 and other entries are 0 . Then for x and softmax output temperature τ , the soft label predicted by the teacher network is denoted as ŷtτ and the output from the student is denoted as ŷsτ . The soft label ŷtτ is then used for training the student by the distillation loss , i.e . Lkd = −τ2 ∑ k ŷ t k , τ log ŷ s k , τ , where ŷsk , τ , ŷ t k , τ means the k-th element of the student ’ s output ŷ s τ and the teacher ’ s output ŷ t τ , respectively . With the above notations , the cross-entropy loss for training with one-hot labels is Lce = −yk log ŷsk,1 . We now present the bias-variance decomposition for Lce and Lkd , based on the definition and notations from Heskes ( 1998 ) . First , we denote the train dataset as D and the output distribution on a sample x of the network trained without distillation as ŷce = fce ( x ; D ) . For the network trained with distillation , the model also depends on the teacher network , so we define the output on x as ŷkd = fkd ( x ; D , T ) , where T is the selected teacher network . Then , let the averaged output of ŷkd and ŷce be ȳkd and ȳce , that is , ȳce = 1 Zce exp ( ED [ log ŷce ] ) , ȳkd = 1 Zkd exp ( ED , T [ log ŷkd ] ) , ( 1 ) where Zce , Zkd are two normalization constant . Then according to Heskes ( 1998 ) , we have the following decomposition for the expected error on the sample x and y = t ( x ) is the ground truth label : errorce = Ex , D [ −y log ŷce ] = Ex , D [ −y logy + y log y ȳce + y log ȳce ŷce ] = Ex [ −y logy ] + Ex [ y log y ȳce ] + ED [ Ex [ y log ȳce ŷce ] ] = Ex [ −y logy ] +DKL ( y , ȳce ) + ED [ DKL ( ȳce , ŷce ) ] = intrinsic noise + bias + variance , ( 2 ) where DKL is the Kullback-Leibler divergence . The derivation of the variance term is based on the facts that log ȳceED [ log ŷce ] is a constant and Ex [ y ] = Ex [ ȳce ] = 1 . Detailed derivations can be found from Eq . ( 4 ) in Heskes ( 1998 ) . Next , we analyze the bias-variance decomposition of Lkd . As mentioned above , when training with soft labels , extra randomness is introduced for the selection of a teacher network . In Fig . 1 , we illustrate the corresponding bias and variance for the selection process of a set of soft labels , which are generated by a teacher network . In this case , a high variance model indicates the model ( grey point ) is closer to the one-hot trained model ( black point ) , while a low variance model indicates that the model is closer to other possible models trained with soft labels ( red points ) . Although for KD there are more sources introducing randomness , the overall variance brought by Lkd is not necessarily higher than Lce . In fact , existing empirical results strongly suggest that the overall variance is smaller with KD . For example , students trained with soft labels are better calibrated than one-hot baselines ( Müller et al. , 2019 ) and KD makes the predictions of students more consistent when facing adversarial noise ( Papernot et al. , 2016 ) . Here , we present these empirical evidence as an assumption : Assumption 1 The variance brought by KD is smaller than direct training , that is , ED , T [ DKL ( ȳkd , ŷkd ) ] 6 ED [ DKL ( ȳce , ŷce ) ] . Similar to Eq . ( 2 ) , we write the decomposition for Lkd as errorkd = Ex [ −y logy ] +DKL ( y , ȳce ) + Ex [ y log ( ȳce ȳkd ) ] + ED , T [ DKL ( ȳkd , ŷkd ) ] . ( 3 ) An observation here is that ȳce converges to one-hot labels while ȳkd converges to soft labels , so ȳce is closer to the one-hot ground-truth distribution y than ȳkd , i.e. , Ex [ y log ( ȳce ȳkd ) ] > 0 . If we rewrite Lkd as Lkd = Lkd − Lce + Lce , then Lkd − Lce causes that the bias increases by Ex [ y log ( ȳce ȳkd ) ] and the variance decreases by ED [ DKL ( ȳce , ŷce ) ] − ED , T [ DKL ( ȳkd , ŷkd ) ] . From the above analysis , we separate Lkd into two terms , and Lkd−Lce leads to variance reduction , and Lce leads to bias reduction . In the following sections , we first analyze how Lkd − Lce links to the bias-variance tradeoff during training . Then we analyze the changes in the relative importance between bias reduction and variance reduction during training with soft labels . | The paper shows a new perspective of tackling the knowledge distillation problem. The author(s) have decomposed the expected student's training error into the bias, variance, and irreducible noise parts. This decomposition is further rewritten as two parts: one for bias reduction and another for variance reduction. The motivation is clearly explained and the experimental results show that this new approach can improve the model training performance of the student on both CIFAR100 and Imagenet. | SP:7d26e683800476ec3617f4bdb759f690b3b7daed |
Neural Architecture Search without Training | 1 INTRODUCTION . The success of deep learning in computer vision is in no small part due to the insight and engineering efforts of human experts , allowing for the creation of powerful architectures for widespread adoption ( Krizhevsky et al. , 2012 ; Simonyan & Zisserman , 2015 ; He et al. , 2016 ; Szegedy et al. , 2016 ; Huang et al. , 2017 ) . However , this manual design is costly , and becomes increasingly more difficult as networks get larger and more complicated . Because of these challenges , the neural network community has seen a shift from designing architectures to designing algorithms that search for candidate architectures ( Elsken et al. , 2019 ; Wistuba et al. , 2019 ) . These Neural Architecture Search ( NAS ) algorithms are capable of automating the discovery of effective architectures ( Zoph & Le , 2017 ; Zoph et al. , 2018 ; Pham et al. , 2018 ; Tan et al. , 2019 ; Liu et al. , 2019 ; Real et al. , 2019 ) . NAS algorithms are broadly based on the seminal work of Zoph & Le ( 2017 ) . A controller network generates an architecture proposal , which is then trained to provide a signal to the controller through REINFORCE ( Williams , 1992 ) , which then produces a new proposal , and so on . Training a network for every controller update is extremely expensive ; utilising 800 GPUs for 28 days in Zoph & Le ( 2017 ) . Subsequent work has sought to ameliorate this by ( i ) learning stackable cells instead of whole networks ( Zoph et al. , 2018 ) and ( ii ) incorporating weight sharing ; allowing candidate networks to share weights to allow for joint training ( Pham et al. , 2018 ) . These contributions have accelerated the speed of NAS algorithms e.g . to half a day on a single GPU in Pham et al . ( 2018 ) . For some practitioners , NAS is still too slow ; being able to perform NAS quickly ( i.e . in seconds ) would be immensely useful in the hardware-aware setting where a separate search is typically required for each device and task ( Wu et al. , 2019 ; Tan et al. , 2019 ) . Moreover , recent works have scrutinised NAS with weight sharing ( Li & Talwalkar , 2019 ; Yu et al. , 2020 ) ; there is continued debate as to whether it is clearly better than simple random search . The issues of cost and time , and the risks of weight sharing could be avoided entirely if a NAS algorithm did not require any network training . In this paper , we show that this can be achieved . We explore two recently released NAS benchmarks , NAS-Bench-101 ( Ying et al. , 2019 ) , and NASBench-201 ( Dong & Yang , 2020 ) and examine the relationship between the linear maps induced by an untrained network for a minibatch of augmented versions of a single image ( Section 3 ) . These maps are easily computed using the Jacobian . The correlations between these maps ( which we denote by ΣJ ) are distinctive for networks that perform well when trained on both NAS-Benches ; this is immediately apparent from visualisation alone ( Figure 1 ) . We devise a score based on ΣJ and perform an ablation study to demonstrate its robustness to inputs and network initialisation . We incorporate our score into a simple search algorithm that doesn ’ t require training ( Section 4 ) . This allows us to perform architecture search quickly , for example , on CIFAR-10 ( Krizhevsky , 2009 ) we are able to search for a network that achieve 93.36 % accuracy in 29 seconds within the NAS-Bench-201 search space ; several orders of magnitude faster than traditional NAS methods for a modest change in final accuracy ( e.g . REINFORCE finds a 93.85 % net in 12000 seconds ) . Finally , we show that we can combine our approach with regularised evolutionary search ( REA , Pham et al. , 2018 ) to produce a new NAS algorithm , Assisted-REA ( AREA ) that outperforms its precedessor , attaining 94.16 % accuracy on NAS-Bench-101 in 12,000 seconds . Code for reproducing our experiments is available in the supplementary material . We believe this work is an important proof-of-concept for NAS without training , and shows that the large resource costs associated with NAS can be avoided . The benefit is two-fold , as we also show that we can integrate our approach into existing NAS techniques for scenarios where obtaining as high an accuracy as possible is of the essence . 2 BACKGROUND . Designing a neural architecture by hand is a challenging and time-consuming task . It is extremely difficult to intuit where to place connections , or which operations to use . This has prompted an abundance of research into neural architecture search ( NAS ) ; the automation of the network design process . In the pioneering work of Zoph & Le ( 2017 ) , the authors use an RNN controller to generate descriptions of candidate networks . Candidate networks are trained , and used to update the controller using reinforcement learning to improve the quality of the candidates it generates . This algorithm is very expensive : searching for an architecture to classify CIFAR-10 required 800 GPUs for 28 days . It is also inflexible ; the final network obtained is fixed and can not be scaled e.g . for use on mobile devices or for other datasets . The subsequent work of Zoph et al . ( 2018 ) deals with these limitations . Inspired by the modular nature of successful hand-designed networks ( Simonyan & Zisserman , 2015 ; He et al. , 2016 ; Huang et al. , 2017 ) , they propose searching over neural building blocks , instead of over whole architectures . These building blocks , or cells , form part of a fixed overall network structure . Specifically , the authors learn a standard cell , and a reduced cell ( incorporating pooling ) for CIFAR-10 classification . These are then used as the building blocks of a larger network for ImageNet ( Russakovsky et al. , 2015 ) classification . While more flexible—the number of cells can be adjusted according to budget— and cheaper , owing to a smaller search space , this technique still utilises 500 GPUs across 4 days . ENAS ( Pham et al. , 2018 ) reduces the computational cost of searching by allowing multiple candidate architectures to share weights . This facilitates the simultaneous training of candidates , reducing the search time on CIFAR-10 to half a day on a single GPU . Weight sharing has seen widespread adoption in a host of NAS algorithms ( Liu et al. , 2019 ; Luo et al. , 2018 ; Cai et al. , 2019 ; Xie et al. , 2019 ; Brock et al. , 2018 ) . However , there is evidence that it inhibits the search for optimal architectures ( Yu et al. , 2020 ) . Moreover , random search proves to be an extremely effective NAS baseline ( Yu et al. , 2020 ; Li & Talwalkar , 2019 ) . This exposes another problem : the search space is still vast—there are 1.6× 1029 possible architectures in Pham et al . ( 2018 ) for example—that it is impossible to isolate the best networks and demonstrate that NAS algorithms find them . An orthogonal direction for identifying good architectures is the estimation of accuracy prior to training ( Deng et al. , 2017 ; Istrate et al. , 2019 ) , although these differ from this work in that they rely on training a predictive model , rather than investigating more fundamental architectural properties . 2.1 NAS BENCHMARKS . A major barrier to evaluating the effectiveness of a NAS algorithm is that the search space ( the set of all possible networks ) is too large for exhaustive evaluation . Moreover , popular search spaces have been shown to be over-engineered , exhibiting little variety in their trained networks ( Yang et al. , 2020 ) . This has led to the creation of several benchmarks ( Ying et al. , 2019 ; Zela et al. , 2020 ; Dong & Yang , 2020 ) that consist of tractable NAS search spaces , and metadata for the training of networks within that search space . Concretely , this means that it is now possible to determine whether an algorithm is able to search for a good network . In this work we utilise NAS-Bench-101 ( Ying et al. , 2019 ) and NAS-Bench-201 ( Dong & Yang , 2020 ) to evaluate the effectiveness of our approach . NAS-Bench-101 consists of 423,624 neural networks that have been trained exhaustively , with three different initialisations , on the CIFAR-10 dataset for 108 epochs . NAS-Bench-201 consists of 15,625 networks trained multiple times on CIFAR-10 , CIFAR-100 , and ImageNet-16-120 ( Chrabaszcz et al. , 2017 ) . Both benchmarks are described in detail in Appendix B . 3 SCORING NETWORKS AT INITIALISATION . Our goal is to devise a means to score a network architecture at initialisation in a way that is indicative of its final trained accuracy . This can either replace the expensive inner-loop training step in NAS , or better direct exploration in existing NAS algorithms . Given a neural network with rectified linear units , we can , at each unit in each layer , identify a binary indicator as to whether the unit is inactive ( the value is negative and hence is multiplied by zero ) or active ( in which case its value is multiplied by one ) . Fixing these indicator variables , it is well known that the network is now locally defined by a linear operator ( Hanin & Rolnick , 2019 ) ; this operator is obtained by multiplying the linear maps at each layer interspersed with the binary rectification units . Consider a minibatch of data X = { xi } Ni=1 . Let us denote the linear map for input xi ∈ RD by column vector wi , which maps the input through the network f ( xi ) to a final choice of scalar representation zi ∈ R1 . This linear map can be easily computed using the Jacobian wi = ∂f ( xi ) ∂x . How differently a network acts at each data point can be summarised by comparing the corresponding local linear operators . Correlated operators for nearby points ( such as small perturbations from a training point ) relate to a potential difficulty in handling the two points differently during learning . The Frobenius inner product Tr [ ( wi − µi ) T ( wj − µj ) ] provides a natural basis for defining how two linear operators corresponding to data points xi and xj covary ( µ are mean Jacobian elements , and usually close to zero ) . We can examine the correspondences for the whole minibatch by computing J = ( ∂f ( x1 ) ∂x ∂f ( x2 ) ∂x · · · ∂f ( xN ) ∂x ) > ( 1 ) and observing the covariance matrix CJ = ( J −MJ ) ( J −MJ ) T where MJ is the matrix with entries ( MJ ) i , t = 1 D ∑D d=1 Ji , d ∀t , where d , t index over the D elements of each input ( i.e . channels × pixels ) . It is more salient to focus on the the correlation matrix ΣJ as the appropriate scaling in input space around each point is arbitrary . The ( i , j ) th element of ΣJ is given by ( ΣJ ) i , j = ( CJ ) i , j√ ( CJ ) i , i ( CJ ) j , j . We want an untrained neural network to be sufficiently flexible to model a complex target function . However , we also want a network to be invariant to small perturbations . These two requirements are antagonistic . For an untrained neural network to be sufficiently flexible it would need to be able to distinguish the local linear operators associated with each data point : if two are the same then the two points are coupled . To be invariant to small perturbations the same local linear operators would need to be weakly coupled . Ideally a network would have low correlated local maps associated with each data point to be able to model each local region . We empirically demonstrate this by computing ΣJ for a random subset of NAS-Bench101 ( Ying et al. , 2019 ) and NAS-Bench-201 ( Dong & Yang , 2020 ) networks at initialisation for a minibatch of a single CIFAR-10 image replicated 256 times with a different cutout ( DeVries & Taylor , 2017 ) perturbation applied to each replicant . We use torchvision.transforms.RandomErasing ( p=0.9 , scale= ( 0.02 , 0.04 ) ) in our experiments . To form J we flatten the Jacobian for each input ( so D = 3× 32× 32 = 3072 ) , and adjust the final classifier layer to output a scalar . The plots of the histograms of ΣJ for different networks , categorised according to the validation accuracy when trained is given in Figure 1 for a sample of networks in both benchmarks . Further plots are given in Appendix A . The histograms are very distinct : high performing networks in both benchmarks have their mass tightly around zero with a small positive skew . We can therefore use these histograms to predict the final performance of untrained networks , in place of the expensive training step in NAS . Specifically , we score networks by counting the entries in ΣJ that lie between 0 and an small upper bound β . A ΣJ where inputs are marginally positively-correlated will have a higher score . Our score is given by S = ∑ i , j 1 ( 0 < ( ΣJ ) i , j < β ) ( 2 ) where 1 is the indicator function . In this work we set β = 14 . An overview is provided in Figure 2 . To be clear , we are not claiming this score is particularly optimal ; rather we use it to demonstrate that there are ways of scoring untrained networks that provide significant value for architecture search . We sample 1000 different architectures at random from NAS-Bench-101 and NAS-Bench-201 and plot our score on the untrained network versus their validation accuracies when trained for the datasets in these benchmarks in Figure 3 . In all cases there is a strong correlation between our score and the final accuracy , although it is noisier for ImageNet-16-120 ; this dataset has smaller images compared to the other datasets so it may be that different cutout parameters would improve this . In Section 4 we demonstrate how our score can be used in a NAS algorithm for extremely fast search . | The paper mainly introduces a metric to benchmark the performance of neural networks without training – the correlation of Jacobian subject to different augmented versions of a single image. The key motivation is, high-performance networks tend to represent data of small perturbations with different hyperplanes at initialization, so that the distinguishing capability may also be stronger. The divergence of the hyperplanes can be efficiently estimated via the correlation of the Jacobian, thus quantified by the score in Eq. 2. The effectiveness of the proposed metric is mainly verified in two NAS benchmarks (NAS-Bench-101 and NAS-Bench-201), whose correlation to the actual accuracy is relatively significant (Fig 3). Compared with existing NAS frameworks, the proposed method is very efficient, moreover, able to obtain competitive performance. | SP:142f883313e89c9f27904da7aa5e3e7063dffc4d |
Neural Architecture Search without Training | 1 INTRODUCTION . The success of deep learning in computer vision is in no small part due to the insight and engineering efforts of human experts , allowing for the creation of powerful architectures for widespread adoption ( Krizhevsky et al. , 2012 ; Simonyan & Zisserman , 2015 ; He et al. , 2016 ; Szegedy et al. , 2016 ; Huang et al. , 2017 ) . However , this manual design is costly , and becomes increasingly more difficult as networks get larger and more complicated . Because of these challenges , the neural network community has seen a shift from designing architectures to designing algorithms that search for candidate architectures ( Elsken et al. , 2019 ; Wistuba et al. , 2019 ) . These Neural Architecture Search ( NAS ) algorithms are capable of automating the discovery of effective architectures ( Zoph & Le , 2017 ; Zoph et al. , 2018 ; Pham et al. , 2018 ; Tan et al. , 2019 ; Liu et al. , 2019 ; Real et al. , 2019 ) . NAS algorithms are broadly based on the seminal work of Zoph & Le ( 2017 ) . A controller network generates an architecture proposal , which is then trained to provide a signal to the controller through REINFORCE ( Williams , 1992 ) , which then produces a new proposal , and so on . Training a network for every controller update is extremely expensive ; utilising 800 GPUs for 28 days in Zoph & Le ( 2017 ) . Subsequent work has sought to ameliorate this by ( i ) learning stackable cells instead of whole networks ( Zoph et al. , 2018 ) and ( ii ) incorporating weight sharing ; allowing candidate networks to share weights to allow for joint training ( Pham et al. , 2018 ) . These contributions have accelerated the speed of NAS algorithms e.g . to half a day on a single GPU in Pham et al . ( 2018 ) . For some practitioners , NAS is still too slow ; being able to perform NAS quickly ( i.e . in seconds ) would be immensely useful in the hardware-aware setting where a separate search is typically required for each device and task ( Wu et al. , 2019 ; Tan et al. , 2019 ) . Moreover , recent works have scrutinised NAS with weight sharing ( Li & Talwalkar , 2019 ; Yu et al. , 2020 ) ; there is continued debate as to whether it is clearly better than simple random search . The issues of cost and time , and the risks of weight sharing could be avoided entirely if a NAS algorithm did not require any network training . In this paper , we show that this can be achieved . We explore two recently released NAS benchmarks , NAS-Bench-101 ( Ying et al. , 2019 ) , and NASBench-201 ( Dong & Yang , 2020 ) and examine the relationship between the linear maps induced by an untrained network for a minibatch of augmented versions of a single image ( Section 3 ) . These maps are easily computed using the Jacobian . The correlations between these maps ( which we denote by ΣJ ) are distinctive for networks that perform well when trained on both NAS-Benches ; this is immediately apparent from visualisation alone ( Figure 1 ) . We devise a score based on ΣJ and perform an ablation study to demonstrate its robustness to inputs and network initialisation . We incorporate our score into a simple search algorithm that doesn ’ t require training ( Section 4 ) . This allows us to perform architecture search quickly , for example , on CIFAR-10 ( Krizhevsky , 2009 ) we are able to search for a network that achieve 93.36 % accuracy in 29 seconds within the NAS-Bench-201 search space ; several orders of magnitude faster than traditional NAS methods for a modest change in final accuracy ( e.g . REINFORCE finds a 93.85 % net in 12000 seconds ) . Finally , we show that we can combine our approach with regularised evolutionary search ( REA , Pham et al. , 2018 ) to produce a new NAS algorithm , Assisted-REA ( AREA ) that outperforms its precedessor , attaining 94.16 % accuracy on NAS-Bench-101 in 12,000 seconds . Code for reproducing our experiments is available in the supplementary material . We believe this work is an important proof-of-concept for NAS without training , and shows that the large resource costs associated with NAS can be avoided . The benefit is two-fold , as we also show that we can integrate our approach into existing NAS techniques for scenarios where obtaining as high an accuracy as possible is of the essence . 2 BACKGROUND . Designing a neural architecture by hand is a challenging and time-consuming task . It is extremely difficult to intuit where to place connections , or which operations to use . This has prompted an abundance of research into neural architecture search ( NAS ) ; the automation of the network design process . In the pioneering work of Zoph & Le ( 2017 ) , the authors use an RNN controller to generate descriptions of candidate networks . Candidate networks are trained , and used to update the controller using reinforcement learning to improve the quality of the candidates it generates . This algorithm is very expensive : searching for an architecture to classify CIFAR-10 required 800 GPUs for 28 days . It is also inflexible ; the final network obtained is fixed and can not be scaled e.g . for use on mobile devices or for other datasets . The subsequent work of Zoph et al . ( 2018 ) deals with these limitations . Inspired by the modular nature of successful hand-designed networks ( Simonyan & Zisserman , 2015 ; He et al. , 2016 ; Huang et al. , 2017 ) , they propose searching over neural building blocks , instead of over whole architectures . These building blocks , or cells , form part of a fixed overall network structure . Specifically , the authors learn a standard cell , and a reduced cell ( incorporating pooling ) for CIFAR-10 classification . These are then used as the building blocks of a larger network for ImageNet ( Russakovsky et al. , 2015 ) classification . While more flexible—the number of cells can be adjusted according to budget— and cheaper , owing to a smaller search space , this technique still utilises 500 GPUs across 4 days . ENAS ( Pham et al. , 2018 ) reduces the computational cost of searching by allowing multiple candidate architectures to share weights . This facilitates the simultaneous training of candidates , reducing the search time on CIFAR-10 to half a day on a single GPU . Weight sharing has seen widespread adoption in a host of NAS algorithms ( Liu et al. , 2019 ; Luo et al. , 2018 ; Cai et al. , 2019 ; Xie et al. , 2019 ; Brock et al. , 2018 ) . However , there is evidence that it inhibits the search for optimal architectures ( Yu et al. , 2020 ) . Moreover , random search proves to be an extremely effective NAS baseline ( Yu et al. , 2020 ; Li & Talwalkar , 2019 ) . This exposes another problem : the search space is still vast—there are 1.6× 1029 possible architectures in Pham et al . ( 2018 ) for example—that it is impossible to isolate the best networks and demonstrate that NAS algorithms find them . An orthogonal direction for identifying good architectures is the estimation of accuracy prior to training ( Deng et al. , 2017 ; Istrate et al. , 2019 ) , although these differ from this work in that they rely on training a predictive model , rather than investigating more fundamental architectural properties . 2.1 NAS BENCHMARKS . A major barrier to evaluating the effectiveness of a NAS algorithm is that the search space ( the set of all possible networks ) is too large for exhaustive evaluation . Moreover , popular search spaces have been shown to be over-engineered , exhibiting little variety in their trained networks ( Yang et al. , 2020 ) . This has led to the creation of several benchmarks ( Ying et al. , 2019 ; Zela et al. , 2020 ; Dong & Yang , 2020 ) that consist of tractable NAS search spaces , and metadata for the training of networks within that search space . Concretely , this means that it is now possible to determine whether an algorithm is able to search for a good network . In this work we utilise NAS-Bench-101 ( Ying et al. , 2019 ) and NAS-Bench-201 ( Dong & Yang , 2020 ) to evaluate the effectiveness of our approach . NAS-Bench-101 consists of 423,624 neural networks that have been trained exhaustively , with three different initialisations , on the CIFAR-10 dataset for 108 epochs . NAS-Bench-201 consists of 15,625 networks trained multiple times on CIFAR-10 , CIFAR-100 , and ImageNet-16-120 ( Chrabaszcz et al. , 2017 ) . Both benchmarks are described in detail in Appendix B . 3 SCORING NETWORKS AT INITIALISATION . Our goal is to devise a means to score a network architecture at initialisation in a way that is indicative of its final trained accuracy . This can either replace the expensive inner-loop training step in NAS , or better direct exploration in existing NAS algorithms . Given a neural network with rectified linear units , we can , at each unit in each layer , identify a binary indicator as to whether the unit is inactive ( the value is negative and hence is multiplied by zero ) or active ( in which case its value is multiplied by one ) . Fixing these indicator variables , it is well known that the network is now locally defined by a linear operator ( Hanin & Rolnick , 2019 ) ; this operator is obtained by multiplying the linear maps at each layer interspersed with the binary rectification units . Consider a minibatch of data X = { xi } Ni=1 . Let us denote the linear map for input xi ∈ RD by column vector wi , which maps the input through the network f ( xi ) to a final choice of scalar representation zi ∈ R1 . This linear map can be easily computed using the Jacobian wi = ∂f ( xi ) ∂x . How differently a network acts at each data point can be summarised by comparing the corresponding local linear operators . Correlated operators for nearby points ( such as small perturbations from a training point ) relate to a potential difficulty in handling the two points differently during learning . The Frobenius inner product Tr [ ( wi − µi ) T ( wj − µj ) ] provides a natural basis for defining how two linear operators corresponding to data points xi and xj covary ( µ are mean Jacobian elements , and usually close to zero ) . We can examine the correspondences for the whole minibatch by computing J = ( ∂f ( x1 ) ∂x ∂f ( x2 ) ∂x · · · ∂f ( xN ) ∂x ) > ( 1 ) and observing the covariance matrix CJ = ( J −MJ ) ( J −MJ ) T where MJ is the matrix with entries ( MJ ) i , t = 1 D ∑D d=1 Ji , d ∀t , where d , t index over the D elements of each input ( i.e . channels × pixels ) . It is more salient to focus on the the correlation matrix ΣJ as the appropriate scaling in input space around each point is arbitrary . The ( i , j ) th element of ΣJ is given by ( ΣJ ) i , j = ( CJ ) i , j√ ( CJ ) i , i ( CJ ) j , j . We want an untrained neural network to be sufficiently flexible to model a complex target function . However , we also want a network to be invariant to small perturbations . These two requirements are antagonistic . For an untrained neural network to be sufficiently flexible it would need to be able to distinguish the local linear operators associated with each data point : if two are the same then the two points are coupled . To be invariant to small perturbations the same local linear operators would need to be weakly coupled . Ideally a network would have low correlated local maps associated with each data point to be able to model each local region . We empirically demonstrate this by computing ΣJ for a random subset of NAS-Bench101 ( Ying et al. , 2019 ) and NAS-Bench-201 ( Dong & Yang , 2020 ) networks at initialisation for a minibatch of a single CIFAR-10 image replicated 256 times with a different cutout ( DeVries & Taylor , 2017 ) perturbation applied to each replicant . We use torchvision.transforms.RandomErasing ( p=0.9 , scale= ( 0.02 , 0.04 ) ) in our experiments . To form J we flatten the Jacobian for each input ( so D = 3× 32× 32 = 3072 ) , and adjust the final classifier layer to output a scalar . The plots of the histograms of ΣJ for different networks , categorised according to the validation accuracy when trained is given in Figure 1 for a sample of networks in both benchmarks . Further plots are given in Appendix A . The histograms are very distinct : high performing networks in both benchmarks have their mass tightly around zero with a small positive skew . We can therefore use these histograms to predict the final performance of untrained networks , in place of the expensive training step in NAS . Specifically , we score networks by counting the entries in ΣJ that lie between 0 and an small upper bound β . A ΣJ where inputs are marginally positively-correlated will have a higher score . Our score is given by S = ∑ i , j 1 ( 0 < ( ΣJ ) i , j < β ) ( 2 ) where 1 is the indicator function . In this work we set β = 14 . An overview is provided in Figure 2 . To be clear , we are not claiming this score is particularly optimal ; rather we use it to demonstrate that there are ways of scoring untrained networks that provide significant value for architecture search . We sample 1000 different architectures at random from NAS-Bench-101 and NAS-Bench-201 and plot our score on the untrained network versus their validation accuracies when trained for the datasets in these benchmarks in Figure 3 . In all cases there is a strong correlation between our score and the final accuracy , although it is noisier for ImageNet-16-120 ; this dataset has smaller images compared to the other datasets so it may be that different cutout parameters would improve this . In Section 4 we demonstrate how our score can be used in a NAS algorithm for extremely fast search . | This paper attempts to infer a network's accuracy at initialization without training it, which can speed up neural architecture search and greatly reduce the search cost. Specifically, they propose a metric based on the Jacobian of the loss with respect to a minibatch of input data. The authors show that with this metric, they can find architectures with reasonable accuracy on CIFAR-10/CIFAR-100 in the NAS-Bench-201, while using much less search cost compared to previous NAS methods. | SP:142f883313e89c9f27904da7aa5e3e7063dffc4d |
Source-free Domain Adaptation via Distributional Alignment by Matching Batch Normalization Statistics | 1 INTRODUCTION . In typical statistical machine learning algorithms , test data are assumed to stem from the same distribution as training data ( Hastie et al. , 2009 ) . However , this assumption is often violated in practical situations , and the trained model results in unexpectedly poor performance ( QuioneroCandela et al. , 2009 ) . This situation is called domain shift , and many researchers have intensely worked on domain adaptation ( Csurka , 2017 ; Wilson & Cook , 2020 ) to overcome it . A common approach for domain adaptation is to jointly minimize a distributional discrepancy between domains in a feature space as well as the prediction error of the model ( Wilson & Cook , 2020 ) , as shown in Fig . 1 ( a ) . Deep neural networks ( DNNs ) are particularly popular for this joint training , and recent methods using DNNs have demonstrated excellent performance under domain shift ( Wilson & Cook , 2020 ) . Many domain adaptation algorithms assume that they can access labeled source data as well as target data during adaptation . This assumption is essentially required to evaluate the distributional discrepancy between domains as well as the accuracy of the model ’ s prediction . However , it can be unreasonable in some cases , for example , due to data privacy issues or too large-scale source datasets to be handled at the environment where the adaptation is conducted . To tackle this problem , a few recent studies ( Kundu et al. , 2020 ; Li et al. , 2020 ; Liang et al. , 2020 ) have proposed source-free domain adaptation methods in which they do not need to access the source data . In source-free domain adaptation , the model trained with source data is given instead of source data themselves , and it is fine-tuned through adaptation with unlabeled target data so that the fine-tuned model works well in the target domain . Since it seems quite hard to evaluate the distributional discrepancy between unobservable source data and given target data , previous studies mainly focused on how to minimize the prediction error of the model with unlabeled target data , for example , by using pseudo-labeling ( Liang et al. , 2020 ) or a conditional generative model ( Li et al. , 2020 ) . However , due to lack of the distributional alignment , those methods heavily depend on noisy target labels obtained through the adaptation , which can result in unstable performance . In this paper , we propose a novel method for source-free domain adaptation . Figure 1 ( b ) shows our setup in comparison with that of typical domain adaptation methods shown in Fig . 1 ( a ) . In our method , we explicitly minimize the distributional discrepancy between domains by utilizing batch normalization ( BN ) statistics stored in the pretrained model . Since we fix the pretrained classifier during adaptation , the BN statistics stored in the classifier can be regarded as representing the distribution of source features extracted by the pretrained encoder . Based on this idea , to minimize the discrepancy , we train the target-specific encoder so that the BN statistics of the target features extracted by the encoder match with those stored in the classifier . We also adopt information maximization as in Liang et al . ( 2020 ) to further boost the classification performance of the classifier in the target domain . Our method is apparently simple but effective ; indeed , we will validate its advantage through extensive experiments on several benchmark datasets . 2 RELATED WORK . In this section , we introduce existing works on domain adaptation that are related to ours and also present a formulation of batch normalization . 2.1 DOMAIN ADAPTATION . Given source and target data , the goal of domain adaptation is to obtain a good prediction model that performs well in the target domain ( Csurka , 2017 ; Wilson & Cook , 2020 ) . Importantly , the data distributions are significantly different between the domains , which means that we can not simply train the model with source data to maximize the performance of the model for target data . Therefore , in addition to minimizing the prediction error using labeled source data , many domain adaptation algorithms try to align the data distributions between domains by adversarial training ( Ganin et al. , 2016 ; Tzeng et al. , 2017 ; Deng et al. , 2019 ; Xu et al. , 2019 ) or explicitly minimizing a distributionaldiscrepancy measure ( Long et al. , 2015 ; Bousmalis et al. , 2016 ; Long et al. , 2017 ) . This approach has empirically shown excellent performance and is also closely connected to theoretical analysis ( Ben-David et al. , 2010 ) . However , since this distribution alignment requires access to source data , these methods can not be directly applied to the source-free domain adaptation setting . In source-free domain adaptation , we can only access target data but not source data , and the model pretrained with the source data is given instead of the source data . This challenging problem has been tackled in recent studies . Li et al . ( 2020 ) proposed joint training of the target model and the conditional GAN ( Generative Adversarial Network ) ( Mirza & Osindero , 2014 ) that is to generate annotated target data . Liang et al . ( 2020 ) explicitly divided the pretrained model into two modules , called a feature encoder and a classifier , and trained the target-specific feature encoder while fixing the classifier . To make the classifier work well with the target features , this training jointly conducts both information maximization and self-supervised pseudo-labeling with the fixed classifier . Kundu et al . ( 2020 ) adopted a similar architecture but it has three modules : a backbone model , a feature extractor , and a classifier . In the adaptation phase , only the feature extractor is tuned for the target domain by minimizing the entropy of the classifier ’ s output . Since the methods shown above do not try to align data distributions between domains , they can not essentially avoid confirmation bias of the model and also can not benefit from well-exploited theories in the studies on typical domain adaptation problems ( Ben-David et al. , 2010 ) . 2.2 BATCH NORMALIZATION . Batch normalization ( BN ) ( Ioffe & Szegedy , 2015 ) has been widely used in modern architectures of deep neural networks to make their training faster as well as being stable . It normalizes each input feature within a mini-batch in a channel-wise manner so that the output has zero-mean and unit-variance . Let B and { zi } Bi=1 denote the mini-batch size and the input features to the batch normalization , respectively . Here , we assume that the input features consist of C channels as zi = [ z ( 1 ) i , ... , z ( C ) i ] and each channel contains nc features . BN first computes the means { µc } Cc=1 and variances { σ2c } Cc=1 of the features for each channel within the mini-batch : µc = 1 ncB B∑ i nc∑ j z ( c ) i [ j ] , σ 2 c = 1 ncB B∑ i nc∑ j ( z ( c ) i [ j ] − µc ) 2 , ( 1 ) where z ( c ) i [ j ] is the j-th feature in z ( c ) i . Then , it normalizes the input features by using the computed BN statistics : z̃ ( c ) i = z ( c ) i − µc√ σ2c + , ( 2 ) where is a small positive constant for numerical stability . In the inference phase , BN can not always compute those statistics , because the input data do not necessarily compose a mini-batch . Instead , BN stores the exponentially weighted averages of the BN statistics in the training phase and uses them in the inference phase to compute z̃ in Eq . ( 2 ) ( Ioffe & Szegedy , 2015 ) . Since BN renormalizes features to have zero-mean and unit-variance , several methods ( Li et al. , 2018 ; Chang et al. , 2019 ; Wang et al. , 2019 ) adopted domain-specific BN to explicitly align both the distribution of source features and that of target features into a common distribution . Since the domain-specific BN methods are jointly trained during adaptation , we can not use these methods in the source-free setting . 3 PROPOSED METHOD . Figure 2 shows an overview of our method . We assume that the model pretrained with source data is given , and it conducts BN at least once somewhere inside the model . Before conducting domain adaptation , we divide the model in two sub-models : a feature encoder and a classifier , so that BN comes at the very beginning of the classifier . Then , for domain adaptation , we fine-tune the encoder with unlabeled target data with the classifier fixed . After adaptation , we use the fine-tuned encoder and the fixed classifier to predict the class of test data in the target domain . To make the fixed classifier work well in the target domain after domain adaptation , we aim to obtain a fine-tuned encoder that satisfies the following two properties : • The distribution of target features extracted by the fine-tuned encoder is well aligned to that of source features extracted by the pretrained encoder . • The features extracted by the fine-tuned encoder are sufficiently discriminative for the fixed classifier to accurately predict the class of input target data . To this end , we jointly minimize both the BN-statistics matching loss and information maximization loss to fine-tune the encoder . In the former loss , we approximate the distribution of unobservable source features by using the BN statistics stored in the first BN layer of the classifier , and the loss explicitly evaluates the discrepancy between source and target feature distributions based on those statistics . Therefore , minimizing this loss leads to satisfying the first property shown above . On the other hand , the latter loss is to make the predictions by the fixed classifier certain for every target sample as well as diverse within all target data , and minimizing this loss leads to fulfilling the second property . Below , we describe the details of these losses . 3.1 DISTRIBUTION ALIGNMENT BY MATCHING BATCH NORMALIZATION STATISTICS . Since the whole model is pretrained with source data and we fix the classifier while finetuning the encoder , the BN statistics stored in the first BN in the classifier can be seen as the statistics of the source features extracted by the pretrained encoder . We approximate the source-feature distribution by using these statistics . Specifically , we simply use a Gaussian distribution for each channel denoted by N ( µ̂c , σ̂2c ) where µ̂c and σ̂2c are the mean and variance of the Gaussian distribution which are the stored BN statistics corresponding to the c-th channel . To match the feature distributions between domains , we define the BN-statistics matching loss , which evaluates the averaged Kullback-Leibler ( KL ) divergence from the target-feature distribution to the approximated source-feature distribution : LBNM ( { xi } Bi=1 , θ ) = 1 C C∑ c=1 KL ( N ( µ̂c , σ̂2c ) ||N ( µc , σ2c ) ) = 1 2C C∑ c=1 ( log σ2c σ̂2c + σ̂2c + ( µ̂c − µc ) 2 σ2c − 1 ) , ( 3 ) where { xi } Bi=1 is a mini-batch from the target data , θ is a set of trainable parameters of the encoder , and µc and σc are the BN statistics of the c-th channel computed from the target mini-batch . Note that , since µc and σc are calculated from the features extracted by the encoder , they depend on θ . Here , we also approximate the target-feature distribution with another Gaussian distribution so that the KL divergence can be efficiently computed in a parametric manner . By minimizing this loss , we can explicitly reduce the discrepancy between the distribution of unobservable source features and that of target features . In Eq . ( 3 ) , we chose the KL divergence to measure the distributional discrepancy between domains . There are two reasons for this choice . First , the KL divergence between two Gaussian distributions is easy to compute with the BN statistics as shown in Eq . ( 3 ) . Moreover , since these statistics are naturally computed in the BN layer , calculating this divergence only requires tiny calculation costs . Secondly , it would be a theoretically-inspired design from the perspective of risk minimization in the target domain . When we consider a binary classification task , the expected risk of any hypothesis h in the target domain can be upper-bounded under some mild assumptions as the following inequality ( Ben-David et al. , 2010 ) : rT ( h ) ≤ rS ( h ) + d1 ( pS , pT ) + β , ( 4 ) where rS ( h ) and rT ( h ) denote the expected risk of h under the source-data distribution pS and target-data distribution pT , respectively , d1 ( p , q ) represents the total variation distance between p and q , and β is a constant value that is expected to be sufficiently small . This inequality roughly gives a theoretical justification to recent domain adaptation algorithms , that is , joint minimization of both the distributional discrepancy between domains ( corresponding to the second term of the bound in Eq . ( 4 ) ) and the prediction error of the model ( corresponding to the first term of the bound in Eq . ( 4 ) ) . Here , the total variation distance can be related to the KL divergence by Pinsker ’ s inequality ( Csiszar & Körner , 2011 ) : d1 ( p , q ) ≤ √ 1 2 KL ( p||q ) . ( 5 ) Consequently , we can guarantee that minimizing the KL divergence between domains minimizes the bound of the target risk . | This paper proposes a domain adaptation technique when source data is not available. The exponentially weighted average of BN statistics from source training along with the trained model is utilized to align source and target distributions. Source model is divided into feature encoder and classifier components based on the presence of the last BN layer. BN statistics matching loss minimizes the distribution discrepancy between source and target, whereas information maximization loss enforces the classifier to be sufficiently discriminative. Experiments on several benchmark datasets showed competitive performance with state-of-the-art domain adaptation methods. | SP:b91c4d5f9cde00d87fd76c1eb710322a767af87d |
Source-free Domain Adaptation via Distributional Alignment by Matching Batch Normalization Statistics | 1 INTRODUCTION . In typical statistical machine learning algorithms , test data are assumed to stem from the same distribution as training data ( Hastie et al. , 2009 ) . However , this assumption is often violated in practical situations , and the trained model results in unexpectedly poor performance ( QuioneroCandela et al. , 2009 ) . This situation is called domain shift , and many researchers have intensely worked on domain adaptation ( Csurka , 2017 ; Wilson & Cook , 2020 ) to overcome it . A common approach for domain adaptation is to jointly minimize a distributional discrepancy between domains in a feature space as well as the prediction error of the model ( Wilson & Cook , 2020 ) , as shown in Fig . 1 ( a ) . Deep neural networks ( DNNs ) are particularly popular for this joint training , and recent methods using DNNs have demonstrated excellent performance under domain shift ( Wilson & Cook , 2020 ) . Many domain adaptation algorithms assume that they can access labeled source data as well as target data during adaptation . This assumption is essentially required to evaluate the distributional discrepancy between domains as well as the accuracy of the model ’ s prediction . However , it can be unreasonable in some cases , for example , due to data privacy issues or too large-scale source datasets to be handled at the environment where the adaptation is conducted . To tackle this problem , a few recent studies ( Kundu et al. , 2020 ; Li et al. , 2020 ; Liang et al. , 2020 ) have proposed source-free domain adaptation methods in which they do not need to access the source data . In source-free domain adaptation , the model trained with source data is given instead of source data themselves , and it is fine-tuned through adaptation with unlabeled target data so that the fine-tuned model works well in the target domain . Since it seems quite hard to evaluate the distributional discrepancy between unobservable source data and given target data , previous studies mainly focused on how to minimize the prediction error of the model with unlabeled target data , for example , by using pseudo-labeling ( Liang et al. , 2020 ) or a conditional generative model ( Li et al. , 2020 ) . However , due to lack of the distributional alignment , those methods heavily depend on noisy target labels obtained through the adaptation , which can result in unstable performance . In this paper , we propose a novel method for source-free domain adaptation . Figure 1 ( b ) shows our setup in comparison with that of typical domain adaptation methods shown in Fig . 1 ( a ) . In our method , we explicitly minimize the distributional discrepancy between domains by utilizing batch normalization ( BN ) statistics stored in the pretrained model . Since we fix the pretrained classifier during adaptation , the BN statistics stored in the classifier can be regarded as representing the distribution of source features extracted by the pretrained encoder . Based on this idea , to minimize the discrepancy , we train the target-specific encoder so that the BN statistics of the target features extracted by the encoder match with those stored in the classifier . We also adopt information maximization as in Liang et al . ( 2020 ) to further boost the classification performance of the classifier in the target domain . Our method is apparently simple but effective ; indeed , we will validate its advantage through extensive experiments on several benchmark datasets . 2 RELATED WORK . In this section , we introduce existing works on domain adaptation that are related to ours and also present a formulation of batch normalization . 2.1 DOMAIN ADAPTATION . Given source and target data , the goal of domain adaptation is to obtain a good prediction model that performs well in the target domain ( Csurka , 2017 ; Wilson & Cook , 2020 ) . Importantly , the data distributions are significantly different between the domains , which means that we can not simply train the model with source data to maximize the performance of the model for target data . Therefore , in addition to minimizing the prediction error using labeled source data , many domain adaptation algorithms try to align the data distributions between domains by adversarial training ( Ganin et al. , 2016 ; Tzeng et al. , 2017 ; Deng et al. , 2019 ; Xu et al. , 2019 ) or explicitly minimizing a distributionaldiscrepancy measure ( Long et al. , 2015 ; Bousmalis et al. , 2016 ; Long et al. , 2017 ) . This approach has empirically shown excellent performance and is also closely connected to theoretical analysis ( Ben-David et al. , 2010 ) . However , since this distribution alignment requires access to source data , these methods can not be directly applied to the source-free domain adaptation setting . In source-free domain adaptation , we can only access target data but not source data , and the model pretrained with the source data is given instead of the source data . This challenging problem has been tackled in recent studies . Li et al . ( 2020 ) proposed joint training of the target model and the conditional GAN ( Generative Adversarial Network ) ( Mirza & Osindero , 2014 ) that is to generate annotated target data . Liang et al . ( 2020 ) explicitly divided the pretrained model into two modules , called a feature encoder and a classifier , and trained the target-specific feature encoder while fixing the classifier . To make the classifier work well with the target features , this training jointly conducts both information maximization and self-supervised pseudo-labeling with the fixed classifier . Kundu et al . ( 2020 ) adopted a similar architecture but it has three modules : a backbone model , a feature extractor , and a classifier . In the adaptation phase , only the feature extractor is tuned for the target domain by minimizing the entropy of the classifier ’ s output . Since the methods shown above do not try to align data distributions between domains , they can not essentially avoid confirmation bias of the model and also can not benefit from well-exploited theories in the studies on typical domain adaptation problems ( Ben-David et al. , 2010 ) . 2.2 BATCH NORMALIZATION . Batch normalization ( BN ) ( Ioffe & Szegedy , 2015 ) has been widely used in modern architectures of deep neural networks to make their training faster as well as being stable . It normalizes each input feature within a mini-batch in a channel-wise manner so that the output has zero-mean and unit-variance . Let B and { zi } Bi=1 denote the mini-batch size and the input features to the batch normalization , respectively . Here , we assume that the input features consist of C channels as zi = [ z ( 1 ) i , ... , z ( C ) i ] and each channel contains nc features . BN first computes the means { µc } Cc=1 and variances { σ2c } Cc=1 of the features for each channel within the mini-batch : µc = 1 ncB B∑ i nc∑ j z ( c ) i [ j ] , σ 2 c = 1 ncB B∑ i nc∑ j ( z ( c ) i [ j ] − µc ) 2 , ( 1 ) where z ( c ) i [ j ] is the j-th feature in z ( c ) i . Then , it normalizes the input features by using the computed BN statistics : z̃ ( c ) i = z ( c ) i − µc√ σ2c + , ( 2 ) where is a small positive constant for numerical stability . In the inference phase , BN can not always compute those statistics , because the input data do not necessarily compose a mini-batch . Instead , BN stores the exponentially weighted averages of the BN statistics in the training phase and uses them in the inference phase to compute z̃ in Eq . ( 2 ) ( Ioffe & Szegedy , 2015 ) . Since BN renormalizes features to have zero-mean and unit-variance , several methods ( Li et al. , 2018 ; Chang et al. , 2019 ; Wang et al. , 2019 ) adopted domain-specific BN to explicitly align both the distribution of source features and that of target features into a common distribution . Since the domain-specific BN methods are jointly trained during adaptation , we can not use these methods in the source-free setting . 3 PROPOSED METHOD . Figure 2 shows an overview of our method . We assume that the model pretrained with source data is given , and it conducts BN at least once somewhere inside the model . Before conducting domain adaptation , we divide the model in two sub-models : a feature encoder and a classifier , so that BN comes at the very beginning of the classifier . Then , for domain adaptation , we fine-tune the encoder with unlabeled target data with the classifier fixed . After adaptation , we use the fine-tuned encoder and the fixed classifier to predict the class of test data in the target domain . To make the fixed classifier work well in the target domain after domain adaptation , we aim to obtain a fine-tuned encoder that satisfies the following two properties : • The distribution of target features extracted by the fine-tuned encoder is well aligned to that of source features extracted by the pretrained encoder . • The features extracted by the fine-tuned encoder are sufficiently discriminative for the fixed classifier to accurately predict the class of input target data . To this end , we jointly minimize both the BN-statistics matching loss and information maximization loss to fine-tune the encoder . In the former loss , we approximate the distribution of unobservable source features by using the BN statistics stored in the first BN layer of the classifier , and the loss explicitly evaluates the discrepancy between source and target feature distributions based on those statistics . Therefore , minimizing this loss leads to satisfying the first property shown above . On the other hand , the latter loss is to make the predictions by the fixed classifier certain for every target sample as well as diverse within all target data , and minimizing this loss leads to fulfilling the second property . Below , we describe the details of these losses . 3.1 DISTRIBUTION ALIGNMENT BY MATCHING BATCH NORMALIZATION STATISTICS . Since the whole model is pretrained with source data and we fix the classifier while finetuning the encoder , the BN statistics stored in the first BN in the classifier can be seen as the statistics of the source features extracted by the pretrained encoder . We approximate the source-feature distribution by using these statistics . Specifically , we simply use a Gaussian distribution for each channel denoted by N ( µ̂c , σ̂2c ) where µ̂c and σ̂2c are the mean and variance of the Gaussian distribution which are the stored BN statistics corresponding to the c-th channel . To match the feature distributions between domains , we define the BN-statistics matching loss , which evaluates the averaged Kullback-Leibler ( KL ) divergence from the target-feature distribution to the approximated source-feature distribution : LBNM ( { xi } Bi=1 , θ ) = 1 C C∑ c=1 KL ( N ( µ̂c , σ̂2c ) ||N ( µc , σ2c ) ) = 1 2C C∑ c=1 ( log σ2c σ̂2c + σ̂2c + ( µ̂c − µc ) 2 σ2c − 1 ) , ( 3 ) where { xi } Bi=1 is a mini-batch from the target data , θ is a set of trainable parameters of the encoder , and µc and σc are the BN statistics of the c-th channel computed from the target mini-batch . Note that , since µc and σc are calculated from the features extracted by the encoder , they depend on θ . Here , we also approximate the target-feature distribution with another Gaussian distribution so that the KL divergence can be efficiently computed in a parametric manner . By minimizing this loss , we can explicitly reduce the discrepancy between the distribution of unobservable source features and that of target features . In Eq . ( 3 ) , we chose the KL divergence to measure the distributional discrepancy between domains . There are two reasons for this choice . First , the KL divergence between two Gaussian distributions is easy to compute with the BN statistics as shown in Eq . ( 3 ) . Moreover , since these statistics are naturally computed in the BN layer , calculating this divergence only requires tiny calculation costs . Secondly , it would be a theoretically-inspired design from the perspective of risk minimization in the target domain . When we consider a binary classification task , the expected risk of any hypothesis h in the target domain can be upper-bounded under some mild assumptions as the following inequality ( Ben-David et al. , 2010 ) : rT ( h ) ≤ rS ( h ) + d1 ( pS , pT ) + β , ( 4 ) where rS ( h ) and rT ( h ) denote the expected risk of h under the source-data distribution pS and target-data distribution pT , respectively , d1 ( p , q ) represents the total variation distance between p and q , and β is a constant value that is expected to be sufficiently small . This inequality roughly gives a theoretical justification to recent domain adaptation algorithms , that is , joint minimization of both the distributional discrepancy between domains ( corresponding to the second term of the bound in Eq . ( 4 ) ) and the prediction error of the model ( corresponding to the first term of the bound in Eq . ( 4 ) ) . Here , the total variation distance can be related to the KL divergence by Pinsker ’ s inequality ( Csiszar & Körner , 2011 ) : d1 ( p , q ) ≤ √ 1 2 KL ( p||q ) . ( 5 ) Consequently , we can guarantee that minimizing the KL divergence between domains minimizes the bound of the target risk . | In the work, the authors focus on tackling the problem of source free domain adaptation. The proposed method mainly has two parts, in which the second is nearly the same as the SHOT-IM as in Liang et al., 2020 [1], while the first part aims at coping with this problem from a new perspective to align the distribution of target features extracted by the fine-tuned encoder to that of source features extracted by the pre-trained encoder. To achieve this, they utilize batch normalization statistics stored in the pre-trained model to approximate the distribution of unobserved source data. | SP:b91c4d5f9cde00d87fd76c1eb710322a767af87d |
Learning What Not to Model: Gaussian Process Regression with Negative Constraints | We empirically demonstrate that our GP-NC framework performs better than the traditional GP learning and that our framework does not affect the scalability of Gaussian Process regression and helps the model converge faster as the size of the data increases . Gaussian Process ( GP ) regression fits a curve on a set of datapairs , with each pair consisting of an input point ‘ x ’ and its corresponding target regression value ‘ y ( x ) ’ ( a positive datapair ) . But , what if for an input point ‘ x̄ ’ , we want to constrain the GP to avoid a target regression value ‘ ȳ ( x̄ ) ’ ( a negative datapair ) ? This requirement can often appear in real-world navigation tasks , where an agent would want to avoid obstacles , like furniture items in a room when planning a trajectory to navigate . In this work , we propose to incorporate such negative constraints in a GP regression framework . Our approach , ‘ GP-NC ’ or Gaussian Process with Negative Constraints , fits over the positive datapairs while avoiding the negative datapairs . Specifically , our key idea is to model the negative datapairs using small blobs of Gaussian distribution and maximize its KL divergence from the GP . We jointly optimize the GP-NC for both the positive and negative datapairs . We empirically demonstrate that our GP-NC framework performs better than the traditional GP learning and that our framework does not affect the scalability of Gaussian Process regression and helps the model converge faster as the size of the data increases . 1 INTRODUCTION . Gaussian process are one of the most studied model class for data-driven learning as these are nonparametric , flexible function class that requires little prior knowledge of the process . Traditionally , GPs have found their applications in various fields of research , including Navigation systems ( e.g. , in Wiener and Kalman filters ) ( Jazwinski , 2007 ) , Geostatistics , Meteorology ( Kriging ( Handcock & Stein , 1993 ) ) and Machine learning ( Rasmussen , 2006 ) . The wide range of applications can be attributed to the property of GPs to model the target uncertainty by providing the predictive variance over the target variable . Gaussian process regression in its current construct fits only on a set of positive datapairs , with each pair consisting of an input point and its desired target regression value , to learn the distribution on a functional space . However , in some cases , more information is available in the form of datapairs , where at a particular input point , we want to avoid a range of regression values during the curve fitting of GP . We designate such data as negative datapairs . An illustration where modeling such negative datapairs would be extremely beneficial is given in Fig 1 . In Fig 1 ( b ) , an agent wants to model a trajectory such that it covers all the positive datapairs marked by ‘ x ’ . However , it is essential to note that the agent would run into an obstacle if it models its trajectory based only on the positive datapairs . We can handle this problem of navigating in the presence of obstacles in two ways , one way is to get a high density of positive datapairs near the obstacle , and the other more straightforward approach is to just mark the obstacle as a negative datapair . The former approach would unnecessarily increase the number of positive datapairs for GP to regress . Hence , it may run into scalability issues . However , in the latter approach , if the point is denoted as a negative datapair with a sphere of negative influence around it as illustrated by Fig 1.c , the new trajectory can be modeled with less number of datapairs that accounts for all obstacles on the way . Various GP methods in their current framework lack the ability to incorporate these negative datapairs for the regression paradigm . Contributions : In this paper , we explore the concept of negative datapairs . We provide a simple yet effective GP regression framework , called GP-NC which can fit on the positive datapairs while avoiding the negative datapairs . Specifically , our key idea is to model the negative datapairs using a small Gaussian blob and maximize its KL divergence from the GP . Our framework can be easily incorporated for various types of GP models ( e.g. , exact , SVGP ( Hensman et al. , 2013 ) , PPGPR ( Jankowiak et al. , 2019 ) ) and works well in the scalable settings too . We empirically show in §5 that the inclusion of negative datapairs in training helps with both the increase in accuracy and the convergence rate of the algorithm . 2 REVIEW OF GAUSSIAN PROCESS REGRESSION . We briefly review the basics of Gaussian Process regression , following the notations in ( Wilson et al. , 2015 ) . For more comprehensive discussion of GPs , refer to ( Rasmussen , 2006 ) . A Gaussian process is a collection of random variables , any finite number of which have a joint Gaussian distribution ( Rasmussen , 2006 ) . We consider a dataset D with n D-dimensional input vectors , X = { x1 , · · · , xn } and corresponding n × 1 vector of targets y = ( y ( x1 ) , · · · , y ( xn ) ) T . The goal of GP regression is to learn a function f that maps elements from input space to a target space , i.e. , y ( x ) = f ( x ) + where is i.i.d . noise . If f ( x ) ∼ GP ( µ , kθ ) , then any collection of function values f has a joint multivariate normal distribution given by , f = f ( X ) = [ f ( x1 ) , · · · , f ( xn ) ] T ∼ N ( µX , KX , X ) ( 1 ) with the mean vector and covariance matrix defined by the functions of the Gaussian Process , as ( µX ) i = µ ( xi ) and ( KX , X ) ij = kθ ( xi , xj ) . The kernel function kθ of the GP is parameterized by θ . Assuming additive Gaussian noise , y ( x ) |f ( x ) ∼ N ( y ( x ) ; f ( x ) , σ2 ) , then the predictive distribution of the GP evaluated at the n∗ test points indexed by X∗ , is given by f∗|X∗ , X , y , θ , σ2 ∼ N ( E [ f∗ ] , cov ( f∗ ) ) , E [ f∗ ] = µX∗ +KX∗ , X [ KX , X + σ 2I ] −1 y , cov ( f∗ ) = KX∗ , X∗ −KX∗ , X [ KX , X + σ 2I ] −1 KX , X∗ ( 2 ) KX∗ , X represents the n∗ × n covariance matrix between the GP evaluated at X∗ and X . Other covariance matrices follow similar conventions . µX∗ is the mean vector of size n∗ × 1 for the test points and KX , X is the n × n covariance matrix calculated using the training inputs X . The underlying hyperparameter θ implicitly affects all the covariance matrices under consideration . 2.1 GPS : LEARNING AND MODEL SELECTION We can view the GP in terms of fitting a joint probability distribution as , p ( y , f |X ) = p ( y|f , σ2 ) p ( f |X ) ( 3 ) and we can derive the marginal likelihood of the targets y as a function of kernel parameters alone for the GP by integrating out the functions f in the joint distribution of Eq . ( 3 ) . A nice property of the GP is that this marginal likelihood has an analytical form given by , L ( θ ) = log p ( y|θ , X ) = −1 2 ( yT ( Kθ + σ 2I ) −1 y + log ( ∣∣Kθ + σ2I∣∣ ) +N log ( 2π ) ) ( 4 ) where we have used Kθ as a shorthand for KX , X given θ . The process of kernel learning is that of optimizing Eq . ( 4 ) w.r.t . θ . The first term on the right hand side in Eq . ( 4 ) is used for model fitting , while the second term is a complexity penalty term that maintains the Occam ’ s razor for realizable functions as shown by ( Rasmussen & Ghahramani , 2001 ) . The marginal likelihood involves matrix inversion and evaluating a determinant for n× n matrix , which the naive implementation would require a cubic order of computations O ( n3 ) and O ( n2 ) of storage . Approaches like Scalable Variational GP ( SVGP ) ( Hensman et al. , 2013 ) and parametric GPR ( PPGPR ) ( Jankowiak et al. , 2019 ) have proposed approximations that lead to much better scalability . Please refer to Appexdix A for details . 3 GP REGRESSION WITH NEGATIVE DATAPAIRS . As shown in Fig . 1 , we want the model to avoid certain negative datapairs in its trajectory . In other words , we want the trajectory of the Gaussian Process to have a very low probability of passing through these negative datapairs . In this section , we will first formalize the functional form of the negative datapairs and then subsequently describe our framework called GP-NC regression . 3.1 DEFINITION OF POSITIVE & NEGATIVE DATAPAIRS . Positive datapairs : The set of datapairs through which the GP should pass are defined as positive datapairs . We assume a set of n datapairs ( input , positive target ) with D-dimensional input vectors , X = { x1 , · · · , xn } and corresponding n × 1 vector of target regression values y = { y ( x1 ) , · · · , y ( xn ) } . Negative datapairs : The set of datapairs which the GP should avoid ( obstacles ) are defined as negative datapairs . We assume a set of m datapairs ( input , negative target ) with D-dimensional input vectors X̄ = { x̄1 , · · · , x̄m } and corresponding set of negative targets ȳ = { ȳ ( x̄1 ) , · · · , ȳ ( x̄m ) } . The sample value of GP at input x̄i , given by f ( x̄i ) , should be far from the negative target regression value ȳ ( x̄i ) . Note that it is possible that a particular input x can be in both the positive and negative data pair set . This will happen , when at a particular input we want the GP regression value to be close to its positive target regression value y ( x ) and far from its negative target regression value ȳ ( x ) . 3.2 FUNCTIONAL REPRESENTATION OF NEGATIVE DATAPAIRS . For our framework , we first get a functional representation of the negative datapairs . We define a Gaussian distribution around each of the negative datapair , q ( ȳ|x̄ ) ∼ N ( ȳ ( x̄ ) , σ2neg ) , with mean equal to the negative target value ȳ ( x ) and σ2neg is the variance which is a hyperparameter . The Gaussian blob can also be thought of as the area of influence for the negative datapair with the variance σneg indicating the spread of its influence . | This paper incorporates information of obstacles to avoid (e.g robot navigation trajectory in the room where the robot has to avoid items such as furniture) into Gaussian process regression fit. They call the obstacles, negative datapairs and the rest of data, positive datapairs. The aim is to have a GP where the probability of passing through the negative datapairs is low. The proposed method is called the Gaussian process with negative constraints (GP-NC). | SP:7003fdde96baedb55a47e5b42ad8d1866a86f5c7 |
Learning What Not to Model: Gaussian Process Regression with Negative Constraints | We empirically demonstrate that our GP-NC framework performs better than the traditional GP learning and that our framework does not affect the scalability of Gaussian Process regression and helps the model converge faster as the size of the data increases . Gaussian Process ( GP ) regression fits a curve on a set of datapairs , with each pair consisting of an input point ‘ x ’ and its corresponding target regression value ‘ y ( x ) ’ ( a positive datapair ) . But , what if for an input point ‘ x̄ ’ , we want to constrain the GP to avoid a target regression value ‘ ȳ ( x̄ ) ’ ( a negative datapair ) ? This requirement can often appear in real-world navigation tasks , where an agent would want to avoid obstacles , like furniture items in a room when planning a trajectory to navigate . In this work , we propose to incorporate such negative constraints in a GP regression framework . Our approach , ‘ GP-NC ’ or Gaussian Process with Negative Constraints , fits over the positive datapairs while avoiding the negative datapairs . Specifically , our key idea is to model the negative datapairs using small blobs of Gaussian distribution and maximize its KL divergence from the GP . We jointly optimize the GP-NC for both the positive and negative datapairs . We empirically demonstrate that our GP-NC framework performs better than the traditional GP learning and that our framework does not affect the scalability of Gaussian Process regression and helps the model converge faster as the size of the data increases . 1 INTRODUCTION . Gaussian process are one of the most studied model class for data-driven learning as these are nonparametric , flexible function class that requires little prior knowledge of the process . Traditionally , GPs have found their applications in various fields of research , including Navigation systems ( e.g. , in Wiener and Kalman filters ) ( Jazwinski , 2007 ) , Geostatistics , Meteorology ( Kriging ( Handcock & Stein , 1993 ) ) and Machine learning ( Rasmussen , 2006 ) . The wide range of applications can be attributed to the property of GPs to model the target uncertainty by providing the predictive variance over the target variable . Gaussian process regression in its current construct fits only on a set of positive datapairs , with each pair consisting of an input point and its desired target regression value , to learn the distribution on a functional space . However , in some cases , more information is available in the form of datapairs , where at a particular input point , we want to avoid a range of regression values during the curve fitting of GP . We designate such data as negative datapairs . An illustration where modeling such negative datapairs would be extremely beneficial is given in Fig 1 . In Fig 1 ( b ) , an agent wants to model a trajectory such that it covers all the positive datapairs marked by ‘ x ’ . However , it is essential to note that the agent would run into an obstacle if it models its trajectory based only on the positive datapairs . We can handle this problem of navigating in the presence of obstacles in two ways , one way is to get a high density of positive datapairs near the obstacle , and the other more straightforward approach is to just mark the obstacle as a negative datapair . The former approach would unnecessarily increase the number of positive datapairs for GP to regress . Hence , it may run into scalability issues . However , in the latter approach , if the point is denoted as a negative datapair with a sphere of negative influence around it as illustrated by Fig 1.c , the new trajectory can be modeled with less number of datapairs that accounts for all obstacles on the way . Various GP methods in their current framework lack the ability to incorporate these negative datapairs for the regression paradigm . Contributions : In this paper , we explore the concept of negative datapairs . We provide a simple yet effective GP regression framework , called GP-NC which can fit on the positive datapairs while avoiding the negative datapairs . Specifically , our key idea is to model the negative datapairs using a small Gaussian blob and maximize its KL divergence from the GP . Our framework can be easily incorporated for various types of GP models ( e.g. , exact , SVGP ( Hensman et al. , 2013 ) , PPGPR ( Jankowiak et al. , 2019 ) ) and works well in the scalable settings too . We empirically show in §5 that the inclusion of negative datapairs in training helps with both the increase in accuracy and the convergence rate of the algorithm . 2 REVIEW OF GAUSSIAN PROCESS REGRESSION . We briefly review the basics of Gaussian Process regression , following the notations in ( Wilson et al. , 2015 ) . For more comprehensive discussion of GPs , refer to ( Rasmussen , 2006 ) . A Gaussian process is a collection of random variables , any finite number of which have a joint Gaussian distribution ( Rasmussen , 2006 ) . We consider a dataset D with n D-dimensional input vectors , X = { x1 , · · · , xn } and corresponding n × 1 vector of targets y = ( y ( x1 ) , · · · , y ( xn ) ) T . The goal of GP regression is to learn a function f that maps elements from input space to a target space , i.e. , y ( x ) = f ( x ) + where is i.i.d . noise . If f ( x ) ∼ GP ( µ , kθ ) , then any collection of function values f has a joint multivariate normal distribution given by , f = f ( X ) = [ f ( x1 ) , · · · , f ( xn ) ] T ∼ N ( µX , KX , X ) ( 1 ) with the mean vector and covariance matrix defined by the functions of the Gaussian Process , as ( µX ) i = µ ( xi ) and ( KX , X ) ij = kθ ( xi , xj ) . The kernel function kθ of the GP is parameterized by θ . Assuming additive Gaussian noise , y ( x ) |f ( x ) ∼ N ( y ( x ) ; f ( x ) , σ2 ) , then the predictive distribution of the GP evaluated at the n∗ test points indexed by X∗ , is given by f∗|X∗ , X , y , θ , σ2 ∼ N ( E [ f∗ ] , cov ( f∗ ) ) , E [ f∗ ] = µX∗ +KX∗ , X [ KX , X + σ 2I ] −1 y , cov ( f∗ ) = KX∗ , X∗ −KX∗ , X [ KX , X + σ 2I ] −1 KX , X∗ ( 2 ) KX∗ , X represents the n∗ × n covariance matrix between the GP evaluated at X∗ and X . Other covariance matrices follow similar conventions . µX∗ is the mean vector of size n∗ × 1 for the test points and KX , X is the n × n covariance matrix calculated using the training inputs X . The underlying hyperparameter θ implicitly affects all the covariance matrices under consideration . 2.1 GPS : LEARNING AND MODEL SELECTION We can view the GP in terms of fitting a joint probability distribution as , p ( y , f |X ) = p ( y|f , σ2 ) p ( f |X ) ( 3 ) and we can derive the marginal likelihood of the targets y as a function of kernel parameters alone for the GP by integrating out the functions f in the joint distribution of Eq . ( 3 ) . A nice property of the GP is that this marginal likelihood has an analytical form given by , L ( θ ) = log p ( y|θ , X ) = −1 2 ( yT ( Kθ + σ 2I ) −1 y + log ( ∣∣Kθ + σ2I∣∣ ) +N log ( 2π ) ) ( 4 ) where we have used Kθ as a shorthand for KX , X given θ . The process of kernel learning is that of optimizing Eq . ( 4 ) w.r.t . θ . The first term on the right hand side in Eq . ( 4 ) is used for model fitting , while the second term is a complexity penalty term that maintains the Occam ’ s razor for realizable functions as shown by ( Rasmussen & Ghahramani , 2001 ) . The marginal likelihood involves matrix inversion and evaluating a determinant for n× n matrix , which the naive implementation would require a cubic order of computations O ( n3 ) and O ( n2 ) of storage . Approaches like Scalable Variational GP ( SVGP ) ( Hensman et al. , 2013 ) and parametric GPR ( PPGPR ) ( Jankowiak et al. , 2019 ) have proposed approximations that lead to much better scalability . Please refer to Appexdix A for details . 3 GP REGRESSION WITH NEGATIVE DATAPAIRS . As shown in Fig . 1 , we want the model to avoid certain negative datapairs in its trajectory . In other words , we want the trajectory of the Gaussian Process to have a very low probability of passing through these negative datapairs . In this section , we will first formalize the functional form of the negative datapairs and then subsequently describe our framework called GP-NC regression . 3.1 DEFINITION OF POSITIVE & NEGATIVE DATAPAIRS . Positive datapairs : The set of datapairs through which the GP should pass are defined as positive datapairs . We assume a set of n datapairs ( input , positive target ) with D-dimensional input vectors , X = { x1 , · · · , xn } and corresponding n × 1 vector of target regression values y = { y ( x1 ) , · · · , y ( xn ) } . Negative datapairs : The set of datapairs which the GP should avoid ( obstacles ) are defined as negative datapairs . We assume a set of m datapairs ( input , negative target ) with D-dimensional input vectors X̄ = { x̄1 , · · · , x̄m } and corresponding set of negative targets ȳ = { ȳ ( x̄1 ) , · · · , ȳ ( x̄m ) } . The sample value of GP at input x̄i , given by f ( x̄i ) , should be far from the negative target regression value ȳ ( x̄i ) . Note that it is possible that a particular input x can be in both the positive and negative data pair set . This will happen , when at a particular input we want the GP regression value to be close to its positive target regression value y ( x ) and far from its negative target regression value ȳ ( x ) . 3.2 FUNCTIONAL REPRESENTATION OF NEGATIVE DATAPAIRS . For our framework , we first get a functional representation of the negative datapairs . We define a Gaussian distribution around each of the negative datapair , q ( ȳ|x̄ ) ∼ N ( ȳ ( x̄ ) , σ2neg ) , with mean equal to the negative target value ȳ ( x ) and σ2neg is the variance which is a hyperparameter . The Gaussian blob can also be thought of as the area of influence for the negative datapair with the variance σneg indicating the spread of its influence . | This paper in concerned with Gaussian process regression under constraints that aim to discourage the model from learning certain values (negative constraints). These are called negative data pairs, and the authors propose an extension to the standard GP methodology to incorporate these constraints in the model. This is done by iteratively training a standard GP and maximising the KL between the GP and blobs of the negative data pairs. | SP:7003fdde96baedb55a47e5b42ad8d1866a86f5c7 |
Selective Sensing: A Data-driven Nonuniform Subsampling Approach for Computation-free On-Sensor Data Dimensionality Reduction | 1 INTRODUCTION . In the era of Internet-of-things ( IoT ) data explosion ( Biookaghazadeh et al. , 2018 ) , efficient information acquisition and on-sensor data dimensionality reduction techniques are in great need . Compressive sensing is the state-of-the-art signal sensing technique that is applicable to on-sensor data dimensionality reduction . However , directly performing compressive sensing in the digital domain as a linear transformation of signals can be computationally costly , especially when the signal dimension n is high and/or a data-driven sensing matrixMousavi et al . ( 2017 ; 2018 ) ; Lohit et al . ( 2018 ) ; Wu et al . ( 2018 ) is used . To mitigate this problem , several approaches have been proposed to reduce the computational complexity of compressive sensing by constraining the sensing matrices to be sparse , binary , or ternary ( Wang et al. , 2016 ; Nguyen et al. , 2017 ; Zhao et al. , 2018 ; Hong et al. , 2019 ) . While these approaches can reduce the computational complexity by a constant factor ( O ( cn2 ) , where c can be as low as 10−2 ) , such reduced computational complexity can be still too high to be affordable for resource-constrained sensor devices , e.g. , low-cost IoT sensors ( Djelouat et al. , 2018 ) , or high-data-rate sensor devices dealing with high-dimensional signals , e.g. , LiDAR and depth map ( Chodosh et al. , 2019 ) . Other approaches ( Duarte et al. , 2008 ; Robucci et al. , 2010 ) propose to implement compressive sensing in the analog domain instead , eliminating or reducing the computation cost of compressive sensing through custom hardware implementation . However , such custom hardware implementation inevitably increases the cost of the sensor and is often specific to the sensor design , thereby can not be generally applied to other sensors or applications . In this paper , we propose a selective sensing framework to address the above-mentioned problem by adopting the novel concept of data-driven nonuniform subsampling to reduce the dimensionality of acquired signals while retaining the information of interest in a computation-free fashion . Specifically , the data dimensionality reduction in selective sensing is a nonuniform subsampling ( or selection ) process that simply selects the most informative entries of a signal vector based on an optimized , stationary selection index vector informed by training data . Since no computation is involved for any form of data encoding , the computational complexity of the selective sensing operator is simply O ( 1 ) , leading to the computation-free data dimensionality reduction during the selective sensing process.1 Selective sensing adopts a co-optimization methodology to co-train a selective sensing operator with a subsequent information decoding neural network . As the trainable parameters of the sensing operator ( the selection index ) and the information decoding neural network are discrete- and continuous-valued , respectively , the co-optimization problem in selective sensing is a mixed discrete-continuous optimization problem that is inherently difficult to solve . We propose a feasible solution to solve it by transforming the mixed discrete-continuous optimization problem into two continuous optimization subproblems through interpolation and domain extension techniques . Both of the subproblems can then be efficiently solved using gradient-descent-based algorithms . We take images as the sensing modality and reconstruction as the information decoding task to demonstrate the 1st proof-of-concept of selective sensing . The experiments on CIFAR10 , Set5 and Set14 datasets show that the selective sensing framework can achieve an average reconstruction accuracy improvement in terms of PSNR/SSIM by 3.73dB/0.07 and 9.43dB/0.16 over compressive sensing and uniform subsampling counterparts across the dimensionality reduction ratios of 4-32x , respectively . The contributions of this paper are summarized as follows : 1 . We propose a new on-sensor data dimensionality reduction method called selective sensing . Selective sensing efficiently reduces the dimensionality of acquired signals in a computation-free fashion while retaining information of interest . The computation-free nature of selective sensing makes it a highly suitable solution for performing on-sensor data dimensionality reduction on resourceconstrained sensor devices or high-data-rate sensor devices dealing with high-dimensional signals . 2 . We propose and apply the novel concept of data-driven nonuniform subsampling . Specifically , we first formulate the problem of co-optimizing a selective sensing operator with a subsequent information decoding neural network as a mixed discrete-continuous optimization problem . Furthermore , we propose a viable solution that transforms the problem into two continuous optimization subproblems that can be efficiently solved by gradient-descent-based algorithms , which makes the co-training feasible . 3 . We empirically show that data-driven nonuniform subsampling can well preserve signal information under the presence of a co-trained information decoding network . 2 RELATED WORK . 2.1 NONUNIFORM SUBSAMPLING . Model-based nonuniform subsampling has been proposed in Chepuri et al . ( 2016 ) in the name of sparse sensing . Sparse sensing requires a hand-crafted sparsity model of a signal as prior knowledge . Differently , selective sensing requires no prior knowledge about the sparsity model of a signal , as all the necessary information needed for reconstruction can be learned from data through the training process . Therefore , selective sensing has a much broader range of applications , especially in IoT , than sparse sensing , considering a vast majority of IoT signals are not well studied nor understood yet , but huge amounts of IoT data are already available for training and learning . Dadkhahi & Duarte ( 2014 ) proposes to generate an image mask that can preserve the manifold structure presented in image data . Differently , we focus on the task of single image sensing and reconstruction in this paper . Baldassarre et al . ( 2016 ) ; Weiss et al . ( 2019 ) ; Gözcü et al . ( 2018 ) ; Bahadir et al . ( 2019 ; 2020 ) propose to perform MRI image nonuniform subsampling in k-space ( frequency domain ) . As many spatial-domain signals are much sparser in the frequency domain , e.g. , natural images and MRI images , the existing nonuniform subsampling approaches performed in k-space are insufficient 1For temporal signals , the selection operation can be simply implemented in the digital domain with a counter and a mux that already exists in the control logic of most sensors . We consider such operations as control rather than data computation as no data is computed during the selective sensing process . For spatial signals such as images , the selective sensing operator can also be implemented as a low-cost masked sensor array with no computation involved . In addition , Mayberry et al . ( 2014 ) ; Centeye ( 2020 ) present image sensor architectures for embedded systems that can provide pixel-level control of image sensors . for dealing with dense signals directly in the spatial domain . In addition , the complex computation of or the custom hardware ( Macfaden et al. , 2017 ) for implementing Fourier transformation required in these methods is a deal-breaker for resource-constrained sensor devices and/or high-data-rate sensor devices dealing with high-dimensional signals . Differently , selective sensing works directly in the spatial domain and the selective sensing operators require no computation upon the sensor data at all . Huijben et al . ( 2019 ) propose to co-optimize a probabilistic subsampling mask and a subsequent task-specific neural network in an end-to-end fashion . The sensing mask is dynamically generated from a random distribution with respect to each signal . The computation of generating such masks is hardly affordable for resource-constrained and/or high-data-rate sensor devices . Differently , selective sensing uses a static sensing mask learnt through the co-training algorithm . Once a sensing mask is depolyed to sensor devices , no computation is needed to update the existing mask . Therefore , selective sensing is extremely friendly to resource-constrained or high-data-rate sensors . 2.2 SENSING MATRIX SIMPLIFICATION METHODS . The computational complexity of the linear transformation in compressive sensing is O ( n2 ) . Zhao et al . ( 2018 ) ; Hong et al . ( 2019 ) proposes model-based methods to construct sparse sensing matrices . Wang et al . ( 2016 ) ; Nguyen et al . ( 2017 ) propose data-driven methods to build binary or ternary sensing matrices . However , all these approaches could only reduce the computational complexity by constant factors , i.e . O ( cn2 ) , where c can be as low as 10−2 ) . A key differentiator of selective sensing is that by adopting the novel concept of data-driven non-uniform subsampling , it is computation-free and has a computational complexity of O ( 1 ) . 2.3 DATA-DRIVEN COMPRESSIVE SENSING . Kulkarni et al . ( 2016 ) ; Mousavi & Baraniuk ( 2017 ) ; Yao et al . ( 2019 ) propose to directly learn the inverse mapping of compressive sensing through the training of reconstruction neural network models . In addition , Mousavi et al . ( 2017 ; 2018 ) ; Lohit et al . ( 2018 ) ; Wu et al . ( 2018 ) propose to co-train a customized sensing scheme with a reconstruction neural network to improve the reconstruction accuracy . It should be noted that such co-training algorithms are specific to the reconstruction network proposed in the corresponding literatures . To the best of our knowledge , there is no general co-training algorithm that can be applied to various reconstruction networks in the domain of datadriven compressive sensing . These approaches inspire us to develop a framework that co-trains a selective sensing operator and a subsequent information decoding network . Co-trained signal sensing and reconstruction frameworks can be viewed as a specific type of autoencoders ( Goodfellow et al. , 2016 ) . The main difference between such frameworks and a general autoencoder model is that the sensing ( encoder ) part of such frameworks must be implemented on sensors for on-sensor data dimensionality reduction . Therefore , the computation complexity of the encoder has to be extremely low in order to be affordable for sensor devices . 2.4 IMAGE SUPER-RESOLUTION . The problem of neural-network-based image super-resolution has been studied in recent years ( Ledig et al. , 2017 ; Dong et al. , 2015 ; Yang et al. , 2019 ) . The image super-resolution task is fundamentally different from the image reconstruction task of selective sensing in following two aspects . First , images in super-resolution tasks are uniformly subsampled in the training phase , while images in selective sensing are nonuniformly subsampled . Therefore , the existing network structures for image super-resolution can not be directly applied to perform the image reconstruction task in selective sensing . Second , the downsizing factor of images in super-resolution tasks is only up to 4x to the best of our knowledge in the existing literature . Differently , in selective sensing and reconstruction tasks , the nonuniformly subsampling factor ( compression ratio ) of images can have a much larger range ( 4-32x in this paper ) . 3 METHODOLOGY . In this section , we first formulate the co-optimization of a selective sensing operator and a subsequent information decoding network as a mixed discrete-continuous optimization problem . Then , by applying continuous interpolation and domain extension on the integer variables , we reformulate the mixed discrete-continuous optimization problem into two continuous optimization problems , both of which can be solved by conventional gradient-descent-based algorithms . Based on the new formulation , we extend the conventional backpropagation ( BP ) algorithm to derive a general co-training algorithm to co-optimize a selective sensing operator and a subsequent information decoding network . At last , by taking images as the sensing modality and using reconstruction as the information decoding task , we propose a practical approach , referred to as SS+Net , to compose a selective sensing framework for image selective sensing and reconstruction . In this paper , a lowercase letter denotes a scalar or a scalar-valued function , and a uppercase letter denotes a vector , a matrix , a tensor , or a vector-valued function . We use brackets to index the element of a vector , a matrix , or a tensor . For example , assume X denotes a n-dimensional vector X = [ x0 , ... , xn−1 ] , then X [ i ] = xi for i = 0 , · · · , n− 1 . | The paper proposes a framework for jointly optimizing a selective sensing operator and a neural network for reconstruction. The motivation is to alleviate the quadratic (in dimensions) complexity associated with standard compressive sensing by using a dimension-free selective sensing approach, which can be jointly optimized with the decoder while guaranteeing that the relevant information is preserved. As this formulation yields a mixed discrete-continuous optimization, the authors propose a standard relaxation of the discrete constraints using interpolation. | SP:0c846c2c569a61b5677f5852a5c6bcfba1944d51 |
Selective Sensing: A Data-driven Nonuniform Subsampling Approach for Computation-free On-Sensor Data Dimensionality Reduction | 1 INTRODUCTION . In the era of Internet-of-things ( IoT ) data explosion ( Biookaghazadeh et al. , 2018 ) , efficient information acquisition and on-sensor data dimensionality reduction techniques are in great need . Compressive sensing is the state-of-the-art signal sensing technique that is applicable to on-sensor data dimensionality reduction . However , directly performing compressive sensing in the digital domain as a linear transformation of signals can be computationally costly , especially when the signal dimension n is high and/or a data-driven sensing matrixMousavi et al . ( 2017 ; 2018 ) ; Lohit et al . ( 2018 ) ; Wu et al . ( 2018 ) is used . To mitigate this problem , several approaches have been proposed to reduce the computational complexity of compressive sensing by constraining the sensing matrices to be sparse , binary , or ternary ( Wang et al. , 2016 ; Nguyen et al. , 2017 ; Zhao et al. , 2018 ; Hong et al. , 2019 ) . While these approaches can reduce the computational complexity by a constant factor ( O ( cn2 ) , where c can be as low as 10−2 ) , such reduced computational complexity can be still too high to be affordable for resource-constrained sensor devices , e.g. , low-cost IoT sensors ( Djelouat et al. , 2018 ) , or high-data-rate sensor devices dealing with high-dimensional signals , e.g. , LiDAR and depth map ( Chodosh et al. , 2019 ) . Other approaches ( Duarte et al. , 2008 ; Robucci et al. , 2010 ) propose to implement compressive sensing in the analog domain instead , eliminating or reducing the computation cost of compressive sensing through custom hardware implementation . However , such custom hardware implementation inevitably increases the cost of the sensor and is often specific to the sensor design , thereby can not be generally applied to other sensors or applications . In this paper , we propose a selective sensing framework to address the above-mentioned problem by adopting the novel concept of data-driven nonuniform subsampling to reduce the dimensionality of acquired signals while retaining the information of interest in a computation-free fashion . Specifically , the data dimensionality reduction in selective sensing is a nonuniform subsampling ( or selection ) process that simply selects the most informative entries of a signal vector based on an optimized , stationary selection index vector informed by training data . Since no computation is involved for any form of data encoding , the computational complexity of the selective sensing operator is simply O ( 1 ) , leading to the computation-free data dimensionality reduction during the selective sensing process.1 Selective sensing adopts a co-optimization methodology to co-train a selective sensing operator with a subsequent information decoding neural network . As the trainable parameters of the sensing operator ( the selection index ) and the information decoding neural network are discrete- and continuous-valued , respectively , the co-optimization problem in selective sensing is a mixed discrete-continuous optimization problem that is inherently difficult to solve . We propose a feasible solution to solve it by transforming the mixed discrete-continuous optimization problem into two continuous optimization subproblems through interpolation and domain extension techniques . Both of the subproblems can then be efficiently solved using gradient-descent-based algorithms . We take images as the sensing modality and reconstruction as the information decoding task to demonstrate the 1st proof-of-concept of selective sensing . The experiments on CIFAR10 , Set5 and Set14 datasets show that the selective sensing framework can achieve an average reconstruction accuracy improvement in terms of PSNR/SSIM by 3.73dB/0.07 and 9.43dB/0.16 over compressive sensing and uniform subsampling counterparts across the dimensionality reduction ratios of 4-32x , respectively . The contributions of this paper are summarized as follows : 1 . We propose a new on-sensor data dimensionality reduction method called selective sensing . Selective sensing efficiently reduces the dimensionality of acquired signals in a computation-free fashion while retaining information of interest . The computation-free nature of selective sensing makes it a highly suitable solution for performing on-sensor data dimensionality reduction on resourceconstrained sensor devices or high-data-rate sensor devices dealing with high-dimensional signals . 2 . We propose and apply the novel concept of data-driven nonuniform subsampling . Specifically , we first formulate the problem of co-optimizing a selective sensing operator with a subsequent information decoding neural network as a mixed discrete-continuous optimization problem . Furthermore , we propose a viable solution that transforms the problem into two continuous optimization subproblems that can be efficiently solved by gradient-descent-based algorithms , which makes the co-training feasible . 3 . We empirically show that data-driven nonuniform subsampling can well preserve signal information under the presence of a co-trained information decoding network . 2 RELATED WORK . 2.1 NONUNIFORM SUBSAMPLING . Model-based nonuniform subsampling has been proposed in Chepuri et al . ( 2016 ) in the name of sparse sensing . Sparse sensing requires a hand-crafted sparsity model of a signal as prior knowledge . Differently , selective sensing requires no prior knowledge about the sparsity model of a signal , as all the necessary information needed for reconstruction can be learned from data through the training process . Therefore , selective sensing has a much broader range of applications , especially in IoT , than sparse sensing , considering a vast majority of IoT signals are not well studied nor understood yet , but huge amounts of IoT data are already available for training and learning . Dadkhahi & Duarte ( 2014 ) proposes to generate an image mask that can preserve the manifold structure presented in image data . Differently , we focus on the task of single image sensing and reconstruction in this paper . Baldassarre et al . ( 2016 ) ; Weiss et al . ( 2019 ) ; Gözcü et al . ( 2018 ) ; Bahadir et al . ( 2019 ; 2020 ) propose to perform MRI image nonuniform subsampling in k-space ( frequency domain ) . As many spatial-domain signals are much sparser in the frequency domain , e.g. , natural images and MRI images , the existing nonuniform subsampling approaches performed in k-space are insufficient 1For temporal signals , the selection operation can be simply implemented in the digital domain with a counter and a mux that already exists in the control logic of most sensors . We consider such operations as control rather than data computation as no data is computed during the selective sensing process . For spatial signals such as images , the selective sensing operator can also be implemented as a low-cost masked sensor array with no computation involved . In addition , Mayberry et al . ( 2014 ) ; Centeye ( 2020 ) present image sensor architectures for embedded systems that can provide pixel-level control of image sensors . for dealing with dense signals directly in the spatial domain . In addition , the complex computation of or the custom hardware ( Macfaden et al. , 2017 ) for implementing Fourier transformation required in these methods is a deal-breaker for resource-constrained sensor devices and/or high-data-rate sensor devices dealing with high-dimensional signals . Differently , selective sensing works directly in the spatial domain and the selective sensing operators require no computation upon the sensor data at all . Huijben et al . ( 2019 ) propose to co-optimize a probabilistic subsampling mask and a subsequent task-specific neural network in an end-to-end fashion . The sensing mask is dynamically generated from a random distribution with respect to each signal . The computation of generating such masks is hardly affordable for resource-constrained and/or high-data-rate sensor devices . Differently , selective sensing uses a static sensing mask learnt through the co-training algorithm . Once a sensing mask is depolyed to sensor devices , no computation is needed to update the existing mask . Therefore , selective sensing is extremely friendly to resource-constrained or high-data-rate sensors . 2.2 SENSING MATRIX SIMPLIFICATION METHODS . The computational complexity of the linear transformation in compressive sensing is O ( n2 ) . Zhao et al . ( 2018 ) ; Hong et al . ( 2019 ) proposes model-based methods to construct sparse sensing matrices . Wang et al . ( 2016 ) ; Nguyen et al . ( 2017 ) propose data-driven methods to build binary or ternary sensing matrices . However , all these approaches could only reduce the computational complexity by constant factors , i.e . O ( cn2 ) , where c can be as low as 10−2 ) . A key differentiator of selective sensing is that by adopting the novel concept of data-driven non-uniform subsampling , it is computation-free and has a computational complexity of O ( 1 ) . 2.3 DATA-DRIVEN COMPRESSIVE SENSING . Kulkarni et al . ( 2016 ) ; Mousavi & Baraniuk ( 2017 ) ; Yao et al . ( 2019 ) propose to directly learn the inverse mapping of compressive sensing through the training of reconstruction neural network models . In addition , Mousavi et al . ( 2017 ; 2018 ) ; Lohit et al . ( 2018 ) ; Wu et al . ( 2018 ) propose to co-train a customized sensing scheme with a reconstruction neural network to improve the reconstruction accuracy . It should be noted that such co-training algorithms are specific to the reconstruction network proposed in the corresponding literatures . To the best of our knowledge , there is no general co-training algorithm that can be applied to various reconstruction networks in the domain of datadriven compressive sensing . These approaches inspire us to develop a framework that co-trains a selective sensing operator and a subsequent information decoding network . Co-trained signal sensing and reconstruction frameworks can be viewed as a specific type of autoencoders ( Goodfellow et al. , 2016 ) . The main difference between such frameworks and a general autoencoder model is that the sensing ( encoder ) part of such frameworks must be implemented on sensors for on-sensor data dimensionality reduction . Therefore , the computation complexity of the encoder has to be extremely low in order to be affordable for sensor devices . 2.4 IMAGE SUPER-RESOLUTION . The problem of neural-network-based image super-resolution has been studied in recent years ( Ledig et al. , 2017 ; Dong et al. , 2015 ; Yang et al. , 2019 ) . The image super-resolution task is fundamentally different from the image reconstruction task of selective sensing in following two aspects . First , images in super-resolution tasks are uniformly subsampled in the training phase , while images in selective sensing are nonuniformly subsampled . Therefore , the existing network structures for image super-resolution can not be directly applied to perform the image reconstruction task in selective sensing . Second , the downsizing factor of images in super-resolution tasks is only up to 4x to the best of our knowledge in the existing literature . Differently , in selective sensing and reconstruction tasks , the nonuniformly subsampling factor ( compression ratio ) of images can have a much larger range ( 4-32x in this paper ) . 3 METHODOLOGY . In this section , we first formulate the co-optimization of a selective sensing operator and a subsequent information decoding network as a mixed discrete-continuous optimization problem . Then , by applying continuous interpolation and domain extension on the integer variables , we reformulate the mixed discrete-continuous optimization problem into two continuous optimization problems , both of which can be solved by conventional gradient-descent-based algorithms . Based on the new formulation , we extend the conventional backpropagation ( BP ) algorithm to derive a general co-training algorithm to co-optimize a selective sensing operator and a subsequent information decoding network . At last , by taking images as the sensing modality and using reconstruction as the information decoding task , we propose a practical approach , referred to as SS+Net , to compose a selective sensing framework for image selective sensing and reconstruction . In this paper , a lowercase letter denotes a scalar or a scalar-valued function , and a uppercase letter denotes a vector , a matrix , a tensor , or a vector-valued function . We use brackets to index the element of a vector , a matrix , or a tensor . For example , assume X denotes a n-dimensional vector X = [ x0 , ... , xn−1 ] , then X [ i ] = xi for i = 0 , · · · , n− 1 . | The paper proposes a nonuniform sampling design scheme chosen using training data to reduce the computation of compressed sensing acquisition. The use of learning methods such as back propagation for the nonuniform sampling design problem is interesting. However, compressive sensing approaches in practice do not perform computation to obtain the measurement vector; instead, the sensors rely on custom hardware (such as the single pixel camera or the modulated wideband converter) to have the hardware act on the discretized signal according to the matrix design. Thus, considerations of the "sensing complexity" are moot in those cases, and the approach provided in this paper is only relevant in cases where custom sampling schemes can be designed (e.g., when the referred imaging sensors are used). | SP:0c846c2c569a61b5677f5852a5c6bcfba1944d51 |
Deep Ensemble Kernel Learning | 1 INTRODUCTION . In recent years , there has been a growing interest in Bayesian deep learning ( DL ) , where the point predictions of traditional deep neural network ( DNN ) models are replaced with full predictive distributions using Bayes ’ Rule ( Neal , 2012 ; Wilson , 2020 ) . The advantages of Bayesian DL over traditional DL are numerous and include greater robustness to overfitting and better calibrated uncertainty quantification ( Guo et al. , 2017 ; Kendall & Gal , 2017 ) . Furthermore , the success of traditional DL already rests on a number of probabilistic elements such as stochastic gradient descent ( SGD ) , dropout , and weight initialization– all of which have been given Bayesian interpretations ( Smith & Le , 2018 ; Gal & Ghahramani , 2016 ; Kingma et al. , 2015 ; Schoenholz et al. , 2016 ; Jacot et al. , 2018 ) , so that insights into Bayesian DL may help to advance DL as a whole . Gaussian processes ( GPs ) are nonparametric Bayesian models with appealing properties , as they admit exact inference for regression and allow for a natural functional perspective suitable for predictive modeling ( Rasmussen & Williams , 2005 ) . While at first glance GPs appear unrelated to DL models , a number of interesting connections between GPs and DNNs exist in the literature , suggesting that GPs can constitute a valid approach to Bayesian DL ( Neal , 1996 ; Lee et al. , 2018 ; de Matthews et al. , 2018 ; Jacot et al. , 2018 ; Damianou & Lawrence , 2013 ; Salimbeni & Deisenroth , 2017 ; Agrawal et al. , 2020 ) . A GP prior is typically characterized by its covariance function or “ kernel ” , which determines the class of functions that the GP can model , as well as its generalization properties outside training data . Kernel selection is the primary problem in GP modeling , and unfortunately traditional kernels such as the radial basis function ( RBF ) kernel are not sufficiently expressive for complex problems where more flexible models such as DNNs generally perform well . This is the key motivation for kernel learning , which refers to the selection of an optimal kernel out of a family of kernels in a data-driven way . A number of approaches to kernel learning exist in the literature , including some that parameterize kernels using DNNs ( Zhou et al. , 2019 ; Li et al. , 2019 ; Bullins et al. , 2018 ; Sinha & Duchi , 2016 ) . As these approaches involve learning feature representations , they are fundamentally different from random-feature methods for efficient kernel representation ( Rahimi & Recht , 2007 ; 2008 ) . However , these approaches are not specific to GPs and do not take advantage of a robust Bayesian framework . In contrast , the deep kernel learning ( DKL ) paradigm does exactly this ; In DKL , a DNN is used as a feature extractor that maps data inputs into a latent feature space , where GP inference with some “ base kernel ” is then performed ( Wilson et al. , 2016b ; a ; Jean et al. , 2016 ; Al-Shedivat et al. , 2017 ; Bradshaw et al. , 2017 ; Izmailov et al. , 2018 ; Xuan et al. , 2018 ) . The resulting model is then trained end-to-end using standard gradient-based optimization , usually in a variational framework . We note that the DKL model is just a GP with a highly flexible kernel parameterized by a DNN . By optimizing all hyperparameters ( including the DNN weights ) with type II maximum likelihood estimation , the DKL model is able to learn an optimal kernel in a manner directly informed by the data , while also taking advantage of the robustness granted by the Bayesian framework . A special case of DKL that is worthy of note was considered in Dasgupta et al . ( 2018 ) , who use a linear base kernel and impose a soft orthogonality constraint to learn the eigenfunctions of a kernel . Although similar in spirit to the approach in this paper , their method does not make use of an efficient variational method , nor is distributed training made possible since all of the basis functions are derived from the same feature network . In this work , we introduce the “ deep ensemble kernel learning ” ( DEKL ) model– a simpler and more efficient special case of DKL with two specifications– the base kernel is linear , and the feature network is partitioned into an “ ensemble ” of “ learners ” with common network architecture . In contrast to nonlinear kernels , the linear kernel allows us to derive an efficient training and inference method for DEKL that circumvents the inducing points approximation commonly used in traditional DKL . The hyperparameters of the linear kernel can also be optimized in closed form , allowing us to simplify the loss function considerably . Convenience aside , we show that DEKL remains highly expressive , proving that it is universal in the sense that it can approximate any continuous kernel so long as its feature network is arbitrarily wide . In other words , we may keep the base kernel simple if we are willing to let the feature network be more complex . The second specification of DEKL lets us handle the complexity of the feature network ; because the feature network is partitioned , it admits easy model parallelism , where the learners in the ensemble are distributed . Moreover , our universality result only requires the number of learners to be arbitrarily large ; the learners themselves need not grow ( meaning fixed-capacity learners are sufficient ) , avoiding additional model parallelism . From a different perspective , DEKL may be regarded as an extension of traditional ensembling methods for DNNs and in particular the deep ensemble ( DE ) model of Lakshminarayanan et al . ( 2017 ) , which is also highly parallelizable . In a DE , each DNN learner parameterizes a distribution over the variates ( e.g. , the mean and variance of a Gaussian in regression , or the logits of a softmax vector in classification ) . Each learner is trained independently with maximum likelihood estimation , and the final predictive distribution of the DE is then defined to be a uniform mixture of the individual learner predictive distributions . Although not Bayesian itself , the DE model boasts impressive predictive performance and was shown to outperform Bayesian methods such as probabilistic back propagation ( Hernández-Lobato & Adams , 2015 ) and MC-dropout ( Gal & Ghahramani , 2016 ) . In contrast , in DEKL , the learners are trained jointly via a shared linear GP layer . We surmise that this may help to promote diversity ( i.e. , low correlation ) among the learners by facilitating coordination , which we verify experimentally . Unlike non-Bayesian joint ensemble training methods such as that of Webb et al . ( 2019 ) , we hypothesize that the DEKL learners might learn to diversify in order to better approximate the posterior covariance– an inherently Bayesian feature . We therefore expect DEKL to be more efficient than DKL and more robust than DE , by drawing on the strengths of both ( see Fig . 1 for a comparison of model architectures ) . 2 DEEP ENSEMBLE KERNEL LEARNING . A DKL model is a GP whose kernel encapsulates a DNN for feature extraction ( Wilson et al. , 2016b ; a ) . A deep kernel is defined as Kdeep ( x1 , x2 ; θ , γ ) = Kbase ( ϕ ( x1 ; θ ) , ϕ ( x2 ; θ ) ; γ ) , ( 1 ) where ϕ ( · ; θ ) is a DNN with weight parameters θ and Kbase ( · , · ; γ ) is any chosen kernel—called the “ base kernel ” —with hyperparameters γ . Note that the kernel hyperparameters of Kdeep include all hyperparameters γ of the base kernel Kbase as well as the DNN weight parameters θ ; Given the expressive power of DNNs , the deep kernel is also highly expressive and may be viewed as a method to automatically select a GP model . Our proposed method , DEKL , is a special case of DKL . Whereas RBF and Matern kernels are typically used as base kernels in DKL , in DEKL we take the base kernel to be the linear kernel : Klin ( x1 , x2 ; V ) = x > 1 V x2 , ( 2 ) where V is a symmetric positive-semidefinite matrix . In order to enable parallel computation , in DEKL , we use a feature network ϕ ( · ; θ ) that is partitioned into an “ ensemble ” of subnetworks ϕi ( · ; θi ) called “ learners ” , having identical network architectures ; i.e. , ϕ ( · ; θ ) is the concatenation of the outputs of the ϕi ( · ; θi ) . DEKL offers a number of advantages over general DKL : 1 . Unlike the hyperparameters of the RBF kernel , in DEKL , we can optimize the hyperparameters of the linear base kernel in closed form . 2 . The linear base kernel allows us to think of a DEKL model not just as a GP but as a finitedimensional Bayesian linear model ( BLM ) , conditional on the feature networks ; this lets us derive an efficient inference method that is much simpler than the inducing points method used in general DKL . 3 . Finally , the partitioned architecture of the feature network makes it much more amenable to model parallelism . Note that DEKL is fundamentally different from random-feature methods such as that of Rahimi & Recht ( 2008 ) , where the learners ϕ ( · ; θi ) are random features that are not optimized during training . A potential drawback to partitioning the feature network as we do in DEKL is that , compared to general DKL , the network is less expressive . However , the following universal approximation theorem for DKL implies that this effect can be compensated by adding parallel learners : Theorem 1 ( Universal kernel approximation theorem ) . Let X ⊂ RD be some compact Euclidean domain , and let σ : R → R be a non-polynomial activation function ( Pinkus , 1999 ) . Then , given a continuous , symmetric , positive-definite kernel κ : X × X 7→ R and any > 0 , there exist a finite number H of affine functions βi : X aff.−−−→ R and a symmetric positive semi-definite matrix V ∈ RH×H such that for any x1 , x2 ∈ X , ∣∣∣∣∣∣ H∑ i , j=1 vijσ ( βi ( x1 ) ) σ ( βj ( x2 ) ) − κ ( x1 , x2 ) ∣∣∣∣∣∣ < . ( 3 ) The proof , found in Appendix A , contains a straightforward combination of Mercer ’ s Theorem ( Mercer , 1909 ) and the Universal Approximation Theorem , attributed to Cybenko , Hornik , Leshno , and Pinkus ( Cybenko , 1989 ; Hornik et al. , 1989 ; Leshno et al. , 1993 ; Pinkus , 1999 ) . Note that Thm . 1 lets us represent non-stationary continuous kernels , in contrast to methods such as random Fourier feature expansion ( Rahimi & Recht , 2007 ) . The approximation in Thm . 1 requires a possibly large number H of affine functions βi . However , in DEKL we replace the functions x → σ ( βi ( x ) ) with an ensemble of strictly more flexible DNN learners ϕ ( · ; θi ) , which can help to reduce the numberH of learners required ; in the proof of Thm . 1 , we approximate each eigenfunction of the target kernel κ with a linear combination of the learners ; if the learners are sufficiently expressive , then it may take only one learner per eigenfunction to approximate the target kernel . We also allow each learner ϕ ( · ; θi ) to have multiple outputs M . In the case of the simple learners x → σ ( βi ( x ) ) , a learner with M outputs is simply a concatenation of M single-output learners , suggesting that multi-output learners may help to further reduce the number H of required learners . The summation in Eq . 3 should be understood as a deep kernel as in Eq . 1 , where the DNN ϕ in Eq . 1 is the concatenation of all learners and the base kernel is given by the linear kernel in Eq . 2 . Theorem 1 is thus a statement about the universality of DEKL with a linear base kernel . Given that other kernels such as the RBF are more popular choices of base kernel in the DKL literature , it is natural to wonder if DEKL remains a universal kernel approximator if we change the base kernel . It turns out that not all choices of base kernel give universality , as is implied by the following remark . Remark 2 . For a deep kernel ( Eq . 1 ) with base kernel Kbase : RH × RH 7→ R to be a universal kernel approximator , the base kernel must be unbounded both above and below . We give more details in Appendix B , but intuitively , since the base kernel is the outermost function in the deep kernel , any bound on its range will prevent the deep kernel from approximating kernels with unbounded range , such as the dot product kernel . The class of base kernels with bounded ( or half-bounded ) range , and thus the base kernels that do not give universality , is large and includes many popular kernels such as the RBF kernel and periodic kernel . The linear base kernel in Eq . 2 is therefore special , as it is not only convenient but also grants us universality . We note the converse of Remark 2 is not true ; an unbounded base kernel does not guarantee that a DEKL model is a universal kernel approximator . For example , restricting the matrix V in the linear base kernel ( Eq . 2 ) to a diagonal matrix breaks universality ; this is because Thm . 1 must hold for even the simplest learners x→ σ ( βi ( x ) ) , which fails to happen when we restrict V ( see Appendix B for details ) . Classifying all base kernels for which DEKL is universal remains an important open problem for future work . | The authors introduce a deep ensemble kernel learning approach as a linear-based learning combination, from a deep learning scheme, to approximate kernel functions under a Bayesian (GP) framework. Namely, a universal kernel approximation strategy is proposed from eigen-based decomposition and deep learning-based function composition. Then, a variational inference strategy is used to solve the optimization from kernel-based mappings. Two regularization strategies are studied: optimal prior covariance and isotropic covariance. Results demonstrate the benefits of the proposal. | SP:5fff81a3906d13d4a4105e509b399c203d8e1d58 |
Deep Ensemble Kernel Learning | 1 INTRODUCTION . In recent years , there has been a growing interest in Bayesian deep learning ( DL ) , where the point predictions of traditional deep neural network ( DNN ) models are replaced with full predictive distributions using Bayes ’ Rule ( Neal , 2012 ; Wilson , 2020 ) . The advantages of Bayesian DL over traditional DL are numerous and include greater robustness to overfitting and better calibrated uncertainty quantification ( Guo et al. , 2017 ; Kendall & Gal , 2017 ) . Furthermore , the success of traditional DL already rests on a number of probabilistic elements such as stochastic gradient descent ( SGD ) , dropout , and weight initialization– all of which have been given Bayesian interpretations ( Smith & Le , 2018 ; Gal & Ghahramani , 2016 ; Kingma et al. , 2015 ; Schoenholz et al. , 2016 ; Jacot et al. , 2018 ) , so that insights into Bayesian DL may help to advance DL as a whole . Gaussian processes ( GPs ) are nonparametric Bayesian models with appealing properties , as they admit exact inference for regression and allow for a natural functional perspective suitable for predictive modeling ( Rasmussen & Williams , 2005 ) . While at first glance GPs appear unrelated to DL models , a number of interesting connections between GPs and DNNs exist in the literature , suggesting that GPs can constitute a valid approach to Bayesian DL ( Neal , 1996 ; Lee et al. , 2018 ; de Matthews et al. , 2018 ; Jacot et al. , 2018 ; Damianou & Lawrence , 2013 ; Salimbeni & Deisenroth , 2017 ; Agrawal et al. , 2020 ) . A GP prior is typically characterized by its covariance function or “ kernel ” , which determines the class of functions that the GP can model , as well as its generalization properties outside training data . Kernel selection is the primary problem in GP modeling , and unfortunately traditional kernels such as the radial basis function ( RBF ) kernel are not sufficiently expressive for complex problems where more flexible models such as DNNs generally perform well . This is the key motivation for kernel learning , which refers to the selection of an optimal kernel out of a family of kernels in a data-driven way . A number of approaches to kernel learning exist in the literature , including some that parameterize kernels using DNNs ( Zhou et al. , 2019 ; Li et al. , 2019 ; Bullins et al. , 2018 ; Sinha & Duchi , 2016 ) . As these approaches involve learning feature representations , they are fundamentally different from random-feature methods for efficient kernel representation ( Rahimi & Recht , 2007 ; 2008 ) . However , these approaches are not specific to GPs and do not take advantage of a robust Bayesian framework . In contrast , the deep kernel learning ( DKL ) paradigm does exactly this ; In DKL , a DNN is used as a feature extractor that maps data inputs into a latent feature space , where GP inference with some “ base kernel ” is then performed ( Wilson et al. , 2016b ; a ; Jean et al. , 2016 ; Al-Shedivat et al. , 2017 ; Bradshaw et al. , 2017 ; Izmailov et al. , 2018 ; Xuan et al. , 2018 ) . The resulting model is then trained end-to-end using standard gradient-based optimization , usually in a variational framework . We note that the DKL model is just a GP with a highly flexible kernel parameterized by a DNN . By optimizing all hyperparameters ( including the DNN weights ) with type II maximum likelihood estimation , the DKL model is able to learn an optimal kernel in a manner directly informed by the data , while also taking advantage of the robustness granted by the Bayesian framework . A special case of DKL that is worthy of note was considered in Dasgupta et al . ( 2018 ) , who use a linear base kernel and impose a soft orthogonality constraint to learn the eigenfunctions of a kernel . Although similar in spirit to the approach in this paper , their method does not make use of an efficient variational method , nor is distributed training made possible since all of the basis functions are derived from the same feature network . In this work , we introduce the “ deep ensemble kernel learning ” ( DEKL ) model– a simpler and more efficient special case of DKL with two specifications– the base kernel is linear , and the feature network is partitioned into an “ ensemble ” of “ learners ” with common network architecture . In contrast to nonlinear kernels , the linear kernel allows us to derive an efficient training and inference method for DEKL that circumvents the inducing points approximation commonly used in traditional DKL . The hyperparameters of the linear kernel can also be optimized in closed form , allowing us to simplify the loss function considerably . Convenience aside , we show that DEKL remains highly expressive , proving that it is universal in the sense that it can approximate any continuous kernel so long as its feature network is arbitrarily wide . In other words , we may keep the base kernel simple if we are willing to let the feature network be more complex . The second specification of DEKL lets us handle the complexity of the feature network ; because the feature network is partitioned , it admits easy model parallelism , where the learners in the ensemble are distributed . Moreover , our universality result only requires the number of learners to be arbitrarily large ; the learners themselves need not grow ( meaning fixed-capacity learners are sufficient ) , avoiding additional model parallelism . From a different perspective , DEKL may be regarded as an extension of traditional ensembling methods for DNNs and in particular the deep ensemble ( DE ) model of Lakshminarayanan et al . ( 2017 ) , which is also highly parallelizable . In a DE , each DNN learner parameterizes a distribution over the variates ( e.g. , the mean and variance of a Gaussian in regression , or the logits of a softmax vector in classification ) . Each learner is trained independently with maximum likelihood estimation , and the final predictive distribution of the DE is then defined to be a uniform mixture of the individual learner predictive distributions . Although not Bayesian itself , the DE model boasts impressive predictive performance and was shown to outperform Bayesian methods such as probabilistic back propagation ( Hernández-Lobato & Adams , 2015 ) and MC-dropout ( Gal & Ghahramani , 2016 ) . In contrast , in DEKL , the learners are trained jointly via a shared linear GP layer . We surmise that this may help to promote diversity ( i.e. , low correlation ) among the learners by facilitating coordination , which we verify experimentally . Unlike non-Bayesian joint ensemble training methods such as that of Webb et al . ( 2019 ) , we hypothesize that the DEKL learners might learn to diversify in order to better approximate the posterior covariance– an inherently Bayesian feature . We therefore expect DEKL to be more efficient than DKL and more robust than DE , by drawing on the strengths of both ( see Fig . 1 for a comparison of model architectures ) . 2 DEEP ENSEMBLE KERNEL LEARNING . A DKL model is a GP whose kernel encapsulates a DNN for feature extraction ( Wilson et al. , 2016b ; a ) . A deep kernel is defined as Kdeep ( x1 , x2 ; θ , γ ) = Kbase ( ϕ ( x1 ; θ ) , ϕ ( x2 ; θ ) ; γ ) , ( 1 ) where ϕ ( · ; θ ) is a DNN with weight parameters θ and Kbase ( · , · ; γ ) is any chosen kernel—called the “ base kernel ” —with hyperparameters γ . Note that the kernel hyperparameters of Kdeep include all hyperparameters γ of the base kernel Kbase as well as the DNN weight parameters θ ; Given the expressive power of DNNs , the deep kernel is also highly expressive and may be viewed as a method to automatically select a GP model . Our proposed method , DEKL , is a special case of DKL . Whereas RBF and Matern kernels are typically used as base kernels in DKL , in DEKL we take the base kernel to be the linear kernel : Klin ( x1 , x2 ; V ) = x > 1 V x2 , ( 2 ) where V is a symmetric positive-semidefinite matrix . In order to enable parallel computation , in DEKL , we use a feature network ϕ ( · ; θ ) that is partitioned into an “ ensemble ” of subnetworks ϕi ( · ; θi ) called “ learners ” , having identical network architectures ; i.e. , ϕ ( · ; θ ) is the concatenation of the outputs of the ϕi ( · ; θi ) . DEKL offers a number of advantages over general DKL : 1 . Unlike the hyperparameters of the RBF kernel , in DEKL , we can optimize the hyperparameters of the linear base kernel in closed form . 2 . The linear base kernel allows us to think of a DEKL model not just as a GP but as a finitedimensional Bayesian linear model ( BLM ) , conditional on the feature networks ; this lets us derive an efficient inference method that is much simpler than the inducing points method used in general DKL . 3 . Finally , the partitioned architecture of the feature network makes it much more amenable to model parallelism . Note that DEKL is fundamentally different from random-feature methods such as that of Rahimi & Recht ( 2008 ) , where the learners ϕ ( · ; θi ) are random features that are not optimized during training . A potential drawback to partitioning the feature network as we do in DEKL is that , compared to general DKL , the network is less expressive . However , the following universal approximation theorem for DKL implies that this effect can be compensated by adding parallel learners : Theorem 1 ( Universal kernel approximation theorem ) . Let X ⊂ RD be some compact Euclidean domain , and let σ : R → R be a non-polynomial activation function ( Pinkus , 1999 ) . Then , given a continuous , symmetric , positive-definite kernel κ : X × X 7→ R and any > 0 , there exist a finite number H of affine functions βi : X aff.−−−→ R and a symmetric positive semi-definite matrix V ∈ RH×H such that for any x1 , x2 ∈ X , ∣∣∣∣∣∣ H∑ i , j=1 vijσ ( βi ( x1 ) ) σ ( βj ( x2 ) ) − κ ( x1 , x2 ) ∣∣∣∣∣∣ < . ( 3 ) The proof , found in Appendix A , contains a straightforward combination of Mercer ’ s Theorem ( Mercer , 1909 ) and the Universal Approximation Theorem , attributed to Cybenko , Hornik , Leshno , and Pinkus ( Cybenko , 1989 ; Hornik et al. , 1989 ; Leshno et al. , 1993 ; Pinkus , 1999 ) . Note that Thm . 1 lets us represent non-stationary continuous kernels , in contrast to methods such as random Fourier feature expansion ( Rahimi & Recht , 2007 ) . The approximation in Thm . 1 requires a possibly large number H of affine functions βi . However , in DEKL we replace the functions x → σ ( βi ( x ) ) with an ensemble of strictly more flexible DNN learners ϕ ( · ; θi ) , which can help to reduce the numberH of learners required ; in the proof of Thm . 1 , we approximate each eigenfunction of the target kernel κ with a linear combination of the learners ; if the learners are sufficiently expressive , then it may take only one learner per eigenfunction to approximate the target kernel . We also allow each learner ϕ ( · ; θi ) to have multiple outputs M . In the case of the simple learners x → σ ( βi ( x ) ) , a learner with M outputs is simply a concatenation of M single-output learners , suggesting that multi-output learners may help to further reduce the number H of required learners . The summation in Eq . 3 should be understood as a deep kernel as in Eq . 1 , where the DNN ϕ in Eq . 1 is the concatenation of all learners and the base kernel is given by the linear kernel in Eq . 2 . Theorem 1 is thus a statement about the universality of DEKL with a linear base kernel . Given that other kernels such as the RBF are more popular choices of base kernel in the DKL literature , it is natural to wonder if DEKL remains a universal kernel approximator if we change the base kernel . It turns out that not all choices of base kernel give universality , as is implied by the following remark . Remark 2 . For a deep kernel ( Eq . 1 ) with base kernel Kbase : RH × RH 7→ R to be a universal kernel approximator , the base kernel must be unbounded both above and below . We give more details in Appendix B , but intuitively , since the base kernel is the outermost function in the deep kernel , any bound on its range will prevent the deep kernel from approximating kernels with unbounded range , such as the dot product kernel . The class of base kernels with bounded ( or half-bounded ) range , and thus the base kernels that do not give universality , is large and includes many popular kernels such as the RBF kernel and periodic kernel . The linear base kernel in Eq . 2 is therefore special , as it is not only convenient but also grants us universality . We note the converse of Remark 2 is not true ; an unbounded base kernel does not guarantee that a DEKL model is a universal kernel approximator . For example , restricting the matrix V in the linear base kernel ( Eq . 2 ) to a diagonal matrix breaks universality ; this is because Thm . 1 must hold for even the simplest learners x→ σ ( βi ( x ) ) , which fails to happen when we restrict V ( see Appendix B for details ) . Classifying all base kernels for which DEKL is universal remains an important open problem for future work . | This paper proposes a variant of the Deep Kernel Learning model (DKL) [1] where multiple independent networks are trained for the features instead of a single network. In addition, the paper proposes to use a linear kernel as a base kernel which allows for universal approximation of any arbitrary kernel, as well as allowing for exact inference of the kernel hyperparameters. The use of stochastic variational inference is proposed for inferring the neural networks weights. The model is compared against Deep Ensemble (DE) and DKL on a synthetic dataset and the UCI dataset. | SP:5fff81a3906d13d4a4105e509b399c203d8e1d58 |
SAFENet: A Secure, Accurate and Fast Neural Network Inference | 1 INTRODUCTION . Neural network inference as a service ( NNaaS ) is an effective method for users to acquire various intelligent services from powerful servers . NNaaS includes many emerging , intelligent , client-server applications such as smart speakers , voice assistants , and image classifications Mishra et al . ( 2020 ) . However , to complete the intelligent service , the clients need to upload their raw data to the model holders . The network model holders in the server are able to access , process users ’ confidential data from the clients , and acquire the raw inference results , which potentially violates the privacy of clients . So there is an urgent requirement to ensure the confidentiality of users ’ financial records , healthy-care data and other sensitive information during NNaaS . Modern cryptography such as Homomorphic Encryption ( HE ) by Gentry et al . ( 2009 ) and MultiParty Computation ( MPC ) by Yao ( 1982 ) enables secure inference services that protect the user ’ s private data . During secure inference services , the provider ’ s model is not released to any users and the user ’ s private data is encrypted by HE or MPC . CryptoNets proposed by Gilad-Bachrach et al . ( 2016 ) is the first HE-based secure neural network on encrypted data ; however , its practicality is limited by enormous computational overhead . For example , CryptoNets takes ∼ 298 seconds to perform one secure MNIST image inference on a powerful server ; its latency is 6 orders of magnitude longer than the unencrypted inference . MiniONN by Liu et al . ( 2017 ) and Gazelle by Juvekar et al . ( 2018 ) prove that using a hybrid of HE and MPC it is possible to design a lowlatency , secure inference . Although Gazelle significantly reduces the MNIST inference latency of CryptoNets into ∼ 0.3 seconds , it is still far from practical on larger dataset such as CIFAR-10 and CIFAR-100 , due to heavy HE encryption protocol and expensive operations . For instance , Gazelle requires ∼ 240 seconds latency and ∼ 8.3 GB communication to perform ResNet-32 on the CIFAR-100 dataset . NASS by Bian et al . ( 2020 ) , CONAD by Shafran et al . ( 2019 ) and CryptoNAS by Ghodsi et al . ( 2020 ) are proposed to design cryptography-friendly neural network architectures , but they still suffer from heavy encryption protocol in the online phase . Delphi by Mishra et al . ( 2020 ) significantly reduces the online latency by moving most heavy cryptography computations into the offline phase . Offline computations can be pre-processed in advance . The State-of-the-art cryptographic inference service Delphi by Mishra et al . ( 2020 ) still suffers from enormous online latency ; this is because a big communication overhead between the user and the service provider is required to support cryptographic ReLU activations . Our experiments show that the communication overhead is proportional to ReLU units in the whole neural network . Delphi attempts to reduce inference latency by replacing expensive ReLU with cheap polynomial approximation . Unfortunately , most ReLU units are found to be difficult to substitute without incurring a loss of accuracy . The accuracy will be dramatically decreased as more ReLU units are approximated by polynomials . Specifically , Delphi only replaces ∼ 42 % ReLU numbers on a CNN-7 network ( detailed in Section 6.2 of MiniONN by Liu et al . ( 2017 ) ) and ∼ 20 % ReLU numbers on ResNet-32 network , with < 1 % accuracy decrease . When Delphi approximates more ReLU units , > 3 % inference accuracy will be lost compared to an all-ReLU model . If accuracy loss is constrained , non-linear layers still occupy almost 62 % to 74 % total latency in CNN-7 and ResNet32 networks . Therefore , slow , non-linear layers are still the obstacle of a fast and accurate secure inference . Our contribution . One key observation is that the layer-wise activation approximation strategy in Delphi is too coarse-grained to replace the bottleneck layers in which theReLU units are mainly located , e.g . the first layer in CNN-7 occupies > 58 % ReLU units . The channels in bottleneck layers are difficult to completely replace without a small accuracy loss . To meet accuracy constraints and speedup secure inference , SAFENet includes a more fine-grained channel-wise activation approximation to keep the most useful activation channels within each layer and replace the remaining , less important , activation channels by polynomials . In this way , only partial channels in each layer will be approximated , which is approximate-friendly for bottleneck layers . Another contribution of SAFENet is that automatic multiple-degree polynomial exploration in each layer is supported , compared to prior works using only degree-2 polynomials . Additionally , SAFENet enables mixedprecision activation approximation by assigning different approximation ratios to various layers , which further replaces more ReLU units with cheap polynomials . Our results show that under the same accuracy constraints , SAFENet obtains state-of-the-art inference latency , reducing latency by 38 % ∼ 61 % , or improving accuracy by 1.8 % ∼ 4 % over the prior techniques . 2 BACKGROUND AND RELATED WORK . Threat Model and Cryptographic Primitives . Our threat model is the same as previous work Delphi by Mishra et al . ( 2020 ) . More specifically , we consider the service holder as a semi-honest cloud which attempts to infer clients input information but follows the protocol . The server holds the Convolutional Neural Network ( CNN ) model and the client holds the input to the network . For linear computations , the client encrypts input and sends it to the server using a HE scheme by Mishra et al . ( 2020 ) , and then the server returns encrypted output to the client . The client decrypts and decodes the received output . The secret sharing ( SS ) in Delphi is used to protect the privacy of intermediate results in the hidden layers . Then garbled circuits ( GC ) guarantees the data privacy in the activation layers , and SS is used to securely combine HE and GC . Other than GC , Beaver ’ s multiplicative Triples ( BT ) proposed by Beaver ( 1995 ) is used to implement approximated activation using secure polynomials . BT-based polynomial approximation for ReLU is 3-orders of magnitude cheaper than GC-based ReLU units on average , so it is used to design approximated secure activation function . At the end of secure inference , the server has learned nothing but the client learns the inference result . More details of cryptographic primitives can be found in Appendix A.1 . 2.1 CRYPTOGRAPHIC INFERENCE .. Modern neural networks usually consist of linear convolution layers and non-linear activation layers . As Figure 1a shows , current state-of-the-art cryptographic inference , Delphi by Mishra et al . ( 2020 ) , Offline : . has an offline phase and an online phase . The offline phase is independent of input data and is used to prepare data for the subsequent online phase . Each phase has linear and non-linear operations . 1 . Offline linear layer . During the offline linear process , the client samples a random matrix rt that has the same shape with private input xt , and then sends its encryption [ rt ] to server . The server processes homomorphic convolutions and returns [ rt ] ∗Wt − [ ut ] to client , where Wt is the t-layer network weights and [ ut ] is a ciphertext of sampled matrix by server . The last step in the offline linear layer is that client obtains Ct = rt ·Wt − ut which is one part of secret sharing of xt ·Wt . 2 . Online linear layer . The online linear phase aims to let the server obtain St = ( xt−rt ) ·Wt+ut which is the other secret sharing part of xt ·Wt . It is almost as fast as the unencrypted computation , since the online input is a plaintext xt − rt . 3 . Offline Layer-Wise Activation layer . Delphi supports a layer-wise activation function where each activation layer either is ReLU based on GC or is the approximated polynomial based on BT . During the offline phase , GC needs to generate and share the garbled circuits . BT needs to generate and share the Beaver ’ s triples . 4 . Online Layer-Wise Activation layer . During the online phase of layer-wise activation , ReLU is either performed by GC or the approximated degree-2 polynomial . The latency of approximated activation implemented by BT is 192× smaller than ReLU based on GC . Latency Bottleneck and Motivation . Figure 1b shows our baseline Delphi suffers from long latency and low accuracy under coarse-grained layer-wise activation approximation . Specifically , 0L in Figure 1b means none of theReLU layers and 0 % ReLU units are approximated by polynomials . The activation latency takes 72.5 % of total latency . For only the online phase , activation latency occupies∼ 99 % of the online latency . Therefore , activation layers are the performance bottleneck . 0L also shows the all-ReLU model achieves 85.1 % accuracy . With increased approximation layer numbers , Delphi is able to improve the approximation ratios , but the inference accuracy is decreased at the same time . With the 84.5 % accuracy constraints , Delphi at most replaces 6-layer ReLU layers , with an approximation ratio of ∼ 42 % ReLU units . Figure 2 shows the reason why the approximation ratio is so low ( 42 % ) ; it is difficult to totally replace the ReLU units by polynomials in the bottleneck layer that has > 58 % ReLU units without a large decrease in accuracy . The ReLU units in modern networks are mainly located in the first few layers , and the ReLU numbers are usually decreased exponentially as shown in Figure 2 . Especially for much deeper neural networks on a large dataset , replacing the firstReLU layer significantly decreases the accuracy . To solve the above problems , we propose a more fine-grained channel-wise activation approximation method which is modelled as a hyper-parameter optimization problem . 2.2 POPULATION BASED TRAINING ( PBT ) .. Inspired from evolutionary algorithms , Population Based Training ( PBT ) proposed by Jaderberg et al . ( 2017 ) is a more efficient method to jointly optimize model weights and user-specified hyper-parameters automatically during training . Many Reinforcement Learning ( RL ) based hyperparameter optimization algorithms by Wang et al . ( 2019 ) and Lou et al . ( 2020 ) are not able to efficiently optimize hyper-parameters , since they simply stop training prematurely and consider partially trained accuracy as the final accuracy or reward . The details of PBT can be seen in ap- pendix A.2 and PBT by Jaderberg et al . ( 2017 ) . In this paper , we model the channel-wise activation approximation task as a hyper-parameter optimization problem . Features TAPAS Gazelle NASS CONAD Delphi CryptoNAS InstaHide SAFENet Strong Encryption 3 3 3 3 3 3 7 3 Batched HE 7 3 3 3 3 3 - 3 Optimized Activation 3 7 7 3 3 3 - 3 Channel-Wise 7 7 7 7 7 7 - 3 Mixed-Precision 7 7 7 7 7 7 - 3 Multiple-Degrees 7 7 7 7 7 7 - 3 Table 1 : Cryptographic inference works . 0 2 4 6 Layer 0 10 20 30 40 50 60 Ne ur on s ( % ) can not be fully approx . Figure 2 : Neurons ratio . 2.3 COMPARISON WITH PRIOR WORKS .. Table 1 shows a comparison between prior works and SAFENet . TAPAS by Sanyal et al . ( 2018 ) , XONN by Riazi et al . ( 2019 ) and soteria by Aggarwal et al . ( 2020 ) focus on binary neural networks which uses sign ( ) function instead of the ReLU activation , thereby suffering from inference accuracy loss . And TAPAS by Sanyal et al . ( 2018 ) and SHE by Lou & Jiang ( 2019 ) suffer from long-latency linear operations since they adapt a HE scheme called TFHE by Chillotti et al . ( 2018 ) that does not support ciphertext batching operations yet . For example , TAPAS and SHE take ∼2 hour and ∼10 seconds respectively to perform one single MNIST inference with 99 % accuracy . In contrast , our work SAFENet and Gazelle using the hybrid of batched HE and MPC are able to achieve < 1-second latency with > 99 % accuracy . Gazelle by Juvekar et al . ( 2018 ) and MiniONN prove the feasibility of the hybrid use of GC and HE , but they both suffer from enormous latency . NASS by Bian et al . ( 2020 ) , CONAD by Shafran et al . ( 2019 ) , and CryptoNAS by Ghodsi et al . ( 2020 ) try to improve Gazelle and MiniONN ’ s performance by the co-design of neural network architectures and cryptographic protocol , but they all require a heavy , online , cryptographic phase . Delphi by Mishra et al . ( 2020 ) reduces online latency by moving some online operations into the offline phase and replacing layer-wise activation by degree-2 polynomials . Only our SAFENet supports more fine-grained , channel-wise , activation approximation with multiple-degree polynomial exploration , shown in Table 1 . SAFENet also enables the mixed-precision approximation ratios for different layers . Other than MPC and HE based neural networks , InstaHide by Huang et al . ( 2020b ) and TextHide by Huang et al . ( 2020a ) use a class of subset-sum type encryption by Bhattacharyya et al . ( 2011 ) to protect the user ’ s sensitive data in machine learning service with only < 5 % computational overhead and little accuracy loss . However , an attack by Carlini et al . ( 2020 ) shows that there is a potential security risk on the InstaHide . Compared to the light-weight methods InstaHide and TextHide , MPC and HE provide much stronger security guarantees . | The main contribution of this paper is a new heuristic for identifying "less useful" activation channels. The authors then propose using simple approximations for activation functions for these channels without compromising network accuracy. The main novelty in the approximation used by the authors is flexibility in the degree of the polynomial approximation. Additionally, the authors propose a new hyper-parameter search strategy (BTPBT) to efficiently search the hyper-parameter space for the optimal approximation parameters. | SP:476e903197a3f3861692dfaa7136c5a274414e73 |
SAFENet: A Secure, Accurate and Fast Neural Network Inference | 1 INTRODUCTION . Neural network inference as a service ( NNaaS ) is an effective method for users to acquire various intelligent services from powerful servers . NNaaS includes many emerging , intelligent , client-server applications such as smart speakers , voice assistants , and image classifications Mishra et al . ( 2020 ) . However , to complete the intelligent service , the clients need to upload their raw data to the model holders . The network model holders in the server are able to access , process users ’ confidential data from the clients , and acquire the raw inference results , which potentially violates the privacy of clients . So there is an urgent requirement to ensure the confidentiality of users ’ financial records , healthy-care data and other sensitive information during NNaaS . Modern cryptography such as Homomorphic Encryption ( HE ) by Gentry et al . ( 2009 ) and MultiParty Computation ( MPC ) by Yao ( 1982 ) enables secure inference services that protect the user ’ s private data . During secure inference services , the provider ’ s model is not released to any users and the user ’ s private data is encrypted by HE or MPC . CryptoNets proposed by Gilad-Bachrach et al . ( 2016 ) is the first HE-based secure neural network on encrypted data ; however , its practicality is limited by enormous computational overhead . For example , CryptoNets takes ∼ 298 seconds to perform one secure MNIST image inference on a powerful server ; its latency is 6 orders of magnitude longer than the unencrypted inference . MiniONN by Liu et al . ( 2017 ) and Gazelle by Juvekar et al . ( 2018 ) prove that using a hybrid of HE and MPC it is possible to design a lowlatency , secure inference . Although Gazelle significantly reduces the MNIST inference latency of CryptoNets into ∼ 0.3 seconds , it is still far from practical on larger dataset such as CIFAR-10 and CIFAR-100 , due to heavy HE encryption protocol and expensive operations . For instance , Gazelle requires ∼ 240 seconds latency and ∼ 8.3 GB communication to perform ResNet-32 on the CIFAR-100 dataset . NASS by Bian et al . ( 2020 ) , CONAD by Shafran et al . ( 2019 ) and CryptoNAS by Ghodsi et al . ( 2020 ) are proposed to design cryptography-friendly neural network architectures , but they still suffer from heavy encryption protocol in the online phase . Delphi by Mishra et al . ( 2020 ) significantly reduces the online latency by moving most heavy cryptography computations into the offline phase . Offline computations can be pre-processed in advance . The State-of-the-art cryptographic inference service Delphi by Mishra et al . ( 2020 ) still suffers from enormous online latency ; this is because a big communication overhead between the user and the service provider is required to support cryptographic ReLU activations . Our experiments show that the communication overhead is proportional to ReLU units in the whole neural network . Delphi attempts to reduce inference latency by replacing expensive ReLU with cheap polynomial approximation . Unfortunately , most ReLU units are found to be difficult to substitute without incurring a loss of accuracy . The accuracy will be dramatically decreased as more ReLU units are approximated by polynomials . Specifically , Delphi only replaces ∼ 42 % ReLU numbers on a CNN-7 network ( detailed in Section 6.2 of MiniONN by Liu et al . ( 2017 ) ) and ∼ 20 % ReLU numbers on ResNet-32 network , with < 1 % accuracy decrease . When Delphi approximates more ReLU units , > 3 % inference accuracy will be lost compared to an all-ReLU model . If accuracy loss is constrained , non-linear layers still occupy almost 62 % to 74 % total latency in CNN-7 and ResNet32 networks . Therefore , slow , non-linear layers are still the obstacle of a fast and accurate secure inference . Our contribution . One key observation is that the layer-wise activation approximation strategy in Delphi is too coarse-grained to replace the bottleneck layers in which theReLU units are mainly located , e.g . the first layer in CNN-7 occupies > 58 % ReLU units . The channels in bottleneck layers are difficult to completely replace without a small accuracy loss . To meet accuracy constraints and speedup secure inference , SAFENet includes a more fine-grained channel-wise activation approximation to keep the most useful activation channels within each layer and replace the remaining , less important , activation channels by polynomials . In this way , only partial channels in each layer will be approximated , which is approximate-friendly for bottleneck layers . Another contribution of SAFENet is that automatic multiple-degree polynomial exploration in each layer is supported , compared to prior works using only degree-2 polynomials . Additionally , SAFENet enables mixedprecision activation approximation by assigning different approximation ratios to various layers , which further replaces more ReLU units with cheap polynomials . Our results show that under the same accuracy constraints , SAFENet obtains state-of-the-art inference latency , reducing latency by 38 % ∼ 61 % , or improving accuracy by 1.8 % ∼ 4 % over the prior techniques . 2 BACKGROUND AND RELATED WORK . Threat Model and Cryptographic Primitives . Our threat model is the same as previous work Delphi by Mishra et al . ( 2020 ) . More specifically , we consider the service holder as a semi-honest cloud which attempts to infer clients input information but follows the protocol . The server holds the Convolutional Neural Network ( CNN ) model and the client holds the input to the network . For linear computations , the client encrypts input and sends it to the server using a HE scheme by Mishra et al . ( 2020 ) , and then the server returns encrypted output to the client . The client decrypts and decodes the received output . The secret sharing ( SS ) in Delphi is used to protect the privacy of intermediate results in the hidden layers . Then garbled circuits ( GC ) guarantees the data privacy in the activation layers , and SS is used to securely combine HE and GC . Other than GC , Beaver ’ s multiplicative Triples ( BT ) proposed by Beaver ( 1995 ) is used to implement approximated activation using secure polynomials . BT-based polynomial approximation for ReLU is 3-orders of magnitude cheaper than GC-based ReLU units on average , so it is used to design approximated secure activation function . At the end of secure inference , the server has learned nothing but the client learns the inference result . More details of cryptographic primitives can be found in Appendix A.1 . 2.1 CRYPTOGRAPHIC INFERENCE .. Modern neural networks usually consist of linear convolution layers and non-linear activation layers . As Figure 1a shows , current state-of-the-art cryptographic inference , Delphi by Mishra et al . ( 2020 ) , Offline : . has an offline phase and an online phase . The offline phase is independent of input data and is used to prepare data for the subsequent online phase . Each phase has linear and non-linear operations . 1 . Offline linear layer . During the offline linear process , the client samples a random matrix rt that has the same shape with private input xt , and then sends its encryption [ rt ] to server . The server processes homomorphic convolutions and returns [ rt ] ∗Wt − [ ut ] to client , where Wt is the t-layer network weights and [ ut ] is a ciphertext of sampled matrix by server . The last step in the offline linear layer is that client obtains Ct = rt ·Wt − ut which is one part of secret sharing of xt ·Wt . 2 . Online linear layer . The online linear phase aims to let the server obtain St = ( xt−rt ) ·Wt+ut which is the other secret sharing part of xt ·Wt . It is almost as fast as the unencrypted computation , since the online input is a plaintext xt − rt . 3 . Offline Layer-Wise Activation layer . Delphi supports a layer-wise activation function where each activation layer either is ReLU based on GC or is the approximated polynomial based on BT . During the offline phase , GC needs to generate and share the garbled circuits . BT needs to generate and share the Beaver ’ s triples . 4 . Online Layer-Wise Activation layer . During the online phase of layer-wise activation , ReLU is either performed by GC or the approximated degree-2 polynomial . The latency of approximated activation implemented by BT is 192× smaller than ReLU based on GC . Latency Bottleneck and Motivation . Figure 1b shows our baseline Delphi suffers from long latency and low accuracy under coarse-grained layer-wise activation approximation . Specifically , 0L in Figure 1b means none of theReLU layers and 0 % ReLU units are approximated by polynomials . The activation latency takes 72.5 % of total latency . For only the online phase , activation latency occupies∼ 99 % of the online latency . Therefore , activation layers are the performance bottleneck . 0L also shows the all-ReLU model achieves 85.1 % accuracy . With increased approximation layer numbers , Delphi is able to improve the approximation ratios , but the inference accuracy is decreased at the same time . With the 84.5 % accuracy constraints , Delphi at most replaces 6-layer ReLU layers , with an approximation ratio of ∼ 42 % ReLU units . Figure 2 shows the reason why the approximation ratio is so low ( 42 % ) ; it is difficult to totally replace the ReLU units by polynomials in the bottleneck layer that has > 58 % ReLU units without a large decrease in accuracy . The ReLU units in modern networks are mainly located in the first few layers , and the ReLU numbers are usually decreased exponentially as shown in Figure 2 . Especially for much deeper neural networks on a large dataset , replacing the firstReLU layer significantly decreases the accuracy . To solve the above problems , we propose a more fine-grained channel-wise activation approximation method which is modelled as a hyper-parameter optimization problem . 2.2 POPULATION BASED TRAINING ( PBT ) .. Inspired from evolutionary algorithms , Population Based Training ( PBT ) proposed by Jaderberg et al . ( 2017 ) is a more efficient method to jointly optimize model weights and user-specified hyper-parameters automatically during training . Many Reinforcement Learning ( RL ) based hyperparameter optimization algorithms by Wang et al . ( 2019 ) and Lou et al . ( 2020 ) are not able to efficiently optimize hyper-parameters , since they simply stop training prematurely and consider partially trained accuracy as the final accuracy or reward . The details of PBT can be seen in ap- pendix A.2 and PBT by Jaderberg et al . ( 2017 ) . In this paper , we model the channel-wise activation approximation task as a hyper-parameter optimization problem . Features TAPAS Gazelle NASS CONAD Delphi CryptoNAS InstaHide SAFENet Strong Encryption 3 3 3 3 3 3 7 3 Batched HE 7 3 3 3 3 3 - 3 Optimized Activation 3 7 7 3 3 3 - 3 Channel-Wise 7 7 7 7 7 7 - 3 Mixed-Precision 7 7 7 7 7 7 - 3 Multiple-Degrees 7 7 7 7 7 7 - 3 Table 1 : Cryptographic inference works . 0 2 4 6 Layer 0 10 20 30 40 50 60 Ne ur on s ( % ) can not be fully approx . Figure 2 : Neurons ratio . 2.3 COMPARISON WITH PRIOR WORKS .. Table 1 shows a comparison between prior works and SAFENet . TAPAS by Sanyal et al . ( 2018 ) , XONN by Riazi et al . ( 2019 ) and soteria by Aggarwal et al . ( 2020 ) focus on binary neural networks which uses sign ( ) function instead of the ReLU activation , thereby suffering from inference accuracy loss . And TAPAS by Sanyal et al . ( 2018 ) and SHE by Lou & Jiang ( 2019 ) suffer from long-latency linear operations since they adapt a HE scheme called TFHE by Chillotti et al . ( 2018 ) that does not support ciphertext batching operations yet . For example , TAPAS and SHE take ∼2 hour and ∼10 seconds respectively to perform one single MNIST inference with 99 % accuracy . In contrast , our work SAFENet and Gazelle using the hybrid of batched HE and MPC are able to achieve < 1-second latency with > 99 % accuracy . Gazelle by Juvekar et al . ( 2018 ) and MiniONN prove the feasibility of the hybrid use of GC and HE , but they both suffer from enormous latency . NASS by Bian et al . ( 2020 ) , CONAD by Shafran et al . ( 2019 ) , and CryptoNAS by Ghodsi et al . ( 2020 ) try to improve Gazelle and MiniONN ’ s performance by the co-design of neural network architectures and cryptographic protocol , but they all require a heavy , online , cryptographic phase . Delphi by Mishra et al . ( 2020 ) reduces online latency by moving some online operations into the offline phase and replacing layer-wise activation by degree-2 polynomials . Only our SAFENet supports more fine-grained , channel-wise , activation approximation with multiple-degree polynomial exploration , shown in Table 1 . SAFENet also enables the mixed-precision approximation ratios for different layers . Other than MPC and HE based neural networks , InstaHide by Huang et al . ( 2020b ) and TextHide by Huang et al . ( 2020a ) use a class of subset-sum type encryption by Bhattacharyya et al . ( 2011 ) to protect the user ’ s sensitive data in machine learning service with only < 5 % computational overhead and little accuracy loss . However , an attack by Carlini et al . ( 2020 ) shows that there is a potential security risk on the InstaHide . Compared to the light-weight methods InstaHide and TextHide , MPC and HE provide much stronger security guarantees . | The paper present a system for two-party deep learning inference. The main contribution is activation layers that are more expensive in two-party computation are replaced by approximations dynamically based on the training data. To this end, the authors use a divide-and-conquer approach to gauge the impact of replacing activation functions of some layers by a version more amenable to secure computation. Furthermore, the algorithm also considers various degrees for approximation (0, 2, and 3). Experiments show that this reduces the latency by up to two thirds while maintaining a similar accuracy. | SP:476e903197a3f3861692dfaa7136c5a274414e73 |
Learning Consistent Deep Generative Models from Sparse Data via Prediction Constraints | We develop a new framework for learning variational autoencoders and other deep generative models that balances generative and discriminative goals . Our framework optimizes model parameters to maximize a variational lower bound on the likelihood of observed data , subject to a task-specific prediction constraint that prevents model misspecification from leading to inaccurate predictions . We further enforce a consistency constraint , derived naturally from the generative model , that requires predictions on reconstructed data to match those on the original data . We show that these two contributions – prediction constraints and consistency constraints – lead to promising image classification performance , especially in the semi-supervised scenario where category labels are sparse but unlabeled data is plentiful . Our approach enables advances in generative modeling to directly boost semi-supervised classification performance , an ability we demonstrate by augmenting deep generative models with latent variables capturing spatial transformations . 1 INTRODUCTION . We develop broadly applicable methods for learning flexible models of high-dimensional data , like images , that are paired with ( discrete or continuous ) labels . We are particularly interested in semisupervised learning ( Zhu , 2005 ; Oliver et al. , 2018 ) from data that is sparsely labeled , a common situation in practice due to the cost or privacy concerns associated with data annotation . Given a large and sparsely labeled dataset , we seek a single probabilistic model that simultaneously makes good predictions of labels and provides a high-quality generative model of the high-dimensional input data . Strong generative models are valuable because they can allow incorporation of domain knowledge , can address partially missing or corrupted data , and can be visualized to improve interpretability . Prior approaches for the semi-supervised learning of deep generative models include methods based on variational autoencoders ( VAEs ) ( Kingma et al. , 2014 ; Siddharth et al. , 2017 ) , generative adversarial networks ( GANs ) ( Dumoulin et al. , 2017 ; Kumar et al. , 2017 ) , and hybrids of the two ( Larsen et al. , 2016 ; de Bem et al. , 2018 ; Zhang et al. , 2019 ) . While these all allow sampling of data , a major shortcoming of these approaches is that they do not adequately use labels to inform the generative model . Furthermore , GAN-based approaches lack the ability to evaluate the learned probability density function , which can be important for tasks such as model selection and anomaly detection . This paper develops a framework for training prediction constrained variational autoencoders ( PC-VAEs ) that minimize application-motivated loss functions in the prediction of labels , while simultaneously learning high-quality generative models of the raw data . Our approach is inspired by the prediction-constrained framework recently proposed for learning supervised topic models of “ bag of words ” count data ( Hughes et al. , 2018 ) , but differs in four major ways . First , we develop scalable algorithms for learning a much larger and richer family of deep generative models . Second , we capture uncertainty in latent variables rather than simply using point estimates . Third , we allow more flexible specification of loss functions . Finally , we show that the generative model structure leads to a natural consistency constraint vital for semi-supervised learning from very sparse labels . Our experiments demonstrate that consistent prediction-constrained ( CPC ) VAE training leads to prediction performance competitive with state-of-the-art discriminative methods on fully-labeled datasets , and excels over these baselines when given semi-supervised datasets where labels are rare . 2 BACKGROUND : DEEP GENERATIVE MODELS AND SEMI-SUPERVISION . We now describe VAEs as deep generative models and review previous methods for semi-supervised learning ( SSL ) of VAEs , highlighting weaknesses that we later improve upon . We assume all SSL tasks provide two training datasets : an unsupervised ( or unlabeled ) dataset DU of N feature vectors x , and a supervised ( or labeled ) dataset DS containing M pairs ( x , y ) of features x and label y ∈ Y . Labels are often sparse ( N M ) and can be discrete or continuous . 2.1 UNSUPERVISED GENERATIVE MODELING WITH THE VAE . The variational autoencoder ( Kingma & Welling , 2014 ) is an unsupervised model with two components : a generative model and an inference model . The generative model defines for each example a joint distribution pθ ( x , z ) over “ features ” ( observed vector x ∈ RD ) and “ encodings ” ( hidden vector z ∈ RC ) . The “ inference model ” of the VAE defines an approximate posterior qφ ( z | x ) , which is trained to be close to the true posterior ( qφ ( z | x ) ≈ pθ ( z | x ) ) but much easier to evaluate . As in Kingma & Welling ( 2014 ) , we assume the following conditional independence structure : pθ ( x , z ) = N ( z | 0 , IC ) · F ( x | µθ ( z ) , σθ ( z ) ) , qφ ( z | x ) = N ( z | µφ ( x ) , σφ ( x ) ) . ( 1 ) The likelihood F is often multivariate normal , but other distributions may give robustness to outliers . The ( deterministic ) functions µθ and σθ , with trainable parameters θ , define the mean and covariance of the likelihood . Given any observation x , the posterior of z is approximated as normal with mean µφ and ( diagonal ) covariance σφ parameterized by φ . These functions can be represented as multi-layer perceptrons ( MLPs ) , convolutional neural networks ( CNNs ) , or other ( deep ) neural networks . We would ideally learn generative parameters θ by maximizing the marginal likelihood of features x , integrating latent variable z . Since this is intractable , we instead maximize a variational lower bound : max θ , φ ∑ x∈D LVAE ( x ; θ , φ ) , LVAE ( x ; θ , φ ) = Eqφ ( z|x ) [ log pθ ( x , z ) qφ ( z|x ) ] ≤ log pθ ( x ) . ( 2 ) This expectation can be evaluated via Monte Carlo samples from the inference model qφ ( z|x ) . Gradients with respect to θ , φ can be similarly estimated by the reparameterization “ trick ” of representing qφ ( z | x ) as a linear transformation of standard normal variables ( Kingma & Welling , 2014 ) . Throughout this paper , we denote variational parameters by φ . Because the factorization of q changes for more complex models , we will write φz|x to denote the parameters specific to factor q ( z|x ) . 2.2 TWO-STAGE SSL : MAXIMIZE FEATURE LIKELIHOOD THEN TRAIN PREDICTOR . One way to employ the VAE for a semi-supervised task is a two-stage “ VAE-then-MLP ” . First , train a VAE to maximize the unsupervised likelihood ( 2 ) of all observed features x ( both labeled DS and unlabeled DU ) . Second , we define a label-from-code predictor ŷw ( z ) that maps each learned code representation z to a predicted label y ∈ Y . We use an MLP with weights w , though any predictor could do . Let ` S ( y , ŷ ) be a loss function , such as cross-entropy , appropriate for the prediction task . We train the predictor to minimize the loss : minw ∑ x , y∈DS Eqφ ( z|x ) [ ` S ( y , ŷw ( z ) ) ] . Importantly , this second stage uses only the small labeled dataset and relies on fixed parameters φ from stage one . While “ VAE-then-MLP ” is a simple common baseline ( Kingma et al. , 2014 ) , it has a key disadvantage : Labels are only used in the second stage , and thus a misspecified generative model in stage one will likely produce inferior predictions . Fig . 1 illustrates this weakness . 2.3 SEMI-SUPERVISED VAES : MAXIMIZE JOINT LIKELIHOOD OF LABELS AND FEATURES . To overcome the weakness of the two-stage approach , previous work by Kingma et al . ( 2014 ) presented a VAE-inspired model called “ M2 ” focused on the joint generative modeling of labels y and data x. M2 has two components : a generative model pθ ( x , y , z ) and an inference model qφ ( y , z | x ) . Their generative model is factorized to sample labels ( with frequencies π ) first , and then features x : pθ ( x , y , z ) = N ( z | 0 , IC ) · Cat ( y | π ) · F ( x | µθ ( y , z ) , σθ ( y , z ) ) . ( 3 ) The M2 inference model sets qφ ( y , z | x ) = qφy|x ( y | x ) qφz|x , y ( z | x , y ) , where φ = ( φy|x , φz|x , y ) . To train M2 , Kingma et al . ( 2014 ) maximize the likelihood of all observations ( labels and features ) : max θ , φy|x , φz|x , y ∑ x , y∈DS LS ( x , y ; θ , φz|x , y ) + ∑ x∈DU LU ( x ; θ , φy|x , φz|x , y ) . ( 4 ) The first , “ supervised ” term in Eq . ( 4 ) is a variational bound for the feature-and-label joint likelihood : LS ( x , y ; θ , φz|x , y ) = Eq φz|x , y ( z|x , y ) [ log pθ ( x , y , z ) q φz|x , y ( z|x , y ) ] ≤ log pθ ( x , y ) . ( 5 ) The second , “ unsupervised ” term is a variational lower bound for the features-only likelihood log pθ ( x ) ≥ LU , where LU = Eqφ ( y , z|x ) [ log pθ ( x , y , z ) qφ ( y , z|x ) ] can be simply expressed in terms of LS : LU ( x ; θ , φy|x , φz|x , y ) = ∑ y∈Y qφy|x ( y | x ) ( LS ( x , y ; θ , φz|x , y ) − log qφy|x ( y | x ) ) . ( 6 ) As with the unsupervised VAE , both terms in the objective can be computed via Monte Carlo sampling from the variational posterior , and gradients can be estimated via the reparameterization trick . M2 ’ s prediction dilemma and heuristic fix . After training parameters θ , φ , we need to predict labels y given test data x. M2 ’ s structure assumes we make predictions via the inference model ’ s discriminator density qφy|x ( y | x ) . However , the discriminator ’ s parameter φy|x is only informed by the unlabeled data when using the objective above ( it is not used to compute LS ) . We can not expect accurate predictions from a parameter that does not touch any labeled examples in the training set . To partially overcome this issue , Kingma et al . ( 2014 ) and later work use a weighted objective : max θ , φ ∑ x , y∈DS ( α log qφy|x ( y | x ) + λLS ( x , y ; θ , φz|x , y ) ) + ∑ x∈DU LU ( x ; θ , φy|x , φz|x , y ) . ( 7 ) This objective biases the inference model ’ s discriminator to do well on the labeled set via an extra loss term ( weighted by hyperparameter α > 0 ) . We can further include λ > 0 to balance the supervised and unsupervised terms . Originally , Kingma et al . ( 2014 ) fix λ = 1 and tune α to achieve good performance . Later , Siddharth et al . ( 2017 ) tuned λ to improve performance . Maaløe et al . ( 2016 ) used this same α log q ( y | x ) term for labeled data to train VAEs with auxiliary variables . Disadvantage : What Justification ? While the LS and LU terms in Eq . ( 7 ) have a rigorous justification as maximizing the data likelihood under the assumed generative model , the first term ( α log q ( y | x ) ) is not justified by the generative or inference model . In particular , suppose the training data were fully labeled : we would ignore the LU terms altogether , and the remaining terms would decouple the parameters θ , φz|x , y from the discriminator parameters φy|x . This is deeply unsatisfying : We want a single model guided by both generative and discriminative goals , not two separate models . Even in partially-labeled scenarios , including this α term does not adequately balance generative and discriminative goals , as we demonstrate in later examples . An overly flexible yet misspecified generative model may go astray and compromise predictions . Disadvantage : Runtime Cost . Another disadvantage is that the computation of LU in Eq . ( 6 ) is expensive . If labels are discrete , computing this sum exactly is possible but requires a sum over all L = |Y| possible class labels , computing a Monte Carlo estimate of LS for each one . While Monte Carlo approximations can avoid the explicit sum in Eq . ( 6 ) , they may make gradients too noisy . Extensions . Siddharth et al . ( 2017 ) showed how LS and LU could be extended to any desired conditional independence structure for qφ ( y , z | x ) , generalizing the label-then-code factorization qφ ( y | x ) qφ ( z | x , y ) of Kingma et al . ( 2014 ) . While importance sampling leads to likelihood bounds , the overall objective still has two undesirable traits . First , it is expensive , requiring either marginalization of y to compute LU in Eq . ( 6 ) or marginalization of z to compute q ( y|x ) = ∫ qφ ( y , z|x ) dz . Second , the approach requires the heuristic inclusion of the discriminator loss α log q ( y | x ) . While recent parallel work by Gordon & Hernández-Lobato ( 2020 ) also tries to improve SSL for VAEs , their approach couples discriminative and generative terms only distantly through a joint prior over parameters and still requires expensive sums over labels when computing generative likelihoods . | The paper proposes a framework for semi-supervised settings to leverage both unlabeled data and (limited) labeled data where VAEs are trained subject to regularization terms from label information. More specifically, the proposed method trains a VAE and a NN classifier simultaneously by optimizing an objective that consists of the usual (unsupervised) variational lower bound, classification error for the labeled data based on the latent space, and consistency term for all data encouraging the same prediction for latent representations corresponding to the original and reconstructed version of a data point. The proposed method is compared with a few other deep generative semi-supervised learning methods on three image datasets. | SP:3761ec50c1dd06a108e7dc1a6b56b205b61d00c0 |
Learning Consistent Deep Generative Models from Sparse Data via Prediction Constraints | We develop a new framework for learning variational autoencoders and other deep generative models that balances generative and discriminative goals . Our framework optimizes model parameters to maximize a variational lower bound on the likelihood of observed data , subject to a task-specific prediction constraint that prevents model misspecification from leading to inaccurate predictions . We further enforce a consistency constraint , derived naturally from the generative model , that requires predictions on reconstructed data to match those on the original data . We show that these two contributions – prediction constraints and consistency constraints – lead to promising image classification performance , especially in the semi-supervised scenario where category labels are sparse but unlabeled data is plentiful . Our approach enables advances in generative modeling to directly boost semi-supervised classification performance , an ability we demonstrate by augmenting deep generative models with latent variables capturing spatial transformations . 1 INTRODUCTION . We develop broadly applicable methods for learning flexible models of high-dimensional data , like images , that are paired with ( discrete or continuous ) labels . We are particularly interested in semisupervised learning ( Zhu , 2005 ; Oliver et al. , 2018 ) from data that is sparsely labeled , a common situation in practice due to the cost or privacy concerns associated with data annotation . Given a large and sparsely labeled dataset , we seek a single probabilistic model that simultaneously makes good predictions of labels and provides a high-quality generative model of the high-dimensional input data . Strong generative models are valuable because they can allow incorporation of domain knowledge , can address partially missing or corrupted data , and can be visualized to improve interpretability . Prior approaches for the semi-supervised learning of deep generative models include methods based on variational autoencoders ( VAEs ) ( Kingma et al. , 2014 ; Siddharth et al. , 2017 ) , generative adversarial networks ( GANs ) ( Dumoulin et al. , 2017 ; Kumar et al. , 2017 ) , and hybrids of the two ( Larsen et al. , 2016 ; de Bem et al. , 2018 ; Zhang et al. , 2019 ) . While these all allow sampling of data , a major shortcoming of these approaches is that they do not adequately use labels to inform the generative model . Furthermore , GAN-based approaches lack the ability to evaluate the learned probability density function , which can be important for tasks such as model selection and anomaly detection . This paper develops a framework for training prediction constrained variational autoencoders ( PC-VAEs ) that minimize application-motivated loss functions in the prediction of labels , while simultaneously learning high-quality generative models of the raw data . Our approach is inspired by the prediction-constrained framework recently proposed for learning supervised topic models of “ bag of words ” count data ( Hughes et al. , 2018 ) , but differs in four major ways . First , we develop scalable algorithms for learning a much larger and richer family of deep generative models . Second , we capture uncertainty in latent variables rather than simply using point estimates . Third , we allow more flexible specification of loss functions . Finally , we show that the generative model structure leads to a natural consistency constraint vital for semi-supervised learning from very sparse labels . Our experiments demonstrate that consistent prediction-constrained ( CPC ) VAE training leads to prediction performance competitive with state-of-the-art discriminative methods on fully-labeled datasets , and excels over these baselines when given semi-supervised datasets where labels are rare . 2 BACKGROUND : DEEP GENERATIVE MODELS AND SEMI-SUPERVISION . We now describe VAEs as deep generative models and review previous methods for semi-supervised learning ( SSL ) of VAEs , highlighting weaknesses that we later improve upon . We assume all SSL tasks provide two training datasets : an unsupervised ( or unlabeled ) dataset DU of N feature vectors x , and a supervised ( or labeled ) dataset DS containing M pairs ( x , y ) of features x and label y ∈ Y . Labels are often sparse ( N M ) and can be discrete or continuous . 2.1 UNSUPERVISED GENERATIVE MODELING WITH THE VAE . The variational autoencoder ( Kingma & Welling , 2014 ) is an unsupervised model with two components : a generative model and an inference model . The generative model defines for each example a joint distribution pθ ( x , z ) over “ features ” ( observed vector x ∈ RD ) and “ encodings ” ( hidden vector z ∈ RC ) . The “ inference model ” of the VAE defines an approximate posterior qφ ( z | x ) , which is trained to be close to the true posterior ( qφ ( z | x ) ≈ pθ ( z | x ) ) but much easier to evaluate . As in Kingma & Welling ( 2014 ) , we assume the following conditional independence structure : pθ ( x , z ) = N ( z | 0 , IC ) · F ( x | µθ ( z ) , σθ ( z ) ) , qφ ( z | x ) = N ( z | µφ ( x ) , σφ ( x ) ) . ( 1 ) The likelihood F is often multivariate normal , but other distributions may give robustness to outliers . The ( deterministic ) functions µθ and σθ , with trainable parameters θ , define the mean and covariance of the likelihood . Given any observation x , the posterior of z is approximated as normal with mean µφ and ( diagonal ) covariance σφ parameterized by φ . These functions can be represented as multi-layer perceptrons ( MLPs ) , convolutional neural networks ( CNNs ) , or other ( deep ) neural networks . We would ideally learn generative parameters θ by maximizing the marginal likelihood of features x , integrating latent variable z . Since this is intractable , we instead maximize a variational lower bound : max θ , φ ∑ x∈D LVAE ( x ; θ , φ ) , LVAE ( x ; θ , φ ) = Eqφ ( z|x ) [ log pθ ( x , z ) qφ ( z|x ) ] ≤ log pθ ( x ) . ( 2 ) This expectation can be evaluated via Monte Carlo samples from the inference model qφ ( z|x ) . Gradients with respect to θ , φ can be similarly estimated by the reparameterization “ trick ” of representing qφ ( z | x ) as a linear transformation of standard normal variables ( Kingma & Welling , 2014 ) . Throughout this paper , we denote variational parameters by φ . Because the factorization of q changes for more complex models , we will write φz|x to denote the parameters specific to factor q ( z|x ) . 2.2 TWO-STAGE SSL : MAXIMIZE FEATURE LIKELIHOOD THEN TRAIN PREDICTOR . One way to employ the VAE for a semi-supervised task is a two-stage “ VAE-then-MLP ” . First , train a VAE to maximize the unsupervised likelihood ( 2 ) of all observed features x ( both labeled DS and unlabeled DU ) . Second , we define a label-from-code predictor ŷw ( z ) that maps each learned code representation z to a predicted label y ∈ Y . We use an MLP with weights w , though any predictor could do . Let ` S ( y , ŷ ) be a loss function , such as cross-entropy , appropriate for the prediction task . We train the predictor to minimize the loss : minw ∑ x , y∈DS Eqφ ( z|x ) [ ` S ( y , ŷw ( z ) ) ] . Importantly , this second stage uses only the small labeled dataset and relies on fixed parameters φ from stage one . While “ VAE-then-MLP ” is a simple common baseline ( Kingma et al. , 2014 ) , it has a key disadvantage : Labels are only used in the second stage , and thus a misspecified generative model in stage one will likely produce inferior predictions . Fig . 1 illustrates this weakness . 2.3 SEMI-SUPERVISED VAES : MAXIMIZE JOINT LIKELIHOOD OF LABELS AND FEATURES . To overcome the weakness of the two-stage approach , previous work by Kingma et al . ( 2014 ) presented a VAE-inspired model called “ M2 ” focused on the joint generative modeling of labels y and data x. M2 has two components : a generative model pθ ( x , y , z ) and an inference model qφ ( y , z | x ) . Their generative model is factorized to sample labels ( with frequencies π ) first , and then features x : pθ ( x , y , z ) = N ( z | 0 , IC ) · Cat ( y | π ) · F ( x | µθ ( y , z ) , σθ ( y , z ) ) . ( 3 ) The M2 inference model sets qφ ( y , z | x ) = qφy|x ( y | x ) qφz|x , y ( z | x , y ) , where φ = ( φy|x , φz|x , y ) . To train M2 , Kingma et al . ( 2014 ) maximize the likelihood of all observations ( labels and features ) : max θ , φy|x , φz|x , y ∑ x , y∈DS LS ( x , y ; θ , φz|x , y ) + ∑ x∈DU LU ( x ; θ , φy|x , φz|x , y ) . ( 4 ) The first , “ supervised ” term in Eq . ( 4 ) is a variational bound for the feature-and-label joint likelihood : LS ( x , y ; θ , φz|x , y ) = Eq φz|x , y ( z|x , y ) [ log pθ ( x , y , z ) q φz|x , y ( z|x , y ) ] ≤ log pθ ( x , y ) . ( 5 ) The second , “ unsupervised ” term is a variational lower bound for the features-only likelihood log pθ ( x ) ≥ LU , where LU = Eqφ ( y , z|x ) [ log pθ ( x , y , z ) qφ ( y , z|x ) ] can be simply expressed in terms of LS : LU ( x ; θ , φy|x , φz|x , y ) = ∑ y∈Y qφy|x ( y | x ) ( LS ( x , y ; θ , φz|x , y ) − log qφy|x ( y | x ) ) . ( 6 ) As with the unsupervised VAE , both terms in the objective can be computed via Monte Carlo sampling from the variational posterior , and gradients can be estimated via the reparameterization trick . M2 ’ s prediction dilemma and heuristic fix . After training parameters θ , φ , we need to predict labels y given test data x. M2 ’ s structure assumes we make predictions via the inference model ’ s discriminator density qφy|x ( y | x ) . However , the discriminator ’ s parameter φy|x is only informed by the unlabeled data when using the objective above ( it is not used to compute LS ) . We can not expect accurate predictions from a parameter that does not touch any labeled examples in the training set . To partially overcome this issue , Kingma et al . ( 2014 ) and later work use a weighted objective : max θ , φ ∑ x , y∈DS ( α log qφy|x ( y | x ) + λLS ( x , y ; θ , φz|x , y ) ) + ∑ x∈DU LU ( x ; θ , φy|x , φz|x , y ) . ( 7 ) This objective biases the inference model ’ s discriminator to do well on the labeled set via an extra loss term ( weighted by hyperparameter α > 0 ) . We can further include λ > 0 to balance the supervised and unsupervised terms . Originally , Kingma et al . ( 2014 ) fix λ = 1 and tune α to achieve good performance . Later , Siddharth et al . ( 2017 ) tuned λ to improve performance . Maaløe et al . ( 2016 ) used this same α log q ( y | x ) term for labeled data to train VAEs with auxiliary variables . Disadvantage : What Justification ? While the LS and LU terms in Eq . ( 7 ) have a rigorous justification as maximizing the data likelihood under the assumed generative model , the first term ( α log q ( y | x ) ) is not justified by the generative or inference model . In particular , suppose the training data were fully labeled : we would ignore the LU terms altogether , and the remaining terms would decouple the parameters θ , φz|x , y from the discriminator parameters φy|x . This is deeply unsatisfying : We want a single model guided by both generative and discriminative goals , not two separate models . Even in partially-labeled scenarios , including this α term does not adequately balance generative and discriminative goals , as we demonstrate in later examples . An overly flexible yet misspecified generative model may go astray and compromise predictions . Disadvantage : Runtime Cost . Another disadvantage is that the computation of LU in Eq . ( 6 ) is expensive . If labels are discrete , computing this sum exactly is possible but requires a sum over all L = |Y| possible class labels , computing a Monte Carlo estimate of LS for each one . While Monte Carlo approximations can avoid the explicit sum in Eq . ( 6 ) , they may make gradients too noisy . Extensions . Siddharth et al . ( 2017 ) showed how LS and LU could be extended to any desired conditional independence structure for qφ ( y , z | x ) , generalizing the label-then-code factorization qφ ( y | x ) qφ ( z | x , y ) of Kingma et al . ( 2014 ) . While importance sampling leads to likelihood bounds , the overall objective still has two undesirable traits . First , it is expensive , requiring either marginalization of y to compute LU in Eq . ( 6 ) or marginalization of z to compute q ( y|x ) = ∫ qφ ( y , z|x ) dz . Second , the approach requires the heuristic inclusion of the discriminator loss α log q ( y | x ) . While recent parallel work by Gordon & Hernández-Lobato ( 2020 ) also tries to improve SSL for VAEs , their approach couples discriminative and generative terms only distantly through a joint prior over parameters and still requires expensive sums over labels when computing generative likelihoods . | This paper proposes a new VAE framework for semi-supervised problems, which uses the latent representation \\(z\\) to reconstruct input image \\(x\\) and to serve as the features for the classification of the label of \\(x\\). Based on this framework, the paper also proposes additional "cycle" losses, where the label prediction based on \\(\overline{z}\\) of \\(\overline{x}\\) is close to the true label (for data with supervisions) or the label of \\(x\\) (for data without supervisions). In addition, the paper also introduces another loss term of "aggregate label consistency" and applies other techniques including noise likelihood and STN. The proposed approach outperforms M1 and M2 of Kingma et al. 2014 on the synthetic dataset and shows more stability than M1 and M2. It seems that the performance advantage of the proposed method over others is not very significant on real datasets. | SP:3761ec50c1dd06a108e7dc1a6b56b205b61d00c0 |
On Dynamic Noise Influence in Differential Private Learning | 1 INTRODUCTION . In the era of big data , privacy protection in machine learning systems is becoming a crucial topic as increasing personal data involved in training models ( Dwork et al. , 2020 ) and the presence of malicious attackers ( Shokri et al. , 2017 ; Fredrikson et al. , 2015 ) . In response to the growing demand , differential-private ( DP ) machine learning ( Dwork et al. , 2006 ) provides a computational framework for privacy protection and has been widely studied in various settings , including both convex and non-convex optimization ( Wang et al. , 2017 ; 2019 ; Jain et al. , 2019 ) . One widely used procedure for privacy-preserving learning is the ( Differentially ) Private Gradient Descent ( PGD ) ( Bassily et al. , 2014 ; Abadi et al. , 2016 ) . A typical gradient descent procedure updates its model by the gradients of losses evaluated on the training data . When the data is sensitive , the gradients should be privatized to prevent excess privacy leakage . The PGD privatizes a gradient by adding controlled noise . As such , the models from PGD is expected to have a lower utility as compared to those from unprotected algorithms . In the cases where strict privacy control is exercised , or equivalently , a tight privacy budget , accumulating effects from highly-noised gradients may lead to unacceptable model performance . It is thus critical to design effective privatization procedures for PGD to maintain a great balance between utility and privacy . Recent years witnessed a promising privatization direction that studies how to dynamically adjust the privacy-protecting noise during the learning process , i.e. , dynamic privacy schedules , to boost utility under a specific privacy budget . One example is ( Lee & Kifer , 2018 ) , which reduced the noise magnitude when the loss does not decrease , due to the observation that the gradients become very small when approaching convergence , and a static noise scale will overwhelm these gradients . Another example is ( Yu et al. , 2019 ) , which periodically decreased the magnitude following a predefined strategy , e.g. , exponential decaying or step decaying . Both approaches confirmed the empirically advantages of decreasing noise magnitudes . Intuitively , the dynamic mechanism may coordinate with certain properties of the learning task , e.g. , training data and loss surface . Yet there is no theoretical analysis available and two important questions remain unanswered : 1 ) What is the form of utility-preferred noise schedules ? 2 ) When and to what extent such schedules improve utility ? To answer these questions , in this paper we develop a principled approach to construct dynamic schedules and quantify their utility bounds in different learning algorithms . Our contributions are summarized as follows . 1 ) For the class of loss functions satisfying the Polyak-Lojasiewicz condition ( Polyak , 1963 ) , we show that a dynamic schedule improving the utility upper bound is shaped by the influence of per-iteration noise on the final loss . As the influence is tightly connected to the loss curvature , the advantage of using dynamic schedule depends on the loss function consequently . 2 ) Beyond gradient descent , our results show the gradient methods with momentum implicitly introduce a dynamic schedule and result in an improved utility bound . 3 ) We empirically validate our results on convex and non-convex ( no need to satisfy the PL condition ) loss functions . Our results suggest that the preferred dynamic schedule admits the exponentially decaying form , and works better when learning with high-curvature loss functions . Moreover , dynamic schedules give more utility under stricter privacy conditions ( e.g. , smaller sample size and less privacy budget ) . 2 RELATED WORK . Differentially Private Learning . Differential privacy ( DP ) characterizes the chance of an algorithm output ( e.g. , a learned model ) to leak private information in its training data when the output distribution is known . Since outputs of many learning algorithms have undetermined distributions , the probability of their privacy leakages is hard to measure . A common approach to tackle this issue is to inject randomness with known probability distribution to privatize the learning procedures . Classical methods include output perturbation ( Chaudhuri et al. , 2011 ) , objective perturbation ( Chaudhuri et al. , 2011 ) and gradient perturbation ( Abadi et al. , 2016 ; Bassily et al. , 2014 ; Wu et al. , 2017 ) . Among these approaches , the Private Gradient Descent ( PGD ) has attracted extensive attention in recent years because it can be flexibly integrated with variants of gradient-based iteration methods , e.g. , stochastic gradient descent , momentum methods ( Qian , 1999 ) , and Adam ( Kingma & Ba , 2014 ) , for both convex and non-convex problems . Dynamic Policies for Privacy Protection . Wang et al . ( 2017 ) studied the empirical risk minimization using dynamic variation reduction of perturbed gradients . They showed that the utility upper bound can be achieved by gradient methods under uniform noise parameters . Instead of enhancing the gradients , Yu et al . ( 2019 ) ; Lee & Kifer ( 2018 ) showed the benefits of using a dynamic schedule of privacy parameters or equivalently noise scales . In addition , adaptive sensitivity control ( Pichapati et al. , 2019 ; Thakkar et al. , 2019 ) and dynamic batch sizes ( Feldman et al. , 2020 ) are also demonstrated to improves the convergence . Utility Upper Bounds . A utility upper bound is a critical metric for privacy schedules that characterizes the maximum utility that a schedule can deliver in theory . Wang et al . ( 2017 ) is the first to prove the utility bound under the PL condition . In this paper , we improve the upper bound by a more accurate estimation of the dynamic influence of step noise . Remarkably , by introducing a dynamic schedule , we further boost the sample-efficiency of the upper bound . With a similar intuition , Feldman et al . ( 2020 ) proposed to gradually increase the batch size , which reduces the dependence on sample size accordingly . Recently , Zhou et al . proved the utility bound by using the momentum of gradients ( Polyak , 1964 ; Kingma & Ba , 2014 ) . Table 1 summarizes the upper bounds of methods studied in this paper ( in the last block of rows ) and results from state-of-the-art algorithms based on private gradients . Our work shows that considering the dynamic influence can lead to a tighter bound . 3 PRIVATE GRADIENT DESCENT . Notations . We consider a learning task by empirical risk minimization ( ERM ) f ( θ ) = 1 N ∑N n=1 f ( θ ; xn ) on a private dataset { xn } Nn=1 and θ ∈ RD . The gradient methods are defined as θt+1 = θt − ηt∇t , where ∇t = ∇f ( θt ) = 1N ∑ n∇f ( θt ; xn ) denotes the non-private gradient at iteration t , ηt is the step learning rate . ∇ ( n ) t = ∇f ( θt ; xn ) denotes the gradient on a sample xn . Ic denotes the indicator function that returns 1 if the condition c holds , otherwise 0 . Assumptions . ( 1 ) In this paper , we assume f ( θ ) is continuous and differentiable . Many commonly used loss functions satisfy this assumption , e.g. , the logistic function . ( 2 ) For a learning task , only finite amount of privacy cost is allowed where the maximum cost is called privacy budget and denoted as R. ( 3 ) Generally , we assume that loss functions f ( θ ; x ) ( sample-wise loss ) are G-Lipschitz continuous and f ( θ ) ( the empirical loss ) is M -smooth . Definition 3.1 ( G-Lipschitz continuity ) . A function f ( · ) is G-Lipschitz continuous if , for G > 0 and all x , y in the domain of f ( · ) , f ( · ) satisfies ‖f ( y ) − f ( x ) ‖ ≤ G‖y − x‖2. . Definition 3.2 ( m-strongly convexity ) . A function f ( · ) is m-strongly convex if f ( y ) ≥ f ( x ) + ∇f ( x ) T ( y − x ) + m2 ‖y − x‖ 2 , for some m > 0 and all x , y in the domain of f ( · ) . Definition 3.3 ( M -smoothness ) . A function is M -smooth w.r.t . l2 norm if f ( y ) ≤ f ( x ) + ∇f ( x ) T ( y − x ) + M2 ‖y − x‖ 2 , for some constant M > 0 and all x , y in the domain of f ( · ) . For a private algorithmM ( d ) which maps a dataset d to some output , the privacy cost is measured by the bound of the output difference on the adjacent datasets . Adjacent datasets are defined to be datasets that only differ in one sample . In this paper , we use the zero-Concentrated Differential Privacy ( zCDP , see Definition 3.4 ) as the privacy measurement , because it provides the simplicity and possibility of adaptively composing privacy costs at each iteration . Various privacy metrics are discussed or reviewed in ( Desfontaines & Pejó , 2019 ) . A notable example is Moment Accoutant ( MA ) ( Abadi et al. , 2016 ) , which adopts similar principle for composing privacy costs while is less tight for a smaller privacy budget . We note that alternative metrics can be adapted to our study without major impacts to the analysis . Definition 3.4 ( ρ-zCDP ( Bun & Steinke , 2016 ) ) . Let ρ > 0 . A randomized algorithmM : Dn → R satisfies ρ-zCDP if , for all adjacent datasets d , d′ ∈ Dn , Dα ( M ( d ) ‖M ( d′ ) ) ≤ ρα , ∀α ∈ ( 1 , ∞ ) where Dα ( ·‖· ) denotes the Rényi divergence ( Rényi , 1961 ) of order α. zCDP provides a linear composition of privacy costs of sub-route algorithms . When the input vector is privatized by injecting Gaussian noise of N ( 0 , σ2t I ) for the t-th iteration , the composed privacy cost is proportional to ∑ t ρt where the step cost is ρt = 1 σ2t . For simplicity , we absorb the constant coefficient into the ( residual ) privacy budget R. The formal theorems for the privacy cost computation of composition and Gaussian noising is included in Lemmas B.1 and B.2 . Generally , we define the Private Gradient Descent ( PGD ) method as iterations for t = 1 . . . T : θt+1 = θt − ηtφt = θt − ηt ( ∇t + σtGνt/N ) , ( 1 ) where φt = gt is the gradient privatized from ∇t as shown in Algorithm 1 , G/N is the bound of sensitivity of the gathered gradient excluding one sample gradient , and νt ∼ N ( 0 , I ) is a vector element-wisely subject to Gaussian distribution . We use σt to denote the noise scale at step t and use σ to collectively represents the schedule ( σ1 , . . . , σT ) if not confusing . When the Lipschitz constant is unknown , we can control the upper bound by scaling the gradient if it is over some constant . The scaling operation is often called clipping in literatures since it clips the gradient norm at a threshold . After the gradient is noised , we apply a modification , φ ( · ) , to enhance its utility . In this paper , we consider two types of φ ( · ) : φ ( mt , gt ) = gt ( GD ) , φ ( mt , gt ) = [ β ( 1− βt−1 ) mt + ( 1− β ) gt ] / ( 1− βt ) ( Momentum ) We now show that the PGD using Algorithm 1 guarantees a privacy cost less than R : Algorithm 1 Privatizing Gradients Input : Raw gradients [ ∇ ( 1 ) t , . . . , ∇ ( n ) t ] ( n = N by default ) , vt , residual privacy budget Rt assuming the full budget is R and R1 = R. 1 : ρt ← 1/σ2t , ∇t ← 1n ∑n i=1∇ ( i ) t . Budget request 2 : if ρt < Rt then 3 : Rt+1 ← Rt − ρt 4 : gt ← ∇t +Gσtνt/N , νt ∼ N ( 0 , I ) . Privacy noise 5 : mt+1 ← φ ( mt , gt ) or g1 if t = 1 6 : return ηtmt+1 , Rt+1 . Utility projection 7 : else 8 : Terminate Theorem 3.1 . Suppose f ( θ ; x ) is G-Lipschitz continuous and the PGD algorithm with privatized gradients defined by Algorithm 1 , stops at step T . The PGD algorithm outputs θT and satisfies ρ-zCDP where ρ ≤ 12R . Note that Theorem 3.1 allows σt to be different throughout iterations . Next we present a principled approach for deriving dynamic schedules optimized for the final loss f ( θT ) . | Gradient Descent and related variants are the defacto standard algorithms for optimizing empirical risk functions. Since published models have been shown in the literature to leak private information, the problem of performing gradient descent under privacy constraints is an important one. Given a fixed privacy budget R, private gradient descent adds noise to the gradients at each round, ensuring overall privacy budget R by composition. However, this still leaves the question of what privacy schedule is best open, since any schedule whose privacy budgets sum up to R achieves the privacy objective. In this paper they compute the optimal privacy schedule from an accuracy perspective via a novel analysis of the convergence of private gradient descent on loss functions that satisfy the PL condition, which turns out to be exponentially decaying noise (increasing privacy budget for each round). These results extend to a privatized variant of the momentum-based gradient descent algorithm, although the dynamic privacy schedule has less improvement there. Experimental results show that dynamic privacy schedules lead to enhanced accuracy even absent convexity. | SP:102f337fcdb0455ef7da2fe20f8684cb61a54314 |
On Dynamic Noise Influence in Differential Private Learning | 1 INTRODUCTION . In the era of big data , privacy protection in machine learning systems is becoming a crucial topic as increasing personal data involved in training models ( Dwork et al. , 2020 ) and the presence of malicious attackers ( Shokri et al. , 2017 ; Fredrikson et al. , 2015 ) . In response to the growing demand , differential-private ( DP ) machine learning ( Dwork et al. , 2006 ) provides a computational framework for privacy protection and has been widely studied in various settings , including both convex and non-convex optimization ( Wang et al. , 2017 ; 2019 ; Jain et al. , 2019 ) . One widely used procedure for privacy-preserving learning is the ( Differentially ) Private Gradient Descent ( PGD ) ( Bassily et al. , 2014 ; Abadi et al. , 2016 ) . A typical gradient descent procedure updates its model by the gradients of losses evaluated on the training data . When the data is sensitive , the gradients should be privatized to prevent excess privacy leakage . The PGD privatizes a gradient by adding controlled noise . As such , the models from PGD is expected to have a lower utility as compared to those from unprotected algorithms . In the cases where strict privacy control is exercised , or equivalently , a tight privacy budget , accumulating effects from highly-noised gradients may lead to unacceptable model performance . It is thus critical to design effective privatization procedures for PGD to maintain a great balance between utility and privacy . Recent years witnessed a promising privatization direction that studies how to dynamically adjust the privacy-protecting noise during the learning process , i.e. , dynamic privacy schedules , to boost utility under a specific privacy budget . One example is ( Lee & Kifer , 2018 ) , which reduced the noise magnitude when the loss does not decrease , due to the observation that the gradients become very small when approaching convergence , and a static noise scale will overwhelm these gradients . Another example is ( Yu et al. , 2019 ) , which periodically decreased the magnitude following a predefined strategy , e.g. , exponential decaying or step decaying . Both approaches confirmed the empirically advantages of decreasing noise magnitudes . Intuitively , the dynamic mechanism may coordinate with certain properties of the learning task , e.g. , training data and loss surface . Yet there is no theoretical analysis available and two important questions remain unanswered : 1 ) What is the form of utility-preferred noise schedules ? 2 ) When and to what extent such schedules improve utility ? To answer these questions , in this paper we develop a principled approach to construct dynamic schedules and quantify their utility bounds in different learning algorithms . Our contributions are summarized as follows . 1 ) For the class of loss functions satisfying the Polyak-Lojasiewicz condition ( Polyak , 1963 ) , we show that a dynamic schedule improving the utility upper bound is shaped by the influence of per-iteration noise on the final loss . As the influence is tightly connected to the loss curvature , the advantage of using dynamic schedule depends on the loss function consequently . 2 ) Beyond gradient descent , our results show the gradient methods with momentum implicitly introduce a dynamic schedule and result in an improved utility bound . 3 ) We empirically validate our results on convex and non-convex ( no need to satisfy the PL condition ) loss functions . Our results suggest that the preferred dynamic schedule admits the exponentially decaying form , and works better when learning with high-curvature loss functions . Moreover , dynamic schedules give more utility under stricter privacy conditions ( e.g. , smaller sample size and less privacy budget ) . 2 RELATED WORK . Differentially Private Learning . Differential privacy ( DP ) characterizes the chance of an algorithm output ( e.g. , a learned model ) to leak private information in its training data when the output distribution is known . Since outputs of many learning algorithms have undetermined distributions , the probability of their privacy leakages is hard to measure . A common approach to tackle this issue is to inject randomness with known probability distribution to privatize the learning procedures . Classical methods include output perturbation ( Chaudhuri et al. , 2011 ) , objective perturbation ( Chaudhuri et al. , 2011 ) and gradient perturbation ( Abadi et al. , 2016 ; Bassily et al. , 2014 ; Wu et al. , 2017 ) . Among these approaches , the Private Gradient Descent ( PGD ) has attracted extensive attention in recent years because it can be flexibly integrated with variants of gradient-based iteration methods , e.g. , stochastic gradient descent , momentum methods ( Qian , 1999 ) , and Adam ( Kingma & Ba , 2014 ) , for both convex and non-convex problems . Dynamic Policies for Privacy Protection . Wang et al . ( 2017 ) studied the empirical risk minimization using dynamic variation reduction of perturbed gradients . They showed that the utility upper bound can be achieved by gradient methods under uniform noise parameters . Instead of enhancing the gradients , Yu et al . ( 2019 ) ; Lee & Kifer ( 2018 ) showed the benefits of using a dynamic schedule of privacy parameters or equivalently noise scales . In addition , adaptive sensitivity control ( Pichapati et al. , 2019 ; Thakkar et al. , 2019 ) and dynamic batch sizes ( Feldman et al. , 2020 ) are also demonstrated to improves the convergence . Utility Upper Bounds . A utility upper bound is a critical metric for privacy schedules that characterizes the maximum utility that a schedule can deliver in theory . Wang et al . ( 2017 ) is the first to prove the utility bound under the PL condition . In this paper , we improve the upper bound by a more accurate estimation of the dynamic influence of step noise . Remarkably , by introducing a dynamic schedule , we further boost the sample-efficiency of the upper bound . With a similar intuition , Feldman et al . ( 2020 ) proposed to gradually increase the batch size , which reduces the dependence on sample size accordingly . Recently , Zhou et al . proved the utility bound by using the momentum of gradients ( Polyak , 1964 ; Kingma & Ba , 2014 ) . Table 1 summarizes the upper bounds of methods studied in this paper ( in the last block of rows ) and results from state-of-the-art algorithms based on private gradients . Our work shows that considering the dynamic influence can lead to a tighter bound . 3 PRIVATE GRADIENT DESCENT . Notations . We consider a learning task by empirical risk minimization ( ERM ) f ( θ ) = 1 N ∑N n=1 f ( θ ; xn ) on a private dataset { xn } Nn=1 and θ ∈ RD . The gradient methods are defined as θt+1 = θt − ηt∇t , where ∇t = ∇f ( θt ) = 1N ∑ n∇f ( θt ; xn ) denotes the non-private gradient at iteration t , ηt is the step learning rate . ∇ ( n ) t = ∇f ( θt ; xn ) denotes the gradient on a sample xn . Ic denotes the indicator function that returns 1 if the condition c holds , otherwise 0 . Assumptions . ( 1 ) In this paper , we assume f ( θ ) is continuous and differentiable . Many commonly used loss functions satisfy this assumption , e.g. , the logistic function . ( 2 ) For a learning task , only finite amount of privacy cost is allowed where the maximum cost is called privacy budget and denoted as R. ( 3 ) Generally , we assume that loss functions f ( θ ; x ) ( sample-wise loss ) are G-Lipschitz continuous and f ( θ ) ( the empirical loss ) is M -smooth . Definition 3.1 ( G-Lipschitz continuity ) . A function f ( · ) is G-Lipschitz continuous if , for G > 0 and all x , y in the domain of f ( · ) , f ( · ) satisfies ‖f ( y ) − f ( x ) ‖ ≤ G‖y − x‖2. . Definition 3.2 ( m-strongly convexity ) . A function f ( · ) is m-strongly convex if f ( y ) ≥ f ( x ) + ∇f ( x ) T ( y − x ) + m2 ‖y − x‖ 2 , for some m > 0 and all x , y in the domain of f ( · ) . Definition 3.3 ( M -smoothness ) . A function is M -smooth w.r.t . l2 norm if f ( y ) ≤ f ( x ) + ∇f ( x ) T ( y − x ) + M2 ‖y − x‖ 2 , for some constant M > 0 and all x , y in the domain of f ( · ) . For a private algorithmM ( d ) which maps a dataset d to some output , the privacy cost is measured by the bound of the output difference on the adjacent datasets . Adjacent datasets are defined to be datasets that only differ in one sample . In this paper , we use the zero-Concentrated Differential Privacy ( zCDP , see Definition 3.4 ) as the privacy measurement , because it provides the simplicity and possibility of adaptively composing privacy costs at each iteration . Various privacy metrics are discussed or reviewed in ( Desfontaines & Pejó , 2019 ) . A notable example is Moment Accoutant ( MA ) ( Abadi et al. , 2016 ) , which adopts similar principle for composing privacy costs while is less tight for a smaller privacy budget . We note that alternative metrics can be adapted to our study without major impacts to the analysis . Definition 3.4 ( ρ-zCDP ( Bun & Steinke , 2016 ) ) . Let ρ > 0 . A randomized algorithmM : Dn → R satisfies ρ-zCDP if , for all adjacent datasets d , d′ ∈ Dn , Dα ( M ( d ) ‖M ( d′ ) ) ≤ ρα , ∀α ∈ ( 1 , ∞ ) where Dα ( ·‖· ) denotes the Rényi divergence ( Rényi , 1961 ) of order α. zCDP provides a linear composition of privacy costs of sub-route algorithms . When the input vector is privatized by injecting Gaussian noise of N ( 0 , σ2t I ) for the t-th iteration , the composed privacy cost is proportional to ∑ t ρt where the step cost is ρt = 1 σ2t . For simplicity , we absorb the constant coefficient into the ( residual ) privacy budget R. The formal theorems for the privacy cost computation of composition and Gaussian noising is included in Lemmas B.1 and B.2 . Generally , we define the Private Gradient Descent ( PGD ) method as iterations for t = 1 . . . T : θt+1 = θt − ηtφt = θt − ηt ( ∇t + σtGνt/N ) , ( 1 ) where φt = gt is the gradient privatized from ∇t as shown in Algorithm 1 , G/N is the bound of sensitivity of the gathered gradient excluding one sample gradient , and νt ∼ N ( 0 , I ) is a vector element-wisely subject to Gaussian distribution . We use σt to denote the noise scale at step t and use σ to collectively represents the schedule ( σ1 , . . . , σT ) if not confusing . When the Lipschitz constant is unknown , we can control the upper bound by scaling the gradient if it is over some constant . The scaling operation is often called clipping in literatures since it clips the gradient norm at a threshold . After the gradient is noised , we apply a modification , φ ( · ) , to enhance its utility . In this paper , we consider two types of φ ( · ) : φ ( mt , gt ) = gt ( GD ) , φ ( mt , gt ) = [ β ( 1− βt−1 ) mt + ( 1− β ) gt ] / ( 1− βt ) ( Momentum ) We now show that the PGD using Algorithm 1 guarantees a privacy cost less than R : Algorithm 1 Privatizing Gradients Input : Raw gradients [ ∇ ( 1 ) t , . . . , ∇ ( n ) t ] ( n = N by default ) , vt , residual privacy budget Rt assuming the full budget is R and R1 = R. 1 : ρt ← 1/σ2t , ∇t ← 1n ∑n i=1∇ ( i ) t . Budget request 2 : if ρt < Rt then 3 : Rt+1 ← Rt − ρt 4 : gt ← ∇t +Gσtνt/N , νt ∼ N ( 0 , I ) . Privacy noise 5 : mt+1 ← φ ( mt , gt ) or g1 if t = 1 6 : return ηtmt+1 , Rt+1 . Utility projection 7 : else 8 : Terminate Theorem 3.1 . Suppose f ( θ ; x ) is G-Lipschitz continuous and the PGD algorithm with privatized gradients defined by Algorithm 1 , stops at step T . The PGD algorithm outputs θT and satisfies ρ-zCDP where ρ ≤ 12R . Note that Theorem 3.1 allows σt to be different throughout iterations . Next we present a principled approach for deriving dynamic schedules optimized for the final loss f ( θT ) . | The paper studies private gradient descent when the noise added to each of the iteration is dynamically scheduled. Prior to this work, the work of Zhou et al. tries to achieve the same for DP-SGD and they analyze their algorithm for many variants of adaptive gradient descent based method. The difference with Zhou et al. is that they do not gradient norm and the generalization property of DP. As a result, the authors claim that Zhou et al. achieves suboptimal utility guarantee. | SP:102f337fcdb0455ef7da2fe20f8684cb61a54314 |
Ricci-GNN: Defending Against Structural Attacks Through a Geometric Approach | Graph neural networks ( GNNs ) rely heavily on the underlying graph topology and thus can be vulnerable to malicious attacks targeting at perturbing graph structures . We propose a novel GNN defense algorithm against such attacks . In particular , we use a robust representation of the input graph based on the theory of graph Ricci flow , which captures the intrinsic geometry of graphs and is robust to structural perturbation . We propose an algorithm to train GNNs using re-sampled graphs based on such geometric representation . We show that this method substantially improves the robustness against various adversarial structural attacks , achieving state-of-the-art performance on both synthetic and real-world datasets . 1 INTRODUCTION . Recent years we have witnessed the success of graph neural networks ( GNNs ) on many graph applications including graph classification ( Xu et al. , 2019b ) , node classification ( Kipf & Welling , 2016 ; Veličković et al. , 2018 ) , graph generation ( You et al. , 2018 ) and recommendations ( Ying et al. , 2018 ) . As GNNs have shown great potentials , their vulnerability to adversarial attacks ( Szegedy et al. , 2014 ; Goodfellow et al. , 2015 ) becomes a serious concern that hinders their deployment in real life critical applications . For example , a GNN algorithm for fraud detection in financial transaction graphs ( Wang et al. , 2019a ) needs to be robust against attacks aiming at disguising fraud transactions as normal ones . In health informatics , prediction of polypharmacy side effects ( Zitnik et al. , 2018 ) must be robust against attacks that intend to endanger certain patients . In a recommendation system , the developers need to consider potential attacks from spammers who may create fake followers to increase the influence scope of fake news ( Zhou & Zafarani , 2018 ) . One way to attack a GNN model is to modify the graph topology by inserting or deleting edges ( Jin et al. , 2020a ) . A small perturbation of the network topology can significantly impair the graph neural network ’ s performance ( Dai et al. , 2018 ; Zügner & Günnemann , 2019b ) . For example , MetaAttack ( Zügner & Günnemann , 2019a ) can increase the misclassification rate of GCN on a political blog data set by over 18 % with only 5 % perturbed edges . This is not surprising as graph topology is essential for GNNs , both as the backbone of a GNN architecture and as important structural features . In particular , the local neighborhood of each node is commonly used to define receptive fields for the convolution operator . The statistics of local neighborhood , e.g. , node degrees , are important structural information used as additional node features ( Veličković et al. , 2018 ) to re-calibrate the convolutional operation ( Kipf & Welling , 2016 ) . In this paper , we focus on defending against global poisoning adversarial attacks which corrupt the graph topology in the training phase . Some existing approaches assume the graph is true and leverage known robust training techniques , e.g. , enforcing priors on latent representation of data ( Zhu et al. , 2019 ) . These solutions can still be limited by the corrupted graph , considering how critical the underlying graph is for a GNN model . Other methods assume prior knowledge on the graph topology , and perform graph restructuring , e.g. , via low-rank filtering ( Entezari et al. , 2020 ) or graph specification ( Wu et al. , 2019 ) , hoping to remove abnormal edges from the attack . These strong priors , although proven useful , also limit the generality of the method . 1.1 A GEOMETRIC VIEW OF GRAPHS . We take a novel direction to find a robust representation of the graph topology through a geometric lens . We view a discrete graph in a continuous framework , in which nodes stay in an underlying metric space and the connectivity of two nodes has a stochastic nature , depending on the features of the two nodes , their respective neighborhoods and the entire node distribution . The input graph G is replaced by an ensemble of graphs , considered as ( randomized ) discrete realizations of the same underlying metric space in which G is taken . In order to do that , we recover the metric distance between two nodes in the underlying space through the Ricci flow metric on the input graph G. Note that we are not trying to explicitly find an embedding which would involve choices ( e.g , Euclidean vs non-Euclidean , dimensionalities ) that introduce extra and unnecessary distortion . Instead , we represent the underlying metric space via pairwise geodesic distance between nodes . Our geometrical approach is inspired by the Riemmanian geometry in the continuous setting ( Hamilton , 1982 ; Perelman , 2002 ) . On a Riemmanian manifold , one can define Ricci curvature to measure the amount of ‘ bending ’ or ‘ curving ’ at each point . With Ricci curvature , one can define a diffusion process by changing the Riemannian metric ( stretching or shrinking locally ) such that curvature is uniform everywhere . This uniformization process is called Ricci flow . This theory can be extended to a graph setting ( Ollivier , 2009 ) . Generally speaking , edges that are locally well connected have positive curvature while edges that are locally sparsely connected have negative curvature . In Ricci flow , edges of negative curvature are stretched ( with increased edge weight ) and edges of positive curvature are condensed ( with decreased edge weight ) . These new edge weights that uniformize the Ricci curvature of the graph are called the Ricci flow metric . See Figure 1 for an illustration . Graph Ricci curvature and Ricci flow can be used to identify critical edges in a graph ( Ni et al. , 2015 ; Sandhu et al. , 2015 ) and to identify community structures ( Ni et al. , 2019 ; Sia et al. , 2019 ) . We also note that graph Ricci curvature has been used in GNN for node classification task ( Ye et al. , 2020 ) , but not for defending structural attacks to GNN . Robustness against topological perturbation . Ricci flow metric has been shown to be robust to random deletion and addition of edges ( Ni et al. , 2018 ) . This attributes to the fact that Ricci flow is a global process that tries to uncover the underlying metric space supported by the graph topology and thus embraces redundancy . Compared to other graph metrics such as the hop count metric and metric obtained by spectral embedding , Ricci flow metric provides a better trade-off between robustness and representation power of the graph metric , as shown in Figure 3 . When two edges are deleted , the Ricci flow metric is rarely affected ( Figure 3 ( a ) ) , similar to the hop count metric ( Figure 3 ( c ) ) ; while the distance metric by spectral embedding is substantially more sensitive ( Figure 3 ( b ) ) . We note that the hop count metric is also robust to dynamic edge deletions due to the small world phenomena and multiple shortest paths in the graph ; however the hop count metric takes only integer values and generally lacks descriptive power to provide desirable resolution and differentiation . To train a GNN using the Ricci flow metric , we generate an ensemble of sample graphs G1 , G2 , · · · , and use a new sample in each network layer of the GNN of every training epoch ( Figure 2 ) . Therefore the trained model is enforced to focus on the underlying metric information represented by the graph ( which is much more robust ) and not on the particular input graph topology ( which could be corrupted ) per se . Our method is agnostic to both models and attacks , thus can be applied to different GNNs and different structural attacks . We show in both synthetic and real-world datasets that the proposed algorithm effectively defends against various structural attacks , with improved performance compared to other defense schemes . We summarize our contributions as follows . • We are the first to take a geometric view of the GNN defense problem . We propose to train GNNs with the Ricci flow representation of a graph instead of its attacked topology . • We design a new algorithm to sample graphs based on the Ricci flow representation for training GNN . This effectively alleviate the impact of structural attacks by adversaries . • We demonstrate the efficacy of our method on various synthetic and real-world datasets , against state-of-the-art graph topology poisoning methods . 1.2 RELATED WORK . The vulnerability of deep neural network models w.r.t . adversarial attacks is well known . And graph neural networks are not an exception ( Dai et al. , 2018 ; Zügner et al. , 2018 ; Zügner & Günnemann , 2019a ) . Here we briefly review the methods for attacking and defending against GNNs . Adversarial attack on graphs . There are two categories of attacks : evasion attacks and poisoning attacks . Evasion attacks generate fake samples for the trained model in the testing time , while poisoning attacks directly modify the training data . Dai et al . ( 2018 ) employs a reinforcement learning based framework for non-targeted test-time attacks ( i.e . evasion ) on graph classification and node classification . The focus is on the modifications of graph structures , and the attackers are restricted to edge deletions only . Zügner et al . ( 2018 ) consider both training-time ( i.e . poisoning ) and testing-time attacks . The attacks , called nettack , are based on a surrogate model with both edge insertion and deletion . Nettack is a local attack , where the goal is to lower the performance on a target node . Later , a meta-learning poisoning attack is developed by Zügner & Günnemann ( 2019a ) which aims to decrease classification accuracy globally . It treats the the graph structure as a hyper-parameter and conducts training-time attacks through meta learning . Last , Xu et al . ( 2019a ) proposes a gradient-based attack method that directly tackling the dicrete graph data . Since these two are the state-of-the-art non-targeted global attack method , we will mainly focus on developing defense schemes against them . Robustness of GNNs . To defend against these graph attacks , Miller et al . ( 2019 ) seek to increase model robustness by decoupling structure from attributes in the classifier and re-selecting the training data . But their method exhibits a trade-off between robustness and performance , i.e . the performance drops on clean data . Wang et al . ( 2019b ) proposed graph encoder refining and adversarial contrastive learning . They investigate the vulnerabilities in every aggregation layer and the perceptron layer of a GNN encoder , and apply dual-stage aggregation and bottleneck perceptron to address those vulnerabilities . They mainly focus on targeted node attacks ( e.g . Nettack ) instead of global topology attacks . RGCN ( Zhu et al. , 2019 ) treats node features as a Gaussian distribution and encode the hidden representation of nodes by mean and variance matrices . They apply self-attention on the variance matrix to aggregate messages from neighboring nodes . However , this method only focuses on defense against random noise on node features . GCN-Jaccard ( Wu et al. , 2019 ) pre-processes the network by eliminating edges that connect nodes with sufficientely small Jaccard similarity of features . GCN-SVD ( Entezari et al. , 2020 ) proposes to vaccinate GCN with the low-rank approximation of the perturbed graph . Most of these existing methods provide insight of robustness from the perspective of optimization or matrix ranks . DropEdge ( Rong et al. , 2019 ) randomly removes a certain amount of edges from the input graph at each training epoch . It is designed to resolve the over-fitting and over-smoothing issue of developing deeep GCNs . However , it can also be used for improving the graphs robustness . Pro-GNN ( Jin et al. , 2020b ) jointly learns a structural graph and a robust graph neural network model from the perturbed graph guided by exploring the graph properties of sparsity , low rank and feature smoothness to design robust graph neural networks . In this paper , we understand the graph robustness from a geometric view and provide an efficient sampling based model . | In Ricci-GCN new graphs are resampled in each iteration of the training phase based on the Ricci flow metric. The Ricci flow incorporates curvature information and captures the intrinsic geometry of the graph. Compared to e.g. spectral embedding it is more robust to structural perturbations. This leads to improved robustness against adversarial attacks on the graph structure. | SP:bacf7f05516ec99a3dafaedb8cba0f0b2831f99c |
Ricci-GNN: Defending Against Structural Attacks Through a Geometric Approach | Graph neural networks ( GNNs ) rely heavily on the underlying graph topology and thus can be vulnerable to malicious attacks targeting at perturbing graph structures . We propose a novel GNN defense algorithm against such attacks . In particular , we use a robust representation of the input graph based on the theory of graph Ricci flow , which captures the intrinsic geometry of graphs and is robust to structural perturbation . We propose an algorithm to train GNNs using re-sampled graphs based on such geometric representation . We show that this method substantially improves the robustness against various adversarial structural attacks , achieving state-of-the-art performance on both synthetic and real-world datasets . 1 INTRODUCTION . Recent years we have witnessed the success of graph neural networks ( GNNs ) on many graph applications including graph classification ( Xu et al. , 2019b ) , node classification ( Kipf & Welling , 2016 ; Veličković et al. , 2018 ) , graph generation ( You et al. , 2018 ) and recommendations ( Ying et al. , 2018 ) . As GNNs have shown great potentials , their vulnerability to adversarial attacks ( Szegedy et al. , 2014 ; Goodfellow et al. , 2015 ) becomes a serious concern that hinders their deployment in real life critical applications . For example , a GNN algorithm for fraud detection in financial transaction graphs ( Wang et al. , 2019a ) needs to be robust against attacks aiming at disguising fraud transactions as normal ones . In health informatics , prediction of polypharmacy side effects ( Zitnik et al. , 2018 ) must be robust against attacks that intend to endanger certain patients . In a recommendation system , the developers need to consider potential attacks from spammers who may create fake followers to increase the influence scope of fake news ( Zhou & Zafarani , 2018 ) . One way to attack a GNN model is to modify the graph topology by inserting or deleting edges ( Jin et al. , 2020a ) . A small perturbation of the network topology can significantly impair the graph neural network ’ s performance ( Dai et al. , 2018 ; Zügner & Günnemann , 2019b ) . For example , MetaAttack ( Zügner & Günnemann , 2019a ) can increase the misclassification rate of GCN on a political blog data set by over 18 % with only 5 % perturbed edges . This is not surprising as graph topology is essential for GNNs , both as the backbone of a GNN architecture and as important structural features . In particular , the local neighborhood of each node is commonly used to define receptive fields for the convolution operator . The statistics of local neighborhood , e.g. , node degrees , are important structural information used as additional node features ( Veličković et al. , 2018 ) to re-calibrate the convolutional operation ( Kipf & Welling , 2016 ) . In this paper , we focus on defending against global poisoning adversarial attacks which corrupt the graph topology in the training phase . Some existing approaches assume the graph is true and leverage known robust training techniques , e.g. , enforcing priors on latent representation of data ( Zhu et al. , 2019 ) . These solutions can still be limited by the corrupted graph , considering how critical the underlying graph is for a GNN model . Other methods assume prior knowledge on the graph topology , and perform graph restructuring , e.g. , via low-rank filtering ( Entezari et al. , 2020 ) or graph specification ( Wu et al. , 2019 ) , hoping to remove abnormal edges from the attack . These strong priors , although proven useful , also limit the generality of the method . 1.1 A GEOMETRIC VIEW OF GRAPHS . We take a novel direction to find a robust representation of the graph topology through a geometric lens . We view a discrete graph in a continuous framework , in which nodes stay in an underlying metric space and the connectivity of two nodes has a stochastic nature , depending on the features of the two nodes , their respective neighborhoods and the entire node distribution . The input graph G is replaced by an ensemble of graphs , considered as ( randomized ) discrete realizations of the same underlying metric space in which G is taken . In order to do that , we recover the metric distance between two nodes in the underlying space through the Ricci flow metric on the input graph G. Note that we are not trying to explicitly find an embedding which would involve choices ( e.g , Euclidean vs non-Euclidean , dimensionalities ) that introduce extra and unnecessary distortion . Instead , we represent the underlying metric space via pairwise geodesic distance between nodes . Our geometrical approach is inspired by the Riemmanian geometry in the continuous setting ( Hamilton , 1982 ; Perelman , 2002 ) . On a Riemmanian manifold , one can define Ricci curvature to measure the amount of ‘ bending ’ or ‘ curving ’ at each point . With Ricci curvature , one can define a diffusion process by changing the Riemannian metric ( stretching or shrinking locally ) such that curvature is uniform everywhere . This uniformization process is called Ricci flow . This theory can be extended to a graph setting ( Ollivier , 2009 ) . Generally speaking , edges that are locally well connected have positive curvature while edges that are locally sparsely connected have negative curvature . In Ricci flow , edges of negative curvature are stretched ( with increased edge weight ) and edges of positive curvature are condensed ( with decreased edge weight ) . These new edge weights that uniformize the Ricci curvature of the graph are called the Ricci flow metric . See Figure 1 for an illustration . Graph Ricci curvature and Ricci flow can be used to identify critical edges in a graph ( Ni et al. , 2015 ; Sandhu et al. , 2015 ) and to identify community structures ( Ni et al. , 2019 ; Sia et al. , 2019 ) . We also note that graph Ricci curvature has been used in GNN for node classification task ( Ye et al. , 2020 ) , but not for defending structural attacks to GNN . Robustness against topological perturbation . Ricci flow metric has been shown to be robust to random deletion and addition of edges ( Ni et al. , 2018 ) . This attributes to the fact that Ricci flow is a global process that tries to uncover the underlying metric space supported by the graph topology and thus embraces redundancy . Compared to other graph metrics such as the hop count metric and metric obtained by spectral embedding , Ricci flow metric provides a better trade-off between robustness and representation power of the graph metric , as shown in Figure 3 . When two edges are deleted , the Ricci flow metric is rarely affected ( Figure 3 ( a ) ) , similar to the hop count metric ( Figure 3 ( c ) ) ; while the distance metric by spectral embedding is substantially more sensitive ( Figure 3 ( b ) ) . We note that the hop count metric is also robust to dynamic edge deletions due to the small world phenomena and multiple shortest paths in the graph ; however the hop count metric takes only integer values and generally lacks descriptive power to provide desirable resolution and differentiation . To train a GNN using the Ricci flow metric , we generate an ensemble of sample graphs G1 , G2 , · · · , and use a new sample in each network layer of the GNN of every training epoch ( Figure 2 ) . Therefore the trained model is enforced to focus on the underlying metric information represented by the graph ( which is much more robust ) and not on the particular input graph topology ( which could be corrupted ) per se . Our method is agnostic to both models and attacks , thus can be applied to different GNNs and different structural attacks . We show in both synthetic and real-world datasets that the proposed algorithm effectively defends against various structural attacks , with improved performance compared to other defense schemes . We summarize our contributions as follows . • We are the first to take a geometric view of the GNN defense problem . We propose to train GNNs with the Ricci flow representation of a graph instead of its attacked topology . • We design a new algorithm to sample graphs based on the Ricci flow representation for training GNN . This effectively alleviate the impact of structural attacks by adversaries . • We demonstrate the efficacy of our method on various synthetic and real-world datasets , against state-of-the-art graph topology poisoning methods . 1.2 RELATED WORK . The vulnerability of deep neural network models w.r.t . adversarial attacks is well known . And graph neural networks are not an exception ( Dai et al. , 2018 ; Zügner et al. , 2018 ; Zügner & Günnemann , 2019a ) . Here we briefly review the methods for attacking and defending against GNNs . Adversarial attack on graphs . There are two categories of attacks : evasion attacks and poisoning attacks . Evasion attacks generate fake samples for the trained model in the testing time , while poisoning attacks directly modify the training data . Dai et al . ( 2018 ) employs a reinforcement learning based framework for non-targeted test-time attacks ( i.e . evasion ) on graph classification and node classification . The focus is on the modifications of graph structures , and the attackers are restricted to edge deletions only . Zügner et al . ( 2018 ) consider both training-time ( i.e . poisoning ) and testing-time attacks . The attacks , called nettack , are based on a surrogate model with both edge insertion and deletion . Nettack is a local attack , where the goal is to lower the performance on a target node . Later , a meta-learning poisoning attack is developed by Zügner & Günnemann ( 2019a ) which aims to decrease classification accuracy globally . It treats the the graph structure as a hyper-parameter and conducts training-time attacks through meta learning . Last , Xu et al . ( 2019a ) proposes a gradient-based attack method that directly tackling the dicrete graph data . Since these two are the state-of-the-art non-targeted global attack method , we will mainly focus on developing defense schemes against them . Robustness of GNNs . To defend against these graph attacks , Miller et al . ( 2019 ) seek to increase model robustness by decoupling structure from attributes in the classifier and re-selecting the training data . But their method exhibits a trade-off between robustness and performance , i.e . the performance drops on clean data . Wang et al . ( 2019b ) proposed graph encoder refining and adversarial contrastive learning . They investigate the vulnerabilities in every aggregation layer and the perceptron layer of a GNN encoder , and apply dual-stage aggregation and bottleneck perceptron to address those vulnerabilities . They mainly focus on targeted node attacks ( e.g . Nettack ) instead of global topology attacks . RGCN ( Zhu et al. , 2019 ) treats node features as a Gaussian distribution and encode the hidden representation of nodes by mean and variance matrices . They apply self-attention on the variance matrix to aggregate messages from neighboring nodes . However , this method only focuses on defense against random noise on node features . GCN-Jaccard ( Wu et al. , 2019 ) pre-processes the network by eliminating edges that connect nodes with sufficientely small Jaccard similarity of features . GCN-SVD ( Entezari et al. , 2020 ) proposes to vaccinate GCN with the low-rank approximation of the perturbed graph . Most of these existing methods provide insight of robustness from the perspective of optimization or matrix ranks . DropEdge ( Rong et al. , 2019 ) randomly removes a certain amount of edges from the input graph at each training epoch . It is designed to resolve the over-fitting and over-smoothing issue of developing deeep GCNs . However , it can also be used for improving the graphs robustness . Pro-GNN ( Jin et al. , 2020b ) jointly learns a structural graph and a robust graph neural network model from the perturbed graph guided by exploring the graph properties of sparsity , low rank and feature smoothness to design robust graph neural networks . In this paper , we understand the graph robustness from a geometric view and provide an efficient sampling based model . | The paper proses a new adversarial (poisoning) defense based on a known graph reweighting scheme known as the ricci curvature. The ricci curvature assigns a weight to each edge that captures the graph structure, i.e. the value reflects whether the edge is an inter-community connection or an intracommunity connection. Empirically, the ricci curvature is known to be more robust w.r.t. random edge insertions/deletions. The authors propose a new sampling method based on the ricci curvature and use it within their novel training scheme. Empirically, the effectiveness of their approach is shown via experiments on synthetic SBM graphs. Moreover, the authors use a random attack and Metattack on various datasets. They show superior performance to multiple baseline architectures/defenses. | SP:bacf7f05516ec99a3dafaedb8cba0f0b2831f99c |
FSV: Learning to Factorize Soft Value Function for Cooperative Multi-Agent Reinforcement Learning | 1 INTRODUCTION . Cooperative multi-agent reinforcement learning ( MARL ) aims to instill in agents policies that maximize the team reward accumulated over time ( Panait & Luke ( 2005 ) ; Busoniu et al . ( 2008 ) ; Tuyls & Weiss ( 2012 ) ) , which has great potential to address complex real-world problems , such as coordinating autonomous cars ( Cao et al . ( 2013 ) ) . Considering the measurement and communication limitations in practical problems , cooperative MARL faces the partial observability challenge . That is , each agent chooses actions just based on its local observations . Centralized training with decentralized execution ( CTDE ) ( Oliehoek et al . ( 2011 ) ) is a common paradigm to address the partial observability , where agents ’ policies are trained with access to global information in a centralized way and executed only based on local observations in a decentralized way , such as the MADDPG ( Lowe ( 2017 ) ) and COMA ( Foerster et al . ( 2017 ) ) . However , the size of the joint state-action space of the centralized value function grows exponentially as the number of agents increases , which is known as the scalibility challenge . Value function factorization methods have been an increasingly popular paradigm for solving the scalability in CTDE by satisfying the Individual-Global-Max ( IGM ) where the optimal joint action selection should be consistent with the optimal individual action selections . Three representative examples of value function factorization methods include VDN ( Sunehag et al . ( 2017 ) ) , QMIX ( Rashid et al . ( 2018 ) ) , and QTRAN ( Son et al . ( 2019 ) ) . All these methods are -greedy policies , where VDN and QMIX give sufficient but unnecessary conditions for IGM by additivity and monotonicity structures respectively , and the QTRAN formulates the IGM as an optimization problem with linear constraints . Although these methods have witnessed some success in some tasks , they all face relative overgeneralization , where agents may stick into a suboptimal Nash Equilibrium . In fact , relative overgeneralization is a grave pathology arising which occurs when a suboptimal Nash Equilibrium in the joint space of action priors to an optimal Nash Equilibrium since each agent ’ s action in the suboptimal equilibrium is a better choice ( Wei & Luke ( 2016 ) ) . The non-monotonic matrix game is a simple discrete example . Both VDN and QMIX fail to learn the optimal policy in the non-monotonic matrix due to their structure limitation . Although QTRAN expresses the complete value function representation ability in the non-monotonic matrix , its full expressive ability decreases in the complex tasks due to the computationally intractable constraints relaxing with tractable L2 penalties . Besides , QTRAN sacrifices the tractability in continuous action space . Therefore , in discrete and continuous tasks , achieving effective scalability while avoiding relative overgeneralization remains an open problem for cooperative MARL . To address this challenge , this paper presents a new definition of factorizable tasks called IGO ( Individual-Global-Optimal ) which introduces the consistency of joint optimal stochastic policies and individual optimal stochastic policies . Theoretical analysis shows that IGO degenerates into IGM if the policy is greedy , which represents the generality of IGO . Under the IGO , this paper proposes a novel factorization solution for MARL , named FSV , which learns to factorize soft value function into individual ones for decentralized execution enabling efficient learning and exploration through maximum entropy reinforcement learning . To our best knowledge , FSV is the first multiagent algorithm with stochastic policies using the idea of factorization , and theoretical analysis shows that FSV solves a rich class of tasks . We evaluate the performance of FSV in both discrete and continuous problems proposed by Son et al . ( 2019 ) ; Wei et al . ( 2018 ) and a range of unit micromanagement benchmark tasks in StarCraft II . The Non-Monotonic Matrix game shows that FSV has full expression ability in the discrete task , and the Max of Two Quadratics game shows that FSV is the first factorization algorithm that avoids the relative overgeneralization to converge to optima in the continuous task . On more challenging StarCraft II tasks , due to the high representation ability and exploration efficiency of FSV , it significantly outperforms other baselines , SMAC ( Samvelyan et al . ( 2019 ) ) . 2 PRELIMINARIES . 2.1 DEC-POMDP AND CTDE . A fully cooperative multi-agent task can be described as a Dec-POMDP defined by a tuple G = 〈S , U , P , r , Z , O , N , γ〉 , where s ∈ S is the global state of the environment . Each agent i ∈ N choose an action ui ∈ U at each time step , forming a joint action u ∈ UN . This causes a transition to the next state according to the state transition function P ( s′|s , u ) : S×UN ×S → [ 0 , 1 ] and reward function r ( s , u ) : S × UN → R shared by all agents . γ ∈ [ 0 , 1 ] is a discount factor . Each agent has individual , partial observation z ∈ Z according to observation function O ( s , i ) : S × N → Z . Each agent also has an action-observation history τi ∈ T : ( Z × U ) ∗ , on which it conditions a stochastic policy πi ( ui|τi ) : T × U → [ 0 , 1 ] . The joint policy π has a joint action-value function Qπ ( st , ut ) = Est+1 : ∞ , ut+1 : ∞ [ ∑∞ k=0 γ krt+k|st , ut ] . Centralized Training with Decentralized Execution ( CTDE ) is a common paradigm of cooperative MARL tasks . Through centralized training , the action-observation histories of all agents and the full state can be made accessible to all agents . This allows agents to learn and construct individual action-value functions correctly while selecting actions based on its own local action-observation history at execution time . 2.2 VDN , QMIX AND QTRAN . An important concept for factorizable tasks is IGM which asserts that the joint action-value function Qtot : T N × UN → R and individual action-value functions [ Qi : T × U → R ] Ni=1 satisfies arg max u Qtot ( τ , u ) = ( arg max u1 Q1 ( τ1 , u1 ) , ... , arg max uN QN ( τN , uN ) ) ( 1 ) To this end , VDN and QMIX give sufficient conditions for the IGM by additivity and monotonicity structures , respectively , as following : Qtot ( τ , u ) = N∑ i=1 Qi ( τi , ui ) and ∂Qtot ( τ , u ) ∂Qi ( τi , ui ) > 0 , ∀i ∈ N ( 2 ) However , there exist tasks whose joint action-value functions do not meet the said conditions , where VDN and QMIX fail to construct individual action-value function correctly . QTRAN uses a linear constraint between individual and joint action values to guarantee the optimal decentralisation . To avoid the intractability , QTRAN relax these constraints using two L2 penalties . However , this relaxation may violate the IGM and it has poor performance on multiple multi-agent cooperative benchmarks as reported recently . 2.3 THE RELATIVE OVERGENERALIZATION PROBLEM . Relative overgeneralization occurs when a sub-optimal Nash Equilibrium ( e.g . N in Fig . 1 ) in joint action space is preferred over an optimal Nash Equilibrium ( e.g . M in Fig . 1 ) because each agent ’ s action in the suboptimal equilibrium is a better choice when matched with arbitrary actions from the collaborating agents . Specifically , as shown in Figure 1 , where two agents with one-dimensional bounded action ( or three actions in discrete action space ) try to cooperate and find the optimal joint action , the action B ( or C ) is often preferred by most algorithms as mentioned in ( Son et al . ( 2019 ) and Wei et al . ( 2018 ) ) due to their structure limitation and lack of exploration . 3 METHOD . In this section , we will first introduce the IGO ( Individual-Global-Optimal ) , a new definition of factorizable MARL tasks with stochastic policies . Theoretical analysis shows that IGO degenerates into IGM if the policy is greedy . With the energy-based policy , the structure between joint and individual action values of IGO can be explicitly constructed , which is a novel factorization stochastic-based policy solution we proposed , named FSV . Specifically , FSV realizes IGO using an efficient linear structure and learns stochastic policies through maximum entropy reinforcement learning . 3.1 INDIVIDUAL GLOBAL OPTIMAL . In the CTDE paradigm , each agent i ∈ N chooses an action based on a stochastic policy πi ( ui|τi ) at the same time step . The joint policy πtot ( u|τ ) = ∏N i=1 πi ( ui|τi ) describes the probability of taking joint actions u on joint observation history τ . If each agent adopts its optimal policy while the joint policy is exactly the optimum , the task itself can achieve global optimum through local optimum , which naturally motivates us to consider the factorizable tasks with stochastic policy as following : Definition 1 For a joint optimal policy π∗tot ( u|τ ) : T N × UN → [ 0 , 1 ] , if there exists individual optimal policies [ π∗i ( ui|τi ) : T × U → [ 0 , 1 ] ] Ni=1 , such that the following holds π∗tot ( u|τ ) = N∏ i=1 π∗i ( ui|τi ) ( 3 ) then , we say that [ πi ] satisfy IGO for πtot As specified above , IGO requires the consistency of joint optimal policy and individual optimal policies rather than the actions in IGM , but it degenerates into IGM if policies are greedy . That is to say , IGO is more generality than IGM . 3.2 FSV . In this work , we take the energy-based policies as joint and individual optimal policy respectively , π∗tot ( u|τ ) = exp ( 1 α ( Qtot ( τ , u ) − Vtot ( τ ) ) ) ( 4 ) π∗i ( ui|τi ) = exp ( 1 αi ( Qi ( τi , ui ) − Vi ( τi ) ) ) ( 5 ) where α , αi are temperature parameters , Vtot ( τ ) = α log ∫ UN exp ( 1αQtot ( τ , u ) ) du and Vi ( τi ) = αi log ∫ U exp ( 1αiQi ( τi , u ) ) du are partition functions . The benefit of using energy-based policy is that it is a very general class of distributions that can represent complex , multi-modal behaviors Haarnoja et al . ( 2017 ) . Moreover , energy-based policies can easily degenerate into greedy policies as α , αi anneals . To learn this decentralized energy-based policy , we extend the maximum entropy reinforcement learning framework for the multi-agent setting , which we ’ ll describe in the next . Another benefit of considering the stochastic policy with explicit function class for factorizable tasks through IGO is that the architecture between joint and individual action values can be easily constructed through its constrains on policies with specific meanings as follows . Theorem 1 If the task satisfies IGO , with energy-based optimal policy , the joint action value Qtot can be factorized by individual action values [ Qi ] Ni=1 as following : Qtot ( τ , u ) = N∑ i=1 λ∗i [ Qi ( τi , ui ) − Vi ( τi ) ] + Vtot ( τ ) ( 6 ) where λ∗i = α/αi . Theorem 1 gives the decomposition structure like VDN—the joint value is a linear combination of individual values weighted by λ∗i > 0 . However , the function class defined by Eq ( 6 ) , which should only concern the task itself , is related to and limited by the distributions of policy . Although energybased distribution is very general which has the representation ability of most tasks , to establish the correct architecture between joint and individual Q-values and enable stable learning , we need to extend the function class into any distributions . The key idea is that we approximate the weight vector λi directly as α , αi is zero instead of annealing αi during training process . This extends the function class and will at least guarantee IGM constraint when α , αi is zero . Theorem 2 When α , αi → 0 , the function class defined by IGM is equivalent to the following Qtot ( τ , u ) = N∑ i=1 λi ( τ , u ) [ Qi ( τi , ui ) − Vi ( τi ) ] + Vtot ( τ ) ( 7 ) where λi ( τ , u ) = lim α , αi→0 λ∗i . Note that λi is now a function of observations and actions due to the relaxation . Eq ( 7 ) allows us to use a simple linear structure to train joint and individual action values efficiently and guarantee the correct estimation of optimal Q-values . We ’ ll describe it in experiment . Then , we introduce the maximum entropy reinforcement learning in CTDE setting which is an directly extension of soft actor-critic ( q-learning ) . The standard reinforcement learning tries to maximum the expected return ∑ tEπ [ rt ] , while the maximum entropy objective generalizes the standard objective by augmenting it with an entropy term , such that the optimal policy additionally aims to maximize its entropy at each visited state πMaxEnt = arg max π ∑ t Eπ [ rt + αH ( π ( ·|st ) ) ] ( 8 ) where α is the temperature parameter that determines the relative importance of the entropy term versus the reward , and thus controls the stochasticity of the optimal policy ( Haarnoja et al . ( 2017 ) ) . We can extend it into cooperative multi-agent tasks by directly considering the joint policy πtot ( u|τ ) and defining the soft joint action-value function as following : Qtot ( τt , ut ) = r ( τt , ut ) + Eτt+1 , ... [ ∞∑ k=1 γk ( rt+k + αH ( π ∗ tot ( ·|τt+k ) ) ] ( 9 ) then the joint optimal policy for Eq ( 8 ) is given by Eq ( 4 ) ( Haarnoja et al . ( 2017 ) ) . Note that we don ’ t start considering decentralized policies , the joint Q-function should satisfy the soft Bellman equation : Q∗tot ( τt , ut ) = rt + Eτt+1 [ V ∗ tot ( τt+1 ) ] ( 10 ) And we can update the joint Q functions in centralized training through soft Q-iteration : Qtot ( τt , ut ) ← rt + Eτt+1 [ Vtot ( τt+1 ) ] ( 11 ) It ’ s natural to take the similar energy-based distribution as individual optimal policies π∗i in Eq ( 5 ) which allows us to update the individual policies through soft policy-iteration : πnewi = arg min π′∈ ∏ DKL ( π′ ( ·|τ ) ||π∗i ( ·|τ ) ) ( 12 ) | This paper proposes a novel MARL framework named FSV, which incorporates the idea of energy-based policies and an efficient linear decomposition architecture in the joint action-value function with multi-agent maximum entropy reinforcement learning. Besides, the authors propose the IGO, which extends the IGM in stochastic policy cases. FSV suits in both the discrete and continuous action space scenarios. Experiments conducted on two simple examples with discrete and continuous action settings show that FSV could overcome the relative overgeneralization problem with the proper temperature setting. Furthermore, FSV in the challenging SMAC benchmark outperforms VDN, QMIX, and QTRAN in three scenarios. | SP:f643363fb9654443375b1772cd88b53dbe1bed87 |
FSV: Learning to Factorize Soft Value Function for Cooperative Multi-Agent Reinforcement Learning | 1 INTRODUCTION . Cooperative multi-agent reinforcement learning ( MARL ) aims to instill in agents policies that maximize the team reward accumulated over time ( Panait & Luke ( 2005 ) ; Busoniu et al . ( 2008 ) ; Tuyls & Weiss ( 2012 ) ) , which has great potential to address complex real-world problems , such as coordinating autonomous cars ( Cao et al . ( 2013 ) ) . Considering the measurement and communication limitations in practical problems , cooperative MARL faces the partial observability challenge . That is , each agent chooses actions just based on its local observations . Centralized training with decentralized execution ( CTDE ) ( Oliehoek et al . ( 2011 ) ) is a common paradigm to address the partial observability , where agents ’ policies are trained with access to global information in a centralized way and executed only based on local observations in a decentralized way , such as the MADDPG ( Lowe ( 2017 ) ) and COMA ( Foerster et al . ( 2017 ) ) . However , the size of the joint state-action space of the centralized value function grows exponentially as the number of agents increases , which is known as the scalibility challenge . Value function factorization methods have been an increasingly popular paradigm for solving the scalability in CTDE by satisfying the Individual-Global-Max ( IGM ) where the optimal joint action selection should be consistent with the optimal individual action selections . Three representative examples of value function factorization methods include VDN ( Sunehag et al . ( 2017 ) ) , QMIX ( Rashid et al . ( 2018 ) ) , and QTRAN ( Son et al . ( 2019 ) ) . All these methods are -greedy policies , where VDN and QMIX give sufficient but unnecessary conditions for IGM by additivity and monotonicity structures respectively , and the QTRAN formulates the IGM as an optimization problem with linear constraints . Although these methods have witnessed some success in some tasks , they all face relative overgeneralization , where agents may stick into a suboptimal Nash Equilibrium . In fact , relative overgeneralization is a grave pathology arising which occurs when a suboptimal Nash Equilibrium in the joint space of action priors to an optimal Nash Equilibrium since each agent ’ s action in the suboptimal equilibrium is a better choice ( Wei & Luke ( 2016 ) ) . The non-monotonic matrix game is a simple discrete example . Both VDN and QMIX fail to learn the optimal policy in the non-monotonic matrix due to their structure limitation . Although QTRAN expresses the complete value function representation ability in the non-monotonic matrix , its full expressive ability decreases in the complex tasks due to the computationally intractable constraints relaxing with tractable L2 penalties . Besides , QTRAN sacrifices the tractability in continuous action space . Therefore , in discrete and continuous tasks , achieving effective scalability while avoiding relative overgeneralization remains an open problem for cooperative MARL . To address this challenge , this paper presents a new definition of factorizable tasks called IGO ( Individual-Global-Optimal ) which introduces the consistency of joint optimal stochastic policies and individual optimal stochastic policies . Theoretical analysis shows that IGO degenerates into IGM if the policy is greedy , which represents the generality of IGO . Under the IGO , this paper proposes a novel factorization solution for MARL , named FSV , which learns to factorize soft value function into individual ones for decentralized execution enabling efficient learning and exploration through maximum entropy reinforcement learning . To our best knowledge , FSV is the first multiagent algorithm with stochastic policies using the idea of factorization , and theoretical analysis shows that FSV solves a rich class of tasks . We evaluate the performance of FSV in both discrete and continuous problems proposed by Son et al . ( 2019 ) ; Wei et al . ( 2018 ) and a range of unit micromanagement benchmark tasks in StarCraft II . The Non-Monotonic Matrix game shows that FSV has full expression ability in the discrete task , and the Max of Two Quadratics game shows that FSV is the first factorization algorithm that avoids the relative overgeneralization to converge to optima in the continuous task . On more challenging StarCraft II tasks , due to the high representation ability and exploration efficiency of FSV , it significantly outperforms other baselines , SMAC ( Samvelyan et al . ( 2019 ) ) . 2 PRELIMINARIES . 2.1 DEC-POMDP AND CTDE . A fully cooperative multi-agent task can be described as a Dec-POMDP defined by a tuple G = 〈S , U , P , r , Z , O , N , γ〉 , where s ∈ S is the global state of the environment . Each agent i ∈ N choose an action ui ∈ U at each time step , forming a joint action u ∈ UN . This causes a transition to the next state according to the state transition function P ( s′|s , u ) : S×UN ×S → [ 0 , 1 ] and reward function r ( s , u ) : S × UN → R shared by all agents . γ ∈ [ 0 , 1 ] is a discount factor . Each agent has individual , partial observation z ∈ Z according to observation function O ( s , i ) : S × N → Z . Each agent also has an action-observation history τi ∈ T : ( Z × U ) ∗ , on which it conditions a stochastic policy πi ( ui|τi ) : T × U → [ 0 , 1 ] . The joint policy π has a joint action-value function Qπ ( st , ut ) = Est+1 : ∞ , ut+1 : ∞ [ ∑∞ k=0 γ krt+k|st , ut ] . Centralized Training with Decentralized Execution ( CTDE ) is a common paradigm of cooperative MARL tasks . Through centralized training , the action-observation histories of all agents and the full state can be made accessible to all agents . This allows agents to learn and construct individual action-value functions correctly while selecting actions based on its own local action-observation history at execution time . 2.2 VDN , QMIX AND QTRAN . An important concept for factorizable tasks is IGM which asserts that the joint action-value function Qtot : T N × UN → R and individual action-value functions [ Qi : T × U → R ] Ni=1 satisfies arg max u Qtot ( τ , u ) = ( arg max u1 Q1 ( τ1 , u1 ) , ... , arg max uN QN ( τN , uN ) ) ( 1 ) To this end , VDN and QMIX give sufficient conditions for the IGM by additivity and monotonicity structures , respectively , as following : Qtot ( τ , u ) = N∑ i=1 Qi ( τi , ui ) and ∂Qtot ( τ , u ) ∂Qi ( τi , ui ) > 0 , ∀i ∈ N ( 2 ) However , there exist tasks whose joint action-value functions do not meet the said conditions , where VDN and QMIX fail to construct individual action-value function correctly . QTRAN uses a linear constraint between individual and joint action values to guarantee the optimal decentralisation . To avoid the intractability , QTRAN relax these constraints using two L2 penalties . However , this relaxation may violate the IGM and it has poor performance on multiple multi-agent cooperative benchmarks as reported recently . 2.3 THE RELATIVE OVERGENERALIZATION PROBLEM . Relative overgeneralization occurs when a sub-optimal Nash Equilibrium ( e.g . N in Fig . 1 ) in joint action space is preferred over an optimal Nash Equilibrium ( e.g . M in Fig . 1 ) because each agent ’ s action in the suboptimal equilibrium is a better choice when matched with arbitrary actions from the collaborating agents . Specifically , as shown in Figure 1 , where two agents with one-dimensional bounded action ( or three actions in discrete action space ) try to cooperate and find the optimal joint action , the action B ( or C ) is often preferred by most algorithms as mentioned in ( Son et al . ( 2019 ) and Wei et al . ( 2018 ) ) due to their structure limitation and lack of exploration . 3 METHOD . In this section , we will first introduce the IGO ( Individual-Global-Optimal ) , a new definition of factorizable MARL tasks with stochastic policies . Theoretical analysis shows that IGO degenerates into IGM if the policy is greedy . With the energy-based policy , the structure between joint and individual action values of IGO can be explicitly constructed , which is a novel factorization stochastic-based policy solution we proposed , named FSV . Specifically , FSV realizes IGO using an efficient linear structure and learns stochastic policies through maximum entropy reinforcement learning . 3.1 INDIVIDUAL GLOBAL OPTIMAL . In the CTDE paradigm , each agent i ∈ N chooses an action based on a stochastic policy πi ( ui|τi ) at the same time step . The joint policy πtot ( u|τ ) = ∏N i=1 πi ( ui|τi ) describes the probability of taking joint actions u on joint observation history τ . If each agent adopts its optimal policy while the joint policy is exactly the optimum , the task itself can achieve global optimum through local optimum , which naturally motivates us to consider the factorizable tasks with stochastic policy as following : Definition 1 For a joint optimal policy π∗tot ( u|τ ) : T N × UN → [ 0 , 1 ] , if there exists individual optimal policies [ π∗i ( ui|τi ) : T × U → [ 0 , 1 ] ] Ni=1 , such that the following holds π∗tot ( u|τ ) = N∏ i=1 π∗i ( ui|τi ) ( 3 ) then , we say that [ πi ] satisfy IGO for πtot As specified above , IGO requires the consistency of joint optimal policy and individual optimal policies rather than the actions in IGM , but it degenerates into IGM if policies are greedy . That is to say , IGO is more generality than IGM . 3.2 FSV . In this work , we take the energy-based policies as joint and individual optimal policy respectively , π∗tot ( u|τ ) = exp ( 1 α ( Qtot ( τ , u ) − Vtot ( τ ) ) ) ( 4 ) π∗i ( ui|τi ) = exp ( 1 αi ( Qi ( τi , ui ) − Vi ( τi ) ) ) ( 5 ) where α , αi are temperature parameters , Vtot ( τ ) = α log ∫ UN exp ( 1αQtot ( τ , u ) ) du and Vi ( τi ) = αi log ∫ U exp ( 1αiQi ( τi , u ) ) du are partition functions . The benefit of using energy-based policy is that it is a very general class of distributions that can represent complex , multi-modal behaviors Haarnoja et al . ( 2017 ) . Moreover , energy-based policies can easily degenerate into greedy policies as α , αi anneals . To learn this decentralized energy-based policy , we extend the maximum entropy reinforcement learning framework for the multi-agent setting , which we ’ ll describe in the next . Another benefit of considering the stochastic policy with explicit function class for factorizable tasks through IGO is that the architecture between joint and individual action values can be easily constructed through its constrains on policies with specific meanings as follows . Theorem 1 If the task satisfies IGO , with energy-based optimal policy , the joint action value Qtot can be factorized by individual action values [ Qi ] Ni=1 as following : Qtot ( τ , u ) = N∑ i=1 λ∗i [ Qi ( τi , ui ) − Vi ( τi ) ] + Vtot ( τ ) ( 6 ) where λ∗i = α/αi . Theorem 1 gives the decomposition structure like VDN—the joint value is a linear combination of individual values weighted by λ∗i > 0 . However , the function class defined by Eq ( 6 ) , which should only concern the task itself , is related to and limited by the distributions of policy . Although energybased distribution is very general which has the representation ability of most tasks , to establish the correct architecture between joint and individual Q-values and enable stable learning , we need to extend the function class into any distributions . The key idea is that we approximate the weight vector λi directly as α , αi is zero instead of annealing αi during training process . This extends the function class and will at least guarantee IGM constraint when α , αi is zero . Theorem 2 When α , αi → 0 , the function class defined by IGM is equivalent to the following Qtot ( τ , u ) = N∑ i=1 λi ( τ , u ) [ Qi ( τi , ui ) − Vi ( τi ) ] + Vtot ( τ ) ( 7 ) where λi ( τ , u ) = lim α , αi→0 λ∗i . Note that λi is now a function of observations and actions due to the relaxation . Eq ( 7 ) allows us to use a simple linear structure to train joint and individual action values efficiently and guarantee the correct estimation of optimal Q-values . We ’ ll describe it in experiment . Then , we introduce the maximum entropy reinforcement learning in CTDE setting which is an directly extension of soft actor-critic ( q-learning ) . The standard reinforcement learning tries to maximum the expected return ∑ tEπ [ rt ] , while the maximum entropy objective generalizes the standard objective by augmenting it with an entropy term , such that the optimal policy additionally aims to maximize its entropy at each visited state πMaxEnt = arg max π ∑ t Eπ [ rt + αH ( π ( ·|st ) ) ] ( 8 ) where α is the temperature parameter that determines the relative importance of the entropy term versus the reward , and thus controls the stochasticity of the optimal policy ( Haarnoja et al . ( 2017 ) ) . We can extend it into cooperative multi-agent tasks by directly considering the joint policy πtot ( u|τ ) and defining the soft joint action-value function as following : Qtot ( τt , ut ) = r ( τt , ut ) + Eτt+1 , ... [ ∞∑ k=1 γk ( rt+k + αH ( π ∗ tot ( ·|τt+k ) ) ] ( 9 ) then the joint optimal policy for Eq ( 8 ) is given by Eq ( 4 ) ( Haarnoja et al . ( 2017 ) ) . Note that we don ’ t start considering decentralized policies , the joint Q-function should satisfy the soft Bellman equation : Q∗tot ( τt , ut ) = rt + Eτt+1 [ V ∗ tot ( τt+1 ) ] ( 10 ) And we can update the joint Q functions in centralized training through soft Q-iteration : Qtot ( τt , ut ) ← rt + Eτt+1 [ Vtot ( τt+1 ) ] ( 11 ) It ’ s natural to take the similar energy-based distribution as individual optimal policies π∗i in Eq ( 5 ) which allows us to update the individual policies through soft policy-iteration : πnewi = arg min π′∈ ∏ DKL ( π′ ( ·|τ ) ||π∗i ( ·|τ ) ) ( 12 ) | The paper proposes a Q-factorization method by assuming an energy-based policies model. Q-functions are formulated as soft value functions with the energy parameters, and this adoption renders the function factorization more flexible compared to existing ones. The proposed solution applies to continuous-action tasks, a feat left unconquered by some of the existing methods. Authors exhibit that FSV outperforms others in various environments characterized by local optima. | SP:f643363fb9654443375b1772cd88b53dbe1bed87 |
Generalization in data-driven models of primary visual cortex | 1 INTRODUCTION . A long lasting challenge in sensory neuroscience is to understand the computations of neurons in the visual system stimulated by natural images ( Carandini et al. , 2005 ) . Important milestones towards this goal are general system identification models that can predict the response of large populations of neurons to arbitrary visual inputs . In recent years , deep neural networks have set new standards in predicting responses in the visual system ( Yamins et al. , 2014 ; Vintch et al. , 2015 ; Antolík et al. , 2016 ; Cadena et al. , 2019a ; Batty et al. , 2016 ; Kindel et al. , 2017 ; Klindt et al. , 2017 ; Zhang et al. , 2018 ; Ecker et al. , 2018 ; Sinz et al. , 2018 ) and the ability to yield novel response characterizations ( Walker et al. , 2019 ; Bashivan et al. , 2019 ; Ponce et al. , 2019 ; Kindel et al. , 2019 ; Ukita et al. , 2019 ) . Such a general system identification model is one way for neuroscientists to investigate the computations of the respective brain areas in silico . Such in silico experiments exhibit the possibility to study the system at a scale and level of detail that is impossible in real experiments which have to cope with limited experimental time and adaptation effects in neurons . Moreover , all parameters , connections and weights in an in silico model can be accessed directly , opening up the opportunity to manipulate the model or determine its detailed tuning properties using numerical optimization methods . In order for the results of such analyses performed on an in silico model to be reliable , however , one needs to make sure that the model does indeed replicate the responses of its biological counterpart faithfully . This work provides an important step towards obtaining such a generalizing model of mouse V1 . High performing predictive models need to account for the increasingly nonlinear response properties of neurons along the visual hierarchy . As many of the nonlinearities are currently unknown , one of the key challenges in neural system identification is to find a good set of characteristic nonlinear basis functions—so called representations . However , learning these complex nonlinearities from single neuron responses is difficult given limited experimental data . Two approaches have proven to be promising in the past : Task-driven system identification networks rely on transfer learning and use nonlinear representations pre-trained on large datasets for standard vision tasks , such as object recognition ( Yamins & DiCarlo , 2016 ) . Single neuron responses are predicted from a particular layer of a pre-trained network using a simple readout mechanism , usually an affine function followed by a static nonlinearity . Data-driven models share a common nonlinear representation among hundreds or thousands of neurons , and train the entire network end-to-end on stimulus response pairs from the experiment . Because the nonlinear representation is shared , it is trained via massive multi-task learning ( one neuron–one task ) and can be learned even from limited experimental data . Task-driven networks are appealing because they only need to fit the readout mechanisms on top of a given representation and thus are data-efficient in terms of the number of stimulus-response pairs needed to achieve good predictive performance ( Cadena et al. , 2019a ) . Moreover , as their representations are obtained independently of the neural data , a good predictive performance suggests that the nonlinear features are characteristic for a particular brain area . This additionally offers the interesting normative perspective that the functional representations in deep networks and biological vision could be aligned by common computational goals ( Yamins & DiCarlo , 2016 ; Kell et al. , 2018 ; Kubilius et al. , 2018 ; Nayebi et al. , 2018 ; Sinz et al. , 2019 ; Güçlü & van Gerven , 2014 ; Kriegeskorte , 2015 ; Khaligh-Razavi & Kriegeskorte , 2014 ; Kietzmann et al. , 2019 ) . In order to quantify the fit of the normative hypothesis , it is important to compare a given representation to other alternatives ( Schrimpf et al. , 2018 ; Cadena et al. , 2019a ) . However , while representations pre-trained on ImageNet are the state-of-the-art for predicting visual cortex in primates ( Cadena et al. , 2019a ; Yamins & DiCarlo , 2016 ) , recent work has demonstrated that pre-training on object categorization ( VGG16 ) yields no benefits over random initialization for mouse visual cortex ( Cadena et al. , 2019b ) . Since random representation should not be characteristic for a particular brain area and other tasks that might yield more meaningful representations have not been found yet , this raises the questions whether there are better ways to obtain a generalizing nonlinear representation for mouse visual cortex . Here , we investigate whether such a generalizing representation can instead be obtained from datadriven networks . For this purpose , we develop a new data efficient readout which is designed to push non-linear computations into the core and test whether this core has learned general characteristic features of mouse visual cortex by applying the same criteria as for the task-driven approach : The ability to predict a population of unseen neurons in a new animal ( transfer learning ) . Specifically , we make the following contributions : 1 We introduce a novel readout mechanism that keeps the number of per-neuron parameters at a minimum and learns a bivariate Gaussian distribution for the readout position from anatomical data using retinotopy . With this readout alone , we surpass the previous state-of-the-art performance in direct training by 7 % . 2 We demonstrate that a representation pre-trained on thousands of neurons from various animals generalizes to neurons from an unseen animal ( transfer learning ) . It exceeds the direct training condition by another 11 % , setting the new state-of-the-art and outperforms a task-driven representation—trained on object recognition—by about 33 % . 3 We then show that this generalization can be attributed to the representation and not the readout mechanism , indicating that the data-driven core indeed captures generalizing features of cortex : A representation trained on a single experiment ( 4.5k examples ) in combination with a readout trained on anatomically matched neurons from four experiments ( 17.5k examples ) did not achieve this performance . 4 Lastly , we find that transfer learning with our data-driven core is more data-efficient than direct training , achieving the same performance with only 40 % of the data . Ne ur on se ts Image sets Unique anim als Evaluation 11-S 4-S : matched 4-S : diff animals 1-S Figure 1 : Scans and training sets . Overview of the datasets and how they are combined into different training sets . Each scan was performed on a specific set of neurons ( rows ) using a specific set of unique images ( columns ) . Repeatedly presented test images were the same for all scans . Some scans were performed on the same neuron but with different image sets ( first row ) . Colors indicate grouping of scans into training sets and match line colors in Fig . 5 to indicate which dataset a representation/core ( not the readout ) was trained on . 2 METHODS . 2.1 DATA . Functional data The data used in our experiments consists of pairs of neural population responses and grayscale visual stimuli sampled and cropped from ImageNet , isotropically downsampled to 64× 36 px , with a resolution of 0.53 ppd ( pixels per degree of visual angle ) . The neural responses were recorded from layer L2/3 of the primary visual cortex ( area V1 ) of the mouse , using a wide field two photon microscope ( Sofroniew et al. , 2016 ) . Activity was measured using the genetically encoded calcium indicator GCaMP6s . V1 was targeted based on anatomical location as verified by numerous previous experiments performing retinotopic mapping using intrinsic imaging . We selected cells based on a classifier for somata on the segmented cell masks and deconvolved their fluorescence traces ( Pnevmatikakis et al. , 2016 ) . We did not filter cells according to visual responsiveness . The stimulation paradigm and data pre-processing followed the procedures described by Walker et al . ( 2019 ) . A single scan contained the responses of approximately 5000–9000 neurons to up to 6000 images , of which 1000 images consist of 100 unique images which were presented 10 times each to allow for an estimate of the reliability of the neuron ( see Appendix for a detailed description of the datasets ) . We used the repeated images for testing , and split the rest into 4500 training and 500 validation images . The neural data was preprocessed by normalizing the responses of the neurons by their standard deviation on the training set . To put the number of recorded neurons per scan into perspective , assuming that V1 has an area of about 4mm2 , that L2/3 is about 150-250µm thick and has a cell density of 80k excitatory cells per mm3 , entire V1 L2/3 should contain about 48k - 80k neurons ( Garrett et al. , 2014 ; Jurjut et al. , 2017 ; Schüz & Palm , 1989 ) , similar to the maximum number of neurons that we train a model on ( 72k neuron , 11-S , Fig . 1 , orange ) . Note , however , that this does not mean that these 72k neurons sample V1 or the visual field of a mouse evenly because of possible experimental biases in the choice of the recording location . All together , we used 13 scans from a total of 7 animals ( Fig . 1 ) . Each scan is defined by the set of neurons it was performed on ( rows/neuron sets in Fig . 1 ) and the set of images that were shown ( columns/image sets in Fig . 1 ) . Different image sets had non-overlapping training/validation images , but the same test images . Some of the scans were performed on the same neurons , but with different sets of natural images ( first row in Fig . 1 ) . These neurons were matched across scans by cross-correlating the structural scan planes against functionally recorded stacks ( Walker et al. , 2019 ) . Stitching data from several scans in this way allowed us to increase the number of image presentations per neuron beyond what would be possible in a single scan . We combined these scans into different training sets ( one color–one training set in Fig . 1 ) and named each one of them—e.g . 11-S for a set with 11 Scans . The different sets are further explained in the respective experiments they are used in . All data from the seven mice used in this work has been recorded by trained personnel under a strict protocol according to the regulations of the local authorities at Balor College of Medicine . 2.2 NETWORKS AND TRAINING . The networks are split conceptually into two parts : a core and a readout . The core captures the nonlinear image representation and is shared among all neurons . The readout maps the features of the core into neural responses and contains all neuron specific parameters . Readout position network Scan field Feature vector at sampled position x y y' x' x y Topmost block of core Figure 2 : Using retinotopy to learn the readout position from anatomical data . The Gaussian readout for each neuron uses features from a single location on the final tensor of the core CNN ( bottom ) . The position is drawn from a 2D Gaussian for every image during training . The parameters of the Gaussian for each neuron are learned during training . The means of the Gaussians are predicted from each neuron ’ s coordinates on cortex by a Readout Position Network whose weights are shared across neurons and learned during training ( top ) . During testing , the mean of the Gaussian is used as the neuron ’ s position . Representation/Core We model the core with a four-layer convolutional neural network ( CNN ) , with 64 feature channels per layer . In each layer , the 2d-convolutional layer is followed by a batch normalization layer and an ELU nonlinearity ( Ioffe & Szegedy , 2015 ; Clevert et al. , 2015 ) . All convolutional layers after the first one are depth-separable convolutions ( Chollet , 2017 ) which we found to yield better results than standard convolutional layers in a search among different architecture choices . Readouts We compared two different types of readouts to map the nonlinear features of the core to the response of each neuron . For each neuron , a tensor of x ∈ Rw×h×c ( width , height , channels ) needs to be mapped to a single scalar , corresponding to the target neuron ’ s response . All of our readouts assume that this function is affine with a linear weight tensor w ∈ Rw×h×c , followed by an ELU offset by one ( ELU+1 ) , to keep the response positive . Furthermore , both readouts assume that in feature space the receptive field of each neuron does not change its position across features , but they differ in how this receptive field location is constrained and learned . The factorized readout ( Klindt et al. , 2017 ) factorizes the 3d readout tensor into a lower-dimensional representation by using a spatial mask matrix uij and a vector of feature weights vk , i.e . wijk = uijvk . The spatial mask uij is restricted to be positive and encouraged to be sparse through an L1 regularizer . Our novel Gaussian readout reduces the number of per-neuron parameters . It computes a linear combination of the feature activations at a single spatial position— parametrized as ( x , y ) coordinates —via bilinear interpolation ( Sinz et al. , 2018 ) . To facilitate gradient flow during training , we replace the spatial downsampling used in ( Sinz et al. , 2018 ) by a sampling step , which during training draws the readout position of each nth neuron from a bivariate Gaussian distribution N ( µn , Σn ) for each image in a batch separately . This is the sampling version of ( St-Yves & Naselaris , 2017 ) where the readout location is weighted spatially with a Gaussian profile . In our case , µn and Σn are learned via the reparametrization trick ( Kingma & Welling , 2014 ) . Initializing Σn large enough ensures that there is gradient information available to learn µn reliably . During training , Σn shrinks as the estimate of the neuron position improves . During evaluation we always use the position defined by µn , making the readout deterministic . This version of the Gaussian readout has c+ 7 parameters per neuron ( 2 for µ , 4 for Σ because the linear mapping in the reparametrization trick is 2× 2 , and 1 for the scalar bias ) . The second innovation of our Gaussian readout is to couple the location estimation of single neurons by exploiting the retinotopic organization of primary visual cortex ( V1 ) and other areas . Since V1 preserves the topology of visual space , we estimate a neuron ’ s receptive field location from its position pn ∈ R2 along the cortical surface available from the experiments . To that end , we learn a common function µn = f ( pn ) represented by a neural network that is shared across all neurons ( Fig . 2 ) . Since we work with neurons from local patches of V1 , we model f as a linear fully connected network . This approach turns the problem of estimating each neuron ’ s receptive field location from limited data into estimating a single linear transformation shared by all neurons , and reduces the number of per-neuron parameters to c+ 5 . We initialized the Readout Position Network to a random orthonormal 2-2 matrix scaled by a factor which was optimized in hyper-parameter selection . Finally , when training on several scans of anatomically matched neurons from the same mouse ( see Data ) , we share the feature weights vk across scans . To account for differences in spike inference between scans , we introduced a scan-specific scale and bias for each neuron after the linear readout . We mention in the respective sections whether features are shared or not . The bias of each readout is initialized with the average response on the training set . The effects of both feature sharing and learning from cortical anatomy on the performance of the readout are shown in the Appendix . Training The networks were trained to minimize Poisson loss 1m ∑m i=1 ( r̂ ( i ) − r ( i ) log r̂ ( i ) ) where m denotes the number of neurons , r̂ the predicted neuronal response and r the observed response . We used early stopping on the correlation between predicted and measured neuronal responses on the validation set ( Prechelt , 1998 ) : if the correlation failed to increase during any 5 consecutive passes through the entire training set ( epochs ) , we stopped the training and restored the model to the best performing model over the course of training . We found that this combination of Poisson objective and early stopping on correlation yielded the best results . After the first stop , we decreased the learning rate from 5× 10−3 twice by a decay factor of 0.3 , and resumed training until it was stopped again . Network parameters were iteratively optimized via stochastic gradient descent using the Adam optimizer ( Kingma & Ba , 2015 ) with a batch size of 64 . Once training completed , the trained network was evaluated on the validation set to yield the score used for hyper-parameter selection . The hyper-parameters were then selected with a Bayesian search ( Snoek et al. , 2012 ) of 100 trials and subsequently kept fixed throughout all experiments . Only the scale of the readout regularization was fine-tuned with additional Bayesian searches for the cases of different amounts of data independently . In transfer experiments , we froze all parameters of the core and trained a new readout only . Evaluation We report performance as fraction oracle ( see Walker et al. , 2019 ) , which is defined as the correlation of the predicted response and the observed single-trial test responses relative to the maximally achievable correlation measured from repeated presentations . We estimated the oracle correlation using a jackknife estimator ( correlation of leave-one-out mean against single trial ) . Per data point , we trained 25 networks for all combinations of five different model initializations and five random partitions of the neurons into core and transfer sets . The image subsets were drawn randomly once and kept fixed across all experiments except in Fig . 5 where the full neuron set was used and 5 random partitions of image subsets were drawn instead . We selected the best performing models across initializations and calculated 95 % confidence intervals over neuron- or image seeds . | The authors adopt a data-driven approach to neural system identification. They train a neural network consisting of a "core" and a "readout" in an end-to-end fashion to learn stimulus (visual inputs) -- response (single neuron activity) pairs. Since the core is shared across neurons, these stimulus-response pairs can be learnt in a massively parallel manner. In particular, they propose a novel readout mechanism that is parameter efficient and drives the core to learn better and generalizable features of the visual inputs. They find that their representations are more suited to predict neural responses in the mouse visual cortex when compared to representations derived from task-driven learning, especially in the context of transfer to previously unseen animals. Lastly, they also observe that the combination of their core+readout is more sample efficient than other naive alternatives. | SP:06fe119d437e7f517496d554a091979ff74c9431 |
Generalization in data-driven models of primary visual cortex | 1 INTRODUCTION . A long lasting challenge in sensory neuroscience is to understand the computations of neurons in the visual system stimulated by natural images ( Carandini et al. , 2005 ) . Important milestones towards this goal are general system identification models that can predict the response of large populations of neurons to arbitrary visual inputs . In recent years , deep neural networks have set new standards in predicting responses in the visual system ( Yamins et al. , 2014 ; Vintch et al. , 2015 ; Antolík et al. , 2016 ; Cadena et al. , 2019a ; Batty et al. , 2016 ; Kindel et al. , 2017 ; Klindt et al. , 2017 ; Zhang et al. , 2018 ; Ecker et al. , 2018 ; Sinz et al. , 2018 ) and the ability to yield novel response characterizations ( Walker et al. , 2019 ; Bashivan et al. , 2019 ; Ponce et al. , 2019 ; Kindel et al. , 2019 ; Ukita et al. , 2019 ) . Such a general system identification model is one way for neuroscientists to investigate the computations of the respective brain areas in silico . Such in silico experiments exhibit the possibility to study the system at a scale and level of detail that is impossible in real experiments which have to cope with limited experimental time and adaptation effects in neurons . Moreover , all parameters , connections and weights in an in silico model can be accessed directly , opening up the opportunity to manipulate the model or determine its detailed tuning properties using numerical optimization methods . In order for the results of such analyses performed on an in silico model to be reliable , however , one needs to make sure that the model does indeed replicate the responses of its biological counterpart faithfully . This work provides an important step towards obtaining such a generalizing model of mouse V1 . High performing predictive models need to account for the increasingly nonlinear response properties of neurons along the visual hierarchy . As many of the nonlinearities are currently unknown , one of the key challenges in neural system identification is to find a good set of characteristic nonlinear basis functions—so called representations . However , learning these complex nonlinearities from single neuron responses is difficult given limited experimental data . Two approaches have proven to be promising in the past : Task-driven system identification networks rely on transfer learning and use nonlinear representations pre-trained on large datasets for standard vision tasks , such as object recognition ( Yamins & DiCarlo , 2016 ) . Single neuron responses are predicted from a particular layer of a pre-trained network using a simple readout mechanism , usually an affine function followed by a static nonlinearity . Data-driven models share a common nonlinear representation among hundreds or thousands of neurons , and train the entire network end-to-end on stimulus response pairs from the experiment . Because the nonlinear representation is shared , it is trained via massive multi-task learning ( one neuron–one task ) and can be learned even from limited experimental data . Task-driven networks are appealing because they only need to fit the readout mechanisms on top of a given representation and thus are data-efficient in terms of the number of stimulus-response pairs needed to achieve good predictive performance ( Cadena et al. , 2019a ) . Moreover , as their representations are obtained independently of the neural data , a good predictive performance suggests that the nonlinear features are characteristic for a particular brain area . This additionally offers the interesting normative perspective that the functional representations in deep networks and biological vision could be aligned by common computational goals ( Yamins & DiCarlo , 2016 ; Kell et al. , 2018 ; Kubilius et al. , 2018 ; Nayebi et al. , 2018 ; Sinz et al. , 2019 ; Güçlü & van Gerven , 2014 ; Kriegeskorte , 2015 ; Khaligh-Razavi & Kriegeskorte , 2014 ; Kietzmann et al. , 2019 ) . In order to quantify the fit of the normative hypothesis , it is important to compare a given representation to other alternatives ( Schrimpf et al. , 2018 ; Cadena et al. , 2019a ) . However , while representations pre-trained on ImageNet are the state-of-the-art for predicting visual cortex in primates ( Cadena et al. , 2019a ; Yamins & DiCarlo , 2016 ) , recent work has demonstrated that pre-training on object categorization ( VGG16 ) yields no benefits over random initialization for mouse visual cortex ( Cadena et al. , 2019b ) . Since random representation should not be characteristic for a particular brain area and other tasks that might yield more meaningful representations have not been found yet , this raises the questions whether there are better ways to obtain a generalizing nonlinear representation for mouse visual cortex . Here , we investigate whether such a generalizing representation can instead be obtained from datadriven networks . For this purpose , we develop a new data efficient readout which is designed to push non-linear computations into the core and test whether this core has learned general characteristic features of mouse visual cortex by applying the same criteria as for the task-driven approach : The ability to predict a population of unseen neurons in a new animal ( transfer learning ) . Specifically , we make the following contributions : 1 We introduce a novel readout mechanism that keeps the number of per-neuron parameters at a minimum and learns a bivariate Gaussian distribution for the readout position from anatomical data using retinotopy . With this readout alone , we surpass the previous state-of-the-art performance in direct training by 7 % . 2 We demonstrate that a representation pre-trained on thousands of neurons from various animals generalizes to neurons from an unseen animal ( transfer learning ) . It exceeds the direct training condition by another 11 % , setting the new state-of-the-art and outperforms a task-driven representation—trained on object recognition—by about 33 % . 3 We then show that this generalization can be attributed to the representation and not the readout mechanism , indicating that the data-driven core indeed captures generalizing features of cortex : A representation trained on a single experiment ( 4.5k examples ) in combination with a readout trained on anatomically matched neurons from four experiments ( 17.5k examples ) did not achieve this performance . 4 Lastly , we find that transfer learning with our data-driven core is more data-efficient than direct training , achieving the same performance with only 40 % of the data . Ne ur on se ts Image sets Unique anim als Evaluation 11-S 4-S : matched 4-S : diff animals 1-S Figure 1 : Scans and training sets . Overview of the datasets and how they are combined into different training sets . Each scan was performed on a specific set of neurons ( rows ) using a specific set of unique images ( columns ) . Repeatedly presented test images were the same for all scans . Some scans were performed on the same neuron but with different image sets ( first row ) . Colors indicate grouping of scans into training sets and match line colors in Fig . 5 to indicate which dataset a representation/core ( not the readout ) was trained on . 2 METHODS . 2.1 DATA . Functional data The data used in our experiments consists of pairs of neural population responses and grayscale visual stimuli sampled and cropped from ImageNet , isotropically downsampled to 64× 36 px , with a resolution of 0.53 ppd ( pixels per degree of visual angle ) . The neural responses were recorded from layer L2/3 of the primary visual cortex ( area V1 ) of the mouse , using a wide field two photon microscope ( Sofroniew et al. , 2016 ) . Activity was measured using the genetically encoded calcium indicator GCaMP6s . V1 was targeted based on anatomical location as verified by numerous previous experiments performing retinotopic mapping using intrinsic imaging . We selected cells based on a classifier for somata on the segmented cell masks and deconvolved their fluorescence traces ( Pnevmatikakis et al. , 2016 ) . We did not filter cells according to visual responsiveness . The stimulation paradigm and data pre-processing followed the procedures described by Walker et al . ( 2019 ) . A single scan contained the responses of approximately 5000–9000 neurons to up to 6000 images , of which 1000 images consist of 100 unique images which were presented 10 times each to allow for an estimate of the reliability of the neuron ( see Appendix for a detailed description of the datasets ) . We used the repeated images for testing , and split the rest into 4500 training and 500 validation images . The neural data was preprocessed by normalizing the responses of the neurons by their standard deviation on the training set . To put the number of recorded neurons per scan into perspective , assuming that V1 has an area of about 4mm2 , that L2/3 is about 150-250µm thick and has a cell density of 80k excitatory cells per mm3 , entire V1 L2/3 should contain about 48k - 80k neurons ( Garrett et al. , 2014 ; Jurjut et al. , 2017 ; Schüz & Palm , 1989 ) , similar to the maximum number of neurons that we train a model on ( 72k neuron , 11-S , Fig . 1 , orange ) . Note , however , that this does not mean that these 72k neurons sample V1 or the visual field of a mouse evenly because of possible experimental biases in the choice of the recording location . All together , we used 13 scans from a total of 7 animals ( Fig . 1 ) . Each scan is defined by the set of neurons it was performed on ( rows/neuron sets in Fig . 1 ) and the set of images that were shown ( columns/image sets in Fig . 1 ) . Different image sets had non-overlapping training/validation images , but the same test images . Some of the scans were performed on the same neurons , but with different sets of natural images ( first row in Fig . 1 ) . These neurons were matched across scans by cross-correlating the structural scan planes against functionally recorded stacks ( Walker et al. , 2019 ) . Stitching data from several scans in this way allowed us to increase the number of image presentations per neuron beyond what would be possible in a single scan . We combined these scans into different training sets ( one color–one training set in Fig . 1 ) and named each one of them—e.g . 11-S for a set with 11 Scans . The different sets are further explained in the respective experiments they are used in . All data from the seven mice used in this work has been recorded by trained personnel under a strict protocol according to the regulations of the local authorities at Balor College of Medicine . 2.2 NETWORKS AND TRAINING . The networks are split conceptually into two parts : a core and a readout . The core captures the nonlinear image representation and is shared among all neurons . The readout maps the features of the core into neural responses and contains all neuron specific parameters . Readout position network Scan field Feature vector at sampled position x y y' x' x y Topmost block of core Figure 2 : Using retinotopy to learn the readout position from anatomical data . The Gaussian readout for each neuron uses features from a single location on the final tensor of the core CNN ( bottom ) . The position is drawn from a 2D Gaussian for every image during training . The parameters of the Gaussian for each neuron are learned during training . The means of the Gaussians are predicted from each neuron ’ s coordinates on cortex by a Readout Position Network whose weights are shared across neurons and learned during training ( top ) . During testing , the mean of the Gaussian is used as the neuron ’ s position . Representation/Core We model the core with a four-layer convolutional neural network ( CNN ) , with 64 feature channels per layer . In each layer , the 2d-convolutional layer is followed by a batch normalization layer and an ELU nonlinearity ( Ioffe & Szegedy , 2015 ; Clevert et al. , 2015 ) . All convolutional layers after the first one are depth-separable convolutions ( Chollet , 2017 ) which we found to yield better results than standard convolutional layers in a search among different architecture choices . Readouts We compared two different types of readouts to map the nonlinear features of the core to the response of each neuron . For each neuron , a tensor of x ∈ Rw×h×c ( width , height , channels ) needs to be mapped to a single scalar , corresponding to the target neuron ’ s response . All of our readouts assume that this function is affine with a linear weight tensor w ∈ Rw×h×c , followed by an ELU offset by one ( ELU+1 ) , to keep the response positive . Furthermore , both readouts assume that in feature space the receptive field of each neuron does not change its position across features , but they differ in how this receptive field location is constrained and learned . The factorized readout ( Klindt et al. , 2017 ) factorizes the 3d readout tensor into a lower-dimensional representation by using a spatial mask matrix uij and a vector of feature weights vk , i.e . wijk = uijvk . The spatial mask uij is restricted to be positive and encouraged to be sparse through an L1 regularizer . Our novel Gaussian readout reduces the number of per-neuron parameters . It computes a linear combination of the feature activations at a single spatial position— parametrized as ( x , y ) coordinates —via bilinear interpolation ( Sinz et al. , 2018 ) . To facilitate gradient flow during training , we replace the spatial downsampling used in ( Sinz et al. , 2018 ) by a sampling step , which during training draws the readout position of each nth neuron from a bivariate Gaussian distribution N ( µn , Σn ) for each image in a batch separately . This is the sampling version of ( St-Yves & Naselaris , 2017 ) where the readout location is weighted spatially with a Gaussian profile . In our case , µn and Σn are learned via the reparametrization trick ( Kingma & Welling , 2014 ) . Initializing Σn large enough ensures that there is gradient information available to learn µn reliably . During training , Σn shrinks as the estimate of the neuron position improves . During evaluation we always use the position defined by µn , making the readout deterministic . This version of the Gaussian readout has c+ 7 parameters per neuron ( 2 for µ , 4 for Σ because the linear mapping in the reparametrization trick is 2× 2 , and 1 for the scalar bias ) . The second innovation of our Gaussian readout is to couple the location estimation of single neurons by exploiting the retinotopic organization of primary visual cortex ( V1 ) and other areas . Since V1 preserves the topology of visual space , we estimate a neuron ’ s receptive field location from its position pn ∈ R2 along the cortical surface available from the experiments . To that end , we learn a common function µn = f ( pn ) represented by a neural network that is shared across all neurons ( Fig . 2 ) . Since we work with neurons from local patches of V1 , we model f as a linear fully connected network . This approach turns the problem of estimating each neuron ’ s receptive field location from limited data into estimating a single linear transformation shared by all neurons , and reduces the number of per-neuron parameters to c+ 5 . We initialized the Readout Position Network to a random orthonormal 2-2 matrix scaled by a factor which was optimized in hyper-parameter selection . Finally , when training on several scans of anatomically matched neurons from the same mouse ( see Data ) , we share the feature weights vk across scans . To account for differences in spike inference between scans , we introduced a scan-specific scale and bias for each neuron after the linear readout . We mention in the respective sections whether features are shared or not . The bias of each readout is initialized with the average response on the training set . The effects of both feature sharing and learning from cortical anatomy on the performance of the readout are shown in the Appendix . Training The networks were trained to minimize Poisson loss 1m ∑m i=1 ( r̂ ( i ) − r ( i ) log r̂ ( i ) ) where m denotes the number of neurons , r̂ the predicted neuronal response and r the observed response . We used early stopping on the correlation between predicted and measured neuronal responses on the validation set ( Prechelt , 1998 ) : if the correlation failed to increase during any 5 consecutive passes through the entire training set ( epochs ) , we stopped the training and restored the model to the best performing model over the course of training . We found that this combination of Poisson objective and early stopping on correlation yielded the best results . After the first stop , we decreased the learning rate from 5× 10−3 twice by a decay factor of 0.3 , and resumed training until it was stopped again . Network parameters were iteratively optimized via stochastic gradient descent using the Adam optimizer ( Kingma & Ba , 2015 ) with a batch size of 64 . Once training completed , the trained network was evaluated on the validation set to yield the score used for hyper-parameter selection . The hyper-parameters were then selected with a Bayesian search ( Snoek et al. , 2012 ) of 100 trials and subsequently kept fixed throughout all experiments . Only the scale of the readout regularization was fine-tuned with additional Bayesian searches for the cases of different amounts of data independently . In transfer experiments , we froze all parameters of the core and trained a new readout only . Evaluation We report performance as fraction oracle ( see Walker et al. , 2019 ) , which is defined as the correlation of the predicted response and the observed single-trial test responses relative to the maximally achievable correlation measured from repeated presentations . We estimated the oracle correlation using a jackknife estimator ( correlation of leave-one-out mean against single trial ) . Per data point , we trained 25 networks for all combinations of five different model initializations and five random partitions of the neurons into core and transfer sets . The image subsets were drawn randomly once and kept fixed across all experiments except in Fig . 5 where the full neuron set was used and 5 random partitions of image subsets were drawn instead . We selected the best performing models across initializations and calculated 95 % confidence intervals over neuron- or image seeds . | The authors train a neural net to predict responses of mouse V1 L2/3 neurons to visual stimulation. The NN has a "core" that is shared between all neurons, and a neuron-specific readout. They train the core on multiple animals and find that it can generalize well: it can be used in a new animal and (with sufficient training of the readouts) achieve high performance. They also use a neat approach of constraining the readout weights (receptive field location) using the known retinotopy of V1. Finally, they show that their network outperforms task-trained ones at predicting V1 responses. | SP:06fe119d437e7f517496d554a091979ff74c9431 |
Neural Ensemble Search for Uncertainty Estimation and Dataset Shift | 1 Introduction . Some applications of deep learning rely only on point estimate predictions made by a neural network . However , many critical applications also require reliable predictive uncertainty estimates and robustness under the presence of dataset shift , that is , when the observed data distribution at deployment differs from the training data distribution . Examples include medical imaging [ 15 ] and self-driving cars [ 5 ] . Unfortunately , several studies have shown that neural networks are not always robust to dataset shift [ 46 , 26 ] , nor do they exhibit calibrated predictive uncertainty , resulting in incorrect predictions made with high confidence [ 21 ] . Deep ensembles [ 33 ] achieve state-of-the-art results for predictive uncertainty calibration and robustness to dataset shift . Notably , they have been shown to outperform various approximate Bayesian neural networks [ 33 , 46 , 22 ] . Deep ensembles are constructed by training a fixed architecture multiple times with different random initializations . Due to the multi-modal loss landscape [ 18 , 54 ] , randomization by different initializations induces diversity among the base learners to yield a model with better uncertainty estimates than any of the individual base learners ( i.e . ensemble members ) . Our work focuses on automatically selecting varying base learner architectures in the ensemble , exploiting architectural variation as a beneficial source of diversity missing in deep ensembles due to their fixed architecture . Such architecture selection during ensemble construction allows a more “ ensemble-aware ” choice of architectures and is based on data rather than manual biases . As ∗Equal contribution . 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . discussed in Section 2 , while ensembles with varying architectures has already been explored in the literature , variation in architectures is typically limited to just varying depth and/or width , in contrast to more complex variations , such as changes in the topology of the connections and operations used , as considered in our work . More generally , automatic ensemble construction is well-explored in AutoML [ 17 , 36 , 45 , 43 ] . Our work builds on this by demonstrating that , in the context of uncertainty estimation , automatically constructed ensembles with varying architectures outperform deep ensembles that use state-of-the-art , or even optimal , architectures ( Figure 1 ) . Studied under controlled settings , we assess the ensembles by various measures , including predictive performance , uncertainty estimation and calibration , base learner performance and two ensemble diversity metrics , showing that architectural variation is beneficial in ensembles . Note that , a priori , it is not obvious how to find a set of diverse architectures that work well as an ensemble . On the one hand , optimizing the base learners ’ architectures in isolation may yield multiple base learners with similar architectures ( like a deep ensemble ) . On the other hand , selecting the architectures randomly may yield numerous base learners with poor architectures harming the ensemble . Moreover , as in neural architecture search ( NAS ) , we face the challenge of needing to traverse vast architectural search spaces . We address these challenges in the problem of Neural Ensemble Search ( NES ) , an extension of NAS that aims to find a set of complementary architectures that together form a strong ensemble . In summary , our contributions are as follows : 1 . We present two NES algorithms for automatically constructing ensembles with varying base learner architectures . As a first step , we present NES with random search ( NES-RS ) , which is simple and easily parallelizable . We further propose NES-RE inspired by regularized evolution [ 48 ] , which evolves a population of architectures yielding performant and robust ensembles . 2 . This work is the first to apply automatic ensemble construction over architectures to complex , state-of-the-art neural architecture search spaces . 3 . In the context of uncertainty estimation and ro- bustness to dataset shift , we demonstrate that ensembles constructed by NES improve upon state-of-the-art deep ensembles . We validate our findings over five datasets and two architecture search spaces . 2 Related Work . Ensembles and uncertainty estimation . Ensembles of neural networks [ 23 , 32 , 11 ] are commonly used to boost performance . In practice , strategies for building ensembles include independently training multiple initializations of the same network , i.e . deep ensembles [ 33 ] , training base learners on different bootstrap samples of the data [ 62 ] , training with diversity-encouraging losses [ 40 , 35 , 60 , 51 , 29 , 47 ] and using checkpoints during the training trajectory of a network [ 27 , 41 ] . Despite a variety of approaches , Ashukha et al . [ 1 ] found many sophisticated ensembling techniques to be equivalent to a small-sized deep ensemble by test performance . Much recent interest in ensembles has been due to their state-of-the-art predictive uncertainty estimates , with extensive empirical studies [ 46 , 22 ] observing that deep ensembles outperform other approaches for uncertainty estimation , notably including Bayesian neural networks [ 4 , 19 , 52 ] and post-hoc calibration [ 21 ] . Although deep ensembles are not , technically speaking , equivalent to Bayesian neural networks and the relationship between the two is not well understood , diversity among base learners in a deep ensemble yields a model which is arguably closer to exact Bayesian model averaging than other approximate Bayesian methods that only capture a single posterior mode in a multi-modal landscape [ 54 , 18 ] . Also , He et al . [ 24 ] draw a rigorous link between Bayesian methods and deep ensembles for wide networks , and Pearce et al . [ 47 ] propose a technique for approximately Bayesian ensembling . Our primary baseline is deep ensembles as they provide state-of-the-art results in uncertainty estimation . AutoML and ensembles of varying architectures . Automatic ensemble construction is commonly used in AutoML [ 17 , 28 ] . Prior work includes use of Bayesian optimization to tune non-architectural hyperparameters of an ensemble ’ s base learners [ 36 ] , posthoc ensembling of fully-connected networks evaluated by Bayesian optimization [ 43 ] and building ensembles by iteratively adding ( sub- ) networks to improve ensemble performance [ 10 , 42 ] . Various approaches , including ours , rely on ensemble selection [ 7 ] . We also note that Simonyan & Zisserman [ 49 ] , He et al . [ 25 ] employ ensembles with varying architectures but without automatic construction . Importantly , in contrast to our work , all aforementioned works limit architectural variation to only changing width/depth or fully-connected networks . Moreover , such ensembles have not been considered before in terms of uncertainty estimation . Another important part of AutoML is neural architecture search ( NAS ) , the process of automatically designing single model architectures [ 14 ] , using strategies such as reinforcement learning [ 63 ] , evolutionary algorithms [ 48 ] and gradient-based methods [ 39 ] . We use the search spaces defined by Liu et al . [ 39 ] and Dong & Yang [ 13 ] , two of the most commonly used ones in recent literature . Concurrent to our work , Wenzel et al . [ 53 ] consider ensembles with base learners having varying hyperparameters using an approach similar to NES-RS . However , they focus on non-architectural hyperparameters such as L2 regularization strength and dropout rates , keeping the architecture fixed . As in our work , they also consider predictive uncertainty calibration and robustness to shift , finding similar improvements over deep ensembles . 3 Visualizing Ensembles of Varying Architectures . In this section , we discuss diversity in ensembles with varying architectures and visualize base learner predictions to add empirical evidence to the intuition that architectural variation results in more diversity . We also define two metrics for measuring diversity used later in Section 5 . 3.1 Definitions and Set-up . Let Dtrain = { ( xi , yi ) : i = 1 , . . . , N } be the training dataset , where the input xi ∈ RD and , assuming a classification task , the output yi ∈ { 1 , . . . , C } . We use Dval and Dtest for the validation and test datasets , respectively . Denote by fθ a neural network with weights θ , so fθ ( x ) ∈ RC is the predicted probability vector over the classes for input x . Let ` ( fθ ( x ) , y ) be the neural network ’ s loss for data point ( x , y ) . Given M networks fθ1 , . . . , fθM , we construct the ensemble F of these networks by averaging the outputs , yielding F ( x ) = 1M ∑M i=1 fθi ( x ) . In addition to the ensemble ’ s loss ` ( F ( x ) , y ) , we will also consider the average base learner loss and the oracle ensemble ’ s loss . The average base learner loss is simply defined as 1M ∑M i=1 ` ( fθi ( x ) , y ) ; we use this to measure the average base learner strength later . Similar to prior work [ 35 , 60 ] , the oracle ensemble FOE composed of base learners fθ1 , . . . , fθM is defined to be the function which , given an input x , returns the prediction of the base learner with the smallest loss for ( x , y ) , that is , FOE ( x ) = fθk ( x ) , where k ∈ argmin i ` ( fθi ( x ) , y ) . The oracle ensemble can only be constructed if the true class y is known . We use the oracle ensemble loss as one of the measures of diversity in base learner predictions . Intuitively , if base learners make diverse predictions for x , the oracle ensemble is more likely to find some base learner with a small loss , whereas if all base learners make identical predictions , the oracle ensemble yields the same output as any ( and all ) base learners . Therefore , as a rule of thumb , all else being equal , smaller oracle ensemble loss indicates more diverse base learner predictions . Proposition 3.1 . Suppose ` is negative log-likelihood ( NLL ) . Then , the oracle ensemble loss , ensemble loss , and average base learner loss satisfy the following inequality : ` ( FOE ( x ) , y ) ≤ ` ( F ( x ) , y ) ≤ 1 M M∑ i=1 ` ( fθi ( x ) , y ) . We refer to Appendix A for a proof . Proposition 3.1 suggests that it can be beneficial for ensembles to not only have strong average base learners ( smaller upper bound ) , but also more diversity in their predictions ( smaller lower bound ) . There is extensive theoretical work relating strong base learner performance and diversity with the generalization properties of ensembles [ 23 , 61 , 6 , 30 , 3 , 20 ] . In Section 5 , the two metrics we use for measuring diversity are oracle ensemble loss and ( normalized ) predictive disagreement , defined as the average pairwise predictive disagreement amongst the base learners , normalized by their average error [ 18 ] . 3.2 Visualizing Similarity in Base Learner Predictions . The fixed architecture used to build deep ensembles is typically chosen to be a strong stand-alone architecture , either hand-crafted or found by NAS . However , optimizing the base learner ’ s architecture and then constructing a deep ensemble can neglect diversity in favor of strong base learner performance . Having base learner architectures vary allows more diversity in their predictions . We provide empirical evidence for this intuition by visualizing the base learners ’ predictions . Fort et al . [ 18 ] found that base learners in a deep ensemble explore different parts of the function space by means of applying dimensionality reduction to their predictions . Building on this , we uniformly sample five architectures from the DARTS search space [ 39 ] , train 20 initializations of each architecture on CIFAR-10 and visualize the similarity among the networks ’ predictions on the test dataset using t-SNE [ 50 ] . Experiment details are available in Section 5 and Appendix B . As shown in Figure 2a , we observe clustering of predictions made by different initializations of a fixed architecture , suggesting that base learners with varying architectures explore different parts of the function space . Moreover , we also visualize the predictions of base learners of two ensembles , each of size M = 30 , where one is a deep ensemble and the other has varying architectures ( found by NES-RS as presented in Section 4 ) . Figure 2b shows more diversity in the ensemble with varying architectures than in the deep ensemble . These qualitative findings can be quantified by measuring diversity : for the two ensembles shown in Figure 2b , we find the predictive disagreement to be 94.6 % for the ensemble constructed by NES and 76.7 % for the deep ensemble ( this is consistent across independent runs ) . This indicates higher predictive diversity in the ensemble with varying architectures , in line with the t-SNE results . | The paper suggests a new approach to the construction of ensembles of deep neural networks (DNN). Unlike previous methods which usually deal with multiple DNNs of same structure authors propose to form an ensemble of networks with different architecture. The main claim is that using diverse architectures increases diversity and hence the quality of predictions. To find the best architectures they use methodology inspired by neural architecture search (NAS) in particular random search and regularized evolution. The method for neural ensemble search (NES) is algorithmically simple although computationally hard. On several experiments the authors show NES outperforms standard deep ensembles formed from networks with same (even optimal) structure both in terms of test NLL and in terms of uncertainty estimation under domain shift. | SP:71bc23f11137956757268354ed02ac3799373323 |
Neural Ensemble Search for Uncertainty Estimation and Dataset Shift | 1 Introduction . Some applications of deep learning rely only on point estimate predictions made by a neural network . However , many critical applications also require reliable predictive uncertainty estimates and robustness under the presence of dataset shift , that is , when the observed data distribution at deployment differs from the training data distribution . Examples include medical imaging [ 15 ] and self-driving cars [ 5 ] . Unfortunately , several studies have shown that neural networks are not always robust to dataset shift [ 46 , 26 ] , nor do they exhibit calibrated predictive uncertainty , resulting in incorrect predictions made with high confidence [ 21 ] . Deep ensembles [ 33 ] achieve state-of-the-art results for predictive uncertainty calibration and robustness to dataset shift . Notably , they have been shown to outperform various approximate Bayesian neural networks [ 33 , 46 , 22 ] . Deep ensembles are constructed by training a fixed architecture multiple times with different random initializations . Due to the multi-modal loss landscape [ 18 , 54 ] , randomization by different initializations induces diversity among the base learners to yield a model with better uncertainty estimates than any of the individual base learners ( i.e . ensemble members ) . Our work focuses on automatically selecting varying base learner architectures in the ensemble , exploiting architectural variation as a beneficial source of diversity missing in deep ensembles due to their fixed architecture . Such architecture selection during ensemble construction allows a more “ ensemble-aware ” choice of architectures and is based on data rather than manual biases . As ∗Equal contribution . 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . discussed in Section 2 , while ensembles with varying architectures has already been explored in the literature , variation in architectures is typically limited to just varying depth and/or width , in contrast to more complex variations , such as changes in the topology of the connections and operations used , as considered in our work . More generally , automatic ensemble construction is well-explored in AutoML [ 17 , 36 , 45 , 43 ] . Our work builds on this by demonstrating that , in the context of uncertainty estimation , automatically constructed ensembles with varying architectures outperform deep ensembles that use state-of-the-art , or even optimal , architectures ( Figure 1 ) . Studied under controlled settings , we assess the ensembles by various measures , including predictive performance , uncertainty estimation and calibration , base learner performance and two ensemble diversity metrics , showing that architectural variation is beneficial in ensembles . Note that , a priori , it is not obvious how to find a set of diverse architectures that work well as an ensemble . On the one hand , optimizing the base learners ’ architectures in isolation may yield multiple base learners with similar architectures ( like a deep ensemble ) . On the other hand , selecting the architectures randomly may yield numerous base learners with poor architectures harming the ensemble . Moreover , as in neural architecture search ( NAS ) , we face the challenge of needing to traverse vast architectural search spaces . We address these challenges in the problem of Neural Ensemble Search ( NES ) , an extension of NAS that aims to find a set of complementary architectures that together form a strong ensemble . In summary , our contributions are as follows : 1 . We present two NES algorithms for automatically constructing ensembles with varying base learner architectures . As a first step , we present NES with random search ( NES-RS ) , which is simple and easily parallelizable . We further propose NES-RE inspired by regularized evolution [ 48 ] , which evolves a population of architectures yielding performant and robust ensembles . 2 . This work is the first to apply automatic ensemble construction over architectures to complex , state-of-the-art neural architecture search spaces . 3 . In the context of uncertainty estimation and ro- bustness to dataset shift , we demonstrate that ensembles constructed by NES improve upon state-of-the-art deep ensembles . We validate our findings over five datasets and two architecture search spaces . 2 Related Work . Ensembles and uncertainty estimation . Ensembles of neural networks [ 23 , 32 , 11 ] are commonly used to boost performance . In practice , strategies for building ensembles include independently training multiple initializations of the same network , i.e . deep ensembles [ 33 ] , training base learners on different bootstrap samples of the data [ 62 ] , training with diversity-encouraging losses [ 40 , 35 , 60 , 51 , 29 , 47 ] and using checkpoints during the training trajectory of a network [ 27 , 41 ] . Despite a variety of approaches , Ashukha et al . [ 1 ] found many sophisticated ensembling techniques to be equivalent to a small-sized deep ensemble by test performance . Much recent interest in ensembles has been due to their state-of-the-art predictive uncertainty estimates , with extensive empirical studies [ 46 , 22 ] observing that deep ensembles outperform other approaches for uncertainty estimation , notably including Bayesian neural networks [ 4 , 19 , 52 ] and post-hoc calibration [ 21 ] . Although deep ensembles are not , technically speaking , equivalent to Bayesian neural networks and the relationship between the two is not well understood , diversity among base learners in a deep ensemble yields a model which is arguably closer to exact Bayesian model averaging than other approximate Bayesian methods that only capture a single posterior mode in a multi-modal landscape [ 54 , 18 ] . Also , He et al . [ 24 ] draw a rigorous link between Bayesian methods and deep ensembles for wide networks , and Pearce et al . [ 47 ] propose a technique for approximately Bayesian ensembling . Our primary baseline is deep ensembles as they provide state-of-the-art results in uncertainty estimation . AutoML and ensembles of varying architectures . Automatic ensemble construction is commonly used in AutoML [ 17 , 28 ] . Prior work includes use of Bayesian optimization to tune non-architectural hyperparameters of an ensemble ’ s base learners [ 36 ] , posthoc ensembling of fully-connected networks evaluated by Bayesian optimization [ 43 ] and building ensembles by iteratively adding ( sub- ) networks to improve ensemble performance [ 10 , 42 ] . Various approaches , including ours , rely on ensemble selection [ 7 ] . We also note that Simonyan & Zisserman [ 49 ] , He et al . [ 25 ] employ ensembles with varying architectures but without automatic construction . Importantly , in contrast to our work , all aforementioned works limit architectural variation to only changing width/depth or fully-connected networks . Moreover , such ensembles have not been considered before in terms of uncertainty estimation . Another important part of AutoML is neural architecture search ( NAS ) , the process of automatically designing single model architectures [ 14 ] , using strategies such as reinforcement learning [ 63 ] , evolutionary algorithms [ 48 ] and gradient-based methods [ 39 ] . We use the search spaces defined by Liu et al . [ 39 ] and Dong & Yang [ 13 ] , two of the most commonly used ones in recent literature . Concurrent to our work , Wenzel et al . [ 53 ] consider ensembles with base learners having varying hyperparameters using an approach similar to NES-RS . However , they focus on non-architectural hyperparameters such as L2 regularization strength and dropout rates , keeping the architecture fixed . As in our work , they also consider predictive uncertainty calibration and robustness to shift , finding similar improvements over deep ensembles . 3 Visualizing Ensembles of Varying Architectures . In this section , we discuss diversity in ensembles with varying architectures and visualize base learner predictions to add empirical evidence to the intuition that architectural variation results in more diversity . We also define two metrics for measuring diversity used later in Section 5 . 3.1 Definitions and Set-up . Let Dtrain = { ( xi , yi ) : i = 1 , . . . , N } be the training dataset , where the input xi ∈ RD and , assuming a classification task , the output yi ∈ { 1 , . . . , C } . We use Dval and Dtest for the validation and test datasets , respectively . Denote by fθ a neural network with weights θ , so fθ ( x ) ∈ RC is the predicted probability vector over the classes for input x . Let ` ( fθ ( x ) , y ) be the neural network ’ s loss for data point ( x , y ) . Given M networks fθ1 , . . . , fθM , we construct the ensemble F of these networks by averaging the outputs , yielding F ( x ) = 1M ∑M i=1 fθi ( x ) . In addition to the ensemble ’ s loss ` ( F ( x ) , y ) , we will also consider the average base learner loss and the oracle ensemble ’ s loss . The average base learner loss is simply defined as 1M ∑M i=1 ` ( fθi ( x ) , y ) ; we use this to measure the average base learner strength later . Similar to prior work [ 35 , 60 ] , the oracle ensemble FOE composed of base learners fθ1 , . . . , fθM is defined to be the function which , given an input x , returns the prediction of the base learner with the smallest loss for ( x , y ) , that is , FOE ( x ) = fθk ( x ) , where k ∈ argmin i ` ( fθi ( x ) , y ) . The oracle ensemble can only be constructed if the true class y is known . We use the oracle ensemble loss as one of the measures of diversity in base learner predictions . Intuitively , if base learners make diverse predictions for x , the oracle ensemble is more likely to find some base learner with a small loss , whereas if all base learners make identical predictions , the oracle ensemble yields the same output as any ( and all ) base learners . Therefore , as a rule of thumb , all else being equal , smaller oracle ensemble loss indicates more diverse base learner predictions . Proposition 3.1 . Suppose ` is negative log-likelihood ( NLL ) . Then , the oracle ensemble loss , ensemble loss , and average base learner loss satisfy the following inequality : ` ( FOE ( x ) , y ) ≤ ` ( F ( x ) , y ) ≤ 1 M M∑ i=1 ` ( fθi ( x ) , y ) . We refer to Appendix A for a proof . Proposition 3.1 suggests that it can be beneficial for ensembles to not only have strong average base learners ( smaller upper bound ) , but also more diversity in their predictions ( smaller lower bound ) . There is extensive theoretical work relating strong base learner performance and diversity with the generalization properties of ensembles [ 23 , 61 , 6 , 30 , 3 , 20 ] . In Section 5 , the two metrics we use for measuring diversity are oracle ensemble loss and ( normalized ) predictive disagreement , defined as the average pairwise predictive disagreement amongst the base learners , normalized by their average error [ 18 ] . 3.2 Visualizing Similarity in Base Learner Predictions . The fixed architecture used to build deep ensembles is typically chosen to be a strong stand-alone architecture , either hand-crafted or found by NAS . However , optimizing the base learner ’ s architecture and then constructing a deep ensemble can neglect diversity in favor of strong base learner performance . Having base learner architectures vary allows more diversity in their predictions . We provide empirical evidence for this intuition by visualizing the base learners ’ predictions . Fort et al . [ 18 ] found that base learners in a deep ensemble explore different parts of the function space by means of applying dimensionality reduction to their predictions . Building on this , we uniformly sample five architectures from the DARTS search space [ 39 ] , train 20 initializations of each architecture on CIFAR-10 and visualize the similarity among the networks ’ predictions on the test dataset using t-SNE [ 50 ] . Experiment details are available in Section 5 and Appendix B . As shown in Figure 2a , we observe clustering of predictions made by different initializations of a fixed architecture , suggesting that base learners with varying architectures explore different parts of the function space . Moreover , we also visualize the predictions of base learners of two ensembles , each of size M = 30 , where one is a deep ensemble and the other has varying architectures ( found by NES-RS as presented in Section 4 ) . Figure 2b shows more diversity in the ensemble with varying architectures than in the deep ensemble . These qualitative findings can be quantified by measuring diversity : for the two ensembles shown in Figure 2b , we find the predictive disagreement to be 94.6 % for the ensemble constructed by NES and 76.7 % for the deep ensemble ( this is consistent across independent runs ) . This indicates higher predictive diversity in the ensemble with varying architectures , in line with the t-SNE results . | The paper explores whether one can use Architecture Search to enhance ensemble diversity. They start with the observation that embeddings generated by different architectures (for multiple different initialization per architecture) are well separated from each other. They then try out a couple of architecture search methods to find ensembles with diverse architectures that minimize the loss. | SP:71bc23f11137956757268354ed02ac3799373323 |
DO-GAN: A Double Oracle Framework for Generative Adversarial Networks | 1 INTRODUCTION . Generative Adversarial Networks ( GANs ) ( Goodfellow et al. , 2014 ) have been applied in various domains such as image and video generation , image-to-image translation and text-to-image synthesis ( Liu et al. , 2017 ; Reed et al. , 2016 ) . Various architectures are proposed to generate more realistic samples ( Radford et al. , 2015 ; Mirza & Osindero , 2014 ; Pu et al. , 2016 ) as well as regularization techniques ( Arjovsky et al. , 2017 ; Miyato et al. , 2018b ) . From the game-theoretic perspective , GANs can be viewed as a two-player game where the generator samples the data and the discriminator classifies the data as real or generated . The two networks are alternately trained to maximize their respective utilities until convergence corresponding to a pure Nash Equilibrium ( NE ) . However , pure NE can not be reliably reached by existing algorithms as pure NE may not exist ( Farnia & Ozdaglar , 2020 ; Mescheder et al. , 2017 ) . This also leads to unstable training in GANs depending on the data and the hyperparameters . Therefore , mixed NE is a more suitable solution concept ( Hsieh et al. , 2019 ) . Several recent works propose mixture architectures with multiple generators and discriminators that consider mixed NE such as MIX+GAN ( Arora et al. , 2017 ) and MGAN ( Hoang et al. , 2018 ) . MIX+GAN and MGAN can not guarantee to converge to mixed NE . Mirror-GAN ( Hsieh et al. , 2019 ) finds the mixed NE by sampling over the infinite-dimensional strategy space and proposes provably convergent proximal methods . However , the sampling approach may not be efficient as mixed NE may only have a few strategies in the support set . Double Oracle ( DO ) algorithm ( McMahan et al. , 2003 ) is a powerful framework to compute mixed NE in large-scale games . The algorithm starts with a restricted game with a small set of actions and solves it to get the NE strategies of the restricted game . The algorithm then computes players ’ best-responses using oracles to the NE strategies and add them into the restricted game for the next iteration . DO framework has been applied in various disciplines ( Jain et al. , 2011 ; Bošanský et al. , 2013 ) , as well as Multi-agent Reinforcement Learning ( MARL ) settings ( Lanctot et al. , 2017 ) . Inspired by the successful applications of DO framework , we , for the first time , propose a Double Oracle Framework for Generative Adversarial Networks ( DO-GAN ) . This paper presents four key contributions . First , we treat the generator and the discriminator as players and obtain the best responses from their oracles and add the utilities to a meta-matrix . Second , we propose a linear program to obtain the probability distributions of the players ’ pure strategies ( meta-strategies ) for the respective oracles . The linear program computes an exact mixed NE of the meta-matrix game in polynomial time . Third , we propose a pruning method for the support set of best response strategies to prevent the oracles from becoming intractable as there is a risk of the meta-matrix growing very large with each iteration of oracle training . Finally , we provide comprehensive evaluation on the performance of DO-GAN with different GAN architectures using both synthetic and real-world datasets . Experiment results show that DO-GAN variants have significant improvements in terms of both subjective qualitative evaluation and quantitative metrics . 2 RELATED WORKS . In this section , we briefly introduce existing GAN architectures , double oracle algorithm and its applications such as policy-state response oracles that are related to our work . GAN Architectures . Various GAN architectures have been proposed to improve the performance of GANs . Deep Convolutional GAN ( DCGAN ) ( Radford et al. , 2015 ) replaces fully-connected layers in the generator and the discriminator with deconvolution layer of Convolutional Neural Networks ( CNN ) . Weight normalization techniques such as Spectral Normalization GAN ( SNGAN ) ( Miyato et al. , 2018a ) stabilize the training of the discriminator and reduce the intensive hyperparameters tuning . There are also multi-model architectures such as Stacked Generative Adversarial Networks ( SGAN ) ( Huang et al. , 2017 ) that consist of a top-down stack of generators and a bottom-up discriminator network . Each generator is trained to generate lower-level representations conditioned on higher-level representations that can fool the corresponding representation discriminator . Training GANs is very hard and unstable as pure NE for GANs might not exist and can not be reliably reached by the existing approaches ( Mescheder et al. , 2017 ) . Considering mixed NE , MIX+GAN ( Arora et al. , 2017 ) maintains a mixture of generators and discriminators with the same network architecture but have their own trainable parameters . However , training a mixture of networks without parameter sharing makes the algorithm computationally expensive . Mixture Generative Adversarial Nets ( MGAN ) ( Hoang et al. , 2018 ) propose to capture diverse data modes by formulating GAN as a game between a classifier , a discriminator and multiple generators with parameter sharing . However , MIX+GAN and MGAN can not converge to mixed NE . Mirror-GAN ( Hsieh et al. , 2019 ) finds the mixed NE by sampling over the infinite-dimensional strategy space and proposes provably convergent proximal methods . The sampling approach may be inefficient to compute mixed NE as the mixed NE may only have a few strategies with positive probabilities in the infinite strategy space . Double Oracle Algorithm . Double Oracle ( DO ) algorithm starts with a small restricted game between two players and solves it to get the player strategies at NE of the restricted game . The algorithm then exploits the respective best response oracles for additional strategies of the players . The DO algorithm terminates when the best response utilities are not higher than the equilibrium utility of the current restricted game , hence , finding the NE of the game without enumerating the entire strategy space . Moreover , in two-player zero-sum games , DO converges to a min-max equilibrium ( McMahan et al. , 2003 ) . DO framework is used to solve large-scale normal-form and extensive-form games such as security games ( Tsai et al. , 2012 ; Jain et al. , 2011 ) , poker games ( Waugh et al. , 2009 ) and search games ( Bosansky et al. , 2012 ) . DO framework is also used in MARL settings ( Lanctot et al. , 2017 ; Muller et al. , 2020 ) . Policy-Space Response Oracles ( PSRO ) generalize the double oracle algorithm in a multi-agent reinforcement learning setting ( Lanctot et al. , 2017 ) . PSRO treats the players ’ policies as the best responses from the agents ’ oracles , builds the meta-matrix game and computes the mixed NE but it uses Projected Replicator Dynamics that update the changes in the probability of each player ’ s policy at each iteration . Since the dynamics need to simulate the update for several iterations , the use of dynamics takes a longer time to compute the meta-strategies and does not guarantee to compute an exact NE of the meta-matrix game . However , in DO-GAN , we can use a linear program to compute the players ’ meta-strategies in polynomial time since GAN is a two-player zero-sum game ( Schrijver , 1998 ) . 3 PRELIMINARIES . In this section , we mathematically explain the preliminary works that are needed to explain our DO-GAN approach including generative adversarial networks and game theory concepts such as normal-form game and double oracle algorithm . 3.1 GENERATIVE ADVERSARIAL NETWORKS . Generative Adversarial Networks ( GANs ) ( Goodfellow et al. , 2014 ) have become one of the dominant methods for fitting generative models to complicated real-life data . GANs are deep neural net architectures comprised of two neural networks trained in an adversarial manner to generate data that resembles a distribution . The first neural network , a generator G , is given some random distribution pz ( z ) on the input noise z and a real data distribution pdata ( x ) on training data x . The generator is supposed to generate as close as possible to pdata ( x ) . The second neural network , a discriminator D , is to discriminate between two different classes of data ( real or fake ) from the generator . Let the generator ’ s differentiable function be denoted as G ( z , πg ) and similarly D ( x , πd ) for the discriminator , where G and D are two neural networks with parameters πg and πd . Thus , D ( x ) represents the probability that x comes from the real data . The generator lossLG and the discriminator loss LD are defined as : LD = Ex∼pdata ( x ) [ − logD ( x ) ] + Ez∼pz ( z ) [ − log ( 1−D ( G ( z ) ) ] , ( 1 ) LG = Ez∼pz ( z ) [ log ( 1−D ( G ( z ) ) ] . ( 2 ) GAN is then set up as a two-player zero-sum game between G and D as follows : minG maxD Ex∼pdata ( x ) [ logD ( x ) ] + Ez∼pz ( z ) [ log ( 1−D ( G ( z ) ) ] . ( 3 ) During training , the parameters of G and D are updated alternately until we reach the global optimal solution D ( G ( z ) ) = 0.5 . Next , we let Πg and Πd be the set of parameters for G and D , considering the set of probability distributions σg and σd , the mixed strategy formulation ( Hsieh et al. , 2019 ) is : min σg max σd Eπd∼σdEx∼pdata ( x ) [ logD ( x , πd ) ] + Eπd∼σdEπg∼σgEz∼pz ( z ) [ log ( 1−D ( G ( z , πg ) , πd ) ] . ( 4 ) Similarly to GANs , DCGAN , SNGAN and SGAN can also be viewed as two-player zero-sum games with mixed strategies of the players . DCGAN modifies the vanilla GAN by replacing fully-connected layers with the convolutional layers . SGAN trains multiple generators and discriminators using the loss as a linear combination of 3 loss terms : adversarial loss , conditional loss and entropy loss . 3.2 NORMAL FORM GAME AND DOUBLE ORACLE ALGORITHM . A normal-form game is a tuple ( Π , U , n ) where n is the number of players , Π = ( Π1 , . . . , Πn ) is the set of strategies for each player i ∈ N , where N = { 1 , . . . , n } and U : Π→ Rn is a payoff table of utilities R for each joint policy played by all players . Each player chooses the strategy to maximize own expected utility from Πi , or by sampling from a distribution over the set of strategies σi ∈ ∆ ( Πi ) . We can use linear programming , fictitious play ( Berger , 2007 ) or regret minimization ( Roughgarden , 2010 ) to compute the probability distribution over players ’ strategies . In the Double Oracle ( DO ) algorithm ( McMahan et al. , 2003 ) , there are two best response oracles for the row and column player respectively . The algorithm creates restricted games from a subset of strategies at the point of each iteration t for row and column players , i.e. , Πtr ⊂ Πr and Πtc ⊂ Πc as well as a meta-matrix U t at the tth iteration . We then solve the meta-matrix to get the probability distributions on Πtr and Π t c. Given a probability distribution σc of the column player strategies , BRr ( σc ) gives the row player ’ s best response to σc . Similarly , given probability distribution σr of the row player ’ s strategies , BRc ( σr ) is the column player ’ s best response to σr . The best responses are added to the restricted game for the next iteration . The algorithm terminates when the best response utilities are not higher than the equilibrium utility of current restricted game . Although in the worst-case , the entire strategy space may be added to the restricted game , DO is guaranteed to converge to mixed NE in two-player zero-sum games . DO is also extended to the multi-agent reinforcement learning in PSRO ( Lanctot et al. , 2017 ) to approximate the best responses to the mixtures of agents ’ policies , and compute the meta-strategies for the policy selection . | This paper applies Double-Oracle (DO) / PSRO to training a GAN, a 2-player zero-sum game. DO cannot be applied directly "out-of-the-box". Instead of an exact oracle, the generator and discriminator are trained using local gradient optimizers for a finite number of steps. Also, in DO, the meta-game matrix can grow very large and maintaining and training against a large population of neural networks is expensive, so the population is pruned throughout training. | SP:266023140bbd3039a0bc65c2f59f3edcf34ed58b |
DO-GAN: A Double Oracle Framework for Generative Adversarial Networks | 1 INTRODUCTION . Generative Adversarial Networks ( GANs ) ( Goodfellow et al. , 2014 ) have been applied in various domains such as image and video generation , image-to-image translation and text-to-image synthesis ( Liu et al. , 2017 ; Reed et al. , 2016 ) . Various architectures are proposed to generate more realistic samples ( Radford et al. , 2015 ; Mirza & Osindero , 2014 ; Pu et al. , 2016 ) as well as regularization techniques ( Arjovsky et al. , 2017 ; Miyato et al. , 2018b ) . From the game-theoretic perspective , GANs can be viewed as a two-player game where the generator samples the data and the discriminator classifies the data as real or generated . The two networks are alternately trained to maximize their respective utilities until convergence corresponding to a pure Nash Equilibrium ( NE ) . However , pure NE can not be reliably reached by existing algorithms as pure NE may not exist ( Farnia & Ozdaglar , 2020 ; Mescheder et al. , 2017 ) . This also leads to unstable training in GANs depending on the data and the hyperparameters . Therefore , mixed NE is a more suitable solution concept ( Hsieh et al. , 2019 ) . Several recent works propose mixture architectures with multiple generators and discriminators that consider mixed NE such as MIX+GAN ( Arora et al. , 2017 ) and MGAN ( Hoang et al. , 2018 ) . MIX+GAN and MGAN can not guarantee to converge to mixed NE . Mirror-GAN ( Hsieh et al. , 2019 ) finds the mixed NE by sampling over the infinite-dimensional strategy space and proposes provably convergent proximal methods . However , the sampling approach may not be efficient as mixed NE may only have a few strategies in the support set . Double Oracle ( DO ) algorithm ( McMahan et al. , 2003 ) is a powerful framework to compute mixed NE in large-scale games . The algorithm starts with a restricted game with a small set of actions and solves it to get the NE strategies of the restricted game . The algorithm then computes players ’ best-responses using oracles to the NE strategies and add them into the restricted game for the next iteration . DO framework has been applied in various disciplines ( Jain et al. , 2011 ; Bošanský et al. , 2013 ) , as well as Multi-agent Reinforcement Learning ( MARL ) settings ( Lanctot et al. , 2017 ) . Inspired by the successful applications of DO framework , we , for the first time , propose a Double Oracle Framework for Generative Adversarial Networks ( DO-GAN ) . This paper presents four key contributions . First , we treat the generator and the discriminator as players and obtain the best responses from their oracles and add the utilities to a meta-matrix . Second , we propose a linear program to obtain the probability distributions of the players ’ pure strategies ( meta-strategies ) for the respective oracles . The linear program computes an exact mixed NE of the meta-matrix game in polynomial time . Third , we propose a pruning method for the support set of best response strategies to prevent the oracles from becoming intractable as there is a risk of the meta-matrix growing very large with each iteration of oracle training . Finally , we provide comprehensive evaluation on the performance of DO-GAN with different GAN architectures using both synthetic and real-world datasets . Experiment results show that DO-GAN variants have significant improvements in terms of both subjective qualitative evaluation and quantitative metrics . 2 RELATED WORKS . In this section , we briefly introduce existing GAN architectures , double oracle algorithm and its applications such as policy-state response oracles that are related to our work . GAN Architectures . Various GAN architectures have been proposed to improve the performance of GANs . Deep Convolutional GAN ( DCGAN ) ( Radford et al. , 2015 ) replaces fully-connected layers in the generator and the discriminator with deconvolution layer of Convolutional Neural Networks ( CNN ) . Weight normalization techniques such as Spectral Normalization GAN ( SNGAN ) ( Miyato et al. , 2018a ) stabilize the training of the discriminator and reduce the intensive hyperparameters tuning . There are also multi-model architectures such as Stacked Generative Adversarial Networks ( SGAN ) ( Huang et al. , 2017 ) that consist of a top-down stack of generators and a bottom-up discriminator network . Each generator is trained to generate lower-level representations conditioned on higher-level representations that can fool the corresponding representation discriminator . Training GANs is very hard and unstable as pure NE for GANs might not exist and can not be reliably reached by the existing approaches ( Mescheder et al. , 2017 ) . Considering mixed NE , MIX+GAN ( Arora et al. , 2017 ) maintains a mixture of generators and discriminators with the same network architecture but have their own trainable parameters . However , training a mixture of networks without parameter sharing makes the algorithm computationally expensive . Mixture Generative Adversarial Nets ( MGAN ) ( Hoang et al. , 2018 ) propose to capture diverse data modes by formulating GAN as a game between a classifier , a discriminator and multiple generators with parameter sharing . However , MIX+GAN and MGAN can not converge to mixed NE . Mirror-GAN ( Hsieh et al. , 2019 ) finds the mixed NE by sampling over the infinite-dimensional strategy space and proposes provably convergent proximal methods . The sampling approach may be inefficient to compute mixed NE as the mixed NE may only have a few strategies with positive probabilities in the infinite strategy space . Double Oracle Algorithm . Double Oracle ( DO ) algorithm starts with a small restricted game between two players and solves it to get the player strategies at NE of the restricted game . The algorithm then exploits the respective best response oracles for additional strategies of the players . The DO algorithm terminates when the best response utilities are not higher than the equilibrium utility of the current restricted game , hence , finding the NE of the game without enumerating the entire strategy space . Moreover , in two-player zero-sum games , DO converges to a min-max equilibrium ( McMahan et al. , 2003 ) . DO framework is used to solve large-scale normal-form and extensive-form games such as security games ( Tsai et al. , 2012 ; Jain et al. , 2011 ) , poker games ( Waugh et al. , 2009 ) and search games ( Bosansky et al. , 2012 ) . DO framework is also used in MARL settings ( Lanctot et al. , 2017 ; Muller et al. , 2020 ) . Policy-Space Response Oracles ( PSRO ) generalize the double oracle algorithm in a multi-agent reinforcement learning setting ( Lanctot et al. , 2017 ) . PSRO treats the players ’ policies as the best responses from the agents ’ oracles , builds the meta-matrix game and computes the mixed NE but it uses Projected Replicator Dynamics that update the changes in the probability of each player ’ s policy at each iteration . Since the dynamics need to simulate the update for several iterations , the use of dynamics takes a longer time to compute the meta-strategies and does not guarantee to compute an exact NE of the meta-matrix game . However , in DO-GAN , we can use a linear program to compute the players ’ meta-strategies in polynomial time since GAN is a two-player zero-sum game ( Schrijver , 1998 ) . 3 PRELIMINARIES . In this section , we mathematically explain the preliminary works that are needed to explain our DO-GAN approach including generative adversarial networks and game theory concepts such as normal-form game and double oracle algorithm . 3.1 GENERATIVE ADVERSARIAL NETWORKS . Generative Adversarial Networks ( GANs ) ( Goodfellow et al. , 2014 ) have become one of the dominant methods for fitting generative models to complicated real-life data . GANs are deep neural net architectures comprised of two neural networks trained in an adversarial manner to generate data that resembles a distribution . The first neural network , a generator G , is given some random distribution pz ( z ) on the input noise z and a real data distribution pdata ( x ) on training data x . The generator is supposed to generate as close as possible to pdata ( x ) . The second neural network , a discriminator D , is to discriminate between two different classes of data ( real or fake ) from the generator . Let the generator ’ s differentiable function be denoted as G ( z , πg ) and similarly D ( x , πd ) for the discriminator , where G and D are two neural networks with parameters πg and πd . Thus , D ( x ) represents the probability that x comes from the real data . The generator lossLG and the discriminator loss LD are defined as : LD = Ex∼pdata ( x ) [ − logD ( x ) ] + Ez∼pz ( z ) [ − log ( 1−D ( G ( z ) ) ] , ( 1 ) LG = Ez∼pz ( z ) [ log ( 1−D ( G ( z ) ) ] . ( 2 ) GAN is then set up as a two-player zero-sum game between G and D as follows : minG maxD Ex∼pdata ( x ) [ logD ( x ) ] + Ez∼pz ( z ) [ log ( 1−D ( G ( z ) ) ] . ( 3 ) During training , the parameters of G and D are updated alternately until we reach the global optimal solution D ( G ( z ) ) = 0.5 . Next , we let Πg and Πd be the set of parameters for G and D , considering the set of probability distributions σg and σd , the mixed strategy formulation ( Hsieh et al. , 2019 ) is : min σg max σd Eπd∼σdEx∼pdata ( x ) [ logD ( x , πd ) ] + Eπd∼σdEπg∼σgEz∼pz ( z ) [ log ( 1−D ( G ( z , πg ) , πd ) ] . ( 4 ) Similarly to GANs , DCGAN , SNGAN and SGAN can also be viewed as two-player zero-sum games with mixed strategies of the players . DCGAN modifies the vanilla GAN by replacing fully-connected layers with the convolutional layers . SGAN trains multiple generators and discriminators using the loss as a linear combination of 3 loss terms : adversarial loss , conditional loss and entropy loss . 3.2 NORMAL FORM GAME AND DOUBLE ORACLE ALGORITHM . A normal-form game is a tuple ( Π , U , n ) where n is the number of players , Π = ( Π1 , . . . , Πn ) is the set of strategies for each player i ∈ N , where N = { 1 , . . . , n } and U : Π→ Rn is a payoff table of utilities R for each joint policy played by all players . Each player chooses the strategy to maximize own expected utility from Πi , or by sampling from a distribution over the set of strategies σi ∈ ∆ ( Πi ) . We can use linear programming , fictitious play ( Berger , 2007 ) or regret minimization ( Roughgarden , 2010 ) to compute the probability distribution over players ’ strategies . In the Double Oracle ( DO ) algorithm ( McMahan et al. , 2003 ) , there are two best response oracles for the row and column player respectively . The algorithm creates restricted games from a subset of strategies at the point of each iteration t for row and column players , i.e. , Πtr ⊂ Πr and Πtc ⊂ Πc as well as a meta-matrix U t at the tth iteration . We then solve the meta-matrix to get the probability distributions on Πtr and Π t c. Given a probability distribution σc of the column player strategies , BRr ( σc ) gives the row player ’ s best response to σc . Similarly , given probability distribution σr of the row player ’ s strategies , BRc ( σr ) is the column player ’ s best response to σr . The best responses are added to the restricted game for the next iteration . The algorithm terminates when the best response utilities are not higher than the equilibrium utility of current restricted game . Although in the worst-case , the entire strategy space may be added to the restricted game , DO is guaranteed to converge to mixed NE in two-player zero-sum games . DO is also extended to the multi-agent reinforcement learning in PSRO ( Lanctot et al. , 2017 ) to approximate the best responses to the mixtures of agents ’ policies , and compute the meta-strategies for the policy selection . | This paper proposes to use the well-known Double Oracle methods for solving large scale games for computing the equilibrium in GANs. The main idea of a mixed strategy being a mixture over generators (and mixture over discriminator for toher player( is from Hsieh et al. The double oracle approach is shown to yield superior results on three image datasets. | SP:266023140bbd3039a0bc65c2f59f3edcf34ed58b |
Scalable Graph Neural Networks for Heterogeneous Graphs | 1 INTRODUCTION . In recent years , deep learning on graphs has attracted a great deal of interest , with new applications ranging from social networks and recommender systems , to biomedicine , scene understanding , and modeling of physics ( Wu et al. , 2020 ) . One popular branch of graph learning is based on the idea of stacking learned “ graph convolutional ” layers that perform feature transformation and neighbor aggregation ( Kipf & Welling , 2017 ) , and has led to an explosion of variants collectively referred to as Graph Neural Networks ( GNNs ) ( Hamilton et al. , 2017 ; Xu et al. , 2018 ; Velickovic et al. , 2018 ) . Most benchmarks for learning on graphs focus on very small graphs , but the relevance of such models to large-scale social network and e-commerce datasets was quickly recognized ( Ying et al. , 2018 ) . Since the computational cost of training and inference on GNNs scales poorly to large graphs , a number of sampling approaches have been proposed that improve the time and memory cost of GNNs by operating on subsets of graph nodes or edges ( Hamilton et al. , 2017 ; Chen et al. , 2017 ; Zou et al. , 2019 ; Zeng et al. , 2019 ; Chiang et al. , 2019 ) . Recently several papers have argued that on a range of benchmark tasks – social network and e-commerce tasks in particular – GNNs primarily derive their benefits from performing feature smoothing over graph neighborhoods rather than learning non-linear hierarchies of features as implied by the analogy to CNNs ( Wu et al. , 2019 ; NT & Maehara , 2019 ; Chen et al. , 2019 ; Rossi et al. , 2020 ) . Surprisingly , Rossi et al . ( 2020 ) demonstrate that a one-layer MLP operating on concatenated N-hop averaged features , which they call Scalable Inception Graph Network ( SIGN ) , performs competitively with state-of-the-art GNNs on large web datasets while being more scalable and simpler to use than sampling approaches . Neighbor-averaged features can be precomputed , reducing GNN training and inference to a standard classification task . However , in practice the large graphs used in web-scale classification problems are often heterogeneous , encoding many types of relationship between different entities ( Lerer et al. , 2019 ) . While GNNs extend naturally to these multi-relation graphs ( Schlichtkrull et al. , 2018 ) and specialized methods further improve the state-of-the-art on them ( Hu et al. , 2020b ; Wang et al. , 2019b ) , it is not clear how to extend neighbor-averaging approaches like SIGN to these graphs . In this work , we investigate whether neighbor-averaging approaches can be applied to heterogeneous graphs ( HGs ) . We propose Neighbor Averaging over Relation Subgraphs ( NARS ) , which computes neighbor averaged features for random subsets of relation types , and combines them into a single set of features for a classifier using a 1D convolution . We find that this scalable approach exceeds the accuracy of state-of-the-art GNN methods for heterogeneous graphs on tasks in three benchmark datasets . One downside of NARS is that it requires a large amount of memory to store node features for many random subgraphs . We describe an approximate version that fixes the memory scaling issue , and show that it does not degrade accuracy on benchmark tasks . 2 BACKGROUND . Graph Neural Networks are a type of neural model for graph data that uses graph structure to transform input node features into a more predictive representation for a supervised task . A popular flavor of graph neural network consists of stacked layers of operators composed of learned transformations and neighbor aggregation . These “ message-passing ” GNNs were inspired by spectral notions of graph convolution ( Bruna et al. , 2014 ; Defferrard et al. , 2016 ; Kipf & Welling , 2017 ) . Consider a graph G with n vertices and adjacency matrix A ∈ Rn×n . A graph convolution g ? x of node features x by a filter g is defined as a multiplication by g in the graph Fourier basis , just as a standard convolution is a multiplication in Fourier space . The Fourier basis for a graph is defined as the eigenvectors U of the normalized Laplacian , and can be thought of as a basis of functions of varying smoothness over the graph . g ? x = UgUTx ( 1 ) Any convolution g can be approximated by a series of k-th order polynomials in the Laplacian , which depend on neighbors within a k-hop radius ( Hammond et al. , 2011 ) . By limiting this approximation to k = 1 , Kipf & Welling ( 2017 ) arrive at an operation that consists of multiplying node features by the normalized adjacency matrix , i.e . averaging each node ’ s neighbor features . Such an operation can be viewed as a graph convolution by a particular smoothing kernel . A Graph Convolutional Network ( GCN ) is constructed by stacking multiple layers , each with a neighbor averaging step followed by a linear transformation . Many variants of this approach of stacked message-passing layers have since been proposed with different aggregation functions and for different applications ( Velickovic et al. , 2018 ; Xu et al. , 2018 ; Hamilton et al. , 2017 ; Schlichtkrull et al. , 2018 ) . Early GNN work focused on tasks with small graphs ( thousands of nodes ) , and it ’ s not straightforward to scale these methods to large-scale graphs . Applying neighbor aggregation by directly multiplying node features by the sparse adjacency matrix at each training step is computationally expensive and does not permit minibatch training . On the other hand , applying a GCN for a minibatch of labeled nodes requires aggregation over a receptive field ( neighborhood ) of diameter d equal to the GCN depth , which can grow exponentially in d. Recent work in scaling GNNs to very large graphs have focused on training the GNN on sampled subsets of neighbors or subgraphs to allevate the computation and memory cost ( Hamilton et al. , 2017 ; Chen et al. , 2017 ; Zou et al. , 2019 ; Zeng et al. , 2019 ; Chiang et al. , 2019 ) . Rossi et al . ( 2020 ) proposed a different approach to scaling GCNs , called SIGN : As is shown in Figure 2 , by eliding all learned parameters from intermediate layers , the GNN graph aggregation steps can be pre-computed as iterated neighbor feature averages , and model training consists of training an MLP on these neighbor-averaged features . On benchmark tasks on large graphs , they observed that SIGN achieved similar accuracy to state-of-the-art GNNs . The success of SIGN suggests that GNNs are primarily using the graph to “ smooth ” node features over local neighborhoods rather than learning non-linear feature hierarchies . Similar hypotheses have been argued in several other recent works ( Wu et al. , 2019 ; NT & Maehara , 2019 ; Chen et al. , 2019 ) 1 Standard GCNs extend naturally to heterogeneous ( aka relational ) graphs by applying relation-specific learned transformations ( Schlichtkrull et al. , 2018 ) . There have also been a number of GNN variants specialized to heterogeneous graphs . HetGNN ( Zhang et al. , 2019a ) performs fixed-size random walk on the graph and encodes heterogeneous content with RNNs . Heterogeneous Attention Network ( Wang et al. , 2019b ) generalizes neighborhood of nodes based on semantic patterns ( called metapaths ) and extends GAT ( Velickovic et al. , 2018 ) with a semantic attention mechanism . The Heterogeneous Graph Transformer ( Hu et al. , 2020b ) uses an attention mechanism that conditions on node and edge types , and introduces relative temporal encoding to handle dy- namic graphs . These models inherit the scaling limitation of GNN and are expensive to train on large graphs . Therefore , it is of practical importance to generalize the computationally much simpler SIGN model to heterogeneous graphs . 3 NEIGHBOR AVERAGING OVER RELATION SUBGRAPHS FOR HETEROGENEOUS GRAPHS . The challenge with adapting SIGN to heterogeneous graphs is how to incorporate the information about different node and edge types . Relational GNNs like R-GCN naturally handle heterogeneous graphs by learning different transformations for each relation type ( Schlichtkrull et al. , 2018 ) , but SIGN elides these learned transformations . While one can naively apply SIGN to heterogeneous graphs by ignoring entity and relation types , doing so results in poor task performance ( Table 4 ) . In this section , we propose Neighbor Averaging over Relation Subgraphs ( NARS ) . The key idea of NARS is to utilize entity and relation information by repeatedly sampling subsets of relation types and building subgraphs consisting only of edges of these types , which we call relation subgraphs . We then perform neighbor averaging on these relation subgraphs and aggregate features with a learned 1-D convolution . The resulting features are then used to train an MLP , as in SIGN . We take inspiration from the notion of “ metapaths ” proposed in Dong et al . ( 2017 ) and used by several recent heterogeneous GNN approaches ( Wang et al. , 2019b ) . A metapath is a sequence of relation types that describes a semantic relationship among different types of nodes ; for example , one metapath in an academic graph might be “ venue - paper - author ” , which could represent “ venues of papers with the same author as the target paper node ” . Information passed and aggregated along a metapath is expected to be semantically meaningful . In previous work like HAN ( Wang et al. , 2019b ) , features from different metapaths are later aggregated to capture different neighborhood information for each node . In prior work , relevant metapaths were manually specified as input ( Dong et al. , 2017 ; Wang et al. , 2019b ) , but we hypothesized that the same information could be captured by randomly sampling metapaths . However , sampling individual metapaths doesn ’ t scale well to graphs with many edge 1SIGN primarily differs from these other proposed methods by concatenating neighbor-aggregated features from different numbers of hops of feature aggregation . This addresses the need to balance the benefits of feature smoothing from large neighborhoods with the risk of “ oversmoothing ” the features and losing local neighborhood information when GNNs are too deep ( Li et al. , 2018 ) , allowing the classifier to learn a balance between features from different GNN depths . types : for a graph with M edge types , it would require O ( M ) metapaths to even sample each edge type in a single metapath . As a result , one might need to sample a large set of metapaths to obtain good prediction results , and in practice we obtained poor task performance by sampling metapaths . We observe that metapaths are an instance of a more general class of aggregation procedures : those that aggregate at each GNN layer over a subset of relation types rather than a single relation type . We consider a different procedure in that class : sampling a subset of relation types ( uniformly from the power set of relation types ) , and using this subset for all aggregation layers . This procedure amounts to randomly selecting K relation subgraphs each specified by a subset of relations , and performing L-hop neighbor aggregation across each of these subgraphs . We found that this strategy led to strong task performance ( §5 ) , but it ’ s possible that other aggregation strategies could perform even better . Given a heterogeneous graph G and its edge relation type setR , our proposed method first samples K unique subsets from R. Then for each sampled subset Ri ⊆ R , we generate a relation subgraph Gi from G in which only edges whose type belongs to Ri are kept . We treat Gi as a homogeneous graph , and perform neighbor aggregation to generate L-hop neighbor features for each node . Let Hv,0 be the input features ( of dimension D ) for node v. For each subgraph Gi , the l-th hop features Hiv , l are computed as Hiv , l = ∑ u∈Ni ( v ) 1 |Ni ( v ) | Hiu , l−1 ( 2 ) where Ni ( v ) is the set of neighbors of node v in Gi . | This paper aims to propose a new GNN for heterogeneous graphs, which is scalable to large-scale graphs. The proposed idea is to leverage an existing model called SIGN, which simplifies GCN by dropping the non-linear transformation from intermediate layers, and extend it to heterogeneous graphs. The results on several benchmark datasets show the proposed approach is better and faster than baselines. | SP:78faeffc7a6d60225bded8a9e6eee2aa369138fc |
Scalable Graph Neural Networks for Heterogeneous Graphs | 1 INTRODUCTION . In recent years , deep learning on graphs has attracted a great deal of interest , with new applications ranging from social networks and recommender systems , to biomedicine , scene understanding , and modeling of physics ( Wu et al. , 2020 ) . One popular branch of graph learning is based on the idea of stacking learned “ graph convolutional ” layers that perform feature transformation and neighbor aggregation ( Kipf & Welling , 2017 ) , and has led to an explosion of variants collectively referred to as Graph Neural Networks ( GNNs ) ( Hamilton et al. , 2017 ; Xu et al. , 2018 ; Velickovic et al. , 2018 ) . Most benchmarks for learning on graphs focus on very small graphs , but the relevance of such models to large-scale social network and e-commerce datasets was quickly recognized ( Ying et al. , 2018 ) . Since the computational cost of training and inference on GNNs scales poorly to large graphs , a number of sampling approaches have been proposed that improve the time and memory cost of GNNs by operating on subsets of graph nodes or edges ( Hamilton et al. , 2017 ; Chen et al. , 2017 ; Zou et al. , 2019 ; Zeng et al. , 2019 ; Chiang et al. , 2019 ) . Recently several papers have argued that on a range of benchmark tasks – social network and e-commerce tasks in particular – GNNs primarily derive their benefits from performing feature smoothing over graph neighborhoods rather than learning non-linear hierarchies of features as implied by the analogy to CNNs ( Wu et al. , 2019 ; NT & Maehara , 2019 ; Chen et al. , 2019 ; Rossi et al. , 2020 ) . Surprisingly , Rossi et al . ( 2020 ) demonstrate that a one-layer MLP operating on concatenated N-hop averaged features , which they call Scalable Inception Graph Network ( SIGN ) , performs competitively with state-of-the-art GNNs on large web datasets while being more scalable and simpler to use than sampling approaches . Neighbor-averaged features can be precomputed , reducing GNN training and inference to a standard classification task . However , in practice the large graphs used in web-scale classification problems are often heterogeneous , encoding many types of relationship between different entities ( Lerer et al. , 2019 ) . While GNNs extend naturally to these multi-relation graphs ( Schlichtkrull et al. , 2018 ) and specialized methods further improve the state-of-the-art on them ( Hu et al. , 2020b ; Wang et al. , 2019b ) , it is not clear how to extend neighbor-averaging approaches like SIGN to these graphs . In this work , we investigate whether neighbor-averaging approaches can be applied to heterogeneous graphs ( HGs ) . We propose Neighbor Averaging over Relation Subgraphs ( NARS ) , which computes neighbor averaged features for random subsets of relation types , and combines them into a single set of features for a classifier using a 1D convolution . We find that this scalable approach exceeds the accuracy of state-of-the-art GNN methods for heterogeneous graphs on tasks in three benchmark datasets . One downside of NARS is that it requires a large amount of memory to store node features for many random subgraphs . We describe an approximate version that fixes the memory scaling issue , and show that it does not degrade accuracy on benchmark tasks . 2 BACKGROUND . Graph Neural Networks are a type of neural model for graph data that uses graph structure to transform input node features into a more predictive representation for a supervised task . A popular flavor of graph neural network consists of stacked layers of operators composed of learned transformations and neighbor aggregation . These “ message-passing ” GNNs were inspired by spectral notions of graph convolution ( Bruna et al. , 2014 ; Defferrard et al. , 2016 ; Kipf & Welling , 2017 ) . Consider a graph G with n vertices and adjacency matrix A ∈ Rn×n . A graph convolution g ? x of node features x by a filter g is defined as a multiplication by g in the graph Fourier basis , just as a standard convolution is a multiplication in Fourier space . The Fourier basis for a graph is defined as the eigenvectors U of the normalized Laplacian , and can be thought of as a basis of functions of varying smoothness over the graph . g ? x = UgUTx ( 1 ) Any convolution g can be approximated by a series of k-th order polynomials in the Laplacian , which depend on neighbors within a k-hop radius ( Hammond et al. , 2011 ) . By limiting this approximation to k = 1 , Kipf & Welling ( 2017 ) arrive at an operation that consists of multiplying node features by the normalized adjacency matrix , i.e . averaging each node ’ s neighbor features . Such an operation can be viewed as a graph convolution by a particular smoothing kernel . A Graph Convolutional Network ( GCN ) is constructed by stacking multiple layers , each with a neighbor averaging step followed by a linear transformation . Many variants of this approach of stacked message-passing layers have since been proposed with different aggregation functions and for different applications ( Velickovic et al. , 2018 ; Xu et al. , 2018 ; Hamilton et al. , 2017 ; Schlichtkrull et al. , 2018 ) . Early GNN work focused on tasks with small graphs ( thousands of nodes ) , and it ’ s not straightforward to scale these methods to large-scale graphs . Applying neighbor aggregation by directly multiplying node features by the sparse adjacency matrix at each training step is computationally expensive and does not permit minibatch training . On the other hand , applying a GCN for a minibatch of labeled nodes requires aggregation over a receptive field ( neighborhood ) of diameter d equal to the GCN depth , which can grow exponentially in d. Recent work in scaling GNNs to very large graphs have focused on training the GNN on sampled subsets of neighbors or subgraphs to allevate the computation and memory cost ( Hamilton et al. , 2017 ; Chen et al. , 2017 ; Zou et al. , 2019 ; Zeng et al. , 2019 ; Chiang et al. , 2019 ) . Rossi et al . ( 2020 ) proposed a different approach to scaling GCNs , called SIGN : As is shown in Figure 2 , by eliding all learned parameters from intermediate layers , the GNN graph aggregation steps can be pre-computed as iterated neighbor feature averages , and model training consists of training an MLP on these neighbor-averaged features . On benchmark tasks on large graphs , they observed that SIGN achieved similar accuracy to state-of-the-art GNNs . The success of SIGN suggests that GNNs are primarily using the graph to “ smooth ” node features over local neighborhoods rather than learning non-linear feature hierarchies . Similar hypotheses have been argued in several other recent works ( Wu et al. , 2019 ; NT & Maehara , 2019 ; Chen et al. , 2019 ) 1 Standard GCNs extend naturally to heterogeneous ( aka relational ) graphs by applying relation-specific learned transformations ( Schlichtkrull et al. , 2018 ) . There have also been a number of GNN variants specialized to heterogeneous graphs . HetGNN ( Zhang et al. , 2019a ) performs fixed-size random walk on the graph and encodes heterogeneous content with RNNs . Heterogeneous Attention Network ( Wang et al. , 2019b ) generalizes neighborhood of nodes based on semantic patterns ( called metapaths ) and extends GAT ( Velickovic et al. , 2018 ) with a semantic attention mechanism . The Heterogeneous Graph Transformer ( Hu et al. , 2020b ) uses an attention mechanism that conditions on node and edge types , and introduces relative temporal encoding to handle dy- namic graphs . These models inherit the scaling limitation of GNN and are expensive to train on large graphs . Therefore , it is of practical importance to generalize the computationally much simpler SIGN model to heterogeneous graphs . 3 NEIGHBOR AVERAGING OVER RELATION SUBGRAPHS FOR HETEROGENEOUS GRAPHS . The challenge with adapting SIGN to heterogeneous graphs is how to incorporate the information about different node and edge types . Relational GNNs like R-GCN naturally handle heterogeneous graphs by learning different transformations for each relation type ( Schlichtkrull et al. , 2018 ) , but SIGN elides these learned transformations . While one can naively apply SIGN to heterogeneous graphs by ignoring entity and relation types , doing so results in poor task performance ( Table 4 ) . In this section , we propose Neighbor Averaging over Relation Subgraphs ( NARS ) . The key idea of NARS is to utilize entity and relation information by repeatedly sampling subsets of relation types and building subgraphs consisting only of edges of these types , which we call relation subgraphs . We then perform neighbor averaging on these relation subgraphs and aggregate features with a learned 1-D convolution . The resulting features are then used to train an MLP , as in SIGN . We take inspiration from the notion of “ metapaths ” proposed in Dong et al . ( 2017 ) and used by several recent heterogeneous GNN approaches ( Wang et al. , 2019b ) . A metapath is a sequence of relation types that describes a semantic relationship among different types of nodes ; for example , one metapath in an academic graph might be “ venue - paper - author ” , which could represent “ venues of papers with the same author as the target paper node ” . Information passed and aggregated along a metapath is expected to be semantically meaningful . In previous work like HAN ( Wang et al. , 2019b ) , features from different metapaths are later aggregated to capture different neighborhood information for each node . In prior work , relevant metapaths were manually specified as input ( Dong et al. , 2017 ; Wang et al. , 2019b ) , but we hypothesized that the same information could be captured by randomly sampling metapaths . However , sampling individual metapaths doesn ’ t scale well to graphs with many edge 1SIGN primarily differs from these other proposed methods by concatenating neighbor-aggregated features from different numbers of hops of feature aggregation . This addresses the need to balance the benefits of feature smoothing from large neighborhoods with the risk of “ oversmoothing ” the features and losing local neighborhood information when GNNs are too deep ( Li et al. , 2018 ) , allowing the classifier to learn a balance between features from different GNN depths . types : for a graph with M edge types , it would require O ( M ) metapaths to even sample each edge type in a single metapath . As a result , one might need to sample a large set of metapaths to obtain good prediction results , and in practice we obtained poor task performance by sampling metapaths . We observe that metapaths are an instance of a more general class of aggregation procedures : those that aggregate at each GNN layer over a subset of relation types rather than a single relation type . We consider a different procedure in that class : sampling a subset of relation types ( uniformly from the power set of relation types ) , and using this subset for all aggregation layers . This procedure amounts to randomly selecting K relation subgraphs each specified by a subset of relations , and performing L-hop neighbor aggregation across each of these subgraphs . We found that this strategy led to strong task performance ( §5 ) , but it ’ s possible that other aggregation strategies could perform even better . Given a heterogeneous graph G and its edge relation type setR , our proposed method first samples K unique subsets from R. Then for each sampled subset Ri ⊆ R , we generate a relation subgraph Gi from G in which only edges whose type belongs to Ri are kept . We treat Gi as a homogeneous graph , and perform neighbor aggregation to generate L-hop neighbor features for each node . Let Hv,0 be the input features ( of dimension D ) for node v. For each subgraph Gi , the l-th hop features Hiv , l are computed as Hiv , l = ∑ u∈Ni ( v ) 1 |Ni ( v ) | Hiu , l−1 ( 2 ) where Ni ( v ) is the set of neighbors of node v in Gi . | The authors propose a method to broaden the scope of SIGN, a technique recently introduced for single-relational graphs. The method allows SIGN to also be applied to multi-relational graphs (often called heterogeneous or knowledge graphs in different communities). In SIGN, various powers of the Laplacian are precomputed. For each power, the features of the nodes of a node’s neighborhood are averaged and (e.g., with an MLP) projected into a node vector representation. This is then used to classify the node. | SP:78faeffc7a6d60225bded8a9e6eee2aa369138fc |
CPR: Classifier-Projection Regularization for Continual Learning | 1 INTRODUCTION . Catastrophic forgetting ( McCloskey & Cohen , 1989 ) is a central challenge in continual learning ( CL ) : when training a model on a new task , there may be a loss of performance ( e.g. , decrease in accuracy ) when applying the updated model to previous tasks . At the heart of catastrophic forgetting is the stability-plasticity dilemma ( Carpenter & Grossberg , 1987 ; Mermillod et al. , 2013 ) , where a model exhibits high stability on previously trained tasks , but suffers from low plasticity for the integration of new knowledge ( and vice-versa ) . Attempts to overcome this challenge in neural network-based CL can be grouped into three main strategies : regularization methods ( Li & Hoiem , 2017 ; Kirkpatrick et al. , 2017 ; Zenke et al. , 2017 ; Nguyen et al. , 2018 ; Ahn et al. , 2019 ; Aljundi et al. , 2019 ) , memory replay ( Lopez-Paz & Ranzato , 2017 ; Shin et al. , 2017 ; Rebuffi et al. , 2017 ; Kemker & Kanan , 2018 ) , and dynamic network architecture ( Rusu et al. , 2016 ; Yoon et al. , 2018 ; Golkar et al. , 2019 ) . In particular , regularization methods that control model weights bear the longest history due to its simplicity and efficiency to control the trade-off for a fixed model capacity . In parallel , several recent methods seek to improve the generalization of neural network models trained on a single task by promoting wide local minima ( Keskar et al. , 2017 ; Chaudhari et al. , 2019 ; Pereyra et al. , 2017 ; Zhang et al. , 2018 ) . Broadly speaking , these efforts have experimentally shown that models trained with wide local minima-promoting regularizers achieve better generalization and higher accuracy ( Keskar et al. , 2017 ; Pereyra et al. , 2017 ; Chaudhari et al. , 2019 ; Zhang et al. , 2018 ) , and can be more robust to weight perturbations ( Zhang et al. , 2018 ) when compared to usual training methods . Despite the promising results , methods that promote wide local minima have yet to be applied to CL . In this paper , we make a novel connection between wide local minima in neural networks and regularization-based CL methods . The typical regularization-based CL aims to preserve important weight parameters used in past tasks by penalizing large deviations when learning new tasks . As ∗Corresponding author ( E-mail : tsmoon @ snu.ac.kr ) shown in the top of Fig . 1 , a popular geometric intuition ( as first given in EWC ( Kirkpatrick et al. , 2017 ) ) for such CL methods is to consider the ( uncertainty ) ellipsoid of parameters around the local minima . When learning new tasks , parameter updates are selected in order to not significantly hinder model performance on past tasks . Our intuition is that promoting a wide local minima—which conceptually stands for local minima having a flat , rounded uncertainty ellipsoid—can be particularly beneficial for regularization-based CL methods by facilitating diverse update directions for the new tasks ( i.e. , improves plasticity ) while not hurting the past tasks ( i.e. , retains stability ) . As shown in the bottom of Fig . 1 , when the ellipsoid containing the parameters with low-error is wider , i.e. , when the wide local minima exists , there is more flexibility in finding a parameter that performs well for all tasks after learning a sequence of new tasks . We provide further details in Section 2.1 . Based on the above intuition , we propose a general , yet simple patch that can be applied to existing regularization-based CL methods dubbed as Classifier-Projection Regularization ( CPR ) . Our method implements an additional regularization term that promotes wide local minima by maximizing the entropy of the classifier ’ s output distribution . Furthermore , from a theory standpoint , we make an observation that our CPR term can be further interpreted in terms of information projection ( I-projection ) formulations ( Cover & Thomas , 2012 ; Murphy , 2012 ; Csiszár & Matus , 2003 ; Walsh & Regalia , 2010 ; Amari et al. , 2001 ; Csiszár & Matus , 2003 ; Csiszár & Shields , 2004 ) found in information theory . Namely , we argue that applying CPR corresponds to projecting a classifier ’ s output onto a Kullback-Leibler ( KL ) divergence ball of finite radius centered around the uniform distribution . By applying the Pythagorean theorem for KL divergence , we then prove that this projection may ( in theory ) improve the performance of continual learning methods . Through extensive experiments on several benchmark datasets , we demonstrate that applying CPR can significantly improve the performance of the state-of-the-art regularization-based CL : using our simple patch improves both the stability and plasticity and , hence , achieves better average accuracy almost uniformly across the tested algorithms and datasets—confirming our intuition of wide local minima in Fig . 1 . Furthermore , we use a feature map visualization that compares methods trained with and without CPR to further corroborate the effectiveness of our method . 2 CPR : CLASSIFIER-PROJECTION REGULARIZATION FOR WIDE LOCAL MINIMUM . In this section , we elaborate in detail the core motivation outlined in Fig . 1 , then formalize CPR as the combination of two regularization terms : one stemming from prior regularization-based CL methods , and the other that promotes a wide local minima . Moreover , we provide an information-geometric interpretation ( Csiszár , 1984 ; Cover & Thomas , 2012 ; Murphy , 2012 ) for the observed gain in performance when applying CPR to CL . We consider continual learning of T classification tasks , where each task contains N training samplelabel pairs { ( xtn , ytn ) } Nn=1 , t ∈ [ 1 , · · · , T ] with xtn ∈ Rd , and the labels of each task has Mt classes , i.e. , ytn ∈ [ 1 , · · · , Mt ] . Note that task boundaries are given in evaluation time ; i.e. , we consider a task-aware setting . We denote fθ : Rd → ∆M as a neural network-based classification model with softmax output layer parameterized by θ . 2.1 MOTIVATION : INTRODUCING WIDE LOCAL MINIMA IN CONTINUAL LEARNING . Considering the setting of typical regularization-based CL ( top of Fig . 1 ) , we denote θ∗i as parameters that achieve local minima for a specific task i and θ̂i is that obtained with regularization terms . Assuming that θ∗1 is learnt , when learning task 2 , an appropriate regularization updates the parameters from θ∗1 to θ̂2 instead of θ ∗ 2 , since θ̂2 achieves low-errors on both tasks 1 and 2 . However , when the low-error regimes ( ellipsoids in Fig . 1 ) are narrow , it is often infeasible to obtain a parameter that performs well on all three tasks . This situation results in the trade-off between stability and plasticity in regularization-based CL ( Carpenter & Grossberg , 1987 ) . Namely , stronger regularization strength ( direction towards past tasks ) brings more stability ( θ̂13 ) , and hence less forgetting on past tasks . In contrast , weaker regularization strength ( direction towards future tasks ) leads to more plasticity so that the updated parameter θ̂23 performs better on recent tasks , at the cost of compromising the performance of past tasks . A key problem in the previous setting is that the parameter regimes that achieve low error for each task are often narrow and do not overlap with each other . Therefore , a straightforward solution is to enlarge the low-error regimes such that they have non-empty intersections with higher chance . This observation motivates us to consider wide local minima for each task in CL ( bottom of Fig . 1 ) . With wide local minima for each task , a regularization-based CL can more easily find a parameter , θ̂3 , that is close to the the local minimas for each task , i.e. , { θ∗i } 3i=1 . Moreover , it suggests that once we promote the wide local minima of neural networks during continual learning , both the stability and plasticity could potentially be improved and result in simultaneously higher accuracy for all task — which is later verified in our experimental ( see Sec . 3 ) . In the next section , we introduce the formulation of wide local minima in CL . 2.2 CLASSIFIER PROJECTION REGULARIZATION FOR CONTINUAL LEARNING . Regularization-based continual learning Typical regularization-based CL methods attach a regularization term that penalizes the deviation of important parameters learned from past tasks in order to mitigate catastrophic forgetting . The general loss form for these methods when learning task t is LtCL ( θ ) = L t CE ( θ ) + λ ∑ i Ωt−1i ( θi − θ t−1 i ) 2 , ( 1 ) where LtCE ( θ ) is the ordinary cross-entropy loss function for task t , λ is the dimensionless regularization strength , Ωt−1 = { Ωt−1i } is the set of estimates of the weight importance , and { θ t−1 i } is the parameter learned until task t− 1 . A variety of previous work , e.g. , EWC ( Kirkpatrick et al. , 2017 ) , SI ( Zenke et al. , 2017 ) , MAS ( Aljundi et al. , 2018 ) , and RWalk ( Chaudhry et al. , 2018 ) , proposed different ways of calculating Ωt−1 to measure weight importance . Single-task wide local minima Several recent schemes have been proposed ( Pereyra et al. , 2017 ; Szegedy et al. , 2016 ; Zhang et al. , 2018 ) to promote wide local minima of a neural network for solving a single task . These approaches can be unified by the following common loss form LWLM ( θ ) = LCE ( θ ) + β N N∑ n=1 DKL ( fθ ( xn ) ‖g ) , ( 2 ) where g is some probability distribution in ∆M that regularizes the classifier output fθ , β is a trade-off parameter , andDKL ( ·‖· ) is the KL divergence ( Cover & Thomas , 2012 ) . Note that , for example , when g is uniform distribution PU in ∆M , the regularization term corresponds to entropy maximization proposed in Pereyra et al . ( 2017 ) , and when g is another classifier ’ s output fθ′ , Eq . ( 2 ) becomes equivalent to the loss function in Zhang et al . ( 2018 ) . CPR : Achieving wide local minima in continual learning Combining the above two regularization terms , we propose the CPR as the following loss form for learning task t : LtCPR ( θ ) = L t CE ( θ ) + β N N∑ n=1 DKL ( fθ ( x t n ) ‖PU ) + λ ∑ i Ωt−1i ( θi − θ t−1 i ) 2 , ( 3 ) where λ and β are the regularization parameters . The first regularization term promotes the wide local minima while learning task t by using PU as the regularizing distribution g in ( 2 ) , and the second term is from the typical regularization-based CL . Note that this formulation is oblivious to Ωt−1 and , hence , it can be applied to any state-of-the-art regularization-based CL methods . In our experiments , we show that the simple addition of the KL-term can significantly boost the performance of several representative state-of-the-art methods , confirming our intuition on wide local minima for CL given in Section 2.1 and Fig 1 . Furthermore , we show in the next section that the KL-term can be geometrically interpreted in terms of information projections ( Csiszár , 1984 ; Cover & Thomas , 2012 ; Murphy , 2012 ) , providing an additional argument ( besides promoting wide local minima ) for the benefit of using CPR in continual learning . | The paper proposes to add a KL-divergence regularization to the objective of regularized continual learning in order to encourage the output prediction to be close to a uniform distribution over classes (i.e., increasing the entropy). They argue that this regularization makes the local minima flat and thus less prone to forgetting. They try to build a theoretical connection using results from information projection but there is still a large gap. In experiments, they show on several benchmarks that applying the KL divergence regularization to different regularization-based continual learning brings improvements. | SP:8b679a434b4b83a626a6dafc1891068800c737a5 |
CPR: Classifier-Projection Regularization for Continual Learning | 1 INTRODUCTION . Catastrophic forgetting ( McCloskey & Cohen , 1989 ) is a central challenge in continual learning ( CL ) : when training a model on a new task , there may be a loss of performance ( e.g. , decrease in accuracy ) when applying the updated model to previous tasks . At the heart of catastrophic forgetting is the stability-plasticity dilemma ( Carpenter & Grossberg , 1987 ; Mermillod et al. , 2013 ) , where a model exhibits high stability on previously trained tasks , but suffers from low plasticity for the integration of new knowledge ( and vice-versa ) . Attempts to overcome this challenge in neural network-based CL can be grouped into three main strategies : regularization methods ( Li & Hoiem , 2017 ; Kirkpatrick et al. , 2017 ; Zenke et al. , 2017 ; Nguyen et al. , 2018 ; Ahn et al. , 2019 ; Aljundi et al. , 2019 ) , memory replay ( Lopez-Paz & Ranzato , 2017 ; Shin et al. , 2017 ; Rebuffi et al. , 2017 ; Kemker & Kanan , 2018 ) , and dynamic network architecture ( Rusu et al. , 2016 ; Yoon et al. , 2018 ; Golkar et al. , 2019 ) . In particular , regularization methods that control model weights bear the longest history due to its simplicity and efficiency to control the trade-off for a fixed model capacity . In parallel , several recent methods seek to improve the generalization of neural network models trained on a single task by promoting wide local minima ( Keskar et al. , 2017 ; Chaudhari et al. , 2019 ; Pereyra et al. , 2017 ; Zhang et al. , 2018 ) . Broadly speaking , these efforts have experimentally shown that models trained with wide local minima-promoting regularizers achieve better generalization and higher accuracy ( Keskar et al. , 2017 ; Pereyra et al. , 2017 ; Chaudhari et al. , 2019 ; Zhang et al. , 2018 ) , and can be more robust to weight perturbations ( Zhang et al. , 2018 ) when compared to usual training methods . Despite the promising results , methods that promote wide local minima have yet to be applied to CL . In this paper , we make a novel connection between wide local minima in neural networks and regularization-based CL methods . The typical regularization-based CL aims to preserve important weight parameters used in past tasks by penalizing large deviations when learning new tasks . As ∗Corresponding author ( E-mail : tsmoon @ snu.ac.kr ) shown in the top of Fig . 1 , a popular geometric intuition ( as first given in EWC ( Kirkpatrick et al. , 2017 ) ) for such CL methods is to consider the ( uncertainty ) ellipsoid of parameters around the local minima . When learning new tasks , parameter updates are selected in order to not significantly hinder model performance on past tasks . Our intuition is that promoting a wide local minima—which conceptually stands for local minima having a flat , rounded uncertainty ellipsoid—can be particularly beneficial for regularization-based CL methods by facilitating diverse update directions for the new tasks ( i.e. , improves plasticity ) while not hurting the past tasks ( i.e. , retains stability ) . As shown in the bottom of Fig . 1 , when the ellipsoid containing the parameters with low-error is wider , i.e. , when the wide local minima exists , there is more flexibility in finding a parameter that performs well for all tasks after learning a sequence of new tasks . We provide further details in Section 2.1 . Based on the above intuition , we propose a general , yet simple patch that can be applied to existing regularization-based CL methods dubbed as Classifier-Projection Regularization ( CPR ) . Our method implements an additional regularization term that promotes wide local minima by maximizing the entropy of the classifier ’ s output distribution . Furthermore , from a theory standpoint , we make an observation that our CPR term can be further interpreted in terms of information projection ( I-projection ) formulations ( Cover & Thomas , 2012 ; Murphy , 2012 ; Csiszár & Matus , 2003 ; Walsh & Regalia , 2010 ; Amari et al. , 2001 ; Csiszár & Matus , 2003 ; Csiszár & Shields , 2004 ) found in information theory . Namely , we argue that applying CPR corresponds to projecting a classifier ’ s output onto a Kullback-Leibler ( KL ) divergence ball of finite radius centered around the uniform distribution . By applying the Pythagorean theorem for KL divergence , we then prove that this projection may ( in theory ) improve the performance of continual learning methods . Through extensive experiments on several benchmark datasets , we demonstrate that applying CPR can significantly improve the performance of the state-of-the-art regularization-based CL : using our simple patch improves both the stability and plasticity and , hence , achieves better average accuracy almost uniformly across the tested algorithms and datasets—confirming our intuition of wide local minima in Fig . 1 . Furthermore , we use a feature map visualization that compares methods trained with and without CPR to further corroborate the effectiveness of our method . 2 CPR : CLASSIFIER-PROJECTION REGULARIZATION FOR WIDE LOCAL MINIMUM . In this section , we elaborate in detail the core motivation outlined in Fig . 1 , then formalize CPR as the combination of two regularization terms : one stemming from prior regularization-based CL methods , and the other that promotes a wide local minima . Moreover , we provide an information-geometric interpretation ( Csiszár , 1984 ; Cover & Thomas , 2012 ; Murphy , 2012 ) for the observed gain in performance when applying CPR to CL . We consider continual learning of T classification tasks , where each task contains N training samplelabel pairs { ( xtn , ytn ) } Nn=1 , t ∈ [ 1 , · · · , T ] with xtn ∈ Rd , and the labels of each task has Mt classes , i.e. , ytn ∈ [ 1 , · · · , Mt ] . Note that task boundaries are given in evaluation time ; i.e. , we consider a task-aware setting . We denote fθ : Rd → ∆M as a neural network-based classification model with softmax output layer parameterized by θ . 2.1 MOTIVATION : INTRODUCING WIDE LOCAL MINIMA IN CONTINUAL LEARNING . Considering the setting of typical regularization-based CL ( top of Fig . 1 ) , we denote θ∗i as parameters that achieve local minima for a specific task i and θ̂i is that obtained with regularization terms . Assuming that θ∗1 is learnt , when learning task 2 , an appropriate regularization updates the parameters from θ∗1 to θ̂2 instead of θ ∗ 2 , since θ̂2 achieves low-errors on both tasks 1 and 2 . However , when the low-error regimes ( ellipsoids in Fig . 1 ) are narrow , it is often infeasible to obtain a parameter that performs well on all three tasks . This situation results in the trade-off between stability and plasticity in regularization-based CL ( Carpenter & Grossberg , 1987 ) . Namely , stronger regularization strength ( direction towards past tasks ) brings more stability ( θ̂13 ) , and hence less forgetting on past tasks . In contrast , weaker regularization strength ( direction towards future tasks ) leads to more plasticity so that the updated parameter θ̂23 performs better on recent tasks , at the cost of compromising the performance of past tasks . A key problem in the previous setting is that the parameter regimes that achieve low error for each task are often narrow and do not overlap with each other . Therefore , a straightforward solution is to enlarge the low-error regimes such that they have non-empty intersections with higher chance . This observation motivates us to consider wide local minima for each task in CL ( bottom of Fig . 1 ) . With wide local minima for each task , a regularization-based CL can more easily find a parameter , θ̂3 , that is close to the the local minimas for each task , i.e. , { θ∗i } 3i=1 . Moreover , it suggests that once we promote the wide local minima of neural networks during continual learning , both the stability and plasticity could potentially be improved and result in simultaneously higher accuracy for all task — which is later verified in our experimental ( see Sec . 3 ) . In the next section , we introduce the formulation of wide local minima in CL . 2.2 CLASSIFIER PROJECTION REGULARIZATION FOR CONTINUAL LEARNING . Regularization-based continual learning Typical regularization-based CL methods attach a regularization term that penalizes the deviation of important parameters learned from past tasks in order to mitigate catastrophic forgetting . The general loss form for these methods when learning task t is LtCL ( θ ) = L t CE ( θ ) + λ ∑ i Ωt−1i ( θi − θ t−1 i ) 2 , ( 1 ) where LtCE ( θ ) is the ordinary cross-entropy loss function for task t , λ is the dimensionless regularization strength , Ωt−1 = { Ωt−1i } is the set of estimates of the weight importance , and { θ t−1 i } is the parameter learned until task t− 1 . A variety of previous work , e.g. , EWC ( Kirkpatrick et al. , 2017 ) , SI ( Zenke et al. , 2017 ) , MAS ( Aljundi et al. , 2018 ) , and RWalk ( Chaudhry et al. , 2018 ) , proposed different ways of calculating Ωt−1 to measure weight importance . Single-task wide local minima Several recent schemes have been proposed ( Pereyra et al. , 2017 ; Szegedy et al. , 2016 ; Zhang et al. , 2018 ) to promote wide local minima of a neural network for solving a single task . These approaches can be unified by the following common loss form LWLM ( θ ) = LCE ( θ ) + β N N∑ n=1 DKL ( fθ ( xn ) ‖g ) , ( 2 ) where g is some probability distribution in ∆M that regularizes the classifier output fθ , β is a trade-off parameter , andDKL ( ·‖· ) is the KL divergence ( Cover & Thomas , 2012 ) . Note that , for example , when g is uniform distribution PU in ∆M , the regularization term corresponds to entropy maximization proposed in Pereyra et al . ( 2017 ) , and when g is another classifier ’ s output fθ′ , Eq . ( 2 ) becomes equivalent to the loss function in Zhang et al . ( 2018 ) . CPR : Achieving wide local minima in continual learning Combining the above two regularization terms , we propose the CPR as the following loss form for learning task t : LtCPR ( θ ) = L t CE ( θ ) + β N N∑ n=1 DKL ( fθ ( x t n ) ‖PU ) + λ ∑ i Ωt−1i ( θi − θ t−1 i ) 2 , ( 3 ) where λ and β are the regularization parameters . The first regularization term promotes the wide local minima while learning task t by using PU as the regularizing distribution g in ( 2 ) , and the second term is from the typical regularization-based CL . Note that this formulation is oblivious to Ωt−1 and , hence , it can be applied to any state-of-the-art regularization-based CL methods . In our experiments , we show that the simple addition of the KL-term can significantly boost the performance of several representative state-of-the-art methods , confirming our intuition on wide local minima for CL given in Section 2.1 and Fig 1 . Furthermore , we show in the next section that the KL-term can be geometrically interpreted in terms of information projections ( Csiszár , 1984 ; Cover & Thomas , 2012 ; Murphy , 2012 ) , providing an additional argument ( besides promoting wide local minima ) for the benefit of using CPR in continual learning . | The authors argue that achieving wide local minima during the training of tasks, is beneficial for continual learning. The plausible intuition (explained in Fig. 1) is that it is easier to find a parameter setting that is beneficial for all tasks when tasks have wide local minima. They enforce wide local minima by adding an entropy loss to the classifier ( a known strategy). The loss is further combined with any weight regularization loss, like EWC, SI, MAS. | SP:8b679a434b4b83a626a6dafc1891068800c737a5 |
Stochastic Proximal Point Algorithm for Large-scale Nonconvex Optimization: Convergence, Implementation, and Application to Neural Networks | 1 INTRODUCTION . Algorithm design for large-scale machine learning problems have been dominated by the stochastic ( sub ) gradient descent ( SGD ) and its variants ( Bottou et al. , 2018 ) . The main reasons are two-fold : on the one hand , the size of the data set may be so large that obtaining the full gradient information is too costly ; on the other hand , solving the formulated problem to very high accuracy is typically unnecessary in machine learning , since the ultimate goal of most tasks is not to fit the training data but to generalize well on unseen data . As a result , stochastic algorithms such as SGD has gained tremendous popularity recently . There has been many variations and extensions of the plain vanilla SGD algorithm to accelerate its convergence rate . One line of research focuses on reducing the variance of the stochastic gradient , resulting in famous algorithms such as SVRG ( Johnson and Zhang , 2013 ) and SAGA ( Defazio et al. , 2014 ) , which results in extra time/memory complexities of the algorithm ( significantly ) . More recently , adaptive learning schemes such as AdaGrad ( Duchi et al. , 2011 ) and Adam ( Diederik P. Kingma , 2014 ) have shown to be more effective in keeping the algorithm fully stochastic and light-weight . In terms of theory , there has also been surging amount of work quantifying the best possible rate using first-order information ( Lei et al. , 2017 ; Allen-Zhu , 2017 ; 2018a ; b ) , as well as its ability to obtain not only stationary points but also local optima ( Ge et al. , 2015 ; Jin et al. , 2017 ; Xu et al. , 2018 ; Allen-Zhu , 2018 ) . 1.1 STOCHASTIC PROXIMAL POINT ALGORITHM ( SPPA ) . In this work , we consider a different type of stochastic algorithm called the stochastic proximal point algorithm ( SPPA ) , also known as incremental proximal point method ( Bertsekas , 2011a ; b ) or stochastic proximal iterations ( Ryu and Boyd , 2014 ) . Consider the following optimization problem with the objective function in the form of a finite sum of component functions minimize ) ∈R3 1 = =∑ 8=1 ℓ8 ( ) ) = ! ( ) ) . ( 1 ) SPPA takes the following simple form : 1 : repeat 2 : randomly draw 8 from { 1 , . . . , = } 3 : ) C+1 ← arg min ) _Cℓ8 ( ) ) + ( 1/2 ) ‖ ) − ) C ‖2 = Prox_Cℓ8 ( ) C ) 4 : until convergence The update rule in line 3 is called the proximal operator of the function _Cℓ8 evaluated at ) C . This is the stochastic version of the proximal point algorithm , which dates back to Rockafellar ( 1976 ) . Admittedly , SPPA is not as universally applicable as SGD , due to the abstraction of the per-iteration update rule . It is also asking for more information from the problem than merely the first-order derivatives . However , with the help of more information inquired , there is also hope that it provides faster and more robust convergence guarantees . As we will see in numerical experiments , SPPA is able to achieve good optimization performance by taking fewer number of passes through the data set , although it takes a little more computations for each batch . We believe in many cases it is worth trading off more computations for fewer memory accesses . To the best of our knowledge , convergence analyses of SPPA has only been studied for convex problems ( Bertsekas , 2011a ; Ryu and Boyd , 2014 ; Bianchi , 2016 ) . Their study shows that SPPA converges somewhat similar to SGD for convex problems , but the updates are much more robust to instabilities in the problem . Most authors also accept the premise that the proximal operator is sometimes difficult to evaluate , and thus proposed variations to the plain vanilla version to handle more complicated problem structures ( Wang and Bertsekas , 2013 ; Duchi and Ruan , 2018 ; Asi and Duchi , 2019b ; Davis and Drusvyatskiy , 2019 ) . In terms of nonconvex optimization problems , there is very little work until very recently ( Davis and Drusvyatskiy , 2019 ; Asi and Duchi , 2019a ) . However , their convergence analysis is somewhat unconventional . Typically for a nonconvex problem , we would expect a theoretical claim that the iterates generated by SPPA converges ( in expectation ) to a stationary point . This is not easy , and the result given by ( Davis and Drusvyatskiy , 2019 ) and ( Asi and Duchi , 2019a ) defined an imaginary sequence ( that is not computed in practice ) { ) ̃ C } as ) ̃ C = arg min ) _C ! ( ) ) + ( 1/2 ) ‖ ) − ) C ‖2 , i.e. , the proximal operator of the full loss function from the algorithm sequence { ) C } . Their results show that this imaginary sequence { ) ̃ C } converges to a stationary point in expectation . 1.2 CONTRIBUTIONS . There are two main contributions we present in this paper ; efficient implementations of proximal operator update for SPPA with application on regression and classification problems , and convergence to a stationary point for SPPA algorithm for general non-convex problems . The cost of this abstract per-iteration update rule has been the burden for SPPA algorithm , even though it has been shown to converge faster and more stable than the celebrated SGD algorithm . In this paper , we show that it is actually not a burden when the per-iteration update is efficiently implemented . In the implementation section we will discuss the implementation of abstract per-iteration update rule for non-linear least squares ( NLS ) problem and other non-linear problems . We present two different implementations for these two different categories of problems . SPPA-Gauss Newton ( SPPA-GN ) and SPPA-Accelerated , respectively for regression with nonlinear least squares and classification problems . We apply SPPA to a large family of nonconvex optimization problems and show that the seemingly complicated proximal operator update can still be efficiently obtained . Both implementations give results that are comparable with the state of the art stochastic algorithms . On the other hand , there is large group of nonlinear problems that are not necessarily expressed as a NLS problem ( non-NLS ) . Many of the classification problems in deep learning applications as of today , use different type of loss functions than mean least squared error . Hence , we suggest an alternative to SPPA-GN where we implement the per-iteration update rule based on well-known stochastic optimization algorithms , preferably with the ones that take less number of iterations to converge like L-BFGS ( Liu and Nocedal , 1989 ) . As a second contribution , we show that SPPA , when applied to a nonconvex problem , converges to a stationary point in expectation , as informally stated as follows Theorem 1 . ( informal . ) For SPPA with fixed _C = _ , the expected gradient converges to a region where the norm is bounded with radius proportional to _ . For diminishing step sizes such that lim ) →∞ ) ∑ ) C=1 _ −1 C , the expected gradient converges to zero . Finally , we apply SPPA with the novel efficient updates to some classical regression and classification using 4 different data sets for neural network training . Detailed algorithmic descriptions are provided , and we show the outstanding performance of SPPA when effectively executed . As a sneak peek of the numerical performance of the proposed SPPA implementation , Figures 1 and 2 shows the cross entropy loss and prediction error on the test set over the progression of SPPA verses various baseline algorithms . SPPA indeed converges much faster than all SGD-based methods , achieving peak prediction accuracy after only going through the data set approximately 10 times . We should stress that the per-iteration complexity of SPPA is higher than other methods , since it tries to solve a small optimization problem rather than a simple gradient update . However , as we have argued before , in many cases it is worth trading off more computations for fewer memory accesses . 2 EFFICIENT IMPLEMENTATION . In this section we introduce several efficient methods to calculate the proximal operator update given in pseudo-code of SPPA section 1.1 line 3 . The two methods emerge from the question of ‘ How can we implement the proximal operator update efficiently ? ’ . The answer to this question depends on the type of the objective function . We considered the problems in two different categories , nonlinear least squares ( NLS ) and other generic nonlinear problems . 2.1 SPPA-GN FOR NONLINEAR LEAST SQUARES . A nonlinear least squares ( NLS ) problem takes the following form minimize ) ∈R3 1 = =∑ 8=1 1 2 ( i8 ( ) ) ) 2 , ( 2 ) where each i8 is a general nonlinear function with respect to ) . It is a classical nonlinear programming problem ( Bertsekas , 1999 ; Boyd and Vandenberghe , 2018 ) with many useful applications , including least squares neural networks ( Van Der Smagt , 1994 ) , where each i8 corresponds to the residual of fitting for the 8th data sample for regression . We will show that problems of this form can be efficiently executed by SPPA-GN , despite its seemingly complication . To apply SPPA to NLS , the main challenge is to efficiently evaluate the proximal operator ) C+1 ← arg min ) _C 2 ( i8 ( ) ) ) 2 + 1 2 ‖ ) − ) C ‖2 . ( 3 ) Notice that this function itself is a nonlinear least squares objective , although with only one component function together with the proximal term . The traditional wisdom to solve a NLS problem is to apply the Gauss-Newton ( GN ) algorithm : at each iteration , we first take a first-order approximation of the vector-valued function inside the Euclidean norm , and set the update as the solution of the approximated linear least squares problem . It is a well-known algorithm that can be found in many standard textbooks , e.g. , ( Bertsekas , 1999 ; Nocedal and Wright , 2006 ; Boyd and Vandenberghe , 2018 ) . To apply GN to ( 3 ) , we first take linear approximation of i8 at the current update ) as i8 ( ) ) ≈ i8 ( ) ) + ∇i8 ( ) ) > ( ) − ) ) , and set the solution of the following problem ) + as the next update minimize ) _C 2 ( i8 ( ) ) + ∇i8 ( ) ) > ( ) − ) ) ) 2 + 1 2 ‖ ) − ) C ‖2 . ( 4 ) Obviously , ( 4 ) has a closed form solution ) + = ) C − ( 1 _C O + g8g > 8 ) −1 g8 ( i8 ( ) ) − g > 8 ( ) − ) C ) ) , ( 5 ) where we denote g8 = ∇i8 ( ) ) to simplify notation . Notice that the matrix to be inverted in ( 5 ) has a simple “ identity plus rank-one ” structure , implying that it can be efficiently computed in linear time . Using the “ kernel trick ” ( Boyd and Vandenberghe , 2018 , pp.332 ) ( G > G + UO ) −1G > = G > ( GG > + UO ) −1 , ( 6 ) update ( 5 ) simplifies to ) + = ) C − i8 ( ) ) − ∇i8 ( ) ) > ( ) − ) C ) _−1C + ‖∇i8 ( ) ) ‖2 ∇i8 ( ) ) . ( 7 ) Algorithm 1 SPPA-GN 1 : initialize ) 0 , C ← 0 2 : repeat 3 : randomly draw 8 from { 1 , . . . , = } 4 : ) + ← ) C 5 : repeat 6 : ) ← ) + 7 : ) + ← ) C − i8 ( ) ) −∇i8 ( ) ) > ( ) − ) C ) _−1C +‖∇i8 ( ) ) ‖2 ∇i8 ( ) ) 8 : until convergence 9 : ) C+1 ← ) + , C ← C + 1 10 : until convergence As we can see , each GN update only takes O ( 3 ) flops , which is as cheap as that of a SGD step . To fully obtain the proximal operator ( 3 ) , one has to run GN for several iterations . However , thanks to the superlinear convergence rate of GN near its optimal ( Nocedal and Wright , 2006 ) , which is indeed the case if we initiate at ) C because of the proximal term , it typically takes no more than 5–10 GN updates . The detailed description of the proposed algorithm , which we term SPPA-GN , for solving general NLS problems is shown in Algorithm 1 . | In this paper the authors study stochastic proximal point algorithm for nonconvex optimization, where the model is iteratively updated by solving a proximal optimization problem based on a randomly selected loss function. The authors develop efficient implementation for solving the proximal optimization problem: first for nonlinear least squares and then for general losses. Then the authors study the convergence rates for the developed algorithm. Upper bounds on the expected average squared gradients are developed for both constant step sizes and diminishing step sizes. Experimental results are also reported to support the algorithm in practical implementations. | SP:ff9b59f83d1d206ef246db96f13b43ac39c54db8 |
Stochastic Proximal Point Algorithm for Large-scale Nonconvex Optimization: Convergence, Implementation, and Application to Neural Networks | 1 INTRODUCTION . Algorithm design for large-scale machine learning problems have been dominated by the stochastic ( sub ) gradient descent ( SGD ) and its variants ( Bottou et al. , 2018 ) . The main reasons are two-fold : on the one hand , the size of the data set may be so large that obtaining the full gradient information is too costly ; on the other hand , solving the formulated problem to very high accuracy is typically unnecessary in machine learning , since the ultimate goal of most tasks is not to fit the training data but to generalize well on unseen data . As a result , stochastic algorithms such as SGD has gained tremendous popularity recently . There has been many variations and extensions of the plain vanilla SGD algorithm to accelerate its convergence rate . One line of research focuses on reducing the variance of the stochastic gradient , resulting in famous algorithms such as SVRG ( Johnson and Zhang , 2013 ) and SAGA ( Defazio et al. , 2014 ) , which results in extra time/memory complexities of the algorithm ( significantly ) . More recently , adaptive learning schemes such as AdaGrad ( Duchi et al. , 2011 ) and Adam ( Diederik P. Kingma , 2014 ) have shown to be more effective in keeping the algorithm fully stochastic and light-weight . In terms of theory , there has also been surging amount of work quantifying the best possible rate using first-order information ( Lei et al. , 2017 ; Allen-Zhu , 2017 ; 2018a ; b ) , as well as its ability to obtain not only stationary points but also local optima ( Ge et al. , 2015 ; Jin et al. , 2017 ; Xu et al. , 2018 ; Allen-Zhu , 2018 ) . 1.1 STOCHASTIC PROXIMAL POINT ALGORITHM ( SPPA ) . In this work , we consider a different type of stochastic algorithm called the stochastic proximal point algorithm ( SPPA ) , also known as incremental proximal point method ( Bertsekas , 2011a ; b ) or stochastic proximal iterations ( Ryu and Boyd , 2014 ) . Consider the following optimization problem with the objective function in the form of a finite sum of component functions minimize ) ∈R3 1 = =∑ 8=1 ℓ8 ( ) ) = ! ( ) ) . ( 1 ) SPPA takes the following simple form : 1 : repeat 2 : randomly draw 8 from { 1 , . . . , = } 3 : ) C+1 ← arg min ) _Cℓ8 ( ) ) + ( 1/2 ) ‖ ) − ) C ‖2 = Prox_Cℓ8 ( ) C ) 4 : until convergence The update rule in line 3 is called the proximal operator of the function _Cℓ8 evaluated at ) C . This is the stochastic version of the proximal point algorithm , which dates back to Rockafellar ( 1976 ) . Admittedly , SPPA is not as universally applicable as SGD , due to the abstraction of the per-iteration update rule . It is also asking for more information from the problem than merely the first-order derivatives . However , with the help of more information inquired , there is also hope that it provides faster and more robust convergence guarantees . As we will see in numerical experiments , SPPA is able to achieve good optimization performance by taking fewer number of passes through the data set , although it takes a little more computations for each batch . We believe in many cases it is worth trading off more computations for fewer memory accesses . To the best of our knowledge , convergence analyses of SPPA has only been studied for convex problems ( Bertsekas , 2011a ; Ryu and Boyd , 2014 ; Bianchi , 2016 ) . Their study shows that SPPA converges somewhat similar to SGD for convex problems , but the updates are much more robust to instabilities in the problem . Most authors also accept the premise that the proximal operator is sometimes difficult to evaluate , and thus proposed variations to the plain vanilla version to handle more complicated problem structures ( Wang and Bertsekas , 2013 ; Duchi and Ruan , 2018 ; Asi and Duchi , 2019b ; Davis and Drusvyatskiy , 2019 ) . In terms of nonconvex optimization problems , there is very little work until very recently ( Davis and Drusvyatskiy , 2019 ; Asi and Duchi , 2019a ) . However , their convergence analysis is somewhat unconventional . Typically for a nonconvex problem , we would expect a theoretical claim that the iterates generated by SPPA converges ( in expectation ) to a stationary point . This is not easy , and the result given by ( Davis and Drusvyatskiy , 2019 ) and ( Asi and Duchi , 2019a ) defined an imaginary sequence ( that is not computed in practice ) { ) ̃ C } as ) ̃ C = arg min ) _C ! ( ) ) + ( 1/2 ) ‖ ) − ) C ‖2 , i.e. , the proximal operator of the full loss function from the algorithm sequence { ) C } . Their results show that this imaginary sequence { ) ̃ C } converges to a stationary point in expectation . 1.2 CONTRIBUTIONS . There are two main contributions we present in this paper ; efficient implementations of proximal operator update for SPPA with application on regression and classification problems , and convergence to a stationary point for SPPA algorithm for general non-convex problems . The cost of this abstract per-iteration update rule has been the burden for SPPA algorithm , even though it has been shown to converge faster and more stable than the celebrated SGD algorithm . In this paper , we show that it is actually not a burden when the per-iteration update is efficiently implemented . In the implementation section we will discuss the implementation of abstract per-iteration update rule for non-linear least squares ( NLS ) problem and other non-linear problems . We present two different implementations for these two different categories of problems . SPPA-Gauss Newton ( SPPA-GN ) and SPPA-Accelerated , respectively for regression with nonlinear least squares and classification problems . We apply SPPA to a large family of nonconvex optimization problems and show that the seemingly complicated proximal operator update can still be efficiently obtained . Both implementations give results that are comparable with the state of the art stochastic algorithms . On the other hand , there is large group of nonlinear problems that are not necessarily expressed as a NLS problem ( non-NLS ) . Many of the classification problems in deep learning applications as of today , use different type of loss functions than mean least squared error . Hence , we suggest an alternative to SPPA-GN where we implement the per-iteration update rule based on well-known stochastic optimization algorithms , preferably with the ones that take less number of iterations to converge like L-BFGS ( Liu and Nocedal , 1989 ) . As a second contribution , we show that SPPA , when applied to a nonconvex problem , converges to a stationary point in expectation , as informally stated as follows Theorem 1 . ( informal . ) For SPPA with fixed _C = _ , the expected gradient converges to a region where the norm is bounded with radius proportional to _ . For diminishing step sizes such that lim ) →∞ ) ∑ ) C=1 _ −1 C , the expected gradient converges to zero . Finally , we apply SPPA with the novel efficient updates to some classical regression and classification using 4 different data sets for neural network training . Detailed algorithmic descriptions are provided , and we show the outstanding performance of SPPA when effectively executed . As a sneak peek of the numerical performance of the proposed SPPA implementation , Figures 1 and 2 shows the cross entropy loss and prediction error on the test set over the progression of SPPA verses various baseline algorithms . SPPA indeed converges much faster than all SGD-based methods , achieving peak prediction accuracy after only going through the data set approximately 10 times . We should stress that the per-iteration complexity of SPPA is higher than other methods , since it tries to solve a small optimization problem rather than a simple gradient update . However , as we have argued before , in many cases it is worth trading off more computations for fewer memory accesses . 2 EFFICIENT IMPLEMENTATION . In this section we introduce several efficient methods to calculate the proximal operator update given in pseudo-code of SPPA section 1.1 line 3 . The two methods emerge from the question of ‘ How can we implement the proximal operator update efficiently ? ’ . The answer to this question depends on the type of the objective function . We considered the problems in two different categories , nonlinear least squares ( NLS ) and other generic nonlinear problems . 2.1 SPPA-GN FOR NONLINEAR LEAST SQUARES . A nonlinear least squares ( NLS ) problem takes the following form minimize ) ∈R3 1 = =∑ 8=1 1 2 ( i8 ( ) ) ) 2 , ( 2 ) where each i8 is a general nonlinear function with respect to ) . It is a classical nonlinear programming problem ( Bertsekas , 1999 ; Boyd and Vandenberghe , 2018 ) with many useful applications , including least squares neural networks ( Van Der Smagt , 1994 ) , where each i8 corresponds to the residual of fitting for the 8th data sample for regression . We will show that problems of this form can be efficiently executed by SPPA-GN , despite its seemingly complication . To apply SPPA to NLS , the main challenge is to efficiently evaluate the proximal operator ) C+1 ← arg min ) _C 2 ( i8 ( ) ) ) 2 + 1 2 ‖ ) − ) C ‖2 . ( 3 ) Notice that this function itself is a nonlinear least squares objective , although with only one component function together with the proximal term . The traditional wisdom to solve a NLS problem is to apply the Gauss-Newton ( GN ) algorithm : at each iteration , we first take a first-order approximation of the vector-valued function inside the Euclidean norm , and set the update as the solution of the approximated linear least squares problem . It is a well-known algorithm that can be found in many standard textbooks , e.g. , ( Bertsekas , 1999 ; Nocedal and Wright , 2006 ; Boyd and Vandenberghe , 2018 ) . To apply GN to ( 3 ) , we first take linear approximation of i8 at the current update ) as i8 ( ) ) ≈ i8 ( ) ) + ∇i8 ( ) ) > ( ) − ) ) , and set the solution of the following problem ) + as the next update minimize ) _C 2 ( i8 ( ) ) + ∇i8 ( ) ) > ( ) − ) ) ) 2 + 1 2 ‖ ) − ) C ‖2 . ( 4 ) Obviously , ( 4 ) has a closed form solution ) + = ) C − ( 1 _C O + g8g > 8 ) −1 g8 ( i8 ( ) ) − g > 8 ( ) − ) C ) ) , ( 5 ) where we denote g8 = ∇i8 ( ) ) to simplify notation . Notice that the matrix to be inverted in ( 5 ) has a simple “ identity plus rank-one ” structure , implying that it can be efficiently computed in linear time . Using the “ kernel trick ” ( Boyd and Vandenberghe , 2018 , pp.332 ) ( G > G + UO ) −1G > = G > ( GG > + UO ) −1 , ( 6 ) update ( 5 ) simplifies to ) + = ) C − i8 ( ) ) − ∇i8 ( ) ) > ( ) − ) C ) _−1C + ‖∇i8 ( ) ) ‖2 ∇i8 ( ) ) . ( 7 ) Algorithm 1 SPPA-GN 1 : initialize ) 0 , C ← 0 2 : repeat 3 : randomly draw 8 from { 1 , . . . , = } 4 : ) + ← ) C 5 : repeat 6 : ) ← ) + 7 : ) + ← ) C − i8 ( ) ) −∇i8 ( ) ) > ( ) − ) C ) _−1C +‖∇i8 ( ) ) ‖2 ∇i8 ( ) ) 8 : until convergence 9 : ) C+1 ← ) + , C ← C + 1 10 : until convergence As we can see , each GN update only takes O ( 3 ) flops , which is as cheap as that of a SGD step . To fully obtain the proximal operator ( 3 ) , one has to run GN for several iterations . However , thanks to the superlinear convergence rate of GN near its optimal ( Nocedal and Wright , 2006 ) , which is indeed the case if we initiate at ) C because of the proximal term , it typically takes no more than 5–10 GN updates . The detailed description of the proposed algorithm , which we term SPPA-GN , for solving general NLS problems is shown in Algorithm 1 . | This paper studies the stochastic proximal point algorithm (SPPA) for large-scale nonconvex optimization problems. The authors propose to use Gauss-Newton to perform the proximal update in nonlinear least squares and L-BFGS or accelerated gradient for generic problems. The authors derive the convergence of SPPA to a stationary point in expectation for nonconvex problems, and perform numerical experiments to showcase the effectiveness of the proposed method compared to SGD and its variants. | SP:ff9b59f83d1d206ef246db96f13b43ac39c54db8 |
Explainability for fair machine learning | 1 INTRODUCTION . Machine learning has repeatedly demonstrated astonishing predictive power due to its capacity to learn complex relationships from data . However , it is well known that machine learning models risk perpetuating or even exacerbating unfair biases learnt from historical data ( Barocas & Selbst , 2016 ; Bolukbasi et al. , 2016 ; Caliskan et al. , 2017 ; Lum & Isaac , 2016 ) . As such models are increasingly used for decisions that impact our lives , we are compelled to ensure those decisions are made fairly . In the pursuit of training a fair model , one encounters the immediate challenge of how fairness should be defined . There exist a wide variety of definitions of fairness — some based on statistical measures , others on causal reasoning , some imposing constraints on group outcomes , others at the individual level — and each notion is often incompatible with its alternatives ( Berk et al. , 2018 ; Corbett-Davies et al. , 2017 ; Kleinberg et al. , 2017 ; Lipton et al. , 2018 ; Pleiss et al. , 2017 ) . Deciding which measure of fairness to impose thus requires extensive contextual understanding and domain knowledge . Further still , one should understand the downstream consequences of a fairness intervention before imposing it on the model ’ s decisions ( Hu et al. , 2019 ; Liu et al. , 2018 ) . To help understand whether a model is making fair decisions , and choose an appropriate notion of fairness , one might be tempted to turn to model explainability techniques . Unfortunately , it has been shown that many standard explanation methods can be manipulated to suppress the reported importance of the protected attribute without substantially changing the output of the model ( Dimanov et al. , 2020 ) . Consequently such explanations are poorly suited to assessing or quantifying unfairness . In this work , we introduce new explainability methods for fairness based on the Shapley value framework for model explainability ( Datta et al. , 2016 ; Štrumbelj & Kononenko , 2010 ; Lipovetsky & Conklin , 2001 ; Lundberg & Lee , 2017 ; Štrumbelj & Kononenko , 2014 ) . We consider a broad set of widely applied group-fairness criteria and propose a unified approach to explaining unfairness within any one of them . This set of fairness criteria includes demographic parity , equalised odds , equal opportunity and conditional demographic parity see Sec . 2.1 . We show that for each of these definitions it is possible to choose Shapley value functions which capture the overall unfairness in the model , and attribute it to individual features . We also show that because the fairness Shapley values collectively must sum to the chosen fairness metric , we can not hide unfairness by manipulating the explanations of individual features , thereby overcoming the problems with accuracy-based explanations observed by Dimanov et al . ( 2020 ) . Motivated by the attractive linearity properties of Shapley value explanations , we also introduce a meta algorithm for training a fair model . Rather than learning a fair model directly , we propose instead learning an additive correction to an existing unfair model . We use training-time fairness algorithms to train the correction , thereby ensuring the corrected model is fair . We show that this approach gives new perspectives helpful for understanding fairness , benefits from greater flexibility due to model-agnosticism , and enjoys improved stability , all while maintaining the performance of the chosen training-time algorithm . 2 EXPLAINABLE FAIRNESS . In this section we give an overview of the Shapley value paradigm for machine learning explainability , and show how it can be adapted to explain fairness . Motivated by the axiomatic properties of Shapley values , we also introduce a meta algorithm for applying training-time fairness algorithms to a perturbation rather than a fresh model , giving us multiple perspectives on fairness . 2.1 BACKGROUND AND NOTATION . We consider fairness in the context of supervised classification , where the data consists of triples ( x , a , y ) , where x ∈ X are the features , a ∈ A is a protected attribute ( e.g . sex or race ) , and y ∈ Y is the target . We allow , but do not require , a to be a component of x . The task is to train a model f to predict y from x while avoiding unfair discrimination with respect to a . We assume A and Y are both finite , discrete sets . Our fairness explanations apply to any definition that can be formulated as ( conditional ) independence of the model output and the protected attribute . This includes demographic parity ( Calders et al. , 2009 ; Feldman et al. , 2015 ; Kamiran & Calders , 2012 ; Zafar et al. , 2017 ) , conditional demographic parity ( Corbett-Davies et al. , 2017 ) , and equalised odds and equal opportunity ( Hardt et al. , 2016 ) . Definition 1 . DEMOGRAPHIC PARITY The model f satisfies demographic parity if f ( x ) is independent of a , or equivalently P ( f ( x ) = ỹ|a ) = P ( f ( x ) = ỹ ) for all ỹ ∈ Y and a ∈ A . Definition 2 . CONDITIONAL DEMOGRAPHIC PARITY The model f satisfies conditional demographic parity if with respect to a set of legitimate risk factors { v1 , . . . , vn } if f ( x ) is independent of a conditional on the vi , or equivalently P ( f ( x ) = ỹ|a , v1 , . . . , vn ) = P ( f ( x ) = ỹ|v1 , . . . , vn ) for all ỹ ∈ Y and a ∈ A . Definition 3 . EQUALISED ODDS The model f satisfies equalised odds if f ( x ) is independent of a conditional on y , or equivalently P ( f ( x ) = ỹ|a , y ) = P ( f ( x ) = ỹ|y ) for all ỹ , y ∈ Y and a ∈ A . If Y = { 0 , 1 } is binary , then equalised odds implies that the true and false positive rates on each protected group should agree . Furthermore , assuming that y = 1 corresponds to the “ privelidged outcome ” , we can define equal opportunity as follows Definition 4 . EQUAL OPPORTUNITY The model f satisfies equal opportunity if f ( x ) is independent of a conditional on y = 1 , or equivalently P ( f ( x ) = ỹ|a , y = 1 ) = P ( f ( x ) = ỹ|y = 1 ) for all ỹ ∈ Y and a ∈ A . 2.2 ADAPTING EXPLAINABILTY TO FAIRNESS . Fairness in decision making – automated or not – is a subtle topic . Choosing an appropriate definition of fairness requires both context and domain knowledge . In seeking to improve our understanding of the problem , we might be tempted to use model explainability methods . However Dimanov et al . ( 2020 ) show that such methods are poorly suited for understanding fairness . In particular we should not try to quantify unfairness by looking at the feature importance of the protected attribute , as such measures can be easily manipulated . Part of the problem is that most explainability methods attempt to determine which features are important contibutors to the model ’ s accuracy . We seek to introduce explanations that instead determine which features contributed to unfairness in the model . Toward this end , we work within the Shapley value paradigm , which is widely used as a modelagnostic and theoretically principled approach to model explainability ( Datta et al. , 2016 ; Štrumbelj & Kononenko , 2010 ; Lipovetsky & Conklin , 2001 ; Lundberg & Lee , 2017 ; Štrumbelj & Kononenko , 2014 ) . We will first review the application of Shapley values to explaining model accuracy , then show how this can be adapted to explaining model unfairness . See Frye et al . ( 2020b ) for a detailed analysis of the axiomatic foundations of Shapley values in the context of model explainability . EXPLAINING MODEL ACCURACY . Shapley values provide a method from cooperative game theory to attribute value to the individual players on a team N = { 1 , . . . , n } ( Shapley , 1953 ) . If the team earns a total value v ( N ) , the Shapley value φv ( i ) attributes a portion to player i according to : φv ( i ) = ∑ S⊆N\ { i } |S| ! ( n− |S| − 1 ) ! n ! [ v ( S ∪ { i } ) − v ( S ) ] ( 1 ) Here v ( S ) is the value a coalition S of players generates when playing on their own . The Shapley value φv ( i ) is thus the average marginal contribution that player i makes upon joining a coalition , averaged over all coalitions and all orders in which those coalitions can form . To apply Shapley values to model explainability , one interprets the input features as the players of the game and defines an appropriate value function ( e.g . the model ’ s output ) to insert into Eq . ( 1 ) . Let fy ( x ) denote the predicted probability that x belongs to class y . We define a value function by marginalising over out-of-coalition features : vfy ( x ) ( S ) = Ep ( x′ ) [ fy ( xS t x′N\S ) ] ( 2 ) where xS is the set of feature values with indices in S , xStx′N\S is a new data point formed by filling the missing features in xS with values from x′ , and where p ( x′ ) represents the data distribution.1 One computes local Shapley values φfy ( x ) ( i ) by inserting vfy ( x ) into Eq . ( 1 ) . These can be aggregated to obtain a global explanation of the model that maintains the underlying Shapley axioms : Φf ( i ) = Ep ( x , y ) [ φfy ( x ) ( i ) ] ( 3 ) where p ( x , y ) is the joint distribution from which the labelled data is sampled , and so fy ( x ) is the probability the model assigns to the true outcome . Aggregating global Shapley values in this way provides the desirable property that∑ i Φf ( i ) = Ep ( x , y ) [ fy ( x ) ] − Ep ( x′ ) p ( y ) [ fy ( x ′ ) ] ( 4 ) The first term on the right-hand side is the average probability assigned to the true outcome . It can be interpreted as the expected accuracy of a randomised classifier that samples a predicted label according to the probabilities predicted by the model . The second is an offset term corresponding to the expected accuracy if we were to sample a predicted label at random according to the average prediction probabilities for each class . This offset is not attributable to any of the features and is related to the class balance . We remark that randomised classifiers are often used when training fair models , for example by the reductions approach of Agarwal et al . ( 2018 ) , so expected accuracy coincides with commonly used deterministic accuracy . More generally , the expected accuracy is closely related to usual notions of accuracy , but additionally captures the confidence with which the classifier makes predictions . | The goal of the paper is to design mechanisms to explain the unfairness in the outcomes of a ML model and propose methods to mitigate unfairness. The paper uses the Shapley value framework. The main idea is to alter the prediction function so that instead of providing the classification score, an "unfairness" score is returned. An out of the box application of the Shapley value framework on this unfairness score now returns the "unfairness" feature attribution. These feature attributions can be used to explain the unfairness of the model. The paper then proposes to learn a linear perturbation, which when combined with the additive property of Shapley framework results in updated "unfairness" attributions. | SP:afb7cc467235d77ddcfc6b8745fa6096223d8fdd |
Explainability for fair machine learning | 1 INTRODUCTION . Machine learning has repeatedly demonstrated astonishing predictive power due to its capacity to learn complex relationships from data . However , it is well known that machine learning models risk perpetuating or even exacerbating unfair biases learnt from historical data ( Barocas & Selbst , 2016 ; Bolukbasi et al. , 2016 ; Caliskan et al. , 2017 ; Lum & Isaac , 2016 ) . As such models are increasingly used for decisions that impact our lives , we are compelled to ensure those decisions are made fairly . In the pursuit of training a fair model , one encounters the immediate challenge of how fairness should be defined . There exist a wide variety of definitions of fairness — some based on statistical measures , others on causal reasoning , some imposing constraints on group outcomes , others at the individual level — and each notion is often incompatible with its alternatives ( Berk et al. , 2018 ; Corbett-Davies et al. , 2017 ; Kleinberg et al. , 2017 ; Lipton et al. , 2018 ; Pleiss et al. , 2017 ) . Deciding which measure of fairness to impose thus requires extensive contextual understanding and domain knowledge . Further still , one should understand the downstream consequences of a fairness intervention before imposing it on the model ’ s decisions ( Hu et al. , 2019 ; Liu et al. , 2018 ) . To help understand whether a model is making fair decisions , and choose an appropriate notion of fairness , one might be tempted to turn to model explainability techniques . Unfortunately , it has been shown that many standard explanation methods can be manipulated to suppress the reported importance of the protected attribute without substantially changing the output of the model ( Dimanov et al. , 2020 ) . Consequently such explanations are poorly suited to assessing or quantifying unfairness . In this work , we introduce new explainability methods for fairness based on the Shapley value framework for model explainability ( Datta et al. , 2016 ; Štrumbelj & Kononenko , 2010 ; Lipovetsky & Conklin , 2001 ; Lundberg & Lee , 2017 ; Štrumbelj & Kononenko , 2014 ) . We consider a broad set of widely applied group-fairness criteria and propose a unified approach to explaining unfairness within any one of them . This set of fairness criteria includes demographic parity , equalised odds , equal opportunity and conditional demographic parity see Sec . 2.1 . We show that for each of these definitions it is possible to choose Shapley value functions which capture the overall unfairness in the model , and attribute it to individual features . We also show that because the fairness Shapley values collectively must sum to the chosen fairness metric , we can not hide unfairness by manipulating the explanations of individual features , thereby overcoming the problems with accuracy-based explanations observed by Dimanov et al . ( 2020 ) . Motivated by the attractive linearity properties of Shapley value explanations , we also introduce a meta algorithm for training a fair model . Rather than learning a fair model directly , we propose instead learning an additive correction to an existing unfair model . We use training-time fairness algorithms to train the correction , thereby ensuring the corrected model is fair . We show that this approach gives new perspectives helpful for understanding fairness , benefits from greater flexibility due to model-agnosticism , and enjoys improved stability , all while maintaining the performance of the chosen training-time algorithm . 2 EXPLAINABLE FAIRNESS . In this section we give an overview of the Shapley value paradigm for machine learning explainability , and show how it can be adapted to explain fairness . Motivated by the axiomatic properties of Shapley values , we also introduce a meta algorithm for applying training-time fairness algorithms to a perturbation rather than a fresh model , giving us multiple perspectives on fairness . 2.1 BACKGROUND AND NOTATION . We consider fairness in the context of supervised classification , where the data consists of triples ( x , a , y ) , where x ∈ X are the features , a ∈ A is a protected attribute ( e.g . sex or race ) , and y ∈ Y is the target . We allow , but do not require , a to be a component of x . The task is to train a model f to predict y from x while avoiding unfair discrimination with respect to a . We assume A and Y are both finite , discrete sets . Our fairness explanations apply to any definition that can be formulated as ( conditional ) independence of the model output and the protected attribute . This includes demographic parity ( Calders et al. , 2009 ; Feldman et al. , 2015 ; Kamiran & Calders , 2012 ; Zafar et al. , 2017 ) , conditional demographic parity ( Corbett-Davies et al. , 2017 ) , and equalised odds and equal opportunity ( Hardt et al. , 2016 ) . Definition 1 . DEMOGRAPHIC PARITY The model f satisfies demographic parity if f ( x ) is independent of a , or equivalently P ( f ( x ) = ỹ|a ) = P ( f ( x ) = ỹ ) for all ỹ ∈ Y and a ∈ A . Definition 2 . CONDITIONAL DEMOGRAPHIC PARITY The model f satisfies conditional demographic parity if with respect to a set of legitimate risk factors { v1 , . . . , vn } if f ( x ) is independent of a conditional on the vi , or equivalently P ( f ( x ) = ỹ|a , v1 , . . . , vn ) = P ( f ( x ) = ỹ|v1 , . . . , vn ) for all ỹ ∈ Y and a ∈ A . Definition 3 . EQUALISED ODDS The model f satisfies equalised odds if f ( x ) is independent of a conditional on y , or equivalently P ( f ( x ) = ỹ|a , y ) = P ( f ( x ) = ỹ|y ) for all ỹ , y ∈ Y and a ∈ A . If Y = { 0 , 1 } is binary , then equalised odds implies that the true and false positive rates on each protected group should agree . Furthermore , assuming that y = 1 corresponds to the “ privelidged outcome ” , we can define equal opportunity as follows Definition 4 . EQUAL OPPORTUNITY The model f satisfies equal opportunity if f ( x ) is independent of a conditional on y = 1 , or equivalently P ( f ( x ) = ỹ|a , y = 1 ) = P ( f ( x ) = ỹ|y = 1 ) for all ỹ ∈ Y and a ∈ A . 2.2 ADAPTING EXPLAINABILTY TO FAIRNESS . Fairness in decision making – automated or not – is a subtle topic . Choosing an appropriate definition of fairness requires both context and domain knowledge . In seeking to improve our understanding of the problem , we might be tempted to use model explainability methods . However Dimanov et al . ( 2020 ) show that such methods are poorly suited for understanding fairness . In particular we should not try to quantify unfairness by looking at the feature importance of the protected attribute , as such measures can be easily manipulated . Part of the problem is that most explainability methods attempt to determine which features are important contibutors to the model ’ s accuracy . We seek to introduce explanations that instead determine which features contributed to unfairness in the model . Toward this end , we work within the Shapley value paradigm , which is widely used as a modelagnostic and theoretically principled approach to model explainability ( Datta et al. , 2016 ; Štrumbelj & Kononenko , 2010 ; Lipovetsky & Conklin , 2001 ; Lundberg & Lee , 2017 ; Štrumbelj & Kononenko , 2014 ) . We will first review the application of Shapley values to explaining model accuracy , then show how this can be adapted to explaining model unfairness . See Frye et al . ( 2020b ) for a detailed analysis of the axiomatic foundations of Shapley values in the context of model explainability . EXPLAINING MODEL ACCURACY . Shapley values provide a method from cooperative game theory to attribute value to the individual players on a team N = { 1 , . . . , n } ( Shapley , 1953 ) . If the team earns a total value v ( N ) , the Shapley value φv ( i ) attributes a portion to player i according to : φv ( i ) = ∑ S⊆N\ { i } |S| ! ( n− |S| − 1 ) ! n ! [ v ( S ∪ { i } ) − v ( S ) ] ( 1 ) Here v ( S ) is the value a coalition S of players generates when playing on their own . The Shapley value φv ( i ) is thus the average marginal contribution that player i makes upon joining a coalition , averaged over all coalitions and all orders in which those coalitions can form . To apply Shapley values to model explainability , one interprets the input features as the players of the game and defines an appropriate value function ( e.g . the model ’ s output ) to insert into Eq . ( 1 ) . Let fy ( x ) denote the predicted probability that x belongs to class y . We define a value function by marginalising over out-of-coalition features : vfy ( x ) ( S ) = Ep ( x′ ) [ fy ( xS t x′N\S ) ] ( 2 ) where xS is the set of feature values with indices in S , xStx′N\S is a new data point formed by filling the missing features in xS with values from x′ , and where p ( x′ ) represents the data distribution.1 One computes local Shapley values φfy ( x ) ( i ) by inserting vfy ( x ) into Eq . ( 1 ) . These can be aggregated to obtain a global explanation of the model that maintains the underlying Shapley axioms : Φf ( i ) = Ep ( x , y ) [ φfy ( x ) ( i ) ] ( 3 ) where p ( x , y ) is the joint distribution from which the labelled data is sampled , and so fy ( x ) is the probability the model assigns to the true outcome . Aggregating global Shapley values in this way provides the desirable property that∑ i Φf ( i ) = Ep ( x , y ) [ fy ( x ) ] − Ep ( x′ ) p ( y ) [ fy ( x ′ ) ] ( 4 ) The first term on the right-hand side is the average probability assigned to the true outcome . It can be interpreted as the expected accuracy of a randomised classifier that samples a predicted label according to the probabilities predicted by the model . The second is an offset term corresponding to the expected accuracy if we were to sample a predicted label at random according to the average prediction probabilities for each class . This offset is not attributable to any of the features and is related to the class balance . We remark that randomised classifiers are often used when training fair models , for example by the reductions approach of Agarwal et al . ( 2018 ) , so expected accuracy coincides with commonly used deterministic accuracy . More generally , the expected accuracy is closely related to usual notions of accuracy , but additionally captures the confidence with which the classifier makes predictions . | This paper presents a method for feature attribution for fairness of the classifier. They also demonstrate a feature augmentation technique to mitigate unfairness. They connect their attribution method to to the augmentation technique and demonstrate that their method can attribute the necessary changes to achieve fairness. They evaluate their approach on a few tabular data sets. | SP:afb7cc467235d77ddcfc6b8745fa6096223d8fdd |
Decentralized Attribution of Generative Models | 1 INTRODUCTION Recent advances in generative models ( Goodfellow et al. , 2014 ) have enabled the creation of synthetic contents that are indistinguishable even by naked eyes ( Pathak et al. , 2016 ; Zhu et al. , 2017 ; Zhang et al. , 2017 ; Karras et al. , 2017 ; Wang et al. , 2018 ; Brock et al. , 2018 ; Miyato et al. , 2018 ; Choi et al. , 2018 ; Karras et al. , 2019a ; b ; Choi et al. , 2019 ) . Such successes raised serious concerns regarding emerging threats due to the applications of generative models ( Kelly , 2019 ; Breland , 2019 ) . This paper is concerned about two particular types of threats , namely , malicious personation ( Satter , 2019 ) , and digital copyright infringement . In the former , the attacker uses generative models to create and disseminate inappropriate or illegal contents ; in the latter , the attacker steals the ownership of a copyrighted content ( e.g. , an art piece created through the assistance of a generative model ) by making modifications to it . We study model attribution , a solution that may address both threats . Model attribution is defined as the identification of user-end models where the contents under question are generated from . Existing ∗Equal contribution . 1https : //github.com/ASU-Active-Perception-Group/decentralized_ attribution_of_generative_models studies demonstrated empirical feasibility of attribution through a centralized classifier trained on all existing user-end models ( Yu et al. , 2018 ) . However , this approach is not scalable in reality where the number of models ever grows . Neither does it provide an attributability guarantee . To this end , we propose in this paper a decentralized attribution scheme : Instead of a centralized classifier , we use a set of binary linear classifiers associated with each user-end model . Each classifier is parameterized by a user-specific key and distinguishes its associated model distribution from the authentic data distribution . For correct attribution , we expect one-hot classification outcomes for generated contents , and a zero vector for authentic data . To achieve correct attribution , we study the sufficient conditions of the user-specific keys that guarantee an attributability lower bound . The resultant conditions are used to develop an algorithm for computing the keys . Lastly , we assume that attackers can post-process generated contents to potentially deny the attribution , and study the tradeoff between generation quality and robustness of attribution against post-processes . Problem formulation We assume that for a given dataset D ⊂ Rdx , the registry generates userspecific keys , Φ : = { φ1 , φ2 , ... } where φi ∈ Rdx and ||φi|| = 1 . || · || is the l2 norm . A user-end generative model is denoted by Gφ ( · ; θ ) : Rdz → Rdx where z and x are the latent and output variables , respectively , and θ are the model parameters . When necessary , we will suppress θ and φ to reduce the notational burden . The dissemination of the user-end models is accompanied by a public service that tells whether a query content belongs to Gφ ( labeled as 1 ) or not ( labeled as −1 ) . We model the underlying binary linear classifier as fφ ( x ) = sign ( φTx ) . Note that linear models are necessary for the development of sufficient conditions of attribution presented in this paper , although sufficient conditions for nonlinear classifiers are worth exploring in the future . The following quantities are central to our investigation : ( 1 ) Distinguishability of Gφ measures the accuracy of fφ ( x ) at classifying Gφ against D : D ( Gφ ) : = 1 2 Ex∼PGφ , x0∼PD [ 1 ( fφ ( x ) = 1 ) + 1 ( fφ ( x0 ) = −1 ) ] . ( 1 ) Here PD is the authentic data distribution , and PGφ the user-end distribution dependent on φ. G is ( 1 − δ ) -distinguishable for some δ ∈ ( 0 , 1 ] when D ( G ) ≥ 1 − δ . ( 2 ) Attributability measures the averaged multi-class classification accuracy of each model distribution over the collection G : = { Gφ1 , ... , GφN } : A ( G ) : = 1 N N∑ i=1 Ex∼Gφi1 ( φ T j x < 0 , ∀ j 6= i , φTi x > 0 ) . ( 2 ) G is ( 1 − δ ) -attributable when A ( G ) ≥ 1 − δ . ( 3 ) Lastly , We denote by G ( · ; θ0 ) ( or shortened as G0 ) the root model trained on D , and assume PG0 = PD . We will measure the ( lack of ) generation quality ofGφ by the FID score ( Heusel et al. , 2017 ) and the l2 norm of the mean output perturbation : ∆x ( φ ) = Ez∼Pz [ Gφ ( z ; θ ) −G ( z ; θ0 ) ] , ( 3 ) where Pz is the latent distribution . This paper investigates the following question : What are the sufficient conditions of keys so that the user-end generative models can achieve distinguishability individually and attributability collectively , while maintaining their generation quality ? Contributions We claim the following contributions : 1 . We develop sufficient conditions of keys for distinguishability and attributability , which connect these metrics with the geometry of the data distribution , the angles between keys , and the generation quality . 2 . The sufficient conditions lead to simple design rules for the keys : keys should be ( 1 ) data compliant , i.e. , φTx < 0 for x ∼ PD , and ( 2 ) orthogonal to each other . We validate these rules using DCGAN ( Radford et al. , 2015 ) and StyleGAN ( Karras et al. , 2019a ) on benchmark datasets including MNIST ( LeCun & Cortes , 2010 ) , CelebA ( Liu et al. , 2015 ) , and FFHQ ( Karras et al. , 2019a ) . See Fig . 1 for a visualization of the attributable distributions perturbed from the authentic FFHQ dataset . 3 . We empirically test the tradeoff between generation quality and robust attributability under random post-processes including image blurring , cropping , noising , JPEG conversion , and a combination of all . 2 SUFFICIENT CONDITIONS FOR ATTRIBUTABILITY . From the definitions ( Eq . ( 1 ) and Eq . ( 2 ) ) , achieving distinguishability is necessary for attributability . In the following , we first develop the sufficient conditions for distinguishability through Proposition 1 and Theorem 1 , and then those for attributability through Theorem 2 . Distinguishability through watermarking First , consider constructing a user-end model Gφ by simply adding a perturbation ∆x to the outputs of the root model G0 . Assuming that φ is datacompliant , this model can achieve distinguishability by solving the following problem with respect to ∆x : min ||∆x||≤ε Ex∼PD [ max { 1− φT ( x+ ∆x ) , 0 } ] , ( 4 ) where ε > 0 represents a generation quality constraint . The following proposition reveals the connection between distinguishability , data geometry , and generation quality ( proof in Appendix A ) : Proposition 1 . Let dmax ( φ ) : = maxx∼PD |φTx| . If ε ≥ 1 + dmax ( φ ) , then ∆x∗ = ( 1 + dmax ( φ ) ) φ solves Eq . ( 4 ) , and fφ ( x+ ∆x∗ ) > 0 , ∀ x ∼ PD . Watermarking through retraining user-end models The perturbation ∆x∗ can potentially be reverse engineered and removed when generative models are white-box to users ( e.g. , when models are downloaded by users ) . Therefore , we propose to instead retrain the user-end models Gφ using the perturbed datasetDγ , φ : = { G0 ( z ) +γφ | z ∼ Pz } with γ > 0 , so that the perturbation is realized through the model architecture and weights . Specifically , the retraining fine-tunes G0 so that Gφ ( z ) matches with G0 ( z ) + γφ for z ∼ Pz . Since this matching will not be perfect , we use the following model to characterize the resultant Gφ : Gφ ( z ) = G0 ( z ) + γφ+ , ( 5 ) where the error ∼ N ( µ , Σ ) . In Sec . 3 we provide statistics of µ and Σ on the benchmark datasets , to show that the retraining captures the perturbations well ( µ close to 0 and small variances in Σ ) . Updating Proposition 1 due to the existence of leads to Theorem 1 , where we show that γ needs to be no smaller than dmax ( φ ) in order for Gφ to achieve distinguishability ( proof in Appendix B ) : Theorem 1 . Let dmax ( φ ) = maxx∈D |φTx| , σ2 ( φ ) = φTΣφ , δ ∈ [ 0 , 1 ] , and φ be a data-compliant key . D ( Gφ ) ≥ 1− δ/2 if γ ≥ dmax ( φ ) + σ ( φ ) √ log ( 1 δ2 ) − φTµ . ( 6 ) Remarks The computation of σ ( φ ) requires Gφ , which in turn requires γ . Therefore , an iterative search is needed to determine γ that is small enough to limit the loss of generation quality , yet large enough for distinguishability ( see Alg . 1 ) . Attributability We can now derive the sufficient conditions for attributability of the generative models from a set of N keys ( proof in Appendix C ) : Theorem 2 . Let dmin = minx∈D |φTx| , dmax = maxx∈D |φTx| , σ2 ( φ ) = φTΣφ , δ ∈ [ 0 , 1 ] . Let a ( φ , φ′ ) : = −1 + dmax ( φ ′ ) + dmin ( φ ′ ) − 2φ′Tµ σ ( φ′ ) √ log ( 1 δ2 ) + dmax ( φ′ ) − φ′Tµ , ( 7 ) for keys φ and φ′ . Then A ( G ) ≥ 1−Nδ , if D ( G ) ≥ 1− δ for all Gφ ∈ G , and φTφ′ ≤ a ( φ , φ′ ) ( 8 ) for any pair of data-compliant keys φ and φ′ . Remarks When σ ( φ′ ) is negligible for all φ′ and µ = 0 , a ( φ , φ′ ) is approximately dmin ( φ ′ ) /dmax ( φ ′ ) > 0 , in which case φTφ′ ≤ 0 is sufficient for attributability . In Sec . 3 we empirically show that this approximation is plausible for the benchmark datasets . 3 EXPERIMENTS AND ANALYSIS . In this section we test Theorem 1 , provide empirical support for the orthogonality of keys , and present experimental results on model attribution using MNIST , CelebA , and FFHQ . Note that tests on the theorems require estimation of Σ , which is costly for models with high-dimensional outputs , and therefore are only performed on MNIST and CelebA . Key generation We generate keys by iteratively solving the following convex problem : φi = arg min φ Ex∼PD , G0 [ max { 1 + φTx , 0 } ] + i−1∑ j=1 max { φTj φ , 0 } . ( 9 ) The orthogonality penalty is omitted for the first key . The solutions are normalized to unit l2 norm before being inserted into the next problem . We note that PD and PG0 do not perfectly match in practice , and therefore we draw with equal chance from both distributions during the computation . G0s are trained using the standard DCGAN architecture for MNIST and CelebA , and StyleGAN for FFHQ . Training details are deferred to Appendix D. User-end generative models The training of Gφ follows Alg . 1 , where γ is iteratively tuned to balance generation quality and distinguishability . For each γ , we collect a perturbed dataset Dγ , φ and solve the following training problem : min θ E ( z , x ) ∼Dγ , φ [ ||Gφ ( z ; θ ) − x||2 ] , ( 10 ) starting from θ = θ0 . If the resultant model does not meet the distinguishability requirement due to the discrepancy between Dγ , φ and Gφ , the perturbation is updated as γ = αγ . In experiments , we use a standard normal distribution for Pz , and set δ = 10−2 and α = 1.1 . Validation of Theorem 1 Here we validate the sufficient condition for distinguishability . Fig . 2a compares the LHS and RHS values of Eq . ( 6 ) for 100 distinguishable user-end models . The empirical distinguishability of these models are reported in Fig . 2e . Calculation of the RHS of Eq . ( 6 ) requires estimations of µ and Σ . To do this , we sample ( z ) = Gφ ( z ; θ ) −G ( z ; θ0 ) − γφ ( 11 ) using 5000 samples of z ∼ Pz , where Gφ and γ are derived from Alg . 1 . Σ and µ are then estimated for each φ . Fig . 2c and d present histograms of the elements in µ and Σ for two user-end models of the benchmark datasets . Results in Fig . 2a show that the sufficient condition for distinguishability ( Eq . ( 6 ) ) is satisfied for most of the sampled models through the training specified in Alg . 1 . Lastly , we notice that the LHS values for MNIST are farther away from the equality line than those for CelebA . This is because the MNIST data distribution resides at corners of the unit box . Therefore perturbations of the distribution are more likely to exceed the bounds for pixel values . Clamping of these invalid pixel values reduces the effective perturbation length . Therefore to achieve distinguishability , Alg . 1 seeks γs larger than needed . This issue is less observed in CelebA , where data points are rarely close to the boundaries . Fig . 2g present the values of γs of all user-end models . Algorithm 1 : Training ofGφ input : φ , G0 output : Gφ , γ 1 set γ = dmax ( φ ) ; 2 collect Dγ , φ ; 3 train Gφ by solving Eq . ( 10 ) using Dγ , φ ; 4 compute empirical D ( Gφ ) ; 5 if D ( Gφ ) < 1− δ then 6 set γ = αγ ; 7 goto step 2 ; 8 end Validation of Theorem 2 Recall that from Theorem 2 , we recognized that orthogonal keys are sufficient . To support this design rule , Fig . 2b presents the minimum RHS values of Eq . ( 8 ) for 100 user-end models . Specifically , for each φi , we compute a ( φi , φj ) ( Eq . ( 7 ) ) using φj for j = 1 , ... , i − 1 and report minj a ( φi , φj ) , which sets an upper bound on the angle between φi and all existing φs . The resultant minj a ( φi , φj ) are all positive for MNIST and close to zero for CelebA . From this result , an angle of ≥ 94 deg , instead of 90 deg , should be enforced between any pairs of keys for CelebA . However , since the conditions are sufficient , orthogonal keys still empirically achieve high attributability ( Fig . 2f ) , although improvements can be made by further increasing the angle between keys . Also notice that the current computation of keys ( Eq . ( 9 ) ) does not enforce a hard constraint on orthogonality , leading to slightly acute angles ( 87.7 deg ) between keys for CelebA ( Fig . 2h ) . On the other hand , the positive values in Fig . 2b for MNIST suggests that further reducing the angles between keys is acceptable if one needs to increase the total capacity of attributable models . However , doing so would require the derivation of new keys to rely on knowledge about all existing user-end models ( in order to compute Eq . ( 7 ) ) . Empirical results on benchmark datasets Tab . 1 reports the metrics of interest measured on the 100 user-end models for each of MNIST and CelebA , and 20 models for FFHQ . All models are trained to be distinguishable . And by utilizing Theorem 2 , they also achieve high attributability . As a comparison , we demonstrate results where keys are 45 deg apart ( φTφ′ = 0.71 ) using a separate set of 20 user-end models for each of MNIST and CelebA , and 5 models for FFHQ , in which case distinguishability no longer guarantees attributability . Regarding generation quality , Gφs receive worse FID scores than G0 due to the perturbations . We visualize samples from user-end models and the corresponding keys in Fig . 3 . Note that for human faces , FFHQ in particular , the perturbations create light shades around eyes and lips , which is an unexpected but reasonable result . Attribution robustness vs. generation quality We now consider the scenario where outputs of the generative models are post-processed ( e.g. , by adversaries ) before being attributed . When the post-processes are known , we can take counter measures through robust training , which intuitively will lead to additional loss of generation quality . To assess this tradeoff between robustness and generation quality , we train Gφ against post-processes T : Rdx → Rdx from a distribution PT . Due to the potential nonlinearity of T and the lack of theoretical guarantee in this scenario , we resort to the following robust training problem for deriving the user-end models : min θi Ez∼Pz , T∈PT [ max { 1− fφi ( T ( Gφi ( z ; θi ) ) ) , 0 } + C||G0 ( z ) −Gφi ( z ; θi ) ||2 ] , ( 12 ) where C is the hyper-parameter for generation quality . Detailed analysis and comparison for selecting C are provided in Appendix E. We consider five types of post-processes : blurring , cropping , noise , JPEG conversion and the combination of these four . Examples of the post-processed images are shown in Fig . 5 . Blurring uses Gaussian kernel widths uniformly drawn from 1 3 { 1 , 3 , 5 , 7 , 9 } . Cropping crops images with uniformly drawn ratios between 80 % and 100 % , and scales the cropped images back to the original size using bilinear interpolation . Noise adds white noise with standard deviation uniformly drawn from [ 0 , 0.3 ] . JPEG applies JPEG compression . Combination performs each attack with a 50 % chance in the order of Blurring , Cropping , Noise and JPEG . For differentiability , we use existing implementations of differentiable blurring ( Riba et al . ( 2020 ) ) and JPEG conversion ( Zhu et al . ( 2018 ) ) . For robust training , we apply the post-process to mini-batches with 50 % probability . We performed comprehensive tests using DCGAN ( on MNIST and CelebA ) , PGAN ( on CelebA ) , and CycleGAN ( on Cityscapes ) . Tab . 2 summarizes the average distinguishability , the attributability , the perturbation length ||∆x|| , and the FID score with and without robust training of Gφ . Results are based on 20 models for each architecture-dataset pair , where keys are kept orthogonal and data compliant . From the results , defense against these post-processes can be achieved , except for Combination . Importantly , there is a clear tradeoff between robustness and generation quality . This can be seen from Fig . 5 , which compares samples with7 and without robust training from the tested models and datasets . Lastly , it is worth noting that the training formulation in Eq . ( 12 ) can also be applied to the training of non-robust user-end models in place of Eq . ( 10 ) . However , the resultant model from Eq . ( 12 ) can not be characterized by Eq . ( 5 ) with small µ and Σ , i.e. , due to the nonlinearity of the training process of Eq . ( 12 , the user-end model distribution is deformed while it is perturbed . This resulted in unsuccessful validation of the theorems , which led to the adoption of Eq . ( 10 ) for theorem-consistent training . Therefore , while the empirical results show feasibility of achieving robust attributability using Eq . ( 12 , counterparts to Theorems 1 and 2 in this nonlinear setting are yet to be developed . Capacity of keys For real-world applications , we hope to maintain attributability for a large set of keys . Our study so far suggests that the capacity of keys is constrained by the data compliance and orthogonality requirements . While the empirical study showed the feasibility of computing keys through Eq . ( 9 ) , finding the maximum number of feasible keys is a problem about optimal sphere packing on a segment of the unit sphere ( Fig . 4 ) . To explain , the unit sphere represents the identifiability requirement ||φ|| = 1 . The feasible segment of the unit sphere is determined by the data compliance and generation quality constraints . And the spheres to be packed have radii following the sufficient condition in Theorem 2 . Such optimal packing problems are known open challenges ( Cohn et al . ( 2017 ) ; Cohn ( 2016 ) ) . For real-world applications where a capacity of attributable models is needed ( which is the case for both malicious personation and copyright infringement set- tings ) , it is necessary to find approximated solutions to this problem . Generation quality control From Proposition 1 and Theorem 1 , the inevitable loss of generation quality is directly related to the length of perturbation ( γ ) , which is related to dmax . Fig . 6 compares outputs from user-end models with different dmaxs . While it is possible to filter φs based on their corresponding dmaxs for generation quality control , here we discuss a potential direction for prescribing a subspace of φs within which quality can be controlled . To start , we denote by J ( x ) the Jacobian of G0 with respect to its generator parameters θ0 . Our discussion is related to the matrix M = Ex∼PG0 [ J ( x ) ] Ex∼PG0 [ J ( x ) T ] . A spectral analysis of M reveals that the eigenvectors of M with large eigenvalues are more structured than those with small ones ( Fig . 7 ( a ) ) . This finding is consistent with the definition of M : The largest eigenvectors of M represent the principal axes of all mean sensitivity vectors , where the mean is taken over the latent space . For MNIST , these eigenvectors overlap with the digits ; for CelebA , they are structured color patterns . On the other hand , the smallest eigenvectors represent directions rarely covered by the sensitivity vectors , thus resembling random noise . Based on this finding , we test the hypothesis that keys more aligned with the eigenspace of the small eigenvalues will have smaller dmax . We test this hypothesis by computing the Pearson correlations between dmax and φTMφ using 100 models for each of MNIST and CelebA . The resultant correlations are 0.33 and 0.53 , respectively . In addition , we compare outputs from models using the largest and the smallest eigenvectors of M as the keys in Fig . 7b . While a concrete human study is needed , the visual results suggest that using eigenvectors of M is a promising approach to segmenting the space of keys according to their induced generation quality . | Fake content produced by generative models is of great concerns. This paper investigates attribution techniques to identify models that generated the content. The key theoretic result is the derivation of the sufficient conditions for decentralized attribution and the design of keys following these conditions. Thee paper shows that decentralized attribution can be achieved when keys are orthogonal to each other, and belonging to a subspace determined by the data distribution. Results are validated on two datasets, MNIST and CelebA. | SP:8b44a01fccccbcbe0b91b819c1525b30693a7bd8 |
Decentralized Attribution of Generative Models | 1 INTRODUCTION Recent advances in generative models ( Goodfellow et al. , 2014 ) have enabled the creation of synthetic contents that are indistinguishable even by naked eyes ( Pathak et al. , 2016 ; Zhu et al. , 2017 ; Zhang et al. , 2017 ; Karras et al. , 2017 ; Wang et al. , 2018 ; Brock et al. , 2018 ; Miyato et al. , 2018 ; Choi et al. , 2018 ; Karras et al. , 2019a ; b ; Choi et al. , 2019 ) . Such successes raised serious concerns regarding emerging threats due to the applications of generative models ( Kelly , 2019 ; Breland , 2019 ) . This paper is concerned about two particular types of threats , namely , malicious personation ( Satter , 2019 ) , and digital copyright infringement . In the former , the attacker uses generative models to create and disseminate inappropriate or illegal contents ; in the latter , the attacker steals the ownership of a copyrighted content ( e.g. , an art piece created through the assistance of a generative model ) by making modifications to it . We study model attribution , a solution that may address both threats . Model attribution is defined as the identification of user-end models where the contents under question are generated from . Existing ∗Equal contribution . 1https : //github.com/ASU-Active-Perception-Group/decentralized_ attribution_of_generative_models studies demonstrated empirical feasibility of attribution through a centralized classifier trained on all existing user-end models ( Yu et al. , 2018 ) . However , this approach is not scalable in reality where the number of models ever grows . Neither does it provide an attributability guarantee . To this end , we propose in this paper a decentralized attribution scheme : Instead of a centralized classifier , we use a set of binary linear classifiers associated with each user-end model . Each classifier is parameterized by a user-specific key and distinguishes its associated model distribution from the authentic data distribution . For correct attribution , we expect one-hot classification outcomes for generated contents , and a zero vector for authentic data . To achieve correct attribution , we study the sufficient conditions of the user-specific keys that guarantee an attributability lower bound . The resultant conditions are used to develop an algorithm for computing the keys . Lastly , we assume that attackers can post-process generated contents to potentially deny the attribution , and study the tradeoff between generation quality and robustness of attribution against post-processes . Problem formulation We assume that for a given dataset D ⊂ Rdx , the registry generates userspecific keys , Φ : = { φ1 , φ2 , ... } where φi ∈ Rdx and ||φi|| = 1 . || · || is the l2 norm . A user-end generative model is denoted by Gφ ( · ; θ ) : Rdz → Rdx where z and x are the latent and output variables , respectively , and θ are the model parameters . When necessary , we will suppress θ and φ to reduce the notational burden . The dissemination of the user-end models is accompanied by a public service that tells whether a query content belongs to Gφ ( labeled as 1 ) or not ( labeled as −1 ) . We model the underlying binary linear classifier as fφ ( x ) = sign ( φTx ) . Note that linear models are necessary for the development of sufficient conditions of attribution presented in this paper , although sufficient conditions for nonlinear classifiers are worth exploring in the future . The following quantities are central to our investigation : ( 1 ) Distinguishability of Gφ measures the accuracy of fφ ( x ) at classifying Gφ against D : D ( Gφ ) : = 1 2 Ex∼PGφ , x0∼PD [ 1 ( fφ ( x ) = 1 ) + 1 ( fφ ( x0 ) = −1 ) ] . ( 1 ) Here PD is the authentic data distribution , and PGφ the user-end distribution dependent on φ. G is ( 1 − δ ) -distinguishable for some δ ∈ ( 0 , 1 ] when D ( G ) ≥ 1 − δ . ( 2 ) Attributability measures the averaged multi-class classification accuracy of each model distribution over the collection G : = { Gφ1 , ... , GφN } : A ( G ) : = 1 N N∑ i=1 Ex∼Gφi1 ( φ T j x < 0 , ∀ j 6= i , φTi x > 0 ) . ( 2 ) G is ( 1 − δ ) -attributable when A ( G ) ≥ 1 − δ . ( 3 ) Lastly , We denote by G ( · ; θ0 ) ( or shortened as G0 ) the root model trained on D , and assume PG0 = PD . We will measure the ( lack of ) generation quality ofGφ by the FID score ( Heusel et al. , 2017 ) and the l2 norm of the mean output perturbation : ∆x ( φ ) = Ez∼Pz [ Gφ ( z ; θ ) −G ( z ; θ0 ) ] , ( 3 ) where Pz is the latent distribution . This paper investigates the following question : What are the sufficient conditions of keys so that the user-end generative models can achieve distinguishability individually and attributability collectively , while maintaining their generation quality ? Contributions We claim the following contributions : 1 . We develop sufficient conditions of keys for distinguishability and attributability , which connect these metrics with the geometry of the data distribution , the angles between keys , and the generation quality . 2 . The sufficient conditions lead to simple design rules for the keys : keys should be ( 1 ) data compliant , i.e. , φTx < 0 for x ∼ PD , and ( 2 ) orthogonal to each other . We validate these rules using DCGAN ( Radford et al. , 2015 ) and StyleGAN ( Karras et al. , 2019a ) on benchmark datasets including MNIST ( LeCun & Cortes , 2010 ) , CelebA ( Liu et al. , 2015 ) , and FFHQ ( Karras et al. , 2019a ) . See Fig . 1 for a visualization of the attributable distributions perturbed from the authentic FFHQ dataset . 3 . We empirically test the tradeoff between generation quality and robust attributability under random post-processes including image blurring , cropping , noising , JPEG conversion , and a combination of all . 2 SUFFICIENT CONDITIONS FOR ATTRIBUTABILITY . From the definitions ( Eq . ( 1 ) and Eq . ( 2 ) ) , achieving distinguishability is necessary for attributability . In the following , we first develop the sufficient conditions for distinguishability through Proposition 1 and Theorem 1 , and then those for attributability through Theorem 2 . Distinguishability through watermarking First , consider constructing a user-end model Gφ by simply adding a perturbation ∆x to the outputs of the root model G0 . Assuming that φ is datacompliant , this model can achieve distinguishability by solving the following problem with respect to ∆x : min ||∆x||≤ε Ex∼PD [ max { 1− φT ( x+ ∆x ) , 0 } ] , ( 4 ) where ε > 0 represents a generation quality constraint . The following proposition reveals the connection between distinguishability , data geometry , and generation quality ( proof in Appendix A ) : Proposition 1 . Let dmax ( φ ) : = maxx∼PD |φTx| . If ε ≥ 1 + dmax ( φ ) , then ∆x∗ = ( 1 + dmax ( φ ) ) φ solves Eq . ( 4 ) , and fφ ( x+ ∆x∗ ) > 0 , ∀ x ∼ PD . Watermarking through retraining user-end models The perturbation ∆x∗ can potentially be reverse engineered and removed when generative models are white-box to users ( e.g. , when models are downloaded by users ) . Therefore , we propose to instead retrain the user-end models Gφ using the perturbed datasetDγ , φ : = { G0 ( z ) +γφ | z ∼ Pz } with γ > 0 , so that the perturbation is realized through the model architecture and weights . Specifically , the retraining fine-tunes G0 so that Gφ ( z ) matches with G0 ( z ) + γφ for z ∼ Pz . Since this matching will not be perfect , we use the following model to characterize the resultant Gφ : Gφ ( z ) = G0 ( z ) + γφ+ , ( 5 ) where the error ∼ N ( µ , Σ ) . In Sec . 3 we provide statistics of µ and Σ on the benchmark datasets , to show that the retraining captures the perturbations well ( µ close to 0 and small variances in Σ ) . Updating Proposition 1 due to the existence of leads to Theorem 1 , where we show that γ needs to be no smaller than dmax ( φ ) in order for Gφ to achieve distinguishability ( proof in Appendix B ) : Theorem 1 . Let dmax ( φ ) = maxx∈D |φTx| , σ2 ( φ ) = φTΣφ , δ ∈ [ 0 , 1 ] , and φ be a data-compliant key . D ( Gφ ) ≥ 1− δ/2 if γ ≥ dmax ( φ ) + σ ( φ ) √ log ( 1 δ2 ) − φTµ . ( 6 ) Remarks The computation of σ ( φ ) requires Gφ , which in turn requires γ . Therefore , an iterative search is needed to determine γ that is small enough to limit the loss of generation quality , yet large enough for distinguishability ( see Alg . 1 ) . Attributability We can now derive the sufficient conditions for attributability of the generative models from a set of N keys ( proof in Appendix C ) : Theorem 2 . Let dmin = minx∈D |φTx| , dmax = maxx∈D |φTx| , σ2 ( φ ) = φTΣφ , δ ∈ [ 0 , 1 ] . Let a ( φ , φ′ ) : = −1 + dmax ( φ ′ ) + dmin ( φ ′ ) − 2φ′Tµ σ ( φ′ ) √ log ( 1 δ2 ) + dmax ( φ′ ) − φ′Tµ , ( 7 ) for keys φ and φ′ . Then A ( G ) ≥ 1−Nδ , if D ( G ) ≥ 1− δ for all Gφ ∈ G , and φTφ′ ≤ a ( φ , φ′ ) ( 8 ) for any pair of data-compliant keys φ and φ′ . Remarks When σ ( φ′ ) is negligible for all φ′ and µ = 0 , a ( φ , φ′ ) is approximately dmin ( φ ′ ) /dmax ( φ ′ ) > 0 , in which case φTφ′ ≤ 0 is sufficient for attributability . In Sec . 3 we empirically show that this approximation is plausible for the benchmark datasets . 3 EXPERIMENTS AND ANALYSIS . In this section we test Theorem 1 , provide empirical support for the orthogonality of keys , and present experimental results on model attribution using MNIST , CelebA , and FFHQ . Note that tests on the theorems require estimation of Σ , which is costly for models with high-dimensional outputs , and therefore are only performed on MNIST and CelebA . Key generation We generate keys by iteratively solving the following convex problem : φi = arg min φ Ex∼PD , G0 [ max { 1 + φTx , 0 } ] + i−1∑ j=1 max { φTj φ , 0 } . ( 9 ) The orthogonality penalty is omitted for the first key . The solutions are normalized to unit l2 norm before being inserted into the next problem . We note that PD and PG0 do not perfectly match in practice , and therefore we draw with equal chance from both distributions during the computation . G0s are trained using the standard DCGAN architecture for MNIST and CelebA , and StyleGAN for FFHQ . Training details are deferred to Appendix D. User-end generative models The training of Gφ follows Alg . 1 , where γ is iteratively tuned to balance generation quality and distinguishability . For each γ , we collect a perturbed dataset Dγ , φ and solve the following training problem : min θ E ( z , x ) ∼Dγ , φ [ ||Gφ ( z ; θ ) − x||2 ] , ( 10 ) starting from θ = θ0 . If the resultant model does not meet the distinguishability requirement due to the discrepancy between Dγ , φ and Gφ , the perturbation is updated as γ = αγ . In experiments , we use a standard normal distribution for Pz , and set δ = 10−2 and α = 1.1 . Validation of Theorem 1 Here we validate the sufficient condition for distinguishability . Fig . 2a compares the LHS and RHS values of Eq . ( 6 ) for 100 distinguishable user-end models . The empirical distinguishability of these models are reported in Fig . 2e . Calculation of the RHS of Eq . ( 6 ) requires estimations of µ and Σ . To do this , we sample ( z ) = Gφ ( z ; θ ) −G ( z ; θ0 ) − γφ ( 11 ) using 5000 samples of z ∼ Pz , where Gφ and γ are derived from Alg . 1 . Σ and µ are then estimated for each φ . Fig . 2c and d present histograms of the elements in µ and Σ for two user-end models of the benchmark datasets . Results in Fig . 2a show that the sufficient condition for distinguishability ( Eq . ( 6 ) ) is satisfied for most of the sampled models through the training specified in Alg . 1 . Lastly , we notice that the LHS values for MNIST are farther away from the equality line than those for CelebA . This is because the MNIST data distribution resides at corners of the unit box . Therefore perturbations of the distribution are more likely to exceed the bounds for pixel values . Clamping of these invalid pixel values reduces the effective perturbation length . Therefore to achieve distinguishability , Alg . 1 seeks γs larger than needed . This issue is less observed in CelebA , where data points are rarely close to the boundaries . Fig . 2g present the values of γs of all user-end models . Algorithm 1 : Training ofGφ input : φ , G0 output : Gφ , γ 1 set γ = dmax ( φ ) ; 2 collect Dγ , φ ; 3 train Gφ by solving Eq . ( 10 ) using Dγ , φ ; 4 compute empirical D ( Gφ ) ; 5 if D ( Gφ ) < 1− δ then 6 set γ = αγ ; 7 goto step 2 ; 8 end Validation of Theorem 2 Recall that from Theorem 2 , we recognized that orthogonal keys are sufficient . To support this design rule , Fig . 2b presents the minimum RHS values of Eq . ( 8 ) for 100 user-end models . Specifically , for each φi , we compute a ( φi , φj ) ( Eq . ( 7 ) ) using φj for j = 1 , ... , i − 1 and report minj a ( φi , φj ) , which sets an upper bound on the angle between φi and all existing φs . The resultant minj a ( φi , φj ) are all positive for MNIST and close to zero for CelebA . From this result , an angle of ≥ 94 deg , instead of 90 deg , should be enforced between any pairs of keys for CelebA . However , since the conditions are sufficient , orthogonal keys still empirically achieve high attributability ( Fig . 2f ) , although improvements can be made by further increasing the angle between keys . Also notice that the current computation of keys ( Eq . ( 9 ) ) does not enforce a hard constraint on orthogonality , leading to slightly acute angles ( 87.7 deg ) between keys for CelebA ( Fig . 2h ) . On the other hand , the positive values in Fig . 2b for MNIST suggests that further reducing the angles between keys is acceptable if one needs to increase the total capacity of attributable models . However , doing so would require the derivation of new keys to rely on knowledge about all existing user-end models ( in order to compute Eq . ( 7 ) ) . Empirical results on benchmark datasets Tab . 1 reports the metrics of interest measured on the 100 user-end models for each of MNIST and CelebA , and 20 models for FFHQ . All models are trained to be distinguishable . And by utilizing Theorem 2 , they also achieve high attributability . As a comparison , we demonstrate results where keys are 45 deg apart ( φTφ′ = 0.71 ) using a separate set of 20 user-end models for each of MNIST and CelebA , and 5 models for FFHQ , in which case distinguishability no longer guarantees attributability . Regarding generation quality , Gφs receive worse FID scores than G0 due to the perturbations . We visualize samples from user-end models and the corresponding keys in Fig . 3 . Note that for human faces , FFHQ in particular , the perturbations create light shades around eyes and lips , which is an unexpected but reasonable result . Attribution robustness vs. generation quality We now consider the scenario where outputs of the generative models are post-processed ( e.g. , by adversaries ) before being attributed . When the post-processes are known , we can take counter measures through robust training , which intuitively will lead to additional loss of generation quality . To assess this tradeoff between robustness and generation quality , we train Gφ against post-processes T : Rdx → Rdx from a distribution PT . Due to the potential nonlinearity of T and the lack of theoretical guarantee in this scenario , we resort to the following robust training problem for deriving the user-end models : min θi Ez∼Pz , T∈PT [ max { 1− fφi ( T ( Gφi ( z ; θi ) ) ) , 0 } + C||G0 ( z ) −Gφi ( z ; θi ) ||2 ] , ( 12 ) where C is the hyper-parameter for generation quality . Detailed analysis and comparison for selecting C are provided in Appendix E. We consider five types of post-processes : blurring , cropping , noise , JPEG conversion and the combination of these four . Examples of the post-processed images are shown in Fig . 5 . Blurring uses Gaussian kernel widths uniformly drawn from 1 3 { 1 , 3 , 5 , 7 , 9 } . Cropping crops images with uniformly drawn ratios between 80 % and 100 % , and scales the cropped images back to the original size using bilinear interpolation . Noise adds white noise with standard deviation uniformly drawn from [ 0 , 0.3 ] . JPEG applies JPEG compression . Combination performs each attack with a 50 % chance in the order of Blurring , Cropping , Noise and JPEG . For differentiability , we use existing implementations of differentiable blurring ( Riba et al . ( 2020 ) ) and JPEG conversion ( Zhu et al . ( 2018 ) ) . For robust training , we apply the post-process to mini-batches with 50 % probability . We performed comprehensive tests using DCGAN ( on MNIST and CelebA ) , PGAN ( on CelebA ) , and CycleGAN ( on Cityscapes ) . Tab . 2 summarizes the average distinguishability , the attributability , the perturbation length ||∆x|| , and the FID score with and without robust training of Gφ . Results are based on 20 models for each architecture-dataset pair , where keys are kept orthogonal and data compliant . From the results , defense against these post-processes can be achieved , except for Combination . Importantly , there is a clear tradeoff between robustness and generation quality . This can be seen from Fig . 5 , which compares samples with7 and without robust training from the tested models and datasets . Lastly , it is worth noting that the training formulation in Eq . ( 12 ) can also be applied to the training of non-robust user-end models in place of Eq . ( 10 ) . However , the resultant model from Eq . ( 12 ) can not be characterized by Eq . ( 5 ) with small µ and Σ , i.e. , due to the nonlinearity of the training process of Eq . ( 12 , the user-end model distribution is deformed while it is perturbed . This resulted in unsuccessful validation of the theorems , which led to the adoption of Eq . ( 10 ) for theorem-consistent training . Therefore , while the empirical results show feasibility of achieving robust attributability using Eq . ( 12 , counterparts to Theorems 1 and 2 in this nonlinear setting are yet to be developed . Capacity of keys For real-world applications , we hope to maintain attributability for a large set of keys . Our study so far suggests that the capacity of keys is constrained by the data compliance and orthogonality requirements . While the empirical study showed the feasibility of computing keys through Eq . ( 9 ) , finding the maximum number of feasible keys is a problem about optimal sphere packing on a segment of the unit sphere ( Fig . 4 ) . To explain , the unit sphere represents the identifiability requirement ||φ|| = 1 . The feasible segment of the unit sphere is determined by the data compliance and generation quality constraints . And the spheres to be packed have radii following the sufficient condition in Theorem 2 . Such optimal packing problems are known open challenges ( Cohn et al . ( 2017 ) ; Cohn ( 2016 ) ) . For real-world applications where a capacity of attributable models is needed ( which is the case for both malicious personation and copyright infringement set- tings ) , it is necessary to find approximated solutions to this problem . Generation quality control From Proposition 1 and Theorem 1 , the inevitable loss of generation quality is directly related to the length of perturbation ( γ ) , which is related to dmax . Fig . 6 compares outputs from user-end models with different dmaxs . While it is possible to filter φs based on their corresponding dmaxs for generation quality control , here we discuss a potential direction for prescribing a subspace of φs within which quality can be controlled . To start , we denote by J ( x ) the Jacobian of G0 with respect to its generator parameters θ0 . Our discussion is related to the matrix M = Ex∼PG0 [ J ( x ) ] Ex∼PG0 [ J ( x ) T ] . A spectral analysis of M reveals that the eigenvectors of M with large eigenvalues are more structured than those with small ones ( Fig . 7 ( a ) ) . This finding is consistent with the definition of M : The largest eigenvectors of M represent the principal axes of all mean sensitivity vectors , where the mean is taken over the latent space . For MNIST , these eigenvectors overlap with the digits ; for CelebA , they are structured color patterns . On the other hand , the smallest eigenvectors represent directions rarely covered by the sensitivity vectors , thus resembling random noise . Based on this finding , we test the hypothesis that keys more aligned with the eigenspace of the small eigenvalues will have smaller dmax . We test this hypothesis by computing the Pearson correlations between dmax and φTMφ using 100 models for each of MNIST and CelebA . The resultant correlations are 0.33 and 0.53 , respectively . In addition , we compare outputs from models using the largest and the smallest eigenvectors of M as the keys in Fig . 7b . While a concrete human study is needed , the visual results suggest that using eigenvectors of M is a promising approach to segmenting the space of keys according to their induced generation quality . | This paper proposes a decentralized attribution to the generative model trained on the same dataset. The goal is to distinguish the user-end generative models, and thus facilitates the IP-protection. The idea is to use orthogonal keys to distinguish the generated samples from authentic data. Furthermore, this paper provided theoretic insights into the proposed method. Experimental results on MNIST and CelebA datasets backup the claims. | SP:8b44a01fccccbcbe0b91b819c1525b30693a7bd8 |
Meta-GMVAE: Mixture of Gaussian VAE for Unsupervised Meta-Learning | 1 INTRODUCTION . Unsupervised learning is one of the most fundamental and challenging problems in machine learning , due to the absence of target labels to guide the learning process . Thanks to the enormous research efforts , there now exist many unsupervised learning methods that have shown promising results on real-world domains , including image recognition ( Le , 2013 ) and natural language understanding ( Ramachandran et al. , 2017 ) . The essential goal of unsupervised learning is obtaining meaningful feature representations that best characterize the data , which can be later utilized to improve the performance of the downstream tasks , by training a supervised task-specific model on the top of the learned representations ( Reed et al. , 2014 ; Cheung et al. , 2015 ; Chen et al. , 2016 ) or fine-tuning the entire pre-trained models ( Erhan et al. , 2010 ) . Meta-learning , whose objective is to learn general knowledge across diverse tasks , such that the learned model can rapidly adapt to novel tasks , shares the spirit of unsupervised learning in that both seek more efficient and effective learning procedure over learning from scratch . However , the essential difference between the two is that most meta-learning approaches have been built on the supervised learning scheme , and require human-crafted task distributions to be applied in fewshot classification . Acquiring labeled dataset for meta-training may require a massive amount of human efforts , and more importantly , meta-learning limits its applications to the pre-defined task distributions ( e.g . classification of specific set of classes ) . Two recent works have proposed unsupervised meta-learning that can bridge the gap between unsupervised learning and meta-learning by focusing on constructing supervised tasks with pseudo-labels from the unlabeled data . To do so , CACTUs ( Hsu et al. , 2019 ) clusters data in the embedding space learned with several unsupervised learning methods , while UMTRA ( Khodadadeh et al. , 2019 ) assumed that each randomly drawn sample represents a different class and augmented each pseudoclass with data augmentation ( Cubuk et al. , 2018 ) . After constructing the meta-training dataset with such heuristics , they simply apply supervised meta-learning algorithms as usual . Despite the success of the existing unsupervised meta-learning methods , they are fundamentally limited , since 1 ) they only consider unsupervised learning for heuristic pseudo-labeling of unlabeled data , and 2 ) the two-stage approach makes it impossible to recover from incorrect pseudo-class assignment when learning the unsupervised representation space . In this paper , we propose a principled unsupervised meta-learning model based on Variational Autoencoder ( VAE ) ( Kingma & Welling , 2014 ) and set-level variational inference using self-attention ( Vaswani et al. , 2017 ) . Moreover , we introduce multi-modal prior distributions , a mixture of Gaussians ( GMM ) , assuming that each modality represents each class-concept in any given tasks . Then the parameter of GMM is optimized by running Expectation-Maximization ( EM ) on the observations sampled from the set-dependent variational posterior . In this framework , however , there is no guarantee that each modality obtained from EM algorithm corresponds to a label . To realize modality as label , we deploy semi-supervised EM at meta-test time , considering the support set and query set as labeled and unlabeled observations , respectively . We refer to our method as Meta-Gaussian Mixture Variational Autoencoders ( Meta-GMVAE ) ( See Figure 1 for high-level concept ) . While our method can be used as a full generative model for generating the samples ( images ) , the ability to generalize to generate samples may not be necessary for capturing the meta-knowledge for non-generative downstream tasks . Thus , we propose another version of Meta-GMVAE that reconstructs high-level features learned by unsupervised representation learning approaches ( e.g . Chen et al . ( 2020 ) ) . To investigate the effectiveness of our framework , we run experiments on two benchmark fewshot image classification datasets , namely Omiglot ( Lake et al. , 2011 ) and Mini-Imagenet ( Ravi & Larochelle , 2017 ) . The experimental results show that our Meta-GMVAE obtains impressive performance gains over the relevant unsupervised meta-learning baselines on both datasets , obtaining even better accuracy than fully supervised MAML ( Finn et al. , 2017 ) while utilizing as small as 0.1 % of the labeled data on one-shot settings in Omniglot dataset . Moreover , our model can generalize to classification tasks with different number of ways ( classes ) without loss of accuracy . Our contribution is threefold : • We propose a novel unsupervised meta-learning model , namely Meta-GMVAE , which metalearns the set-conditioned prior and posterior network for a VAE . Our Meta-GMVAE is a principled unsupervised meta-learning method , unlike existing methods on unsupervised meta-learning that combines heuristic pseudo-labeling with supervised meta-learning . • We propose to learn the multi-modal structure of a given dataset with the Gaussian mixture prior , such that it can adapt to a novel dataset via the EM algorithm . This flexible adaptation to a new task , is not possible with existing methods that propose VAEs with Gaussian mixture priors for single task learning . • We show that Meta-GMVAE largely outperforms relevant unsupervised meta-learning baselines on two benchmark datasets , while obtaining even better performance than a supervised metalearning model under a specific setting . We further show that Meta-GMVAE can generalize to classification tasks with different number of ways ( classes ) . 2 RELATED WORK . Unsupervised learning Many prior unsupervised learning methods have developed proxy objectives which is either based on reconstruction ( Vincent et al. , 2010 ; Higgins et al. , 2017 ) , adversarially obtained image fidelity ( Radford et al. , 2016 ; Salimans et al. , 2016 ; Donahue et al. , 2017 ; Dumoulin et al. , 2017 ) , disentanglement ( Bengio et al. , 2013 ; Reed et al. , 2014 ; Cheung et al. , 2015 ; Chen et al. , 2016 ; Mathieu et al. , 2016 ; Denton & Birodkar , 2017 ; Kim & Mnih , 2018 ; Ding et al. , 2020 ) , clustering ( Coates & Ng , 2012 ; Krähenbühl et al. , 2016 ; Bojanowski & Joulin , 2017 ; Caron et al. , 2018 ) , or contrastive learning ( Chen et al. , 2020 ) . In the unsupervised learning literature , the most relevant work to ours are methods that use Gaussian Mixture priors for variational autoencoders . Dilokthanakul et al . ( 2016 ) ; Jiang et al . ( 2017 ) consider single task learning and therefore , the learned prior parameter is fixed after training , and thus can not adapt to new tasks . CURL ( Rao et al. , 2019 ) learns a network that outputs Gaussian mixture priors over a sequence of tasks for unsupervised continual learning . However CURL can not adapt to a new task without training on it , while our framework can generalize to a new task without any training , via amortized inference with a dataset ( task ) encoder . Also , our model does not learn Gaussian mixture priors but rather obtain them on the fly using the expectation-maximization algorithm . Meta-learning Meta-learning ( Thrun & Pratt , 1998 ) shares the intuition of unsupervised learning in that it aims to improve the model performance on an unseen task by leveraging prior knowledge , rather than learning from scratch . While the literature on meta-learning is vast , we only discuss relevant existing works for few-shot image classification . Metric-based meta-learning ( Koch et al. , 2015 ; Vinyals et al. , 2016 ; Snell et al. , 2017 ; Oreshkin et al. , 2018 ; Mishra et al. , 2018 ) is one of the most popular approaches , where it learns to embed the data instances of the same class to be closer in the shared embedding space . One can measure the distance in the embedding space by cosine similarity ( Vinyals et al. , 2016 ) , or Euclidean distance ( Snell et al. , 2017 ) . On the other hand , gradient-based meta-learning ( Finn et al. , 2017 ; 2018 ; Li et al. , 2017 ; Lee & Choi , 2018 ; Ravi & Beatson , 2019 ; Flennerhag et al. , 2020 ) aims at learning a global initialization of parameters , which can rapidly adapt to a novel task with only a few gradient steps . Moreover , some previous works ( Hewitt et al. , 2018 ; Edwards & Storkey , 2017 ; Garnelo et al. , 2018 ) tackle meta-learning by modeling the set-dependent variational posterior with a single global latent variable , however , we model the variational posterior conditioned on each data instances . Moreover , while all of these works assume supervised learning scenarios where one has access to full labels in meta-training stage , we focus on unsupervised setting in this paper . Unsupervised meta-learning One of the main limitations of conventional meta-learning methods is that their application is strictly limited to the tasks from a pre-defined task distribution . A few works ( Hsu et al. , 2019 ; Khodadadeh et al. , 2019 ) have been proposed to resolve this issue by combining unsupervised learning with meta-learning . The main idea is to construct meta-training dataset in an unsupervised manner by leveraging existing supervised meta-learning models . CACTUs ( Hsu et al. , 2019 ) deploy several deep metric learning ( Berthelot et al. , 2019 ; Donahue et al. , 2017 ; Caron et al. , 2018 ; Chen et al. , 2016 ) to episodically cluster the unlabeled dataset , and then train MAML ( Finn et al. , 2017 ) and Prototypical Networks ( Snell et al. , 2017 ) on the constructed data . UMTRA ( Khodadadeh et al. , 2019 ) assumes that each randomly drawn sample is from a different class from others , and use data augmentation ( Cubuk et al. , 2018 ) to construct synthetic task distribution for meta-training . Instead of only deploying unsupervised learning for constructing meta-training task distributions , we propose an unsupervised meta-learning model that meta-learns set-level variational posterior by matching the multi-modal prior distribution representing latent classes . 3 UNSUPERVISED META-LEARNING WITH META-GMVAES . In this section , we describe our problem setting with respect to unsupervised meta-learning , and demonstrate our approach . The graphical illustration of our model for unsupervised meta-training and supervised meta-test is depicted in Figure 2 . 3.1 PROBLEM STATEMENT . Our goal is to learn unsupervised feature representations which can be transferred to wide range of downstream few-shot classification tasks . As suggested by Hsu et al . ( 2019 ) ; Khodadadeh et al . ( 2019 ) , we only assume an unlabeled dataset Du = { xu } Uu=1 in the meta-training stage . We aim toward applying the knowledge learned during unsupervised meta-training stage to novel tasks in meta-test stage , which comes with a modest amount of labeled data ( or as few as a single example per class ) for each task . As with most meta-learning methods , we further assume that the labeled data are drawn from the same distribution as that of the unlabeled data , with a different set of classes . Specifically , the goal of a K-way S-shot classification task T is to correctly predict the labels of query data points Q = { xq } Qq=1 , using S support data points and labels S = { ( xs , ys ) } Ss=1 per class , where S is relatively small ( i.e . between 1 and 50 ) . 3.2 META-LEVEL GAUSSIAN MIXTURE VAE . Unsupervised meta-training We now describe the meta-learning framework for learning unsupervised latent representations that can be transferred to human-designed few-shot image-classification tasks . In particular , we aim toward learning multi-modal latent spaces for Variational Autoencoder ( VAE ) in an episodic manner . We use the Gaussian mixture for the prior distribution pψ ( z ) = ∑K k=1 pψ ( y = k ) pψ ( z|y = k ) , where ψ is the parameter of the prior network . Then the generative process can be described as follows : • y ∼ pψ ( y ) , where y corresponds to the categorical L.V . for a single mode . • z ∼ pψ ( z|y ) , where z corresponds to the Gaussian L.V . responsible for data generation . • x ∼ pθ ( x|z ) , where θ is the parameter of the generative model . The above generative process is similar to those from the previous works ( Dilokthanakul et al. , 2016 ; Jiang et al. , 2017 ) on modeling the VAE prior with Gaussian mixtures . However , they target single-task learning and the parameter of the prior network is fixed after training such as equation 1c in Dilokthanakul et al . ( 2016 ) and equation 5 in Jiang et al . ( 2017 ) , which is suboptimal since a meta-learning model should be able to adapt and generalize to a novel task . To learn the set-dependent multi-modalities , we further assume that there exists a parameter ψi for each episodic datasetDi = { xj } Mj=1 , which is randomly drawn from the unlabeled datasetDu . Then we derive the variational lower bound for the marginal log-likelihood of Di as follows : log pθ ( Di ) = M∑ j=1 log pθ ( xj ) = M∑ j=1 log ∫ pθ ( xj |zj ) pψi ( zj ) qφ ( zj |xj , Di ) qφ ( zj |xj , Di ) dzj ( 1 ) ≥ M∑ j=1 [ Ezj∼qφ ( zj |xj , Di ) [ log pθ ( xj |zj ) + log pψi ( zj ) − log qφ ( zj |xj , Di ) ) ] ] ( 2 ) ≈ M∑ j=1 1 N N∑ n=1 [ log pθ ( xj |z ( n ) j ) + log pψi ( z ( n ) j ) − log qφ ( z ( n ) j |xj , Di ) ] ( 3 ) = : L ( θ , φ , ψi , Di ) , z ( n ) j i.i.d∼ qφ ( zj |xj , Di ) . ( 4 ) Here the lower bound for each datapoint is approximated by Monte Carlo estimation with the sample size N . Following the convention of the VAE literature , we assume that the variational posterior qφ ( zj |xj , Di ) follows an isotropic Gaussian distribution . Algorithm 1 Meta-training Require : An unlabeled dataset Du 1 : Initialize parameters θ , φ 2 : while not done do 3 : Sample B episode datasets { Di } Bi=1 from Du 4 : for all i ∈ [ 1 , B ] do 5 : Draw n MC samples from qφ ( zj |xj , Di ) 6 : Initialize πk as 1/K and randomly choose K different points for µk . 7 : Compute optimal parameter ψ∗i using Eq 7 8 : end for 9 : Update θ , φ using L ( θ , φ , { Di } Bi=1 ) in Eq 9 . 10 : end while Algorithm 2 Meta-test for an episode Require : A test task T = S ∪ Q 1 : Set D = { xs } Ss=1 ∪ { xq } Qq=1 2 : Draw n MC samples from qφ ( zj |xj , D ) 3 : Initialize µk = ∑S , N s , n=1 1y ( n ) s =k z ( n ) s∑S , N s , n=1 1y ( n ) s =k and σ2k = I 4 : Compute optimal parameter ψ∗ using Eq 10 5 : Compute p ( yq|xq , D ) using Eq 11 6 : Infer the label yq = argmax k p ( yq = k|xq , D ) 7 : 8 : Set-dependent variational posterior Our derivation of the evidence lower bound in Eq 4 is similar to that of the hierarchical VAE framework , such as equation 3 in Edwards & Storkey ( 2017 ) and equation 4 in Hewitt et al . ( 2018 ) , in that we use the i.i.d assumption that the log likelihood of a dataset equals the sum over the log-likelihoods of each individual data point . Yet , previous works assume that each input set consists of data instances from a single concept ( e.g . a class ) , therefore , they encode the dataset into a single global latent variable ( e.g . qφ ( z|D ) ) . This is not appropriate for unsupervised meta-learning where labels are unavailable . Thus we learn a set-conditioned variational posterior qφ ( zj |xj , Di ) , which models a latent variable to encode each data xj within the given datasetDi into the latent space . Specifically , we model the variational posterior qφ ( zj |xj , Di ) using the self-attention mechanism ( Vaswani et al. , 2017 ) as follows : H = TransformerEncoder ( f ( Di ) ) µj =WµHj + bµ , σ 2 j = exp ( Wσ2Hj + bσ2 ) qφ ( zj |xj , Di ) = N ( zj ; µj , σ2j ) ( 5 ) Here we deploy TransformerEncoder ( · ) , a neural network based on the multi-head self-attention mechanism proposed by Vaswani et al . ( 2017 ) , to model the dependency between data instances , and f is a convolutional neural network ( or an identity function for the Mini-ImageNet ) which takes each data in Di as an input . Moreover , we use the reparameterization trick ( Kingma & Welling , 2014 ) to train the model with backpropagation since the stochastic sampling process z ( n ) j i.i.d∼ qφ ( zj |xj , Di ) is non-differentiable . Expectation Maximization As discussed before , we assume that the parameter ψi of the prior Gaussian Mixture is task-specific and characterizes the given dataset Di . To obtain the task-specific parameter that optimally explain the given dataset , we propose to locally maximize the lower bound in Eq 4 with respect to the prior parameter ψi . We can obtain the optimal parameter ψ∗i by solving the following optimization problem : ψ∗i = argmax ψi L ( θ , φ , ψi , Di ) = argmax ψi M , N∑ j , n=1 log pψ ( z ( n ) j ) , z ( n ) j i.i.d∼ qφ ( zj |xj , Di ) , ( 6 ) where we only consider the term related to the task-specific parameter ψi , and eliminate the normalization term 1N since it does not change the solution of the optimization problem . The above formula implies that the optimal parameter maximizes the log-likelihood of observations which can be drawn from the variational posterior distribution . However , we do not have an analytic solution for Maximum Likelihood Estimation ( MLE ) of a GMM . The most prevalent approach for estimating the parameters for the mixture of Gaussian is solving it with Expectation Maximization ( EM ) algorithm . To this end , we propose to optimize the taskspecific parameter of GMM prior distribution using EM algorithm as follows : ( E-step ) Qj , n ( k ) : = p ( y ( n ) j = k|z ( n ) j ) = πkN ( z ( n ) j ; µk , I ) ∑ k πkN ( z ( n ) j ; µk , I ) ( M-step ) µk : = ∑M , N j , n=1Qj , n ( k ) z ( n ) j∑M , N j , n=1Qj , n ( k ) , πk : = ∑M , N j , n=1Qj , n ( k ) ∑K k=1 ∑M , N j , n=1Qj , n ( k ) ψi : = { ( µk , I , πk ) } Kk=1 , ( 7 ) where πk , µk , and N ( · ) denote the mixing probability of k-th component , mean parameter , and normal distribution , respectively . We assume that the covariance matrix of Gaussian distribution is fixed with the identity matrix I , following the assumption of original VAE on the prior distribution . We initialize { πk } Kk=1 and { µk } Kk=1 as 1K and randomly drawn K different points , respectively . We can obtain MLE solution for the parameters of GMM , by iteratively performing E-step and M-step until the log-likelihood converges . We found that using a fixed number of iterations for the EM algorithm does not degrade the performance , and consider it as a hyperparameter of our framework . Training objective Note that we want to maximize the variational lower bound of the marginal loglikelihood over all the episode datasets Di that can be sampled from Du . We use stochastic gradient ascent with respect to the variational parameter φ and the generative parameter θ , to maximize the following objective : L ( θ , φ , { Di } Bi=1 ) : = 1 B B∑ i=1 [ max ψi L ( θ , φ , ψi , Di ) ] ( 8 ) = 1 B B∑ i=1 M∑ j=1 1 N N∑ n=1 [ log pθ ( xj |z ( n ) j ) + log pψ∗i ( z ( n ) j ) − log qφ ( z ( n ) j |xj , Di ) ] . ( 9 ) Here we use B mini-batch of episode datasets , where each dataset consists of M datapoints . The task-specific parameter ψ∗i for each episode dataset Di is obtained by EM algorithm in Eq 7 . Supervised meta-test By introducing the multi-modal prior distribution into a generative learning framework , our model learns pseudo-class concepts by clustering latent features with EM algorithm . However , there is no guarantee that each modality obtained by EM algorithm corresponds to the label we are interested in at the meta-test stage . To realize modality as label in downstream fewshot image classification tasks , we deploy semi-supervised EM algorithm instead . Given a task T consisting of support set S = { ( xs , ys ) } Ss=1 and query set Q = { xq } Q q=1 , we use both the support set and query set as an episode dataset D = { xs } Ss=1 ∪ { xq } Q q=1 and draw latent variables from the variational posterior qφ ( zj |xj , D ) . Note that we abbreviate the index i since we consider a single task for now . We then perform semi-supervised EM algorithm as follows : ( E-step ) Qq , n ( k ) : = p ( y ( n ) q = k|z ( n ) q ) = N ( z ( n ) q ; µk , σ2k ) ∑ kN ( z ( n ) q ; µk , σ2k ) ( M-step ) µk : = ∑S , N s , n=1 1y ( n ) s =k z ( n ) s + ∑Q , N q , n=1Qq , n ( k ) z ( n ) q∑S , N s , n=1 1y ( n ) s =k + ∑Q , N q , n=1Qq , n ( k ) , σ2k : = ∑S , N s , n=1 1y ( n ) s =k ( z ( n ) s − µk ) 2 + ∑Q , N q , n=1Qq , n ( k ) ( z ( n ) q − µk ) 2∑S , N s , n=1 1y ( n ) s =k + ∑Q , N q , n=1Qq , n ( k ) ψ : = { ( µk , σ2k , 1 K ) } Kk=1 , ( 10 ) where 1 denotes an indicator function . We fix the mixing probability as 1K since the labels in each task T are uniformly distributed . Moreover , we utilize diagonal covariance σ2k to obtain more accurate statistics for the inference . We initialize µk and σ2k as the average value of support latent representations and the identity matrix I , respectively . Similar to the meta-training stage , we obtain the MLE solution for the parameters of GMM , by performing E-step and M-step for a fixed number of iterations . Finally , we compute the conditional probability of p ( yq|xq , D ) using the obtained parameters ψ∗ as follows : p ( yq|xq , D ) = Eqφ ( zq|xq , D ) [ pψ∗ ( yq|zq ) ] ≈ 1 N N∑ n=1 pψ∗ ( yq|z ( n ) q ) , z ( n ) q i.i.d∼ qφ ( zq|xq , D ) . ( 11 ) Here we compute pψ∗ ( yq|z ( n ) q ) with Bayes rule , and we reuseN different Monte Carlo samples that is drawn for Eq 10 , where the prediction of query ŷq = argmax k p ( yq = k|xq , D ) . We present the pseudo-code of the algorithm for training and inference of Meta-GMVAE in the Algorithm 1 and 2 . Visual feature reconstruction While our method is a generative model that can generate samples from output distribution , the ability to generate samples may not be necessary for discriminative downstream tasks ( Chen et al. , 2020 ) . Moreover , we found that VAEs almost fail to learn in MiniImageNet dataset with the architecturally limited constraints of the meta-learning literature . Thus , we propose a high-level feature reconstruction objective instead for Mini-ImageNet dataset . We experimentally find that the recently proposed constrastive learning framework , namely SimCLR ( Chen et al. , 2020 ) , is the most effective for our settings . Specifically , SimCLR learns high-level representation by performing a constrastive prediction task on pairs of augmented examples derived from a minibatch . We train SimCLR on the unsupervised datasetDu = { xu } Uu=1 , and use high-level features extracted by SimCLR as an input for our framework . | The submission proposes an algorithm for the semi-supervised meta-learning (unsupervised meta-training + supervised meta-testing) setting of [1], which adapts the few-shot learning + evaluation setting of [2, 3] by omitting classification labels at meta-training time. The algorithm makes use of a variational auto-encoder (VAE) formulation defined over a hierarchical model that describes the decomposition of a dataset into tasks of datapoint-target pairs (i.e., the meta-learning setup). The prior distribution of the hierarchical VAE is taken to be a mixture of Gaussians to facilitate the construction of pseudo-labels at meta-training time. The algorithm is evaluated on the Omniglot and miniImageNet few-shot classification tasks (with labels unused at meta-training time). | SP:e3ce73327452f27aa256253ba6b402635697820c |
Meta-GMVAE: Mixture of Gaussian VAE for Unsupervised Meta-Learning | 1 INTRODUCTION . Unsupervised learning is one of the most fundamental and challenging problems in machine learning , due to the absence of target labels to guide the learning process . Thanks to the enormous research efforts , there now exist many unsupervised learning methods that have shown promising results on real-world domains , including image recognition ( Le , 2013 ) and natural language understanding ( Ramachandran et al. , 2017 ) . The essential goal of unsupervised learning is obtaining meaningful feature representations that best characterize the data , which can be later utilized to improve the performance of the downstream tasks , by training a supervised task-specific model on the top of the learned representations ( Reed et al. , 2014 ; Cheung et al. , 2015 ; Chen et al. , 2016 ) or fine-tuning the entire pre-trained models ( Erhan et al. , 2010 ) . Meta-learning , whose objective is to learn general knowledge across diverse tasks , such that the learned model can rapidly adapt to novel tasks , shares the spirit of unsupervised learning in that both seek more efficient and effective learning procedure over learning from scratch . However , the essential difference between the two is that most meta-learning approaches have been built on the supervised learning scheme , and require human-crafted task distributions to be applied in fewshot classification . Acquiring labeled dataset for meta-training may require a massive amount of human efforts , and more importantly , meta-learning limits its applications to the pre-defined task distributions ( e.g . classification of specific set of classes ) . Two recent works have proposed unsupervised meta-learning that can bridge the gap between unsupervised learning and meta-learning by focusing on constructing supervised tasks with pseudo-labels from the unlabeled data . To do so , CACTUs ( Hsu et al. , 2019 ) clusters data in the embedding space learned with several unsupervised learning methods , while UMTRA ( Khodadadeh et al. , 2019 ) assumed that each randomly drawn sample represents a different class and augmented each pseudoclass with data augmentation ( Cubuk et al. , 2018 ) . After constructing the meta-training dataset with such heuristics , they simply apply supervised meta-learning algorithms as usual . Despite the success of the existing unsupervised meta-learning methods , they are fundamentally limited , since 1 ) they only consider unsupervised learning for heuristic pseudo-labeling of unlabeled data , and 2 ) the two-stage approach makes it impossible to recover from incorrect pseudo-class assignment when learning the unsupervised representation space . In this paper , we propose a principled unsupervised meta-learning model based on Variational Autoencoder ( VAE ) ( Kingma & Welling , 2014 ) and set-level variational inference using self-attention ( Vaswani et al. , 2017 ) . Moreover , we introduce multi-modal prior distributions , a mixture of Gaussians ( GMM ) , assuming that each modality represents each class-concept in any given tasks . Then the parameter of GMM is optimized by running Expectation-Maximization ( EM ) on the observations sampled from the set-dependent variational posterior . In this framework , however , there is no guarantee that each modality obtained from EM algorithm corresponds to a label . To realize modality as label , we deploy semi-supervised EM at meta-test time , considering the support set and query set as labeled and unlabeled observations , respectively . We refer to our method as Meta-Gaussian Mixture Variational Autoencoders ( Meta-GMVAE ) ( See Figure 1 for high-level concept ) . While our method can be used as a full generative model for generating the samples ( images ) , the ability to generalize to generate samples may not be necessary for capturing the meta-knowledge for non-generative downstream tasks . Thus , we propose another version of Meta-GMVAE that reconstructs high-level features learned by unsupervised representation learning approaches ( e.g . Chen et al . ( 2020 ) ) . To investigate the effectiveness of our framework , we run experiments on two benchmark fewshot image classification datasets , namely Omiglot ( Lake et al. , 2011 ) and Mini-Imagenet ( Ravi & Larochelle , 2017 ) . The experimental results show that our Meta-GMVAE obtains impressive performance gains over the relevant unsupervised meta-learning baselines on both datasets , obtaining even better accuracy than fully supervised MAML ( Finn et al. , 2017 ) while utilizing as small as 0.1 % of the labeled data on one-shot settings in Omniglot dataset . Moreover , our model can generalize to classification tasks with different number of ways ( classes ) without loss of accuracy . Our contribution is threefold : • We propose a novel unsupervised meta-learning model , namely Meta-GMVAE , which metalearns the set-conditioned prior and posterior network for a VAE . Our Meta-GMVAE is a principled unsupervised meta-learning method , unlike existing methods on unsupervised meta-learning that combines heuristic pseudo-labeling with supervised meta-learning . • We propose to learn the multi-modal structure of a given dataset with the Gaussian mixture prior , such that it can adapt to a novel dataset via the EM algorithm . This flexible adaptation to a new task , is not possible with existing methods that propose VAEs with Gaussian mixture priors for single task learning . • We show that Meta-GMVAE largely outperforms relevant unsupervised meta-learning baselines on two benchmark datasets , while obtaining even better performance than a supervised metalearning model under a specific setting . We further show that Meta-GMVAE can generalize to classification tasks with different number of ways ( classes ) . 2 RELATED WORK . Unsupervised learning Many prior unsupervised learning methods have developed proxy objectives which is either based on reconstruction ( Vincent et al. , 2010 ; Higgins et al. , 2017 ) , adversarially obtained image fidelity ( Radford et al. , 2016 ; Salimans et al. , 2016 ; Donahue et al. , 2017 ; Dumoulin et al. , 2017 ) , disentanglement ( Bengio et al. , 2013 ; Reed et al. , 2014 ; Cheung et al. , 2015 ; Chen et al. , 2016 ; Mathieu et al. , 2016 ; Denton & Birodkar , 2017 ; Kim & Mnih , 2018 ; Ding et al. , 2020 ) , clustering ( Coates & Ng , 2012 ; Krähenbühl et al. , 2016 ; Bojanowski & Joulin , 2017 ; Caron et al. , 2018 ) , or contrastive learning ( Chen et al. , 2020 ) . In the unsupervised learning literature , the most relevant work to ours are methods that use Gaussian Mixture priors for variational autoencoders . Dilokthanakul et al . ( 2016 ) ; Jiang et al . ( 2017 ) consider single task learning and therefore , the learned prior parameter is fixed after training , and thus can not adapt to new tasks . CURL ( Rao et al. , 2019 ) learns a network that outputs Gaussian mixture priors over a sequence of tasks for unsupervised continual learning . However CURL can not adapt to a new task without training on it , while our framework can generalize to a new task without any training , via amortized inference with a dataset ( task ) encoder . Also , our model does not learn Gaussian mixture priors but rather obtain them on the fly using the expectation-maximization algorithm . Meta-learning Meta-learning ( Thrun & Pratt , 1998 ) shares the intuition of unsupervised learning in that it aims to improve the model performance on an unseen task by leveraging prior knowledge , rather than learning from scratch . While the literature on meta-learning is vast , we only discuss relevant existing works for few-shot image classification . Metric-based meta-learning ( Koch et al. , 2015 ; Vinyals et al. , 2016 ; Snell et al. , 2017 ; Oreshkin et al. , 2018 ; Mishra et al. , 2018 ) is one of the most popular approaches , where it learns to embed the data instances of the same class to be closer in the shared embedding space . One can measure the distance in the embedding space by cosine similarity ( Vinyals et al. , 2016 ) , or Euclidean distance ( Snell et al. , 2017 ) . On the other hand , gradient-based meta-learning ( Finn et al. , 2017 ; 2018 ; Li et al. , 2017 ; Lee & Choi , 2018 ; Ravi & Beatson , 2019 ; Flennerhag et al. , 2020 ) aims at learning a global initialization of parameters , which can rapidly adapt to a novel task with only a few gradient steps . Moreover , some previous works ( Hewitt et al. , 2018 ; Edwards & Storkey , 2017 ; Garnelo et al. , 2018 ) tackle meta-learning by modeling the set-dependent variational posterior with a single global latent variable , however , we model the variational posterior conditioned on each data instances . Moreover , while all of these works assume supervised learning scenarios where one has access to full labels in meta-training stage , we focus on unsupervised setting in this paper . Unsupervised meta-learning One of the main limitations of conventional meta-learning methods is that their application is strictly limited to the tasks from a pre-defined task distribution . A few works ( Hsu et al. , 2019 ; Khodadadeh et al. , 2019 ) have been proposed to resolve this issue by combining unsupervised learning with meta-learning . The main idea is to construct meta-training dataset in an unsupervised manner by leveraging existing supervised meta-learning models . CACTUs ( Hsu et al. , 2019 ) deploy several deep metric learning ( Berthelot et al. , 2019 ; Donahue et al. , 2017 ; Caron et al. , 2018 ; Chen et al. , 2016 ) to episodically cluster the unlabeled dataset , and then train MAML ( Finn et al. , 2017 ) and Prototypical Networks ( Snell et al. , 2017 ) on the constructed data . UMTRA ( Khodadadeh et al. , 2019 ) assumes that each randomly drawn sample is from a different class from others , and use data augmentation ( Cubuk et al. , 2018 ) to construct synthetic task distribution for meta-training . Instead of only deploying unsupervised learning for constructing meta-training task distributions , we propose an unsupervised meta-learning model that meta-learns set-level variational posterior by matching the multi-modal prior distribution representing latent classes . 3 UNSUPERVISED META-LEARNING WITH META-GMVAES . In this section , we describe our problem setting with respect to unsupervised meta-learning , and demonstrate our approach . The graphical illustration of our model for unsupervised meta-training and supervised meta-test is depicted in Figure 2 . 3.1 PROBLEM STATEMENT . Our goal is to learn unsupervised feature representations which can be transferred to wide range of downstream few-shot classification tasks . As suggested by Hsu et al . ( 2019 ) ; Khodadadeh et al . ( 2019 ) , we only assume an unlabeled dataset Du = { xu } Uu=1 in the meta-training stage . We aim toward applying the knowledge learned during unsupervised meta-training stage to novel tasks in meta-test stage , which comes with a modest amount of labeled data ( or as few as a single example per class ) for each task . As with most meta-learning methods , we further assume that the labeled data are drawn from the same distribution as that of the unlabeled data , with a different set of classes . Specifically , the goal of a K-way S-shot classification task T is to correctly predict the labels of query data points Q = { xq } Qq=1 , using S support data points and labels S = { ( xs , ys ) } Ss=1 per class , where S is relatively small ( i.e . between 1 and 50 ) . 3.2 META-LEVEL GAUSSIAN MIXTURE VAE . Unsupervised meta-training We now describe the meta-learning framework for learning unsupervised latent representations that can be transferred to human-designed few-shot image-classification tasks . In particular , we aim toward learning multi-modal latent spaces for Variational Autoencoder ( VAE ) in an episodic manner . We use the Gaussian mixture for the prior distribution pψ ( z ) = ∑K k=1 pψ ( y = k ) pψ ( z|y = k ) , where ψ is the parameter of the prior network . Then the generative process can be described as follows : • y ∼ pψ ( y ) , where y corresponds to the categorical L.V . for a single mode . • z ∼ pψ ( z|y ) , where z corresponds to the Gaussian L.V . responsible for data generation . • x ∼ pθ ( x|z ) , where θ is the parameter of the generative model . The above generative process is similar to those from the previous works ( Dilokthanakul et al. , 2016 ; Jiang et al. , 2017 ) on modeling the VAE prior with Gaussian mixtures . However , they target single-task learning and the parameter of the prior network is fixed after training such as equation 1c in Dilokthanakul et al . ( 2016 ) and equation 5 in Jiang et al . ( 2017 ) , which is suboptimal since a meta-learning model should be able to adapt and generalize to a novel task . To learn the set-dependent multi-modalities , we further assume that there exists a parameter ψi for each episodic datasetDi = { xj } Mj=1 , which is randomly drawn from the unlabeled datasetDu . Then we derive the variational lower bound for the marginal log-likelihood of Di as follows : log pθ ( Di ) = M∑ j=1 log pθ ( xj ) = M∑ j=1 log ∫ pθ ( xj |zj ) pψi ( zj ) qφ ( zj |xj , Di ) qφ ( zj |xj , Di ) dzj ( 1 ) ≥ M∑ j=1 [ Ezj∼qφ ( zj |xj , Di ) [ log pθ ( xj |zj ) + log pψi ( zj ) − log qφ ( zj |xj , Di ) ) ] ] ( 2 ) ≈ M∑ j=1 1 N N∑ n=1 [ log pθ ( xj |z ( n ) j ) + log pψi ( z ( n ) j ) − log qφ ( z ( n ) j |xj , Di ) ] ( 3 ) = : L ( θ , φ , ψi , Di ) , z ( n ) j i.i.d∼ qφ ( zj |xj , Di ) . ( 4 ) Here the lower bound for each datapoint is approximated by Monte Carlo estimation with the sample size N . Following the convention of the VAE literature , we assume that the variational posterior qφ ( zj |xj , Di ) follows an isotropic Gaussian distribution . Algorithm 1 Meta-training Require : An unlabeled dataset Du 1 : Initialize parameters θ , φ 2 : while not done do 3 : Sample B episode datasets { Di } Bi=1 from Du 4 : for all i ∈ [ 1 , B ] do 5 : Draw n MC samples from qφ ( zj |xj , Di ) 6 : Initialize πk as 1/K and randomly choose K different points for µk . 7 : Compute optimal parameter ψ∗i using Eq 7 8 : end for 9 : Update θ , φ using L ( θ , φ , { Di } Bi=1 ) in Eq 9 . 10 : end while Algorithm 2 Meta-test for an episode Require : A test task T = S ∪ Q 1 : Set D = { xs } Ss=1 ∪ { xq } Qq=1 2 : Draw n MC samples from qφ ( zj |xj , D ) 3 : Initialize µk = ∑S , N s , n=1 1y ( n ) s =k z ( n ) s∑S , N s , n=1 1y ( n ) s =k and σ2k = I 4 : Compute optimal parameter ψ∗ using Eq 10 5 : Compute p ( yq|xq , D ) using Eq 11 6 : Infer the label yq = argmax k p ( yq = k|xq , D ) 7 : 8 : Set-dependent variational posterior Our derivation of the evidence lower bound in Eq 4 is similar to that of the hierarchical VAE framework , such as equation 3 in Edwards & Storkey ( 2017 ) and equation 4 in Hewitt et al . ( 2018 ) , in that we use the i.i.d assumption that the log likelihood of a dataset equals the sum over the log-likelihoods of each individual data point . Yet , previous works assume that each input set consists of data instances from a single concept ( e.g . a class ) , therefore , they encode the dataset into a single global latent variable ( e.g . qφ ( z|D ) ) . This is not appropriate for unsupervised meta-learning where labels are unavailable . Thus we learn a set-conditioned variational posterior qφ ( zj |xj , Di ) , which models a latent variable to encode each data xj within the given datasetDi into the latent space . Specifically , we model the variational posterior qφ ( zj |xj , Di ) using the self-attention mechanism ( Vaswani et al. , 2017 ) as follows : H = TransformerEncoder ( f ( Di ) ) µj =WµHj + bµ , σ 2 j = exp ( Wσ2Hj + bσ2 ) qφ ( zj |xj , Di ) = N ( zj ; µj , σ2j ) ( 5 ) Here we deploy TransformerEncoder ( · ) , a neural network based on the multi-head self-attention mechanism proposed by Vaswani et al . ( 2017 ) , to model the dependency between data instances , and f is a convolutional neural network ( or an identity function for the Mini-ImageNet ) which takes each data in Di as an input . Moreover , we use the reparameterization trick ( Kingma & Welling , 2014 ) to train the model with backpropagation since the stochastic sampling process z ( n ) j i.i.d∼ qφ ( zj |xj , Di ) is non-differentiable . Expectation Maximization As discussed before , we assume that the parameter ψi of the prior Gaussian Mixture is task-specific and characterizes the given dataset Di . To obtain the task-specific parameter that optimally explain the given dataset , we propose to locally maximize the lower bound in Eq 4 with respect to the prior parameter ψi . We can obtain the optimal parameter ψ∗i by solving the following optimization problem : ψ∗i = argmax ψi L ( θ , φ , ψi , Di ) = argmax ψi M , N∑ j , n=1 log pψ ( z ( n ) j ) , z ( n ) j i.i.d∼ qφ ( zj |xj , Di ) , ( 6 ) where we only consider the term related to the task-specific parameter ψi , and eliminate the normalization term 1N since it does not change the solution of the optimization problem . The above formula implies that the optimal parameter maximizes the log-likelihood of observations which can be drawn from the variational posterior distribution . However , we do not have an analytic solution for Maximum Likelihood Estimation ( MLE ) of a GMM . The most prevalent approach for estimating the parameters for the mixture of Gaussian is solving it with Expectation Maximization ( EM ) algorithm . To this end , we propose to optimize the taskspecific parameter of GMM prior distribution using EM algorithm as follows : ( E-step ) Qj , n ( k ) : = p ( y ( n ) j = k|z ( n ) j ) = πkN ( z ( n ) j ; µk , I ) ∑ k πkN ( z ( n ) j ; µk , I ) ( M-step ) µk : = ∑M , N j , n=1Qj , n ( k ) z ( n ) j∑M , N j , n=1Qj , n ( k ) , πk : = ∑M , N j , n=1Qj , n ( k ) ∑K k=1 ∑M , N j , n=1Qj , n ( k ) ψi : = { ( µk , I , πk ) } Kk=1 , ( 7 ) where πk , µk , and N ( · ) denote the mixing probability of k-th component , mean parameter , and normal distribution , respectively . We assume that the covariance matrix of Gaussian distribution is fixed with the identity matrix I , following the assumption of original VAE on the prior distribution . We initialize { πk } Kk=1 and { µk } Kk=1 as 1K and randomly drawn K different points , respectively . We can obtain MLE solution for the parameters of GMM , by iteratively performing E-step and M-step until the log-likelihood converges . We found that using a fixed number of iterations for the EM algorithm does not degrade the performance , and consider it as a hyperparameter of our framework . Training objective Note that we want to maximize the variational lower bound of the marginal loglikelihood over all the episode datasets Di that can be sampled from Du . We use stochastic gradient ascent with respect to the variational parameter φ and the generative parameter θ , to maximize the following objective : L ( θ , φ , { Di } Bi=1 ) : = 1 B B∑ i=1 [ max ψi L ( θ , φ , ψi , Di ) ] ( 8 ) = 1 B B∑ i=1 M∑ j=1 1 N N∑ n=1 [ log pθ ( xj |z ( n ) j ) + log pψ∗i ( z ( n ) j ) − log qφ ( z ( n ) j |xj , Di ) ] . ( 9 ) Here we use B mini-batch of episode datasets , where each dataset consists of M datapoints . The task-specific parameter ψ∗i for each episode dataset Di is obtained by EM algorithm in Eq 7 . Supervised meta-test By introducing the multi-modal prior distribution into a generative learning framework , our model learns pseudo-class concepts by clustering latent features with EM algorithm . However , there is no guarantee that each modality obtained by EM algorithm corresponds to the label we are interested in at the meta-test stage . To realize modality as label in downstream fewshot image classification tasks , we deploy semi-supervised EM algorithm instead . Given a task T consisting of support set S = { ( xs , ys ) } Ss=1 and query set Q = { xq } Q q=1 , we use both the support set and query set as an episode dataset D = { xs } Ss=1 ∪ { xq } Q q=1 and draw latent variables from the variational posterior qφ ( zj |xj , D ) . Note that we abbreviate the index i since we consider a single task for now . We then perform semi-supervised EM algorithm as follows : ( E-step ) Qq , n ( k ) : = p ( y ( n ) q = k|z ( n ) q ) = N ( z ( n ) q ; µk , σ2k ) ∑ kN ( z ( n ) q ; µk , σ2k ) ( M-step ) µk : = ∑S , N s , n=1 1y ( n ) s =k z ( n ) s + ∑Q , N q , n=1Qq , n ( k ) z ( n ) q∑S , N s , n=1 1y ( n ) s =k + ∑Q , N q , n=1Qq , n ( k ) , σ2k : = ∑S , N s , n=1 1y ( n ) s =k ( z ( n ) s − µk ) 2 + ∑Q , N q , n=1Qq , n ( k ) ( z ( n ) q − µk ) 2∑S , N s , n=1 1y ( n ) s =k + ∑Q , N q , n=1Qq , n ( k ) ψ : = { ( µk , σ2k , 1 K ) } Kk=1 , ( 10 ) where 1 denotes an indicator function . We fix the mixing probability as 1K since the labels in each task T are uniformly distributed . Moreover , we utilize diagonal covariance σ2k to obtain more accurate statistics for the inference . We initialize µk and σ2k as the average value of support latent representations and the identity matrix I , respectively . Similar to the meta-training stage , we obtain the MLE solution for the parameters of GMM , by performing E-step and M-step for a fixed number of iterations . Finally , we compute the conditional probability of p ( yq|xq , D ) using the obtained parameters ψ∗ as follows : p ( yq|xq , D ) = Eqφ ( zq|xq , D ) [ pψ∗ ( yq|zq ) ] ≈ 1 N N∑ n=1 pψ∗ ( yq|z ( n ) q ) , z ( n ) q i.i.d∼ qφ ( zq|xq , D ) . ( 11 ) Here we compute pψ∗ ( yq|z ( n ) q ) with Bayes rule , and we reuseN different Monte Carlo samples that is drawn for Eq 10 , where the prediction of query ŷq = argmax k p ( yq = k|xq , D ) . We present the pseudo-code of the algorithm for training and inference of Meta-GMVAE in the Algorithm 1 and 2 . Visual feature reconstruction While our method is a generative model that can generate samples from output distribution , the ability to generate samples may not be necessary for discriminative downstream tasks ( Chen et al. , 2020 ) . Moreover , we found that VAEs almost fail to learn in MiniImageNet dataset with the architecturally limited constraints of the meta-learning literature . Thus , we propose a high-level feature reconstruction objective instead for Mini-ImageNet dataset . We experimentally find that the recently proposed constrastive learning framework , namely SimCLR ( Chen et al. , 2020 ) , is the most effective for our settings . Specifically , SimCLR learns high-level representation by performing a constrastive prediction task on pairs of augmented examples derived from a minibatch . We train SimCLR on the unsupervised datasetDu = { xu } Uu=1 , and use high-level features extracted by SimCLR as an input for our framework . | This paper proposes a method for unsupervised meta-learning based on using a variational autoencoder (VAE). The variational autoencoder model they use differs from the typical one in that it considers episode-specific datasets, where the approximate posterior can be computed as a function of the set (using transformer architecture) rather than using an individual example. Additionally, they use a mixture of Gaussian distribution as a prior, whose parameters are learned per-episode using the EM algorithm. For the supervised evaluation phase, in order to adapt the learned prior to the few-shot dataset setting, semi-supervised EM is run using both support and query sets to adapt the mixture of Gaussian distribution to the evaluation dataset. Then, the query set predictions are obtained using the learned prior and posterior from the VAE model. Experimental evaluation is conducted on the Omniglot and Mini-ImageNet benchmarks and the proposed method is compared against other unsupervised meta-learning methods, mainly CACTUs and UMTRA. An interesting aspect about the Mini-ImageNet experiments are that because learning the VAE directly for this high-dimensional data may be difficult, the authors use features from a SimCLR-trained model as input for their VAE model. The proposed method seems to perform favorably across both of the benchmarks when varying the number of "shots". | SP:e3ce73327452f27aa256253ba6b402635697820c |
Flatness is a False Friend | 1 Introduction . Deep Neural Networks ( DNNs ) , with more parameters than data-points , trained with many passes of the same data , still manage to perform exceptionally on test data . The reasons for this remain laregly unsolved ( Neyshabur et al. , 2017 ) . However , DNNs are not completely immune to the classical problem of over-fitting . Zhang et al . ( 2016 ) show that DNNs can perfectly fit random labels . Schedules with initially low or sharply decaying learning rates , lead to identical training but much higher testing error ( Berrada et al. , 2018 ; Granziol et al. , 2020a ; Jastrzebski et al. , 2020 ) . In Wilson et al . ( 2017 ) the authors argue that specific adaptive gradient optimisers lead to solutions which don ’ t generalise . This has lead to a significant development in partially adaptive algorithms ( Chen and Gu , 2018 ; Keskar and Socher , 2017 ) . Given the importance of accurate predictions on unseen data , understanding exactly what helps deep networks generalise has been a fundamental area of research . A key concept which has taken a foothold in the community , allowing for the comparison of different training loss minima using only the training data , is the concept of flatness . From both a Bayesian and minimum description length framework , flatter minima should generalize better than sharp minima ( Hochreiter and Schmidhuber , 1997 ) . Sharpness is usually measured by properties of the second derivative of the loss „ the Hessian H = ∇2L ( w ) ( Keskar et al. , 2016 ; Jastrzebski et al. , 2017b ; Chaudhari et al. , 2016 ; Wu et al. , 2017 ; 2018 ) , such as the spectral norm or trace . The assumption is that due to finite numerical precision ( Hochreiter and Schmidhuber , 1997 ) or from a Bayesian perspective ( MacKay , 2003 ) , the test surface is shifted from the training surface . The difference between train and test loss for a shift ∆w is given by L ( w∗ + ∆w ) − L ( w∗ ) ≈ ∆wTH∆w + ... ≈ P∑ i λi|φTi ∆w|2 ≈ Tr ( H ) P ||∆w||2 ≤ λ1||∆w||2 ( 1 ) in which w∗ is the final training point and [ λi , φi ] are the eigenvalue/eigenvector pairs of H ∈ RP×P . We have dropped the terms beyond second-order by assuming that the gradient at training end is small . In general we have no a priori reason to assume that shift should preferentially lie along any of the Hessian eigenvectors , hence by taking a maximum entropy prior ( MacKay , 2003 ; Jaynes , 1982 ) we expect strong high dimensional concentration results ( Vershynin , 2018 ) to hold , hence |φTi ∆ŵ|2 ≈ 1/P , where ŵ is simply the normalised version of w. This justifies the trace as a measure of sharpness . In the worst case scenario the shift is completely aligned with the eigenvector corresponding to the largest eigenvalue λ1 , i.e . ∆wTφ1 = 1 . Hence the spectral norm λ1 of H serves as a local1 upper bound to the loss change . The idea of a shift between the training and testing loss surface is prolific in the literature and regularly related to generalisation ( He et al. , 2019 ; Izmailov et al. , 2018 ; Maddox et al. , 2019 ) . Alternative , yet closely related , measures of flatness are also used . Keskar et al . ( 2016 ) define a sharp minimiser as one `` with a significant number of large positive eigenvalues '' , in fact as can be seen by the Rayleigh-Ritz theorem , the metric which they propose , shown in Equation 2 is proportional to the largest eigenvalue . φw , L ( , A ) : = ( maxy∈C L ( w +Ay ) ) − L ( w ) 1 + L ( w ) ≤ κ ( ) λ1 ( 2 ) C is the constraint box as defined in ( Keskar et al. , 2016 ) , where controls the box size . As shown by Dinh et al . ( 2017 ) , this definition of sharpness is approximately given by λ1 2/2 ( 1 + L ( w ) ) , proportional to the largest eigenvalue . This result can be explained intuitively as within a small vicinity of w the largest change in loss is along the leading eigenvector and is proportional to the largest eigenvalue . Wu et al . ( 2017 ) consider the logarithm of the product of the top k eigenvalues as a proxy measure the volume of the minimum ( a truncated log determinant ) . In this paper we will exclusively consider the Hessian trace , spectral and Frobenius norm as measures of sharpness . Motivation : There have been numerous positive empirical results relating sharpness and generalisation . Keskar et al . ( 2016 ) ; Rangamani et al . ( 2019 ) consider how large batch vs small batch stochastic gradient descent ( SGD ) alters the sharpness of solutions , with smaller batches leading to convergence to flatter solutions , leading to better generalisation . Jastrzebski et al . ( 2017a ) look at the importance of the ratio learning rate and batch size in terms of generalisation , finding that large ratios lead to flatter minima ( as measured by the spectral norm ) and better generalisation . Yao et al . ( 2018 ) investigated flat regions of weight space ( small spectral norm ) showing them to be more robust under adversarial attack . Zhang et al . ( 2018 ) show that SGD concentrates in probability on flat minima . Certain algorithmic design choices , such as Entropy-SGD ( Chaudhari et al. , 2016 ) and the use of Polyak averaging ( Izmailov et al. , 2018 ) have been motivated by considerations of flatness . However Dinh et al . ( 2017 ) show that by exploiting ReLUs ( Rectified Linear Units ) positive homogeneity property f ( αx ) = αf ( x ) , any flat minima can be mapped into a sharp minimum , without altering the loss . As these measures can be arbitrarily distorted , this implies they serve little value as generalisation measures . However such transformations alter other properties , such as the weight norm . In practice the use of L2 regularisation , which penalises weight norm , means that optimisers are unlikely to converge to such a solution . It can even be shown that unregularised SGD converges to the minimum norm solution for simple problems ( Wilson et al. , 2017 ) , further limiting the practical relevance of such reparameterisation arguments . The question which remains and warrants investigation , is are Hessian based sharpness metrics at the end of training meaningful metrics for generalisation ? We demonstrate both theoretically and experimentally that the answer to this question is an affirmative no . Contributions : To the best of our knowledge , this is the first work which demonstrates theoretically motivated empirical results contrary to purely flatness based generalisation measures . For the fully connected feed-forward network with ReLU activation and cross entropy loss , we demonstrate in the limit of 0 training loss , that the spectral norm and trace of the Hessian also go to 0 . The key insight is that in order for the loss to go to 0 , the weight vector components wc must tend to infinity . Conversely , this implies that methods which reduce the weight magnitudes extensively used to aid generalisation ( Bishop , 2006 ; Krogh and Hertz , 1992 ) , makes solutions sharper . We present the counter-intuitive result that adding L2 regularisation increases both sharpness and generalisation , for Logistic Regression , MLP , simple CNN , PreResNet-164 and WideResNet-28× 10 for the MNIST and CIFAR-100 1we use the word local here because the largest eigenvalue/eigenvector pair may change along the path taken datasets . We also present and discuss various amendments to the Hessian , which are robust against the arguments presented here and those of Dinh et al . ( 2017 ) . Related work : Empirically negative results on flatness and its effect on generalisation have been previously observed . Neyshabur et al . ( 2017 ) show that it captures generalisation for large but not small networks . Golatkar et al . ( 2019 ) show that the maximum of the trace of the Fisher information correlates better with generalisation than its final value . Jastrzebski et al . ( 2018 ) show that it is possible to optimise faster and attain better generalisation performance whilst finding a final sharper region . For small networks , those trained on random labels ( with no generalisation ) are less sharp than those trained on the true labels . However this does not rule out that for the same network trained on true labels , solutions which are flatter generalise better . Instead the main focus has centered around the Hessians lack of reparameterisation invariance ( Neyshabur et al. , 2017 ; Tsuzuku et al. , 2019 ; Rangamani et al. , 2019 ) . This has been a primary motivator for normalised definitions of flatness Tsuzuku et al . ( 2019 ) ; Rangamani et al . ( 2019 ) often in a PAC-Bayesian framework . In Ballard et al . ( 2017 ) ; Mehta et al . ( 2018 ) , it was shown that adding the L2 regularization on weights including the bias weights removed singular modes of the Hessian matrix for a feed-forward artificial neural network with one hidden layer , with tanh activation function , employed to fit the XOR data . In Mehta et al . ( 2018 ) , with the help of an algebraic geometry interpretation of the loss landscape of the deep linear networks , it was proven that a generalized L2 regularization guaranteed to remove all singular solutions leaving the Hessian matrix strictly non-singular at every critical point . 2 Gedanken Experiment : why the Hessian won ’ t do . For a simple illustration let us consider the deep linear model , with exponential loss . The deep linear model is often employed as a theoretical tool for its analytical tractability ( Kawaguchi , 2016 ; Lu and Kawaguchi , 2017 ) . In Section 3 we formalise the results to the fully connected feed forward network with cross entropy loss . Intuitively we can think of a feed forward network as a sum of deep linear networks and the cross entropy as an approximation to the exponential loss . For 3 parameters and a single datum X , the loss is given by L = exp ( w1w2w3X ) . The Hessian , its trace and spectral norm H , Tr ( H ) , λ1 ( H ) are given by H = w22w23 w1w2w23 w22w1w3w1w2w23 w21w23 w21w2w3 w22w1w3 w 2 1w2w3 w 2 1w 2 2 X exp ( w1w2w3 ) X ( 3 ) Tr ( H ) = λ1 ( H ) = ( w 2 2w 2 3 + w 2 2w 2 1 + w 2 1w 2 3 ) X exp ( w1w2w3X ) ( 4 ) Smaller losses imply flatter Hessians : Equation 4 shows that under this model the trace and maximum eigenvalue are products of a polynomial function of the weights and an exponential in the weights . As the optimiser drives the loss L→ 0 we expect the exponential to dominate the polynomial2 . This implies that methods to reduce the weight magnitude , such as L2 regularisation , which has been extensively shown to aid generalisation ( Krogh and Hertz , 1992 ; Bishop , 2006 ) should increase Hessian measures of sharpness . We show that this is the case experimentally in Section 4 . | The authors of this article experimentally investigate whether flatness of the loss surface can be a good measure for generalization capabilities of neural networks. They present theoretical reasoning that suggests that weight regularization can lead to sharper local minima and better generalization although it is expected that flatter minima generalize better. Several experiments are conducted that support this interplay of weight regularization with sharpness. Finally it is demonstrated that also different optimization techniques lead to results that question the validity of purely flatness based measures. | SP:182b04893072dc8b62cf379b19fb8fdec105b516 |
Flatness is a False Friend | 1 Introduction . Deep Neural Networks ( DNNs ) , with more parameters than data-points , trained with many passes of the same data , still manage to perform exceptionally on test data . The reasons for this remain laregly unsolved ( Neyshabur et al. , 2017 ) . However , DNNs are not completely immune to the classical problem of over-fitting . Zhang et al . ( 2016 ) show that DNNs can perfectly fit random labels . Schedules with initially low or sharply decaying learning rates , lead to identical training but much higher testing error ( Berrada et al. , 2018 ; Granziol et al. , 2020a ; Jastrzebski et al. , 2020 ) . In Wilson et al . ( 2017 ) the authors argue that specific adaptive gradient optimisers lead to solutions which don ’ t generalise . This has lead to a significant development in partially adaptive algorithms ( Chen and Gu , 2018 ; Keskar and Socher , 2017 ) . Given the importance of accurate predictions on unseen data , understanding exactly what helps deep networks generalise has been a fundamental area of research . A key concept which has taken a foothold in the community , allowing for the comparison of different training loss minima using only the training data , is the concept of flatness . From both a Bayesian and minimum description length framework , flatter minima should generalize better than sharp minima ( Hochreiter and Schmidhuber , 1997 ) . Sharpness is usually measured by properties of the second derivative of the loss „ the Hessian H = ∇2L ( w ) ( Keskar et al. , 2016 ; Jastrzebski et al. , 2017b ; Chaudhari et al. , 2016 ; Wu et al. , 2017 ; 2018 ) , such as the spectral norm or trace . The assumption is that due to finite numerical precision ( Hochreiter and Schmidhuber , 1997 ) or from a Bayesian perspective ( MacKay , 2003 ) , the test surface is shifted from the training surface . The difference between train and test loss for a shift ∆w is given by L ( w∗ + ∆w ) − L ( w∗ ) ≈ ∆wTH∆w + ... ≈ P∑ i λi|φTi ∆w|2 ≈ Tr ( H ) P ||∆w||2 ≤ λ1||∆w||2 ( 1 ) in which w∗ is the final training point and [ λi , φi ] are the eigenvalue/eigenvector pairs of H ∈ RP×P . We have dropped the terms beyond second-order by assuming that the gradient at training end is small . In general we have no a priori reason to assume that shift should preferentially lie along any of the Hessian eigenvectors , hence by taking a maximum entropy prior ( MacKay , 2003 ; Jaynes , 1982 ) we expect strong high dimensional concentration results ( Vershynin , 2018 ) to hold , hence |φTi ∆ŵ|2 ≈ 1/P , where ŵ is simply the normalised version of w. This justifies the trace as a measure of sharpness . In the worst case scenario the shift is completely aligned with the eigenvector corresponding to the largest eigenvalue λ1 , i.e . ∆wTφ1 = 1 . Hence the spectral norm λ1 of H serves as a local1 upper bound to the loss change . The idea of a shift between the training and testing loss surface is prolific in the literature and regularly related to generalisation ( He et al. , 2019 ; Izmailov et al. , 2018 ; Maddox et al. , 2019 ) . Alternative , yet closely related , measures of flatness are also used . Keskar et al . ( 2016 ) define a sharp minimiser as one `` with a significant number of large positive eigenvalues '' , in fact as can be seen by the Rayleigh-Ritz theorem , the metric which they propose , shown in Equation 2 is proportional to the largest eigenvalue . φw , L ( , A ) : = ( maxy∈C L ( w +Ay ) ) − L ( w ) 1 + L ( w ) ≤ κ ( ) λ1 ( 2 ) C is the constraint box as defined in ( Keskar et al. , 2016 ) , where controls the box size . As shown by Dinh et al . ( 2017 ) , this definition of sharpness is approximately given by λ1 2/2 ( 1 + L ( w ) ) , proportional to the largest eigenvalue . This result can be explained intuitively as within a small vicinity of w the largest change in loss is along the leading eigenvector and is proportional to the largest eigenvalue . Wu et al . ( 2017 ) consider the logarithm of the product of the top k eigenvalues as a proxy measure the volume of the minimum ( a truncated log determinant ) . In this paper we will exclusively consider the Hessian trace , spectral and Frobenius norm as measures of sharpness . Motivation : There have been numerous positive empirical results relating sharpness and generalisation . Keskar et al . ( 2016 ) ; Rangamani et al . ( 2019 ) consider how large batch vs small batch stochastic gradient descent ( SGD ) alters the sharpness of solutions , with smaller batches leading to convergence to flatter solutions , leading to better generalisation . Jastrzebski et al . ( 2017a ) look at the importance of the ratio learning rate and batch size in terms of generalisation , finding that large ratios lead to flatter minima ( as measured by the spectral norm ) and better generalisation . Yao et al . ( 2018 ) investigated flat regions of weight space ( small spectral norm ) showing them to be more robust under adversarial attack . Zhang et al . ( 2018 ) show that SGD concentrates in probability on flat minima . Certain algorithmic design choices , such as Entropy-SGD ( Chaudhari et al. , 2016 ) and the use of Polyak averaging ( Izmailov et al. , 2018 ) have been motivated by considerations of flatness . However Dinh et al . ( 2017 ) show that by exploiting ReLUs ( Rectified Linear Units ) positive homogeneity property f ( αx ) = αf ( x ) , any flat minima can be mapped into a sharp minimum , without altering the loss . As these measures can be arbitrarily distorted , this implies they serve little value as generalisation measures . However such transformations alter other properties , such as the weight norm . In practice the use of L2 regularisation , which penalises weight norm , means that optimisers are unlikely to converge to such a solution . It can even be shown that unregularised SGD converges to the minimum norm solution for simple problems ( Wilson et al. , 2017 ) , further limiting the practical relevance of such reparameterisation arguments . The question which remains and warrants investigation , is are Hessian based sharpness metrics at the end of training meaningful metrics for generalisation ? We demonstrate both theoretically and experimentally that the answer to this question is an affirmative no . Contributions : To the best of our knowledge , this is the first work which demonstrates theoretically motivated empirical results contrary to purely flatness based generalisation measures . For the fully connected feed-forward network with ReLU activation and cross entropy loss , we demonstrate in the limit of 0 training loss , that the spectral norm and trace of the Hessian also go to 0 . The key insight is that in order for the loss to go to 0 , the weight vector components wc must tend to infinity . Conversely , this implies that methods which reduce the weight magnitudes extensively used to aid generalisation ( Bishop , 2006 ; Krogh and Hertz , 1992 ) , makes solutions sharper . We present the counter-intuitive result that adding L2 regularisation increases both sharpness and generalisation , for Logistic Regression , MLP , simple CNN , PreResNet-164 and WideResNet-28× 10 for the MNIST and CIFAR-100 1we use the word local here because the largest eigenvalue/eigenvector pair may change along the path taken datasets . We also present and discuss various amendments to the Hessian , which are robust against the arguments presented here and those of Dinh et al . ( 2017 ) . Related work : Empirically negative results on flatness and its effect on generalisation have been previously observed . Neyshabur et al . ( 2017 ) show that it captures generalisation for large but not small networks . Golatkar et al . ( 2019 ) show that the maximum of the trace of the Fisher information correlates better with generalisation than its final value . Jastrzebski et al . ( 2018 ) show that it is possible to optimise faster and attain better generalisation performance whilst finding a final sharper region . For small networks , those trained on random labels ( with no generalisation ) are less sharp than those trained on the true labels . However this does not rule out that for the same network trained on true labels , solutions which are flatter generalise better . Instead the main focus has centered around the Hessians lack of reparameterisation invariance ( Neyshabur et al. , 2017 ; Tsuzuku et al. , 2019 ; Rangamani et al. , 2019 ) . This has been a primary motivator for normalised definitions of flatness Tsuzuku et al . ( 2019 ) ; Rangamani et al . ( 2019 ) often in a PAC-Bayesian framework . In Ballard et al . ( 2017 ) ; Mehta et al . ( 2018 ) , it was shown that adding the L2 regularization on weights including the bias weights removed singular modes of the Hessian matrix for a feed-forward artificial neural network with one hidden layer , with tanh activation function , employed to fit the XOR data . In Mehta et al . ( 2018 ) , with the help of an algebraic geometry interpretation of the loss landscape of the deep linear networks , it was proven that a generalized L2 regularization guaranteed to remove all singular solutions leaving the Hessian matrix strictly non-singular at every critical point . 2 Gedanken Experiment : why the Hessian won ’ t do . For a simple illustration let us consider the deep linear model , with exponential loss . The deep linear model is often employed as a theoretical tool for its analytical tractability ( Kawaguchi , 2016 ; Lu and Kawaguchi , 2017 ) . In Section 3 we formalise the results to the fully connected feed forward network with cross entropy loss . Intuitively we can think of a feed forward network as a sum of deep linear networks and the cross entropy as an approximation to the exponential loss . For 3 parameters and a single datum X , the loss is given by L = exp ( w1w2w3X ) . The Hessian , its trace and spectral norm H , Tr ( H ) , λ1 ( H ) are given by H = w22w23 w1w2w23 w22w1w3w1w2w23 w21w23 w21w2w3 w22w1w3 w 2 1w2w3 w 2 1w 2 2 X exp ( w1w2w3 ) X ( 3 ) Tr ( H ) = λ1 ( H ) = ( w 2 2w 2 3 + w 2 2w 2 1 + w 2 1w 2 3 ) X exp ( w1w2w3X ) ( 4 ) Smaller losses imply flatter Hessians : Equation 4 shows that under this model the trace and maximum eigenvalue are products of a polynomial function of the weights and an exponential in the weights . As the optimiser drives the loss L→ 0 we expect the exponential to dominate the polynomial2 . This implies that methods to reduce the weight magnitude , such as L2 regularisation , which has been extensively shown to aid generalisation ( Krogh and Hertz , 1992 ; Bishop , 2006 ) should increase Hessian measures of sharpness . We show that this is the case experimentally in Section 4 . | This paper argues that as the cross-entropy loss goes to zero, since the correct logit increases in magnitude the entries of the Hessian diminish to zero. Such overfitting on the training set and a small spectral norm of the Hessian should result in poor generalization error. Motivated by this, the paper experimentally evaluates the effect of weight decay on the Hessian controls the magnitude of weights, increases the spectral norm of the Hessian and improves the generalization. | SP:182b04893072dc8b62cf379b19fb8fdec105b516 |
Interpreting Knowledge Graph Relation Representation from Word Embeddings | 1 INTRODUCTION . Knowledge graphs are large repositories of binary relations between words ( or entities ) in the form of ( subject , relation , object ) triples . Many models for representing entities and relations have been developed , so that known facts can be recalled and previously unknown facts can be inferred , a task known as link prediction . Recent link prediction models ( e.g . Bordes et al. , 2013 ; Trouillon et al. , 2016 ; Balažević et al. , 2019b ) learn entity representations , or embeddings , of far lower dimensionality than the number of entities , by capturing latent structure in the data . Relations are typically represented as a mapping from the embedding of a subject entity to those of related object entities . Although the performance of link prediction models has steadily improved for nearly a decade , relatively little is understood of the low-rank latent structure that underpins them , which we address in this work . The outcomes of our analysis can be used to aid and direct future knowledge graph model design . We start by drawing a parallel between the entity embeddings of knowledge graphs and context-free word embeddings , e.g . as learned by Word2Vec ( W2V ) ( Mikolov et al. , 2013a ) and GloVe ( Pennington et al. , 2014 ) . Our motivating premise is that the same latent word features ( e.g . meaning ( s ) , tense , grammatical type ) give rise to the patterns found in different data sources , i.e . manifesting in word cooccurrence statistics and determining which words relate to which . Different embedding approaches may capture such structure in different ways , but if it is fundamentally the same , an understanding gained from one embedding task ( e.g . word embedding ) may benefit another ( e.g . knowledge graph representation ) . Furthermore , the relatively limited but accurate data used in knowledge graph representation differs materially from the highly abundant but statistically noisy text data used for word embeddings . As such , theoretically reconciling the two embedding methods may lead to unified and improved embeddings learned jointly from both data sources . Recent work ( Allen & Hospedales , 2019 ; Allen et al. , 2019 ) theoretically explains how semantic properties are encoded in word embeddings that ( approximately ) factorise a matrix of pointwise mutual information ( PMI ) from word co-occurrence statistics , as known for W2V ( Levy & Goldberg , 2014 ) . Semantic relationships between words , specifically similarity , relatedness , paraphrase and analogy , are proven to manifest as linear geometric relationships between rows of the PMI matrix ( subject to known error terms ) , of which word embeddings can be considered low-rank projections . This explains , for example , the observations that similar words have similar embeddings and that embeddings of analogous word pairs share a common “ vector offset ” ( e.g . Mikolov et al. , 2013b ) . ∗Equal contribution We extend this insight to identify geometric relationships between PMI-based word embeddings that correspond to other relations , i.e . those of knowledge graphs . Such relation conditions define relation-specific mappings between entity embeddings ( i.e . relation representations ) and so provide a “ blue-print ” for knowledge graph representation models . Analysing the relation representations of leading knowledge graph representation models , we find that various properties , including their relative link prediction performance , accord with predictions based on these relation conditions , supporting the premise that a common latent structure is learned by word and knowledge graph embedding models , despite the significant differences between their training data and methodology . In summary , the key contributions of this work are : • to use recent understanding of PMI-based word embeddings to derive geometric attributes of a relation representation for it to map subject word embeddings to all related object word embeddings ( relation conditions ) , which partition relations into three types ( §3 ) ; • to show that both per-relation ranking as well as classification performance of leading link prediction models corresponds to the model satisfying the appropriate relation conditions , i.e . how closely its relation representations match the geometric form derived theoretically ( §4.1 ) ; and • to show that properties of knowledge graph representation models fit predictions based on relation conditions , e.g . the strength of a relation ’ s relatedness aspect is reflected in the eigenvalues of its relation matrix ( §4.2 ) . 2 BACKGROUND . Knowledge graph representation : Recent knowledge graph models typically represent entities es , eo as vectors es , eo ∈ Rde , and relations as transformations in the latent space from subject to object entity embedding , where the dimension de is far lower ( e.g . 200 ) than the number of entities ne ( e.g . > 104 ) . Such models are distinguished by their score function , which defines ( i ) the form of the relation transformation , e.g . matrix multiplication and/or vector addition ; and ( ii ) the measure of proximity between a transformed subject embedding and an object embedding , e.g . dot product or Euclidean distance . Score functions can be non-linear ( e.g . Dettmers et al. , 2018 ) , or linear and sub-categorised as additive , multiplicative or both . We focus on linear models due to their simplicity and strong performance at link prediction ( including state-of-the-art ) . Table 1 shows the score functions of competitive linear knowledge graph embedding models spanning the sub-categories : TransE ( Bordes et al. , 2013 ) , DistMult ( Yang et al. , 2015 ) , TuckER ( Balažević et al. , 2019b ) and MuRE ( Balažević et al. , 2019a ) . Additive models apply a relation-specific translation to a subject entity embedding and typically use Euclidean distance to evaluate proximity to object embeddings . A generic additive score function is given by φ ( es , r , eo ) =−‖es+r−eo‖22+bs+bo . A simple example is TransE , where bs=bo=0 . Multiplicative models have the generic score function φ ( es , r , eo ) =e > s Reo , i.e . a bilinear product of the entity embeddings and a relation-specific matrix R. DistMult is a simple example with R diagonal and so can not model asymmetric relations ( Trouillon et al. , 2016 ) . In TuckER , each relation-specific R=W×3 r is a linear combination of dr “ prototype ” relation matrices in a core tensor W∈Rde×dr×de ( ×n denoting tensor product along mode n ) , facilitating multi-task learning across relations . Some models , e.g . MuRE , combine both multiplicative ( R ) and additive ( r ) components . Word embedding : Algorithms such as Word2Vec ( Mikolov et al. , 2013a ) and GloVe ( Pennington et al. , 2014 ) generate low-dimensional word embeddings that perform well on downstream tasks ( Baroni et al. , 2014 ) . Such models predict the context words ( cj ) observed around a target word ( wi ) in a text corpus using shallow neural networks . Whilst recent language models ( e.g . Devlin et al. , 2018 ; Peters et al. , 2018 ) achieve strong performance using contextualised word embeddings , we focus on “ context-free ” embeddings since knowledge graph entities have no obvious context and , importantly , they offer insight into embedding interpretability . Levy & Goldberg ( 2014 ) show that , for a dictionary of ne unique words and embedding dimension de ne , W2V ’ s loss function is minimised when its embeddings wi , cj form matrices W , C ∈ Rde×ne that factorise a pointwise mutual information ( PMI ) matrix of word co-occurrence statistics ( PMI ( wi , cj ) =log P ( wi , cj ) P ( wi ) P ( cj ) ) , subject to a shift term . This result relates W2V to earlier count-based embeddings and specifically PMI , which has a history in linguistic analysis ( Turney & Pantel , 2010 ) . From its loss function , GloVe can be seen to perform a related factorisation . Recent work ( Allen & Hospedales , 2019 ; Allen et al. , 2019 ) shows how the semantic relationships of similarity , relatedness , paraphrase and analogy are encoded in PMI-based word embeddings by recognising such embeddings as low-rank projections of high dimensional rows of the PMI matrix , termed PMI vectors . Those semantic relationships are described in terms of multiplicative interactions between co-occurrence probabilities ( subject to defined error terms ) , that correspond to additive interactions between ( logarithmic ) PMI statistics , and hence PMI vectors . Thus , under a sufficiently linear projection , those semantic relationships correspond to linear relationships between word embeddings . Note that although the relative geometry reflecting semantic relationships is preserved , the direct interpretability of dimensions , as in PMI vectors , is lost since the embedding matrices can be arbitrarily scaled/rotated if the other is inversely transformed . We state the relevant semantic relationships on which we build , denoting the set of unique dictionary words by E : • Paraphrase : word subsetsW , W∗⊆E are said to paraphrase if they induce similar distributions over nearby words , i.e . p ( E|W ) ≈p ( E|W∗ ) , e.g . { king } paraphrases { man , royal } . • Analogy : a common example of an analogy is “ woman is to queen as man is to king ” and can be defined as any set of word pairs { ( wi , w∗i ) } i∈I for which it is semantically meaningful to say “ wa is to w∗a as wb is to w ∗ b ” ∀a , b∈I . Where one word subset paraphrases another , the sums of their embeddings are shown to be equal ( subject to the independence of words within each set ) , e.g . wking ≈ wman+wroyal . An interesting connection is established between the two semantic relationships : a set of word pairs A= { ( wa , w∗a ) , ( wb , w∗b ) } is an analogy if { wa , w∗b } paraphrases { w∗a , wb } , in which case the embeddings satisfy wa∗−wa ≈ wb∗−wb ( “ vector offset ” ) . 3 FROM ANALOGIES TO KNOWLEDGE GRAPH RELATIONS . Analogies from the field of word embeddings are our starting point for developing a theoretical basis for representing knowledge graph relations . The relevance of analogies stems from the observation that for an analogy to hold ( see §2 ) , its word pairs , e.g { ( man , king ) , ( woman , queen ) , ( girl , princess ) } , must be related in the same way , comparably to subject-object entity pairs under a common knowledge graph relation . Our aim is to develop the understanding of PMI-based word embeddings ( henceforth word embeddings ) , to identify the mathematical properties necessary for a relation representation to map subject word embeddings to all related object word embeddings . Considering the paraphrasing word sets { king } and { man , royal } corresponding to the word embedding relationship wking≈wman+wroyal ( §2 ) , royal can be interpreted as the semantic difference between man and king , fitting intuitively with the relationship wroyal≈wking−wman . Fundamentally , this relationship holds because the difference between words that co-occur ( i.e . occur more frequently than if independent ) with king and those that co-occur with man , reflects those words that co-occur with royal . We refer to this difference in co-occurrence distribution as a “ context shift ” , from man ( subject ) to king ( object ) . Allen & Hospedales ( 2019 ) effectively show that where multiple word pairs share a common context shift , they form an analogy whose embeddings satisfy the vector offset relationship . This result seems obvious where the context shift mirrors an identifiable word , the embedding of which is approximated by the common vector offset , e.g . queen and woman are related by the same context shift , i.e . wqueen ≈ wwoman+wroyal , thus wqueen−wwoman ≈ wking−wman . However , the same result holds , i.e . an analogy is formed with a common vector offset between embeddings , for an arbitrary ( common ) context shift that may reflect no particular word . Importantly , these context shift relations evidence a case in which it is known how a relation can be represented , i.e . by an additive vector ( comparable to TransE ) if entities are represented by word embeddings . More generally , this provides an interpretable foothold into relation representation . Note that not all sets of word pairs considered analogies exhibit a clear context shift relation , e.g . in the analogy { ( car , engine ) , ( bus , seats ) } , the difference between words co-occurring with engine and car is not expected to reflect the corresponding difference between bus and seats . This illustrates how analogies are a loosely defined concept , e.g . their implicit relation may be semantic or syntactic , with several sub-categories of each ( e.g . see Gladkova et al . ( 2016 ) ) . The same is readily observed for the relations of knowledge graphs . This likely explains the observed variability in “ solving ” analogies by use of vector offset ( e.g . Köper et al. , 2015 ; Karpinska et al. , 2018 ; Gladkova et al. , 2016 ) and suggests that further consideration is required to represent relations ( or solve analogies ) in general . We have seen that the existence of a context shift relation between a subject and object word implies a ( relation-specific ) geometric relationship between word embeddings , thus the latter provides a necessary condition for the relation to hold . We refer to this as a “ relation condition ” and aim to identify relation conditions for other classes of relation . Once identified , relation conditions define a mapping from subject embeddings to all related object embeddings , by which related entities might be identified with a proximity measure ( e.g . Euclidean distance or dot product ) . This is the precise aim of a knowledge graph representation model , but loss functions are typically developed heuristically . Given the existence of many representation models , we can verify identified relation conditions by contrasting the per-relation performance of various models with the extent to which their loss function reflects the appropriate relation conditions . Note that since relation conditions are necessary rather than sufficient , they do not guarantee a relation holds , i.e . false positives may arise . Whilst we seek to establish relation conditions based on PMI word embeddings , the data used to train knowledge graph embeddings differs significantly to the text data used by word embeddings , and the relevance of conditions ultimately based on PMI statistics may seem questionable . However , where a knowledge graph representation model implements relation conditions and measures proximity between embeddings , the parameters of word embeddings necessarily provide a potential solution that minimises the loss function . Many equivalent solutions may exist due to symmetry as typical for neural network architectures . We now define relation types and identify their relation conditions ( underlined ) ; we then consider the completeness of this categorisation . • Similarity : Semantically similar words induce similar distributions over the words they co-occur with . Thus their PMI vectors and word embeddings are similar ( Fig 1a ) . • Relatedness : The relatedness of two words can be considered in terms of the words S ⊆E with which both co-occur similarly . S defines the nature of relatedness , e.g . milk and cheese are related by S= { dairy , breakfast , ... } ; and |S| reflects the strength of relatedness . Since PMI vector components corresponding to S are similar ( Fig 1b ) , embeddings of S-related words have similar components in the subspace VS that spans the projected PMI vector dimensions corresponding to S. The rank of VS is thus anticipated to reflect relatedness strength . Relatedness can be seen as a weaker and more variable generalisation of similarity , its limiting case where S=E , hence rank ( VS ) =de . • Context-shift : As discussed above , words related by a common difference between their distributions of co-occurring words , defined as context-shifts , share a common vector offset between word embeddings . Context might be considered added ( e.g . man to king ) , termed a specialisation ( Fig 1c ) , subtracted ( e.g . king to man ) or both ( Fig 1d ) . These relations are 1-to-1 ( subject to synonyms ) and include an aspect of relatedness due to the word associations in common . Note that , specialisations include hyponyms/hypernyms and context shifts include meronyms . • Generalised context-shift : Context-shift relations generalise to 1-to-many , many-to-1 and manyto-many relations where the added/subtracted context may be from a ( relation-specific ) context set ( Fig 1e ) , e.g . any city or anything bigger . The potential scope and size of context sets adds variability to these relations . The limiting case in which the context set is “ small ” reduces to a 1-to-1 context-shift ( above ) and the embedding difference is a known vector offset . In the limiting case of a “ large ” context set , the added/subtracted context is essentially unrestricted such that only the relatedness aspect of the relation , and thus a common subspace component of embeddings , is fixed . Categorisation completeness : Taking intuition from Fig 1 and considering PMI vectors as sets of word features , these relation types can be interpreted as set operations : similarity as set equality ; relatedness as subset equality ; and context-shift as a relation-specific set difference . Since for any relation each feature must either remain unchanged ( relatedness ) , change ( context shift ) or else be irrelevant , we conjecture that the above relation types give a complete partition of semantic relations . | Recent works toward the understanding of word embeddings can explain how semantic word relationships, such as similarity, analogy and paraphrasing are encoded as low-rank projections of high dimensional vectors of co-occurrence statistics (Allen et al., 2019). Thus, the semantic relationships correspond to linear relationships of word embeddings. This paper builds on this understanding of (PMI-based) word embeddings aiming at the task of understanding the latent structure of low-rank knowledge graph representations. The authors draw a parallel between the embeddings of knowledge graphs and words under the premise that fundamentally the same structure of relations is captured in different ways. Strong evidence to this premise is provided by starting at encoded semantic relations of word embeddings generalizing them to three types (R,S,C) of knowledge graph relations. The authors analyse the performance of different state-of-the-art knowledge graph models and identify the best performing model per relation type. While a multiplicative model performs best for R-relations (highly related), an additive-multiplicative model should be used for S- (specialisation) or C-type (context-shift) relations. These results correspond to the predictions made beforehand and the theoretically derived loss functions based on the respective conditions of each relation type. | SP:e8329108f4d0fb74d9347dcb06c7fe6aff604ba9 |
Interpreting Knowledge Graph Relation Representation from Word Embeddings | 1 INTRODUCTION . Knowledge graphs are large repositories of binary relations between words ( or entities ) in the form of ( subject , relation , object ) triples . Many models for representing entities and relations have been developed , so that known facts can be recalled and previously unknown facts can be inferred , a task known as link prediction . Recent link prediction models ( e.g . Bordes et al. , 2013 ; Trouillon et al. , 2016 ; Balažević et al. , 2019b ) learn entity representations , or embeddings , of far lower dimensionality than the number of entities , by capturing latent structure in the data . Relations are typically represented as a mapping from the embedding of a subject entity to those of related object entities . Although the performance of link prediction models has steadily improved for nearly a decade , relatively little is understood of the low-rank latent structure that underpins them , which we address in this work . The outcomes of our analysis can be used to aid and direct future knowledge graph model design . We start by drawing a parallel between the entity embeddings of knowledge graphs and context-free word embeddings , e.g . as learned by Word2Vec ( W2V ) ( Mikolov et al. , 2013a ) and GloVe ( Pennington et al. , 2014 ) . Our motivating premise is that the same latent word features ( e.g . meaning ( s ) , tense , grammatical type ) give rise to the patterns found in different data sources , i.e . manifesting in word cooccurrence statistics and determining which words relate to which . Different embedding approaches may capture such structure in different ways , but if it is fundamentally the same , an understanding gained from one embedding task ( e.g . word embedding ) may benefit another ( e.g . knowledge graph representation ) . Furthermore , the relatively limited but accurate data used in knowledge graph representation differs materially from the highly abundant but statistically noisy text data used for word embeddings . As such , theoretically reconciling the two embedding methods may lead to unified and improved embeddings learned jointly from both data sources . Recent work ( Allen & Hospedales , 2019 ; Allen et al. , 2019 ) theoretically explains how semantic properties are encoded in word embeddings that ( approximately ) factorise a matrix of pointwise mutual information ( PMI ) from word co-occurrence statistics , as known for W2V ( Levy & Goldberg , 2014 ) . Semantic relationships between words , specifically similarity , relatedness , paraphrase and analogy , are proven to manifest as linear geometric relationships between rows of the PMI matrix ( subject to known error terms ) , of which word embeddings can be considered low-rank projections . This explains , for example , the observations that similar words have similar embeddings and that embeddings of analogous word pairs share a common “ vector offset ” ( e.g . Mikolov et al. , 2013b ) . ∗Equal contribution We extend this insight to identify geometric relationships between PMI-based word embeddings that correspond to other relations , i.e . those of knowledge graphs . Such relation conditions define relation-specific mappings between entity embeddings ( i.e . relation representations ) and so provide a “ blue-print ” for knowledge graph representation models . Analysing the relation representations of leading knowledge graph representation models , we find that various properties , including their relative link prediction performance , accord with predictions based on these relation conditions , supporting the premise that a common latent structure is learned by word and knowledge graph embedding models , despite the significant differences between their training data and methodology . In summary , the key contributions of this work are : • to use recent understanding of PMI-based word embeddings to derive geometric attributes of a relation representation for it to map subject word embeddings to all related object word embeddings ( relation conditions ) , which partition relations into three types ( §3 ) ; • to show that both per-relation ranking as well as classification performance of leading link prediction models corresponds to the model satisfying the appropriate relation conditions , i.e . how closely its relation representations match the geometric form derived theoretically ( §4.1 ) ; and • to show that properties of knowledge graph representation models fit predictions based on relation conditions , e.g . the strength of a relation ’ s relatedness aspect is reflected in the eigenvalues of its relation matrix ( §4.2 ) . 2 BACKGROUND . Knowledge graph representation : Recent knowledge graph models typically represent entities es , eo as vectors es , eo ∈ Rde , and relations as transformations in the latent space from subject to object entity embedding , where the dimension de is far lower ( e.g . 200 ) than the number of entities ne ( e.g . > 104 ) . Such models are distinguished by their score function , which defines ( i ) the form of the relation transformation , e.g . matrix multiplication and/or vector addition ; and ( ii ) the measure of proximity between a transformed subject embedding and an object embedding , e.g . dot product or Euclidean distance . Score functions can be non-linear ( e.g . Dettmers et al. , 2018 ) , or linear and sub-categorised as additive , multiplicative or both . We focus on linear models due to their simplicity and strong performance at link prediction ( including state-of-the-art ) . Table 1 shows the score functions of competitive linear knowledge graph embedding models spanning the sub-categories : TransE ( Bordes et al. , 2013 ) , DistMult ( Yang et al. , 2015 ) , TuckER ( Balažević et al. , 2019b ) and MuRE ( Balažević et al. , 2019a ) . Additive models apply a relation-specific translation to a subject entity embedding and typically use Euclidean distance to evaluate proximity to object embeddings . A generic additive score function is given by φ ( es , r , eo ) =−‖es+r−eo‖22+bs+bo . A simple example is TransE , where bs=bo=0 . Multiplicative models have the generic score function φ ( es , r , eo ) =e > s Reo , i.e . a bilinear product of the entity embeddings and a relation-specific matrix R. DistMult is a simple example with R diagonal and so can not model asymmetric relations ( Trouillon et al. , 2016 ) . In TuckER , each relation-specific R=W×3 r is a linear combination of dr “ prototype ” relation matrices in a core tensor W∈Rde×dr×de ( ×n denoting tensor product along mode n ) , facilitating multi-task learning across relations . Some models , e.g . MuRE , combine both multiplicative ( R ) and additive ( r ) components . Word embedding : Algorithms such as Word2Vec ( Mikolov et al. , 2013a ) and GloVe ( Pennington et al. , 2014 ) generate low-dimensional word embeddings that perform well on downstream tasks ( Baroni et al. , 2014 ) . Such models predict the context words ( cj ) observed around a target word ( wi ) in a text corpus using shallow neural networks . Whilst recent language models ( e.g . Devlin et al. , 2018 ; Peters et al. , 2018 ) achieve strong performance using contextualised word embeddings , we focus on “ context-free ” embeddings since knowledge graph entities have no obvious context and , importantly , they offer insight into embedding interpretability . Levy & Goldberg ( 2014 ) show that , for a dictionary of ne unique words and embedding dimension de ne , W2V ’ s loss function is minimised when its embeddings wi , cj form matrices W , C ∈ Rde×ne that factorise a pointwise mutual information ( PMI ) matrix of word co-occurrence statistics ( PMI ( wi , cj ) =log P ( wi , cj ) P ( wi ) P ( cj ) ) , subject to a shift term . This result relates W2V to earlier count-based embeddings and specifically PMI , which has a history in linguistic analysis ( Turney & Pantel , 2010 ) . From its loss function , GloVe can be seen to perform a related factorisation . Recent work ( Allen & Hospedales , 2019 ; Allen et al. , 2019 ) shows how the semantic relationships of similarity , relatedness , paraphrase and analogy are encoded in PMI-based word embeddings by recognising such embeddings as low-rank projections of high dimensional rows of the PMI matrix , termed PMI vectors . Those semantic relationships are described in terms of multiplicative interactions between co-occurrence probabilities ( subject to defined error terms ) , that correspond to additive interactions between ( logarithmic ) PMI statistics , and hence PMI vectors . Thus , under a sufficiently linear projection , those semantic relationships correspond to linear relationships between word embeddings . Note that although the relative geometry reflecting semantic relationships is preserved , the direct interpretability of dimensions , as in PMI vectors , is lost since the embedding matrices can be arbitrarily scaled/rotated if the other is inversely transformed . We state the relevant semantic relationships on which we build , denoting the set of unique dictionary words by E : • Paraphrase : word subsetsW , W∗⊆E are said to paraphrase if they induce similar distributions over nearby words , i.e . p ( E|W ) ≈p ( E|W∗ ) , e.g . { king } paraphrases { man , royal } . • Analogy : a common example of an analogy is “ woman is to queen as man is to king ” and can be defined as any set of word pairs { ( wi , w∗i ) } i∈I for which it is semantically meaningful to say “ wa is to w∗a as wb is to w ∗ b ” ∀a , b∈I . Where one word subset paraphrases another , the sums of their embeddings are shown to be equal ( subject to the independence of words within each set ) , e.g . wking ≈ wman+wroyal . An interesting connection is established between the two semantic relationships : a set of word pairs A= { ( wa , w∗a ) , ( wb , w∗b ) } is an analogy if { wa , w∗b } paraphrases { w∗a , wb } , in which case the embeddings satisfy wa∗−wa ≈ wb∗−wb ( “ vector offset ” ) . 3 FROM ANALOGIES TO KNOWLEDGE GRAPH RELATIONS . Analogies from the field of word embeddings are our starting point for developing a theoretical basis for representing knowledge graph relations . The relevance of analogies stems from the observation that for an analogy to hold ( see §2 ) , its word pairs , e.g { ( man , king ) , ( woman , queen ) , ( girl , princess ) } , must be related in the same way , comparably to subject-object entity pairs under a common knowledge graph relation . Our aim is to develop the understanding of PMI-based word embeddings ( henceforth word embeddings ) , to identify the mathematical properties necessary for a relation representation to map subject word embeddings to all related object word embeddings . Considering the paraphrasing word sets { king } and { man , royal } corresponding to the word embedding relationship wking≈wman+wroyal ( §2 ) , royal can be interpreted as the semantic difference between man and king , fitting intuitively with the relationship wroyal≈wking−wman . Fundamentally , this relationship holds because the difference between words that co-occur ( i.e . occur more frequently than if independent ) with king and those that co-occur with man , reflects those words that co-occur with royal . We refer to this difference in co-occurrence distribution as a “ context shift ” , from man ( subject ) to king ( object ) . Allen & Hospedales ( 2019 ) effectively show that where multiple word pairs share a common context shift , they form an analogy whose embeddings satisfy the vector offset relationship . This result seems obvious where the context shift mirrors an identifiable word , the embedding of which is approximated by the common vector offset , e.g . queen and woman are related by the same context shift , i.e . wqueen ≈ wwoman+wroyal , thus wqueen−wwoman ≈ wking−wman . However , the same result holds , i.e . an analogy is formed with a common vector offset between embeddings , for an arbitrary ( common ) context shift that may reflect no particular word . Importantly , these context shift relations evidence a case in which it is known how a relation can be represented , i.e . by an additive vector ( comparable to TransE ) if entities are represented by word embeddings . More generally , this provides an interpretable foothold into relation representation . Note that not all sets of word pairs considered analogies exhibit a clear context shift relation , e.g . in the analogy { ( car , engine ) , ( bus , seats ) } , the difference between words co-occurring with engine and car is not expected to reflect the corresponding difference between bus and seats . This illustrates how analogies are a loosely defined concept , e.g . their implicit relation may be semantic or syntactic , with several sub-categories of each ( e.g . see Gladkova et al . ( 2016 ) ) . The same is readily observed for the relations of knowledge graphs . This likely explains the observed variability in “ solving ” analogies by use of vector offset ( e.g . Köper et al. , 2015 ; Karpinska et al. , 2018 ; Gladkova et al. , 2016 ) and suggests that further consideration is required to represent relations ( or solve analogies ) in general . We have seen that the existence of a context shift relation between a subject and object word implies a ( relation-specific ) geometric relationship between word embeddings , thus the latter provides a necessary condition for the relation to hold . We refer to this as a “ relation condition ” and aim to identify relation conditions for other classes of relation . Once identified , relation conditions define a mapping from subject embeddings to all related object embeddings , by which related entities might be identified with a proximity measure ( e.g . Euclidean distance or dot product ) . This is the precise aim of a knowledge graph representation model , but loss functions are typically developed heuristically . Given the existence of many representation models , we can verify identified relation conditions by contrasting the per-relation performance of various models with the extent to which their loss function reflects the appropriate relation conditions . Note that since relation conditions are necessary rather than sufficient , they do not guarantee a relation holds , i.e . false positives may arise . Whilst we seek to establish relation conditions based on PMI word embeddings , the data used to train knowledge graph embeddings differs significantly to the text data used by word embeddings , and the relevance of conditions ultimately based on PMI statistics may seem questionable . However , where a knowledge graph representation model implements relation conditions and measures proximity between embeddings , the parameters of word embeddings necessarily provide a potential solution that minimises the loss function . Many equivalent solutions may exist due to symmetry as typical for neural network architectures . We now define relation types and identify their relation conditions ( underlined ) ; we then consider the completeness of this categorisation . • Similarity : Semantically similar words induce similar distributions over the words they co-occur with . Thus their PMI vectors and word embeddings are similar ( Fig 1a ) . • Relatedness : The relatedness of two words can be considered in terms of the words S ⊆E with which both co-occur similarly . S defines the nature of relatedness , e.g . milk and cheese are related by S= { dairy , breakfast , ... } ; and |S| reflects the strength of relatedness . Since PMI vector components corresponding to S are similar ( Fig 1b ) , embeddings of S-related words have similar components in the subspace VS that spans the projected PMI vector dimensions corresponding to S. The rank of VS is thus anticipated to reflect relatedness strength . Relatedness can be seen as a weaker and more variable generalisation of similarity , its limiting case where S=E , hence rank ( VS ) =de . • Context-shift : As discussed above , words related by a common difference between their distributions of co-occurring words , defined as context-shifts , share a common vector offset between word embeddings . Context might be considered added ( e.g . man to king ) , termed a specialisation ( Fig 1c ) , subtracted ( e.g . king to man ) or both ( Fig 1d ) . These relations are 1-to-1 ( subject to synonyms ) and include an aspect of relatedness due to the word associations in common . Note that , specialisations include hyponyms/hypernyms and context shifts include meronyms . • Generalised context-shift : Context-shift relations generalise to 1-to-many , many-to-1 and manyto-many relations where the added/subtracted context may be from a ( relation-specific ) context set ( Fig 1e ) , e.g . any city or anything bigger . The potential scope and size of context sets adds variability to these relations . The limiting case in which the context set is “ small ” reduces to a 1-to-1 context-shift ( above ) and the embedding difference is a known vector offset . In the limiting case of a “ large ” context set , the added/subtracted context is essentially unrestricted such that only the relatedness aspect of the relation , and thus a common subspace component of embeddings , is fixed . Categorisation completeness : Taking intuition from Fig 1 and considering PMI vectors as sets of word features , these relation types can be interpreted as set operations : similarity as set equality ; relatedness as subset equality ; and context-shift as a relation-specific set difference . Since for any relation each feature must either remain unchanged ( relatedness ) , change ( context shift ) or else be irrelevant , we conjecture that the above relation types give a complete partition of semantic relations . | Based on PMI word embedding, the authors categorize the knowledge graph relations into three types, which serve as the foundation of knowledge analysis. This paper is not well-motived but presents the methodology, well. However, nothing in this paper surprised me, because this seems like a ````''regular'' research in this field. | SP:e8329108f4d0fb74d9347dcb06c7fe6aff604ba9 |
Entropic Risk-Sensitive Reinforcement Learning: A Meta Regret Framework with Function Approximation | 1 INTRODUCTION . Risk is one of the most important considerations in decision making , so should it be in reinforcement learning ( RL ) . As a prominent paradigm in RL that performs learning while accounting for risk , risksensitive RL explicitly models risk of decisions via certain risk measures and optimizes for rewards simultaneously . It is poised to play an essential role in application domains where accounting for risk in decision making is crucial . A partial list of such domains includes autonomous driving ( Buehler et al. , 2009 ; Thrun , 2010 ) , behavior modeling ( Niv et al. , 2012 ; Shen et al. , 2014 ) , realtime strategy games ( Berner et al. , 2019 ; Vinyals et al. , 2019 ) and robotic surgery ( Fagogenis et al. , 2019 ; Shademan et al. , 2016 ) . In this paper , we study risk-sensitive RL through the lens of function approximation , which is an important apparatus for scaling up and accelerating RL algorithms in applications of high dimension . We focus on risk-sensitive RL with the entropic risk measure , a classical framework established by the seminal work of Howard & Matheson ( 1972 ) . Informally , for a fixed risk parameter β 6= 0 , our goal is to maximize the objective Vβ = 1 β log { EeβR } . ( 1 ) The definition of Vβ will be made formal later in ( 2 ) . The objective ( 1 ) admits a Taylor expansion Vβ = E [ R ] + β2 Var ( R ) + O ( β 2 ) . Comparing ( 1 ) with the risk-neutral objective V = E [ R ] studied in the standard RL setting , we see that β > 0 induces a risk-seeking objective and β < 0 induces a risk-averse one . Therefore , the formulation with the entropic risk measure in ( 1 ) accounts for both risk-seeking and risk-averse modes of decision making , whereas most others are restricted to the risk-averse setting ( Fu et al. , 2018 ) . It can also be seen that Vβ tends to the risk-neutral V as β → 0 . Existing works on function approximation for RL have mostly focused on the risk-neutral setting and heavily exploits the linearity of risk-neutral objective V in both transition dynamics ( implicitly captured by the expectation ) and the reward R , which is clearly not available in the risk-sensitive objective ( 1 ) . It is also well known that even in the risk-neutral setting , improperly implemented function approximation could result in errors that scale exponentially in the size of the state space . Combined with nonlinearity of the risk-sensitive objective ( 1 ) , it compounds the difficulties of implementing function approximation in risk-sensitive RL with provable guarantees . This work provides a principled solution to function approximation in risk-sensitive RL by overcoming the above difficulties . Under the finite-horizon MDP setting , we propose a meta algorithm based on value iteration , and from that we derive two concrete algorithms for linear and general function approximation , which we name RSVI.L and RSVI.G , respectively . By modeling a shifted exponential transformation of estimated value functions , RSVI.L and RSVI.G cater to the nonlinearity of the risk-sensitive objective ( 1 ) and adapt to both risk-seeking and risk-averse settings . Moreover , both RSVI.L and RSVI.G maintain risk-sensitive optimism in the face of uncertainty for effective exploration . In particular , RSVI.L exploits a synergistic relationship between feature mapping and regularization in a risk-sensitive fashion . The resulting structure of RSVI.L makes it more efficient in runtime and memory than RSVI.G under linear function approximation , while RSVI.G is more general and allows for function approximation beyond the linear setting . Furthermore , we develop a meta regret analytic framework and identify a risk-sensitive optimism condition that serves as the core component of the framework . Under the optimism condition , we prove a meta regret bound incurred by any instance of the meta algorithm , regardless of function approximation settings . Furthermore , we show that both RSVI.L and RSVI.G satisfy the optimism condition under the respective function approximation and achieve regret that scales sublinearly in the number of episodes . The meta framework therefore helps us disentangle the analysis associated with function approximation from the generic analysis , shedding light on the role of function approximation in regret guarantees . We hope that our meta framework will motivate and benefit future studies of function approximation in risk-sensitive RL . Our contributions . We may summarize the contributions of the present paper as follows : • we study function approximation in risk-sensitive RL with the entropic risk measure ; we provide a meta algorithm , from which we derive two concrete algorithms for linear and general function approximation , respectively ; the concrete algorithms are both shown to adapt to all levels of risk sensitivity and maintain risk-sensitive optimism over the learning process ; • we develop a meta regret analytic framework and identify a risk-sensitive optimism condition , under which we prove a meta regret bound for the meta algorithm ; furthermore , by showing that the optimism condition holds for both concrete algorithms , we establish regret bounds for them under linear and general function approximation , respectively . Notations . For a positive integer n , we let [ n ] : = { 1 , 2 , . . . , n } . For a number u 6= 0 , we define sign ( u ) = 1 if u > 0 and −1 if u < 0 . For two non-negative sequences { ai } and { bi } , we write ai . bi if there exists a universal constant C > 0 such that ai ≤ Cbi for all i , and write ai bi if ai . bi and bi . ai . We use Õ ( · ) to denote O ( · ) while hiding logarithmic factors . For any ε > 0 and set X , we letNε ( X , ‖ · ‖ ) be the ε-net of the set X with respect to the norm ‖ · ‖ . We let ∆ ( X ) be the set of probability distributions supported on X . For any vector u ∈ Rn and symmetric and positive definite matrix Γ ∈ Rn×n , we let ‖u‖Γ : = √ u > Γu . We denote by In the n × n identity matrix . 2 RELATED WORK . Initiated by the seminal work of Howard & Matheson ( 1972 ) , risk-sensitive control/RL with the entropic risk measure has been studied in a vast body of literature ( Bäuerle & Rieder , 2014 ; Borkar , 2001 ; 2002 ; 2010 ; Borkar & Meyn , 2002 ; Cavazos-Cadena & Hernández-Hernández , 2011 ; Coraluppi & Marcus , 1999 ; Di Masi & Stettner , 1999 ; 2000 ; 2007 ; Fleming & McEneaney , 1995 ; Hernández-Hernández & Marcus , 1996 ; Jaśkiewicz , 2007 ; Marcus et al. , 1997 ; Mihatsch & Neuneier , 2002 ; Osogami , 2012 ; Patek , 2001 ; Shen et al. , 2013 ; 2014 ; Whittle , 1990 ) . Yet , this line of works either assumes known transition kernels or focuses on asymptotic behaviors of the problem/algorithms , and finite-sample/time results with unknown transitions have rarely been investigated . The most relevant work to ours is perhaps Fei et al . ( 2020 ) , who consider the same problem as ours under the tabular setting . They propose two algorithms based on value iteration and Q-learning . They prove regret bounds for their algorithms , which are then certified to be nearly optimal by a lower bound . However , their algorithms and analysis are restricted to the tabular setting . Compared to Fei et al . ( 2020 ) , our paper provides a novel and unified framework of algorithms and analysis for function approximation . We study linear and general function approximation as two instances of the framework , both of which subsume the tabular setting . We also briefly discuss existing works on function approximation with regret analysis , which so far have focused on the risk-neutral setting . The works of Cai et al . ( 2019 ) ; Jin et al . ( 2019 ) ; Wang et al . ( 2019 ) ; Yang & Wang ( 2019 ) ; Zhou et al . ( 2020 ) study linear function approximation , while Ayoub et al . ( 2020 ) ; Wang et al . ( 2020 ) investigate general function approximation . In addition , all these works prove Õ ( K1/2 ) -regret for their algorithms , although dependence on other parameters varies in settings . As we have argued in the previous section , the nonlinear objective ( 1 ) makes algorithm design and regret analysis for function approximation much more challenging in risksensitive settings than in the standard risk-neutral one . 3 PROBLEM FORMULATION . 3.1 EPISODIC MDP . An episodic MDP is parameterized by a tuple ( K , H , S , A , { Ph } h∈ [ H ] , { rh } h∈ [ H ] ) , where K is the number of episodes , H is the number of steps in each episode , S is the state space , A is the action space , Ph : S ×A → ∆ ( S ) is the transition kernel at step h , and rh : S ×A → [ 0 , 1 ] is the reward function at step h. We assume that { Ph } are unknown . For simplicity we also assume that { rh } are known and deterministic , as is done in existing works such as Yang & Wang ( 2019 ) ; Zhou et al . ( 2020 ) . We interact with the episodic MDP as follows . In the beginning of each episode k ∈ [ K ] , the environment chooses an arbitrary initial state sk1 ∈ S . Then in each step h ∈ [ H ] , we take an action akh ∈ A , receives a reward rh ( skh , akh ) and transitions to the next state skh+1 ∈ S sampled from Ph ( · | skh , akh ) . Once we reach skH+1 , the current episode terminates and we advance to the next episode unless k = K . 3.2 VALUE FUNCTIONS , BELLMAN EQUATIONS AND REGRET . We assume that β is fixed prior to the learning process , and for notational simplicity we omit it from quantities to be introduced subsequently . In risk-sensitive RL with the entropic risk measure , we aim to find a policy π = { πh : S → A } so as to maximize the value function given by V πh ( s ) : = 1 β log { E [ exp ( β H∑ h′=h rh′ ( sh′ , πh′ ( sh′ ) ) ) ] ∣∣∣∣∣ sh = s } , ( 2 ) for all ( h , s ) ∈ [ H ] × S. Under some mild regularity conditions , there exists a greedy policy π∗ = { π∗h } which gives the optimal value V π ∗ h ( s ) = supπ V π h ( s ) for all ( h , s ) ∈ [ H ] × S ( Bäuerle & Rieder , 2014 ) . In addition to the value function , another key notion is the action-value function defined as Qπh ( s , a ) : = 1 β log { E [ exp ( β H∑ h′=h rh′ ( sh′ , ah′ ) ) ∣∣∣∣∣ sh = s , ah = a ] } , ( 3 ) for all ( h , s , a ) ∈ [ H ] × S ×A . The action-value function Qπh is closely associated with the value function V π h via the so-called Bellman equation : Qπh ( s , a ) = rh ( s , a ) + 1 β log { Es′∼Ph ( · | s , a ) [ exp ( β · V πh+1 ( s′ ) ) ] } , ( 4 ) V πh ( s ) = Q π h ( s , πh ( s ) ) , V π H+1 ( s ) = 0 , which holds for all ( h , s , a ) ∈ [ H ] × S ×A . Note that the identity of Qπh in ( 4 ) is a result of simple calculation based on ( 2 ) and ( 3 ) . Similarly , the Bellman optimality equation is given by Q∗h ( s , a ) = rh ( s , a ) + 1 β log { Es′∼Ph ( · | s , a ) [ exp ( β · V ∗h+1 ( s′ ) ) ] } , ( 5 ) V ∗h ( s ) = max a∈A Q∗h ( s , a ) , V ∗ H+1 ( s ) = 0 , again for all ( h , s , a ) ∈ [ H ] × S × A . In the above , we use the shorthand Q∗h ( · , · ) : = Qπ ∗ h ( · , · ) for all h ∈ [ H ] and V ∗h ( · ) is similarly defined . The identity V ∗h ( · ) = maxa∈AQ∗h ( · , a ) implies that the optimal π∗ is the greedy policy with respect to the optimal action-value function { Q∗h } h∈ [ H ] . During the learning process , the policy πk in each episode k may be different from the optimal π∗ . We quantify this difference over all K episodes through the notion of regret , defined as Regret ( K ) : = ∑ k∈ [ K ] [ V ∗1 ( s k 1 ) − V π k 1 ( s k 1 ) ] . ( 6 ) Since V ∗1 ( s ) ≥ V π1 ( s ) for any π and s ∈ S by definition , regret also characterizes the suboptimality of { πk } relative to the optimal π∗ . | The paper studies risk-sensitive reinforcement learning with the entropic risk measure and function approximation. A meta algorithm based on value iteration is first proposed, then the paper proposes two concrete instantiations, one for linear function approximation and one for general function approximation. Regret bound for both algorithms depend sub-linearly in the number of episodes, and the linear one depends polynomially on the ambient dimension, whereas the general one depends polynomially on the Eluder dimension. | SP:993930791c2d4699190c699e147ecc0518a4c6b4 |
Entropic Risk-Sensitive Reinforcement Learning: A Meta Regret Framework with Function Approximation | 1 INTRODUCTION . Risk is one of the most important considerations in decision making , so should it be in reinforcement learning ( RL ) . As a prominent paradigm in RL that performs learning while accounting for risk , risksensitive RL explicitly models risk of decisions via certain risk measures and optimizes for rewards simultaneously . It is poised to play an essential role in application domains where accounting for risk in decision making is crucial . A partial list of such domains includes autonomous driving ( Buehler et al. , 2009 ; Thrun , 2010 ) , behavior modeling ( Niv et al. , 2012 ; Shen et al. , 2014 ) , realtime strategy games ( Berner et al. , 2019 ; Vinyals et al. , 2019 ) and robotic surgery ( Fagogenis et al. , 2019 ; Shademan et al. , 2016 ) . In this paper , we study risk-sensitive RL through the lens of function approximation , which is an important apparatus for scaling up and accelerating RL algorithms in applications of high dimension . We focus on risk-sensitive RL with the entropic risk measure , a classical framework established by the seminal work of Howard & Matheson ( 1972 ) . Informally , for a fixed risk parameter β 6= 0 , our goal is to maximize the objective Vβ = 1 β log { EeβR } . ( 1 ) The definition of Vβ will be made formal later in ( 2 ) . The objective ( 1 ) admits a Taylor expansion Vβ = E [ R ] + β2 Var ( R ) + O ( β 2 ) . Comparing ( 1 ) with the risk-neutral objective V = E [ R ] studied in the standard RL setting , we see that β > 0 induces a risk-seeking objective and β < 0 induces a risk-averse one . Therefore , the formulation with the entropic risk measure in ( 1 ) accounts for both risk-seeking and risk-averse modes of decision making , whereas most others are restricted to the risk-averse setting ( Fu et al. , 2018 ) . It can also be seen that Vβ tends to the risk-neutral V as β → 0 . Existing works on function approximation for RL have mostly focused on the risk-neutral setting and heavily exploits the linearity of risk-neutral objective V in both transition dynamics ( implicitly captured by the expectation ) and the reward R , which is clearly not available in the risk-sensitive objective ( 1 ) . It is also well known that even in the risk-neutral setting , improperly implemented function approximation could result in errors that scale exponentially in the size of the state space . Combined with nonlinearity of the risk-sensitive objective ( 1 ) , it compounds the difficulties of implementing function approximation in risk-sensitive RL with provable guarantees . This work provides a principled solution to function approximation in risk-sensitive RL by overcoming the above difficulties . Under the finite-horizon MDP setting , we propose a meta algorithm based on value iteration , and from that we derive two concrete algorithms for linear and general function approximation , which we name RSVI.L and RSVI.G , respectively . By modeling a shifted exponential transformation of estimated value functions , RSVI.L and RSVI.G cater to the nonlinearity of the risk-sensitive objective ( 1 ) and adapt to both risk-seeking and risk-averse settings . Moreover , both RSVI.L and RSVI.G maintain risk-sensitive optimism in the face of uncertainty for effective exploration . In particular , RSVI.L exploits a synergistic relationship between feature mapping and regularization in a risk-sensitive fashion . The resulting structure of RSVI.L makes it more efficient in runtime and memory than RSVI.G under linear function approximation , while RSVI.G is more general and allows for function approximation beyond the linear setting . Furthermore , we develop a meta regret analytic framework and identify a risk-sensitive optimism condition that serves as the core component of the framework . Under the optimism condition , we prove a meta regret bound incurred by any instance of the meta algorithm , regardless of function approximation settings . Furthermore , we show that both RSVI.L and RSVI.G satisfy the optimism condition under the respective function approximation and achieve regret that scales sublinearly in the number of episodes . The meta framework therefore helps us disentangle the analysis associated with function approximation from the generic analysis , shedding light on the role of function approximation in regret guarantees . We hope that our meta framework will motivate and benefit future studies of function approximation in risk-sensitive RL . Our contributions . We may summarize the contributions of the present paper as follows : • we study function approximation in risk-sensitive RL with the entropic risk measure ; we provide a meta algorithm , from which we derive two concrete algorithms for linear and general function approximation , respectively ; the concrete algorithms are both shown to adapt to all levels of risk sensitivity and maintain risk-sensitive optimism over the learning process ; • we develop a meta regret analytic framework and identify a risk-sensitive optimism condition , under which we prove a meta regret bound for the meta algorithm ; furthermore , by showing that the optimism condition holds for both concrete algorithms , we establish regret bounds for them under linear and general function approximation , respectively . Notations . For a positive integer n , we let [ n ] : = { 1 , 2 , . . . , n } . For a number u 6= 0 , we define sign ( u ) = 1 if u > 0 and −1 if u < 0 . For two non-negative sequences { ai } and { bi } , we write ai . bi if there exists a universal constant C > 0 such that ai ≤ Cbi for all i , and write ai bi if ai . bi and bi . ai . We use Õ ( · ) to denote O ( · ) while hiding logarithmic factors . For any ε > 0 and set X , we letNε ( X , ‖ · ‖ ) be the ε-net of the set X with respect to the norm ‖ · ‖ . We let ∆ ( X ) be the set of probability distributions supported on X . For any vector u ∈ Rn and symmetric and positive definite matrix Γ ∈ Rn×n , we let ‖u‖Γ : = √ u > Γu . We denote by In the n × n identity matrix . 2 RELATED WORK . Initiated by the seminal work of Howard & Matheson ( 1972 ) , risk-sensitive control/RL with the entropic risk measure has been studied in a vast body of literature ( Bäuerle & Rieder , 2014 ; Borkar , 2001 ; 2002 ; 2010 ; Borkar & Meyn , 2002 ; Cavazos-Cadena & Hernández-Hernández , 2011 ; Coraluppi & Marcus , 1999 ; Di Masi & Stettner , 1999 ; 2000 ; 2007 ; Fleming & McEneaney , 1995 ; Hernández-Hernández & Marcus , 1996 ; Jaśkiewicz , 2007 ; Marcus et al. , 1997 ; Mihatsch & Neuneier , 2002 ; Osogami , 2012 ; Patek , 2001 ; Shen et al. , 2013 ; 2014 ; Whittle , 1990 ) . Yet , this line of works either assumes known transition kernels or focuses on asymptotic behaviors of the problem/algorithms , and finite-sample/time results with unknown transitions have rarely been investigated . The most relevant work to ours is perhaps Fei et al . ( 2020 ) , who consider the same problem as ours under the tabular setting . They propose two algorithms based on value iteration and Q-learning . They prove regret bounds for their algorithms , which are then certified to be nearly optimal by a lower bound . However , their algorithms and analysis are restricted to the tabular setting . Compared to Fei et al . ( 2020 ) , our paper provides a novel and unified framework of algorithms and analysis for function approximation . We study linear and general function approximation as two instances of the framework , both of which subsume the tabular setting . We also briefly discuss existing works on function approximation with regret analysis , which so far have focused on the risk-neutral setting . The works of Cai et al . ( 2019 ) ; Jin et al . ( 2019 ) ; Wang et al . ( 2019 ) ; Yang & Wang ( 2019 ) ; Zhou et al . ( 2020 ) study linear function approximation , while Ayoub et al . ( 2020 ) ; Wang et al . ( 2020 ) investigate general function approximation . In addition , all these works prove Õ ( K1/2 ) -regret for their algorithms , although dependence on other parameters varies in settings . As we have argued in the previous section , the nonlinear objective ( 1 ) makes algorithm design and regret analysis for function approximation much more challenging in risksensitive settings than in the standard risk-neutral one . 3 PROBLEM FORMULATION . 3.1 EPISODIC MDP . An episodic MDP is parameterized by a tuple ( K , H , S , A , { Ph } h∈ [ H ] , { rh } h∈ [ H ] ) , where K is the number of episodes , H is the number of steps in each episode , S is the state space , A is the action space , Ph : S ×A → ∆ ( S ) is the transition kernel at step h , and rh : S ×A → [ 0 , 1 ] is the reward function at step h. We assume that { Ph } are unknown . For simplicity we also assume that { rh } are known and deterministic , as is done in existing works such as Yang & Wang ( 2019 ) ; Zhou et al . ( 2020 ) . We interact with the episodic MDP as follows . In the beginning of each episode k ∈ [ K ] , the environment chooses an arbitrary initial state sk1 ∈ S . Then in each step h ∈ [ H ] , we take an action akh ∈ A , receives a reward rh ( skh , akh ) and transitions to the next state skh+1 ∈ S sampled from Ph ( · | skh , akh ) . Once we reach skH+1 , the current episode terminates and we advance to the next episode unless k = K . 3.2 VALUE FUNCTIONS , BELLMAN EQUATIONS AND REGRET . We assume that β is fixed prior to the learning process , and for notational simplicity we omit it from quantities to be introduced subsequently . In risk-sensitive RL with the entropic risk measure , we aim to find a policy π = { πh : S → A } so as to maximize the value function given by V πh ( s ) : = 1 β log { E [ exp ( β H∑ h′=h rh′ ( sh′ , πh′ ( sh′ ) ) ) ] ∣∣∣∣∣ sh = s } , ( 2 ) for all ( h , s ) ∈ [ H ] × S. Under some mild regularity conditions , there exists a greedy policy π∗ = { π∗h } which gives the optimal value V π ∗ h ( s ) = supπ V π h ( s ) for all ( h , s ) ∈ [ H ] × S ( Bäuerle & Rieder , 2014 ) . In addition to the value function , another key notion is the action-value function defined as Qπh ( s , a ) : = 1 β log { E [ exp ( β H∑ h′=h rh′ ( sh′ , ah′ ) ) ∣∣∣∣∣ sh = s , ah = a ] } , ( 3 ) for all ( h , s , a ) ∈ [ H ] × S ×A . The action-value function Qπh is closely associated with the value function V π h via the so-called Bellman equation : Qπh ( s , a ) = rh ( s , a ) + 1 β log { Es′∼Ph ( · | s , a ) [ exp ( β · V πh+1 ( s′ ) ) ] } , ( 4 ) V πh ( s ) = Q π h ( s , πh ( s ) ) , V π H+1 ( s ) = 0 , which holds for all ( h , s , a ) ∈ [ H ] × S ×A . Note that the identity of Qπh in ( 4 ) is a result of simple calculation based on ( 2 ) and ( 3 ) . Similarly , the Bellman optimality equation is given by Q∗h ( s , a ) = rh ( s , a ) + 1 β log { Es′∼Ph ( · | s , a ) [ exp ( β · V ∗h+1 ( s′ ) ) ] } , ( 5 ) V ∗h ( s ) = max a∈A Q∗h ( s , a ) , V ∗ H+1 ( s ) = 0 , again for all ( h , s , a ) ∈ [ H ] × S × A . In the above , we use the shorthand Q∗h ( · , · ) : = Qπ ∗ h ( · , · ) for all h ∈ [ H ] and V ∗h ( · ) is similarly defined . The identity V ∗h ( · ) = maxa∈AQ∗h ( · , a ) implies that the optimal π∗ is the greedy policy with respect to the optimal action-value function { Q∗h } h∈ [ H ] . During the learning process , the policy πk in each episode k may be different from the optimal π∗ . We quantify this difference over all K episodes through the notion of regret , defined as Regret ( K ) : = ∑ k∈ [ K ] [ V ∗1 ( s k 1 ) − V π k 1 ( s k 1 ) ] . ( 6 ) Since V ∗1 ( s ) ≥ V π1 ( s ) for any π and s ∈ S by definition , regret also characterizes the suboptimality of { πk } relative to the optimal π∗ . | This paper proposes a risk-sensitive algorithm with function approximation in reinforcement learning. To handle the uncertainty, the proposed algorithms consider an entropic risk value function controlled by a risk parameter, which provides a unified framework for both risk-sensitive and risk-averse settings. The main contribution of this paper is to provide theoretical guarantees for the proposed algorithms. | SP:993930791c2d4699190c699e147ecc0518a4c6b4 |
Learning Predictive Communication by Imagination in Networked System Control | 1 INTRODUCTION . Networked system control ( NSC ) is extensively studied and widely applied , including connected vehicle control ( Jin & Orosz , 2014 ) , traffic signal control ( Chu et al. , 2020b ) , distributed sensing ( Xu et al. , 2016 ) , networked storage operation ( Qin et al. , 2015 ) etc . In NSC , agents are connected via a communication network for a cooperative control objective . For example , in an adaptive traffic signal control system , each traffic light performs decentralized control based on its local observations and messages from connected neighbors . Although deep reinforcement learning has been successfully applied to some complex problems , such as Go ( Silver et al. , 2016 ) , and Starcraft II ( Vinyals et al. , 2019 ) , it is still not scalable in many real-world networked control problems . Multiagent reinforcement learning ( MARL ) addresses the issue of scalability by performing decentralized control . Recent decentralized MARL performs decentralized control based on the assumptions of global observations and local or global rewards ( Zhang et al. , 2018 ; 2019a ; Qu et al. , 2019 ; 2020b ; a ) , which are reasonable in multi-agent gaming but not suitable in NSC . A practical solution is to allow each agent to perform decentralized control based on its local observations and messages from the connected neighbors . Various communication-based methods are proposed to stabilize training and improve observability , and communication is studied to enable agents to behave as a group , rather than a collection of individuals ( Sukhbaatar & Fergus , 2016 ; Chu et al. , 2020a ) . Despite recent advances in neural communication ( Sukhbaatar & Fergus , 2016 ; Foerster et al. , 2016 ; Chu et al. , 2020a ) , delayed global information sharing remains an open problem that widely exists in many NSC applications . Communication protocol not only reflects the situation at hand but also guides the policy optimization . Recent deep neural models ( Sukhbaatar & Fergus , 2016 ; Foerster et al. , 2016 ; Hoshen , 2017 ) implement differentiable communication based on available connections . However , in NSC , such as traffic signal control , each agent only connects to its neighbors , leading to a delay in receiving messages from the distant agents in the system , and the non-stationarity mainly comes from these partial observation ( Chu et al. , 2020a ) . Communication with delayed global information limits the learnability of RL because RL agents can only use the delayed information and not leverage potential future information . Moreover , it is not efficient in situations where an environment is sensitive when the behaviours of agents change . It is therefore of great practical relevance to develop algorithms which can learn beyond the communication with the delayed information sharing . In this paper we introduce ImagComm that learns communication by imagination for multi-agent reinforcement learning in NSC . We leverage the model of the agent ’ s world to provide an estimate of farsighted information in latent space for communication . At each time step , the agent is allowed to imagine its future states in an abstract space and convey this information to its neighbors . Therefore unlike previous works , our communication protocol conveys not only the current sharing information but also the imagined sharing information . It is applicable whenever communication changes frequently , e.g . at every time step agents may receive new communication information . We summarize our main contributions as follows : ( 1 ) We first introduce the imagination module that can be used to learn latent dynamics for communication in networked multi-agent systems control . ( 2 ) We predict the future state of each local agent and allow each agent to convey the latent state to neighbors as messages , which reduce the delay of global information . ( 3 ) We demonstrate that leveraging the predictive communication by imagination in latent space succeeds in networked system control . We explore this model on a range of NSC tasks . Our results demonstrate that our method consistently outperform baselines on these tasks . 2 RELATED WORK . Networked system control ( NSC ) considers the problem where agents are connected via a communication network for a cooperative control objective , such as autonomous vehicle control ( Jin & Orosz , 2014 ) , adaptive traffic signal control ( Chu et al. , 2020b ) , and distributed sensing ( Xu et al. , 2016 ) , etc . Recently reinforcement learning has become popular for NSC through decentralized control and communications by networked agents . Communication is an important part for multi-agent RL to compensate for the information loss in partial observations . Heuristic communication allows the agents to share some certain forms of information , such as policy fingerprints from other agents ( Foerster et al. , 2017 ) and averaged neighbor ’ s policies ( Yang et al. , 2018 ) . Recently end-to-end differentiable communications have become popular ( Foerster et al. , 2016 ; Sukhbaatar & Fergus , 2016 ; Chu et al. , 2020a ) since the communication channel is learned to optimize the performance . Attention-based communication ( Hoshen , 2017 ; Das et al. , 2019 ; Singh et al. , 2019 ) selectively send messages to the agents chosen , however , these are not suitable for NSC since the communication is allowed only between connected neighbors . Our method adopts differentiable communication with end-to-end training . Compared to existing works , we introduce a new predictive communication module through learning latent dynamics . Learning latent dynamics has been studied to solve single agent tasks , such as E2C ( Watter et al. , 2015 ) , RCE ( Banijamali et al. , 2018 ) , PlaNet ( Hafner et al. , 2019 ) , SOLAR ( Zhang et al. , 2019b ) and so on . Lee et al . ( 2019 ) and Gregor et al . ( 2019 ) learn belief representations to accelerate modelfree agents . World Models ( Ha & Schmidhuber , 2018 ) learn latent dynamics in a two-stage process to evolve linear controllers in imagination . I2A ( Racanière et al. , 2017 ) hands imagined trajectories to a model-free policy based on a rollout encoder . In contrast to these works , our work considers multi-agent tasks and learns predictive communication by imagination in latent space . 3 PRELIMINARIES . In networked system control problem , we work with a networked system , which is described by a graph G ( V , E ) , where i ∈ V denotes the ith agent and ij ∈ E denotes the communication link between agents i and j . The corresponding networked ( cooperative ) multi-agent MDP is defined by a tuple ( G , { Si , Ai } i∈V , { Mij } ij∈E , p , { ri } i∈V ) . Si and Ai are the local state space and action space of agent i . Let S : = ∪i∈VSi and A : = ∪i∈VAi , the MDP transitions follow a stationary probability distribution p : S×A×S → [ 0 , 1 ] . The global reward is denoted by r : S×A → R and defined as r = 1|V| ∑ i∈V ri indicating that all local rewards are shared globally . The communication is limited to neighborhoods . M denotes the message space for the communication model . That is each agent i observes s̃i , t : = si , t ∪mNii , t , where si , t ∈ Si denotes local state space of agent i and mNii , t : = { mji , t } j∈Ni andNi : = { j ∈ V|ji ∈ E } . Message mji , t ∈Mji denotes all the available information at an agent ’ s neighbor . In NSC , the system is decentralized and the communication is limited to neighborhoods . Each agent i follows a decentralized policy πi : S̃i × Ai → [ 0 , 1 ] to choose its own action ai , t ∼ πi ( ·|s̃i , t ) at time t. The objective is to maximize Eπ [ R0 ] , where Rt = ∑∞ l=0 γ lrt+l and γ is a discount factor . 4 METHODOLOGY . Our goal is to learn predictive communication on a particular observation or environment state . We start by introducing the networked MDP with neighborhood communications and delayed information issue in communication . Then , we describe ImagComm that utilizes predictive communication , which we learn the agent ’ s world model to provide an additional context for communication . 4.1 DELAYED COMMUNICATION IN NETWORKED SYSTEM CONTROL . Following the setting of NSC in ( Chu et al. , 2020a ) , we assume that all messages sent from agent i are identical and we denote mij = mi , ∀j ∈ Ni . The message explicitly includes state s and policy π and agent belief h , i.e. , mi , t = si , t ∪ πi , t−1 ∪ hi , t−1 in communication . Note that πi , t−1 is the probability distribution over discrete actions . Thus for each agent in NSC , s̃i , t : = sVi , t ∪ πNi , t−1 ∪ hNi , t−1 . Note the communication phase is prior-decision , so only hi , t−1 and πi , t−1 are available . This protocol can be easily extended for multi-pass communication . We assume that any information that agent j knows at time t can be included in mji , t and mji , t = sj , t ∪ { mkj , t−1 } k∈Nj . Then s̃i , t : = si , t ∪ { sj , t+1−dij } j∈V/ { i } , which includes the delayed global observations . dij indicates the distance between i and j , i.e . the hops between two agents on the graph of the networked system . We illustrate the delayed information in Figure 1 . A more rigorous analysis of this conclusion can be found in the Appendix A . 4.2 PREDICTIVE COMMUNICATION . To reduce the delay of global information , we consider a forward model for predicting future states of each agent j , then sj , t+1 can be encoded as a message for communication , and agent i can benefit from this information . Let ŝi , t be the abstract state of ith agent , Wi ∈ Wi be a world model of the transition dynamics from ŝi , t to the abstract state ŝi , t+1 , and let bi , t : = ∪kτ=1ŝi , t+τ denote the predictive message . We aim to build a policy based on delayed global observations and predictive messages . The value of policy πi can be defined as V π , W i ( s ) based on the model Wi : V π , Wi ( s , aNi ) = Eai , t∼πi ( ·|s̃i , t , bi , t ) [ Rπi , t | s̃t = s , aNi , t = aNi ] . ( 1 ) Learning based on ( 1 ) has the benefit of reduced delay in global information compared to that without bi , t ; this is formally presented in Proposition 1 . Proofs are provided in Appendix A . Proposition 1 . ImagComm can reduce the delay of global information by incorporating a predictive model in the communication protocol . We are now interested in constructing an abstract model Ŵi ( · ; ϕ ) to approximateWi , which operates on an abstract state . Let ŝi , t+1 be the new abstract state sampled by ŝi , t+1 ∼ Ŵi ( ŝi , t ) . We want to minimize‖ŝi , t+1 − gi ( si , t+1 ; ψ ) ‖ , where gi ( · ; ψ ) is an embedding of raw states . Let V π , Ŵi be the value function of the policy on the estimated model Ŵi . Towards optimizing V π , W∗ i ( s , aNi ) , we build a lower bound as follows and maximize it iteratively : V π , W ∗ i ( s , aNi ) ≥ V π , Ŵi ( s , aNi ) −D ( Ŵ , π ) , ( 2 ) where D ( Ŵ , π ) ∈ R bounds the discrepancy between V π , W ? i and V π , Ŵ i . In practice , D ( Ŵi , πi ) is defined as Dπrefi ( Ŵi , πi ) = α · Es0 , ... , st , ∼πrefi [ ‖Ŵi ( ŝi , t ) − gi ( si , t+1 ) ‖ ] , ( 3 ) where α is a hyperparameter , πrefi is the policy used for sampling . For each agent , we solve the following problem : πk+1 , W k+1 = argmax π∈Π , W∈W V π , Wi −Dπki , δ ( W , π ) . ( 4 ) With the predictive imagination module , each agent utilizes the estimate of predictive state information to learn its belief and optimize the control performance of all other agents . Follow the analysis in ( Luo et al. , 2018 ) , we can show that ImagComm can lead to monotonic improvement in policy iteration . Proofs are defered to Appendix A . Proposition 2 . Suppose that W ∗i ∈ Wi is the optimal model and the optimization problem in equation ( 4 ) is solvable at each iteration . Solving ( 4 ) produces a sequence of policies π0i , . . . , π T i with monotonically increasing values : V π 0 , W∗ i ≤ V π 1 , W∗ i ≤ · · · ≤ V π T , W∗ i . A conclusion following directly from Proposition 2 is that solving ( 4 ) will converge to a local maximum . ImagComm considers build a world model and predict the farsighted state by a imagination module to eliminate the delay in global information and henceforth reduce the negative influence of the partial observability . Because the future information after time t compensate for some of the delayed information at time t. Next we will present the differentiable neural communication with imagination . | The paper proposes to communicate predicted local states between neighboring agents to address the problem of delayed information in networked multi-agent reinforcement learning. To enable agents to predict future states, a world model is learned at each agent. It is empirically demonstrated that the proposed method has good performance in traffic signal control and cooperative adaptive cruise control. | SP:515995dd42b4aecbd625206b16aeaca43c5a1495 |
Learning Predictive Communication by Imagination in Networked System Control | 1 INTRODUCTION . Networked system control ( NSC ) is extensively studied and widely applied , including connected vehicle control ( Jin & Orosz , 2014 ) , traffic signal control ( Chu et al. , 2020b ) , distributed sensing ( Xu et al. , 2016 ) , networked storage operation ( Qin et al. , 2015 ) etc . In NSC , agents are connected via a communication network for a cooperative control objective . For example , in an adaptive traffic signal control system , each traffic light performs decentralized control based on its local observations and messages from connected neighbors . Although deep reinforcement learning has been successfully applied to some complex problems , such as Go ( Silver et al. , 2016 ) , and Starcraft II ( Vinyals et al. , 2019 ) , it is still not scalable in many real-world networked control problems . Multiagent reinforcement learning ( MARL ) addresses the issue of scalability by performing decentralized control . Recent decentralized MARL performs decentralized control based on the assumptions of global observations and local or global rewards ( Zhang et al. , 2018 ; 2019a ; Qu et al. , 2019 ; 2020b ; a ) , which are reasonable in multi-agent gaming but not suitable in NSC . A practical solution is to allow each agent to perform decentralized control based on its local observations and messages from the connected neighbors . Various communication-based methods are proposed to stabilize training and improve observability , and communication is studied to enable agents to behave as a group , rather than a collection of individuals ( Sukhbaatar & Fergus , 2016 ; Chu et al. , 2020a ) . Despite recent advances in neural communication ( Sukhbaatar & Fergus , 2016 ; Foerster et al. , 2016 ; Chu et al. , 2020a ) , delayed global information sharing remains an open problem that widely exists in many NSC applications . Communication protocol not only reflects the situation at hand but also guides the policy optimization . Recent deep neural models ( Sukhbaatar & Fergus , 2016 ; Foerster et al. , 2016 ; Hoshen , 2017 ) implement differentiable communication based on available connections . However , in NSC , such as traffic signal control , each agent only connects to its neighbors , leading to a delay in receiving messages from the distant agents in the system , and the non-stationarity mainly comes from these partial observation ( Chu et al. , 2020a ) . Communication with delayed global information limits the learnability of RL because RL agents can only use the delayed information and not leverage potential future information . Moreover , it is not efficient in situations where an environment is sensitive when the behaviours of agents change . It is therefore of great practical relevance to develop algorithms which can learn beyond the communication with the delayed information sharing . In this paper we introduce ImagComm that learns communication by imagination for multi-agent reinforcement learning in NSC . We leverage the model of the agent ’ s world to provide an estimate of farsighted information in latent space for communication . At each time step , the agent is allowed to imagine its future states in an abstract space and convey this information to its neighbors . Therefore unlike previous works , our communication protocol conveys not only the current sharing information but also the imagined sharing information . It is applicable whenever communication changes frequently , e.g . at every time step agents may receive new communication information . We summarize our main contributions as follows : ( 1 ) We first introduce the imagination module that can be used to learn latent dynamics for communication in networked multi-agent systems control . ( 2 ) We predict the future state of each local agent and allow each agent to convey the latent state to neighbors as messages , which reduce the delay of global information . ( 3 ) We demonstrate that leveraging the predictive communication by imagination in latent space succeeds in networked system control . We explore this model on a range of NSC tasks . Our results demonstrate that our method consistently outperform baselines on these tasks . 2 RELATED WORK . Networked system control ( NSC ) considers the problem where agents are connected via a communication network for a cooperative control objective , such as autonomous vehicle control ( Jin & Orosz , 2014 ) , adaptive traffic signal control ( Chu et al. , 2020b ) , and distributed sensing ( Xu et al. , 2016 ) , etc . Recently reinforcement learning has become popular for NSC through decentralized control and communications by networked agents . Communication is an important part for multi-agent RL to compensate for the information loss in partial observations . Heuristic communication allows the agents to share some certain forms of information , such as policy fingerprints from other agents ( Foerster et al. , 2017 ) and averaged neighbor ’ s policies ( Yang et al. , 2018 ) . Recently end-to-end differentiable communications have become popular ( Foerster et al. , 2016 ; Sukhbaatar & Fergus , 2016 ; Chu et al. , 2020a ) since the communication channel is learned to optimize the performance . Attention-based communication ( Hoshen , 2017 ; Das et al. , 2019 ; Singh et al. , 2019 ) selectively send messages to the agents chosen , however , these are not suitable for NSC since the communication is allowed only between connected neighbors . Our method adopts differentiable communication with end-to-end training . Compared to existing works , we introduce a new predictive communication module through learning latent dynamics . Learning latent dynamics has been studied to solve single agent tasks , such as E2C ( Watter et al. , 2015 ) , RCE ( Banijamali et al. , 2018 ) , PlaNet ( Hafner et al. , 2019 ) , SOLAR ( Zhang et al. , 2019b ) and so on . Lee et al . ( 2019 ) and Gregor et al . ( 2019 ) learn belief representations to accelerate modelfree agents . World Models ( Ha & Schmidhuber , 2018 ) learn latent dynamics in a two-stage process to evolve linear controllers in imagination . I2A ( Racanière et al. , 2017 ) hands imagined trajectories to a model-free policy based on a rollout encoder . In contrast to these works , our work considers multi-agent tasks and learns predictive communication by imagination in latent space . 3 PRELIMINARIES . In networked system control problem , we work with a networked system , which is described by a graph G ( V , E ) , where i ∈ V denotes the ith agent and ij ∈ E denotes the communication link between agents i and j . The corresponding networked ( cooperative ) multi-agent MDP is defined by a tuple ( G , { Si , Ai } i∈V , { Mij } ij∈E , p , { ri } i∈V ) . Si and Ai are the local state space and action space of agent i . Let S : = ∪i∈VSi and A : = ∪i∈VAi , the MDP transitions follow a stationary probability distribution p : S×A×S → [ 0 , 1 ] . The global reward is denoted by r : S×A → R and defined as r = 1|V| ∑ i∈V ri indicating that all local rewards are shared globally . The communication is limited to neighborhoods . M denotes the message space for the communication model . That is each agent i observes s̃i , t : = si , t ∪mNii , t , where si , t ∈ Si denotes local state space of agent i and mNii , t : = { mji , t } j∈Ni andNi : = { j ∈ V|ji ∈ E } . Message mji , t ∈Mji denotes all the available information at an agent ’ s neighbor . In NSC , the system is decentralized and the communication is limited to neighborhoods . Each agent i follows a decentralized policy πi : S̃i × Ai → [ 0 , 1 ] to choose its own action ai , t ∼ πi ( ·|s̃i , t ) at time t. The objective is to maximize Eπ [ R0 ] , where Rt = ∑∞ l=0 γ lrt+l and γ is a discount factor . 4 METHODOLOGY . Our goal is to learn predictive communication on a particular observation or environment state . We start by introducing the networked MDP with neighborhood communications and delayed information issue in communication . Then , we describe ImagComm that utilizes predictive communication , which we learn the agent ’ s world model to provide an additional context for communication . 4.1 DELAYED COMMUNICATION IN NETWORKED SYSTEM CONTROL . Following the setting of NSC in ( Chu et al. , 2020a ) , we assume that all messages sent from agent i are identical and we denote mij = mi , ∀j ∈ Ni . The message explicitly includes state s and policy π and agent belief h , i.e. , mi , t = si , t ∪ πi , t−1 ∪ hi , t−1 in communication . Note that πi , t−1 is the probability distribution over discrete actions . Thus for each agent in NSC , s̃i , t : = sVi , t ∪ πNi , t−1 ∪ hNi , t−1 . Note the communication phase is prior-decision , so only hi , t−1 and πi , t−1 are available . This protocol can be easily extended for multi-pass communication . We assume that any information that agent j knows at time t can be included in mji , t and mji , t = sj , t ∪ { mkj , t−1 } k∈Nj . Then s̃i , t : = si , t ∪ { sj , t+1−dij } j∈V/ { i } , which includes the delayed global observations . dij indicates the distance between i and j , i.e . the hops between two agents on the graph of the networked system . We illustrate the delayed information in Figure 1 . A more rigorous analysis of this conclusion can be found in the Appendix A . 4.2 PREDICTIVE COMMUNICATION . To reduce the delay of global information , we consider a forward model for predicting future states of each agent j , then sj , t+1 can be encoded as a message for communication , and agent i can benefit from this information . Let ŝi , t be the abstract state of ith agent , Wi ∈ Wi be a world model of the transition dynamics from ŝi , t to the abstract state ŝi , t+1 , and let bi , t : = ∪kτ=1ŝi , t+τ denote the predictive message . We aim to build a policy based on delayed global observations and predictive messages . The value of policy πi can be defined as V π , W i ( s ) based on the model Wi : V π , Wi ( s , aNi ) = Eai , t∼πi ( ·|s̃i , t , bi , t ) [ Rπi , t | s̃t = s , aNi , t = aNi ] . ( 1 ) Learning based on ( 1 ) has the benefit of reduced delay in global information compared to that without bi , t ; this is formally presented in Proposition 1 . Proofs are provided in Appendix A . Proposition 1 . ImagComm can reduce the delay of global information by incorporating a predictive model in the communication protocol . We are now interested in constructing an abstract model Ŵi ( · ; ϕ ) to approximateWi , which operates on an abstract state . Let ŝi , t+1 be the new abstract state sampled by ŝi , t+1 ∼ Ŵi ( ŝi , t ) . We want to minimize‖ŝi , t+1 − gi ( si , t+1 ; ψ ) ‖ , where gi ( · ; ψ ) is an embedding of raw states . Let V π , Ŵi be the value function of the policy on the estimated model Ŵi . Towards optimizing V π , W∗ i ( s , aNi ) , we build a lower bound as follows and maximize it iteratively : V π , W ∗ i ( s , aNi ) ≥ V π , Ŵi ( s , aNi ) −D ( Ŵ , π ) , ( 2 ) where D ( Ŵ , π ) ∈ R bounds the discrepancy between V π , W ? i and V π , Ŵ i . In practice , D ( Ŵi , πi ) is defined as Dπrefi ( Ŵi , πi ) = α · Es0 , ... , st , ∼πrefi [ ‖Ŵi ( ŝi , t ) − gi ( si , t+1 ) ‖ ] , ( 3 ) where α is a hyperparameter , πrefi is the policy used for sampling . For each agent , we solve the following problem : πk+1 , W k+1 = argmax π∈Π , W∈W V π , Wi −Dπki , δ ( W , π ) . ( 4 ) With the predictive imagination module , each agent utilizes the estimate of predictive state information to learn its belief and optimize the control performance of all other agents . Follow the analysis in ( Luo et al. , 2018 ) , we can show that ImagComm can lead to monotonic improvement in policy iteration . Proofs are defered to Appendix A . Proposition 2 . Suppose that W ∗i ∈ Wi is the optimal model and the optimization problem in equation ( 4 ) is solvable at each iteration . Solving ( 4 ) produces a sequence of policies π0i , . . . , π T i with monotonically increasing values : V π 0 , W∗ i ≤ V π 1 , W∗ i ≤ · · · ≤ V π T , W∗ i . A conclusion following directly from Proposition 2 is that solving ( 4 ) will converge to a local maximum . ImagComm considers build a world model and predict the farsighted state by a imagination module to eliminate the delay in global information and henceforth reduce the negative influence of the partial observability . Because the future information after time t compensate for some of the delayed information at time t. Next we will present the differentiable neural communication with imagination . | The paper provides an interesting way to add structure to MARL problems that have delay in the communication of state information. By explicitly building a predictive module for the future latent state of the agent and including that predicted state in the passed messages, it is possible that the agent will appropriately pass information that removes the effect of the delay in message passing across the network. They then apply this model to some interesting traffic light and cooperative vehicle control tasks. | SP:515995dd42b4aecbd625206b16aeaca43c5a1495 |
Bowtie Networks: Generative Modeling for Joint Few-Shot Recognition and Novel-View Synthesis | 1 INTRODUCTION . Given a never-before-seen object ( e.g. , a gadwall in Figure 1 ) , humans are able to generalize even from a single image of this object in different ways , including recognizing new object instances and imagining what the object would look like from different viewpoints . Achieving similar levels of generalization for machines is a fundamental problem in computer vision , and has been actively explored in areas such as few-shot object recognition ( Fei-Fei et al. , 2006 ; Vinyals et al. , 2016 ; Wang & Hebert , 2016 ; Finn et al. , 2017 ; Snell et al. , 2017 ) and novel-view synthesis ( Park et al. , 2017 ; Nguyen-Phuoc et al. , 2018 ; Sitzmann et al. , 2019 ) . However , such exploration is often limited in separate areas with specialized algorithms but not jointly . We argue that synthesizing images and recognizing them are inherently interconnected with each other . Being able to simultaneously address both tasks with a single model is a crucial step toward human-level generalization . This requires learning a richer , shareable internal representation for more comprehensive object understanding than it could be within individual tasks . Such “ cross-task ” knowledge becomes particularly critical in the low-data regime , where identifying 3D geometric structures of input images facilities recognizing their semantic categories , and vice versa . Inspired by this insight , here we propose a novel task of joint few-shot recognition and novel-view synthesis : given only one or few images of a novel object from arbitrary views with only category annotation , we aim to simultaneously learn an object classifier and generate images of that type of object from new viewpoints . This joint task is challenging , because of its ( i ) weak supervision , where we do not have access to any 3D supervision , and ( ii ) few-shot setting , where we need to effectively learn both 3D geometric and semantic representations from minimal data . While existing work copes with two or more tasks mainly by multi-task learning or meta-learning of a shared feature representation ( Yu et al. , 2020 ; Zamir et al. , 2018 ; Lake et al. , 2015 ) , we take a different perspective in this paper . Motivated by the nature of our problem , we focus on the interaction and cooperation between a generative model ( for view synthesis ) and a discriminative model ( for recognition ) , in a way that facilitates knowledge to flow across tasks in complementary directions , thus making the tasks help each other . For example , the synthesized images produced by the generative model provide viewpoint variations and could be used as additional training data to build a better recognition model ; meanwhile , the recognition model ensures the preservation of the desired category information and deals with partial occlusions during the synthesis . To this end , we propose a feedback-based bowtie network ( FBNet ) , as illustrated in Figure 1 . The network consists of a view synthesis module and a recognition module , which are linked through feedback connections in a bowtie fashion . This is a general architecture that can be used on top of any view synthesis model and any recognition model . The view synthesis module explicitly learns a 3D geometric representation from 2D images , which is transformed to target viewpoints , projected to 2D features , and rendered to generate images . The recognition module then leverages these synthesized images from different views together with the original real images to learn a semantic feature representation and produce corresponding classifiers , leading to the feedback from the output of the view synthesis module to the input of the recognition module . The semantic features of real images extracted from the recognition module are further fed into the view synthesis module as conditional inputs , leading to the feedback from the output of the recognition module to the input of the view synthesis module . One potential difficulty , when combining the view synthesis and the recognition modules , lies in the mismatch in their level of image resolutions . Deep recognition models can benefit from highresolution images , and the recognition performance greatly improves with increased resolution ( Wang et al. , 2016 ; Cai et al. , 2019 ; He et al. , 2016 ) . By contrast , it is still challenging for modern generative models to synthesize very high-resolution images ( Regmi & Borji , 2018 ; Nguyen-Phuoc et al. , 2019 ) . To address this challenge , while operating on a resolution consistent with state-of-the-art view synthesis models ( Nguyen-Phuoc et al. , 2019 ) , we further introduce resolution distillation to leverage additional knowledge in a recognition model that is learned from higher-resolution images . Our contributions are three-folds . ( 1 ) We introduce a new problem of simultaneous few-shot recognition and novel-view synthesis , and address it from a novel perspective of cooperating generative and discriminative modeling . ( 2 ) We propose feedback-based bowtie networks that jointly learn 3D geometric and semantic representations with feedback in the loop . We further address the mismatch issue between different modules by leveraging resolution distillation . ( 3 ) Our approach significantly improves both view synthesis and recognition performance , especially in the low-data regime , by enabling direct manipulation of view , shape , appearance , and semantics in generative image modeling . 2 RELATED WORK . Few-Shot Recognition is a classic problem in computer vision ( Thrun , 1996 ; Fei-Fei et al. , 2006 ) . Many algorithms have been proposed to address this problem ( Vinyals et al. , 2016 ; Wang & Hebert , 2016 ; Finn et al. , 2017 ; Snell et al. , 2017 ) , including the recent efforts on leveraging generative models ( Li et al. , 2015 ; Wang et al. , 2018 ; Schwartz et al. , 2018 ; Zhang et al. , 2018 ; Tsutsui et al. , 2019 ; Chen et al. , 2019b ; Li et al. , 2019 ; Zhang et al. , 2019 ; Sun et al. , 2019 ) . A hallucinator is introduced to generate additional examples in a pre-trained feature space as data augmentation to help with low-shot classification ( Wang et al. , 2018 ) . MetaGAN improves few-shot recognition by producing fake images as a new category ( Zhang et al. , 2018 ) . However , these methods either do not synthesize images directly or use a pre-trained generative model that is not optimized towards the downstream task . By contrast , our approach performs joint training of recognition and view synthesis , and enables the two tasks to cooperate through feedback connections . In addition , while there has been work considering both classification and exemplar generation in the few-shot regime , such investigation focuses on simple domains like handwritten characters ( Lake et al. , 2015 ) but we address more realistic scenarios with natural images . Note that our effort is largely orthogonal to designing the best few-shot recognition or novel-view synthesis method ; instead , we show that the joint model outperforms the original methods addressing each task in isolation . Novel-View Synthesis aims to generate a target image with an arbitrary camera pose from one given source image ( Tucker & Snavely , 2020 ) . It is also known as “ multiview synthesis. ” For this task , some approaches are able to synthesize lifelike images ( Park et al. , 2017 ; Yin & Shi , 2018 ; Nguyen-Phuoc et al. , 2018 ; Sitzmann et al. , 2019 ; Iqbal et al. , 2020 ; Yoon et al. , 2020 ; Wiles et al. , 2020 ; Wortsman et al. , 2020 ) . However , they heavily rely on pose supervision or 3D annotation , which is not applicable in our case . An alternative way is to learn a view synthesis model in an unsupervised manner . Pix2Shape learns an implicit 3D scene representation by generating a 2.5D surfel based reconstruction ( Rajeswar et al. , 2020 ) . HoloGAN proposes an unsupervised approach to learn 3D feature representations and render 2D images accordingly ( Nguyen-Phuoc et al. , 2019 ) . Nguyen-Phuoc et al . ( 2020 ) learn scene representations from 2D unlabeled images through foreground-background fragmenting . Different from them , not only can our view synthesis module learn from weakly labeled images , but it also enables conditional synthesis to facilitate recognition . Feedback-Based Architectures , where the full or partial output of a system is routed back into the input as part of an iterative cause-and-effect process ( Ford , 1999 ) , have been recently introduced into neural networks ( Belagiannis & Zisserman , 2017 ; Zamir et al. , 2017 ; Yang et al. , 2018 ) . Compared with prior work , our FBNet contains two complete sub-networks , and the output of each module is fed into the other as one of the inputs . Therefore , FBNet is essentially a bi-directional feedback-based framework which optimizes the two sub-networks jointly . Multi-task Learning focuses on optimizing a collection of tasks jointly ( Misra et al. , 2016 ; Ruder , 2017 ; Kendall et al. , 2018 ; Pal & Balasubramanian , 2019 ; Xiao & Marlet , 2020 ) . Task relationships have also been studied ( Zamir et al. , 2018 ; Standley et al. , 2020 ) . Some recent work investigates the connection between recognition and view synthesis , and makes some attempt to combine them together ( Sun et al. , 2018 ; Wang et al. , 2018 ; Xian et al. , 2019 ; Santurkar et al. , 2019 ; Xiong et al. , 2020 ; Michalkiewicz et al. , 2020 ) . For example , Xiong et al . ( 2020 ) use multiview images to tackle fine-grained recognition tasks . However , their method needs strong pose supervision to train the view synthesis model , while we do not . Also , these approaches do not treat the two tasks of equal importance , i.e. , one task as an auxiliary task to facilitate the other . On the contrary , our approach targets the joint learning of the two tasks and improves both of their performance . Importantly , we focus on learning a shared generative model , rather than a shared feature representation as is normally the case in multi-task learning . Joint Data Augmentation and Task Model Learning leverage generative networks to improve other visual tasks ( Peng et al. , 2018 ; Hu et al. , 2019 ; Luo et al. , 2020 ; Zhang et al. , 2020 ) . A generative network and a discriminative pose estimation network are trained jointly through adversarial loss in Peng et al . ( 2018 ) , where the generative network performs data augmentation to facilitate the downstream pose estimation task . Luo et al . ( 2020 ) design a controllable data augmentation method for robust text recognition , which is achieved by tracking and refining the moving state of the control points . Zhang et al . ( 2020 ) study and make use of the relationship among facial expression recognition , face alignment , and face synthesis to improve training . Mustikovela et al . ( 2020 ) leverage a generative model to boost viewpoint estimation . The main difference is that we focus on the joint task of synthesis and recognition and achieve bi-directional feedback , while existing work only considers optimizing the target discriminative task using adversarial training or with a feedforward network . 3 OUR APPROACH . 3.1 JOINT TASK OF FEW-SHOT RECOGNITION AND NOVEL-VIEW SYNTHESIS . Problem Formulation : Given a dataset D = { ( xi , yi ) } , where xi ∈ X is an image of an object and yi ∈ C is the corresponding category label ( X and C are the image space and label space , respectively ) , we address the following two tasks simultaneously . ( i ) Object recognition : learning a discriminative model R : X → C that takes as input an image xi and predicts its category label . ( ii ) Novel-view synthesis : learning a generative model G : X ×Θ → X that , given an image xi of category yi and an arbitrary 3D viewpoint θj ∈ Θ , synthesizes an image in category yi viewed from θj . Notice that we are more interested in category-level consistency , for which G is able to generate images of not only the instance xi but also other objects of the category yi from different viewpoints . This joint-task scenario requires us to improve the performance of both 2D and 3D tasks under weak supervision without any ground-truth 3D annotations . Hence , we need to exploit the cooperation between them . Few-Shot Setting : The few-shot dataset consists of one or only a few images per category , which makes our problem even more challenging . To this end , following the recent work on knowledge transfer and few-shot learning ( Hariharan & Girshick , 2017 ; Chen et al. , 2019a ) , we leverage a set of “ base ” classes Cbase with a large-sample dataset Dbase = { ( xi , yi ) , yi ∈ Cbase } to train our initial model . We then fine-tune the pre-trained model on our target “ novel ” classes Cnovel ( Cbase∩Cnovel = 0 ) with its small-sample dataset Dnovel = { ( xi , yi ) , yi ∈ Cnovel } ( e.g. , a K-shot setting corresponds to K images per class ) . | This paper proposes a "feedback-based bowtie network" FBNet for joint generative synthesis via a GAN-based framework (specifically HoloGAN) and few-shot fine-grained recognition. The key idea of this work is to supervise both networks jointly via feedback mechanisms between the two, which helps to improve both tasks: image synthesis and few-shot recognition. The authors propose to use the synthesis network for synthesizing augmented images and additional losses computed by the image classification network along with conditional generation to improve the quality of the synthesized images. | SP:627a0f2c3be51ea6d1e8f56c7b2dd35142758509 |
Bowtie Networks: Generative Modeling for Joint Few-Shot Recognition and Novel-View Synthesis | 1 INTRODUCTION . Given a never-before-seen object ( e.g. , a gadwall in Figure 1 ) , humans are able to generalize even from a single image of this object in different ways , including recognizing new object instances and imagining what the object would look like from different viewpoints . Achieving similar levels of generalization for machines is a fundamental problem in computer vision , and has been actively explored in areas such as few-shot object recognition ( Fei-Fei et al. , 2006 ; Vinyals et al. , 2016 ; Wang & Hebert , 2016 ; Finn et al. , 2017 ; Snell et al. , 2017 ) and novel-view synthesis ( Park et al. , 2017 ; Nguyen-Phuoc et al. , 2018 ; Sitzmann et al. , 2019 ) . However , such exploration is often limited in separate areas with specialized algorithms but not jointly . We argue that synthesizing images and recognizing them are inherently interconnected with each other . Being able to simultaneously address both tasks with a single model is a crucial step toward human-level generalization . This requires learning a richer , shareable internal representation for more comprehensive object understanding than it could be within individual tasks . Such “ cross-task ” knowledge becomes particularly critical in the low-data regime , where identifying 3D geometric structures of input images facilities recognizing their semantic categories , and vice versa . Inspired by this insight , here we propose a novel task of joint few-shot recognition and novel-view synthesis : given only one or few images of a novel object from arbitrary views with only category annotation , we aim to simultaneously learn an object classifier and generate images of that type of object from new viewpoints . This joint task is challenging , because of its ( i ) weak supervision , where we do not have access to any 3D supervision , and ( ii ) few-shot setting , where we need to effectively learn both 3D geometric and semantic representations from minimal data . While existing work copes with two or more tasks mainly by multi-task learning or meta-learning of a shared feature representation ( Yu et al. , 2020 ; Zamir et al. , 2018 ; Lake et al. , 2015 ) , we take a different perspective in this paper . Motivated by the nature of our problem , we focus on the interaction and cooperation between a generative model ( for view synthesis ) and a discriminative model ( for recognition ) , in a way that facilitates knowledge to flow across tasks in complementary directions , thus making the tasks help each other . For example , the synthesized images produced by the generative model provide viewpoint variations and could be used as additional training data to build a better recognition model ; meanwhile , the recognition model ensures the preservation of the desired category information and deals with partial occlusions during the synthesis . To this end , we propose a feedback-based bowtie network ( FBNet ) , as illustrated in Figure 1 . The network consists of a view synthesis module and a recognition module , which are linked through feedback connections in a bowtie fashion . This is a general architecture that can be used on top of any view synthesis model and any recognition model . The view synthesis module explicitly learns a 3D geometric representation from 2D images , which is transformed to target viewpoints , projected to 2D features , and rendered to generate images . The recognition module then leverages these synthesized images from different views together with the original real images to learn a semantic feature representation and produce corresponding classifiers , leading to the feedback from the output of the view synthesis module to the input of the recognition module . The semantic features of real images extracted from the recognition module are further fed into the view synthesis module as conditional inputs , leading to the feedback from the output of the recognition module to the input of the view synthesis module . One potential difficulty , when combining the view synthesis and the recognition modules , lies in the mismatch in their level of image resolutions . Deep recognition models can benefit from highresolution images , and the recognition performance greatly improves with increased resolution ( Wang et al. , 2016 ; Cai et al. , 2019 ; He et al. , 2016 ) . By contrast , it is still challenging for modern generative models to synthesize very high-resolution images ( Regmi & Borji , 2018 ; Nguyen-Phuoc et al. , 2019 ) . To address this challenge , while operating on a resolution consistent with state-of-the-art view synthesis models ( Nguyen-Phuoc et al. , 2019 ) , we further introduce resolution distillation to leverage additional knowledge in a recognition model that is learned from higher-resolution images . Our contributions are three-folds . ( 1 ) We introduce a new problem of simultaneous few-shot recognition and novel-view synthesis , and address it from a novel perspective of cooperating generative and discriminative modeling . ( 2 ) We propose feedback-based bowtie networks that jointly learn 3D geometric and semantic representations with feedback in the loop . We further address the mismatch issue between different modules by leveraging resolution distillation . ( 3 ) Our approach significantly improves both view synthesis and recognition performance , especially in the low-data regime , by enabling direct manipulation of view , shape , appearance , and semantics in generative image modeling . 2 RELATED WORK . Few-Shot Recognition is a classic problem in computer vision ( Thrun , 1996 ; Fei-Fei et al. , 2006 ) . Many algorithms have been proposed to address this problem ( Vinyals et al. , 2016 ; Wang & Hebert , 2016 ; Finn et al. , 2017 ; Snell et al. , 2017 ) , including the recent efforts on leveraging generative models ( Li et al. , 2015 ; Wang et al. , 2018 ; Schwartz et al. , 2018 ; Zhang et al. , 2018 ; Tsutsui et al. , 2019 ; Chen et al. , 2019b ; Li et al. , 2019 ; Zhang et al. , 2019 ; Sun et al. , 2019 ) . A hallucinator is introduced to generate additional examples in a pre-trained feature space as data augmentation to help with low-shot classification ( Wang et al. , 2018 ) . MetaGAN improves few-shot recognition by producing fake images as a new category ( Zhang et al. , 2018 ) . However , these methods either do not synthesize images directly or use a pre-trained generative model that is not optimized towards the downstream task . By contrast , our approach performs joint training of recognition and view synthesis , and enables the two tasks to cooperate through feedback connections . In addition , while there has been work considering both classification and exemplar generation in the few-shot regime , such investigation focuses on simple domains like handwritten characters ( Lake et al. , 2015 ) but we address more realistic scenarios with natural images . Note that our effort is largely orthogonal to designing the best few-shot recognition or novel-view synthesis method ; instead , we show that the joint model outperforms the original methods addressing each task in isolation . Novel-View Synthesis aims to generate a target image with an arbitrary camera pose from one given source image ( Tucker & Snavely , 2020 ) . It is also known as “ multiview synthesis. ” For this task , some approaches are able to synthesize lifelike images ( Park et al. , 2017 ; Yin & Shi , 2018 ; Nguyen-Phuoc et al. , 2018 ; Sitzmann et al. , 2019 ; Iqbal et al. , 2020 ; Yoon et al. , 2020 ; Wiles et al. , 2020 ; Wortsman et al. , 2020 ) . However , they heavily rely on pose supervision or 3D annotation , which is not applicable in our case . An alternative way is to learn a view synthesis model in an unsupervised manner . Pix2Shape learns an implicit 3D scene representation by generating a 2.5D surfel based reconstruction ( Rajeswar et al. , 2020 ) . HoloGAN proposes an unsupervised approach to learn 3D feature representations and render 2D images accordingly ( Nguyen-Phuoc et al. , 2019 ) . Nguyen-Phuoc et al . ( 2020 ) learn scene representations from 2D unlabeled images through foreground-background fragmenting . Different from them , not only can our view synthesis module learn from weakly labeled images , but it also enables conditional synthesis to facilitate recognition . Feedback-Based Architectures , where the full or partial output of a system is routed back into the input as part of an iterative cause-and-effect process ( Ford , 1999 ) , have been recently introduced into neural networks ( Belagiannis & Zisserman , 2017 ; Zamir et al. , 2017 ; Yang et al. , 2018 ) . Compared with prior work , our FBNet contains two complete sub-networks , and the output of each module is fed into the other as one of the inputs . Therefore , FBNet is essentially a bi-directional feedback-based framework which optimizes the two sub-networks jointly . Multi-task Learning focuses on optimizing a collection of tasks jointly ( Misra et al. , 2016 ; Ruder , 2017 ; Kendall et al. , 2018 ; Pal & Balasubramanian , 2019 ; Xiao & Marlet , 2020 ) . Task relationships have also been studied ( Zamir et al. , 2018 ; Standley et al. , 2020 ) . Some recent work investigates the connection between recognition and view synthesis , and makes some attempt to combine them together ( Sun et al. , 2018 ; Wang et al. , 2018 ; Xian et al. , 2019 ; Santurkar et al. , 2019 ; Xiong et al. , 2020 ; Michalkiewicz et al. , 2020 ) . For example , Xiong et al . ( 2020 ) use multiview images to tackle fine-grained recognition tasks . However , their method needs strong pose supervision to train the view synthesis model , while we do not . Also , these approaches do not treat the two tasks of equal importance , i.e. , one task as an auxiliary task to facilitate the other . On the contrary , our approach targets the joint learning of the two tasks and improves both of their performance . Importantly , we focus on learning a shared generative model , rather than a shared feature representation as is normally the case in multi-task learning . Joint Data Augmentation and Task Model Learning leverage generative networks to improve other visual tasks ( Peng et al. , 2018 ; Hu et al. , 2019 ; Luo et al. , 2020 ; Zhang et al. , 2020 ) . A generative network and a discriminative pose estimation network are trained jointly through adversarial loss in Peng et al . ( 2018 ) , where the generative network performs data augmentation to facilitate the downstream pose estimation task . Luo et al . ( 2020 ) design a controllable data augmentation method for robust text recognition , which is achieved by tracking and refining the moving state of the control points . Zhang et al . ( 2020 ) study and make use of the relationship among facial expression recognition , face alignment , and face synthesis to improve training . Mustikovela et al . ( 2020 ) leverage a generative model to boost viewpoint estimation . The main difference is that we focus on the joint task of synthesis and recognition and achieve bi-directional feedback , while existing work only considers optimizing the target discriminative task using adversarial training or with a feedforward network . 3 OUR APPROACH . 3.1 JOINT TASK OF FEW-SHOT RECOGNITION AND NOVEL-VIEW SYNTHESIS . Problem Formulation : Given a dataset D = { ( xi , yi ) } , where xi ∈ X is an image of an object and yi ∈ C is the corresponding category label ( X and C are the image space and label space , respectively ) , we address the following two tasks simultaneously . ( i ) Object recognition : learning a discriminative model R : X → C that takes as input an image xi and predicts its category label . ( ii ) Novel-view synthesis : learning a generative model G : X ×Θ → X that , given an image xi of category yi and an arbitrary 3D viewpoint θj ∈ Θ , synthesizes an image in category yi viewed from θj . Notice that we are more interested in category-level consistency , for which G is able to generate images of not only the instance xi but also other objects of the category yi from different viewpoints . This joint-task scenario requires us to improve the performance of both 2D and 3D tasks under weak supervision without any ground-truth 3D annotations . Hence , we need to exploit the cooperation between them . Few-Shot Setting : The few-shot dataset consists of one or only a few images per category , which makes our problem even more challenging . To this end , following the recent work on knowledge transfer and few-shot learning ( Hariharan & Girshick , 2017 ; Chen et al. , 2019a ) , we leverage a set of “ base ” classes Cbase with a large-sample dataset Dbase = { ( xi , yi ) , yi ∈ Cbase } to train our initial model . We then fine-tune the pre-trained model on our target “ novel ” classes Cnovel ( Cbase∩Cnovel = 0 ) with its small-sample dataset Dnovel = { ( xi , yi ) , yi ∈ Cnovel } ( e.g. , a K-shot setting corresponds to K images per class ) . | This paper presents a new dual-task of joint few-shot recognition and novel synthesis. The main idea of this paper is to learn a shared generative model across the dual-task to boost the performances of both tasks. To achieve this, bowtie networks are employed to jointly learn geometric and semantic representations with a feedback loop. The proposed method is evaluated on fine-grained recognition datasets. | SP:627a0f2c3be51ea6d1e8f56c7b2dd35142758509 |
Learning a Transferable Scheduling Policy for Various Vehicle Routing Problems based on Graph-centric Representation Learning | 1 INTRODUCTION . The Vehicle Routing Problem ( VRP ) , a well-known NP-hard problem , has been enormously studied since it appeared by Dantzig & Ramser ( 1959 ) . There have been numerous attempts to compute the exact ( optimal ) or approximate solutions for various types of vehicle routing problems by using mixed integer linear programming ( MILP ) , which uses mostly a branch-and-price algorithm appeared in Desrochers et al . ( 1992 ) or a column generation method ( Chabrier , 2006 ) , or heuristics ( ( Cordeau et al. , 2002 ; Clarke & Wright , 1964 ; Gillett & Miller , 1974 ; Gendreau et al. , 1994 ) ) . However , these approaches typically require huge computational time to find the near optimum solution . For more information for VRP , see good survey papers ( Cordeau et al. , 2002 ; Toth & Vigo , 2002 ) . There have been attempts to solve such vehicle routing problems using learning based approaches . These approaches can be categorized into supervised-learning based approaches and reinforcementlearning based approaches ( Bengio et al. , 2020 ) ; supervised learning approaches try to map a target VRP with a solution or try to solve sub-problems appears during optimization procedure , while reinforcement learning ( RL ) approaches seek to learn to solve routing problems without supervision ( i.e , solution ) but using only repeated trials and the associated reward signal . Furthermore , the RL approaches can be further categorized into improvement heuristics and construction heuristics ( Mazyavkina et al. , 2020 ) ; improvement heuristics learn to modify the current solution for a better solution , while construction heuristics learn to construct a solution in a sequential decision making framework . The current study focuses on the RL-based construction heuristic for solving various routing problems . Various RL-based solution construction approaches have been employed to solve the traveling salesman problem ( TSP ) ( Bello et al. , 2016 ; Khalil et al. , 2017 ; Nazari et al. , 2018 ; Kool et al. , 2018 ) or the capacitated vehicle routing problem ( CVRP ) ( Nazari et al. , 2018 ; Kool et al. , 2018 ) . ( Bello et al. , 2016 ; Nazari et al. , 2018 ; Kool et al. , 2018 ) has used the encoder-decoder structure to sequentially generate routing schedules , and ( Khalil et al. , 2017 ) uses graph based embedding to determine the next assignment action . Although these approaches have shown the potential that the RL based approaches can learn to solve some types of routing problems , these approaches have the major two limitations : ( 1 ) only focus on routing a single vehicle over cities for minimizing the total traveling distance ( i.e. , min-sum problem ) and ( 2 ) the trained policy for a specific routing problem can not be used for solving other routing problems with different objective and constraints ( they show that trained policy can be used to solve the same type of the routing problems with different problem sizes ) . In this study , We proposed the Graph-centric RL-based Transferable Scheduler ( GRLTS ) for various vehicle routing problems . GRLTS is composed of graph-centric representation learning and RLbased scheduling policy learning . GRLTS is mainly designed to solve min-max capacititated multi vehicle routing problems ( mCVRP ) ; the problem seeks to minimize the total completion time for multiple vehicles whose one-time traveling distance is constrained by their fuel levels to serve the geographically distributed customer nodes . The method represents the relationships among vehicles , customers , and fuel stations using relationship-specific graphs to consider their topological relationships and employ graph neural network ( GNN ) to extract the graph ’ s embedding to be used to make a routing action . To effectively train the policy for minimizing the total completion time while satisfying the fuel constraints , we use the specially designed reward signal in RL framework . The representation learning for graph and the decision making policy are trained in an end-to-end fashion in an MARL framework . In addition , to effectively explore the joint combinatorial action space , we employ curriculum learning while controlling the difficulty ( complexity ) of a target problem . The proposed GRLTS resolves the two issues raised in other RL-based routing algorithms : • GRLTS learns to coordinate multiple vehicles to minimize the total completion time ( makespan ) . It can resolve the first issue of other RL-based routing algorithms and can be used to solve practical routing problems of scheduling multiple vehicles simultaneously . ( Kang et al. , 2019 ) also employed the graph based embedding ( random graph embedding ) to solve identical parallel machine scheduling problem , the problem seeking to minimize the makespan by scheduling multiple machines . However , our approach is more general in that it can consider capacity constraint and more fast and scalable node embedding strategies . • GRLTS transfers the trained scheduling policy with random mCVRP instances to be used for solving not only new mCVRP problems with different complexity but also different routing problems ( CVRP , mTSP , TSP ) with different objectives and constraints . 2 FORMULATION . 2.1 MIN-MAX SOLUTION FOR MCVRP . We define the set of vehicles VV = 1 , ... , NV , the set of customers VC = 1 , ... , NC , and the set of refueling stations VR = 1 , ... , NR , where NA , NC , and NR are the numbers of vehicles , customers , and refueling stations , respectively . The objective of min-max mCVRP is minimizing the makespan that is the longest distance among all vehicle ’ s traveling distance , i.e. , min maxi∈VV Li with Li being the traveling distance of vehicle i , while each vehicle ’ s one-time traveling distance is constrained by its remaining fuel . The detailed mathematical formulation using mixed integer linear programming ( MILP ) is provided in Appendix . Figure ( 1 ) ( left ) shows a snapshot of a mCVRP state and Figure ( 1 ) ( right ) represents a feasible solution of the mCVRP . 2.2 DEC-MDP FORMULATION FOR MCVRP . We seek to sequentially construct an optimum solution . Thus , we frame the solution construction procedure as a decentralized Markov decision problem ( Dec-MDP ) as follows . 2.2.1 STATE . We define the vehicle state svt , ∀v ∈ VV , the customer state sct , ∀c ∈ VC , and the refueling station state srt , ∀r ∈ VR as follows : • State of vehicle v , svt = ( xvt , fvt , qvt ) . xvt is the allocated node that vehicle v to visit ; fvt is the current fuel level ; and qvt is the number of customers served by the vehicle v so far . • State of a customer c , sct = ( xc , vc ) . xc is the location of customer node c ( static ) . Visit indicator v c ∈ { 0 , 1 } becomes 1 if the customer c is visited and 0 , otherwise . • State of a refueling station r , srt = xr . xr is the location of the refueling station r ( static ) . The global state st then becomes st = ( { svt } Nv v=1 , { sct } NC c=1 , { srt } NR r=1 ) . 2.2.2 ACTIONS & STATE TRANSITION . Action avt for vehicle v at time t is indicating a node to be visited by vehicle v at time t+ 1 , that is , avt = x v t+1 ∈ { VC ∪ VR } . Therefore , the next state of vehicle v becomes svt+1 = ( xvt+1 , fvt+1 , qvt+1 ) where fvt+1 and q v t+1 are determined deterministically by an action a v t as follows : • Fuel capacity update : fvt+1 = { F v , if avt ∈ VR ftv − d ( xvt , avt ) , otherwise . • Customer visit number update : qvt+1 = { qvt , if a v t ∈ VR qvt + 1 , otherwise . 2.2.3 REWARDS . The goal of mCVRP is to force all agents to coordinate to finish the distributed tasks quickly while satisfying the fuel constraints . To achieve this global goal in a distributed manner , we use the specially designed independent reward for each agent as : • visiting reward : To encourage vehicles to visit the customer nodes faster , in turn , minimizing makespan , we define customer visit reward rvvisit = q v t . This reward is provided when an agent visits a customer ; the more customer nodes a vehicle agent n visits , the greater reward it can earn . • Refueling reward : To induce a strategic refueling , we introduce refuel reward rvrefuel = qvt × ( ( F v−fvt ) / ( Fv−1 ) ) α . We define the refuel reward as an opportunity cost . That is , vehicles with sufficient fuel are not necessary to refuel ( small reward ) . In contrast , refueling vehicles with a lack of fuel is worth as much as visiting customers . In this study , we set F v = 10 ( which is the equivalent to the total traveling distance that vehicle v can travel with the fuel tank fully loaded ) and α = 2 . 2.3 RELATIONSHIPS WITH OTHER CLASS OF VRPS . mCVRP , the target problem of this study , has three key properties : 1 ) the problem seeks to minimize the total completion time of vehicles by forcing all vehicles to coordinate ( in a distributed manner ) , 2 ) the problem employs fuel capacity constraints requiring the vehicles to visit the refueling stations strategically , 3 ) the problem considers multiple refueling depots ( revisit allowed ) . If some of these requirements are relaxed , min-max mCVRP can be degenerated into simpler conventional routing problems : • TSP is the problem where a single vehicle is operated to serve every customer while minimizing the total traveling distance . The agent needs or needs not come back to the depot . This problem does not have capacity constraints . • CVRP ( capacity-constrained TSP ) is the problem where a single vehicle is operated to serve every customer while minimizing the total traveling distance and satisfying the fuel constraint . The vehicles need to comeback depot to charge . • mTSP ( multi-agent TSP ) is the problem where multiple vehicles should serve all the customers as quickly as possible . This problem does not have capacity constraints . • mCVRP ( multi-agent , capacity-constrained TSP ) is our target problem having the properties of both mTSP and CVRP . Additionally , we add more than one refueling depot . The mathematical formulations for these problems are provided in Appendix . We train the policy using random mCVRP instances with varying numbers of agents and customers and employ the trained policy without parameter changes to solve TSP , CVRP and mTSP to test its domain transferability . 3 METHOD . This section explains how the proposed model , given a state ( a partial solution ) , assigns an idle vehicle to next node to visit under the sequential decision-making framework ( see Figure 2 ) . 3.1 STATE REPRESENTATION USING RELATIONSHIP-SPECIFIC MULTIPLE GRAPHS . The proposed model represents the global state st using as a weighted graph Gt = G ( V , E , w ) where V = { VV , VC , VR } , and E is the set of edges between node i , j ∈ V and w is weight for edge ( i , j ) ( here , distance dij ) . Each node corresponding to vehicle , customer , and refueling station will be initialized with its associated states defined earlier . Although we can assume that all nodes are connected with each other regardless of types and distance , we restrict the edge connection to its neighboring nodes to reduce the computational cost . Specifically , each type of node can define its connectivity range and connect an edge if any node is located within its range as follows ( see Figure 2 ) : evj = 1 ∀v ∈ Vv , d ( v , j ) ≤ RV = fvt ( 1 ) ecj = 1 ∀c ∈ Vc , d ( c , j ) ≤ RC ( 2 ) erj = 1 ∀r ∈ VR , d ( r , j ) ≤ RR = max v∈Vv F v ( 3 ) That is , the vehicle node v ∈ Vv connects the edges with nodes that are located within its traveling distance ( i.e. , the current fuel level fvt ) . In addition , the customer nodes c ∈ Vc connects the edges with nodes that are located within the constant range RC . We set RC = 5 while following a typical hyperparameter selection procedure . Finally , the refueling node r ∈ VR connects the edges with nodes within maximum distance that the vehicle with the largest fuel capacity can travel with the full loaded fuel ( in this study F v = 10 for all vehicles ) . Note that the target node j that can be connected to each node can be any types of nodes . | The paper presents a reinforcement learning approach to learn a routing policy for a family of Vehicle Routing Problems (VRPs). More precisely, the authors train a model for the min-max capacitated multi vehicle routing problem (mCVRP), then use it to solve variants of the problem that correspond to various VRP problems (with a single vehicle, no capacity constraints, no fueling stations, etc). They use a GNN to represent the states and the PPO algorithm to learn the policy. They validate their approach on both random instances and literature benchmarks. | SP:c98108a3d1120eb4c9c34ba2e07545e9a3f93bdf |
Learning a Transferable Scheduling Policy for Various Vehicle Routing Problems based on Graph-centric Representation Learning | 1 INTRODUCTION . The Vehicle Routing Problem ( VRP ) , a well-known NP-hard problem , has been enormously studied since it appeared by Dantzig & Ramser ( 1959 ) . There have been numerous attempts to compute the exact ( optimal ) or approximate solutions for various types of vehicle routing problems by using mixed integer linear programming ( MILP ) , which uses mostly a branch-and-price algorithm appeared in Desrochers et al . ( 1992 ) or a column generation method ( Chabrier , 2006 ) , or heuristics ( ( Cordeau et al. , 2002 ; Clarke & Wright , 1964 ; Gillett & Miller , 1974 ; Gendreau et al. , 1994 ) ) . However , these approaches typically require huge computational time to find the near optimum solution . For more information for VRP , see good survey papers ( Cordeau et al. , 2002 ; Toth & Vigo , 2002 ) . There have been attempts to solve such vehicle routing problems using learning based approaches . These approaches can be categorized into supervised-learning based approaches and reinforcementlearning based approaches ( Bengio et al. , 2020 ) ; supervised learning approaches try to map a target VRP with a solution or try to solve sub-problems appears during optimization procedure , while reinforcement learning ( RL ) approaches seek to learn to solve routing problems without supervision ( i.e , solution ) but using only repeated trials and the associated reward signal . Furthermore , the RL approaches can be further categorized into improvement heuristics and construction heuristics ( Mazyavkina et al. , 2020 ) ; improvement heuristics learn to modify the current solution for a better solution , while construction heuristics learn to construct a solution in a sequential decision making framework . The current study focuses on the RL-based construction heuristic for solving various routing problems . Various RL-based solution construction approaches have been employed to solve the traveling salesman problem ( TSP ) ( Bello et al. , 2016 ; Khalil et al. , 2017 ; Nazari et al. , 2018 ; Kool et al. , 2018 ) or the capacitated vehicle routing problem ( CVRP ) ( Nazari et al. , 2018 ; Kool et al. , 2018 ) . ( Bello et al. , 2016 ; Nazari et al. , 2018 ; Kool et al. , 2018 ) has used the encoder-decoder structure to sequentially generate routing schedules , and ( Khalil et al. , 2017 ) uses graph based embedding to determine the next assignment action . Although these approaches have shown the potential that the RL based approaches can learn to solve some types of routing problems , these approaches have the major two limitations : ( 1 ) only focus on routing a single vehicle over cities for minimizing the total traveling distance ( i.e. , min-sum problem ) and ( 2 ) the trained policy for a specific routing problem can not be used for solving other routing problems with different objective and constraints ( they show that trained policy can be used to solve the same type of the routing problems with different problem sizes ) . In this study , We proposed the Graph-centric RL-based Transferable Scheduler ( GRLTS ) for various vehicle routing problems . GRLTS is composed of graph-centric representation learning and RLbased scheduling policy learning . GRLTS is mainly designed to solve min-max capacititated multi vehicle routing problems ( mCVRP ) ; the problem seeks to minimize the total completion time for multiple vehicles whose one-time traveling distance is constrained by their fuel levels to serve the geographically distributed customer nodes . The method represents the relationships among vehicles , customers , and fuel stations using relationship-specific graphs to consider their topological relationships and employ graph neural network ( GNN ) to extract the graph ’ s embedding to be used to make a routing action . To effectively train the policy for minimizing the total completion time while satisfying the fuel constraints , we use the specially designed reward signal in RL framework . The representation learning for graph and the decision making policy are trained in an end-to-end fashion in an MARL framework . In addition , to effectively explore the joint combinatorial action space , we employ curriculum learning while controlling the difficulty ( complexity ) of a target problem . The proposed GRLTS resolves the two issues raised in other RL-based routing algorithms : • GRLTS learns to coordinate multiple vehicles to minimize the total completion time ( makespan ) . It can resolve the first issue of other RL-based routing algorithms and can be used to solve practical routing problems of scheduling multiple vehicles simultaneously . ( Kang et al. , 2019 ) also employed the graph based embedding ( random graph embedding ) to solve identical parallel machine scheduling problem , the problem seeking to minimize the makespan by scheduling multiple machines . However , our approach is more general in that it can consider capacity constraint and more fast and scalable node embedding strategies . • GRLTS transfers the trained scheduling policy with random mCVRP instances to be used for solving not only new mCVRP problems with different complexity but also different routing problems ( CVRP , mTSP , TSP ) with different objectives and constraints . 2 FORMULATION . 2.1 MIN-MAX SOLUTION FOR MCVRP . We define the set of vehicles VV = 1 , ... , NV , the set of customers VC = 1 , ... , NC , and the set of refueling stations VR = 1 , ... , NR , where NA , NC , and NR are the numbers of vehicles , customers , and refueling stations , respectively . The objective of min-max mCVRP is minimizing the makespan that is the longest distance among all vehicle ’ s traveling distance , i.e. , min maxi∈VV Li with Li being the traveling distance of vehicle i , while each vehicle ’ s one-time traveling distance is constrained by its remaining fuel . The detailed mathematical formulation using mixed integer linear programming ( MILP ) is provided in Appendix . Figure ( 1 ) ( left ) shows a snapshot of a mCVRP state and Figure ( 1 ) ( right ) represents a feasible solution of the mCVRP . 2.2 DEC-MDP FORMULATION FOR MCVRP . We seek to sequentially construct an optimum solution . Thus , we frame the solution construction procedure as a decentralized Markov decision problem ( Dec-MDP ) as follows . 2.2.1 STATE . We define the vehicle state svt , ∀v ∈ VV , the customer state sct , ∀c ∈ VC , and the refueling station state srt , ∀r ∈ VR as follows : • State of vehicle v , svt = ( xvt , fvt , qvt ) . xvt is the allocated node that vehicle v to visit ; fvt is the current fuel level ; and qvt is the number of customers served by the vehicle v so far . • State of a customer c , sct = ( xc , vc ) . xc is the location of customer node c ( static ) . Visit indicator v c ∈ { 0 , 1 } becomes 1 if the customer c is visited and 0 , otherwise . • State of a refueling station r , srt = xr . xr is the location of the refueling station r ( static ) . The global state st then becomes st = ( { svt } Nv v=1 , { sct } NC c=1 , { srt } NR r=1 ) . 2.2.2 ACTIONS & STATE TRANSITION . Action avt for vehicle v at time t is indicating a node to be visited by vehicle v at time t+ 1 , that is , avt = x v t+1 ∈ { VC ∪ VR } . Therefore , the next state of vehicle v becomes svt+1 = ( xvt+1 , fvt+1 , qvt+1 ) where fvt+1 and q v t+1 are determined deterministically by an action a v t as follows : • Fuel capacity update : fvt+1 = { F v , if avt ∈ VR ftv − d ( xvt , avt ) , otherwise . • Customer visit number update : qvt+1 = { qvt , if a v t ∈ VR qvt + 1 , otherwise . 2.2.3 REWARDS . The goal of mCVRP is to force all agents to coordinate to finish the distributed tasks quickly while satisfying the fuel constraints . To achieve this global goal in a distributed manner , we use the specially designed independent reward for each agent as : • visiting reward : To encourage vehicles to visit the customer nodes faster , in turn , minimizing makespan , we define customer visit reward rvvisit = q v t . This reward is provided when an agent visits a customer ; the more customer nodes a vehicle agent n visits , the greater reward it can earn . • Refueling reward : To induce a strategic refueling , we introduce refuel reward rvrefuel = qvt × ( ( F v−fvt ) / ( Fv−1 ) ) α . We define the refuel reward as an opportunity cost . That is , vehicles with sufficient fuel are not necessary to refuel ( small reward ) . In contrast , refueling vehicles with a lack of fuel is worth as much as visiting customers . In this study , we set F v = 10 ( which is the equivalent to the total traveling distance that vehicle v can travel with the fuel tank fully loaded ) and α = 2 . 2.3 RELATIONSHIPS WITH OTHER CLASS OF VRPS . mCVRP , the target problem of this study , has three key properties : 1 ) the problem seeks to minimize the total completion time of vehicles by forcing all vehicles to coordinate ( in a distributed manner ) , 2 ) the problem employs fuel capacity constraints requiring the vehicles to visit the refueling stations strategically , 3 ) the problem considers multiple refueling depots ( revisit allowed ) . If some of these requirements are relaxed , min-max mCVRP can be degenerated into simpler conventional routing problems : • TSP is the problem where a single vehicle is operated to serve every customer while minimizing the total traveling distance . The agent needs or needs not come back to the depot . This problem does not have capacity constraints . • CVRP ( capacity-constrained TSP ) is the problem where a single vehicle is operated to serve every customer while minimizing the total traveling distance and satisfying the fuel constraint . The vehicles need to comeback depot to charge . • mTSP ( multi-agent TSP ) is the problem where multiple vehicles should serve all the customers as quickly as possible . This problem does not have capacity constraints . • mCVRP ( multi-agent , capacity-constrained TSP ) is our target problem having the properties of both mTSP and CVRP . Additionally , we add more than one refueling depot . The mathematical formulations for these problems are provided in Appendix . We train the policy using random mCVRP instances with varying numbers of agents and customers and employ the trained policy without parameter changes to solve TSP , CVRP and mTSP to test its domain transferability . 3 METHOD . This section explains how the proposed model , given a state ( a partial solution ) , assigns an idle vehicle to next node to visit under the sequential decision-making framework ( see Figure 2 ) . 3.1 STATE REPRESENTATION USING RELATIONSHIP-SPECIFIC MULTIPLE GRAPHS . The proposed model represents the global state st using as a weighted graph Gt = G ( V , E , w ) where V = { VV , VC , VR } , and E is the set of edges between node i , j ∈ V and w is weight for edge ( i , j ) ( here , distance dij ) . Each node corresponding to vehicle , customer , and refueling station will be initialized with its associated states defined earlier . Although we can assume that all nodes are connected with each other regardless of types and distance , we restrict the edge connection to its neighboring nodes to reduce the computational cost . Specifically , each type of node can define its connectivity range and connect an edge if any node is located within its range as follows ( see Figure 2 ) : evj = 1 ∀v ∈ Vv , d ( v , j ) ≤ RV = fvt ( 1 ) ecj = 1 ∀c ∈ Vc , d ( c , j ) ≤ RC ( 2 ) erj = 1 ∀r ∈ VR , d ( r , j ) ≤ RR = max v∈Vv F v ( 3 ) That is , the vehicle node v ∈ Vv connects the edges with nodes that are located within its traveling distance ( i.e. , the current fuel level fvt ) . In addition , the customer nodes c ∈ Vc connects the edges with nodes that are located within the constant range RC . We set RC = 5 while following a typical hyperparameter selection procedure . Finally , the refueling node r ∈ VR connects the edges with nodes within maximum distance that the vehicle with the largest fuel capacity can travel with the full loaded fuel ( in this study F v = 10 for all vehicles ) . Note that the target node j that can be connected to each node can be any types of nodes . | This paper considers the problem of capacitated vehicle routing which is a famous combinatorial optimization problem that is known to be NP-hard. This paper takes the approach of solving instances of this problem using RL. The goal is this problem is to minimize the maximum time (or makespan objective) for multiple vehicles to complete various tasks subject to fuel constraint. The paper trains a graph embedding from random instances and then show that it solves new instances of this problem with reasonable accuracy. Moreover, they also show that the embedding can be transferred to other related objectives. | SP:c98108a3d1120eb4c9c34ba2e07545e9a3f93bdf |
On Dropout, Overfitting, and Interaction Effects in Deep Neural Networks | We examine Dropout through the perspective of interactions . Given N variables , there are O ( N2 ) possible pairwise interactions , O ( N3 ) possible 3-way interactions , i.e . O ( Nk ) possible interactions of k variables . Conversely , the probability of an interaction of k variables surviving Dropout at rate p is O ( ( 1 − p ) k ) . In this paper , we show that these rates cancel , and as a result , Dropout selectively regularizes against learning higher-order interactions . We prove this new perspective analytically for Input Dropout and empirically for Activation Dropout . This perspective on Dropout has several practical implications : ( 1 ) higher Dropout rates should be used when we need stronger regularization against spurious high-order interactions , ( 2 ) caution must be used when interpreting Dropout-based feature saliency measures , and ( 3 ) networks trained with Input Dropout are biased estimators , even with infinite data . We also compare Dropout to regularization via weight decay and early stopping and find that it is difficult to obtain the same regularization against high-order interactions with these methods . 1 INTRODUCTION . We examine Dropout through the perspective of interactions : learned effects that require multiple input variables . Given N variables , there are O ( N2 ) possible pairwise interactions , O ( N3 ) possible 3-way interactions , etc . We show that Dropout contributes a regularization effect which helps neural networks ( NNs ) explore simpler functions of lower-order interactions before considering functions of higher-order interactions . Dropout imposes this regularization by reducing the effective learning rate of interaction effects according to the number of variables in the interaction effect . As a result , Dropout encourages models to learn simpler functions of lower-order additive components . This understanding of Dropout has implications for choosing Dropout rates : higher Dropout rates should be used when we need stronger regularization against spurious high-order interactions . This perspective also issues caution against using Dropout to measure term saliency because Dropout regularizes against terms for high-order interactions . Finally , this view of Dropout as a regularizer of interaction effects provides insight into the varying effectiveness of Dropout for different architectures and data sets . We also compare Dropout to regularization via weight decay and early stopping and find that it is difficult to obtain the same regularization effect for high-order interactions with these methods . Why Interaction Effects ? When it was introduced , Dropout was motivated to prevent “ complex co-adaptations in which a feature detector is only helpful in the context of several other specific feature detectors '' ( Hinton et al. , 2012 ; Srivastava et al. , 2014 ) . Because most `` complex co-adaptations '' are interaction effects , we examine Dropout under the lens of interaction . This perspective is valuable because ( 1 ) modern NNs have so many weights that understanding networks by looking at their weights is infeasible , but interactions are far more tractable because interaction effects live in function space , not weight space , ( 2 ) the decomposition that we use to calculate interaction effects has convenient properties such as identifiability , and ( 3 ) this perspective has practical implications on choosing Dropout rates for NN systems . To preview the experimental results , when NNs are trained on data that has no interactions , the optimal Dropout rate is high , but when NNs are trained on datasets which have important 2nd and 3rd order interactions , the optimal Dropout rate is 0 . 2 RELATED WORK . Although Hinton et al proposed Dropout to prevent spurious co-adaptation ( i.e. , spurious interactions ) , many questions remain . For example : Is the expectation of the output of a NN trained with Dropout the same as for a NN trained without Dropout ? Does Dropout change the trajectory of learning during optimization even in the asymptotic limit of infinite training data ? Should Dropout be used at run-time when querying a NN to see what it has learned ? These questions are important because Dropout has been used as a method for Bayesian uncertainty ( Gal & Ghahramani , 2016 ; Gal et al. , 2017 ; Chang et al. , 2017b ; a ) , which implicitly assume that Dropout does not bias the model ’ s output . The use of Dropout as a tool for uncertainty quantification has been questioned due to its failure to separate aleotoric and epistemic sources of uncertainty ( Osband , 2016 ) ( i.e. , the uncertainty does not decrease even as more data is gathered ) . In this paper we ask a separate yet related question : Does Dropout treat all parts of function space equivalently ? Significant work has focused on the effect of Dropout as a weight regularizer ( Baldi & Sadowski , 2013 ; Warde-Farley et al. , 2013 ; Cavazza et al. , 2018 ; Mianjy et al. , 2018 ; Zunino et al. , 2018 ) , including its properties of structured shrinkage ( Nalisnick et al. , 2018 ) or adaptive regularization ( Wager et al. , 2013 ) . However , weight regularization is of limited utility for modern-scale NNs , and can produce counter-intuitive results such as negative regularization ( Helmbold & Long , 2017 ) . Instead of focusing on the influence of Dropout on parameters , we take a nonparametric view of NNs as function approximators . Thus , our work is similar in spirit to Wan et al . ( 2013 ) , which showed a linear relationship between keep probability and the Rademacher complexity of the model class . Our investigation finds that Dropout preferentially targets high-order interaction effects , resulting in models that generalize better by down-weighting high-order interaction effects that are typically spurious or difficult to learn correctly from limited training data . 3 PRELIMINARIES . Multiplicative terms like X1X2 are often used to encode “ interaction effects '' . They are , however , only pure interaction effects if X1 and X2 are uncorrelated and have mean zero . When the two variables are correlated , some portion of the variance in the outcome X1X2 can be explained by main effects of each individual variable . Note that correlation between two input variables does not imply an interaction effect on the outcome , and an interaction effect of two input variables on the outcome does not imply correlation between the variables . In this paper , we use the concept of pure interaction effects from Lengerich et al . ( 2020 ) : a pure interaction effect is variance explained by a group of variables u that can not be explained by any subset of u . This definition is equivalent to the fANOVA decomposition of the overall function F : Given a density w ( X ) and Fu ⊂ L2 ( Ru ) the family of allowable functions for variable set u , the weighted fANOVA ( Hooker , 2004 ; 2007 ; Cuevas et al. , 2004 ) decomposition of F ( X ) is : { fu ( Xu ) |u ⊆ [ d ] } = argmin { gu∈Fu } u∈ [ d ] ∫ ( ∑ u⊆ [ d ] gu ( Xu ) − F ( X ) ) 2 w ( X ) dX , ( 1a ) where [ d ] indicates the power set of d features , such that ∀ v ⊆ u , ∫ fu ( Xu ) gv ( Xv ) w ( X ) dX = 0 ∀ gv , ( 1b ) i.e. , each member fu is orthogonal to the members which operate on any subset of u . An interaction effect fu is of order k if |u| = k. Given N variables in X , there are O ( N ) possible effects of individual variables , O ( N2 ) possible pairwise interactions , O ( N3 ) possible 3-way interactions , i.e . O ( Nk ) possible interactions of order k. The fANOVA decomposition provides a unique decomposition for a given data distribution ; thus , pure interaction effects can only be defined by simultaneously defining a data distribution . An example of this interplay between the data distribution and the interaction definition is shown in Figure B.2 . As Lengerich et al . ( 2020 ) describe , the correct distribution to use is the data-generating distribution p ( x ) . In studies on real data , estimating p ( x ) is one of the central challenges of machine learning ; for this paper , we use simulation data for which we know p ( x ) . 4 ANALYSIS : DROPOUT REGULARIZES INTERACTION EFFECTS . Dropout operates by probabilistically setting values to zero ( i.e . multiplying by a Bernoulli mask ) . For clarity , we call this “ Input Dropout ” if the perturbed values are input variables , and “ Activation Dropout ” if the perturbed values are activations of hidden nodes . First , we show that Input Dropout is equivalent to replacing the training dataset with samples drawn from a perturbed distribution : Theorem 1 . Let E [ Y |X ] = ∑ u∈ [ d ] fu ( Xu ) with E [ Y ] = 0 . Then Input Dropout at rate p produces E [ Y |X M ] = ∑ u∈ [ d ] ( 1− p ) |u|fu ( X ) ( 2 ) where M , a vector of d Bernoulli random variables , is the Dropout mask and is element-wise multiplication . This theorem shows that Input Dropout shrinks the conditional expectation of Y |X M toward the expectation of Y . Furthermore , Input Dropout preferentially targets high-order interactions : the scaling factor shrinks exponentially with |u| . Implications of this theorem are : 1 . The distribution of training data is different for different levels of Input Dropout , so even NNs trained for more epochs or with infinite sample size can not overcome the bias introduced by Dropout and will converge to different optima based on the Input Dropout level . This is unlike L1 or L2 regularization which can be overcome by increasing the size of the training set . 2 . Input Dropout affects higher-order interactions more than lower-order interactions , biasing the prediction of any model ( regardless of whether or not the model was originally trained with Input Dropout ) . 3 . Input Dropout acts on the data distribution , not the model , so it has the same effect on learning regardless of the downstream net architecture . Next , we show that Input Dropout shrinks gradients by down-weighting the gradient scale , with shrinkage factor exponential in effect order : Theorem 2 . Let∇u ( · , · ) be the gradient update for an interaction effect u . The expected concordance between the gradient with Input Dropout at rate p and the gradient without Input Dropout is : EM [ ∇u ( Xu , Y ) · ∇u ( Xu M , Y ) ‖∇u ( Xu , Y ) ‖ ] = ( 1− p ) |u|∇u ( Xu , Y ) . ( 3 ) This theorem shows that Input Dropout shrinks the gradient update corresponding to each effect by an effective learning rate rp ( k ) = ( 1− p ) k which decays exponentially in the interaction order k. Implications of this theorem are : 1 . The decreased learning rate persists throughout all training . Therefore , the disruption in the gradient will interplay with other mechanisms of optimizers ( e.g . momentum ) . 2 . The impact of training with Input Dropout could be undone by re-weighting gradients . | The authors are analyzing to which extent dropout is regularizing the training stage of deep networks, showing that high-order interactions are discouraged, this being a proxy for a better generalization capability once spurious co-adaptations are removed. In an extended mathematical analysis, the authors carry out their arguments taking advantage of the weighted analysis of variance, showing results on both the expected dropout rate and the impact on gradients while back-propagating. Experimental results are paired to the paper to demonstrate that changes the steady-state optima of the model. | SP:731300fd76e291c578ca23406efd2d149fb30df0 |
On Dropout, Overfitting, and Interaction Effects in Deep Neural Networks | We examine Dropout through the perspective of interactions . Given N variables , there are O ( N2 ) possible pairwise interactions , O ( N3 ) possible 3-way interactions , i.e . O ( Nk ) possible interactions of k variables . Conversely , the probability of an interaction of k variables surviving Dropout at rate p is O ( ( 1 − p ) k ) . In this paper , we show that these rates cancel , and as a result , Dropout selectively regularizes against learning higher-order interactions . We prove this new perspective analytically for Input Dropout and empirically for Activation Dropout . This perspective on Dropout has several practical implications : ( 1 ) higher Dropout rates should be used when we need stronger regularization against spurious high-order interactions , ( 2 ) caution must be used when interpreting Dropout-based feature saliency measures , and ( 3 ) networks trained with Input Dropout are biased estimators , even with infinite data . We also compare Dropout to regularization via weight decay and early stopping and find that it is difficult to obtain the same regularization against high-order interactions with these methods . 1 INTRODUCTION . We examine Dropout through the perspective of interactions : learned effects that require multiple input variables . Given N variables , there are O ( N2 ) possible pairwise interactions , O ( N3 ) possible 3-way interactions , etc . We show that Dropout contributes a regularization effect which helps neural networks ( NNs ) explore simpler functions of lower-order interactions before considering functions of higher-order interactions . Dropout imposes this regularization by reducing the effective learning rate of interaction effects according to the number of variables in the interaction effect . As a result , Dropout encourages models to learn simpler functions of lower-order additive components . This understanding of Dropout has implications for choosing Dropout rates : higher Dropout rates should be used when we need stronger regularization against spurious high-order interactions . This perspective also issues caution against using Dropout to measure term saliency because Dropout regularizes against terms for high-order interactions . Finally , this view of Dropout as a regularizer of interaction effects provides insight into the varying effectiveness of Dropout for different architectures and data sets . We also compare Dropout to regularization via weight decay and early stopping and find that it is difficult to obtain the same regularization effect for high-order interactions with these methods . Why Interaction Effects ? When it was introduced , Dropout was motivated to prevent “ complex co-adaptations in which a feature detector is only helpful in the context of several other specific feature detectors '' ( Hinton et al. , 2012 ; Srivastava et al. , 2014 ) . Because most `` complex co-adaptations '' are interaction effects , we examine Dropout under the lens of interaction . This perspective is valuable because ( 1 ) modern NNs have so many weights that understanding networks by looking at their weights is infeasible , but interactions are far more tractable because interaction effects live in function space , not weight space , ( 2 ) the decomposition that we use to calculate interaction effects has convenient properties such as identifiability , and ( 3 ) this perspective has practical implications on choosing Dropout rates for NN systems . To preview the experimental results , when NNs are trained on data that has no interactions , the optimal Dropout rate is high , but when NNs are trained on datasets which have important 2nd and 3rd order interactions , the optimal Dropout rate is 0 . 2 RELATED WORK . Although Hinton et al proposed Dropout to prevent spurious co-adaptation ( i.e. , spurious interactions ) , many questions remain . For example : Is the expectation of the output of a NN trained with Dropout the same as for a NN trained without Dropout ? Does Dropout change the trajectory of learning during optimization even in the asymptotic limit of infinite training data ? Should Dropout be used at run-time when querying a NN to see what it has learned ? These questions are important because Dropout has been used as a method for Bayesian uncertainty ( Gal & Ghahramani , 2016 ; Gal et al. , 2017 ; Chang et al. , 2017b ; a ) , which implicitly assume that Dropout does not bias the model ’ s output . The use of Dropout as a tool for uncertainty quantification has been questioned due to its failure to separate aleotoric and epistemic sources of uncertainty ( Osband , 2016 ) ( i.e. , the uncertainty does not decrease even as more data is gathered ) . In this paper we ask a separate yet related question : Does Dropout treat all parts of function space equivalently ? Significant work has focused on the effect of Dropout as a weight regularizer ( Baldi & Sadowski , 2013 ; Warde-Farley et al. , 2013 ; Cavazza et al. , 2018 ; Mianjy et al. , 2018 ; Zunino et al. , 2018 ) , including its properties of structured shrinkage ( Nalisnick et al. , 2018 ) or adaptive regularization ( Wager et al. , 2013 ) . However , weight regularization is of limited utility for modern-scale NNs , and can produce counter-intuitive results such as negative regularization ( Helmbold & Long , 2017 ) . Instead of focusing on the influence of Dropout on parameters , we take a nonparametric view of NNs as function approximators . Thus , our work is similar in spirit to Wan et al . ( 2013 ) , which showed a linear relationship between keep probability and the Rademacher complexity of the model class . Our investigation finds that Dropout preferentially targets high-order interaction effects , resulting in models that generalize better by down-weighting high-order interaction effects that are typically spurious or difficult to learn correctly from limited training data . 3 PRELIMINARIES . Multiplicative terms like X1X2 are often used to encode “ interaction effects '' . They are , however , only pure interaction effects if X1 and X2 are uncorrelated and have mean zero . When the two variables are correlated , some portion of the variance in the outcome X1X2 can be explained by main effects of each individual variable . Note that correlation between two input variables does not imply an interaction effect on the outcome , and an interaction effect of two input variables on the outcome does not imply correlation between the variables . In this paper , we use the concept of pure interaction effects from Lengerich et al . ( 2020 ) : a pure interaction effect is variance explained by a group of variables u that can not be explained by any subset of u . This definition is equivalent to the fANOVA decomposition of the overall function F : Given a density w ( X ) and Fu ⊂ L2 ( Ru ) the family of allowable functions for variable set u , the weighted fANOVA ( Hooker , 2004 ; 2007 ; Cuevas et al. , 2004 ) decomposition of F ( X ) is : { fu ( Xu ) |u ⊆ [ d ] } = argmin { gu∈Fu } u∈ [ d ] ∫ ( ∑ u⊆ [ d ] gu ( Xu ) − F ( X ) ) 2 w ( X ) dX , ( 1a ) where [ d ] indicates the power set of d features , such that ∀ v ⊆ u , ∫ fu ( Xu ) gv ( Xv ) w ( X ) dX = 0 ∀ gv , ( 1b ) i.e. , each member fu is orthogonal to the members which operate on any subset of u . An interaction effect fu is of order k if |u| = k. Given N variables in X , there are O ( N ) possible effects of individual variables , O ( N2 ) possible pairwise interactions , O ( N3 ) possible 3-way interactions , i.e . O ( Nk ) possible interactions of order k. The fANOVA decomposition provides a unique decomposition for a given data distribution ; thus , pure interaction effects can only be defined by simultaneously defining a data distribution . An example of this interplay between the data distribution and the interaction definition is shown in Figure B.2 . As Lengerich et al . ( 2020 ) describe , the correct distribution to use is the data-generating distribution p ( x ) . In studies on real data , estimating p ( x ) is one of the central challenges of machine learning ; for this paper , we use simulation data for which we know p ( x ) . 4 ANALYSIS : DROPOUT REGULARIZES INTERACTION EFFECTS . Dropout operates by probabilistically setting values to zero ( i.e . multiplying by a Bernoulli mask ) . For clarity , we call this “ Input Dropout ” if the perturbed values are input variables , and “ Activation Dropout ” if the perturbed values are activations of hidden nodes . First , we show that Input Dropout is equivalent to replacing the training dataset with samples drawn from a perturbed distribution : Theorem 1 . Let E [ Y |X ] = ∑ u∈ [ d ] fu ( Xu ) with E [ Y ] = 0 . Then Input Dropout at rate p produces E [ Y |X M ] = ∑ u∈ [ d ] ( 1− p ) |u|fu ( X ) ( 2 ) where M , a vector of d Bernoulli random variables , is the Dropout mask and is element-wise multiplication . This theorem shows that Input Dropout shrinks the conditional expectation of Y |X M toward the expectation of Y . Furthermore , Input Dropout preferentially targets high-order interactions : the scaling factor shrinks exponentially with |u| . Implications of this theorem are : 1 . The distribution of training data is different for different levels of Input Dropout , so even NNs trained for more epochs or with infinite sample size can not overcome the bias introduced by Dropout and will converge to different optima based on the Input Dropout level . This is unlike L1 or L2 regularization which can be overcome by increasing the size of the training set . 2 . Input Dropout affects higher-order interactions more than lower-order interactions , biasing the prediction of any model ( regardless of whether or not the model was originally trained with Input Dropout ) . 3 . Input Dropout acts on the data distribution , not the model , so it has the same effect on learning regardless of the downstream net architecture . Next , we show that Input Dropout shrinks gradients by down-weighting the gradient scale , with shrinkage factor exponential in effect order : Theorem 2 . Let∇u ( · , · ) be the gradient update for an interaction effect u . The expected concordance between the gradient with Input Dropout at rate p and the gradient without Input Dropout is : EM [ ∇u ( Xu , Y ) · ∇u ( Xu M , Y ) ‖∇u ( Xu , Y ) ‖ ] = ( 1− p ) |u|∇u ( Xu , Y ) . ( 3 ) This theorem shows that Input Dropout shrinks the gradient update corresponding to each effect by an effective learning rate rp ( k ) = ( 1− p ) k which decays exponentially in the interaction order k. Implications of this theorem are : 1 . The decreased learning rate persists throughout all training . Therefore , the disruption in the gradient will interplay with other mechanisms of optimizers ( e.g . momentum ) . 2 . The impact of training with Input Dropout could be undone by re-weighting gradients . | This paper analyzes Dropout through the lens of k-way interactions. The central claim of this paper is that Dropout reduces interaction effects. This is shown through both theory and experiment. The theory suggests that a higher dropout rate reduces the effective learning speed of higher-order interactions. Experiments suggest that increasing the dropout rate reduces the functional magnitude of higher-order interactions, even to some extent in real data. | SP:731300fd76e291c578ca23406efd2d149fb30df0 |
A Probabilistic Model for Discriminative and Neuro-Symbolic Semi-Supervised Learning | 1 INTRODUCTION . In semi-supervised learning ( SSL ) , a mapping is learned that predicts labels y for data points x from a dataset of labelled pairs ( xl , yl ) and unlabelled xu . SSL is of practical importance since unlabelled data are often cheaper to acquire and/or more abundant than labelled data . For unlabelled data to help predict labels , the distribution of x must contain information relevant to the prediction ( Chapelle et al. , 2006 ; Zhu & Goldberg , 2009 ) . State-of-the-art SSL algorithms ( e.g . Berthelot et al. , 2019b ; a ) combine underlying methods , including some that leverage properties of the distribution p ( x ) , and others that rely on the label distribution p ( y|x ) . The latter include entropy minimisation ( Grandvalet & Bengio , 2005 ) , mutual exclusivity ( Sajjadi et al. , 2016a ; Xu et al. , 2018 ) and pseudo-labelling ( Lee , 2013 ) , which add functions of unlabelled data predictions to a typical discriminative supervised loss function . Whilst these methods each have their own rationale , we propose a formal probabilistic model that unifies them as a family of discriminative semi-supervised learning ( DSSL ) methods . Neuro-symbolic learning ( NSL ) is a broad field that looks to combine logical reasoning and statistical machine learning , e.g . neural networks . Approaches often introduce neural networks into a logical framework ( Manhaeve et al. , 2018 ) , or logic into statistical learning models ( Rocktäschel et al. , 2015 ) . Several works combine NSL with semi-supervised learning ( Xu et al. , 2018 ; van Krieken et al. , 2019 ) but lack rigorous justification . We show that our probabilistic model for discriminative SSL extends to the case where label components obey logical rules , theoretically justifying neuro-symbolic SSL approaches that augment a supervised loss function with a function based on logical constraints . Central to this work are ground truth parameters { θx } x∈X of the distributions p ( y|x ) , as predicted by models such as neural networks . For example , θxmay be a multinomial parameter vector specifying the distribution over all labels associated with a given x . Since each data point x has a specific label distribution defined by θx , sampling from p ( x ) induces an implicit distribution over parameters , p ( θ ) . If known , the distribution p ( θ ) serves as a prior over all model predictions , θ̃x : for labelled samples it may provide little additional information , but for unlabelled data may allow predictions to be evaluated and the model improved . As such , p ( θ ) provides a potential basis for semi-supervised learning . We show that , in practice , p ( θ ) can avoid much of the complexity of p ( x ) and have a concise analytical form known a priori . In principle , p ( θ ) can also be estimated from the parameters learned for labelled data ( fitting the intuition that predictions for unlabelled data should be consistent with those of labelled data ) . We refer to SSL methods that rely on p ( θ ) as discriminative and formalise them with a hierarchical probabilistic model , analogous to that for generative approaches . Recent results ( Berthelot et al. , 2019b ; a ) demonstrate that discriminative SSL is orthogonal and complementary to methods that rely on p ( x ) , such as data augmentation and consistency regularisation ( Sajjadi et al. , 2016b ; Laine & Aila , 2017 ; Tarvainen & Valpola , 2017 ; Miyato et al. , 2018 ) . We consider the explicit form of p ( θ ) in classification with mutually exclusive classes , i.e . where each x only ever pairs with a single y and y|x is deterministic . By comparison of their loss functions , the SSL methods mentioned ( entropy minimisation , mutual exclusivity and pseudo-labelling ) can be seen to impose continuous relaxations of the resulting prior p ( θ ) and are thus unified under our probabilistic model for discriminative SSL . We then consider classification with binary vector labels , e.g . representing concurrent image features or allowed chess board configurations , where only certain labels/attribute combinations may be valid , e.g . according to rules of the game or the laws of nature . Analysing the structure of p ( θ ) here , again assuming y|x is deterministic , we show that logical rules between attributes define its support . As such , SSL approaches that use fuzzy logic ( or similar ) to add logical rules into the loss function ( e.g . Xu et al. , 2018 ; van Krieken et al. , 2019 ) can be seen as approximating a continuous relaxation of p ( θ ) and so also fall under our probabilistic model for discriminative SSL . Our key contributions are : • to provide a probabilistic model for discriminative semi-supervised learning , comparable to that for classical generative methods , contributing to current theoretical understanding of SSL ; • to consider the analytical form of the distribution over parameters p ( θ ) , by which we explain several SSL methods , including entropy minimisation as used in state-of-art SSL models ; and • to show that our probabilistic model also unifies neuro-symbolic SSL in which logical rules over attributes are incorporated ( by fuzzy logic or similar ) to regularise the loss function , providing firm theoretical justification for this means of integrating ‘ connectionist ’ and ‘ symbolic ’ methods . 2 BACKGROUND AND RELATED WORK . Notation : xli∈X l , yli∈Y l are labelled data pairs , i∈ { 1 ... Nl } ; xuj ∈Xu , yuj ∈Y u are unlabelled data samples and their ( unknown ) labels , j ∈ { 1 ... Nu } ; X , Y are domains of x and y ; x , y are random variables of which x , y are realisations . θx parameterises the distribution p ( y|x ) , and is a realisation of a random variable θ . To clarify : for each x , an associated parameter θx defines a distribution over associated label ( s ) y|x ; and p ( θ ) is a distribution over all such parameters . 2.1 SEMI-SUPERVISED LEARNING . Semi-supervised learning is a well established field , described by a number of surveys and taxonomies ( Seeger , 2006 ; Zhu & Goldberg , 2009 ; Chapelle et al. , 2006 ; van Engelen & Hoos , 2020 ) . SSL methods have been categorised by how they adapt supervised learning algorithms ( van Engelen & Hoos , 2020 ) ; or their assumptions ( Chapelle et al. , 2006 ) , e.g . that data of each class form a cluster/manifold , or that data of different classes are separated by low density regions . It has been proposed that all such assumptions are variations of clustering ( van Engelen & Hoos , 2020 ) . Whilst ‘ clustering ’ itself is not well defined ( Estivill-Castro , 2002 ) , from a probabilistic perspective this suggests that SSL methods assume p ( x ) to be a mixture of conditional distributions that are distinguishable by some property , e.g . connected dense regions . This satisfies the condition that for unlabelled x to help in learning to predict y from x , the distribution of x must contain information relevant to the prediction ( Chapelle et al. , 2006 ; Zhu & Goldberg , 2009 ) . In this work , we distinguish SSL methods by whether they rely on direct properties of p ( x ) , or on properties that manifest in p ( θ ) , the distribution over parameters of p ( y|x ; θx ) , for x∼ p ( x ) . State-of-art models ( Berthelot et al. , 2019b ; a ) combine methods of both types . A canonical SSL method that relies on explicit assumptions of p ( x ) is the classical generative model : p ( X l , Y l , Xu ) = ∫ ψ , π p ( ψ , π ) p ( X l|Y l , ψ ) p ( Y l|π ) ∑ Y u∈YNu p ( Xu|Y u , ψ ) p ( Y u|π ) ︸ ︷︷ ︸ p ( Xu|ψ , π ) ( 1 ) Parameters ψ , π of p ( x|y ) and p ( y ) are learned from labelled and unlabelled data , e.g . by the EM algorithm , and predictions p ( y|x ) =p ( x|y ) p ( y ) /p ( x ) follow by Bayes ’ rule . Figure 1 ( left ) shows the corresponding graphical model . Whilst generative SSL has an appealing probabilistic rationale , it is rarely used in practice , similarly to its counterpart for fully supervised learning , in large part because p ( x ) is often complex yet must be accurately described ( Grandvalet & Bengio , 2005 ; Zhu & Goldberg , 2009 ; Lawrence & Jordan , 2006 ) . However , properties of p ( x ) underpin data augmentation and consistency regularisation ( Sajjadi et al. , 2016b ; Laine & Aila , 2017 ; Tarvainen & Valpola , 2017 ; Miyato et al. , 2018 ) , in which true x samples are adjusted , using implicit domain knowledge of p ( x|y ) , to generate artificial samples of the same class , whether or not that class is known . Other SSL methods consider p ( x ) in terms of components p ( x|z ) , where z is a latent representation useful for predicting y ( Kingma et al. , 2014 ; Rasmus et al. , 2015 ) . We focus on a family of SSL methods that add a function of the unlabelled data predictions to a discriminative supervised loss function , e.g . : • Entropy minimisation ( Grandvalet & Bengio , 2005 ) assumes classes are “ well separated ” . As a proxy for class overlap , the entropy of unlabelled data predictions is added to a discriminative supervised loss function ` sup : ` MinEnt ( θ ) = − ∑ i ∑ k yli , k log θ xli k︸ ︷︷ ︸ ` sup − ∑ j ∑ k θ xuj k log θ xuj k ( 2 ) • Mutual exclusivity ( Sajjadi et al. , 2016a ; Xu et al. , 2018 ) assumes no class overlap , i.e . correct predictions form ‘ one-hot ’ vectors . Viewed as vectors of logical variables z , such outputs exclusively satisfy the logical formula ∨ k ( zk ∧ j 6=k¬zj ) . A function based on the formula applies to unlabelled predictions : ` MutExc ( θ ) = ` sup − ∑ j log ∑ k θ xuj k ∏ k′ 6=k ( 1− θx u j k′ ) ( 3 ) • Pseudo-labelling ( Lee , 2013 ) assumes that predicted classes kj ( t ) =arg maxk θ xuj k for unlabelled data xuj at iteration t , are correct ( at the time ) and treated as labelled data : ` Pseudo ( θ , t ) = ` sup − ∑ j log ∑ k 1k=kj ( t ) θ xuj k ( 4 ) These methods , though intuitive , lack a probabilistic rationale comparable to that of generative models ( Eq . 1 ) . Summing over all labels for unlabelled samples is of little use ( Lawrence & Jordan , 2006 ) : p ( Y l|X l , Xu ) = ∫ θ p ( θ ) p ( Y l|X l , θ ) ∑ Y up ( Y u|Xu , θ ) ︸ ︷︷ ︸ =1 = ∫ θ p ( θ ) p ( Y l|X l , θ ) . ( 5 ) Indeed , under the associated graphical model ( Fig . 1 ( centre ) ) , parameters θ of p ( Y l|X l , θ ) are provably independent of Xu ( Seeger , 2006 ; Chapelle et al. , 2006 ) . Previous approaches to breaking this independence include introducing additional variables to Gaussian Processes ( Lawrence & Jordan , 2006 ) , or an assumption that parameters of p ( y|x ) are dependent on those of p ( x ) ( Seeger , 2006 ) . Taking further the ( general ) assumption of ( Seeger , 2006 ) , we provide a probabilistic model for discriminative SSL ( DSSL ) , analogous and complementary to that for generative SSL ( Eq . 1 ) . | The authors introduce a discriminative model for semi-supervised learning for which several existing methods are special cases. In their model, for each data value, there is a distribution from which the label is sampled. Although this distribution is unknown, in their framework the sampling distribution's parameters are approximately produced by a discriminative model such as a neural network trained on the labeled data. | SP:58b222745ef2775a8925397ba2a98ba086e945e4 |
A Probabilistic Model for Discriminative and Neuro-Symbolic Semi-Supervised Learning | 1 INTRODUCTION . In semi-supervised learning ( SSL ) , a mapping is learned that predicts labels y for data points x from a dataset of labelled pairs ( xl , yl ) and unlabelled xu . SSL is of practical importance since unlabelled data are often cheaper to acquire and/or more abundant than labelled data . For unlabelled data to help predict labels , the distribution of x must contain information relevant to the prediction ( Chapelle et al. , 2006 ; Zhu & Goldberg , 2009 ) . State-of-the-art SSL algorithms ( e.g . Berthelot et al. , 2019b ; a ) combine underlying methods , including some that leverage properties of the distribution p ( x ) , and others that rely on the label distribution p ( y|x ) . The latter include entropy minimisation ( Grandvalet & Bengio , 2005 ) , mutual exclusivity ( Sajjadi et al. , 2016a ; Xu et al. , 2018 ) and pseudo-labelling ( Lee , 2013 ) , which add functions of unlabelled data predictions to a typical discriminative supervised loss function . Whilst these methods each have their own rationale , we propose a formal probabilistic model that unifies them as a family of discriminative semi-supervised learning ( DSSL ) methods . Neuro-symbolic learning ( NSL ) is a broad field that looks to combine logical reasoning and statistical machine learning , e.g . neural networks . Approaches often introduce neural networks into a logical framework ( Manhaeve et al. , 2018 ) , or logic into statistical learning models ( Rocktäschel et al. , 2015 ) . Several works combine NSL with semi-supervised learning ( Xu et al. , 2018 ; van Krieken et al. , 2019 ) but lack rigorous justification . We show that our probabilistic model for discriminative SSL extends to the case where label components obey logical rules , theoretically justifying neuro-symbolic SSL approaches that augment a supervised loss function with a function based on logical constraints . Central to this work are ground truth parameters { θx } x∈X of the distributions p ( y|x ) , as predicted by models such as neural networks . For example , θxmay be a multinomial parameter vector specifying the distribution over all labels associated with a given x . Since each data point x has a specific label distribution defined by θx , sampling from p ( x ) induces an implicit distribution over parameters , p ( θ ) . If known , the distribution p ( θ ) serves as a prior over all model predictions , θ̃x : for labelled samples it may provide little additional information , but for unlabelled data may allow predictions to be evaluated and the model improved . As such , p ( θ ) provides a potential basis for semi-supervised learning . We show that , in practice , p ( θ ) can avoid much of the complexity of p ( x ) and have a concise analytical form known a priori . In principle , p ( θ ) can also be estimated from the parameters learned for labelled data ( fitting the intuition that predictions for unlabelled data should be consistent with those of labelled data ) . We refer to SSL methods that rely on p ( θ ) as discriminative and formalise them with a hierarchical probabilistic model , analogous to that for generative approaches . Recent results ( Berthelot et al. , 2019b ; a ) demonstrate that discriminative SSL is orthogonal and complementary to methods that rely on p ( x ) , such as data augmentation and consistency regularisation ( Sajjadi et al. , 2016b ; Laine & Aila , 2017 ; Tarvainen & Valpola , 2017 ; Miyato et al. , 2018 ) . We consider the explicit form of p ( θ ) in classification with mutually exclusive classes , i.e . where each x only ever pairs with a single y and y|x is deterministic . By comparison of their loss functions , the SSL methods mentioned ( entropy minimisation , mutual exclusivity and pseudo-labelling ) can be seen to impose continuous relaxations of the resulting prior p ( θ ) and are thus unified under our probabilistic model for discriminative SSL . We then consider classification with binary vector labels , e.g . representing concurrent image features or allowed chess board configurations , where only certain labels/attribute combinations may be valid , e.g . according to rules of the game or the laws of nature . Analysing the structure of p ( θ ) here , again assuming y|x is deterministic , we show that logical rules between attributes define its support . As such , SSL approaches that use fuzzy logic ( or similar ) to add logical rules into the loss function ( e.g . Xu et al. , 2018 ; van Krieken et al. , 2019 ) can be seen as approximating a continuous relaxation of p ( θ ) and so also fall under our probabilistic model for discriminative SSL . Our key contributions are : • to provide a probabilistic model for discriminative semi-supervised learning , comparable to that for classical generative methods , contributing to current theoretical understanding of SSL ; • to consider the analytical form of the distribution over parameters p ( θ ) , by which we explain several SSL methods , including entropy minimisation as used in state-of-art SSL models ; and • to show that our probabilistic model also unifies neuro-symbolic SSL in which logical rules over attributes are incorporated ( by fuzzy logic or similar ) to regularise the loss function , providing firm theoretical justification for this means of integrating ‘ connectionist ’ and ‘ symbolic ’ methods . 2 BACKGROUND AND RELATED WORK . Notation : xli∈X l , yli∈Y l are labelled data pairs , i∈ { 1 ... Nl } ; xuj ∈Xu , yuj ∈Y u are unlabelled data samples and their ( unknown ) labels , j ∈ { 1 ... Nu } ; X , Y are domains of x and y ; x , y are random variables of which x , y are realisations . θx parameterises the distribution p ( y|x ) , and is a realisation of a random variable θ . To clarify : for each x , an associated parameter θx defines a distribution over associated label ( s ) y|x ; and p ( θ ) is a distribution over all such parameters . 2.1 SEMI-SUPERVISED LEARNING . Semi-supervised learning is a well established field , described by a number of surveys and taxonomies ( Seeger , 2006 ; Zhu & Goldberg , 2009 ; Chapelle et al. , 2006 ; van Engelen & Hoos , 2020 ) . SSL methods have been categorised by how they adapt supervised learning algorithms ( van Engelen & Hoos , 2020 ) ; or their assumptions ( Chapelle et al. , 2006 ) , e.g . that data of each class form a cluster/manifold , or that data of different classes are separated by low density regions . It has been proposed that all such assumptions are variations of clustering ( van Engelen & Hoos , 2020 ) . Whilst ‘ clustering ’ itself is not well defined ( Estivill-Castro , 2002 ) , from a probabilistic perspective this suggests that SSL methods assume p ( x ) to be a mixture of conditional distributions that are distinguishable by some property , e.g . connected dense regions . This satisfies the condition that for unlabelled x to help in learning to predict y from x , the distribution of x must contain information relevant to the prediction ( Chapelle et al. , 2006 ; Zhu & Goldberg , 2009 ) . In this work , we distinguish SSL methods by whether they rely on direct properties of p ( x ) , or on properties that manifest in p ( θ ) , the distribution over parameters of p ( y|x ; θx ) , for x∼ p ( x ) . State-of-art models ( Berthelot et al. , 2019b ; a ) combine methods of both types . A canonical SSL method that relies on explicit assumptions of p ( x ) is the classical generative model : p ( X l , Y l , Xu ) = ∫ ψ , π p ( ψ , π ) p ( X l|Y l , ψ ) p ( Y l|π ) ∑ Y u∈YNu p ( Xu|Y u , ψ ) p ( Y u|π ) ︸ ︷︷ ︸ p ( Xu|ψ , π ) ( 1 ) Parameters ψ , π of p ( x|y ) and p ( y ) are learned from labelled and unlabelled data , e.g . by the EM algorithm , and predictions p ( y|x ) =p ( x|y ) p ( y ) /p ( x ) follow by Bayes ’ rule . Figure 1 ( left ) shows the corresponding graphical model . Whilst generative SSL has an appealing probabilistic rationale , it is rarely used in practice , similarly to its counterpart for fully supervised learning , in large part because p ( x ) is often complex yet must be accurately described ( Grandvalet & Bengio , 2005 ; Zhu & Goldberg , 2009 ; Lawrence & Jordan , 2006 ) . However , properties of p ( x ) underpin data augmentation and consistency regularisation ( Sajjadi et al. , 2016b ; Laine & Aila , 2017 ; Tarvainen & Valpola , 2017 ; Miyato et al. , 2018 ) , in which true x samples are adjusted , using implicit domain knowledge of p ( x|y ) , to generate artificial samples of the same class , whether or not that class is known . Other SSL methods consider p ( x ) in terms of components p ( x|z ) , where z is a latent representation useful for predicting y ( Kingma et al. , 2014 ; Rasmus et al. , 2015 ) . We focus on a family of SSL methods that add a function of the unlabelled data predictions to a discriminative supervised loss function , e.g . : • Entropy minimisation ( Grandvalet & Bengio , 2005 ) assumes classes are “ well separated ” . As a proxy for class overlap , the entropy of unlabelled data predictions is added to a discriminative supervised loss function ` sup : ` MinEnt ( θ ) = − ∑ i ∑ k yli , k log θ xli k︸ ︷︷ ︸ ` sup − ∑ j ∑ k θ xuj k log θ xuj k ( 2 ) • Mutual exclusivity ( Sajjadi et al. , 2016a ; Xu et al. , 2018 ) assumes no class overlap , i.e . correct predictions form ‘ one-hot ’ vectors . Viewed as vectors of logical variables z , such outputs exclusively satisfy the logical formula ∨ k ( zk ∧ j 6=k¬zj ) . A function based on the formula applies to unlabelled predictions : ` MutExc ( θ ) = ` sup − ∑ j log ∑ k θ xuj k ∏ k′ 6=k ( 1− θx u j k′ ) ( 3 ) • Pseudo-labelling ( Lee , 2013 ) assumes that predicted classes kj ( t ) =arg maxk θ xuj k for unlabelled data xuj at iteration t , are correct ( at the time ) and treated as labelled data : ` Pseudo ( θ , t ) = ` sup − ∑ j log ∑ k 1k=kj ( t ) θ xuj k ( 4 ) These methods , though intuitive , lack a probabilistic rationale comparable to that of generative models ( Eq . 1 ) . Summing over all labels for unlabelled samples is of little use ( Lawrence & Jordan , 2006 ) : p ( Y l|X l , Xu ) = ∫ θ p ( θ ) p ( Y l|X l , θ ) ∑ Y up ( Y u|Xu , θ ) ︸ ︷︷ ︸ =1 = ∫ θ p ( θ ) p ( Y l|X l , θ ) . ( 5 ) Indeed , under the associated graphical model ( Fig . 1 ( centre ) ) , parameters θ of p ( Y l|X l , θ ) are provably independent of Xu ( Seeger , 2006 ; Chapelle et al. , 2006 ) . Previous approaches to breaking this independence include introducing additional variables to Gaussian Processes ( Lawrence & Jordan , 2006 ) , or an assumption that parameters of p ( y|x ) are dependent on those of p ( x ) ( Seeger , 2006 ) . Taking further the ( general ) assumption of ( Seeger , 2006 ) , we provide a probabilistic model for discriminative SSL ( DSSL ) , analogous and complementary to that for generative SSL ( Eq . 1 ) . | This paper proposes a probabilistic model to describe semi-supervised/unsupervised learning, which is further applied to model neuro-symbolic learning. Comparing to traditional unsupervised/semi-supervised learning formulations, the proposed model imposes a prior on the label distribution instead of input features. When applying this formulation to neuro-symbolic learning, the symbolic part can be regarded as a prior on label space to constrain the learning process. Finally, the authors propose three methods to calculate the loss of violating the symbolic prior constraints on label space. | SP:58b222745ef2775a8925397ba2a98ba086e945e4 |
Average Reward Reinforcement Learning with Monotonic Policy Improvement | 1 INTRODUCTION . The goal of Reinforcement Learning ( RL ) is to build agents that can learn high-performing behaviors through trial-and-error interactions with the environment . Broadly speaking , modern RL tackles two kinds of problems : episodic tasks and continuing tasks . In episodic tasks , the agent-environment interaction can be broken into separate distinct episodes , and the performance of the agent is simply the sum of the rewards accrued within an episode . Examples of episodic tasks include training an agent to learn to play Go ( Silver et al. , 2016 ; 2018 ) or Atari video games ( Mnih et al. , 2013 ) , where the episode terminates when the game ends . In continuing tasks , such as controlling robots with long operating lifespans ( Peters & Schaal , 2008 ; Schulman et al. , 2015 ; Haarnoja et al. , 2018 ) , there is no natural separation of episodes and the agent-environment interaction continues indefinitely . The performance of an agent in a continuing task is more difficult to quantify since even for bounded reward functions , the total sum of rewards is typically infinite . One way of making the long-term reward objective meaningful for continuing tasks is to apply discounting , i.e. , we maximize the discounted sum of rewards r0 + γr1 + γ2r2 + · · · for some discount factor γ ∈ ( 0 , 1 ) . This is guaranteed to be finite for any bounded reward function . However the discounted objective biases the optimal policy to choose actions that lead to high near-term performance rather than to high long-term performance . Such an objective — while useful in certain applications — is not appropriate when the goal is optimize long-term behavior . As argued in Chapter 10 of Sutton & Barto ( 2018 ) and in Naik et al . ( 2019 ) , a more natural objective is to use the average reward received by an agent over every time-step . While the average reward setting has been extensively studied in the classical Markov Decision Process literature ( Howard , 1960 ; Blackwell , 1962 ; Veinott , 1966 ; Bertsekas et al. , 1995 ) , it is much less commonly used in reinforcement learning . An important open question is whether recent advances in RL for the discounted reward criterion can be naturally generalized to the average reward setting . One major source of difficulty with modern DRL algorithms lies in controlling the step-size for policy updates . In order to have better control over step-sizes , Schulman et al . ( 2015 ) constructed a lower bound on the difference between the expected discounted return for two arbitrary policies π and π′ . The bound is a function of the divergence between these two policies and the discount factor . Schulman et al . ( 2015 ) showed that iteratively maximizing this lower bound generates a sequence of monotonically improved policies in terms of their discounted return . In this paper , we first show that the policy improvement theorem from Schulman et al . ( 2015 ) results in a non-meaningful bound in the average reward case . We then derive a novel result which lower bounds the difference of the average rewards based on the divergence of the policies . The bound depends on the average divergence between the policies and on the so-called Kemeny constant , which measures to what degree the unichain Markov chains associated with the policies are wellconnected . We show that iteratively maximizing this lower bound guarantees monotonic average reward policy improvement . Similar to the discounted case , the problem of maximizing the lower bound can be approximated with DRL algorithms which can be optimized using samples collected in the environment . We describe in detail two such algorithms : Average Reward TRPO ( ATRPO ) and Average Cost CPO ( ACPO ) , which are average reward versions of algorithms based on the discounted criterion ( Schulman et al. , 2015 ; Achiam et al. , 2017 ) . Using the MuJoCo simulated robotic benchmark , we carry out extensive experiments with the ATRPO algorithm and show that it is more effective than their discounted counterparts for these continuing control tasks . To our knowledge , this is one of the first paper to address DRL using the long-term average reward criterion . 2 PRELIMINARIES . Consider a Markov Decision Process ( MDP ) ( Sutton & Barto , 2018 ) ( S , A , P , r , µ ) where the state space S and action space A are assumed to be finite . The transition probability is denoted by P : S ×A×S → [ 0 , 1 ] , the bounded reward function r : S ×A → [ rmin , rmax ] , and µ : S → [ 0 , 1 ] is the initial state distribution . Let π = { π ( a|s ) : s ∈ S , a ∈ A } be a stationary policy , and Π is the set of all stationary policies . Here we discuss the two objective formulations for continuing control tasks : the average reward approach and discounted reward approach . Average Reward Approach In this paper , we will focus exclusively on unichain MDPs , which is when the Markov chain corresponding to every policy contains only one recurrent class and a finite but possibly empty set of transient states . The average reward objective is defined as : ρ ( π ) : = lim N→∞ 1 N E τ∼π [ N−1∑ t=0 r ( st , at ) ] = E s∼dπ a∼π [ r ( s , a ) ] . ( 1 ) Here dπ ( s ) : = limN→∞ 1N ∑N−1 t=0 P ( st = s|π ) = limt→∞ P ( st = s|π ) is the stationary state distribution under policy π , τ = ( s0 , a0 , . . . , ) is a sample trajectory . We use τ ∼ π to indicate that the trajectory is sampled from policy π , i.e . s0 ∼ µ , at ∼ π ( ·|st ) , and st+1 ∼ P ( ·|st , at ) . In the unichain case , the average reward ρ ( π ) is state-independent for any policy π ( Bertsekas et al. , 1995 ) . We express the average-reward value function as V π ( s ) : = Eτ∼π [ ∑∞ t=0 ( r ( st , at ) − ρ ( π ) ) ∣∣∣∣s0 = s ] and action-value function as Qπ ( s , a ) : = Eτ∼π [ ∑∞ t=0 ( r ( st , at ) − ρ ( π ) ) ∣∣∣∣s0 = s , a0 = a ] . We define the average reward advantage function as Aπ ( s , a ) : = Qπ ( s , a ) − V π ( s ) . Discounted Reward Approach For some discount factor γ ∈ ( 0 , 1 ) , the discounted reward objective is defined as ργ ( π ) : = E τ∼π [ ∞∑ t=0 γtr ( st , at ) ] = 1 1− γ E s∼dπ , γ a∼π [ r ( s , a ) ] . ( 2 ) where dπ , γ ( s ) : = ( 1 − γ ) ∑∞ t=0 γ tP ( st = s|π ) is known as the future discounted state visitation distribution under policy π . Note that unlike the average reward objective , the discounted objective depends on the initial state distribution µ . It can be easily shown that dπ , γ ( s ) → dπ ( s ) for all s as γ → 1 . The discounted value function is defined as V πγ ( s ) : = Eτ∼π [ ∑∞ t=0 γ tr ( st , at ) ∣∣∣∣s0 = s ] and discounted action-value function Qπγ ( s , a ) : = Eτ∼π [ ∑∞ t=0 γ tr ( st , at ) ∣∣∣∣s0 = s , a0 = a ] . Finally , the discounted advantage function is defined as Aπγ ( s , a ) : = Q π γ ( s , a ) − V πγ ( s ) . It is well-known that limγ→1 ( 1− γ ) ργ ( π ) = ρ ( π ) , implying that the discounted and average reward objectives are equivalent in the limit as γ approaches 1 ( Blackwell , 1962 ) . We will further discuss the relationship between the discounted and average reward value functions in the supplementary materials and prove that limγ→1Aπγ ( s , a ) = A π ( s , a ) ( see Corollary A.1 ) . 3 MONTONICALLY IMPROVEMENT GUARANTEES FOR DISCOUNTED RL . In many modern RL literature ( Schulman et al. , 2015 ; 2017 ; Abdolmaleki et al. , 2018 ; Vuong et al. , 2019 ) , algorithms iteratively update policies within a local region , i.e. , at iteration k we find policy πk+1 by maximizing ργ ( π ) within some region D ( π , πk ) ≤ δ for some divergence measure D. This approach allows us to control the step-size of each update using different choices of D and δ which can lead to better sample efficiency ( Peters & Schaal , 2008 ) . Schulman et al . ( 2015 ) derived a policy improvement bound based on a specific choice of D : ργ ( πk+1 ) − ργ ( πk ) ≥ 1 1− γ E s∼dπk , γ a∼πk+1 [ Aπkγ ( s , a ) ] − C ·max s [ DTV ( πk+1 ‖ πk ) [ s ] ] ( 3 ) where DTV ( π′ ‖ π ) [ s ] : = 12 ∑ a |π′ ( a|s ) − π ( a|s ) | is the total variation divergence for policies π and π′ , and C is some constant which does not depend on the divergence term DTV . Schulman et al . ( 2015 ) showed that by choosing πk+1 such that the right hand side of ( 3 ) is maximized , we are guaranteed to have ργ ( πk+1 ) ≥ ργ ( πk ) . This provided the theoretical foundation for an entire class of scalable policy optimization algorithms based on efficiently maximizing the right-hand-side of ( 3 ) ( Schulman et al. , 2015 ; 2017 ; Wu et al. , 2017 ; Abdolmaleki et al. , 2018 ; Vuong et al. , 2019 ) . A natural question arises here is whether the iterative procedure described by Schulman et al . ( 2015 ) also guarantees improvement w.r.t . the average reward . Since the discounted and average reward objectives are equivalent when γ → 1 , one may assume that we can also lower bound the policy performance difference of the average reward objective by letting γ → 1 for the bounds in Schulman et al . ( 2015 ) . Unfortunately this results in a non-meaningful bound . We will demonstrate this through a similar policy improvement bound from Achiam et al . ( 2017 ) based on the average divergence but a similar argument can be made for the original bound from Schulman et al . ( 2015 ) ( see supplementary material for proof and discussion ) . Proposition 1 . Consider the following bound from Achiam et al . ( 2017 ) D−π , γ ( π ′ ) ≤ ργ ( π′ ) − ργ ( π ) ≤ D+π , γ ( π′ ) ( 4 ) where D±π , γ ( π ′ ) = 1 1− γ E s∼dπ a∼π [ π′ ( a|s ) π ( a|s ) Aπγ ( s , a ) ] ± 2γ γ ( 1− γ ) 2 E s∼dπ [ DTV ( π ′ ‖ π ) [ s ] ] and γ = maxs ∣∣Ea∼π′ [ Aπγ ( s , a ) ] ∣∣ . We have : lim γ→1 ( 1− γ ) D±π , γ ( π′ ) = ±∞ ( 5 ) Since limγ→1 ( 1− γ ) ( ργ ( π′ ) − ργ ( π ) ) = ρ ( π′ ) − ρ ( π ) , Proposition 1 says ( 4 ) becomes trivial when used on the average reward . This result is discouraging as it shows that the policy improvement guarantee from Schulman et al . ( 2015 ) does not appear to generalize to the average reward setting . In the next section , we will derive an alternative policy improvement bound for the average reward objective which can be used to generate monotonically improved policies w.r.t . the average reward . | The paper proposes an extension of the performance improvement bound, introduced for the first time by Kakade & Langford (2002), to the case of average reward performance index instead of discounted return. The paper starts with a theoretical contribution in which all the steps of the original derivation are adapted for the new setting, leading to a new performance improvement bound. Then, this theoretical achievement is employed to derive the corresponding adaptation of TRPO (called Average Reward TRPO) and CPO (called Average Cost CPO). Finally, an experimental evaluation on some Mujoco domains is provided. | SP:1510815ddfb253f977b3ce9b53ea02b4044ffb90 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.