paper_name stringlengths 11 170 | text stringlengths 8.07k 307k | summary stringlengths 152 6.16k | paper_id stringlengths 43 43 |
|---|---|---|---|
Learning to Remember Patterns: Pattern Matching Memory Networks for Traffic Forecasting | 1 INTRODUCTION . Traffic forecasting is a challenging problem due to complex road networks , varying patterns in the data , and intertwined dependencies among models . This implies that prediction methods should not only find intrinsic spatio-temporal dependencies among many roads , but also quickly respond to irregular congestion and various traffic patterns ( Lee et al. , 2020 ) caused by external factors , such as accidents or weather conditions ( Vlahogianni et al. , 2014 ; Li & Shahabi , 2018 ; Xie et al. , 2020 ; Jiang & Luo , 2021 ) . To resolve these challenges and successfully predict traffic conditions , many deep learning models have been proposed . Examples include the models with graph convolutional neural networks ( GCNs ) ( Bruna et al. , 2014 ) and recurrent neural networks ( RNNs ) ( Siegelmann & Sontag , 1991 ) , which outperform conventional statistical methods such as autoregressive integrated moving average ( ARIMA ) ( Vlahogianni et al. , 2014 ; Li et al. , 2018 ) . Attention-based models , such as GMAN ( Zheng et al. , 2020 ) , have also been explored to better handle complex spatio-temporal dependency of traffic data . Graph WaveNet ( Wu et al. , 2019 ) adopts a diffusion process with a self-learning adjacency matrix and dilated convolutional neural networks ( CNNs ) , achieving stateof-the-art performance . Although effective , existing models have a weakness in that they do not accurately forecast when conditions are abruptly changed ( e.g. , rush hours and accidents ) . In this work , we aim to design a novel method for modeling the spatio-temporal dependencies of roads and to improve forecasting performance . To achieve this goal , we first extract representative traffic patterns from historical traffic data , as we find that there are similar traffic patterns among roads , and a set of traffic patterns can be generalized for roads with similar spatio-temporal features . Figure 1 shows the example speed patterns ( left , 90-minute window ) that we extract from many different roads and a representative traffic pattern ( right time series ) . With the representative patterns , we transform the conventional forecasting problem into a pattern-matching task to find out which pattern would be the best match for the given spatio-temporal features to predict future traffic conditions . With insights from the huge success of neural memory networks in natural language processing and machine translation ( Weston et al. , 2015 ; Sukhbaatar et al. , 2015 ; Kaiser et al. , 2017 ; Madotto et al. , 2018 ) , we design graph convolutional memory networks called GCMem to manage representative patterns in spatio-temporal perspective . Lastly , we design PM-MemNet , which utilizes representative patterns from GCMem for traffic forecasting . PM-MemNet consists of an encoder and a decoder . The encoder consists of temporal embedding with stacked GCMem , which generates meaningful representations via memorization , and the decoder is composed of a gated recurrent unit ( GRU ) with GCMem . We compare PM-MemNet to existing state-of-the-art models and find that PM-MemNet outperforms existing models . We also present a qualitative analysis in which we further investigate the strengths of PM-MemNet in managing a traffic pattern where high responsiveness of a model to abrupt speed changes is desired for accurate forecasting . The experimental results indicate that PM-MemNet achieves state-of-the-art performance , especially in long-term prediction , compared to existing deep learning models . To further investigate the characteristics of PM-MemNet , we conduct an ablation study with various decoder architectures and find that PM-MemNet demonstrates the best performance . We also investigate how the number of representative patterns affects model performance . Finally , we discuss the limitations of this work and future directions for neural memory networks in the traffic forecasting domain . The contributions of this work include : ( 1 ) computing representative traffic patterns of roads , ( 2 ) design of GCMem to manage the representative patterns , ( 3 ) design of PM-MemNet that matches and uses the most appropriate patterns from GCMem for traffic forecasting , ( 4 ) evaluation of PMMemNet compared to state-of-the-art models , ( 5 ) qualitative analysis to identify the strengths of PM-MemNet , and ( 6 ) discussion of limitations and future research directions . 2 RELATED WORK . 2.1 TRAFFIC FORECASTING . Deep learning models achieve huge success by effectively capturing spatio-temporal features in traffic forecasting tasks . Past studies ahve shown that RNN-based models outperform conventional temporal modeling approaches , such as ARIMA and support vector regression ( SVR ) ( Vlahogianni et al. , 2014 ; Li et al. , 2018 ) . More recently , many studies have demonstrated that attention-based models ( Zheng et al. , 2020 ; Park et al. , 2020 ) and CNNs ( Yu et al. , 2018 ; Wu et al. , 2019 ) record better performance in long-term period prediction tasks , compared to RNN-based models . In terms of spatial modeling , Zhang et al . ( 2016 ) propose a CNN-based spatial modeling method for Euclidean space . Another line of modeling methods , such as GCNs , using graph structures for managing complex road networks also become popular . However , there are difficulties in using GCNs in the modeling process , such as the need to build an adjacency matrix and the dependence of GCNs on invariant connectivity in the adjacency matrix . To overcome these difficulties , a set of approaches , such as graph attention models ( GATs ) , have been proposed to dynamically calculate edge importance ( Park et al. , 2020 ) . GWNet ( Wu et al. , 2019 ) adopts a self-adaptive adjacency matrix to capture hidden spatial dependencies in training . Although effective , forecasting models still suffer from inaccurate predictions due to abruptly changing road speeds and instability , with lagging patterns in long-term periods . To address these challenges , we build , save , and retrieve representative traffic patterns for predicting speed rather than directly forecasting with an input sequence . 2.2 NEURAL MEMORY NETWORKS . neural memory networks are widely used for sequence-to-sequence modeling in the natural language processing and machine translation domains . Memory networks are first proposed by Weston et al . ( 2015 ) to answer a query more precisely even for large datasets with long-term memory . Memory networks perform read and write operations for given input queries . Sukhbaatar et al . ( 2015 ) introduce end-to-end memory networks that can update memory in an end-to-end manner . Through the end-to-end memory learning , models can be easily applied to realistic settings . Furthermore , by using adjacent weight tying , they can achieve recurrent characteristics that can enhance generalization . Kaiser et al . ( 2017 ) propose novel memory networks that can be utilized in various domains where life-long one-shot learning is needed . Madotto et al . ( 2018 ) also introduce Mem2Seq , which integrates the multi-hop attention mechanism with memory networks . In our work , we utilize memory networks for traffic pattern modeling due to the similarity of the tasks and develop novel graph convolutional memory networks called GCMem to better model the spatio-temporal correlation of the given traffic patterns . 3 PROPOSED APPROACH . In this section , we define the traffic forecasting problem , describe how we extract key patterns in the traffic data that serve as keys , and introduce our model , PM-MemNet . 3.1 PROBLEM SETTING . To handle the spatial relationships of roads , we utilize a road network graph . We define a road network graph as G = ( V , E , A ) , where V is a set of all different nodes with |V| = N , E is a set of edges representing the connectivity between nodes , andA ∈ RN×N is a weighted adjacency matrix that contains the connectivity and edge weight information . An edge weight is calculated based on the distance and direction of the edge between two connected nodes . As used in the previous approaches ( Li et al. , 2018 ; Wu et al. , 2019 ; Zheng et al. , 2020 ; Park et al. , 2020 ) , we calculate edge weights via the Gaussian kernel as follows : Ai , j = exp ( − dist 2 ij σ2 ) , where distij is the distance between node i and node j and σ is the standard deviation of the distances . Prior research has formulated a traffic forecasting problem as a simple spatio-temporal data prediction problem ( Li et al. , 2018 ; Wu et al. , 2019 ; Zheng et al. , 2020 ; Park et al. , 2020 ) aiming to predict values in the next T time steps using previous T ′ historical traffic data and an adjacency matrix . Traffic data at time t is represented by a graph signal matrix , XtG ∈ RN×din , where din is the number of features , such as speed , flow , and time of the day . In summary , the goal of the previous work is to learn a mapping function f ( · ) to directly predict future T graph signals from T ′ historical input graph signals : [ XG ( t−T ′+1 ) , · · · , XG ( t ) ] f ( · ) −−→ [ XG ( t+1 ) , · · · , XG ( t+T ) ] The goal of this study is different from previous work in that we aim to predict future traffic speeds from patterned data , instead of utilizing input XG directly . We denote P ⊂ RT ′ as a set of representative traffic patterns , p ∈ P as one traffic pattern in P , and d : X × P → [ 0 , ∞ ) as a distance function for pattern matching . Detailed information about traffic pattern extraction will be discussed in the next subsection . Our problem is to train the mapping function f ( · ) as follows : [ XG ( t−T ′+1 ) , · · · , XG ( t ) ] d ( · ) , k−NN−−−−−−−→ [ P t1 , . . . , P tN ] f ( · ) −−→ [ XG ( t+1 ) , · · · , XG ( t+T ) ] , where P ti = { p1 , . . . , pk } is a set of k-nearest neighboring traffic patterns of node i in time t , with a distance function d. Note that pj is the j-th nearest neighbor pattern . 3.2 KEY EXTRACTION FROM TRAFFIC PATTERNS . Analyzing the traffic data , we find that the data has repeating patterns . In traffic data , the leading and trailing patterns have a high correlation , even during short-term periods . To take advantage of these findings , in our model , we build a representative pattern set , P. First , from historical data , we compute an average daily pattern , which consists of 288 speed data points ( total 24 hours with 5- minute intervals ) for each vertex v ∈ V . We then extract pattern p by slicing the daily patterns with a given window size T ′ , as shown in Figure 2 ( a ) . At this stage , |P| = N ×b 288T ′ c. After we collect the patterns , we investigate similarity distribution of the extracted pattern set , P , via cosine similarity ( Figure 2 ( b ) ) and find that the pattern set P has a biased distribution with too many similar patterns ( i.e. , class imbalance ) . Since such class imbalance causes memory ineffectiveness in accurate memory retrieval and gives biased training results , we use clustering-based undersampling ( Lin et al. , 2017 ) with cosine similarity . For example , if pattern p and pattern p′ have a cosine similarity larger than δ , they are in same cluster . We utilize the center of each cluster as a representative pattern of that cluster . After undersampling by clustering , we have a balanced and representative pattern set , P , as shown in Figure 2 ( c ) , which we use as keys for memory access . Table 2 presents the effect of different δ and |P| on forecasting performance . | This paper explores a new direction of model design in traffic forecasting tasks. It proposes a neural memory module to model the spatio-temporal traffic data and designs a new traffic forecasting model based on the memory module. Experiments on a few public datasets demonstrate the effectiveness of the proposed scheme. | SP:4a83a8ba8190703c509ecc17fbdc70e82e67d6c8 |
Deep Classifiers with Label Noise Modeling and Distance Awareness | 1 INTRODUCTION . While deep learning has led to impressive advances in predictive accuracy , models often still suffer from overconfidence and ill-calibrated uncertainties ( Ovadia et al. , 2019 ) . This is particularly problematic in safety-critical applications ( e.g. , healthcare , autonomous driving ) , where uncertainty estimation is crucial to ensure reliability and robustness ( Filos et al. , 2019 ; Dusenberry et al. , 2020 ) . Predictive uncertainties generally come in two flavors : model uncertainty ( also known as epistemic ) and data uncertainty ( also known as aleatoric ) ( Murphy , 2012 ) . Model uncertainty measures how confident the model should be based on what it knows about the world , that is , how much it can know about certain test data given the training data it has seen . Data uncertainty measures the uncertainty intrinsic in the data itself , for example due to fundamental noise in the labelling process . Good model uncertainty estimates allow for out-of-distribution ( OOD ) detection , that is , for recognizing data examples that are substantially different from the training data . On the other hand , good data uncertainty estimates allow for in-distribution calibration , that is , knowing which training ( or testing ) data examples the model should be more or less confident about . Many recently proposed models for uncertainty estimation excel at one or the other of these uncertainty types . For instance , the spectral-normalized Gaussian process ( SNGP ) ( Liu et al. , 2020 ) uses a latent Gaussian process to achieve distance-aware model uncertainties and thus affords excellent OOD detection . Conversely , the heteroscedastic classification method ( Collier et al. , 2020 ; 2021 ) offers excellent calibration and improved accuracy thanks to modeling input- and class-dependent label noise in the training data . However , there have not been many attempts to combine the complementary benefits of these two types of uncertainty modeling ( e.g. , Depeweg et al. , 2018 ) ( see related work in Appendix A.1 ) . In this work , we propose the heteroscedastic SNGP ( HetSNGP ) model , which allows for joint modeling of model and data uncertainties based on a hierarchy of two latent random variables . We show that HetSNGP gives good in-distribution and OOD accuracy and calibration , yielding a model with uncertainties suitable for deployment in critical applications . Our main contributions are : • We propose a new model , the heteroscedastic spectral-normalized Gaussian process ( HetSNGP ) , which provides both distance-aware model and data uncertainties . • We describe an efficient approximate inference scheme that allows training HetSNGP with a computational budget that is comparable to standard neural network training . • We show empirically on different benchmark datasets that HetSNGP offers a favorable combination of model and data uncertainty . It generally preserves the SNGP ’ s OOD performance and the heteroscedastic in-distribution performance and even outperforms these baselines on some datasets , where OOD and heteroscedastic uncertainties are helpful . • We propose an ensembled version of our model , the HetSNGP Ensemble , which additionally accounts for parameter uncertainty and outperforms other ensemble baselines . 2 BACKGROUND . 2.1 MODEL UNCERTAINTY AND SPECTRAL-NORMALIZED GAUSSIAN PROCESS . Model uncertainty ( or epistemic uncertainty ) captures all the uncertainty about whether a given model is correctly specified for a certain task , given the training data . Before any training data has been observed , this uncertainty depends only on the prior knowledge about the task , which can for instance be encoded into distributions about the model parameters or into the architecture of the model ( i.e. , the model class ) ( Fortuin , 2021 ) . After training data has been observed , one should expect the model uncertainty to decrease within the support of the training data distribution , that is , on points that are close to the training data in the input space . We will generally call these points in-distribution ( ID ) . Conversely , on points that are far away from the training points and thus out-ofdistribution ( OOD ) , we should not expect the model uncertainty to decrease , since the training data points are not informative enough to make any assertions about the correctness of the given model on these points . In this sense , the optimal model uncertainty should be distance-aware , that is , it should grow away from the training data ( Liu et al. , 2020 ) . The spectral-normalized Gaussian process ( SNGP ) ( Liu et al. , 2020 ) provides such distance-aware model uncertainties by specifying a Gaussian process prior ( Rasmussen & Williams , 2006 ) over the latent data representations in the penultimate layer of the neural network . Distance-awareness is ensured by using spectral normalization on the hidden layers ( Behrmann et al. , 2019 ) , which encourages bi-Lipschitzness of the mapping from data to latent space , constraining the model from collapsing any input feature dimensions in the latent representations and approximately preserving the distances between data points in the latent space ( Liu et al. , 2020 ) . Note that this approach only partially captures the model uncertainty , namely in form of the uncertainty over the latents . It does not however capture the uncertainty over the model parameters , such as for instance Bayesian neural networks ( MacKay , 1992 ; Neal , 1993 ) or ensemble methods ( Lakshminarayanan et al. , 2016 ) . 2.2 DATA UNCERTAINTY AND THE HETEROSCEDASTIC METHOD . As opposed to the model uncertainty described above , data uncertainty is intrinsic in the data and thus irreducible with increasing amounts of data . In the case of continuous data ( e.g. , regression problems ) , data uncertainty often comes in the form of random noise on the measurements . For discrete data ( e.g. , classification problems ) , it usually comes as label noise , that is , a certain number of data points will be assigned the wrong label in the training data . This label noise can be class- and input-dependent ( Beyer et al. , 2020 ) . For instance , the Imagenet dataset ( Deng et al. , 2009 ) , contains 100 different classes of dog breeds , which are often harder to tell apart for human labelers than the other classes in the dataset . Modeling this type of data uncertainty can improve the calibration and robustness of predictive models ( Collier et al. , 2020 ) . A model that does explicitly handle the input- and class-dependent label noise is the heteroscedastic method ( Collier et al. , 2021 ) . The heteroscedastic method models input- and class-dependent noise by introducing a latent multivariate Gaussian distribution on the softmax logits of a standard neural network classifier . The covariance matrix of this latent distribution is a function of the input ( heteroscedastic ) and models inter-class correlations in the logit noise . 3 METHOD . 3.1 SETUP AND NOTATION . Let us consider a dataset D = { ( xi , yi ) } Ni=1 of input-output pairs , where xi ∈ Rd and yi ∈ { 1 , . . . , K } , that is , a classification problem with K classes . The data examples are assumed to be sampled i.i.d . from some true data-generating distribution as ( xi , yi ) ∼ p∗ ( x , y ) . 3.2 GENERATIVE PROCESS . To jointly model the two different types of uncertainty , we propose a hierarchical model of two latent random variables , which we denote by f and u. f is a latent function value associated to the input x ( as in the Gaussian process literature ) and is designed to capture the model uncertainty , while u is a latent vector of logits ( or utilities ) that capture the data uncertainty , similar to the setup in Collier et al . ( 2020 ) , which was inspired by the econometrics literature ( Train , 2009 ) . Similarly to Liu et al . ( 2020 ) , we place a latent Gaussian process ( GP ) prior over f , as p ( f ) = GP ( 0 , kθ ( · , · ) ) , where kθ is a parameterized kernel function with parameters θ . Evaluating this kernel on all pairwise combinations of datapoints in x yields the kernel matrix Kθ ( x , x ) ) . We then define u as a ( heteroscedastically ) noisy observation of f . Stacking the variables across the whole dataset gives us the matrices F , U ∈ RN×K . We refer to their respective rows as fi , ui ∈ RK and their columns as fc , uc ∈ RN . The columns are independent under the GP prior , but the rows are not . Conversely , the columns are correlated in the heteroscedastic noise model , while the rows are independent . A hierarchical model using both uncertainties therefore leads to logits that are correlated across both data points and classes . The full generative process is fc ∼ N ( 0 , Kθ ( x , x ) ) ( 1 ) ui ∼ N ( fi , Σ ( xi ; ϕ ) ) ( 2 ) p ( yi = c |ui ) = 1 [ c = arg max k uik ] ( 3 ) The predictive can then be computed my marginalizing , that is p ( y |x ) = Eu [ p ( y |u ) ] =∫ p ( y |u ) p ( u |x ) du . Intuitively , f captures the model uncertainty , that is , the uncertainty about the functional mapping between x and y on the level of the latents . It uses the covariance between data points to achieve this distance-awareness , namely it uses the kernel function to assess the similarity between data points , yielding an uncertainty estimate that grows away from the data . On the other hand , u captures the data uncertainty , by explicitly modelling the per-class uncertainty on the level of the logits . ϕ can learn to encode correlations in the noise between different classes ( e.g. , the dog breeds in Imagenet ) . It does not itself capture the model uncertainty , but inherits it through its hierarchical dependence on f , such that the resulting probability p ( y |u ) ultimately jointly captures both types of uncertainty . In practice , we usually learn the kernel using deep kernel learning ( Wilson et al. , 2016 ) , that is , we define it as the RBF kernel kθ ( xi , xj ) = kRBF ( hi , hj ) = exp ( ‖hi − hj‖22/λ ) with length scale λ and hi = h ( xi ; θ ) ∈ Rm with h ( · ; θ ) being a neural network model ( e.g. , a ResNet ) parameterized by θ . This kernel is then shared between classes . Moreover , following Liu et al . ( 2020 ) , we typically encourage bi-Lipschitzness of h using spectral normalization ( Behrmann et al. , 2019 ) , which then leads to an approximate preservation of distances between the input space and latent space , thus allowing for distance-aware uncertainty modeling in the latent space . Additionally , Σ ( · ; ϕ ) is usually also a neural network parameterized by ϕ . To ease notation , we will typically drop these parameters in the following . Note that the prior over fc ( and thus also uc ) has zero mean , thus leading to a uniform output distribution away from the data . Note that this is also reminiscent of multi-task GPs ( Williams et al. , 2007 ) , where separate kernels are used to model covariances between data points and tasks and are then combined into a Kronecker structure . | This paper studies the combination between model uncertainty and data uncertainty based on spectral-normalized Gaussian process. Theoretical results show that heteroscedastic SNGP allows for joint modeling of model and data uncertainties. The paper then proposes an approximate inference scheme for efficient model training. Experiment results support these claims on synthetic datasets and typical classification benchmarks. | SP:e3ec7c4484ffce62c71a364bd6fadcad84dd5a3a |
Deep Classifiers with Label Noise Modeling and Distance Awareness | 1 INTRODUCTION . While deep learning has led to impressive advances in predictive accuracy , models often still suffer from overconfidence and ill-calibrated uncertainties ( Ovadia et al. , 2019 ) . This is particularly problematic in safety-critical applications ( e.g. , healthcare , autonomous driving ) , where uncertainty estimation is crucial to ensure reliability and robustness ( Filos et al. , 2019 ; Dusenberry et al. , 2020 ) . Predictive uncertainties generally come in two flavors : model uncertainty ( also known as epistemic ) and data uncertainty ( also known as aleatoric ) ( Murphy , 2012 ) . Model uncertainty measures how confident the model should be based on what it knows about the world , that is , how much it can know about certain test data given the training data it has seen . Data uncertainty measures the uncertainty intrinsic in the data itself , for example due to fundamental noise in the labelling process . Good model uncertainty estimates allow for out-of-distribution ( OOD ) detection , that is , for recognizing data examples that are substantially different from the training data . On the other hand , good data uncertainty estimates allow for in-distribution calibration , that is , knowing which training ( or testing ) data examples the model should be more or less confident about . Many recently proposed models for uncertainty estimation excel at one or the other of these uncertainty types . For instance , the spectral-normalized Gaussian process ( SNGP ) ( Liu et al. , 2020 ) uses a latent Gaussian process to achieve distance-aware model uncertainties and thus affords excellent OOD detection . Conversely , the heteroscedastic classification method ( Collier et al. , 2020 ; 2021 ) offers excellent calibration and improved accuracy thanks to modeling input- and class-dependent label noise in the training data . However , there have not been many attempts to combine the complementary benefits of these two types of uncertainty modeling ( e.g. , Depeweg et al. , 2018 ) ( see related work in Appendix A.1 ) . In this work , we propose the heteroscedastic SNGP ( HetSNGP ) model , which allows for joint modeling of model and data uncertainties based on a hierarchy of two latent random variables . We show that HetSNGP gives good in-distribution and OOD accuracy and calibration , yielding a model with uncertainties suitable for deployment in critical applications . Our main contributions are : • We propose a new model , the heteroscedastic spectral-normalized Gaussian process ( HetSNGP ) , which provides both distance-aware model and data uncertainties . • We describe an efficient approximate inference scheme that allows training HetSNGP with a computational budget that is comparable to standard neural network training . • We show empirically on different benchmark datasets that HetSNGP offers a favorable combination of model and data uncertainty . It generally preserves the SNGP ’ s OOD performance and the heteroscedastic in-distribution performance and even outperforms these baselines on some datasets , where OOD and heteroscedastic uncertainties are helpful . • We propose an ensembled version of our model , the HetSNGP Ensemble , which additionally accounts for parameter uncertainty and outperforms other ensemble baselines . 2 BACKGROUND . 2.1 MODEL UNCERTAINTY AND SPECTRAL-NORMALIZED GAUSSIAN PROCESS . Model uncertainty ( or epistemic uncertainty ) captures all the uncertainty about whether a given model is correctly specified for a certain task , given the training data . Before any training data has been observed , this uncertainty depends only on the prior knowledge about the task , which can for instance be encoded into distributions about the model parameters or into the architecture of the model ( i.e. , the model class ) ( Fortuin , 2021 ) . After training data has been observed , one should expect the model uncertainty to decrease within the support of the training data distribution , that is , on points that are close to the training data in the input space . We will generally call these points in-distribution ( ID ) . Conversely , on points that are far away from the training points and thus out-ofdistribution ( OOD ) , we should not expect the model uncertainty to decrease , since the training data points are not informative enough to make any assertions about the correctness of the given model on these points . In this sense , the optimal model uncertainty should be distance-aware , that is , it should grow away from the training data ( Liu et al. , 2020 ) . The spectral-normalized Gaussian process ( SNGP ) ( Liu et al. , 2020 ) provides such distance-aware model uncertainties by specifying a Gaussian process prior ( Rasmussen & Williams , 2006 ) over the latent data representations in the penultimate layer of the neural network . Distance-awareness is ensured by using spectral normalization on the hidden layers ( Behrmann et al. , 2019 ) , which encourages bi-Lipschitzness of the mapping from data to latent space , constraining the model from collapsing any input feature dimensions in the latent representations and approximately preserving the distances between data points in the latent space ( Liu et al. , 2020 ) . Note that this approach only partially captures the model uncertainty , namely in form of the uncertainty over the latents . It does not however capture the uncertainty over the model parameters , such as for instance Bayesian neural networks ( MacKay , 1992 ; Neal , 1993 ) or ensemble methods ( Lakshminarayanan et al. , 2016 ) . 2.2 DATA UNCERTAINTY AND THE HETEROSCEDASTIC METHOD . As opposed to the model uncertainty described above , data uncertainty is intrinsic in the data and thus irreducible with increasing amounts of data . In the case of continuous data ( e.g. , regression problems ) , data uncertainty often comes in the form of random noise on the measurements . For discrete data ( e.g. , classification problems ) , it usually comes as label noise , that is , a certain number of data points will be assigned the wrong label in the training data . This label noise can be class- and input-dependent ( Beyer et al. , 2020 ) . For instance , the Imagenet dataset ( Deng et al. , 2009 ) , contains 100 different classes of dog breeds , which are often harder to tell apart for human labelers than the other classes in the dataset . Modeling this type of data uncertainty can improve the calibration and robustness of predictive models ( Collier et al. , 2020 ) . A model that does explicitly handle the input- and class-dependent label noise is the heteroscedastic method ( Collier et al. , 2021 ) . The heteroscedastic method models input- and class-dependent noise by introducing a latent multivariate Gaussian distribution on the softmax logits of a standard neural network classifier . The covariance matrix of this latent distribution is a function of the input ( heteroscedastic ) and models inter-class correlations in the logit noise . 3 METHOD . 3.1 SETUP AND NOTATION . Let us consider a dataset D = { ( xi , yi ) } Ni=1 of input-output pairs , where xi ∈ Rd and yi ∈ { 1 , . . . , K } , that is , a classification problem with K classes . The data examples are assumed to be sampled i.i.d . from some true data-generating distribution as ( xi , yi ) ∼ p∗ ( x , y ) . 3.2 GENERATIVE PROCESS . To jointly model the two different types of uncertainty , we propose a hierarchical model of two latent random variables , which we denote by f and u. f is a latent function value associated to the input x ( as in the Gaussian process literature ) and is designed to capture the model uncertainty , while u is a latent vector of logits ( or utilities ) that capture the data uncertainty , similar to the setup in Collier et al . ( 2020 ) , which was inspired by the econometrics literature ( Train , 2009 ) . Similarly to Liu et al . ( 2020 ) , we place a latent Gaussian process ( GP ) prior over f , as p ( f ) = GP ( 0 , kθ ( · , · ) ) , where kθ is a parameterized kernel function with parameters θ . Evaluating this kernel on all pairwise combinations of datapoints in x yields the kernel matrix Kθ ( x , x ) ) . We then define u as a ( heteroscedastically ) noisy observation of f . Stacking the variables across the whole dataset gives us the matrices F , U ∈ RN×K . We refer to their respective rows as fi , ui ∈ RK and their columns as fc , uc ∈ RN . The columns are independent under the GP prior , but the rows are not . Conversely , the columns are correlated in the heteroscedastic noise model , while the rows are independent . A hierarchical model using both uncertainties therefore leads to logits that are correlated across both data points and classes . The full generative process is fc ∼ N ( 0 , Kθ ( x , x ) ) ( 1 ) ui ∼ N ( fi , Σ ( xi ; ϕ ) ) ( 2 ) p ( yi = c |ui ) = 1 [ c = arg max k uik ] ( 3 ) The predictive can then be computed my marginalizing , that is p ( y |x ) = Eu [ p ( y |u ) ] =∫ p ( y |u ) p ( u |x ) du . Intuitively , f captures the model uncertainty , that is , the uncertainty about the functional mapping between x and y on the level of the latents . It uses the covariance between data points to achieve this distance-awareness , namely it uses the kernel function to assess the similarity between data points , yielding an uncertainty estimate that grows away from the data . On the other hand , u captures the data uncertainty , by explicitly modelling the per-class uncertainty on the level of the logits . ϕ can learn to encode correlations in the noise between different classes ( e.g. , the dog breeds in Imagenet ) . It does not itself capture the model uncertainty , but inherits it through its hierarchical dependence on f , such that the resulting probability p ( y |u ) ultimately jointly captures both types of uncertainty . In practice , we usually learn the kernel using deep kernel learning ( Wilson et al. , 2016 ) , that is , we define it as the RBF kernel kθ ( xi , xj ) = kRBF ( hi , hj ) = exp ( ‖hi − hj‖22/λ ) with length scale λ and hi = h ( xi ; θ ) ∈ Rm with h ( · ; θ ) being a neural network model ( e.g. , a ResNet ) parameterized by θ . This kernel is then shared between classes . Moreover , following Liu et al . ( 2020 ) , we typically encourage bi-Lipschitzness of h using spectral normalization ( Behrmann et al. , 2019 ) , which then leads to an approximate preservation of distances between the input space and latent space , thus allowing for distance-aware uncertainty modeling in the latent space . Additionally , Σ ( · ; ϕ ) is usually also a neural network parameterized by ϕ . To ease notation , we will typically drop these parameters in the following . Note that the prior over fc ( and thus also uc ) has zero mean , thus leading to a uniform output distribution away from the data . Note that this is also reminiscent of multi-task GPs ( Williams et al. , 2007 ) , where separate kernels are used to model covariances between data points and tasks and are then combined into a Kronecker structure . | This paper presents a new method for model and data uncertainty estimation in deep neural networks combining the heteroscedastic method (Collier et al. 2020) and the Spectral-Normalised Gaussian Process (SNGP) method (Liu et al. 2020). It is shown that the two methods are complementary and their combination outperforms state-of-the-art methods on Out-Of-Distribution (OOD) detection on common image classification benchmarks. | SP:e3ec7c4484ffce62c71a364bd6fadcad84dd5a3a |
Multi-agent Performative Prediction: From Global Stability and Optimality to Chaos | 1 INTRODUCTION . Performative prediction ( Perdomo et al. , 2020 ) is a recently introduced framework that focuses on a natural but largely unexplored element of supervised learning . In many practical cases the predictive model can affect the very outcome that it is trying to predict . For example , predictions about which part of a road network will have high congestion trigger responses from the drivers which affect the resulting traffic realization leading to a shift of the target distribution . In such settings , ( Perdomo et al. , 2020 ) explored conditions for the existence and approximate optimality of stable equilibria of such processes . One possible way to interpret the performative prediction setting is a single agent “ game ” , where the predictive agent is playing a game against himself . An agent chooses the parameters of his model as his actions but the predictive accuracy/cost of the model depends on his own past actions . Fixed points of this process do not allow for profitable deviations . Once cast in this light , it becomes self-evident that the restriction to a single predictive agent/model is arguably only the first step in capturing more general phenomena where there is a closed loop between predictive models and their environment . This motivates our central question : What is the interplay between stability , optimality in cases where multiple predictive models operate in parallel to each other ? Can the competition between multiple models lead to novel phenomena such as phase transitions from stability to instability and chaos ? A natural setting to consider for example is market competition , where multiple hedge funds are trying to simultaneously predict future prices , volatility of financial instruments . Of course as they act upon their predictions they also move the prices of these commodities in a highly correlated way . As more agents enter the market and the competition becomes increasingly fierce , is it possible that at some point the market flips from quickly discovering accurate stable predictions reflecting the underlying market fundamentals to self-induced unpredictability and chaos ? When it comes to performative prediction can too many cooks spoil the soup ? Our model Standard supervised learning consists of three components : a set of predictive models , a loss function , and a data distribution . The learner ( agent ) observes samples of the distribution , and then decides a predictive model . When predictions are performative , the agent ’ s decision of a predictive model influences the data distribution . Thus , instead of a fixed data distribution , a predictive prediction also has a distribution map : a mapping from the agent ’ s predictive models to data distributions . We further propose multi-agent performative prediction which model the influence of multiple agents ’ decisions on the data distribution , and ask whether these influence leads to convergent or chaotic systems . To understand the framework of multi-agent performative prediction , we study a natural regression problem with multi-agent location-scale distribution maps ( definition 2.2 ) where the agents ’ influence is linear in the agents ’ models . Specifically , the data consist of features and outcomes . For each agent i ∈ [ n ] , his influence on the distribution of outcome is his model weighted by a scalar λi > 0 . When n = 1 , our multi-agent location-scale distribution map is a special case of locationscale family in Miller et al . ( 2021 ) . In the market example , each hedge fund company tries to predict the price ( outcome ) based on macroeconomic data or other information ( features ) . These influence parameters λ1 , . . . , λn can be seen as each hedge fund ’ s capital that can influence the distribution of the future price . Finally , we consider the agents do not know the dependency between their model and the data distribution , and they can only improve their predictive models myopically and iteratively . In this paper , the agents myopically use a reinforcement learning algorithm , exponentiated gradient for linear regression ( Kivinen & Warmuth , 1997 ) , to improve their predictive models in rounds . We study the long-term behavior , and ask if the system converge to the performative stable and optimal point , or behave chaotically . Our results We first study basic properties of our multi-agent preformative prediction with multiagent location-scale distribution map . We show 1 ) the existence of performative stable point in our setting ( proposition 3.1 ) and 2 ) the performative stability and performative optimality are equivalent ( proposition 3.2 ) . This equivalence allows us to focus on the dynamical behavior of the system . In section 4 , we introduce learning dynamics to the multi-agent performative prediction , and study their long-term behavior . We provide a threshold result which depends on the learning rates of exponentiated gradient descent and the collective influence . Theorem 4.1 shows the dynamics of exponential gradient descent converge to the performative stable and optimal point when the learning rate is small enough . Our convergence result in theorem 4.1 holds when the feature space is multi-dimensional , and every learning agent can use different learning rates starting at arbitrarily interior states . Our exact convergence result also works in the single-agent performative prediction setting . Contrarily , previous convergent results in Perdomo et al . ( 2020 ) ; Miller et al . ( 2021 ) ; Mendler-Dünner et al . ( 2020 ) only show that their dynamics converge to a small neighborhood of the performative stable point . On the other hand , section 4.2 shows the dynamics can have chaotic behavior if the collective influence Ln is large enough . Specifically , theorem 4.6 shows that even when the feature space is in R2 these systems provably exhibit Li-Yorke chaos , when the collective influence ∑ i λi is large enough . This implies that there exists an uncountable “ scrambled ” set so that given any two initial conditions in the set , the liminf of the distance between these two dynamics is zero , but the limsup of their distance is positive . ( definition 2.4 ) The chaotic result in theorem 4.6 also holds for the original single-agent performative prediction so long as the agent ’ s influence is large enough , and , thus , complements previous performative prediction works on convergence behavior , which primarily consider that the agent ’ s influence on the data distribution is sufficiently small . Moreover , no matter how small the agents ’ learning rates , theorem 4.6 shows that chaos is inevitable in some performative predictions settings when the number of agents exceeds a carrying capacity . After that the system becomes totally unpredictable with small perturbations exploding exponentially fast . 1 Finally , section 5 provides numerical examples of our dynamics and show convergent and chaotic behavior . Additionally , through simulation , we demonstrate that our convergent and chaotic results also hold when the agents can only access noisy estimation of the gradient and conduct stochastic exponentiated gradient descent . Related work Data distribution shift is not a new topic in ML , but earlier works focused primarily on exogenous changes to the data generating distribution . Performativity is machine learning was introduced by Perdomo et al . ( 2020 ) . The original work and several follow-ups study the discrepancy between performative stability and performative optimality and prove approximated conver- 1We highlight our revision in blue color . gence of learning dynamics , e.g. , stochastic gradient descent , or iterative empirical risk minimization . ( Mendler-Dünner et al. , 2020 ; Drusvyatskiy & Xiao , 2020 ; Izzo et al. , 2021 ) Performativity of prediction is also related to several applications : strategic classification ( Hardt et al. , 2016 ) , retraining Bartlett ( 1992 ) ; Kuh et al . ( 1990 ) . Inspired by the instability of training algorithms in ML applications such as Generative Adversarial Networks ( GANs ) , there has been a lot of recent interest in understanding conditions ( particularly in multi-agent systems ) where learning behavior may be non-equilibrating/unstable ( Cheung & Tao , 2020 ; Balduzzi et al. , 2020 ; Flokas et al. , 2020 ; Andrade et al. , 2021 ; Letcher , 2021 ; Giannou et al. , 2021 ) . The ( in ) stability and performance of exponentiated gradient descent in particular ( also referred to as Multiplicative Weights Updates ) and other closely related dynamics has attracted a lot of attention ( Cohen et al. , 2017 ; Bailey & Piliouras , 2018 ; Cheung , 2018 ; Panageas et al. , 2019 ; Cheung & Piliouras , 2020 ; Vadori et al. , 2021 ) . The technique of Li-Yorke chaos has recently found applications across several different domains such as routing games , Cournot games and blockchain protocols ( Palaiopanos et al. , 2017 ; Chotibut et al. , 2020 ; Bielawski et al. , 2021 ; Cheung et al. , 2021 ; Leonardos et al. , 2021 ) . To our knowledge , this is the first time where such formal chaotic results are established in settings related to performative prediction and supervised learning more generally . Another line of related works is learning in games . Specifically , our dynamics can be seen as special cases multiplicative weight update ( Hedge algorithms ) on congestion games . Previous works on Hedge algorithms only show exact convergence when the learning rate is decreasing Kleinberg et al . ( 2009 ) ; Cohen et al . ( 2017 ) , and , to our best knowledge , our results are the first that shows exact convergence of Hedge algorithms with small constant learning rates . Our results also complement the exact convergence result of the linear variant of multiplicative weight update by Palaiopanos et al . ( 2017 ) . 2 PRELIMINARY . 2.1 MULTI-AGENT PERFORMATIVE PREDICTION . A multi-agent performative prediction comprises n agents deploying their predictive models fθ1 , . . . , fθn with parameters θ1 , θ2 , . . . , θn ∈ Θ that collectively influence the future data distribution . We formalize such dependency via a distribution map D ( · ) which outputs a distribution on the data , D ( ~θ ) , given a models profile ~θ : = ( θ1 , . . . , θn ) ∈ Θn . A loss function ` ( z , θ′ ) measures the loss of a model fθ′ on a data point z ∈ Z , and the expected loss on a distribution D is Ez∼D [ ` ( z , θ′ ) ] . For performative prediction , we further define the decoupled performative loss on a distribution mapping D as ` ( ~θ , θ′ ) : = Ez∼D ( ~θ ) ` ( z , θ ′ ) where θ′ ∈ Θ denotes a predictive model , while ~θ ∈ Θn denotes a deployed model profile . Given the set of model Θ , the loss function ` , and the distribution mapping D , each agent in a multi-agent performative prediction ( Θ , ` , D ) pursues minimal loss on the distribution that they collectively induce . We consider two solution concepts performative optimality and performative stability which generalizes the original ones in Perdomo et al . ( 2020 ) . Definition 2.1 . Given ( Θ , ` , D ) , a models profile ~θ∗∈ Θn is performatively optimal if the total loss is minimized , ~θ∗ ∈ arg min ~θ∈Θn ∑ i ` ( ~θ , θi ) . Another desirable property of a model profile is that , given all agents deploy their models , their models are also simultaneously optimal for distribution that their model induces . Formally , ~θ∗ is performatively stable if for all i ∈ [ n ] ( θ∗ ) i ∈ arg min θi∈Θ ` ( ~θ∗ , θi ) . The performative optimality does not implies the performative stable point . For performative optimal point , the variable for minimization ~θ affects both the first and the second argument , but only affect the second one for performative stable point . Now we introduce our model in this paper . Location-scale distribution map In this paper , we study the family of multi-agent location-scale map for regression problem where a data point consists of d-dimensional feature and scalar outcome , z = ( x , y ) . These are natural classes of distribution maps in which performative effects enter through an additive or multiplicative factor that is linear in ~θ . Definition 2.2 . Given d ∈ N and d ≥ 2 , and Θn ⊆ Rd , a distribution map D : Θn → Rd × R is a multi-agent location-scale distribution map on n parties if there exists a static distribution DX on Rd+1 , θ0 ∈ Rd , and n linear functions Λ1 , . . . , Λn from Rd to Rd so that the distribution of ( x , y ) ∼ D ( ~θ ) has the following form : The feature is x ∈ Rd and noise x0 ∈ R is jointly sampled from DX . Given feature x ∈ Rd and noise x0 ∈ R , and the the outcome is y = 〈 θ0 − n∑ i=1 Λi ( θ i ) , x 〉 + x0 . In this paper , we consider the scaling maps Λi ( θ ) = λiθ for all θ ∈ Θ with scalar λi > 0 for all i ∈ [ d ] . We call λ : = ( λ1 , . . . , λn ) the influence parameters , and Ln : = ∑n i=1 λi collective influence . Furthermore , we let A : = E [ xx > ] ∈ Rd×d be the covariance matrix of the feature , and b : = Aθ0 + E [ x0x ] ∈ Rd . We will specify the multi agent location-scale distribution map with parameters n , d , λ , A , and b . When n = 1 , our multi-agent location-scale distribution map is a special case of location-scale family in Miller et al . ( 2021 ) where the model θ may both the outcome y as well as the feature x. Predictive Models and Loss Function We consider linear predictive model with constraint where fθ′ ( x ) = 〈θ′ , x〉 , and the collection of parameter is the d-simplex , Θ = { θ : ∑d k=1 θk = 1 , θk ≥ 0 } . We use mean squared error to measure a predictive model θ′ ∈ Θ on a distribution map with a deployed model profile ~θ ∈ Θn , ` ( ~θ , θ′ ) = E ( x , y ) ∼D ( ~θ ) [ ( y−fθ′ ( x ) ) 2 ] = E ( x , y ) ∼D ( ~θ ) [ ( y−θ ′ ·x ) 2 ] . Given a deployed model profile ~θ and a predictive model θ′ , the gradient of the decoupled loss is g ( ~θ , θ′ ) : = ∇θ′ ` ( ~θ , θ′ ) , and ifD is a location-scale distribution map , g ( ~θ , θ′ ) = E ( x , y ) ∼D ( ~θ ) [ 2 ( θ ′ · x− y ) x ] . Furthermore , withA and b defined in definition 2.2 , the gradient can be written as g ( ~θ , θ′ ) = ∇θ′ ` ( ~θ , θ′ ) = 2A ( θ′ + ∑ i λiθ i ) − 2b . ( 1 ) Additionally , given a deployed model profile ~θ and a predictive model profile ~θ′ , we define the gradient of agent i ’ s decoupled loss as gi ( ~θ , ~θ′ ) : = g ( ~θ , ( θ′ ) i ) , and gi ( ~θ ) : = gi ( ~θ , ~θ ) when the deployed model profile is identical to the predictive model profile . We denote the gradient of agent i ’ s average loss as ḡi ( ~θ ) : = ∑ l θ i lg i l ( ~θ ) for all ~θ ∈ Θn . Finally , we define ~ξ ( ~θ ) = ( ξ1 , . . . , ξn ) with ξi ∈ Rd so that for all i ∈ [ n ] and k ∈ [ d ] ξik ( ~θ ) : = θik ( ∑ θilg i l − gik ) . For brevity , we omit ~θ and define ~g : = ~g ( ~θ ) and ~ξ : = ~ξ ( ~θ ) when there is no ambiguity . | This paper studied the different behaviours of using exponentiated gradient descent (Def. 2.3) in linear regression with different learning rates. The setting is called performative prediction, which can be viewed as a special case of reinforcement learning (after the model makes a prediction, the environment returns a feedback by changing the data distribution). The main results consist of two parts, for small enough and large learning rates: (i) with small enough learning rate, the authors proved that the exponentiated gradient descent is "stable" (asymptotically converges to some global minimizer). The proof is based on standard analysis of studying a potential (surrogate/Lyapunov) function for the mean squared error, and arguing that the gradient flow vanishes only if the potential approaches $0$, which implies that the convergence of the flow. Then the discrete gradient update is approximating the flow well if the stepsize is small enough. (ii) if the learning rate is larger than some threshold value, the authors then showed that the exponentiated gradient descent became Li-Yorke chaotic, where it can periodically oscillate for infinitely many times. The main idea is to use Eq. (7) to characterize the dynamics, and show that under some conditions Eq. (7) induces a sequence of { x_i }_{ i >= 1}, with some recurrent behaviours as shown in Lemma 4.7. The authors then verified the theoretical findings using simulations on simple examples. | SP:fdab12cf54b6c3cff52990607369188060910f5c |
Multi-agent Performative Prediction: From Global Stability and Optimality to Chaos | 1 INTRODUCTION . Performative prediction ( Perdomo et al. , 2020 ) is a recently introduced framework that focuses on a natural but largely unexplored element of supervised learning . In many practical cases the predictive model can affect the very outcome that it is trying to predict . For example , predictions about which part of a road network will have high congestion trigger responses from the drivers which affect the resulting traffic realization leading to a shift of the target distribution . In such settings , ( Perdomo et al. , 2020 ) explored conditions for the existence and approximate optimality of stable equilibria of such processes . One possible way to interpret the performative prediction setting is a single agent “ game ” , where the predictive agent is playing a game against himself . An agent chooses the parameters of his model as his actions but the predictive accuracy/cost of the model depends on his own past actions . Fixed points of this process do not allow for profitable deviations . Once cast in this light , it becomes self-evident that the restriction to a single predictive agent/model is arguably only the first step in capturing more general phenomena where there is a closed loop between predictive models and their environment . This motivates our central question : What is the interplay between stability , optimality in cases where multiple predictive models operate in parallel to each other ? Can the competition between multiple models lead to novel phenomena such as phase transitions from stability to instability and chaos ? A natural setting to consider for example is market competition , where multiple hedge funds are trying to simultaneously predict future prices , volatility of financial instruments . Of course as they act upon their predictions they also move the prices of these commodities in a highly correlated way . As more agents enter the market and the competition becomes increasingly fierce , is it possible that at some point the market flips from quickly discovering accurate stable predictions reflecting the underlying market fundamentals to self-induced unpredictability and chaos ? When it comes to performative prediction can too many cooks spoil the soup ? Our model Standard supervised learning consists of three components : a set of predictive models , a loss function , and a data distribution . The learner ( agent ) observes samples of the distribution , and then decides a predictive model . When predictions are performative , the agent ’ s decision of a predictive model influences the data distribution . Thus , instead of a fixed data distribution , a predictive prediction also has a distribution map : a mapping from the agent ’ s predictive models to data distributions . We further propose multi-agent performative prediction which model the influence of multiple agents ’ decisions on the data distribution , and ask whether these influence leads to convergent or chaotic systems . To understand the framework of multi-agent performative prediction , we study a natural regression problem with multi-agent location-scale distribution maps ( definition 2.2 ) where the agents ’ influence is linear in the agents ’ models . Specifically , the data consist of features and outcomes . For each agent i ∈ [ n ] , his influence on the distribution of outcome is his model weighted by a scalar λi > 0 . When n = 1 , our multi-agent location-scale distribution map is a special case of locationscale family in Miller et al . ( 2021 ) . In the market example , each hedge fund company tries to predict the price ( outcome ) based on macroeconomic data or other information ( features ) . These influence parameters λ1 , . . . , λn can be seen as each hedge fund ’ s capital that can influence the distribution of the future price . Finally , we consider the agents do not know the dependency between their model and the data distribution , and they can only improve their predictive models myopically and iteratively . In this paper , the agents myopically use a reinforcement learning algorithm , exponentiated gradient for linear regression ( Kivinen & Warmuth , 1997 ) , to improve their predictive models in rounds . We study the long-term behavior , and ask if the system converge to the performative stable and optimal point , or behave chaotically . Our results We first study basic properties of our multi-agent preformative prediction with multiagent location-scale distribution map . We show 1 ) the existence of performative stable point in our setting ( proposition 3.1 ) and 2 ) the performative stability and performative optimality are equivalent ( proposition 3.2 ) . This equivalence allows us to focus on the dynamical behavior of the system . In section 4 , we introduce learning dynamics to the multi-agent performative prediction , and study their long-term behavior . We provide a threshold result which depends on the learning rates of exponentiated gradient descent and the collective influence . Theorem 4.1 shows the dynamics of exponential gradient descent converge to the performative stable and optimal point when the learning rate is small enough . Our convergence result in theorem 4.1 holds when the feature space is multi-dimensional , and every learning agent can use different learning rates starting at arbitrarily interior states . Our exact convergence result also works in the single-agent performative prediction setting . Contrarily , previous convergent results in Perdomo et al . ( 2020 ) ; Miller et al . ( 2021 ) ; Mendler-Dünner et al . ( 2020 ) only show that their dynamics converge to a small neighborhood of the performative stable point . On the other hand , section 4.2 shows the dynamics can have chaotic behavior if the collective influence Ln is large enough . Specifically , theorem 4.6 shows that even when the feature space is in R2 these systems provably exhibit Li-Yorke chaos , when the collective influence ∑ i λi is large enough . This implies that there exists an uncountable “ scrambled ” set so that given any two initial conditions in the set , the liminf of the distance between these two dynamics is zero , but the limsup of their distance is positive . ( definition 2.4 ) The chaotic result in theorem 4.6 also holds for the original single-agent performative prediction so long as the agent ’ s influence is large enough , and , thus , complements previous performative prediction works on convergence behavior , which primarily consider that the agent ’ s influence on the data distribution is sufficiently small . Moreover , no matter how small the agents ’ learning rates , theorem 4.6 shows that chaos is inevitable in some performative predictions settings when the number of agents exceeds a carrying capacity . After that the system becomes totally unpredictable with small perturbations exploding exponentially fast . 1 Finally , section 5 provides numerical examples of our dynamics and show convergent and chaotic behavior . Additionally , through simulation , we demonstrate that our convergent and chaotic results also hold when the agents can only access noisy estimation of the gradient and conduct stochastic exponentiated gradient descent . Related work Data distribution shift is not a new topic in ML , but earlier works focused primarily on exogenous changes to the data generating distribution . Performativity is machine learning was introduced by Perdomo et al . ( 2020 ) . The original work and several follow-ups study the discrepancy between performative stability and performative optimality and prove approximated conver- 1We highlight our revision in blue color . gence of learning dynamics , e.g. , stochastic gradient descent , or iterative empirical risk minimization . ( Mendler-Dünner et al. , 2020 ; Drusvyatskiy & Xiao , 2020 ; Izzo et al. , 2021 ) Performativity of prediction is also related to several applications : strategic classification ( Hardt et al. , 2016 ) , retraining Bartlett ( 1992 ) ; Kuh et al . ( 1990 ) . Inspired by the instability of training algorithms in ML applications such as Generative Adversarial Networks ( GANs ) , there has been a lot of recent interest in understanding conditions ( particularly in multi-agent systems ) where learning behavior may be non-equilibrating/unstable ( Cheung & Tao , 2020 ; Balduzzi et al. , 2020 ; Flokas et al. , 2020 ; Andrade et al. , 2021 ; Letcher , 2021 ; Giannou et al. , 2021 ) . The ( in ) stability and performance of exponentiated gradient descent in particular ( also referred to as Multiplicative Weights Updates ) and other closely related dynamics has attracted a lot of attention ( Cohen et al. , 2017 ; Bailey & Piliouras , 2018 ; Cheung , 2018 ; Panageas et al. , 2019 ; Cheung & Piliouras , 2020 ; Vadori et al. , 2021 ) . The technique of Li-Yorke chaos has recently found applications across several different domains such as routing games , Cournot games and blockchain protocols ( Palaiopanos et al. , 2017 ; Chotibut et al. , 2020 ; Bielawski et al. , 2021 ; Cheung et al. , 2021 ; Leonardos et al. , 2021 ) . To our knowledge , this is the first time where such formal chaotic results are established in settings related to performative prediction and supervised learning more generally . Another line of related works is learning in games . Specifically , our dynamics can be seen as special cases multiplicative weight update ( Hedge algorithms ) on congestion games . Previous works on Hedge algorithms only show exact convergence when the learning rate is decreasing Kleinberg et al . ( 2009 ) ; Cohen et al . ( 2017 ) , and , to our best knowledge , our results are the first that shows exact convergence of Hedge algorithms with small constant learning rates . Our results also complement the exact convergence result of the linear variant of multiplicative weight update by Palaiopanos et al . ( 2017 ) . 2 PRELIMINARY . 2.1 MULTI-AGENT PERFORMATIVE PREDICTION . A multi-agent performative prediction comprises n agents deploying their predictive models fθ1 , . . . , fθn with parameters θ1 , θ2 , . . . , θn ∈ Θ that collectively influence the future data distribution . We formalize such dependency via a distribution map D ( · ) which outputs a distribution on the data , D ( ~θ ) , given a models profile ~θ : = ( θ1 , . . . , θn ) ∈ Θn . A loss function ` ( z , θ′ ) measures the loss of a model fθ′ on a data point z ∈ Z , and the expected loss on a distribution D is Ez∼D [ ` ( z , θ′ ) ] . For performative prediction , we further define the decoupled performative loss on a distribution mapping D as ` ( ~θ , θ′ ) : = Ez∼D ( ~θ ) ` ( z , θ ′ ) where θ′ ∈ Θ denotes a predictive model , while ~θ ∈ Θn denotes a deployed model profile . Given the set of model Θ , the loss function ` , and the distribution mapping D , each agent in a multi-agent performative prediction ( Θ , ` , D ) pursues minimal loss on the distribution that they collectively induce . We consider two solution concepts performative optimality and performative stability which generalizes the original ones in Perdomo et al . ( 2020 ) . Definition 2.1 . Given ( Θ , ` , D ) , a models profile ~θ∗∈ Θn is performatively optimal if the total loss is minimized , ~θ∗ ∈ arg min ~θ∈Θn ∑ i ` ( ~θ , θi ) . Another desirable property of a model profile is that , given all agents deploy their models , their models are also simultaneously optimal for distribution that their model induces . Formally , ~θ∗ is performatively stable if for all i ∈ [ n ] ( θ∗ ) i ∈ arg min θi∈Θ ` ( ~θ∗ , θi ) . The performative optimality does not implies the performative stable point . For performative optimal point , the variable for minimization ~θ affects both the first and the second argument , but only affect the second one for performative stable point . Now we introduce our model in this paper . Location-scale distribution map In this paper , we study the family of multi-agent location-scale map for regression problem where a data point consists of d-dimensional feature and scalar outcome , z = ( x , y ) . These are natural classes of distribution maps in which performative effects enter through an additive or multiplicative factor that is linear in ~θ . Definition 2.2 . Given d ∈ N and d ≥ 2 , and Θn ⊆ Rd , a distribution map D : Θn → Rd × R is a multi-agent location-scale distribution map on n parties if there exists a static distribution DX on Rd+1 , θ0 ∈ Rd , and n linear functions Λ1 , . . . , Λn from Rd to Rd so that the distribution of ( x , y ) ∼ D ( ~θ ) has the following form : The feature is x ∈ Rd and noise x0 ∈ R is jointly sampled from DX . Given feature x ∈ Rd and noise x0 ∈ R , and the the outcome is y = 〈 θ0 − n∑ i=1 Λi ( θ i ) , x 〉 + x0 . In this paper , we consider the scaling maps Λi ( θ ) = λiθ for all θ ∈ Θ with scalar λi > 0 for all i ∈ [ d ] . We call λ : = ( λ1 , . . . , λn ) the influence parameters , and Ln : = ∑n i=1 λi collective influence . Furthermore , we let A : = E [ xx > ] ∈ Rd×d be the covariance matrix of the feature , and b : = Aθ0 + E [ x0x ] ∈ Rd . We will specify the multi agent location-scale distribution map with parameters n , d , λ , A , and b . When n = 1 , our multi-agent location-scale distribution map is a special case of location-scale family in Miller et al . ( 2021 ) where the model θ may both the outcome y as well as the feature x. Predictive Models and Loss Function We consider linear predictive model with constraint where fθ′ ( x ) = 〈θ′ , x〉 , and the collection of parameter is the d-simplex , Θ = { θ : ∑d k=1 θk = 1 , θk ≥ 0 } . We use mean squared error to measure a predictive model θ′ ∈ Θ on a distribution map with a deployed model profile ~θ ∈ Θn , ` ( ~θ , θ′ ) = E ( x , y ) ∼D ( ~θ ) [ ( y−fθ′ ( x ) ) 2 ] = E ( x , y ) ∼D ( ~θ ) [ ( y−θ ′ ·x ) 2 ] . Given a deployed model profile ~θ and a predictive model θ′ , the gradient of the decoupled loss is g ( ~θ , θ′ ) : = ∇θ′ ` ( ~θ , θ′ ) , and ifD is a location-scale distribution map , g ( ~θ , θ′ ) = E ( x , y ) ∼D ( ~θ ) [ 2 ( θ ′ · x− y ) x ] . Furthermore , withA and b defined in definition 2.2 , the gradient can be written as g ( ~θ , θ′ ) = ∇θ′ ` ( ~θ , θ′ ) = 2A ( θ′ + ∑ i λiθ i ) − 2b . ( 1 ) Additionally , given a deployed model profile ~θ and a predictive model profile ~θ′ , we define the gradient of agent i ’ s decoupled loss as gi ( ~θ , ~θ′ ) : = g ( ~θ , ( θ′ ) i ) , and gi ( ~θ ) : = gi ( ~θ , ~θ ) when the deployed model profile is identical to the predictive model profile . We denote the gradient of agent i ’ s average loss as ḡi ( ~θ ) : = ∑ l θ i lg i l ( ~θ ) for all ~θ ∈ Θn . Finally , we define ~ξ ( ~θ ) = ( ξ1 , . . . , ξn ) with ξi ∈ Rd so that for all i ∈ [ n ] and k ∈ [ d ] ξik ( ~θ ) : = θik ( ∑ θilg i l − gik ) . For brevity , we omit ~θ and define ~g : = ~g ( ~θ ) and ~ξ : = ~ξ ( ~θ ) when there is no ambiguity . | The paper analyzes the performative prediction setting (Perdomo 2020) where multiple agents perform gradient descent to converge to a performatively optimal point. The agent are modeled by constrained linear predictive models which are used for linear regression. The authors show that the learning dynamics converges to the multi-agent performatively stable point for small learning rates. The stable point coincides with the optimal point where the sum of the agent's losses are minimized. The requirement for convergence is that the hessian of the loss must be positive definite, which is satisfied by existence of a potential function. The authors also show that the dynamics exhibits Li-York chaos for large enough learning rates. | SP:fdab12cf54b6c3cff52990607369188060910f5c |
Causal discovery from conditionally stationary time-series | Causal discovery , i.e. , inferring underlying cause-effect relationships from observations of a scene or system , is an inherent mechanism in human cognition , but has been shown to be highly challenging to automate . The majority of approaches in the literature aiming for this task consider constrained scenarios with fully observed variables or data from stationary time-series . In this work we aim for causal discovery in a more general class of scenarios , scenes with non-stationary behavior over time . For our purposes we here regard a scene as a composition objects interacting with each other over time . Nonstationarity is modeled as stationarity conditioned on an underlying variable , a state , which can be of varying dimension , more or less hidden given observations of the scene , and also depend more or less directly on these observations . We propose a probabilistic deep learning approach called State-Dependent Causal Inference ( SDCI ) for causal discovery in such conditionally stationary time-series data . Results in two different synthetic scenarios show that this method is able to recover the underlying causal dependencies with high accuracy even in cases with hidden states . 1 INTRODUCTION . The ability of deep learning approaches to discover and reason about causal relationships in data has become a prominent direction of work over the recent years ( Yi et al. , 2020 ; Girdhar & Ramanan , 2020 ; Sauer & Geiger , 2021 ) . Despite the recent success of deep learning methods in related tasks such as classification , localization , and segmentation , causal discovery and reasoning , an inherent mechanism in human cognition ( Spelke & Kinzler , 2007 ) allowing reasoning about counterfactuals and understanding the reasons of events , still poses an considerable challenge . Causal discovery involves uncovering the underlying logic , temporal and causal structure of the observed processes in the data . Current approaches ( see Section 2 ) commonly address quite constrained scenarios with a stationary behavior over time . In the present paper , we extend the current work by addressing scenarios with conditional stationarity , where the dynamics of the observed system changes with the value of underlying variables . This is the case in almost all real-world scenarios , e.g . with people who behave differently and take different decisions depending on underlying factors such as mood , previous experience , and the actions of other agents . We propose a method ( see Section 3 ) for causal discovery from time-series observations of systems where the underlying causal graph changes depending on a state variable . The causal discovery task from such conditionally stationary time-series poses different challenges depending on the observability of the underlying state variable . Four scenario classes can be seen : 1 . The first class concerns a simplified version of the problem , where the state variable is observed and not dependent on other observed time-series data . 2 . In the second class of scenarios , the state is not directly observed , but directly dependent on and continuously inferable from an observed variable . A real-life example is a traffic scenario where taxis ( visually distinguishable by the sign on their roof ) follow slightly different rules than normal cars , i.e . are allowed to drive in bus lanes . 3 . A more challenging scenario class is when the state depends on earlier events , and thus is not continuously observable . A real-life example is a chain of events in a football game , where the action of one player is triggered by an earlier action by another player . 4 . Finally , a large share of scenarios in the real world are governed by underlying state variables that are not fully inferable from the observations from the scenario over time . In such scenarios , the state is an unknown confounder to the observed time-series , and causal discovery from such scenarios is inherently ill-defined . We evaluate the method ( see Section 4 ) in two different synthetic scenarios , where we vary the complexity of system dynamics and observability of the underlying state variable covering the first three scenario classes above . Finally we conclude and discuss directions for future work ( see Section 5 ) . 2 RELATED WORK . Causal discovery approaches aim to identify causal relationships over a set of variables from observational data . These methods can basically be classified into three different types ( Glymour et al. , 2019 ) : 1 ) Constraint-based ; 2 ) Score-based ; 3 ) Functional causal model based methods . Constraint-based methods rely on conditional independence tests to recover the underlying DAG structure of the data , such as the PC algorithm ( Spirtes et al. , 2000 ) , which assumes faithfulness and causal Markov condition and considers i.i.d . sampling and no latent confounders . There exists a great variety of variations of PC . One of them is the Fast Causal Inference ( FCI ) ( Spirtes , 2001 ) , which is able to cope with the unknown confounders and selection bias ; furthermore , it can be adapted for time-series data , such as such as tsFCI ( Entner & Hoyer , 2010 ) . Score-based methods define score functions of causal graph structures and then optimize score functions by performing a search to identify the underlying causal structure , such as the Greedy Equivalence Search ( GES ) ( Chickering , 2002 ) . Notice that searching in the graph space poses a combinatorial optimization problem . Recent approaches try to avoid this by reformulating it as a continuous optimization problem which introduces a score function h for measuring the acyclicity of the graph ( Zheng et al. , 2018 ) . Regarding time-series data , these methods are reformulated as learning dynamic Bayesian Networks ( DBNs ) from data ( Murphy et al. , 2002 ) . Among these algorithms we recently find DYNOTEARS ( Pamfil et al. , 2020 ) , which aims to simultaneously estimate instantaneous and time-lagged relationships between variables in a time-series . Functional causal model-based methods represent the effect as a function of its direct causes and their independent immeasurable noise ( Glymour et al. , 2019 ) . For non-temporal data , there are linear non-Gaussian acyclic models ( Shimizu et al. , 2006 ) , additive noise models ( Peters et al. , 2014 ) , post-nonlinear models ( Zhang & Hyvärinen , 2009 ) , etc . For temporal data , these approaches fit a dynamics model , which is often regularized in terms of its sparsity , and its form is analyzed to identify the underlying causal connections in the data . Granger causal analysis falls into this category , since we first model the dynamics and some analysis is performed to extract the latent causal structure ( Granger , 1969 ) . Causal discovery is , in general , a challenging task and its study arises a great amount of practical issues . The problem is ill-posed when considering linearity and Gaussian disturbances , since it can be proved that the underlying causal model is not identifiable , while under proper assumptions , such as non-Gaussianity , it becomes identifiable ( Shimizu et al. , 2006 ) . When considering non-linear transformations , the symmetry between observed variables disappears , allowing the identification of causal relations in the context of Gaussian disturbances ( Hoyer et al. , 2008 ) . Other practical issues consist on the existence of latent confounders ( Ranganath & Perotte , 2018 ) , the presence of measurement error ( Zhang et al. , 2017 ) or considering observations with missing data ( Tu et al. , 2019 ) . In order to avoid these common problems , simplifications of the problem need to be applied . In fact , the assumptions we make in this work are : ( i ) all the instances belonging to the causal graph are observed , ( ii ) we have no missing data selection bias , and ( iii ) no latent confounders exist . The work most related to ours are the approaches by ( Löwe et al. , 2020 ; Li et al. , 2020 ) ; we extend these by allowing the causal model of the underlying process to vary depending on a state variable . Our method can in the future be applied to a wider class of non-stationary visual scenarios where the interacting objects are only partially and noisily observed as semantically segmented visual regions , or by tracked image keypoints ( Löwe et al. , 2020 ) . This would allow addressing challenging tasks such as scene understanding , counterfactual reasoning , etc . The recent work by ( Sauer & Geiger , 2021 ) also uses the concept of causality for a similar task , generation of counterfactual images . 3 STATE-DEPENDENT CAUSAL INFERENCE . In this section , we introduce our formulation to extract causal graphs from time-series data where their dynamics are altered by means of a categorical variable , referred to as their state . We refer to our method as State-Dependent Causal Inference ( SDCI ) . 3.1 PROBLEM FORMULATION . The input consists of a set of N time-series which not only obey some dynamics that might change over time but also undergo different states along the sequence . These states are responsible for the changes in the dynamics of the sample . We observe the sequence for a total of T frames and we denote the sample x as x = { { x1i } Ni=1 , ... , { xTi } Ni=1 } , xti = { pti , sti } , ( 1 ) where { s1 : Ti } Ni=1 represents the hidden states and { p1 : Ti } Ni=1 are the observed quantities of interest . For simplicity , we drop the subscript when referring to all the elements in a single time-step ( e.g . xt , pt , st , etc ) . In a causal graph , the observed quantities are represented by the vertices and the edge of the causal graph represents the interaction type between vertices . We denote the amount of possible interaction types by n . Assumptions . In this work , we assume that the data generation process obeys a structural causal model ( SCM ) ( Pearl , 2009 ) , G1 : T , and that the model satisfies the first-order Markov property . Moreover , according to the definitions of causality ( Granger , 1969 ) , we assume that edges of a causal graph can not go back in time . The first assumption follows related works concerning samples where the generative process also follows an SCM ( Löwe et al. , 2020 ; Li et al. , 2020 ) . Although we assume the first-order Markov property , one can extend to the more general p − th order Markov property in a more complex scenario . State-dependent causal inference . Based on the assumptions we mainly focus on the nonstationary causal graph , which means that we can find different edge-types at different times . As for an edge between two vertices , the edge-type interaction between two vertices changes according to the state of the variable which is the source of the interaction . The main focus of our method consists on extracting a causal summary graph G ( also denoted as such by Li et al . ( 2020 ) and Löwe et al . ( 2020 ) ) . Previous approaches aiming for this task assume stationary time-series data and therefore , this causal summary graph is constant . Nonetheless , since we condition the stationarity of the samples on the states , our causal summary graph is expressed by means of this categorical variable . In other words , our method will extract K summary graphs , one per state considered . The edge-type interaction can be then queried at each time-step t as follows : ztij = Gij ( s t i ) ( 2 ) where ztij ∈ { 0 , ... , n − 1 } denotes the edge-type interaction from i to j at time-step t. Figure 1 illustrates this task . In general , this causal summary graph is specific to the input sample and hidden from the model . Therefore , not only we require to design a parametrizable function to infer the latent causal structure , but also to evaluate how this inference fits to the actual dynamics observed in the input sequence . Let us denote the first step of extracting the latent causal structure G ( s ) = fφ ( p1 : T , s1 : T ) ( 3 ) where fφ denotes a parameterizable function that receives all the observed sequence as input . The next step is to fit this extracted latent sturcture into our assumed first-order Markov dynamics . ( p̃t+1 , s̃t+1 ) = fψ ( xt , G ( st ) ) ( 4 ) where the parameterizable function fψ represents a one-step computation of the dynamics starting from the observed values at time-step t. In this expression , we have defined fψ to predict the value of the states at the next time-step as well . However , in our experiments we will also consider settings where the states are observed at all times and modelling the dynamics is only performed with respect to the quantity p1 : T . To allow for this setting , one only needs to exclude the state variable from supervision . We provide more details in the next section . Objective . Both the causal inference and dynamics modelling modules can be optimized by minimizing some objective defined for the parameterizable functions fφ and fψ . min φ , ψ T−1∑ t=1 L ( xt+1 , fψ ( xt , G ( st ) ) ) +R ( G ( · ) ) , G ( st ) = fφ ( x ) ( 5 ) where R ( · ) is a regularizer on the extracted graph structure , which can be applied to enforce a preferred interaction type . | This paper proposes a new method for discovering the causal graph from time-series data when the time-series are generated by a non-stationary process. The method relies on previous work from Lowe et al, 2020 and proposes to condition the causal summary graph driving the (causal) edge generation between variables by a categorical state variable. The method is defined within a variational inference framework, where edges are state-dependent latent variables, based on which one can generate/reconstruct future observations and/or state variables. Results are shared on two synthetic datasets with promising performances. | SP:1c1dfcfd223ed681844ad09249052a51a6c1fcb0 |
Causal discovery from conditionally stationary time-series | Causal discovery , i.e. , inferring underlying cause-effect relationships from observations of a scene or system , is an inherent mechanism in human cognition , but has been shown to be highly challenging to automate . The majority of approaches in the literature aiming for this task consider constrained scenarios with fully observed variables or data from stationary time-series . In this work we aim for causal discovery in a more general class of scenarios , scenes with non-stationary behavior over time . For our purposes we here regard a scene as a composition objects interacting with each other over time . Nonstationarity is modeled as stationarity conditioned on an underlying variable , a state , which can be of varying dimension , more or less hidden given observations of the scene , and also depend more or less directly on these observations . We propose a probabilistic deep learning approach called State-Dependent Causal Inference ( SDCI ) for causal discovery in such conditionally stationary time-series data . Results in two different synthetic scenarios show that this method is able to recover the underlying causal dependencies with high accuracy even in cases with hidden states . 1 INTRODUCTION . The ability of deep learning approaches to discover and reason about causal relationships in data has become a prominent direction of work over the recent years ( Yi et al. , 2020 ; Girdhar & Ramanan , 2020 ; Sauer & Geiger , 2021 ) . Despite the recent success of deep learning methods in related tasks such as classification , localization , and segmentation , causal discovery and reasoning , an inherent mechanism in human cognition ( Spelke & Kinzler , 2007 ) allowing reasoning about counterfactuals and understanding the reasons of events , still poses an considerable challenge . Causal discovery involves uncovering the underlying logic , temporal and causal structure of the observed processes in the data . Current approaches ( see Section 2 ) commonly address quite constrained scenarios with a stationary behavior over time . In the present paper , we extend the current work by addressing scenarios with conditional stationarity , where the dynamics of the observed system changes with the value of underlying variables . This is the case in almost all real-world scenarios , e.g . with people who behave differently and take different decisions depending on underlying factors such as mood , previous experience , and the actions of other agents . We propose a method ( see Section 3 ) for causal discovery from time-series observations of systems where the underlying causal graph changes depending on a state variable . The causal discovery task from such conditionally stationary time-series poses different challenges depending on the observability of the underlying state variable . Four scenario classes can be seen : 1 . The first class concerns a simplified version of the problem , where the state variable is observed and not dependent on other observed time-series data . 2 . In the second class of scenarios , the state is not directly observed , but directly dependent on and continuously inferable from an observed variable . A real-life example is a traffic scenario where taxis ( visually distinguishable by the sign on their roof ) follow slightly different rules than normal cars , i.e . are allowed to drive in bus lanes . 3 . A more challenging scenario class is when the state depends on earlier events , and thus is not continuously observable . A real-life example is a chain of events in a football game , where the action of one player is triggered by an earlier action by another player . 4 . Finally , a large share of scenarios in the real world are governed by underlying state variables that are not fully inferable from the observations from the scenario over time . In such scenarios , the state is an unknown confounder to the observed time-series , and causal discovery from such scenarios is inherently ill-defined . We evaluate the method ( see Section 4 ) in two different synthetic scenarios , where we vary the complexity of system dynamics and observability of the underlying state variable covering the first three scenario classes above . Finally we conclude and discuss directions for future work ( see Section 5 ) . 2 RELATED WORK . Causal discovery approaches aim to identify causal relationships over a set of variables from observational data . These methods can basically be classified into three different types ( Glymour et al. , 2019 ) : 1 ) Constraint-based ; 2 ) Score-based ; 3 ) Functional causal model based methods . Constraint-based methods rely on conditional independence tests to recover the underlying DAG structure of the data , such as the PC algorithm ( Spirtes et al. , 2000 ) , which assumes faithfulness and causal Markov condition and considers i.i.d . sampling and no latent confounders . There exists a great variety of variations of PC . One of them is the Fast Causal Inference ( FCI ) ( Spirtes , 2001 ) , which is able to cope with the unknown confounders and selection bias ; furthermore , it can be adapted for time-series data , such as such as tsFCI ( Entner & Hoyer , 2010 ) . Score-based methods define score functions of causal graph structures and then optimize score functions by performing a search to identify the underlying causal structure , such as the Greedy Equivalence Search ( GES ) ( Chickering , 2002 ) . Notice that searching in the graph space poses a combinatorial optimization problem . Recent approaches try to avoid this by reformulating it as a continuous optimization problem which introduces a score function h for measuring the acyclicity of the graph ( Zheng et al. , 2018 ) . Regarding time-series data , these methods are reformulated as learning dynamic Bayesian Networks ( DBNs ) from data ( Murphy et al. , 2002 ) . Among these algorithms we recently find DYNOTEARS ( Pamfil et al. , 2020 ) , which aims to simultaneously estimate instantaneous and time-lagged relationships between variables in a time-series . Functional causal model-based methods represent the effect as a function of its direct causes and their independent immeasurable noise ( Glymour et al. , 2019 ) . For non-temporal data , there are linear non-Gaussian acyclic models ( Shimizu et al. , 2006 ) , additive noise models ( Peters et al. , 2014 ) , post-nonlinear models ( Zhang & Hyvärinen , 2009 ) , etc . For temporal data , these approaches fit a dynamics model , which is often regularized in terms of its sparsity , and its form is analyzed to identify the underlying causal connections in the data . Granger causal analysis falls into this category , since we first model the dynamics and some analysis is performed to extract the latent causal structure ( Granger , 1969 ) . Causal discovery is , in general , a challenging task and its study arises a great amount of practical issues . The problem is ill-posed when considering linearity and Gaussian disturbances , since it can be proved that the underlying causal model is not identifiable , while under proper assumptions , such as non-Gaussianity , it becomes identifiable ( Shimizu et al. , 2006 ) . When considering non-linear transformations , the symmetry between observed variables disappears , allowing the identification of causal relations in the context of Gaussian disturbances ( Hoyer et al. , 2008 ) . Other practical issues consist on the existence of latent confounders ( Ranganath & Perotte , 2018 ) , the presence of measurement error ( Zhang et al. , 2017 ) or considering observations with missing data ( Tu et al. , 2019 ) . In order to avoid these common problems , simplifications of the problem need to be applied . In fact , the assumptions we make in this work are : ( i ) all the instances belonging to the causal graph are observed , ( ii ) we have no missing data selection bias , and ( iii ) no latent confounders exist . The work most related to ours are the approaches by ( Löwe et al. , 2020 ; Li et al. , 2020 ) ; we extend these by allowing the causal model of the underlying process to vary depending on a state variable . Our method can in the future be applied to a wider class of non-stationary visual scenarios where the interacting objects are only partially and noisily observed as semantically segmented visual regions , or by tracked image keypoints ( Löwe et al. , 2020 ) . This would allow addressing challenging tasks such as scene understanding , counterfactual reasoning , etc . The recent work by ( Sauer & Geiger , 2021 ) also uses the concept of causality for a similar task , generation of counterfactual images . 3 STATE-DEPENDENT CAUSAL INFERENCE . In this section , we introduce our formulation to extract causal graphs from time-series data where their dynamics are altered by means of a categorical variable , referred to as their state . We refer to our method as State-Dependent Causal Inference ( SDCI ) . 3.1 PROBLEM FORMULATION . The input consists of a set of N time-series which not only obey some dynamics that might change over time but also undergo different states along the sequence . These states are responsible for the changes in the dynamics of the sample . We observe the sequence for a total of T frames and we denote the sample x as x = { { x1i } Ni=1 , ... , { xTi } Ni=1 } , xti = { pti , sti } , ( 1 ) where { s1 : Ti } Ni=1 represents the hidden states and { p1 : Ti } Ni=1 are the observed quantities of interest . For simplicity , we drop the subscript when referring to all the elements in a single time-step ( e.g . xt , pt , st , etc ) . In a causal graph , the observed quantities are represented by the vertices and the edge of the causal graph represents the interaction type between vertices . We denote the amount of possible interaction types by n . Assumptions . In this work , we assume that the data generation process obeys a structural causal model ( SCM ) ( Pearl , 2009 ) , G1 : T , and that the model satisfies the first-order Markov property . Moreover , according to the definitions of causality ( Granger , 1969 ) , we assume that edges of a causal graph can not go back in time . The first assumption follows related works concerning samples where the generative process also follows an SCM ( Löwe et al. , 2020 ; Li et al. , 2020 ) . Although we assume the first-order Markov property , one can extend to the more general p − th order Markov property in a more complex scenario . State-dependent causal inference . Based on the assumptions we mainly focus on the nonstationary causal graph , which means that we can find different edge-types at different times . As for an edge between two vertices , the edge-type interaction between two vertices changes according to the state of the variable which is the source of the interaction . The main focus of our method consists on extracting a causal summary graph G ( also denoted as such by Li et al . ( 2020 ) and Löwe et al . ( 2020 ) ) . Previous approaches aiming for this task assume stationary time-series data and therefore , this causal summary graph is constant . Nonetheless , since we condition the stationarity of the samples on the states , our causal summary graph is expressed by means of this categorical variable . In other words , our method will extract K summary graphs , one per state considered . The edge-type interaction can be then queried at each time-step t as follows : ztij = Gij ( s t i ) ( 2 ) where ztij ∈ { 0 , ... , n − 1 } denotes the edge-type interaction from i to j at time-step t. Figure 1 illustrates this task . In general , this causal summary graph is specific to the input sample and hidden from the model . Therefore , not only we require to design a parametrizable function to infer the latent causal structure , but also to evaluate how this inference fits to the actual dynamics observed in the input sequence . Let us denote the first step of extracting the latent causal structure G ( s ) = fφ ( p1 : T , s1 : T ) ( 3 ) where fφ denotes a parameterizable function that receives all the observed sequence as input . The next step is to fit this extracted latent sturcture into our assumed first-order Markov dynamics . ( p̃t+1 , s̃t+1 ) = fψ ( xt , G ( st ) ) ( 4 ) where the parameterizable function fψ represents a one-step computation of the dynamics starting from the observed values at time-step t. In this expression , we have defined fψ to predict the value of the states at the next time-step as well . However , in our experiments we will also consider settings where the states are observed at all times and modelling the dynamics is only performed with respect to the quantity p1 : T . To allow for this setting , one only needs to exclude the state variable from supervision . We provide more details in the next section . Objective . Both the causal inference and dynamics modelling modules can be optimized by minimizing some objective defined for the parameterizable functions fφ and fψ . min φ , ψ T−1∑ t=1 L ( xt+1 , fψ ( xt , G ( st ) ) ) +R ( G ( · ) ) , G ( st ) = fφ ( x ) ( 5 ) where R ( · ) is a regularizer on the extracted graph structure , which can be applied to enforce a preferred interaction type . | This paper aims to solve the problem of causal summary graph extraction and time series reconstruction at the same time. They propose a conditional VAE based model. The model is conditioned on state variables $s$, which makes it different from a normal VAE. Experiments on two datasets show the method outperforms ACD on linear data and its performance drops as number of states increase with spring data. | SP:1c1dfcfd223ed681844ad09249052a51a6c1fcb0 |
FastSHAP: Real-Time Shapley Value Estimation | 1 INTRODUCTION . With the proliferation of black-box models , Shapley values ( Shapley , 1953 ) have emerged as a popular explanation approach due to their strong theoretical properties ( Lipovetsky and Conklin , 2001 ; Štrumbelj and Kononenko , 2014 ; Datta et al. , 2016 ; Lundberg and Lee , 2017 ) . In practice , however , Shapley value-based explanations are known to have high computational complexity , with an exact calculation requiring an exponential number of model evaluations ( Van den Broeck et al. , 2021 ) . Speed becomes a critical issue as models increase in size and dimensionality , and for the largest models in fields such as computer vision and natural language processing , there is an unmet need for significantly faster Shapley value approximations that maintain high accuracy . Recent work has addressed the computational challenges with Shapley values using two main approaches . First , many works have proposed stochastic estimators ( Castro et al. , 2009 ; Štrumbelj and Kononenko , 2014 ; Lundberg and Lee , 2017 ; Covert et al. , 2020 ) that rely on sampling either feature subsets or permutations ; though often consistent , these estimators require many model evaluations and impose an undesirable trade-off between run-time and accuracy . Second , some works have proposed model-specific approximations , e.g. , for trees ( Lundberg et al. , 2020 ) or neural networks ( Shrikumar et al. , 2017 ; Chen et al. , 2018b ; Ancona et al. , 2019 ; Wang et al. , 2021 ) ; while generally faster , these approaches can still require many model evaluations , often induce bias , and typically lack flexibility regarding the handling held-out features—a subject of ongoing debate in the field ( Aas et al. , 2019 ; Janzing et al. , 2020 ; Frye et al. , 2020 ; Covert et al. , 2021 ) . Here , we introduce a new approach for efficient Shapley value estimation : to achieve the fastest possible run-time , we propose learning a separate explainer model that outputs precise Shapley value estimates in a single forward pass . Naïvely , such a learning-based approach would seem to require a large training set of ground truth Shapley values , which would be computationally intractable . Instead , our approach trains an explainer model by minimizing an objective function inspired by the Shapley value ’ s weighted least squares characterization ( Charnes et al. , 1988 ) , which enables efficient gradient-based optimization . Our contributions . We introduce FastSHAP , an amortized approach for generating real-time Shapley value explanations.1 We derive an objective function from the Shapley value ’ s weighted least ∗Equal contribution 1https : //git.io/JCqFV ( PyTorch ) , https : //git.io/JCqbP ( TensorFlow ) squares characterization and investigate several ways to reduce gradient variance during training . Our experiments show that FastSHAP provides accurate Shapley value estimates with an ordersof-magnitude speedup relative to non-amortized estimation approaches . Finally , we also find that FastSHAP generates high-quality image explanations ( fig . 1 ) that outperform gradient-based methods ( e.g. , IntGrad and GradCAM ) on quantitative inclusion and exclusion metrics . 2 BACKGROUND . In this section , we introduce notation used throughout the paper and provide an overview of Shapley values and their weighted least squares characterization . Let x ∈ X be a random vector consisting of d features , or x = ( x1 , . . . , xd ) , and let y ∈ Y = { 1 , . . . , K } be the response variable for a classification problem . We use s ∈ { 0 , 1 } d to denote subsets of the indices { 1 , . . . , d } and define xs : = { xi } i : si=1 . The symbols x , y , s are random variables and x , y , s denote possible values . We use 1 and 0 to denote vectors of ones and zeros in Rd , so that 1⊤s is a subset ’ s cardinality , and we use ei to denote the ith standard basis vector . Finally , f ( x ; η ) : X 7→ ∆K−1 is a model that outputs a probability distribution over y given x , and fy ( x ; η ) is the probability for the yth class . 2.1 SHAPLEY VALUES . Shapley values were originally developed as a credit allocation technique in cooperative game theory ( Shapley , 1953 ) , but they have since been adopted to explain predictions from black-box machine learning models ( Štrumbelj and Kononenko , 2014 ; Datta et al. , 2016 ; Lundberg and Lee , 2017 ) . For any value function ( or set function ) v : 2d 7→ R , the Shapley values ϕ ( v ) ∈ Rd , or ϕi ( v ) ∈ R for each feature i = 1 , . . . , d , are given by the formula ϕi ( v ) = 1 d ∑ si ̸=1 ( d− 1 1⊤s ) −1 ( v ( s+ ei ) − v ( s ) ) . ( 1 ) The difference v ( s + ei ) − v ( s ) represents the ith feature ’ s contribution to the subset s , and the summation represents a weighted average across all subsets that do not include i . In the model explanation context , the value function is chosen to represent how an individual prediction varies as different subsets of features are removed . For example , given an input-output pair ( x , y ) , the prediction for the yth class can be represented by a value function vx , y defined as vx , y ( s ) = link ( E p ( x1−s ) [ fy ( xs , x1−s ; η ) ] ) , ( 2 ) where the held out features x1−s are marginalized out using their joint marginal distribution p ( x1−s ) , and a link function ( e.g. , logit ) is applied to the model output . Recent work has debated the properties of different value function formulations , particularly the choice of how to remove features ( Aas et al. , 2019 ; Janzing et al. , 2020 ; Frye et al. , 2020 ; Covert et al. , 2021 ) . However , regardless of the formulation , this approach to model explanation enjoys several useful theoretical properties due to its use of Shapley values : for example , the attributions are zero for irrelevant features , and they are guaranteed to sum to the model ’ s prediction . We direct readers to prior work for a detailed discussion of these properties ( Lundberg and Lee , 2017 ; Covert et al. , 2021 ) . Unfortunately , Shapley values also introduce computational challenges : the summation in eq . ( 1 ) involves an exponential number of subsets , which makes it infeasible to calculate for large d. Fast approximations are therefore required in practice , as we discuss next . 2.2 KERNELSHAP . KernelSHAP ( Lundberg and Lee , 2017 ) is a popular Shapley value implementation that relies on an alternative Shapley value interpretation . Given a value function vx , y ( s ) , eq . ( 1 ) shows that the values ϕ ( vx , y ) are the features ’ weighted average contributions ; equivalently , their weighted least squares characterization says that they are the solution to an optimization problem over ϕx , y ∈ Rd , ϕ ( vx , y ) = argmin ϕx , y E p ( s ) [ ( vx , y ( s ) − vx , y ( 0 ) − s⊤ϕx , y ) 2 ] ( 3 ) s.t . 1⊤ϕx , y = vx , y ( 1 ) − vx , y ( 0 ) , ( Efficiency constraint ) where the distribution p ( s ) is defined as p ( s ) ∝ d− 1 ( d 1⊤s ) · 1⊤s · ( d− 1⊤s ) ( Shapley kernel ) for s such that 0 < 1⊤s < d ( Charnes et al. , 1988 ) . Based on this view of the Shapley value , Lundberg and Lee ( 2017 ) introduced KernelSHAP , a stochastic estimator that solves an approximate version of eq . ( 3 ) given some number of subsets sampled from p ( s ) . Although the estimator is consistent and empirically unbiased ( Covert and Lee , 2021 ) , KernelSHAP often requires many samples to achieve an accurate estimate , and it must solve eq . ( 3 ) separately for each input-output pair ( x , y ) . As a result , it is unacceptably slow for some use cases , particularly in settings with large , high-dimensional models . Our approach builds on KernelSHAP , leveraging the Shapley value ’ s weighted least squares characterization to design a faster , amortized estimation approach . 3 FASTSHAP . We now introduce FastSHAP , a method that amortizes the cost of generating Shapley values across many data samples . FastSHAP has two main advantages over existing approaches : ( 1 ) it avoids solving separate optimization problems for each input to be explained , and ( 2 ) it can use similar data points to efficiently learn the Shapley value function ϕ ( vx , y ) . 3.1 AMORTIZING SHAPLEY VALUES . In our approach , we propose generating Shapley value explanations using a learned parametric function ϕfast ( x , y ; θ ) : X × Y 7→ Rd . Once trained , the parametric function can generate explanations in a single forward pass , providing a significant speedup over methods that approximate Shapley values separately for each sample ( x , y ) . Rather than using a dataset of ground truth Shapley values for training , we train ϕfast ( x , y ; θ ) by penalizing its predictions according to the weighted least squares objective in eq . ( 3 ) , or by minimizing the following loss , L ( θ ) = E p ( x ) E Unif ( y ) E p ( s ) [ ( vx , y ( s ) − vx , y ( 0 ) − s⊤ϕfast ( x , y ; θ ) ) 2 ] , ( 4 ) where Unif ( y ) represents a uniform distribution over classes . If the model ’ s predictions are forced to satisfy the Efficiency constraint , then given a large enough dataset and a sufficiently expressive model class for ϕfast , the global optimizer ϕfast ( x , y ; θ∗ ) is a function that outputs exact Shapley values ( see proof in appendix A ) . Formally , the global optimizer satisfies the following : ϕfast ( x , y ; θ ∗ ) = ϕ ( vx , y ) ∀ x ∈ X , y ∈ Y . ( 5 ) We explore two approaches to address the efficiency requirement . First , we can enforce efficiency by adjusting the Shapley value predictions using their additive efficient normalization ( Ruiz et al. , 1998 ) , which applies the following operation to the model ’ s outputs : ϕefffast ( x , y ; θ ) = ϕfast ( x , y ; θ ) + 1 d ( vx , y ( 1 ) − vx , y ( 0 ) − 1⊤ϕfast ( x , y ; θ ) ) ︸ ︷︷ ︸ Efficiency gap . ( 6 ) The normalization step can be applied at inference time and optionally during training ; in appendix B , we show that this step is guaranteed to make the estimates closer to the true Shapley values . Second , we can relax the efficiency property by augmenting L ( θ ) with a penalty on the efficiency gap ( see eq . ( 6 ) ) ; the penalty requires a parameter γ > 0 , and as we set γ → ∞ we can guarantee that efficiency holds ( see appendix A ) . Algorithm 1 summarizes our training approach . Empirical considerations . Optimizing L ( θ ) using a single set of samples ( x , y , s ) is problematic because of high variance in the gradients , which can lead to poor optimization . We therefore consider several steps to reduce gradient variance . First , as is conventional in deep learning , we minibatch across multiple samples from p ( x ) . Next , when possible , we calculate the loss jointly across all classes y ∈ { 1 , . . . , K } . Then , we experiment with using multiple samples s ∼ p ( s ) for each input sample x . Finally , we explore paired sampling , where each sample s is paired with its complement 1−s , which has been shown to reduce KernelSHAP ’ s variance ( Covert and Lee , 2021 ) . Appendix C shows proofs that these steps are guaranteed to reduce gradient variance , and ablation experiments in appendix D demonstrate their improvement on FastSHAP ’ s accuracy . | This paper proposes FastSHAP to efficiently estimate the Shapley value in a single forward pass using a learned explainer model. Since there is no label to train the Shapley value estimator, stochastic gradient optimization using a weighted least squares-like objective function is applied to train FastSHAP. The experimental results and the deployment efficiency shows the superiority of the presented method. | SP:bffc59409af0acecdcb344728b3f18d404e9d6ea |
FastSHAP: Real-Time Shapley Value Estimation | 1 INTRODUCTION . With the proliferation of black-box models , Shapley values ( Shapley , 1953 ) have emerged as a popular explanation approach due to their strong theoretical properties ( Lipovetsky and Conklin , 2001 ; Štrumbelj and Kononenko , 2014 ; Datta et al. , 2016 ; Lundberg and Lee , 2017 ) . In practice , however , Shapley value-based explanations are known to have high computational complexity , with an exact calculation requiring an exponential number of model evaluations ( Van den Broeck et al. , 2021 ) . Speed becomes a critical issue as models increase in size and dimensionality , and for the largest models in fields such as computer vision and natural language processing , there is an unmet need for significantly faster Shapley value approximations that maintain high accuracy . Recent work has addressed the computational challenges with Shapley values using two main approaches . First , many works have proposed stochastic estimators ( Castro et al. , 2009 ; Štrumbelj and Kononenko , 2014 ; Lundberg and Lee , 2017 ; Covert et al. , 2020 ) that rely on sampling either feature subsets or permutations ; though often consistent , these estimators require many model evaluations and impose an undesirable trade-off between run-time and accuracy . Second , some works have proposed model-specific approximations , e.g. , for trees ( Lundberg et al. , 2020 ) or neural networks ( Shrikumar et al. , 2017 ; Chen et al. , 2018b ; Ancona et al. , 2019 ; Wang et al. , 2021 ) ; while generally faster , these approaches can still require many model evaluations , often induce bias , and typically lack flexibility regarding the handling held-out features—a subject of ongoing debate in the field ( Aas et al. , 2019 ; Janzing et al. , 2020 ; Frye et al. , 2020 ; Covert et al. , 2021 ) . Here , we introduce a new approach for efficient Shapley value estimation : to achieve the fastest possible run-time , we propose learning a separate explainer model that outputs precise Shapley value estimates in a single forward pass . Naïvely , such a learning-based approach would seem to require a large training set of ground truth Shapley values , which would be computationally intractable . Instead , our approach trains an explainer model by minimizing an objective function inspired by the Shapley value ’ s weighted least squares characterization ( Charnes et al. , 1988 ) , which enables efficient gradient-based optimization . Our contributions . We introduce FastSHAP , an amortized approach for generating real-time Shapley value explanations.1 We derive an objective function from the Shapley value ’ s weighted least ∗Equal contribution 1https : //git.io/JCqFV ( PyTorch ) , https : //git.io/JCqbP ( TensorFlow ) squares characterization and investigate several ways to reduce gradient variance during training . Our experiments show that FastSHAP provides accurate Shapley value estimates with an ordersof-magnitude speedup relative to non-amortized estimation approaches . Finally , we also find that FastSHAP generates high-quality image explanations ( fig . 1 ) that outperform gradient-based methods ( e.g. , IntGrad and GradCAM ) on quantitative inclusion and exclusion metrics . 2 BACKGROUND . In this section , we introduce notation used throughout the paper and provide an overview of Shapley values and their weighted least squares characterization . Let x ∈ X be a random vector consisting of d features , or x = ( x1 , . . . , xd ) , and let y ∈ Y = { 1 , . . . , K } be the response variable for a classification problem . We use s ∈ { 0 , 1 } d to denote subsets of the indices { 1 , . . . , d } and define xs : = { xi } i : si=1 . The symbols x , y , s are random variables and x , y , s denote possible values . We use 1 and 0 to denote vectors of ones and zeros in Rd , so that 1⊤s is a subset ’ s cardinality , and we use ei to denote the ith standard basis vector . Finally , f ( x ; η ) : X 7→ ∆K−1 is a model that outputs a probability distribution over y given x , and fy ( x ; η ) is the probability for the yth class . 2.1 SHAPLEY VALUES . Shapley values were originally developed as a credit allocation technique in cooperative game theory ( Shapley , 1953 ) , but they have since been adopted to explain predictions from black-box machine learning models ( Štrumbelj and Kononenko , 2014 ; Datta et al. , 2016 ; Lundberg and Lee , 2017 ) . For any value function ( or set function ) v : 2d 7→ R , the Shapley values ϕ ( v ) ∈ Rd , or ϕi ( v ) ∈ R for each feature i = 1 , . . . , d , are given by the formula ϕi ( v ) = 1 d ∑ si ̸=1 ( d− 1 1⊤s ) −1 ( v ( s+ ei ) − v ( s ) ) . ( 1 ) The difference v ( s + ei ) − v ( s ) represents the ith feature ’ s contribution to the subset s , and the summation represents a weighted average across all subsets that do not include i . In the model explanation context , the value function is chosen to represent how an individual prediction varies as different subsets of features are removed . For example , given an input-output pair ( x , y ) , the prediction for the yth class can be represented by a value function vx , y defined as vx , y ( s ) = link ( E p ( x1−s ) [ fy ( xs , x1−s ; η ) ] ) , ( 2 ) where the held out features x1−s are marginalized out using their joint marginal distribution p ( x1−s ) , and a link function ( e.g. , logit ) is applied to the model output . Recent work has debated the properties of different value function formulations , particularly the choice of how to remove features ( Aas et al. , 2019 ; Janzing et al. , 2020 ; Frye et al. , 2020 ; Covert et al. , 2021 ) . However , regardless of the formulation , this approach to model explanation enjoys several useful theoretical properties due to its use of Shapley values : for example , the attributions are zero for irrelevant features , and they are guaranteed to sum to the model ’ s prediction . We direct readers to prior work for a detailed discussion of these properties ( Lundberg and Lee , 2017 ; Covert et al. , 2021 ) . Unfortunately , Shapley values also introduce computational challenges : the summation in eq . ( 1 ) involves an exponential number of subsets , which makes it infeasible to calculate for large d. Fast approximations are therefore required in practice , as we discuss next . 2.2 KERNELSHAP . KernelSHAP ( Lundberg and Lee , 2017 ) is a popular Shapley value implementation that relies on an alternative Shapley value interpretation . Given a value function vx , y ( s ) , eq . ( 1 ) shows that the values ϕ ( vx , y ) are the features ’ weighted average contributions ; equivalently , their weighted least squares characterization says that they are the solution to an optimization problem over ϕx , y ∈ Rd , ϕ ( vx , y ) = argmin ϕx , y E p ( s ) [ ( vx , y ( s ) − vx , y ( 0 ) − s⊤ϕx , y ) 2 ] ( 3 ) s.t . 1⊤ϕx , y = vx , y ( 1 ) − vx , y ( 0 ) , ( Efficiency constraint ) where the distribution p ( s ) is defined as p ( s ) ∝ d− 1 ( d 1⊤s ) · 1⊤s · ( d− 1⊤s ) ( Shapley kernel ) for s such that 0 < 1⊤s < d ( Charnes et al. , 1988 ) . Based on this view of the Shapley value , Lundberg and Lee ( 2017 ) introduced KernelSHAP , a stochastic estimator that solves an approximate version of eq . ( 3 ) given some number of subsets sampled from p ( s ) . Although the estimator is consistent and empirically unbiased ( Covert and Lee , 2021 ) , KernelSHAP often requires many samples to achieve an accurate estimate , and it must solve eq . ( 3 ) separately for each input-output pair ( x , y ) . As a result , it is unacceptably slow for some use cases , particularly in settings with large , high-dimensional models . Our approach builds on KernelSHAP , leveraging the Shapley value ’ s weighted least squares characterization to design a faster , amortized estimation approach . 3 FASTSHAP . We now introduce FastSHAP , a method that amortizes the cost of generating Shapley values across many data samples . FastSHAP has two main advantages over existing approaches : ( 1 ) it avoids solving separate optimization problems for each input to be explained , and ( 2 ) it can use similar data points to efficiently learn the Shapley value function ϕ ( vx , y ) . 3.1 AMORTIZING SHAPLEY VALUES . In our approach , we propose generating Shapley value explanations using a learned parametric function ϕfast ( x , y ; θ ) : X × Y 7→ Rd . Once trained , the parametric function can generate explanations in a single forward pass , providing a significant speedup over methods that approximate Shapley values separately for each sample ( x , y ) . Rather than using a dataset of ground truth Shapley values for training , we train ϕfast ( x , y ; θ ) by penalizing its predictions according to the weighted least squares objective in eq . ( 3 ) , or by minimizing the following loss , L ( θ ) = E p ( x ) E Unif ( y ) E p ( s ) [ ( vx , y ( s ) − vx , y ( 0 ) − s⊤ϕfast ( x , y ; θ ) ) 2 ] , ( 4 ) where Unif ( y ) represents a uniform distribution over classes . If the model ’ s predictions are forced to satisfy the Efficiency constraint , then given a large enough dataset and a sufficiently expressive model class for ϕfast , the global optimizer ϕfast ( x , y ; θ∗ ) is a function that outputs exact Shapley values ( see proof in appendix A ) . Formally , the global optimizer satisfies the following : ϕfast ( x , y ; θ ∗ ) = ϕ ( vx , y ) ∀ x ∈ X , y ∈ Y . ( 5 ) We explore two approaches to address the efficiency requirement . First , we can enforce efficiency by adjusting the Shapley value predictions using their additive efficient normalization ( Ruiz et al. , 1998 ) , which applies the following operation to the model ’ s outputs : ϕefffast ( x , y ; θ ) = ϕfast ( x , y ; θ ) + 1 d ( vx , y ( 1 ) − vx , y ( 0 ) − 1⊤ϕfast ( x , y ; θ ) ) ︸ ︷︷ ︸ Efficiency gap . ( 6 ) The normalization step can be applied at inference time and optionally during training ; in appendix B , we show that this step is guaranteed to make the estimates closer to the true Shapley values . Second , we can relax the efficiency property by augmenting L ( θ ) with a penalty on the efficiency gap ( see eq . ( 6 ) ) ; the penalty requires a parameter γ > 0 , and as we set γ → ∞ we can guarantee that efficiency holds ( see appendix A ) . Algorithm 1 summarizes our training approach . Empirical considerations . Optimizing L ( θ ) using a single set of samples ( x , y , s ) is problematic because of high variance in the gradients , which can lead to poor optimization . We therefore consider several steps to reduce gradient variance . First , as is conventional in deep learning , we minibatch across multiple samples from p ( x ) . Next , when possible , we calculate the loss jointly across all classes y ∈ { 1 , . . . , K } . Then , we experiment with using multiple samples s ∼ p ( s ) for each input sample x . Finally , we explore paired sampling , where each sample s is paired with its complement 1−s , which has been shown to reduce KernelSHAP ’ s variance ( Covert and Lee , 2021 ) . Appendix C shows proofs that these steps are guaranteed to reduce gradient variance , and ablation experiments in appendix D demonstrate their improvement on FastSHAP ’ s accuracy . | The paper works on improving the runtime for estimating Shapley values. The work introduces FastSHAP that estimates Shapley values with a learned explainer model. The method is validated on tabular and image datasets (CIFAR10 and Imagenette). | SP:bffc59409af0acecdcb344728b3f18d404e9d6ea |
Topological Graph Neural Networks | 1 INTRODUCTION . Graphs are a natural description of structured data sets in many domains , including bioinformatics , image processing , and social network analysis . Numerous methods address the two dominant graph learning tasks of graph classification or node classification . In particular , graph neural networks ( GNNs ) describe a flexible set of architectures for such tasks and have seen many successful applications over recent years ( Wu et al. , 2021 ) . At their core , many GNNs are based on iterative message passing schemes ( see Sanchez-Lengeling et al . ( 2021 ) for an introduction to GNNs ) . Since these schemes are collating information over the neighbours of every node , GNNs can not necessarily capture certain topological structures in graphs , such as cycles ( Bouritsas et al. , 2021 ) . These structures , however , are relevant for certain applications , such as the analysis of molecular graphs , whose classification necessitates knowledge about connectivity information ( Hofer et al. , 2020 ; Swenson et al. , 2020 ) . In this paper , we address this issue by proposing a Topological Graph Layer ( TOGL ) that can be easily integrated into any GNN to make it ‘ topology-aware ’ . Our method is rooted in the nascent field of topological data analysis ( TDA ) , which focuses on describing coarse structures that can be used to describe the shape of complex structured and unstructured data sets at multiple scales . We thus obtain a generic way to augment existing GNNs and increase their expressivity in graph learning tasks . Section 1 provides a motivational example that showcases the potential benefits of using topological information : ( i ) high predictive performance is reached earlier for a smaller number of layers , and ( ii ) learnable topological representations outperform fixed ones if more complex topological structures are present in a data set . Our contributions . We propose TOGL , a novel layer based on TDA concepts that can be integrated into any GNN . Our layer is differentiable and capable of learning contrasting topological representations of a graph . We prove that TOGL enhances expressivity of a GNN since it incorporates the ability to work with multi-scale topological information in a graph . Moreover , we show that TOGL improves predictive performance of several GNN architectures when topological information is relevant for the respective task . 2 BACKGROUND : COMPUTATIONAL TOPOLOGY . We consider undirected graphs of the form G = ( V , E ) with a set of vertices V and a set of edges E ⊆ V × V . The basic topological features of such a graph G are the number of connected components β0 and the number of cycles β1 . These counts are also known as the 0-dimensional and 1-dimensional Betti numbers , respectively , and can be computed efficiently . Betti numbers are invariant under graph isomorphism ( Hatcher , 2002 , pp . 103–133 ) . The expressivity of Betti numbers can be increased by assuming the existence of a graph filtration , i.e . a sequence of nested subgraphs of G such that ∅ = G ( 0 ) ⊆ G ( 1 ) ⊆ G ( 2 ) ⊆ · · · ⊆ G ( n−1 ) ⊆ G ( n ) = G. A filtration makes it possible to obtain more insights into the graph by ‘ monitoring ’ topological features of each G ( i ) and calculating their topological relevance , also referred to as their persistence . If a topological feature appears for the first time in G ( i ) and disappears in G ( j ) , we assign this feature a persistence of j − i. Equivalently , we can represent the feature as a tuple ( i , j ) , which we collect in a persistence diagram D. If a feature never disappears , we represent it by a tuple ( i , ∞ ) ; such features are the ones that are counted for the respective Betti numbers . This process was formalised and extended to a wider class of structured data sets , namely simplicial complexes , and is known under the name of persistent homology . One of its core concepts is the use of a filtration function f : V → Rd , with d = 1 typically , to accentuate certain structural features of a graph . This replaces the aforementioned tuples of the form ( i , j ) by tuples based on the values of f , i.e . ( fi , fj ) . Persistent homology has shown excellent promise in different areas of machine learning research ( see Hensel et al . ( 2021 ) for a recent survey ) , with existing work stressing that choosing or learning an appropriate filtration function f is crucial for high predictive performance ( Hofer et al. , 2020 ; Zhao and Wang , 2019 ) . Notation . We denote the calculation of persistence diagrams of a graph G under some filtration f by ph ( G , f ) . This will result in two persistence diagrams D ( 0 ) , D ( 1 ) , containing information about topological features in dimension 0 ( connected components ) and dimension 1 ( cycles ) . The cardinality of D ( 0 ) is equal to the number of nodes n in the graphs and each tuple in the 0-dimensional diagram is naturally associated with the vertex that created it . The cardinality of D ( 1 ) is the number of cycles . However , from a computational perspective , we pair each tuple in D ( 1 ) with the edge that created it . Unpaired edges—edges that are not used to create a cycle—are given a ‘ dummy ’ tuple value , such as ( 0 , 0 ) . All other edges will be paired with the maximum value of the filtration , following previous work by Hofer et al . ( 2017 ) . Please refer to a Appendix A for a more technical description of persistent homology . 3 RELATED WORK . Graph representation learning has received a large amount of attention by the machine learning community . Graph kernel methods address graph classification via ( implicit or explicit ) embeddings in Reproducing Kernel Hilbert Spaces ( Borgwardt et al. , 2020 ; Kriege et al. , 2020 ; Nikolentzos et al. , 2019 ) . While powerful and expressive , they can not capture partial similarities between neighbourhoods . This can be achieved by graph neural networks , which typically employ message passing on graphs to learn hidden representations of graph structures ( Kipf and Welling , 2017 ; Wu et al. , 2021 ) . Recent work in this domain is abundant and includes attempts to utilise additional substructures ( Bouritsas et al. , 2021 ) as well as defining higher-order message passing schemes ( Morris et al. , 2019 ) or algorithms that generalise message passing to more complex domains ( Bodnar et al. , 2021 ) . Our approach falls into the realm of topological data analysis ( Edelsbrunner and Harer , 2010 ) and employs persistent homology , a technique for calculating topological features—such as connected components and cycles—of structured data sets . These features are known to be highly characteristic , leading to successful topology-driven graph machine learning approaches ( Hofer et al. , 2017 ; 2020 ; Rieck et al. , 2019 ; Zhao and Wang , 2019 ) . At their core is the notion of a filtration , i.e . a sequence of nested subgraphs ( or simplicial complexes in a higher-dimensional setting ) . Choosing the right filtration is known to be crucial for obtaining good performance ( Zhao and Wang , 2019 ) . This used to be a daunting task because persistent homology calculations are inherently discrete . Recent advances in proving differentiability enable proper end-to-end training of persistent homology ( Carrière et al. , 2021 ) , thus opening the door for hybrid methods of increased expressivity by integrating the somewhat complementary view of topological features . Our method TOGL builds upon the theoretical framework by Hofer et al . ( 2020 ) , who ( i ) demonstrated that the output of a GNN can be used to ‘ learn ’ one task-specific filtration function , and ( ii ) described the conditions under which a filtration function f is differentiable . This work culminated in GFL , a topological readout function that exhibited improved predictive performance for graph classification tasks . Our work significantly extends the utility of topological features by making existing GNNs ‘ topology-aware ’ through the development of a generic layer that makes topological information available to all downstream GNN layers . Thus , TOGL can be integrated into any GNN architecture , enabling the creation of hybrid models whose expressivity is provably more powerful than that of a GNN alone . Moreover , while GFL only uses the output of a GNN to drive the calculation of topological features by means of a single filtration ( thus limiting the applicability of the approach , as the topological features can not inform the remainder of a network ) , TOGL learns multiple filtrations of a graph in an end-to-end manner . More precisely , TOGL includes topological information in the hidden representations of nodes , enabling networks to change the importance of the topological signal . Closest to the scope of TOGL is Zhao et al . ( 2020 ) , who presented a way to enhance GNNs using topological information for node classification . In their framework , however , topology is only used to provide additional scalar-valued weights for the message passing scheme , and topological features are only calculated over small neighbourhoods , making use of a static vectorisation technique of persistence diagrams . Similarly , Wong and Vong ( 2021 ) use static , i.e . non-learnable , topological features for 3D shape segmentation . By contrast , TOGL , being end-to-end differentiable , is more general and permits the calculation of topological features at all scales—including graph-level features—as well as an integration into arbitrary GNN architectures . 4 TOGL : A TOPOLOGICAL GRAPH LAYER . TOGL is a new type of graph neural network layer that is capable of utilising multi-scale topological information of input graphs . In this section , we give a brief overview of the components of this layer before discussing algorithmic details , theoretical expressivity , computational complexity , and limitations . Figure 2 presents an overview of our method ( we show only a single graph being encoded , but in practice , the layer operates on batches of graphs ) . The layer takes as input a graph G = ( V , E ) equipped with a set of n vertices V and a set of edges E , along with a set of d-dimensional node attribute vectors x ( v ) ∈ Rd for v ∈ V . These node attributes can either be node features of a data set or hidden representations learnt by some GNN . We employ a family of k vertex filtration functions of the form fi : Rd → R for i = 1 , . . . , k. Each filtration function fi can focus on different properties of the graph . The image of fi is finite and results in a set of node values a ( 1 ) i < · · · < a ( n ) i such that the graph G is filtered according to ∅ = G ( 0 ) i ⊆ G ( 1 ) i ⊆ · · · ⊆ G ( n ) i = G , where G ( j ) i = ( V ( j ) i , E ( j ) i ) , with V ( j ) i : = { v ∈ V | fi ( x ( v ) ) ≤ a ( j ) i } , and E ( j ) i : = { v , w ∈ E | max { fi ( x ( v ) ) , fi ( x ( w ) ) } ≤ a ( j ) i } . Given this filtration , we calculate a set of persistence diagrams , i.e . ph ( G , fi ) = { D ( 0 ) i , . . . , D ( l ) i } . We fix l = 1 ( i.e . we are capturing connected components and cycles ) to simplify our current implementation , but our layer can be extended to arbitrary values of l ( see Appendix C for a discussion ) . In order to benefit from representations that are trainable end-to-end , we use an embedding function Ψ ( l ) : { D ( l ) 1 , . . . , D ( l ) k } → Rn′×d for embedding persistence diagrams into a high-dimensional space that will be used to obtain the vertex representations , where n′ is the number of vertices n if l = 0 and the number of edges if l = 1 . This step is crucial as it enables us to use the resulting topological features as node features , making TOGL a layer that can be integrated into arbitrary GNNs . We later explain the precise mapping of Ψ ( l ) from a set of diagrams to the elements of a graph . Details on filtration computation and output generation . We compute our family of k vertex-based filtrations using Φ : Rd → Rk , an MLP with a single hidden layer , such that fi : = πi ◦ Φ , i.e . the projection of Φ to the ith dimension . We apply Φ to the hidden representations x ( v ) of all vertices in the graph . Moreover , we treat the resulting persistence diagrams in dimension 0 and 1 differently . For dimension 0 , we have a bijective mapping of tuples in the persistence diagram to the vertices of the graph , which was previously exploited in topological representation learning ( Moor et al. , 2020 ) . Therefore , we aggregate Ψ ( 0 ) with the original node attribute vector x ( v ) of the graph in a residual fashion , i.e . x̃ ( v ) = x ( v ) + Ψ ( 0 ) ( D ( 0 ) 1 , . . . , D ( 0 ) k ) [ v ] , where Ψ ( 0 ) [ v ] denotes taking vth row of Ψ ( 0 ) ( i.e the topological embedding of vertex v ) . The output of our layer for dimension 0 therefore results in a new representation x̃ ( v ) ∈ Rd for each vertex v , making it compatible with any subsequent ( GNN ) layers . By contrast , Ψ ( 1 ) is pooled into a graph-level representation , to be used in the final classification layer of a GNN . This is necessary because there is no bijective mapping to the vertices , but rather to edges . For stability reasons ( Bendich et al. , 2020 ) , we consider it more useful to have this information available only on the graph level . For further details on the computational aspects , please refer to Section A.4 . Complexity and limitations . Persistent homology can be calculated efficiently for dimensions 0 and 1 , having a worst-case complexity of O ( mα ( m ) ) for a graph with m sorted edges , where α ( · ) is the extremely slow-growing inverse Ackermann function , which can be treated as constant for all intents and purposes . The calculation of ph is therefore dominated by the complexity of sorting all edges , i.e . O ( m logm ) , making our approach efficient and scalable . Higher-dimensional persistent homology calculations unfortunately do not scale well , having a worst-case complexity of O ( md ) for calculating d-dimensional topological features , which is why we restrict ourselves to l = 1 here . At the moment , our approach is therefore limited to connected components and cycles . Moreover , our filtrations are incapable of assessing the impact of feature interactions on the topology ; for this , we would have to learn multifiltrations ( Carlsson et al. , 2009 ) , but multifiltrations do not afford a concise , efficient representation as the scalar-valued filtrations discussed in this paper . We therefore leave their treatment for future work . | The authors present a topology analysis improvement to GCN, using persistent homology, to capture global information regarding the topology of the graph. The authors conduct several experiments, from graph to node classification, and also introduce two novel data sets to exemplify the importance of topology. In most cases, the proposed method outperforms other baseline methods, as well as other topology aware methods. | SP:6f83e65ba5408b86d451f5545bf49100e9771f30 |
Topological Graph Neural Networks | 1 INTRODUCTION . Graphs are a natural description of structured data sets in many domains , including bioinformatics , image processing , and social network analysis . Numerous methods address the two dominant graph learning tasks of graph classification or node classification . In particular , graph neural networks ( GNNs ) describe a flexible set of architectures for such tasks and have seen many successful applications over recent years ( Wu et al. , 2021 ) . At their core , many GNNs are based on iterative message passing schemes ( see Sanchez-Lengeling et al . ( 2021 ) for an introduction to GNNs ) . Since these schemes are collating information over the neighbours of every node , GNNs can not necessarily capture certain topological structures in graphs , such as cycles ( Bouritsas et al. , 2021 ) . These structures , however , are relevant for certain applications , such as the analysis of molecular graphs , whose classification necessitates knowledge about connectivity information ( Hofer et al. , 2020 ; Swenson et al. , 2020 ) . In this paper , we address this issue by proposing a Topological Graph Layer ( TOGL ) that can be easily integrated into any GNN to make it ‘ topology-aware ’ . Our method is rooted in the nascent field of topological data analysis ( TDA ) , which focuses on describing coarse structures that can be used to describe the shape of complex structured and unstructured data sets at multiple scales . We thus obtain a generic way to augment existing GNNs and increase their expressivity in graph learning tasks . Section 1 provides a motivational example that showcases the potential benefits of using topological information : ( i ) high predictive performance is reached earlier for a smaller number of layers , and ( ii ) learnable topological representations outperform fixed ones if more complex topological structures are present in a data set . Our contributions . We propose TOGL , a novel layer based on TDA concepts that can be integrated into any GNN . Our layer is differentiable and capable of learning contrasting topological representations of a graph . We prove that TOGL enhances expressivity of a GNN since it incorporates the ability to work with multi-scale topological information in a graph . Moreover , we show that TOGL improves predictive performance of several GNN architectures when topological information is relevant for the respective task . 2 BACKGROUND : COMPUTATIONAL TOPOLOGY . We consider undirected graphs of the form G = ( V , E ) with a set of vertices V and a set of edges E ⊆ V × V . The basic topological features of such a graph G are the number of connected components β0 and the number of cycles β1 . These counts are also known as the 0-dimensional and 1-dimensional Betti numbers , respectively , and can be computed efficiently . Betti numbers are invariant under graph isomorphism ( Hatcher , 2002 , pp . 103–133 ) . The expressivity of Betti numbers can be increased by assuming the existence of a graph filtration , i.e . a sequence of nested subgraphs of G such that ∅ = G ( 0 ) ⊆ G ( 1 ) ⊆ G ( 2 ) ⊆ · · · ⊆ G ( n−1 ) ⊆ G ( n ) = G. A filtration makes it possible to obtain more insights into the graph by ‘ monitoring ’ topological features of each G ( i ) and calculating their topological relevance , also referred to as their persistence . If a topological feature appears for the first time in G ( i ) and disappears in G ( j ) , we assign this feature a persistence of j − i. Equivalently , we can represent the feature as a tuple ( i , j ) , which we collect in a persistence diagram D. If a feature never disappears , we represent it by a tuple ( i , ∞ ) ; such features are the ones that are counted for the respective Betti numbers . This process was formalised and extended to a wider class of structured data sets , namely simplicial complexes , and is known under the name of persistent homology . One of its core concepts is the use of a filtration function f : V → Rd , with d = 1 typically , to accentuate certain structural features of a graph . This replaces the aforementioned tuples of the form ( i , j ) by tuples based on the values of f , i.e . ( fi , fj ) . Persistent homology has shown excellent promise in different areas of machine learning research ( see Hensel et al . ( 2021 ) for a recent survey ) , with existing work stressing that choosing or learning an appropriate filtration function f is crucial for high predictive performance ( Hofer et al. , 2020 ; Zhao and Wang , 2019 ) . Notation . We denote the calculation of persistence diagrams of a graph G under some filtration f by ph ( G , f ) . This will result in two persistence diagrams D ( 0 ) , D ( 1 ) , containing information about topological features in dimension 0 ( connected components ) and dimension 1 ( cycles ) . The cardinality of D ( 0 ) is equal to the number of nodes n in the graphs and each tuple in the 0-dimensional diagram is naturally associated with the vertex that created it . The cardinality of D ( 1 ) is the number of cycles . However , from a computational perspective , we pair each tuple in D ( 1 ) with the edge that created it . Unpaired edges—edges that are not used to create a cycle—are given a ‘ dummy ’ tuple value , such as ( 0 , 0 ) . All other edges will be paired with the maximum value of the filtration , following previous work by Hofer et al . ( 2017 ) . Please refer to a Appendix A for a more technical description of persistent homology . 3 RELATED WORK . Graph representation learning has received a large amount of attention by the machine learning community . Graph kernel methods address graph classification via ( implicit or explicit ) embeddings in Reproducing Kernel Hilbert Spaces ( Borgwardt et al. , 2020 ; Kriege et al. , 2020 ; Nikolentzos et al. , 2019 ) . While powerful and expressive , they can not capture partial similarities between neighbourhoods . This can be achieved by graph neural networks , which typically employ message passing on graphs to learn hidden representations of graph structures ( Kipf and Welling , 2017 ; Wu et al. , 2021 ) . Recent work in this domain is abundant and includes attempts to utilise additional substructures ( Bouritsas et al. , 2021 ) as well as defining higher-order message passing schemes ( Morris et al. , 2019 ) or algorithms that generalise message passing to more complex domains ( Bodnar et al. , 2021 ) . Our approach falls into the realm of topological data analysis ( Edelsbrunner and Harer , 2010 ) and employs persistent homology , a technique for calculating topological features—such as connected components and cycles—of structured data sets . These features are known to be highly characteristic , leading to successful topology-driven graph machine learning approaches ( Hofer et al. , 2017 ; 2020 ; Rieck et al. , 2019 ; Zhao and Wang , 2019 ) . At their core is the notion of a filtration , i.e . a sequence of nested subgraphs ( or simplicial complexes in a higher-dimensional setting ) . Choosing the right filtration is known to be crucial for obtaining good performance ( Zhao and Wang , 2019 ) . This used to be a daunting task because persistent homology calculations are inherently discrete . Recent advances in proving differentiability enable proper end-to-end training of persistent homology ( Carrière et al. , 2021 ) , thus opening the door for hybrid methods of increased expressivity by integrating the somewhat complementary view of topological features . Our method TOGL builds upon the theoretical framework by Hofer et al . ( 2020 ) , who ( i ) demonstrated that the output of a GNN can be used to ‘ learn ’ one task-specific filtration function , and ( ii ) described the conditions under which a filtration function f is differentiable . This work culminated in GFL , a topological readout function that exhibited improved predictive performance for graph classification tasks . Our work significantly extends the utility of topological features by making existing GNNs ‘ topology-aware ’ through the development of a generic layer that makes topological information available to all downstream GNN layers . Thus , TOGL can be integrated into any GNN architecture , enabling the creation of hybrid models whose expressivity is provably more powerful than that of a GNN alone . Moreover , while GFL only uses the output of a GNN to drive the calculation of topological features by means of a single filtration ( thus limiting the applicability of the approach , as the topological features can not inform the remainder of a network ) , TOGL learns multiple filtrations of a graph in an end-to-end manner . More precisely , TOGL includes topological information in the hidden representations of nodes , enabling networks to change the importance of the topological signal . Closest to the scope of TOGL is Zhao et al . ( 2020 ) , who presented a way to enhance GNNs using topological information for node classification . In their framework , however , topology is only used to provide additional scalar-valued weights for the message passing scheme , and topological features are only calculated over small neighbourhoods , making use of a static vectorisation technique of persistence diagrams . Similarly , Wong and Vong ( 2021 ) use static , i.e . non-learnable , topological features for 3D shape segmentation . By contrast , TOGL , being end-to-end differentiable , is more general and permits the calculation of topological features at all scales—including graph-level features—as well as an integration into arbitrary GNN architectures . 4 TOGL : A TOPOLOGICAL GRAPH LAYER . TOGL is a new type of graph neural network layer that is capable of utilising multi-scale topological information of input graphs . In this section , we give a brief overview of the components of this layer before discussing algorithmic details , theoretical expressivity , computational complexity , and limitations . Figure 2 presents an overview of our method ( we show only a single graph being encoded , but in practice , the layer operates on batches of graphs ) . The layer takes as input a graph G = ( V , E ) equipped with a set of n vertices V and a set of edges E , along with a set of d-dimensional node attribute vectors x ( v ) ∈ Rd for v ∈ V . These node attributes can either be node features of a data set or hidden representations learnt by some GNN . We employ a family of k vertex filtration functions of the form fi : Rd → R for i = 1 , . . . , k. Each filtration function fi can focus on different properties of the graph . The image of fi is finite and results in a set of node values a ( 1 ) i < · · · < a ( n ) i such that the graph G is filtered according to ∅ = G ( 0 ) i ⊆ G ( 1 ) i ⊆ · · · ⊆ G ( n ) i = G , where G ( j ) i = ( V ( j ) i , E ( j ) i ) , with V ( j ) i : = { v ∈ V | fi ( x ( v ) ) ≤ a ( j ) i } , and E ( j ) i : = { v , w ∈ E | max { fi ( x ( v ) ) , fi ( x ( w ) ) } ≤ a ( j ) i } . Given this filtration , we calculate a set of persistence diagrams , i.e . ph ( G , fi ) = { D ( 0 ) i , . . . , D ( l ) i } . We fix l = 1 ( i.e . we are capturing connected components and cycles ) to simplify our current implementation , but our layer can be extended to arbitrary values of l ( see Appendix C for a discussion ) . In order to benefit from representations that are trainable end-to-end , we use an embedding function Ψ ( l ) : { D ( l ) 1 , . . . , D ( l ) k } → Rn′×d for embedding persistence diagrams into a high-dimensional space that will be used to obtain the vertex representations , where n′ is the number of vertices n if l = 0 and the number of edges if l = 1 . This step is crucial as it enables us to use the resulting topological features as node features , making TOGL a layer that can be integrated into arbitrary GNNs . We later explain the precise mapping of Ψ ( l ) from a set of diagrams to the elements of a graph . Details on filtration computation and output generation . We compute our family of k vertex-based filtrations using Φ : Rd → Rk , an MLP with a single hidden layer , such that fi : = πi ◦ Φ , i.e . the projection of Φ to the ith dimension . We apply Φ to the hidden representations x ( v ) of all vertices in the graph . Moreover , we treat the resulting persistence diagrams in dimension 0 and 1 differently . For dimension 0 , we have a bijective mapping of tuples in the persistence diagram to the vertices of the graph , which was previously exploited in topological representation learning ( Moor et al. , 2020 ) . Therefore , we aggregate Ψ ( 0 ) with the original node attribute vector x ( v ) of the graph in a residual fashion , i.e . x̃ ( v ) = x ( v ) + Ψ ( 0 ) ( D ( 0 ) 1 , . . . , D ( 0 ) k ) [ v ] , where Ψ ( 0 ) [ v ] denotes taking vth row of Ψ ( 0 ) ( i.e the topological embedding of vertex v ) . The output of our layer for dimension 0 therefore results in a new representation x̃ ( v ) ∈ Rd for each vertex v , making it compatible with any subsequent ( GNN ) layers . By contrast , Ψ ( 1 ) is pooled into a graph-level representation , to be used in the final classification layer of a GNN . This is necessary because there is no bijective mapping to the vertices , but rather to edges . For stability reasons ( Bendich et al. , 2020 ) , we consider it more useful to have this information available only on the graph level . For further details on the computational aspects , please refer to Section A.4 . Complexity and limitations . Persistent homology can be calculated efficiently for dimensions 0 and 1 , having a worst-case complexity of O ( mα ( m ) ) for a graph with m sorted edges , where α ( · ) is the extremely slow-growing inverse Ackermann function , which can be treated as constant for all intents and purposes . The calculation of ph is therefore dominated by the complexity of sorting all edges , i.e . O ( m logm ) , making our approach efficient and scalable . Higher-dimensional persistent homology calculations unfortunately do not scale well , having a worst-case complexity of O ( md ) for calculating d-dimensional topological features , which is why we restrict ourselves to l = 1 here . At the moment , our approach is therefore limited to connected components and cycles . Moreover , our filtrations are incapable of assessing the impact of feature interactions on the topology ; for this , we would have to learn multifiltrations ( Carlsson et al. , 2009 ) , but multifiltrations do not afford a concise , efficient representation as the scalar-valued filtrations discussed in this paper . We therefore leave their treatment for future work . | This paper introduces TOGL, a new layer for Graph Neural Networks (GNN), making the GNN "aware" of topological information during this training phase. It differs from the closely related work *Graph Filtration Learning (GFL)* (although taking inspiration from it) as GFL is mostly a readout function (roughly, final layer in a GNN) while TOGL is a more general type of GNN-layer. Numerical experiments show how, when topological information is relevant, TOGL helps to leverage it. | SP:6f83e65ba5408b86d451f5545bf49100e9771f30 |
On the Convergence of the Monte Carlo Exploring Starts Algorithm for Reinforcement Learning | 1 INTRODUCTION . Perhaps the most famous algorithm in tabular reinforcement learning is the so-called Q-learning algorithm . Under very general conditions , it is well known that the Q-learning converges to the optimal Q-function with probability one ( Tsitsiklis , 1994 ; Jaakkola et al. , 1994 ) . Importantly , in order to guarantee convergence for Q-learning , it is only required that every state-action pair be visited infinitely often . Furthermore , as discussed in the related work , Q-learning converges for the infinite-horizon discounted problem as well as for the non-discounted terminal-state problem ( also known as the stochastic shortest-path problem ) . The Q-learning algorithm is inspired by dynamic programming and uses back-ups to update the estimates of the optimal Q-function . An alternative methodological approach , which does not use back-ups , is to use the Monte Carlo episodic returns to estimate the values of the Q-function . In order for such an algorithm to succeed at finding an optimal policy , the algorithm must include some form of exploration . A simple form of exploration is “ exploring starts , ” where at the beginning of each episode , a random state-action pair is chosen . In the classic book on reinforcement learning by Sutton & Barto ( 2018 ) , the authors describe such an algorithm , namely , Monte Carlo Exploring Starts ( MCES ) . In the MCES algorithm , after a ( random-length ) episode , the Q-function estimate is updated with the Monte Carlo return for each state-action pair along the episode , and the policy is improved in the usual fashion by setting it to the argmax of the current Q-function estimate . Exploration is performed by exploring starts , where the initial state-action pairs may be chosen with any distribution . We briefly remark here that AlphaZero is a Monte Carlo algorithm in that it runs episodes to completion and uses the returns from those episodes for the targets in the loss function ( Silver et al. , 2018 ) . AlphaZero additionally uses function approximators ( convolutional networks ) and planning ( Monte Carlo Tree Search ) , and is thus much more complicated than MCES . But AlphaZero is nonetheless fundamentally a Monte Carlo algorithm rather than a Q-learning-based algorithm . We mention AlphaZero here in order to emphasize that Monte Carlo algorithms are indeed used in practice , and it is therefore important to gain a deep understanding of their underlying theoretical properties . Since Q-learning converges under very general conditions , a natural question is : does MCES converge under equally general conditions ? In the 1996 book , Bertsekas & Tsitsiklis ( 1996 ) provide a counter-example showing that the MCES algorithm does not necessarily converge . See also Liu ( 2020 ) for numerical results in this direction . Thus , we see that the MCES convergence problem is fundamentally trickier than the Q-learning convergence problem . Instead of establishing a very general result as in Q-learning , we can at best establish convergence for a broad class of special-cases . Sutton and Barto write at the end of Section 5.3 : “ In our opinion , this is one of the most fundamental open theoretical questions in reinforcement learning ” . This paper is focused on this fundamental question . Although other questions , such as rates of convergence and regret bounds , are also important , in this paper our goal is to address the fundamental question of convergence . Tsitsiklis ( 2002 ) made significant progress with the MCES convergence problem , showing that almost sure convergence is guaranteed if the following three conditions hold : ( i ) the discount factor is strictly less than one ; ( ii ) the MCES algorithm is modified so that after an episode , the Q-function estimate is updated with the Monte Carlo return only for the initial state-action pair of the episode ; and ( iii ) the algorithm is further modified so that the initial state-action pair in an episode is chosen with a uniform distribution . As in the proof of Q-learning , Tsitsiklis ’ s proof is based on stochastic approximations . The conditions ( ii ) and ( iii ) combined ensure that the Q function estimates are updated at the same average rate for all state-action pairs , and both conditions appear to be crucial for establishing convergence in the proof in Tsitsiklis ( 2002 ) . However , these two conditions have the following drawbacks : • Perhaps most importantly , condition ( ii ) results in a substantially less efficient algorithm , since only one Q-function value is updated per episode . The original Sutton and Barto version is more efficient since after each episode , many Q-values are typically updated rather than just one . ( We also note as an aside that AlphaZero will also collect and use Monte Carlo return for all states along the episode , not just for the first state in the episode , as discussed on page 2 of Silver et al . ( 2017 ) ) • Similar to the idea of importance sampling , one may want to use a non-uniform distribution for the starting state-action pairs to accelerate convergence . • In some cases , we may not have access to a simulator to generate uniform exploring starts . Instead , we may run episodes by interacting directly with the real environment . Such natural interactions may lead to starting from every state , but not uniformly . An example would be playing blackjack at a casino rather than training with a simulator . In this paper we provide new convergence results and a new proof methodology for MCES . Unlike the result in Tsitsiklis ( 2002 ) , the results reported here do not modify the original MCES algorithm and do not require any of the conditions ( i ) − ( iii ) . Hence , our results do not have the three drawbacks listed above , and also allow for no discounting ( as in the stochastic shortest path problem ) . However , our proofs require restrictions on the dynamics of the underlying MDP . Specifically , we require that under the optimal policy , a state is never revisited . This class of MDPs includes stochastic feed-forward environments such as Blackjack ( Sutton & Barto , 2018 ) and also all deterministic MDPs , such as gridworlds ( Sutton & Barto , 2018 ) , Go and Chess ( when played against a fixed opponent policy ) , and the MuJoCo environments ( Todorov et al. , 2012 ) ( Episodic MuJoCo tasks fall into the category of OPFF MDPs because the MuJoCo simulation is deterministic ) . Moreover , if the trajectory horizon is instead fixed and deterministic , we show that the original MCES algorithm always converges ( to a time-dependent ) optimal policy , without any conditions on the dynamics , initial state-action distribution or the discount factor . Importantly , we also provide a new proof methodology . Our proof is very simple , making use of only the Strong Law of Large Numbers ( SLLN ) and a simple inductive argument . The proof does not use stochastic approximations , contraction mappings , or martingales , and can be done in an undergraduate course in machine learning . We believe that this new proof methodology provides new insights for episodic RL problems . In addition to the theoretical results , we present numerical experiments that show the original MCES can be much more efficient than the modified MCES , further highlighting the importance of improving our understanding on the convergence properties of the original MCES algorithm . 2 RELATED WORK . Some authors refer to an MDP with a finite horizon H as an episodic MDP . For finite horizon MDPs , the optimal Q-function and optimal policy are in general non-stationary and depend on time . Here , following Sutton & Barto ( 2018 ) , we instead reserve the term episodic MDPs for MDPs that terminate when the terminal state is reached , and thus the episode length is not fixed at H and may have a random length . Moreover , for such terminal-state episodic MDPs , under very general conditions , the optimal Q-function and policy are stationary and do not depend on time ( as in infinitehorizon discounted MDPs ) . When the dynamics are known and the discount factor equals 1 , the episodic optimization problem considered here is equivalent to the stochastic shortest path problem ( SSPP ) ( see Bertsekas & Tsitsiklis ( 1991 ) and references therein ; also see Chapter 2 of Bertsekas ( 2012 ) ) . Under very general conditions , value iteration converges to the optimal value function , from which an optimal stationary policy can be constructed . Convergence theory for RL algorithms has a long history . For the infinite-horizon discounted criterion , by showing that Q-learning is a form of stochastic approximations , Tsitsiklis ( 1994 ) and Jaakkola et al . ( 1994 ) showed that Q-learning converges almost surely to the optimal Q-function under very general conditions . There are also convergence results for Q-learning applied to episodic MDPs as defined in this paper with discount factor equal to 1 . Tsitsiklis [ 8 , Theorems 2 and 4 ( c ) ] proved that if the sequence of Q-learning iterates is bounded , then Q-learning converges to the optimal Q values almost surely . Yu & Bertsekas ( 2013 ) prove that the sequence of Q-learning iterates is bounded for episodic MDPs with or without non-negativity assumptions , fully establishing the convergence of Q-learning for terminal-state episodic RL problems . This paper is primarily concerned with the convergence of the MCES algorithm . In the Introduction we reviewed the important work of Sutton & Barto ( 1998 ) , Bertsekas & Tsitsiklis ( 1996 ) , and Tsitsiklis ( 2002 ) . Importantly , unlike Q-learning , the MCES algorithm is not guaranteed to converge for all types of MDPs . Indeed , in Section 5.4 of Bertsekas & Tsitsiklis ( 1996 ) , Example 5.12 shows that MCES is not guaranteed to converge for a continuing task MDP . However , if the algorithm is modified , as described in the Introduction , then convergence is guaranteed ( Tsitsiklis , 2002 ) . Recently , Chen ( 2018 ) extended the convergence result in Tsitsiklis ( 2002 ) to the undiscounted case , under the assumption that all policies are proper , that is , regardless of the initial state , all policies will lead to a terminal state in finite time with probability one . More recently , Liu ( 2020 ) relaxed the all policies being proper condition . As in Tsitsiklis ( 2002 ) , both Chen ( 2018 ) and Liu ( 2020 ) assume conditions ( ii ) − ( iii ) stated in the introduction , and their proofs employ the stochastic approximations methodology in Tsitsiklis ( 1994 ) . The results we develop here are complementary to the results in Tsitsiklis ( 2002 ) , Chen ( 2018 ) , and Liu ( 2020 ) , in that they do not require the strong algorithmic assumptions ( ii ) − ( iii ) described in the Introduction , and they use an entirely different proof methodology . In this work we focus on the question of convergence of the MCES problem . We briefly mention , there is also a large body of ( mostly orthogonal ) work on rates of convergence and regret analysis for Q-learning ( e.g . see Jin et al . ( 2018 ) ) and also for Monte Carlo approaches ( e.g. , see Kocsis & Szepesvári ( 2006 ) Azar et al . ( 2017 ) ) . To the best of our knowledge , these regret bounds assume finite-horizon MDPs ( for which the optimal policy is time-dependent ) rather than the terminal-state episodic MDPs considered here . | This paper studies Monte Carlo with exploration starts algorithm for solving the reinforcement learning problem. The writing is clear and I enjoyed reading this paper. As for the results, asymptotic convergence of the algorithm is established without needing strong assumptions in related literature. As pointed out by the authors, the result resolves an important open problem in RL. The proof is simple and intuitive. Numerical experiments corroborate theoretical findings. | SP:0b81356b614ae533e975718f34af62efcf7a7bb9 |
On the Convergence of the Monte Carlo Exploring Starts Algorithm for Reinforcement Learning | 1 INTRODUCTION . Perhaps the most famous algorithm in tabular reinforcement learning is the so-called Q-learning algorithm . Under very general conditions , it is well known that the Q-learning converges to the optimal Q-function with probability one ( Tsitsiklis , 1994 ; Jaakkola et al. , 1994 ) . Importantly , in order to guarantee convergence for Q-learning , it is only required that every state-action pair be visited infinitely often . Furthermore , as discussed in the related work , Q-learning converges for the infinite-horizon discounted problem as well as for the non-discounted terminal-state problem ( also known as the stochastic shortest-path problem ) . The Q-learning algorithm is inspired by dynamic programming and uses back-ups to update the estimates of the optimal Q-function . An alternative methodological approach , which does not use back-ups , is to use the Monte Carlo episodic returns to estimate the values of the Q-function . In order for such an algorithm to succeed at finding an optimal policy , the algorithm must include some form of exploration . A simple form of exploration is “ exploring starts , ” where at the beginning of each episode , a random state-action pair is chosen . In the classic book on reinforcement learning by Sutton & Barto ( 2018 ) , the authors describe such an algorithm , namely , Monte Carlo Exploring Starts ( MCES ) . In the MCES algorithm , after a ( random-length ) episode , the Q-function estimate is updated with the Monte Carlo return for each state-action pair along the episode , and the policy is improved in the usual fashion by setting it to the argmax of the current Q-function estimate . Exploration is performed by exploring starts , where the initial state-action pairs may be chosen with any distribution . We briefly remark here that AlphaZero is a Monte Carlo algorithm in that it runs episodes to completion and uses the returns from those episodes for the targets in the loss function ( Silver et al. , 2018 ) . AlphaZero additionally uses function approximators ( convolutional networks ) and planning ( Monte Carlo Tree Search ) , and is thus much more complicated than MCES . But AlphaZero is nonetheless fundamentally a Monte Carlo algorithm rather than a Q-learning-based algorithm . We mention AlphaZero here in order to emphasize that Monte Carlo algorithms are indeed used in practice , and it is therefore important to gain a deep understanding of their underlying theoretical properties . Since Q-learning converges under very general conditions , a natural question is : does MCES converge under equally general conditions ? In the 1996 book , Bertsekas & Tsitsiklis ( 1996 ) provide a counter-example showing that the MCES algorithm does not necessarily converge . See also Liu ( 2020 ) for numerical results in this direction . Thus , we see that the MCES convergence problem is fundamentally trickier than the Q-learning convergence problem . Instead of establishing a very general result as in Q-learning , we can at best establish convergence for a broad class of special-cases . Sutton and Barto write at the end of Section 5.3 : “ In our opinion , this is one of the most fundamental open theoretical questions in reinforcement learning ” . This paper is focused on this fundamental question . Although other questions , such as rates of convergence and regret bounds , are also important , in this paper our goal is to address the fundamental question of convergence . Tsitsiklis ( 2002 ) made significant progress with the MCES convergence problem , showing that almost sure convergence is guaranteed if the following three conditions hold : ( i ) the discount factor is strictly less than one ; ( ii ) the MCES algorithm is modified so that after an episode , the Q-function estimate is updated with the Monte Carlo return only for the initial state-action pair of the episode ; and ( iii ) the algorithm is further modified so that the initial state-action pair in an episode is chosen with a uniform distribution . As in the proof of Q-learning , Tsitsiklis ’ s proof is based on stochastic approximations . The conditions ( ii ) and ( iii ) combined ensure that the Q function estimates are updated at the same average rate for all state-action pairs , and both conditions appear to be crucial for establishing convergence in the proof in Tsitsiklis ( 2002 ) . However , these two conditions have the following drawbacks : • Perhaps most importantly , condition ( ii ) results in a substantially less efficient algorithm , since only one Q-function value is updated per episode . The original Sutton and Barto version is more efficient since after each episode , many Q-values are typically updated rather than just one . ( We also note as an aside that AlphaZero will also collect and use Monte Carlo return for all states along the episode , not just for the first state in the episode , as discussed on page 2 of Silver et al . ( 2017 ) ) • Similar to the idea of importance sampling , one may want to use a non-uniform distribution for the starting state-action pairs to accelerate convergence . • In some cases , we may not have access to a simulator to generate uniform exploring starts . Instead , we may run episodes by interacting directly with the real environment . Such natural interactions may lead to starting from every state , but not uniformly . An example would be playing blackjack at a casino rather than training with a simulator . In this paper we provide new convergence results and a new proof methodology for MCES . Unlike the result in Tsitsiklis ( 2002 ) , the results reported here do not modify the original MCES algorithm and do not require any of the conditions ( i ) − ( iii ) . Hence , our results do not have the three drawbacks listed above , and also allow for no discounting ( as in the stochastic shortest path problem ) . However , our proofs require restrictions on the dynamics of the underlying MDP . Specifically , we require that under the optimal policy , a state is never revisited . This class of MDPs includes stochastic feed-forward environments such as Blackjack ( Sutton & Barto , 2018 ) and also all deterministic MDPs , such as gridworlds ( Sutton & Barto , 2018 ) , Go and Chess ( when played against a fixed opponent policy ) , and the MuJoCo environments ( Todorov et al. , 2012 ) ( Episodic MuJoCo tasks fall into the category of OPFF MDPs because the MuJoCo simulation is deterministic ) . Moreover , if the trajectory horizon is instead fixed and deterministic , we show that the original MCES algorithm always converges ( to a time-dependent ) optimal policy , without any conditions on the dynamics , initial state-action distribution or the discount factor . Importantly , we also provide a new proof methodology . Our proof is very simple , making use of only the Strong Law of Large Numbers ( SLLN ) and a simple inductive argument . The proof does not use stochastic approximations , contraction mappings , or martingales , and can be done in an undergraduate course in machine learning . We believe that this new proof methodology provides new insights for episodic RL problems . In addition to the theoretical results , we present numerical experiments that show the original MCES can be much more efficient than the modified MCES , further highlighting the importance of improving our understanding on the convergence properties of the original MCES algorithm . 2 RELATED WORK . Some authors refer to an MDP with a finite horizon H as an episodic MDP . For finite horizon MDPs , the optimal Q-function and optimal policy are in general non-stationary and depend on time . Here , following Sutton & Barto ( 2018 ) , we instead reserve the term episodic MDPs for MDPs that terminate when the terminal state is reached , and thus the episode length is not fixed at H and may have a random length . Moreover , for such terminal-state episodic MDPs , under very general conditions , the optimal Q-function and policy are stationary and do not depend on time ( as in infinitehorizon discounted MDPs ) . When the dynamics are known and the discount factor equals 1 , the episodic optimization problem considered here is equivalent to the stochastic shortest path problem ( SSPP ) ( see Bertsekas & Tsitsiklis ( 1991 ) and references therein ; also see Chapter 2 of Bertsekas ( 2012 ) ) . Under very general conditions , value iteration converges to the optimal value function , from which an optimal stationary policy can be constructed . Convergence theory for RL algorithms has a long history . For the infinite-horizon discounted criterion , by showing that Q-learning is a form of stochastic approximations , Tsitsiklis ( 1994 ) and Jaakkola et al . ( 1994 ) showed that Q-learning converges almost surely to the optimal Q-function under very general conditions . There are also convergence results for Q-learning applied to episodic MDPs as defined in this paper with discount factor equal to 1 . Tsitsiklis [ 8 , Theorems 2 and 4 ( c ) ] proved that if the sequence of Q-learning iterates is bounded , then Q-learning converges to the optimal Q values almost surely . Yu & Bertsekas ( 2013 ) prove that the sequence of Q-learning iterates is bounded for episodic MDPs with or without non-negativity assumptions , fully establishing the convergence of Q-learning for terminal-state episodic RL problems . This paper is primarily concerned with the convergence of the MCES algorithm . In the Introduction we reviewed the important work of Sutton & Barto ( 1998 ) , Bertsekas & Tsitsiklis ( 1996 ) , and Tsitsiklis ( 2002 ) . Importantly , unlike Q-learning , the MCES algorithm is not guaranteed to converge for all types of MDPs . Indeed , in Section 5.4 of Bertsekas & Tsitsiklis ( 1996 ) , Example 5.12 shows that MCES is not guaranteed to converge for a continuing task MDP . However , if the algorithm is modified , as described in the Introduction , then convergence is guaranteed ( Tsitsiklis , 2002 ) . Recently , Chen ( 2018 ) extended the convergence result in Tsitsiklis ( 2002 ) to the undiscounted case , under the assumption that all policies are proper , that is , regardless of the initial state , all policies will lead to a terminal state in finite time with probability one . More recently , Liu ( 2020 ) relaxed the all policies being proper condition . As in Tsitsiklis ( 2002 ) , both Chen ( 2018 ) and Liu ( 2020 ) assume conditions ( ii ) − ( iii ) stated in the introduction , and their proofs employ the stochastic approximations methodology in Tsitsiklis ( 1994 ) . The results we develop here are complementary to the results in Tsitsiklis ( 2002 ) , Chen ( 2018 ) , and Liu ( 2020 ) , in that they do not require the strong algorithmic assumptions ( ii ) − ( iii ) described in the Introduction , and they use an entirely different proof methodology . In this work we focus on the question of convergence of the MCES problem . We briefly mention , there is also a large body of ( mostly orthogonal ) work on rates of convergence and regret analysis for Q-learning ( e.g . see Jin et al . ( 2018 ) ) and also for Monte Carlo approaches ( e.g. , see Kocsis & Szepesvári ( 2006 ) Azar et al . ( 2017 ) ) . To the best of our knowledge , these regret bounds assume finite-horizon MDPs ( for which the optimal policy is time-dependent ) rather than the terminal-state episodic MDPs considered here . | The paper studies the convergence of Monte Carlo Exploring Starts (MCES), in which the Q-function is estimated by averaging Monte Carlo returns and the policy is defined as the greedy policy w.r.t. this Q-function. The authors provide a technically simple proof of the convergence under different assumptions on the underlying MDP: (i) stochastic feed-forward MDP (in which states cannot be re-visited in an episode); (ii) optimal policy feed-forward (in which under the optimal policy states are not re-visited); (iii) finite-horizon MDPs. Given these additional assumptions, the analysis relaxes other assumptions employed in previous convergence proofs. Finally, experimental results to validate the considered set of assumptions is provided. | SP:0b81356b614ae533e975718f34af62efcf7a7bb9 |
Zero-Shot Recommender Systems | Performance of recommender systems ( RecSys ) relies heavily on the amount of training data available . This poses a chicken-and-egg problem for early-stage products , whose amount of data , in turn , relies on the performance of their RecSys . In this paper , we explore the possibility of zero-shot learning in RecSys , to enable generalization from an old dataset to an entirely new dataset . We develop an algorithm , dubbed ZEro-Shot Recommenders ( ZESREC ) , that is trained on an old dataset and generalize to a new one where there are neither overlapping users nor overlapping items , a setting that contrasts typical cross-domain RecSys that has either overlapping users or items . Different from previous methods that use categorical item indices ( i.e. , item ID ) , ZESREC uses items ’ generic features , such as natural-language descriptions , product images , and videos , as their continuous indices , and therefore naturally generalizes to any unseen items . In terms of users , ZESREC builds upon recent advances on sequential RecSys to represent users using their interactions with items , thereby generalizing to unseen users as well . We study three pairs of real-world RecSys datasets and demonstrate that ZESREC can successfully enable recommendations in such a zero-shot setting , opening up new opportunities for resolving the chicken-and-egg problem for data-scarce startups or early-stage products . 1 INTRODUCTION . Many large scale e-commerce platforms ( such as Etsy , Overstock , etc . ) and online content platforms ( such as Spotify , Overstock , Disney+ , Netflix , etc ) have such a large inventory of items that showcasing all of them in front of their users is simply not practical . In particular , in the online content category of businesses , it is often seen that users of their service do not have a crisp intent in mind unlike in the retail shopping experience where the users often have a clear intent of purchasing something . The need for personalized recommendations therefore arises from the fact that not only it is impractical to show all the items in the catalogue but often times users of such services need help discovering the next best thing — be it the new and exciting movie or be it a new music album or even a piece of merchandise that they may want to consider for future buying if not immediately . Modern personalized recommendation models of users and items have often relied on the idea of extrapolating preferences from similar users . Different machine learning models define the notion of similarity differently . Classical bi-linear Matrix Factorization ( MF ) approaches model users and items via their identifiers and represent them as vectors in the latent space [ 13 ; 28 ] . Modern deep-learningbased recommender systems [ 34 ; 12 ; 25 ] , which are also used for predicting top-k items given an item , learn the user-to-item propensities from large amounts of training data containing many ( user , item ) tuples , optionally with available item content information ( e.g. , product descriptions ) and user metadata . As machine learning models , the performance of RecSys relies heavily on the amount of training data available . This might be feasible for large e-commerce or content delivery websites such as Overstock and Netflix , but poses a serious chicken-and-egg problem for small startups , whose amount of data , in turn , relies on the performance of their RecSys . On the other hand , zero-shot learning promises some degree of generalization from an old dataset to an entirely new dataset . In this paper , we explore the possibility of zero-shot learning in RecSys . We develop an algorithm , dubbed ZEro-Shot Recommenders ( ZESREC ) , that is trained on an old dataset and generalize to a new one where there are neither overlapping users nor overlapping items , a setting that contrasts typical cross-domain RecSys that has either overlapping users or items [ 40 ; 38 ; 3 ; 16 ] . Naturally , generalization of RecSys to unseen users and unseen items becomes the two major challenges for developing zero-shot RecSys . For the first challenge on unseen users , we build on a rich body of literature on sequential recommendation models [ 12 ; 27 ; 25 ; 14 ; 17 ; 21 ] . These models are built with sequential structure to encode temporal ordering of items in user ’ s item interaction history . Representing users by the items they have consumed in the past allows the model to extrapolate the preference learning to even novel users who the model did not see during training , as long as the items these unseen users have interacted with have been seen during training . However , such deep learning models encode item via its categorical item index , i.e. , the item ID , and therefore fall short in predicting a likely relevant but brand-new item not previously seen during training . This brings us to the second challenge of developing zero-shot recommender systems , i.e. , dealing with unseen items . To address this challenge , ZESREC goes beyond traditional categorical item indices and uses items ’ generic features such as natural-language descriptions , product images , and videos as their continuous indices , thereby naturally generalizing to any unseen items . Take natural-language ( NL ) descriptions as an example . One can think of NL descriptions as a system of universal identifiers that indexes items from arbitrary domains . Therefore as long as one model is trained on a dataset with NL descriptions , it can generalize to a completely different dataset with a similar NL vocabulary . In ZESREC we build on state-of-the-art pretrained NL embedding models such as BERT [ 8 ] to extract NL embeddings from raw NL descriptions , leading to an item ID system in the continuous space that is generalizable across arbitrary domains . For instance , in e-commerce platform , one could use items ’ description text ; and similarly in the online content platforms , one could use movie synopsis or music track descriptions to represent an item . Combining the merits of sequential RecSys and the idea of universal continuous ID space , our ZESREC successfully enables recommendation in an extreme cold-start setting , i.e. , the zero-shot setting where all users and items in the target domain are unseen during training . Essentially ZESREC tries to learn transferable user behavioral patterns in a universal continuous embedding space . For example , in the source domain , ZESREC can learn that if users purchase snacks or drinks ( e.g. , ‘ Vita Coconut Water ’ with a lemonade flavor ) that they like , they may purchase similar snacks or drinks with different flavors ( e.g. , ‘ Vita Coconut Water ’ with a pineapple flavor ) , as shown in the case study . Later in the target domain , if one user purchase ‘ V8 Splash ’ with a tropical flavor , ZESREC can recommend ‘ V8 Splash ’ with a berry flavor to the user ( see Fig . 4 of Sec . 4.6 for details ) . Such generalization is possible due to the use of the NL descriptions as universal identifiers , based on which ZESREC could easily identify similar products of the same brand with different flavors . To summarize our contributions : • We identify the problem of zero-shot recommender systems and propose ZESREC as the first hierarchical Bayesian model for addressing this problem . • We introduce the notion of universal continuous identifiers that makes recommendation in a zero-shot setting possible . • We provide empirical results which show that ZESREC can successfully recommend items in the zero-shot setting . • We conduct case studies demonstrating that ZESREC can learn interpretable user behavioral patterns that can generalize across datasets . 2 RELATED WORK . Deep Learning for RecSys . Deep learning has been prevalent in modern recommender systems [ 29 ; 33 ; 34 ; 19 ; 4 ; 10 ; 32 ] due to its scalability and superior performance . As a pioneer work , [ 29 ] uses restricted Boltzmann machine ( RBM ) to perform collaborative filtering in recommender systems , however the system is a single-layer RBM . Later , [ 34 ] and [ 19 ] build upon Bayesian deep learning to develop hierarchical Bayesian models that tightly integrate content information and user-item rating information , thereby significantly improving recommendation performance . After that , there are also various proposed sequential ( or session-based ) recommender systems [ 12 ; 27 ; 2 ; 18 ; 22 ; 39 ; 14 ; 31 ; 41 ; 25 ] , GRU4Rec [ 12 ] was first proposed to use gated recurrent units ( GRU ) [ 6 ] for recommender systems . Since then , follow-up works such as hierarchical GRU [ 27 ] , temporal convolutional networks ( TCN ) [ 2 ] , and hierarchical RNN ( HRNN ) [ 25 ] have achieved improvement in terms of accuracy by utilizing cross-session information [ 27 ] , causal convolutions [ 2 ] , as well as meta data and control signals [ 25 ] . Another line of work focusing on building self-attention based sequential models such as SASRec [ 14 ] , BERT4Rec [ 31 ] , and S3Rec [ 41 ] . In this paper we build on such sequential RecSys and note that our ZESREC is model agnostic , that is , it is compatible with any sequential RecSys . Cross-Domain and Cold-Start RecSys . There is a rich literature on cross-domain RecSys focusing on training a recommender system in the source domain and deploying it in the target domain where there exist either common users or items [ 40 ; 38 ; 3 ; 16 ] . These works are also related to the problem of recommendation for cold-start users and items , i.e. , users and items with few interactions ( or ratings ) available during training [ 11 ; 20 ; 42 ; 23 ] . There are also works [ 24 ; 9 ] handling cold start on both user and item with meta-learning , however they can not generalize across domains . In summary , prior systems are either ( 1 ) not sufficient to address our zero-shot setting where there are neither common users nor common items in the target domain or ( 2 ) unable to learn user behavior patterns that are transferable across datasets/domains . Therefore , they are not applicable to our problem of zero-shot recommendations . 3 ZERO-SHOT RECOMMENDER SYSTEMS . In this section we introduce our ZESREC which is compatible with any sequential model . Without loss of generality , here we focus on NL descriptions as a possible instantiation of universal identifiers , but note that our method is general enough to use as identifiers other content information such as items ’ images and videos . We leave exploration for other potential modalities to future work . Notation . We focus on the setting of zero-shot recommendation where there are neither overlapping users nor overlapping items between a source domain and a target domain . We assume a set Vs of Js items and a set Us of Is users in the source domain , as well as a set Vt of Jt items and a set Ut of It users in the target domain . We let I = Is + It and J = Js + Jt ; we use j ∈ Vs ∪ Vt to index items and i ∈ Us ∪ Ut to index users . The zero-shot setting dictates that Vs ∩ Vt = ∅ and that Us ∩ Ut = ∅ . We denote the collection of all users ’ interactions as a 3D tensor ( with necessary zero-padding ) R ∈ RI×Nmax×J , where Nmax is the maximum number of interactions among all users . We use the subscript ‘ ∗ ’ to represent the collection of all elements in a certain dimension . Specifically , each user i has a sequence of Ni interactions ( e.g. , purchase history ) with various items denoted as Ri∗∗ = [ Rit∗ ] Nit=1 , where Rit∗ ∈ { 0 , 1 } J is one-hot vector denoting the t-th item user i interacted with . The same user i has different user embeddings at different time t , reflecting dynamics in user interests ; here we denote as uit ∈ RD the latent user vector when user i interacts with the t-th item in her history , and we use U = [ uit ] I , Nmax i=1 , t=1 ∈ RI×Nmax×D ( with necessary zero-padding ) to denote the collection of user latent vectors . We denote as vj ∈ RD the item latent vector and V = [ vj ] J j=1RJ×D as the collection . For simplicity and without loss of generality , in this paper we focus on using NL descriptions ( i.e. , a sequence of words ) to describe items . For item j we denote its NL description as xj , and the number of words as Mj ; similar to V , we let X = [ xj ] Jj=1 . With slight notation overload on t , we denote as R ( s ) and R ( t ) the sub-tensor of R that corresponds to the source and target domains , respectively . Similarly , we also have U ( s ) , U ( t ) , V ( s ) , V ( t ) , X ( s ) , and X ( t ) . Problem Setup . A model is trained using all users ’ interaction sequences from the source domain , i.e. , { Ri∗∗ } i∈Us , and then deployed to recommend items for any user ι ∈ Ut in the target domain , given user ι ’ s previous history Rι∗∗ , which can be empty . In practice we append a dummy item at the beginning of each user session , so that during inference we could conduct recommend even for users without any history by ingesting the dummy item as context to infer the user latent vector . In our zero-shot setting , the model is not allowed to fine-tune or retrain on any data from the target domain . Definition of Zero-shot Learning in RecSys . Our zero-shot setting includes three unique properties : ( 1 ) cold users , ( 2 ) cold items , and ( 3 ) domain gap . It is fundamentally different from previous content-based cold start as the latter setting usually satisfies either ( 1 ) or ( 2 ) , but not often both . | This paper studies "zero shot recommendation" where source and target domain have no overlap in terms of user and items. The paper proposes to use item content features, such as leveraging BERT on descriptions, instead of IDs. Experiments are conducted on two offline datasets. | SP:044eb7985596e0b826f3628855c2fb2913907cc7 |
Zero-Shot Recommender Systems | Performance of recommender systems ( RecSys ) relies heavily on the amount of training data available . This poses a chicken-and-egg problem for early-stage products , whose amount of data , in turn , relies on the performance of their RecSys . In this paper , we explore the possibility of zero-shot learning in RecSys , to enable generalization from an old dataset to an entirely new dataset . We develop an algorithm , dubbed ZEro-Shot Recommenders ( ZESREC ) , that is trained on an old dataset and generalize to a new one where there are neither overlapping users nor overlapping items , a setting that contrasts typical cross-domain RecSys that has either overlapping users or items . Different from previous methods that use categorical item indices ( i.e. , item ID ) , ZESREC uses items ’ generic features , such as natural-language descriptions , product images , and videos , as their continuous indices , and therefore naturally generalizes to any unseen items . In terms of users , ZESREC builds upon recent advances on sequential RecSys to represent users using their interactions with items , thereby generalizing to unseen users as well . We study three pairs of real-world RecSys datasets and demonstrate that ZESREC can successfully enable recommendations in such a zero-shot setting , opening up new opportunities for resolving the chicken-and-egg problem for data-scarce startups or early-stage products . 1 INTRODUCTION . Many large scale e-commerce platforms ( such as Etsy , Overstock , etc . ) and online content platforms ( such as Spotify , Overstock , Disney+ , Netflix , etc ) have such a large inventory of items that showcasing all of them in front of their users is simply not practical . In particular , in the online content category of businesses , it is often seen that users of their service do not have a crisp intent in mind unlike in the retail shopping experience where the users often have a clear intent of purchasing something . The need for personalized recommendations therefore arises from the fact that not only it is impractical to show all the items in the catalogue but often times users of such services need help discovering the next best thing — be it the new and exciting movie or be it a new music album or even a piece of merchandise that they may want to consider for future buying if not immediately . Modern personalized recommendation models of users and items have often relied on the idea of extrapolating preferences from similar users . Different machine learning models define the notion of similarity differently . Classical bi-linear Matrix Factorization ( MF ) approaches model users and items via their identifiers and represent them as vectors in the latent space [ 13 ; 28 ] . Modern deep-learningbased recommender systems [ 34 ; 12 ; 25 ] , which are also used for predicting top-k items given an item , learn the user-to-item propensities from large amounts of training data containing many ( user , item ) tuples , optionally with available item content information ( e.g. , product descriptions ) and user metadata . As machine learning models , the performance of RecSys relies heavily on the amount of training data available . This might be feasible for large e-commerce or content delivery websites such as Overstock and Netflix , but poses a serious chicken-and-egg problem for small startups , whose amount of data , in turn , relies on the performance of their RecSys . On the other hand , zero-shot learning promises some degree of generalization from an old dataset to an entirely new dataset . In this paper , we explore the possibility of zero-shot learning in RecSys . We develop an algorithm , dubbed ZEro-Shot Recommenders ( ZESREC ) , that is trained on an old dataset and generalize to a new one where there are neither overlapping users nor overlapping items , a setting that contrasts typical cross-domain RecSys that has either overlapping users or items [ 40 ; 38 ; 3 ; 16 ] . Naturally , generalization of RecSys to unseen users and unseen items becomes the two major challenges for developing zero-shot RecSys . For the first challenge on unseen users , we build on a rich body of literature on sequential recommendation models [ 12 ; 27 ; 25 ; 14 ; 17 ; 21 ] . These models are built with sequential structure to encode temporal ordering of items in user ’ s item interaction history . Representing users by the items they have consumed in the past allows the model to extrapolate the preference learning to even novel users who the model did not see during training , as long as the items these unseen users have interacted with have been seen during training . However , such deep learning models encode item via its categorical item index , i.e. , the item ID , and therefore fall short in predicting a likely relevant but brand-new item not previously seen during training . This brings us to the second challenge of developing zero-shot recommender systems , i.e. , dealing with unseen items . To address this challenge , ZESREC goes beyond traditional categorical item indices and uses items ’ generic features such as natural-language descriptions , product images , and videos as their continuous indices , thereby naturally generalizing to any unseen items . Take natural-language ( NL ) descriptions as an example . One can think of NL descriptions as a system of universal identifiers that indexes items from arbitrary domains . Therefore as long as one model is trained on a dataset with NL descriptions , it can generalize to a completely different dataset with a similar NL vocabulary . In ZESREC we build on state-of-the-art pretrained NL embedding models such as BERT [ 8 ] to extract NL embeddings from raw NL descriptions , leading to an item ID system in the continuous space that is generalizable across arbitrary domains . For instance , in e-commerce platform , one could use items ’ description text ; and similarly in the online content platforms , one could use movie synopsis or music track descriptions to represent an item . Combining the merits of sequential RecSys and the idea of universal continuous ID space , our ZESREC successfully enables recommendation in an extreme cold-start setting , i.e. , the zero-shot setting where all users and items in the target domain are unseen during training . Essentially ZESREC tries to learn transferable user behavioral patterns in a universal continuous embedding space . For example , in the source domain , ZESREC can learn that if users purchase snacks or drinks ( e.g. , ‘ Vita Coconut Water ’ with a lemonade flavor ) that they like , they may purchase similar snacks or drinks with different flavors ( e.g. , ‘ Vita Coconut Water ’ with a pineapple flavor ) , as shown in the case study . Later in the target domain , if one user purchase ‘ V8 Splash ’ with a tropical flavor , ZESREC can recommend ‘ V8 Splash ’ with a berry flavor to the user ( see Fig . 4 of Sec . 4.6 for details ) . Such generalization is possible due to the use of the NL descriptions as universal identifiers , based on which ZESREC could easily identify similar products of the same brand with different flavors . To summarize our contributions : • We identify the problem of zero-shot recommender systems and propose ZESREC as the first hierarchical Bayesian model for addressing this problem . • We introduce the notion of universal continuous identifiers that makes recommendation in a zero-shot setting possible . • We provide empirical results which show that ZESREC can successfully recommend items in the zero-shot setting . • We conduct case studies demonstrating that ZESREC can learn interpretable user behavioral patterns that can generalize across datasets . 2 RELATED WORK . Deep Learning for RecSys . Deep learning has been prevalent in modern recommender systems [ 29 ; 33 ; 34 ; 19 ; 4 ; 10 ; 32 ] due to its scalability and superior performance . As a pioneer work , [ 29 ] uses restricted Boltzmann machine ( RBM ) to perform collaborative filtering in recommender systems , however the system is a single-layer RBM . Later , [ 34 ] and [ 19 ] build upon Bayesian deep learning to develop hierarchical Bayesian models that tightly integrate content information and user-item rating information , thereby significantly improving recommendation performance . After that , there are also various proposed sequential ( or session-based ) recommender systems [ 12 ; 27 ; 2 ; 18 ; 22 ; 39 ; 14 ; 31 ; 41 ; 25 ] , GRU4Rec [ 12 ] was first proposed to use gated recurrent units ( GRU ) [ 6 ] for recommender systems . Since then , follow-up works such as hierarchical GRU [ 27 ] , temporal convolutional networks ( TCN ) [ 2 ] , and hierarchical RNN ( HRNN ) [ 25 ] have achieved improvement in terms of accuracy by utilizing cross-session information [ 27 ] , causal convolutions [ 2 ] , as well as meta data and control signals [ 25 ] . Another line of work focusing on building self-attention based sequential models such as SASRec [ 14 ] , BERT4Rec [ 31 ] , and S3Rec [ 41 ] . In this paper we build on such sequential RecSys and note that our ZESREC is model agnostic , that is , it is compatible with any sequential RecSys . Cross-Domain and Cold-Start RecSys . There is a rich literature on cross-domain RecSys focusing on training a recommender system in the source domain and deploying it in the target domain where there exist either common users or items [ 40 ; 38 ; 3 ; 16 ] . These works are also related to the problem of recommendation for cold-start users and items , i.e. , users and items with few interactions ( or ratings ) available during training [ 11 ; 20 ; 42 ; 23 ] . There are also works [ 24 ; 9 ] handling cold start on both user and item with meta-learning , however they can not generalize across domains . In summary , prior systems are either ( 1 ) not sufficient to address our zero-shot setting where there are neither common users nor common items in the target domain or ( 2 ) unable to learn user behavior patterns that are transferable across datasets/domains . Therefore , they are not applicable to our problem of zero-shot recommendations . 3 ZERO-SHOT RECOMMENDER SYSTEMS . In this section we introduce our ZESREC which is compatible with any sequential model . Without loss of generality , here we focus on NL descriptions as a possible instantiation of universal identifiers , but note that our method is general enough to use as identifiers other content information such as items ’ images and videos . We leave exploration for other potential modalities to future work . Notation . We focus on the setting of zero-shot recommendation where there are neither overlapping users nor overlapping items between a source domain and a target domain . We assume a set Vs of Js items and a set Us of Is users in the source domain , as well as a set Vt of Jt items and a set Ut of It users in the target domain . We let I = Is + It and J = Js + Jt ; we use j ∈ Vs ∪ Vt to index items and i ∈ Us ∪ Ut to index users . The zero-shot setting dictates that Vs ∩ Vt = ∅ and that Us ∩ Ut = ∅ . We denote the collection of all users ’ interactions as a 3D tensor ( with necessary zero-padding ) R ∈ RI×Nmax×J , where Nmax is the maximum number of interactions among all users . We use the subscript ‘ ∗ ’ to represent the collection of all elements in a certain dimension . Specifically , each user i has a sequence of Ni interactions ( e.g. , purchase history ) with various items denoted as Ri∗∗ = [ Rit∗ ] Nit=1 , where Rit∗ ∈ { 0 , 1 } J is one-hot vector denoting the t-th item user i interacted with . The same user i has different user embeddings at different time t , reflecting dynamics in user interests ; here we denote as uit ∈ RD the latent user vector when user i interacts with the t-th item in her history , and we use U = [ uit ] I , Nmax i=1 , t=1 ∈ RI×Nmax×D ( with necessary zero-padding ) to denote the collection of user latent vectors . We denote as vj ∈ RD the item latent vector and V = [ vj ] J j=1RJ×D as the collection . For simplicity and without loss of generality , in this paper we focus on using NL descriptions ( i.e. , a sequence of words ) to describe items . For item j we denote its NL description as xj , and the number of words as Mj ; similar to V , we let X = [ xj ] Jj=1 . With slight notation overload on t , we denote as R ( s ) and R ( t ) the sub-tensor of R that corresponds to the source and target domains , respectively . Similarly , we also have U ( s ) , U ( t ) , V ( s ) , V ( t ) , X ( s ) , and X ( t ) . Problem Setup . A model is trained using all users ’ interaction sequences from the source domain , i.e. , { Ri∗∗ } i∈Us , and then deployed to recommend items for any user ι ∈ Ut in the target domain , given user ι ’ s previous history Rι∗∗ , which can be empty . In practice we append a dummy item at the beginning of each user session , so that during inference we could conduct recommend even for users without any history by ingesting the dummy item as context to infer the user latent vector . In our zero-shot setting , the model is not allowed to fine-tune or retrain on any data from the target domain . Definition of Zero-shot Learning in RecSys . Our zero-shot setting includes three unique properties : ( 1 ) cold users , ( 2 ) cold items , and ( 3 ) domain gap . It is fundamentally different from previous content-based cold start as the latter setting usually satisfies either ( 1 ) or ( 2 ) , but not often both . | A great recommender system relies on great training set. However, at the beginning, there is no such data availability. This paper tries to solve the zero-shot recommendation problem where there is no user or item overlaps. The two challenges are generalize to unseen users and to unseen items. For unseens users, sequential recommendation represents users as a sequence of their interacted items. As long as the items are seen before, the users can be represented. As for items, the unique ids are not useful. However, the attributes such as natural language description can be universal. This paper proposed an approach based on hierarchical Bayesian model. The item universal embedding is using pre-trained BERT network with a single layer neural network. Extensive experiments are carried out to demonstrate the effectiveness of the proposed approach. | SP:044eb7985596e0b826f3628855c2fb2913907cc7 |
AA-PINN: ATTENTION AUGMENTED PHYSICS INFORMED NEURAL NETWORKS | 1 INTRODUCTION . Computational Fluid Dynamics ( CFD ) has become the core technology behind almost every fluid simulation . Fluid mechanics has been traditionally concerned with big data , thus making deep learning an obvious choice in modelling the inherent complexity of the problem . Neural Networks of late has been quite successful in understanding , predicting , optimizing , and controlling fluid flows . Neural Network has proven to improve optimization performance and reduce convergence time drastically . Neural network is also used for turbulence modelling and identifying low and high dimensional flow regimes . Deep learning algorithms are able to take into account inherent complexity of the problem thus optimizing for the performance , robustness or convergence for complex tasks . Understanding the physics behind fluid flows is a complex problem which can be solved using neural networks by feeding lots of training data . It helps in providing a general purpose framework for interpretability , generalizability and explainability of the results achieved . 2 RELATED WORK . Neural network to solve Reynolds Averaged Navier Stokes Equation was proposed by ( Ling et al. , 2016 ) . The Reynolds stress term was modelled using DNS equation by ( Wang et al. , 2017 ) . Neural network was used to model turbulent flows using Large Eddy simulation ( Zhou et al. , 2019 ) . A convolutional neural network was used to model the velocity field over a cylinder ( Jin et al. , 2018 ) . ( Wu et al. , 2020 ) proposed a similar CNN based method to model the unsteady flow in arbitrary fluid regimes . A thorough study of data driven methods using machine learning approaches for modelling the turbulence was studied by ( Duraisamy et al. , 2019 ) . ( Brunton et al. , 2020 ) also did a comprehensive study of machine learning approaches for modelling different kind of problems in fluid mechanics . ( Raissi et al. , 2017 ) proposed physics informed neural networks for solving nonlinear partial differential equations using neural network . This work was further improved in ( Raissi et al. , 2019 ) . The theoretical exact solution of the 3d Navier Stokes equation was shown by ( Ethier and Steinman , 1994 ) . Deep feedforward neural networks was used ( Lui and Wolf , 2019 ) for modelling complex flow regimes . CNN were used for making faster fluid simulation ( Tompson et al. , 2017 ) . A novel neural network was proposed for solving the function approximation and inverse PDE problems ( Meng and Karniadakis , 2020 ) . ( Khoo et al. , 2021 ) used neural network for solving parametric PDEs . ( Meng et al. , 2020 ) proposed a neural network for solving unsteady PDEs . Bayesian neural network was used to quantify the uncertainty while solving PDEs ( Yang et al. , 2021 ) . Data driven approaches for solving PDEs was proposed by ( Long et al. , 2018 ) and ( Long et al. , 2019 ) . c ( Sirignano et al. , 2020 ) used neural network for solving PDEs in the context of large-eddy simulation . ( Bar and Sochen , 2019 ) was one of the first works to use unsupervised learning for solving PDEs . ( Thuerey et al. , 2020 ) proposed a deep learning approach for solving Reynolds-averaged NavierStokes equation around airfoils . Another approach for solving PDEs using deep learning was used ( Miyanawala and Jaiman , 2017 ) in the context of unsteady wake flow dynamics . A comprehensive study of deep learning approaches for modelling and solving fluid mechanics problem was done by ( Kutz , 2017 ) . ( Ranade et al. , 2021 ) proposed a deep learning based solver for Navier–Stokes equations using finite volume discretization . Neural networks was used for solving incompressible Navier-Stokes equations ( Jin et al. , 2021 ) . A method for predicting turbulent flows using deep learning was proposed by ( Wang et al. , 2020 ) . Our main contributions can be summarized as : • A novel network architecture combining channel and spatial attention mechanism is used for modelling the inherent complexity in fluid flow problems . • We train and test our network using a more robust loss function for solve PDEs behind incompressible Navier Stokes and Burgers Equation . • Our network achieves better results than previous PINNs using commonly used evaluation metrics while still running at good enough speed . 3 BACKGROUND . 3.1 NAVIER STOKES EQUATION . The incompressible transient two dimensional Navier-Stokes equations for mass and momentum conservation are written as defined in the below set of equations : ∇ · u = 0 ( 1 ) ux ∂ux ∂x + uy ∂ux ∂y = −1 ρ ∂p ∂x + ν∇2ux + gx ( 2 ) ux ∂uy ∂x + uy ∂uy ∂y = −1 ρ ∂p ∂y + ν∇2uy + gy ( 3 ) in which u is the velocity field ( with x and y components for 2 dimensional flows ) . Here g represents the gravitational acceleration and µ the dynamic viscosity of the fluid . 3.2 MOMENTUM EQUATIONS . When the difference operators are expanded using uniform grid spacing h and time step k results in : ui , j − kν h2 ( ui−1 , j + ui , j−1 − 4ui , j +ui , j+1 + ui+1 , j ) + k h ( ūni+1 , j ūi+1 , j − ūni , j ūi , j ) + k h ( v̄ni , j ũi , j − v̄ni , j−1ũi , j−1 ) = uni , j − k h ( pi+1 , j − pi , j ) ( 4 ) Where variables without superscripts denote advanced time level results to be computed . Using the formulas of the averages and collecting the terms results in equation below : −A1ui−1 , j −A2ui , j−1 +A3ui , j −A4ui , j+1 −A5ui+1 , j = bi , j − k h ( pi+1 , j − pi , j ) ( 5 ) The various coefficients in the above equation are given using the set of equations as follows : A1 = k h ( ν h + 1 2 ūni , j ) ( 6 ) A2 = k h ( ν h + 1 2 v̄ni , j−1 ) ( 7 ) A3 = 1 + 4 kν h2 + k 2h ( ūni+1 , j − ūni , j + v̄ni , j − v̄ni , j−1 ) ( 8 ) A4 = k h ( ν h − 1 2 v̄ni , j ) ( 9 ) A5 = k h ( ν h − 1 2 ūni+1 , j ) ( 10 ) It is to be noted that in the continuous equations , we ignored effects of correction quantities in advective and diffusive terms . The u-component velocity correction can be written in the form as defined in Equation below : u′i , j = k A3h ( p′i , j − p′i+1 , j ) ( 11 ) We now present analogous results for the y-momentum equation . The v-component velocity correction can be written in the form as defined in Equation below : v′i , j = k B3h ( p′i , j − p′i , j+1 ) ( 12 ) 3.3 PRESSURE POISSON EQUATION . By substituting the velocity corrections into the discrete continuity equation for grid cell ( i , j ) results in : ui , j − ui−1 , j hx + vi , j − vi , j−1 hy = 0 ( 13 ) After substituting the decomposed velocity components , the above equation can be written as : ( u∗ + u′ ) i , j − ( u∗ + u′ ) i−1 , j hx + ( v∗ + v′ ) i , j − ( v∗ + v′ ) i , j−1 hy = 0 ( 14 ) For simplicitiy , we set hx = hy = h , and rewrite this as : − 1 A3 , i−1 , j p′i−1 , j − 1 B3 , i , j−1 p′i , j−1 + ( 1 A3 , i , j + 1 A3 , i−1 , j + 1 B3 , i , j + 1 B3 , i , j−1 ) p′i , j − 1 B3 , i , j p′i , j+1 − 1 A3 , i , j p′i+1 , j = − h2 k D∗i , j ( 15 ) It can alternatively written in a more compact form similar to that used for the momentum equations : C1p ′ i−1 , j + C2p ′ i , j−1 + C3p ′ i , j + C4p ′ i , j+1 + C5p ′ i+1 , j = d ∗ i , j ( 16 ) The various coefficients in the above equation is defined as follows : C1 ≡ 1A3 , i−1 , j , C2 ≡ 1 B3 , i , j−1 , C3 ≡ − ( 1 A3 , i , j + 1A3 , i−1 , j + 1 B3 , i , j + 1B3 , i , j−1 ) C4 ≡ 1B3 , i , j , C5 ≡ 1 A3 , i , j , d∗i , j ≡ h 2 k D ∗ i , j ( 17 ) 3.4 BURGER ’ S EQUATION . In one space dimension , the Burger ’ s equation along with Dirichlet boundary conditions is defined using the below set of equations : ut + uux − ( 0.01/π ) uxx = 0 , x ∈ [ −1 , 1 ] , t ∈ [ 0 , 1 ] u ( 0 , x ) = − sin ( πx ) u ( t , −1 ) = u ( t , 1 ) = 0 ( 18 ) Here , tiu , x i u , ui Nu i=1 denotes the initial and boundary training data on u ( t , x ) and t i f , x i f Nf i=1 denotes the collocations points for f ( t , x ) . The loss MSEu corresponds to the initial and boundary data while MSEf enforces the structure used by equation at a finite set of collocation points . 4 METHOD . 4.1 SPATIAL ATTENTION MODULE . The spatial attention module is used for capturing the spatial dependencies of the feature maps . The spatial attention ( SA ) module used in our network is defined below : fSA ( x ) = fsigmoid ( W2 ( fReLU ( W1 ( x ) ) ) ) ( 19 ) where W1 and W2 denotes the first and second 1× 1 convolution layer respectively , x denotes the input data , fSigmoid denotes the sigmoid function , fReLU denotes the ReLu activation function . The spatial attention module used in this work is shown in Figure 1 : 4.2 CHANNEL ATTENTION MODULE . The channel attention module is used for extracting high level multi-scale semantic information . The channel attention ( CA ) module used in our network is defined below : fCA ( x ) = fsigmoid ( W2 ( fReLU ( W1f 1 AvgPool ( x ) ) ) ) ( 20 ) where W1 and W2 denotes the first and second 1 × 1 convolution layer , x denotes the input data . f1AvgPool denotes the global average pooling function , fSigmoid denotes the Sigmoid function , fReLU denotes ReLU activation function . The channel attention module used in this work is shown in Figure 2 : 4.3 NETWORK ARCHITECTURE . We use deep convolutional neural network in this work . The input is the spatial and temporal coordinates of the points in the fluid flow domain . This information is propagated to three Residual blocks sequentially . In between the blocks , channel attention module is used to weight the usefulness of important features and spatial attention module is used for modelling the inter-spatial relationship of features . Fusion operator is used to merge the individual features . The output is the spatio-temporal pressure and velocity fields predicted . The complete network architecture used in this work is shown in Figure 3 : | This manuscript introduces the attention module into the framework of physics-informed neural networks. The contributions are: (1) proposing a network architecture that marries the popular attention mechanism to physics-informed neural networks. (2) separating the large attention module by operating on the channel and spatial dimensions individually. The authors empirically studied the efficacy of this architecture on PDEs including Navier-Stokes fluid simulation and Burgers equation. | SP:4821cbd324cb4e3eb2a62c6d39d6c30d184d88b6 |
AA-PINN: ATTENTION AUGMENTED PHYSICS INFORMED NEURAL NETWORKS | 1 INTRODUCTION . Computational Fluid Dynamics ( CFD ) has become the core technology behind almost every fluid simulation . Fluid mechanics has been traditionally concerned with big data , thus making deep learning an obvious choice in modelling the inherent complexity of the problem . Neural Networks of late has been quite successful in understanding , predicting , optimizing , and controlling fluid flows . Neural Network has proven to improve optimization performance and reduce convergence time drastically . Neural network is also used for turbulence modelling and identifying low and high dimensional flow regimes . Deep learning algorithms are able to take into account inherent complexity of the problem thus optimizing for the performance , robustness or convergence for complex tasks . Understanding the physics behind fluid flows is a complex problem which can be solved using neural networks by feeding lots of training data . It helps in providing a general purpose framework for interpretability , generalizability and explainability of the results achieved . 2 RELATED WORK . Neural network to solve Reynolds Averaged Navier Stokes Equation was proposed by ( Ling et al. , 2016 ) . The Reynolds stress term was modelled using DNS equation by ( Wang et al. , 2017 ) . Neural network was used to model turbulent flows using Large Eddy simulation ( Zhou et al. , 2019 ) . A convolutional neural network was used to model the velocity field over a cylinder ( Jin et al. , 2018 ) . ( Wu et al. , 2020 ) proposed a similar CNN based method to model the unsteady flow in arbitrary fluid regimes . A thorough study of data driven methods using machine learning approaches for modelling the turbulence was studied by ( Duraisamy et al. , 2019 ) . ( Brunton et al. , 2020 ) also did a comprehensive study of machine learning approaches for modelling different kind of problems in fluid mechanics . ( Raissi et al. , 2017 ) proposed physics informed neural networks for solving nonlinear partial differential equations using neural network . This work was further improved in ( Raissi et al. , 2019 ) . The theoretical exact solution of the 3d Navier Stokes equation was shown by ( Ethier and Steinman , 1994 ) . Deep feedforward neural networks was used ( Lui and Wolf , 2019 ) for modelling complex flow regimes . CNN were used for making faster fluid simulation ( Tompson et al. , 2017 ) . A novel neural network was proposed for solving the function approximation and inverse PDE problems ( Meng and Karniadakis , 2020 ) . ( Khoo et al. , 2021 ) used neural network for solving parametric PDEs . ( Meng et al. , 2020 ) proposed a neural network for solving unsteady PDEs . Bayesian neural network was used to quantify the uncertainty while solving PDEs ( Yang et al. , 2021 ) . Data driven approaches for solving PDEs was proposed by ( Long et al. , 2018 ) and ( Long et al. , 2019 ) . c ( Sirignano et al. , 2020 ) used neural network for solving PDEs in the context of large-eddy simulation . ( Bar and Sochen , 2019 ) was one of the first works to use unsupervised learning for solving PDEs . ( Thuerey et al. , 2020 ) proposed a deep learning approach for solving Reynolds-averaged NavierStokes equation around airfoils . Another approach for solving PDEs using deep learning was used ( Miyanawala and Jaiman , 2017 ) in the context of unsteady wake flow dynamics . A comprehensive study of deep learning approaches for modelling and solving fluid mechanics problem was done by ( Kutz , 2017 ) . ( Ranade et al. , 2021 ) proposed a deep learning based solver for Navier–Stokes equations using finite volume discretization . Neural networks was used for solving incompressible Navier-Stokes equations ( Jin et al. , 2021 ) . A method for predicting turbulent flows using deep learning was proposed by ( Wang et al. , 2020 ) . Our main contributions can be summarized as : • A novel network architecture combining channel and spatial attention mechanism is used for modelling the inherent complexity in fluid flow problems . • We train and test our network using a more robust loss function for solve PDEs behind incompressible Navier Stokes and Burgers Equation . • Our network achieves better results than previous PINNs using commonly used evaluation metrics while still running at good enough speed . 3 BACKGROUND . 3.1 NAVIER STOKES EQUATION . The incompressible transient two dimensional Navier-Stokes equations for mass and momentum conservation are written as defined in the below set of equations : ∇ · u = 0 ( 1 ) ux ∂ux ∂x + uy ∂ux ∂y = −1 ρ ∂p ∂x + ν∇2ux + gx ( 2 ) ux ∂uy ∂x + uy ∂uy ∂y = −1 ρ ∂p ∂y + ν∇2uy + gy ( 3 ) in which u is the velocity field ( with x and y components for 2 dimensional flows ) . Here g represents the gravitational acceleration and µ the dynamic viscosity of the fluid . 3.2 MOMENTUM EQUATIONS . When the difference operators are expanded using uniform grid spacing h and time step k results in : ui , j − kν h2 ( ui−1 , j + ui , j−1 − 4ui , j +ui , j+1 + ui+1 , j ) + k h ( ūni+1 , j ūi+1 , j − ūni , j ūi , j ) + k h ( v̄ni , j ũi , j − v̄ni , j−1ũi , j−1 ) = uni , j − k h ( pi+1 , j − pi , j ) ( 4 ) Where variables without superscripts denote advanced time level results to be computed . Using the formulas of the averages and collecting the terms results in equation below : −A1ui−1 , j −A2ui , j−1 +A3ui , j −A4ui , j+1 −A5ui+1 , j = bi , j − k h ( pi+1 , j − pi , j ) ( 5 ) The various coefficients in the above equation are given using the set of equations as follows : A1 = k h ( ν h + 1 2 ūni , j ) ( 6 ) A2 = k h ( ν h + 1 2 v̄ni , j−1 ) ( 7 ) A3 = 1 + 4 kν h2 + k 2h ( ūni+1 , j − ūni , j + v̄ni , j − v̄ni , j−1 ) ( 8 ) A4 = k h ( ν h − 1 2 v̄ni , j ) ( 9 ) A5 = k h ( ν h − 1 2 ūni+1 , j ) ( 10 ) It is to be noted that in the continuous equations , we ignored effects of correction quantities in advective and diffusive terms . The u-component velocity correction can be written in the form as defined in Equation below : u′i , j = k A3h ( p′i , j − p′i+1 , j ) ( 11 ) We now present analogous results for the y-momentum equation . The v-component velocity correction can be written in the form as defined in Equation below : v′i , j = k B3h ( p′i , j − p′i , j+1 ) ( 12 ) 3.3 PRESSURE POISSON EQUATION . By substituting the velocity corrections into the discrete continuity equation for grid cell ( i , j ) results in : ui , j − ui−1 , j hx + vi , j − vi , j−1 hy = 0 ( 13 ) After substituting the decomposed velocity components , the above equation can be written as : ( u∗ + u′ ) i , j − ( u∗ + u′ ) i−1 , j hx + ( v∗ + v′ ) i , j − ( v∗ + v′ ) i , j−1 hy = 0 ( 14 ) For simplicitiy , we set hx = hy = h , and rewrite this as : − 1 A3 , i−1 , j p′i−1 , j − 1 B3 , i , j−1 p′i , j−1 + ( 1 A3 , i , j + 1 A3 , i−1 , j + 1 B3 , i , j + 1 B3 , i , j−1 ) p′i , j − 1 B3 , i , j p′i , j+1 − 1 A3 , i , j p′i+1 , j = − h2 k D∗i , j ( 15 ) It can alternatively written in a more compact form similar to that used for the momentum equations : C1p ′ i−1 , j + C2p ′ i , j−1 + C3p ′ i , j + C4p ′ i , j+1 + C5p ′ i+1 , j = d ∗ i , j ( 16 ) The various coefficients in the above equation is defined as follows : C1 ≡ 1A3 , i−1 , j , C2 ≡ 1 B3 , i , j−1 , C3 ≡ − ( 1 A3 , i , j + 1A3 , i−1 , j + 1 B3 , i , j + 1B3 , i , j−1 ) C4 ≡ 1B3 , i , j , C5 ≡ 1 A3 , i , j , d∗i , j ≡ h 2 k D ∗ i , j ( 17 ) 3.4 BURGER ’ S EQUATION . In one space dimension , the Burger ’ s equation along with Dirichlet boundary conditions is defined using the below set of equations : ut + uux − ( 0.01/π ) uxx = 0 , x ∈ [ −1 , 1 ] , t ∈ [ 0 , 1 ] u ( 0 , x ) = − sin ( πx ) u ( t , −1 ) = u ( t , 1 ) = 0 ( 18 ) Here , tiu , x i u , ui Nu i=1 denotes the initial and boundary training data on u ( t , x ) and t i f , x i f Nf i=1 denotes the collocations points for f ( t , x ) . The loss MSEu corresponds to the initial and boundary data while MSEf enforces the structure used by equation at a finite set of collocation points . 4 METHOD . 4.1 SPATIAL ATTENTION MODULE . The spatial attention module is used for capturing the spatial dependencies of the feature maps . The spatial attention ( SA ) module used in our network is defined below : fSA ( x ) = fsigmoid ( W2 ( fReLU ( W1 ( x ) ) ) ) ( 19 ) where W1 and W2 denotes the first and second 1× 1 convolution layer respectively , x denotes the input data , fSigmoid denotes the sigmoid function , fReLU denotes the ReLu activation function . The spatial attention module used in this work is shown in Figure 1 : 4.2 CHANNEL ATTENTION MODULE . The channel attention module is used for extracting high level multi-scale semantic information . The channel attention ( CA ) module used in our network is defined below : fCA ( x ) = fsigmoid ( W2 ( fReLU ( W1f 1 AvgPool ( x ) ) ) ) ( 20 ) where W1 and W2 denotes the first and second 1 × 1 convolution layer , x denotes the input data . f1AvgPool denotes the global average pooling function , fSigmoid denotes the Sigmoid function , fReLU denotes ReLU activation function . The channel attention module used in this work is shown in Figure 2 : 4.3 NETWORK ARCHITECTURE . We use deep convolutional neural network in this work . The input is the spatial and temporal coordinates of the points in the fluid flow domain . This information is propagated to three Residual blocks sequentially . In between the blocks , channel attention module is used to weight the usefulness of important features and spatial attention module is used for modelling the inter-spatial relationship of features . Fusion operator is used to merge the individual features . The output is the spatio-temporal pressure and velocity fields predicted . The complete network architecture used in this work is shown in Figure 3 : | The authors propose a new architecture and loss function for training physics-informed neural networks (PINNs) on fluid flow problems. The idea is centered around augmenting a basic residual network with two additional attention blocks that are placed before and after residual blocks. These two new blocks aim to introduce channel and spatial attention into the model. In addition, they propose a new loss function that is tailored to solving PDEs such as Navier Stokes and Burgers Equation. | SP:4821cbd324cb4e3eb2a62c6d39d6c30d184d88b6 |
Where do Models go Wrong? Parameter-Space Saliency Maps for Explainability | 1 INTRODUCTION . With the widespread deployment of deep neural networks in high-stakes applications such as medical imaging ( Kang et al. , 2017 ) , credit score assessment ( West , 2000 ) , and facial recognition ( Deng et al. , 2019 ) , practitioners need to understand why their models make the decisions they do . In fact , “ right to explanation ” legislation in the European Union and the United States dictates that relevant public and private organizations must be able to justify the decisions their algorithms make ( United States Congress Senate Committee on Banking and Housing and Urban Affairs , 1976 ; European Commission , 2018 ) . Diagnosing the causes of system failures is particularly crucial for understanding the flaws and limitations of models we intend to employ . Conventional saliency methods focus on highlighting sensitive pixels ( Simonyan et al. , 2014 ) or image regions that maximize specific activations ( Erhan et al. , 2009 ) . However , such maps may not be useful in diagnosing undesirable model behaviors as they do not necessarily identify areas that specifically cause bad performance since the most sensitive pixels may not be the ones responsible for triggering misclassification . We develop an alternative approach to saliency which highlights network parameters that influence decisions rather than input features . These parameter saliency maps yield a number of useful analyses : • Nearest neighbors in parameter saliency space share common semantic information . That is , samples which are misclassified for similar reasons and cause similar parameters to malfunction are semantically similar . • By first identifying the network parameters responsible for an erroneous classification , we can then visualize the image regions that interact with those parameters and trigger the identified misbehavior . • We verify that identified salient parameters are indeed responsible for misclassification by showing that turning these parameters off improves predictions on the associated samples , more than pruning the same number of random or least salient parameters . • We further validate the link between salient parameters and network misclassification errors by observing that fine-tuning a small number of the most salient parameters on a single sample results in error correction on other samples which were misclassified for similar reasons . After carefully delineating our methodology and experimentally validating the meaningfulness of our parameter saliency maps , we showcase the practical utility of this paradigm as an explainability tool with a case study in which we are able to uncover a neural network ’ s reliance on a spurious correlation which causes interpretable failures . 1.1 RELATED WORK . Neural network interpretability and parameter importance . A major line of work in neural network interpretability focuses on convolutional neural networks . Works visualizing , interpreting , and analysing feature maps ( Zeiler & Fergus , 2014 ; Yosinski et al. , 2015 ; Olah et al. , 2017 ; Mahendran & Vedaldi , 2015 ) provide insight into the role of individual convolutional filters . These methods , together with other approaches for filter explainability ( Bau et al. , 2017 ; Zhou et al. , 2018 ; 2019 ) find that individual convolutional filters often are responsible for specific tasks such as edge , shape , and texture detection . The idea of measuring neural network parameter importance has been studied in multiple contexts . Notions of neuron and parameter importance have been used for AI explainability ( Srinivas & Fleuret , 2019 ; Selvaraju et al. , 2017 ; Morcos et al. , 2018 ; Shrikumar et al. , 2017 ; Shrikumar et al . ) , manipulating model behavior ( Bau et al. , 2018 ) , and parameter pruning ( Abbasi-Asl & Yu , 2017 ; Liu & Wu , 2019 ) . Input space saliency maps . A considerable amount of literature focuses on identifying input features that are important for neural network decisions . These methods include using deconvolution approaches ( Zeiler & Fergus , 2014 ) and data gradient information ( Simonyan et al. , 2014 ) . Several works build on these ideas and propose improvements such as Integrated Gradients ( Sundararajan et al. , 2017 ) , SmoothGrad ( Smilkov et al. , 2017 ) , and Guided Backpropagation ( Springenberg et al. , 2015 ) which result in sharper and more localized saliency maps . Other approaches focus on the use of class activation maps ( Zhou et al. , 2016 ) with improvements incorporating gradient information ( Selvaraju et al. , 2017 ) and more novel approaches to weighting the activation maps ( Wang et al. , 2020 ) . In addition , various saliency methods are based on manipulating the input image ( Fong & Vedaldi , 2017 ; Zeiler & Fergus , 2014 ) . Another line of work is aimed at evaluating the effectiveness of saliency maps ( Adebayo et al. , 2018 ; Alqaraawi et al. , 2020 ) . Although extensive work studies how different regions of images affect a network ’ s predictions , limited work ( Srinivas & Fleuret , 2019 ) aims to distinguish important network parameters . Our work combines the ideas of saliency maps and parameter importance and evaluates saliency directly on model parameters by aggregating their absolute gradients on a filter level . We leverage the resulting parameter saliency profiles as an explainability tool and develop an input-space saliency counterpart which highlights image features that cause specific filters to malfunction to study the interaction between the image features and the erroneous filters . 2 METHOD . It is known that different network filters are responsible for identifying different image properties and objects ( Zeiler & Fergus , 2014 ; Yosinski et al. , 2015 ; Olah et al. , 2017 ; Mahendran & Vedaldi , 2015 ) . This motivates the idea that mistakes made on wrongly classified images can be understood by investigating the network parameters , rather than only the pixels , that played a role in making a decision . We develop parameter-space saliency methods geared towards identifying and analyzing neural network parameters that are responsible for making erroneous decisions . Central to our method is the use of gradient information of the loss function as a measure of parameter sensitivity and optimality of the network at a given point in image space . 2.1 PARAMETER SALIENCY PROFILE . Let x be a sample in the validation set D with label y , and suppose a trained classifier has parameters θ that minimize a loss function L. We define the parameter-wise saliency profile of x as a vector s ( x , y ) with entries s ( x , y ) i : = |∇θiLθ ( x , y ) | , the magnitudes of the gradient of the loss with respect to each model parameter . Because the gradients on training data for a model trained to convergence are near zero , it is important to specify that D be a validation , or holdout , set . Intuitively , a larger gradient norm at the point ( x , y ) indicates a greater inefficiency in the network ’ s classification of sample x , and thus each entry of s ( x , y ) measures the suboptimality of individual parameters . Aggregation of parameter saliency . Convolutional filters are known to specialize in tasks such as edge , shape , and texture detection ( Yosinski et al. , 2015 ; Bau et al. , 2017 ; Olah et al. , 2017 ) . We therefore choose to aggregate saliency on the filter-wise basis by averaging the gradient magnitudes of parameters corresponding to each convolutional filter . This allows us to isolate filters to which the loss is most sensitive ( i.e . those which , when corrected , lead to the greatest reduction in loss ) . Formally , for each convolutional filter Fk in the network , consider its respective index set αk , which gives the indices of parameters corresponding to the filter Fk . The filter-wise saliency profile of x is defined to be a vector s ( x , y ) with entries s ( x , y ) k : = 1 |αk| ∑ i∈αk s ( x , y ) i , ( 1 ) the parameter-wise saliency profile aggregated by averaging on the filter level . Standardizing parameter saliency . Figure 1 exhibits the ResNet-50 ( He et al. , 2016 ) filter-wise saliency profile averaged over the ImageNet ( Deng et al. , 2009 ) validation set , where filters within each layer are sorted from highest to lowest saliency . One clear observation is the difference in the scale of gradient magnitudes – shallower filters are more salient than deeper filters . This phenomenon might occur for a number of reasons . First , early filters encode low-level features , such as edges and textures , which are active across a wide spectrum of images . Second , typical networks have fewer filters in shallow layers than in deep layers , making each individual filter more influential at shallower layers . Third , the effects of early filters cascade and accumulate as they pass through a network . To isolate filters that uniquely cause erroneous behavior on particular samples , we find filters that are abnormally salient for a sample , x , but not for others . That is , we further standardize the saliency profile of x with respect to all filter-wise saliency profiles of D. Formally , let µ be the average filter-wise saliency profile across all x ∈ D , and let σ be an equallength vector with the corresponding standard deviation for each entry . We use these statistics to produce the standardized filter-wise saliency profile as follows : ŝ ( x , y ) : = |s ( x , y ) − µ| σ . ( 2 ) The resulting tensor ŝ ( x , y ) is of length equal to the number of convolutional filters in the network , and we henceforth call it the saliency profile for sample x . By standardizing saliency profiles , we create a saliency map that activates when the importance of a filter is unusually strong relative to other samples in the dataset . This prevents the saliency map from highlighting filters that are uniformly important for all images , and instead focuses saliency on filters that are uniquely important and serve an image-dependent role . In the rest of the paper , unless explicitly noted otherwise , we use ŝ ( x , y ) and refer to it as parameter saliency . Incorrectly classified samples are more salient . Empirically , we observe the saliency profiles of incorrectly classified samples exhibit , on average , greater values than those of correctly classified examples . This bolsters the intuition that salient filters are precisely those malfunctioning — if the classification is correct , there should be few malfunctioning filters or none at all . Moreover , we see deeper parts of the network appear to be most salient for the incorrectly classified samples while earlier layers are often the most salient for correctly classified samples . An example of these behaviors for ResNet-50 is shown in Figure 2 which presents standardized filter-wise saliency profiles averaged over the correctly and incorrectly classified examples from the ImageNet validation set . Additionally , we note the improved relative scale of the standardized saliency profile across different layers compared to the absolute gradient magnitudes in Figure 1 . Saliency profiles for other architectures could be found in Appendix A . Henceforth , we will focus specifically on saliency profiles of misclassified samples in order to explore how neural networks make mistakes . 2.2 INPUT-SPACE SALIENCY FOR VISUALIZING HOW FILTERS MALFUNCTION . The parameter saliency profile allows us to identify filters that are most responsible for mistakes and erroneous network behavior . In this section , we develop an input-space counterpart to our parameter saliency method to understand which features of the image affect the saliency of particular filters . Geiping et al . ( 2020 ) show that the gradient information of a network is invertible , providing a link between input space and parameter saliency space . This work , along with existing input-space saliency map tools ( Simonyan et al. , 2014 ; Springenberg et al. , 2015 ; Smilkov et al. , 2017 ; Zhou et al. , 2016 ; Selvaraju et al. , 2017 ) , inspires our method . Given a parameter saliency profile ŝ = ŝ ( x , y ) for an image x with label y , our goal is to highlight the input features that drive large filter saliency values . That is , we would like to identify image pixels altering which can make filters more salient . To this end , we first select some set F of the most salient filters that we would like to explore . Then , we create a boosted saliency profile s′F by increasing the entries of ŝ corresponding to the chosen filters F ( e.g. , multiplying by a large constant ) . Now , we can find pixels that are important for making the chosen filters F more salient and , equivalently , making the filter saliency profile ŝ ( x , y ) close to the boosted saliency profile s′F by taking the following gradients : MF = |∇xDC ( ŝ ( x , y ) , s′F ) | , ( 3 ) where DC ( · , · ) is cosine distance . The resulting input saliency map MF contains input features ( pixels ) that affect the saliency of the chosen filters F the most . | This paper introduces a parameter-space saliency map to explore the salient parameters that are responsible for miscalssification. A set of experiments and visulizations are conducted on the salient parameters, leading to several interesting findings, such as, the nearest parameter neighbors share similar semantic information. Besides, the authors are also trying to improve the prediction accuarcy by turning off or fine-tuning the salient parameters. | SP:ee9c1549531b0ed933020491aee532835368a862 |
Where do Models go Wrong? Parameter-Space Saliency Maps for Explainability | 1 INTRODUCTION . With the widespread deployment of deep neural networks in high-stakes applications such as medical imaging ( Kang et al. , 2017 ) , credit score assessment ( West , 2000 ) , and facial recognition ( Deng et al. , 2019 ) , practitioners need to understand why their models make the decisions they do . In fact , “ right to explanation ” legislation in the European Union and the United States dictates that relevant public and private organizations must be able to justify the decisions their algorithms make ( United States Congress Senate Committee on Banking and Housing and Urban Affairs , 1976 ; European Commission , 2018 ) . Diagnosing the causes of system failures is particularly crucial for understanding the flaws and limitations of models we intend to employ . Conventional saliency methods focus on highlighting sensitive pixels ( Simonyan et al. , 2014 ) or image regions that maximize specific activations ( Erhan et al. , 2009 ) . However , such maps may not be useful in diagnosing undesirable model behaviors as they do not necessarily identify areas that specifically cause bad performance since the most sensitive pixels may not be the ones responsible for triggering misclassification . We develop an alternative approach to saliency which highlights network parameters that influence decisions rather than input features . These parameter saliency maps yield a number of useful analyses : • Nearest neighbors in parameter saliency space share common semantic information . That is , samples which are misclassified for similar reasons and cause similar parameters to malfunction are semantically similar . • By first identifying the network parameters responsible for an erroneous classification , we can then visualize the image regions that interact with those parameters and trigger the identified misbehavior . • We verify that identified salient parameters are indeed responsible for misclassification by showing that turning these parameters off improves predictions on the associated samples , more than pruning the same number of random or least salient parameters . • We further validate the link between salient parameters and network misclassification errors by observing that fine-tuning a small number of the most salient parameters on a single sample results in error correction on other samples which were misclassified for similar reasons . After carefully delineating our methodology and experimentally validating the meaningfulness of our parameter saliency maps , we showcase the practical utility of this paradigm as an explainability tool with a case study in which we are able to uncover a neural network ’ s reliance on a spurious correlation which causes interpretable failures . 1.1 RELATED WORK . Neural network interpretability and parameter importance . A major line of work in neural network interpretability focuses on convolutional neural networks . Works visualizing , interpreting , and analysing feature maps ( Zeiler & Fergus , 2014 ; Yosinski et al. , 2015 ; Olah et al. , 2017 ; Mahendran & Vedaldi , 2015 ) provide insight into the role of individual convolutional filters . These methods , together with other approaches for filter explainability ( Bau et al. , 2017 ; Zhou et al. , 2018 ; 2019 ) find that individual convolutional filters often are responsible for specific tasks such as edge , shape , and texture detection . The idea of measuring neural network parameter importance has been studied in multiple contexts . Notions of neuron and parameter importance have been used for AI explainability ( Srinivas & Fleuret , 2019 ; Selvaraju et al. , 2017 ; Morcos et al. , 2018 ; Shrikumar et al. , 2017 ; Shrikumar et al . ) , manipulating model behavior ( Bau et al. , 2018 ) , and parameter pruning ( Abbasi-Asl & Yu , 2017 ; Liu & Wu , 2019 ) . Input space saliency maps . A considerable amount of literature focuses on identifying input features that are important for neural network decisions . These methods include using deconvolution approaches ( Zeiler & Fergus , 2014 ) and data gradient information ( Simonyan et al. , 2014 ) . Several works build on these ideas and propose improvements such as Integrated Gradients ( Sundararajan et al. , 2017 ) , SmoothGrad ( Smilkov et al. , 2017 ) , and Guided Backpropagation ( Springenberg et al. , 2015 ) which result in sharper and more localized saliency maps . Other approaches focus on the use of class activation maps ( Zhou et al. , 2016 ) with improvements incorporating gradient information ( Selvaraju et al. , 2017 ) and more novel approaches to weighting the activation maps ( Wang et al. , 2020 ) . In addition , various saliency methods are based on manipulating the input image ( Fong & Vedaldi , 2017 ; Zeiler & Fergus , 2014 ) . Another line of work is aimed at evaluating the effectiveness of saliency maps ( Adebayo et al. , 2018 ; Alqaraawi et al. , 2020 ) . Although extensive work studies how different regions of images affect a network ’ s predictions , limited work ( Srinivas & Fleuret , 2019 ) aims to distinguish important network parameters . Our work combines the ideas of saliency maps and parameter importance and evaluates saliency directly on model parameters by aggregating their absolute gradients on a filter level . We leverage the resulting parameter saliency profiles as an explainability tool and develop an input-space saliency counterpart which highlights image features that cause specific filters to malfunction to study the interaction between the image features and the erroneous filters . 2 METHOD . It is known that different network filters are responsible for identifying different image properties and objects ( Zeiler & Fergus , 2014 ; Yosinski et al. , 2015 ; Olah et al. , 2017 ; Mahendran & Vedaldi , 2015 ) . This motivates the idea that mistakes made on wrongly classified images can be understood by investigating the network parameters , rather than only the pixels , that played a role in making a decision . We develop parameter-space saliency methods geared towards identifying and analyzing neural network parameters that are responsible for making erroneous decisions . Central to our method is the use of gradient information of the loss function as a measure of parameter sensitivity and optimality of the network at a given point in image space . 2.1 PARAMETER SALIENCY PROFILE . Let x be a sample in the validation set D with label y , and suppose a trained classifier has parameters θ that minimize a loss function L. We define the parameter-wise saliency profile of x as a vector s ( x , y ) with entries s ( x , y ) i : = |∇θiLθ ( x , y ) | , the magnitudes of the gradient of the loss with respect to each model parameter . Because the gradients on training data for a model trained to convergence are near zero , it is important to specify that D be a validation , or holdout , set . Intuitively , a larger gradient norm at the point ( x , y ) indicates a greater inefficiency in the network ’ s classification of sample x , and thus each entry of s ( x , y ) measures the suboptimality of individual parameters . Aggregation of parameter saliency . Convolutional filters are known to specialize in tasks such as edge , shape , and texture detection ( Yosinski et al. , 2015 ; Bau et al. , 2017 ; Olah et al. , 2017 ) . We therefore choose to aggregate saliency on the filter-wise basis by averaging the gradient magnitudes of parameters corresponding to each convolutional filter . This allows us to isolate filters to which the loss is most sensitive ( i.e . those which , when corrected , lead to the greatest reduction in loss ) . Formally , for each convolutional filter Fk in the network , consider its respective index set αk , which gives the indices of parameters corresponding to the filter Fk . The filter-wise saliency profile of x is defined to be a vector s ( x , y ) with entries s ( x , y ) k : = 1 |αk| ∑ i∈αk s ( x , y ) i , ( 1 ) the parameter-wise saliency profile aggregated by averaging on the filter level . Standardizing parameter saliency . Figure 1 exhibits the ResNet-50 ( He et al. , 2016 ) filter-wise saliency profile averaged over the ImageNet ( Deng et al. , 2009 ) validation set , where filters within each layer are sorted from highest to lowest saliency . One clear observation is the difference in the scale of gradient magnitudes – shallower filters are more salient than deeper filters . This phenomenon might occur for a number of reasons . First , early filters encode low-level features , such as edges and textures , which are active across a wide spectrum of images . Second , typical networks have fewer filters in shallow layers than in deep layers , making each individual filter more influential at shallower layers . Third , the effects of early filters cascade and accumulate as they pass through a network . To isolate filters that uniquely cause erroneous behavior on particular samples , we find filters that are abnormally salient for a sample , x , but not for others . That is , we further standardize the saliency profile of x with respect to all filter-wise saliency profiles of D. Formally , let µ be the average filter-wise saliency profile across all x ∈ D , and let σ be an equallength vector with the corresponding standard deviation for each entry . We use these statistics to produce the standardized filter-wise saliency profile as follows : ŝ ( x , y ) : = |s ( x , y ) − µ| σ . ( 2 ) The resulting tensor ŝ ( x , y ) is of length equal to the number of convolutional filters in the network , and we henceforth call it the saliency profile for sample x . By standardizing saliency profiles , we create a saliency map that activates when the importance of a filter is unusually strong relative to other samples in the dataset . This prevents the saliency map from highlighting filters that are uniformly important for all images , and instead focuses saliency on filters that are uniquely important and serve an image-dependent role . In the rest of the paper , unless explicitly noted otherwise , we use ŝ ( x , y ) and refer to it as parameter saliency . Incorrectly classified samples are more salient . Empirically , we observe the saliency profiles of incorrectly classified samples exhibit , on average , greater values than those of correctly classified examples . This bolsters the intuition that salient filters are precisely those malfunctioning — if the classification is correct , there should be few malfunctioning filters or none at all . Moreover , we see deeper parts of the network appear to be most salient for the incorrectly classified samples while earlier layers are often the most salient for correctly classified samples . An example of these behaviors for ResNet-50 is shown in Figure 2 which presents standardized filter-wise saliency profiles averaged over the correctly and incorrectly classified examples from the ImageNet validation set . Additionally , we note the improved relative scale of the standardized saliency profile across different layers compared to the absolute gradient magnitudes in Figure 1 . Saliency profiles for other architectures could be found in Appendix A . Henceforth , we will focus specifically on saliency profiles of misclassified samples in order to explore how neural networks make mistakes . 2.2 INPUT-SPACE SALIENCY FOR VISUALIZING HOW FILTERS MALFUNCTION . The parameter saliency profile allows us to identify filters that are most responsible for mistakes and erroneous network behavior . In this section , we develop an input-space counterpart to our parameter saliency method to understand which features of the image affect the saliency of particular filters . Geiping et al . ( 2020 ) show that the gradient information of a network is invertible , providing a link between input space and parameter saliency space . This work , along with existing input-space saliency map tools ( Simonyan et al. , 2014 ; Springenberg et al. , 2015 ; Smilkov et al. , 2017 ; Zhou et al. , 2016 ; Selvaraju et al. , 2017 ) , inspires our method . Given a parameter saliency profile ŝ = ŝ ( x , y ) for an image x with label y , our goal is to highlight the input features that drive large filter saliency values . That is , we would like to identify image pixels altering which can make filters more salient . To this end , we first select some set F of the most salient filters that we would like to explore . Then , we create a boosted saliency profile s′F by increasing the entries of ŝ corresponding to the chosen filters F ( e.g. , multiplying by a large constant ) . Now , we can find pixels that are important for making the chosen filters F more salient and , equivalently , making the filter saliency profile ŝ ( x , y ) close to the boosted saliency profile s′F by taking the following gradients : MF = |∇xDC ( ŝ ( x , y ) , s′F ) | , ( 3 ) where DC ( · , · ) is cosine distance . The resulting input saliency map MF contains input features ( pixels ) that affect the saliency of the chosen filters F the most . | This paper devises an analytic method for explainability based on the observation of filter-wise parameter saliency distribution, and tests on several models. And several experiments are conducted to deminstrate the conjecture. The motivation is straightforward and easy to understand. | SP:ee9c1549531b0ed933020491aee532835368a862 |
Linear Convergence of SGD on Overparametrized Shallow Neural Networks | 1 INTRODUCTION . Our understanding of the optimization landscape of supervised learning with neural networks has vastly improved in recent years . This is in part due to the observation that overparameterization is key to overcome the pitfalls of first-order methods in general non-convex problems ( Soltanolkotabi et al. , 2019 ) . Under this assumption , a line of research has established convergence of first-order methods such as gradient descent ( GD ) to global optimality , ( Allen-Zhu et al. , 2019 ; Kawaguchi & Huang , 2019 ; Du et al. , 2019 ; Du & Lee , 2018 ; Zou & Gu , 2019 ; Brutzkus & Globerson , 2017 ; Song & Yang , 2019 ; Oymak & Soltanolkotabi , 2020 ) , a phenomenon that has been confirmed in practice . Empirically , as long as the width of a network scales linearly with the size of the training data ( mild overparameterization ) , stochastic gradient descent ( SGD ) enjoys fast convergence to global optimality ( Livni et al. , 2014 ; Safran & Shamir , 2018 ; Oymak & Soltanolkotabi , 2020 ; Kawaguchi & Huang , 2019 ) . Can we explain such behavior theoretically ? Sadly , the available characterizations require a larger degree of overparameterization , or imposes additional assumptions , which do not hold for the algorithms that are used in practice . For example , if GD is applied exclusively to the last layer , Kawaguchi & Huang ( 2019 ) show that an ideal linear scaling of the width is sufficient to guarantee convergence . Song & Yang ( 2019 ) prove quadratic scaling when GD is applied only to the first layer . For two-layer neural networks , when both layers are trained with GD simultaneously , state-of-the-art results show that subquadratic ( not linear ) scaling is enough to converge to global optimality ( Anonymous ) . Despite being close to the ideal linear rate of overparameterization , due to computational constraints , GD is rarely used in modern applications involving huge datasets . Hence , closing the gap between theory and practice requires studying scalable first-order algorithms such as SGD . Our work focuses on mini-batch SGD , which is one of the most common algorithms for training deep models . We study convergence of SGD when it is applied to train both layers of a neural network , which is initialized with standard initialization schemes . Our contributions : • We show that under proper initialization and choice of learning rate , the iterates of SGD converge to a global minimum with high probability and exponentially fast for a general non-convex problem assuming that the loss function satisfies a growth condition . • For the special case a two-layer neural network , we show that a subquadratic scaling on the width is sufficient under standard initialization and training both layers simultaneously , if the minibatch size is sufficiently large and it also grows with the number of training examples . For constant batch size , we show that quadratic overparametrization is sufficient . Our results interpolate between subquadratic and quadratic scalings depending on the batch size . Related work . The majority of the existing literature on overparameterization focuses on GD ( Du et al. , 2019 ; Du & Lee , 2018 ; Allen-Zhu et al. , 2019 ; Zou & Gu , 2019 ) . Allen-Zhu et al . ( 2019 ) provided theoretical bounds for deep networks trained with SGD . However , their results require an overparameterization degree that is too large , compared to what can be achieved for GD . In contrast , we study SGD and how the batch size affects the required degree of overparameterization . Chen et al . ( 2021 ) establish generalization guarantees and sufficient network width when SGD trains deep ReLU networks for binary classification , which is a different setting compared to our paper . We study the case where SGD updates all the parameters of a shallow neural network . In contrast , a number of existing literature assume that only the parameters corresponding to some layers are updated throughout training ( Oymak & Soltanolkotabi , 2020 ; Kawaguchi & Huang , 2019 ; Song & Yang , 2019 ) . When SGD is applied only to the first layer , Oymak & Soltanolkotabi ( 2020 ) showed that quadratic scaling is sufficient for convergence with linear rate . Despite being an interesting theoretical setup , such algorithmic choice rarely happens in practice . There are also differences regarding the choice of activation function . While ReLU can be considered as the default activation function when studying deep neural networks , its non-smoothness may be the reason why results for ReLU networks require substantially more number of parameters or additional assumptions on the data ( like separability ) to guarantee convergence to a global minimum . Moreover , backpropagation on ReLU networks does not correctly calculate the gradient at all points of differentiability ( Kakade & Lee , 2018 ; Bolte & Pauwels , 2021 ) , which raises major technical issues . In contrast , we assume a smooth activation , similar to Anonymous , which avoids such issues and achieves lower overparameterization degrees . The authors of ( Anonymous ) established subquadratic scaling when GD trains a shallow neural network . In this paper , we focus on SGD , which results in substantial technical challenges . Compared to the results in ( Anonymous ) , controlling the length of the trajectory is more involved in this paper , which requires a new analysis technique that bounds the length of the trajectory with high probability . We consider the effect of mini-batch SGD , which shows an interpolation between subquadratic and quadratic scaling . We also improve the estimates at initialization and show that more relaxed assumptions are sufficient to establish sufficient overparameterization degree . We summarize such recent results in the overparametrization literature in Table 1 . Lazy Training . Proving fast convergence to global optimality is not a complete answer . It has been shown that despite fast convergence , it is possible that an algorithm tends towards a solution with poor performance on test data , if the training falls in the so-called Lazy Training regime ( Chizat et al. , 2019 ) . Thus , any useful algorithmic framework for learning neural networks should avoid this regime , usually through careful initialization schemes . For example , despite requiring only linear overparametrization for GD , the initialization studied by Nguyen & Mondelli ( 2020 ) leads to the lazy regime . This is the reason why we omit such result from Table 1 . In this work , we show global convergence and achieve subquadratic scaling under standard initialization schemes , which empirically perform well on test data . Polylogarithmic width is enough to obtain convergence for neural networks of arbitrary depth , according to Ji & Telgarsky ( 2020 ) ; Chen et al . ( 2021 ) . However , in those work , convergence is understood in an ergodic sense . This is a weaker notion than strict convergence with high probability , which is the one we consider , and which better matches practical applications . Given perfect knowledge about the underlying function that generates the labels and under the assumption that such target function has low-rank approximation , Su & Yang ( 2019 ) showed that GD achieves zero-approximation . This is different from the problem considered in our paper . For a binary classification problem , Daniely ( 2020 ) showed that near linear network size is sufficient for SGD to memorize random examples under a variant of Xavier initialization , which is a different setting compared to our paper . For a deep neural network with pyramidal structure and smooth activations , Nguyen & Mondelli ( 2020 ) showed that subquadratic scaling is sufficient for global convergence of GD under a restrictive initialization scheme . In this paper , we establish global convergence for SGD under standard initialization . A recent line of work uses mean-field analysis to approximate the target distribution of the weights in a neural network via their empirical distribution ( Mei et al. , 2019 ; Lu et al. , 2020 ) . Nevertheless , such results do not provide useful overparametrization degree bounds in terms of the number of samples . In contrast , our work does not require such approximations and we focus on deriving explicit sufficient overparametrization rates for global optimality of SGD . Notation . We use ‖ · ‖ to denote the Euclidean norm of a vector and Frobenius norm of a matrix . We use∇ to represent the Jacobian of a vector-valued and gradient of a scalar-valued function . We use and ⊗ to represent the entry-wise Hadamard product and Kronecker product , respectively . We use lower-case bold font to denote vectors . We use calligraphic and standard fonts to represent sets and scalars , respectively . We use σmin ( T ) and σmax ( T ) to denote the smallest and largest singular values of a linear map T . We use [ n ] to represent { 1 , · · · , n } for an integer n. We use Õ and Ω̃ to hide logarithmic factors and use . to ignore terms up to constant and logarithmic factors . 2 A GENERAL GLOBAL CONVERGENCE RESULT FOR SGD . In this section , we consider a general non-convex minimization problem and show that for a certain choice of learning rate and careful initialization , the iterates of SGD converge to a global minimum with high probability and exponentially fast . In Section 3 , we extend our consideration to the training of a shallow neural network and find the hidden layer size , which is sufficient for SGD to converge to a global minimum i.e. , its overparameterization degree . Definition 1 ( Smoothness ) . Let βψ > 0 . A function ψ : Rd1 → Rd2 is βψ-smooth , if for all u , v ∈ Rd1 , we have σmax ( ∇ψ ( u ) −∇ψ ( v ) ) ≤ βψ‖u− v‖ . ( 1 ) Definition 2 ( PL condition ( Bolte et al. , 2017 ) ) . A function ψ : Rd1 → R satisfies the PL condition if there exists αψ > 0 such that , for all u ∈ Rd1 , we have ψ ( u ) ≤ ‖∇ψ ( u ) ‖ 2 2αψ . ( 2 ) We are now ready to state our finite-sum compositional optimization problem : min w∈Rd h ( w ) : = f ( Φ ( w ) ) = 1m m∑ j=1 fj ( Φ ( w ) ) , Φ : Rd → Rd̃ , f , fj : Rd̃ → R+ ( 3 ) where m denotes the number of training examples . Assumption 1 . The functions introduced in Eq . ( 3 ) satisfy the following properties : ( i ) Φ is twicedifferentiable and βΦ-smooth ( Definition 1 ) , ( ii ) f is twice-differentiable and βf -smooth and ( iii ) f satisfies the PL condition with some αf > 0 ( Definition 2 ) . We study the iterates of the stochastic gradient descent ( SGD ) algorithm when applied to the objective function h in Eq . ( 3 ) . For i ≥ 0 , let Ii denote a random minibatch at iteration i drawn uniformly at random , independent of all previous draws . Let b ∈ [ m ] denote the minibatch size , i.e. , |Ii| = b for all i . The SGD iterates are defined by a random variable w0 , referred to as the initialization , and the update rule : wi+1 = wi − λ1 b ∑ j∈Ii ∇hj ( wi ) , ( 4 ) where λ > 0 is the learning rate and hj ( w ) : = fj ( Φ ( w ) ) ∀j , w . An important feature of the SGD iterates is that 1b ∑ j∈Ii ∇hj ( Φ ( wi ) ) in Eq . ( 4 ) is an unbiased estimator of the gradient ∇h ( wi ) given wi , i.e. , E [ 1 b ∑ j∈Ii ∇hj ( Φ ( wi ) ) |wi ] = ∇h ( wi ) . Never- theless , this is not enough for SGD to converge to the first-order optimality . In addition , we will assume that f in Eq . ( 3 ) satisfies the growth condition ( Schmidt & Roux , 2013 ; Vaswani et al. , 2019 ; Cevher & Vu , 2019 ) : Definition 3 ( Growth condition ) . A function ψ : Rd → R with a finite-sum structure satisfies the growth condition with minibatch size b if there exists ηψ > 0 such that , for all u ∈ Rd , we have E [ ∥∥∥1 c ∑ j∈I ∇ψj ( u ) ∥∥∥2 ] ≤ ηψ‖∇ψ ( u ) ‖2 , ( 5 ) where the expectation is over the random choice of set I . Assumption 2 . In Eq . ( 3 ) , f satisfies the growth condition ( Definition 3 ) for some ηf > 0 . We are now ready to state the main result of this section . Theorem 1 . Let Assumptions 1 and 2 hold and let ζ > 1 . Suppose that at initialization , 0 < µΦ ≤ σmin ( ∇Φ∗ ( w0 ) ) ≤ σmax ( ∇Φ∗ ( w0 ) ) ≤ νΦ , h ( w0 ) = O ( αfµ 6 Φ ζβ2Φηfν 2 Φ ) . ( 6 ) Then , for a sufficiently small learning rate λ . min ( µ2Φ ηf ( βΦν2Φ‖∇f ( Φ ( w0 ) ) ‖+ βfν4Φ + βfµΦν3Φ ) , µΦ ζ √ ηfνΦ ( βΦ‖∇f ( Φ ( w0 ) ) ‖+ βfνΦµΦ ) ) ( 7 ) the iterates of SGD { wi } i≥0 ( 4 ) converge to a global minimizer of h ( 3 ) with the optimal value of zero , exponentially fast and with probability at least 1− 1/ζ . The rate of convergence is given by E [ h ( wi ) ] ≤ ( 1− Cλαfµ2Φ ) i · h ( w0 ) for a universal constant C. Remark 1 . The second item in Eq . ( 6 ) suggests initializing close to a global minimum of the nonconvex optimization problem . This feature has precedence in the related literature , e.g. , in matrix factorization ( Chi et al. , 2019 ) . The proof of Theorem 1 is deferred to Appendix B . However , in the remaining of this section we provide a sketch of the main arguments that lead to the result . The first condition in Eq . ( 6 ) is central to our arguments , and we will refer to it as the near-isometry property . Definition 4 ( Near-isometry ) . A linear map T : Rd1 → Rd2 is ( µ , ν ) -near-isometry if there exist 0 < µ ≤ ν such that µ ≤ σmin ( T ) ≤ σmax ( T ) ≤ ν . ( 8 ) Let w denote the limit point when the SGD algorithm is run with some learning rate and let∇Φ∗ ( w ) denote the adjoint operator of∇Φ ( w ) . Convergence of SGD is ensured with high probability due to the strong growth condition ( Definition 3 ) along with proper learning rate and initialization . We note that w is a first-order stationary point of h. Hence we have : 0 = ∇h ( w ) = ∇Φ∗ ( w ) ∇f ( Φ ( w ) ) ( 9 ) Note that if ∇Φ∗ ( w ) is nonsingular , it would follow that ∇f ( Φ ( w ) ) = 0 . The PL condition ( Definition 2 ) would then imply that Φ ( w ) is a global minimizer of f and hence , a global minimizer of h. With this fact in mind , our proof can be summarized in three steps : first , a careful choice of initialization will ensure that ∇Φ∗ is nonsingular for all elements within a certain distance of w0 . Second , we show that under small enough learning rate , the iterates of SGD remain close to the initialization w0 , with high probability regardless of the number of iterations . The third and final step will use the non-singularity of∇Φ∗ at convergence and Eq . ( 9 ) to conclude global optimality . This is akin to the arguments in ( Anonymous ) , however , in our case the stochasticity in the SGD updates poses a challenge for controlling the distance to initialization . We use concentration bounds on the length of the path and show that the SGD trajectory remains in the region where ∇Φ∗ is non-singular , with high probability . A crucial result for the first step of our proof has already been established in by ( Anonymous ) . It shows that a smooth function that is near-isometry at initialization will preserve such property for all points within a certain distance . Lemma 1 ( Anonymous ) . Let Φ be βΦ-smooth and ∇Φ∗ ( w0 ) be a ( µΦ , νΦ ) -near-isometry . Then for all w such that ‖w −w0‖ ≤ µΦ 2βΦ , µΦ 2 ≤ σmin ( ∇Φ∗ ( w ) ) ≤ σmax ( ∇Φ∗ ( w ) ) ≤ 3νΦ 2 ( 10 ) The second step in the proof of Theorem 1 is to compute the expected length of the SGD trajectory which is spent inside the ball defined in Eq . ( 10 ) . We find an upper bound on this expected length depending on the initialization and learning rate , but independent of the number of iterations . Hence , under some proper initialization and learning rate , we can control the expected length of the trajectory for which Lemma 1 holds . In particular , we have Proposition 1 ( Expected length of trajectory ) . Let Assumptions 1 and 2 hold and let ζ > 1 . Let the random variable I denote the first iteration of SGD ( Eq . ( 4 ) ) such that wI /∈ B : = ball ( w0 , ρΦ ) : = { w : ‖w −w0‖ ≤ ρΦ } ( 11 ) or I =∞ if the trajectory does not leave B . Suppose that w0 satisfies Eq . ( 6 ) and SGD is executed with sufficiently small learning rate , which satisfies Eq . ( 7 ) . An upper bound on the expected length of the SGD trajectory is given by E [ ` ( I ) ] ≤ µΦ 2ζβΦ = ρΦ ζ . ( 12 ) We provide the sketch of the proof ( see Appendix A for the complete proof ) . We first find an upper bound on the expected length of the trajectory in terms of the norm of gradients of f . With a proper learning rate , we find an upper bound on the norm of the gradient in terms of the expected decent of f in two consecutive iterates , which are inside the ball . We also ensure that the learning rate is sufficiently small such that E [ ‖wI − wI−1‖ ] is bounded . Finally , under proper initialization , we obtain an upper bound on the expected length of the trajectory for the iterates inside the ball , i.e. , E [ ∑I−1 i=0 ‖wi −wi−1‖ ] . Remark 2 . A similar phenomenon that shows bounded length of the trajectory has been observed in various settings mainly for gradient descent ( Du et al. , 2019 ; Oymak & Soltanolkotabi , 2019 ; Anonymous ) . In this paper , we focus on a compositional non-convex problem trained with SGD , which is more challenging to analyze . Using the upper bound ( 12 ) on the expected length of the trajectory spent inside B = ball ( w0 , ρΦ ) , we can bound the probability that the SGD iterates leaves the ball B . Indeed , in order for the process to leave B starting from w0 , it is required that the length of the trajectory spent inside B satisfies l ( I ) ≥ ρΦ . Hence , using bound ( 12 ) on E [ ` ( I ) ] together with a concentration bound ( Markov inequality in our case ) , we can upper bound the probability of SGD iterates leaving B . Finally , under the event that the SGD iterates remain in B , an upper bound on E [ ` ( I ) ] implies the convergence of the iterates . Remark 3 . With a more involved analysis on the concentration properties of the random variable ` ( I ) , it may be possible to greatly improve the dependence of the initialization and step size on ζ . Indeed , the current analysis assumes the worst-case scenario , where the SGD iterates either remain at the initialization , or directly leave the ball B in a straight line ( this scenario indeed maximizes the probability that the process leaves the ball , given a bound on E [ ` ( I ) ] ) . Although ` ( I ) is obtained as a sum of random variables , the difficulty of obtaining better concentration bounds for ` ( I ) comes from the high level of dependence between all the variables involved . A better analysis would thus need to better understand how the trajectories behave inside the ball B , e.g. , by bounding the variance of ` ( I ) . In the following section , we specify our result to the special case of shallow neural networks . We will show that , in the case of quadratic loss , the strong growth condition naturally holds , with a constant depending on the batch size . Moreover , using Gaussian initialization for the neural network parameters , we can control the initial smoothness and near-isometry parameters involved in Theorem 1 with high probability . | 1. This paper proves that SGD converges to a global minimum in certain non-convex problems assuming the loss function satisfies a growth condition. The proof relies on assuming that the initial Jacobian matrix is non-singular and shows that it stays non-singular since SGD iterates remain close to the initialization. 2. The paper then applies the above analysis to a two-layer neural network and proves that a subquadratic scaling on the width is sufficient for global convergence assuming the minibatch size grows with the number of training samples. For constant batch size, it requires quadratic over-parameterization. Furthermore, an interpolation between subquadratic and quadratic scaling is given depending on the batch size. | SP:83f5e4ad9fa7ca35ada3a63eb113b1b1827b2926 |
Linear Convergence of SGD on Overparametrized Shallow Neural Networks | 1 INTRODUCTION . Our understanding of the optimization landscape of supervised learning with neural networks has vastly improved in recent years . This is in part due to the observation that overparameterization is key to overcome the pitfalls of first-order methods in general non-convex problems ( Soltanolkotabi et al. , 2019 ) . Under this assumption , a line of research has established convergence of first-order methods such as gradient descent ( GD ) to global optimality , ( Allen-Zhu et al. , 2019 ; Kawaguchi & Huang , 2019 ; Du et al. , 2019 ; Du & Lee , 2018 ; Zou & Gu , 2019 ; Brutzkus & Globerson , 2017 ; Song & Yang , 2019 ; Oymak & Soltanolkotabi , 2020 ) , a phenomenon that has been confirmed in practice . Empirically , as long as the width of a network scales linearly with the size of the training data ( mild overparameterization ) , stochastic gradient descent ( SGD ) enjoys fast convergence to global optimality ( Livni et al. , 2014 ; Safran & Shamir , 2018 ; Oymak & Soltanolkotabi , 2020 ; Kawaguchi & Huang , 2019 ) . Can we explain such behavior theoretically ? Sadly , the available characterizations require a larger degree of overparameterization , or imposes additional assumptions , which do not hold for the algorithms that are used in practice . For example , if GD is applied exclusively to the last layer , Kawaguchi & Huang ( 2019 ) show that an ideal linear scaling of the width is sufficient to guarantee convergence . Song & Yang ( 2019 ) prove quadratic scaling when GD is applied only to the first layer . For two-layer neural networks , when both layers are trained with GD simultaneously , state-of-the-art results show that subquadratic ( not linear ) scaling is enough to converge to global optimality ( Anonymous ) . Despite being close to the ideal linear rate of overparameterization , due to computational constraints , GD is rarely used in modern applications involving huge datasets . Hence , closing the gap between theory and practice requires studying scalable first-order algorithms such as SGD . Our work focuses on mini-batch SGD , which is one of the most common algorithms for training deep models . We study convergence of SGD when it is applied to train both layers of a neural network , which is initialized with standard initialization schemes . Our contributions : • We show that under proper initialization and choice of learning rate , the iterates of SGD converge to a global minimum with high probability and exponentially fast for a general non-convex problem assuming that the loss function satisfies a growth condition . • For the special case a two-layer neural network , we show that a subquadratic scaling on the width is sufficient under standard initialization and training both layers simultaneously , if the minibatch size is sufficiently large and it also grows with the number of training examples . For constant batch size , we show that quadratic overparametrization is sufficient . Our results interpolate between subquadratic and quadratic scalings depending on the batch size . Related work . The majority of the existing literature on overparameterization focuses on GD ( Du et al. , 2019 ; Du & Lee , 2018 ; Allen-Zhu et al. , 2019 ; Zou & Gu , 2019 ) . Allen-Zhu et al . ( 2019 ) provided theoretical bounds for deep networks trained with SGD . However , their results require an overparameterization degree that is too large , compared to what can be achieved for GD . In contrast , we study SGD and how the batch size affects the required degree of overparameterization . Chen et al . ( 2021 ) establish generalization guarantees and sufficient network width when SGD trains deep ReLU networks for binary classification , which is a different setting compared to our paper . We study the case where SGD updates all the parameters of a shallow neural network . In contrast , a number of existing literature assume that only the parameters corresponding to some layers are updated throughout training ( Oymak & Soltanolkotabi , 2020 ; Kawaguchi & Huang , 2019 ; Song & Yang , 2019 ) . When SGD is applied only to the first layer , Oymak & Soltanolkotabi ( 2020 ) showed that quadratic scaling is sufficient for convergence with linear rate . Despite being an interesting theoretical setup , such algorithmic choice rarely happens in practice . There are also differences regarding the choice of activation function . While ReLU can be considered as the default activation function when studying deep neural networks , its non-smoothness may be the reason why results for ReLU networks require substantially more number of parameters or additional assumptions on the data ( like separability ) to guarantee convergence to a global minimum . Moreover , backpropagation on ReLU networks does not correctly calculate the gradient at all points of differentiability ( Kakade & Lee , 2018 ; Bolte & Pauwels , 2021 ) , which raises major technical issues . In contrast , we assume a smooth activation , similar to Anonymous , which avoids such issues and achieves lower overparameterization degrees . The authors of ( Anonymous ) established subquadratic scaling when GD trains a shallow neural network . In this paper , we focus on SGD , which results in substantial technical challenges . Compared to the results in ( Anonymous ) , controlling the length of the trajectory is more involved in this paper , which requires a new analysis technique that bounds the length of the trajectory with high probability . We consider the effect of mini-batch SGD , which shows an interpolation between subquadratic and quadratic scaling . We also improve the estimates at initialization and show that more relaxed assumptions are sufficient to establish sufficient overparameterization degree . We summarize such recent results in the overparametrization literature in Table 1 . Lazy Training . Proving fast convergence to global optimality is not a complete answer . It has been shown that despite fast convergence , it is possible that an algorithm tends towards a solution with poor performance on test data , if the training falls in the so-called Lazy Training regime ( Chizat et al. , 2019 ) . Thus , any useful algorithmic framework for learning neural networks should avoid this regime , usually through careful initialization schemes . For example , despite requiring only linear overparametrization for GD , the initialization studied by Nguyen & Mondelli ( 2020 ) leads to the lazy regime . This is the reason why we omit such result from Table 1 . In this work , we show global convergence and achieve subquadratic scaling under standard initialization schemes , which empirically perform well on test data . Polylogarithmic width is enough to obtain convergence for neural networks of arbitrary depth , according to Ji & Telgarsky ( 2020 ) ; Chen et al . ( 2021 ) . However , in those work , convergence is understood in an ergodic sense . This is a weaker notion than strict convergence with high probability , which is the one we consider , and which better matches practical applications . Given perfect knowledge about the underlying function that generates the labels and under the assumption that such target function has low-rank approximation , Su & Yang ( 2019 ) showed that GD achieves zero-approximation . This is different from the problem considered in our paper . For a binary classification problem , Daniely ( 2020 ) showed that near linear network size is sufficient for SGD to memorize random examples under a variant of Xavier initialization , which is a different setting compared to our paper . For a deep neural network with pyramidal structure and smooth activations , Nguyen & Mondelli ( 2020 ) showed that subquadratic scaling is sufficient for global convergence of GD under a restrictive initialization scheme . In this paper , we establish global convergence for SGD under standard initialization . A recent line of work uses mean-field analysis to approximate the target distribution of the weights in a neural network via their empirical distribution ( Mei et al. , 2019 ; Lu et al. , 2020 ) . Nevertheless , such results do not provide useful overparametrization degree bounds in terms of the number of samples . In contrast , our work does not require such approximations and we focus on deriving explicit sufficient overparametrization rates for global optimality of SGD . Notation . We use ‖ · ‖ to denote the Euclidean norm of a vector and Frobenius norm of a matrix . We use∇ to represent the Jacobian of a vector-valued and gradient of a scalar-valued function . We use and ⊗ to represent the entry-wise Hadamard product and Kronecker product , respectively . We use lower-case bold font to denote vectors . We use calligraphic and standard fonts to represent sets and scalars , respectively . We use σmin ( T ) and σmax ( T ) to denote the smallest and largest singular values of a linear map T . We use [ n ] to represent { 1 , · · · , n } for an integer n. We use Õ and Ω̃ to hide logarithmic factors and use . to ignore terms up to constant and logarithmic factors . 2 A GENERAL GLOBAL CONVERGENCE RESULT FOR SGD . In this section , we consider a general non-convex minimization problem and show that for a certain choice of learning rate and careful initialization , the iterates of SGD converge to a global minimum with high probability and exponentially fast . In Section 3 , we extend our consideration to the training of a shallow neural network and find the hidden layer size , which is sufficient for SGD to converge to a global minimum i.e. , its overparameterization degree . Definition 1 ( Smoothness ) . Let βψ > 0 . A function ψ : Rd1 → Rd2 is βψ-smooth , if for all u , v ∈ Rd1 , we have σmax ( ∇ψ ( u ) −∇ψ ( v ) ) ≤ βψ‖u− v‖ . ( 1 ) Definition 2 ( PL condition ( Bolte et al. , 2017 ) ) . A function ψ : Rd1 → R satisfies the PL condition if there exists αψ > 0 such that , for all u ∈ Rd1 , we have ψ ( u ) ≤ ‖∇ψ ( u ) ‖ 2 2αψ . ( 2 ) We are now ready to state our finite-sum compositional optimization problem : min w∈Rd h ( w ) : = f ( Φ ( w ) ) = 1m m∑ j=1 fj ( Φ ( w ) ) , Φ : Rd → Rd̃ , f , fj : Rd̃ → R+ ( 3 ) where m denotes the number of training examples . Assumption 1 . The functions introduced in Eq . ( 3 ) satisfy the following properties : ( i ) Φ is twicedifferentiable and βΦ-smooth ( Definition 1 ) , ( ii ) f is twice-differentiable and βf -smooth and ( iii ) f satisfies the PL condition with some αf > 0 ( Definition 2 ) . We study the iterates of the stochastic gradient descent ( SGD ) algorithm when applied to the objective function h in Eq . ( 3 ) . For i ≥ 0 , let Ii denote a random minibatch at iteration i drawn uniformly at random , independent of all previous draws . Let b ∈ [ m ] denote the minibatch size , i.e. , |Ii| = b for all i . The SGD iterates are defined by a random variable w0 , referred to as the initialization , and the update rule : wi+1 = wi − λ1 b ∑ j∈Ii ∇hj ( wi ) , ( 4 ) where λ > 0 is the learning rate and hj ( w ) : = fj ( Φ ( w ) ) ∀j , w . An important feature of the SGD iterates is that 1b ∑ j∈Ii ∇hj ( Φ ( wi ) ) in Eq . ( 4 ) is an unbiased estimator of the gradient ∇h ( wi ) given wi , i.e. , E [ 1 b ∑ j∈Ii ∇hj ( Φ ( wi ) ) |wi ] = ∇h ( wi ) . Never- theless , this is not enough for SGD to converge to the first-order optimality . In addition , we will assume that f in Eq . ( 3 ) satisfies the growth condition ( Schmidt & Roux , 2013 ; Vaswani et al. , 2019 ; Cevher & Vu , 2019 ) : Definition 3 ( Growth condition ) . A function ψ : Rd → R with a finite-sum structure satisfies the growth condition with minibatch size b if there exists ηψ > 0 such that , for all u ∈ Rd , we have E [ ∥∥∥1 c ∑ j∈I ∇ψj ( u ) ∥∥∥2 ] ≤ ηψ‖∇ψ ( u ) ‖2 , ( 5 ) where the expectation is over the random choice of set I . Assumption 2 . In Eq . ( 3 ) , f satisfies the growth condition ( Definition 3 ) for some ηf > 0 . We are now ready to state the main result of this section . Theorem 1 . Let Assumptions 1 and 2 hold and let ζ > 1 . Suppose that at initialization , 0 < µΦ ≤ σmin ( ∇Φ∗ ( w0 ) ) ≤ σmax ( ∇Φ∗ ( w0 ) ) ≤ νΦ , h ( w0 ) = O ( αfµ 6 Φ ζβ2Φηfν 2 Φ ) . ( 6 ) Then , for a sufficiently small learning rate λ . min ( µ2Φ ηf ( βΦν2Φ‖∇f ( Φ ( w0 ) ) ‖+ βfν4Φ + βfµΦν3Φ ) , µΦ ζ √ ηfνΦ ( βΦ‖∇f ( Φ ( w0 ) ) ‖+ βfνΦµΦ ) ) ( 7 ) the iterates of SGD { wi } i≥0 ( 4 ) converge to a global minimizer of h ( 3 ) with the optimal value of zero , exponentially fast and with probability at least 1− 1/ζ . The rate of convergence is given by E [ h ( wi ) ] ≤ ( 1− Cλαfµ2Φ ) i · h ( w0 ) for a universal constant C. Remark 1 . The second item in Eq . ( 6 ) suggests initializing close to a global minimum of the nonconvex optimization problem . This feature has precedence in the related literature , e.g. , in matrix factorization ( Chi et al. , 2019 ) . The proof of Theorem 1 is deferred to Appendix B . However , in the remaining of this section we provide a sketch of the main arguments that lead to the result . The first condition in Eq . ( 6 ) is central to our arguments , and we will refer to it as the near-isometry property . Definition 4 ( Near-isometry ) . A linear map T : Rd1 → Rd2 is ( µ , ν ) -near-isometry if there exist 0 < µ ≤ ν such that µ ≤ σmin ( T ) ≤ σmax ( T ) ≤ ν . ( 8 ) Let w denote the limit point when the SGD algorithm is run with some learning rate and let∇Φ∗ ( w ) denote the adjoint operator of∇Φ ( w ) . Convergence of SGD is ensured with high probability due to the strong growth condition ( Definition 3 ) along with proper learning rate and initialization . We note that w is a first-order stationary point of h. Hence we have : 0 = ∇h ( w ) = ∇Φ∗ ( w ) ∇f ( Φ ( w ) ) ( 9 ) Note that if ∇Φ∗ ( w ) is nonsingular , it would follow that ∇f ( Φ ( w ) ) = 0 . The PL condition ( Definition 2 ) would then imply that Φ ( w ) is a global minimizer of f and hence , a global minimizer of h. With this fact in mind , our proof can be summarized in three steps : first , a careful choice of initialization will ensure that ∇Φ∗ is nonsingular for all elements within a certain distance of w0 . Second , we show that under small enough learning rate , the iterates of SGD remain close to the initialization w0 , with high probability regardless of the number of iterations . The third and final step will use the non-singularity of∇Φ∗ at convergence and Eq . ( 9 ) to conclude global optimality . This is akin to the arguments in ( Anonymous ) , however , in our case the stochasticity in the SGD updates poses a challenge for controlling the distance to initialization . We use concentration bounds on the length of the path and show that the SGD trajectory remains in the region where ∇Φ∗ is non-singular , with high probability . A crucial result for the first step of our proof has already been established in by ( Anonymous ) . It shows that a smooth function that is near-isometry at initialization will preserve such property for all points within a certain distance . Lemma 1 ( Anonymous ) . Let Φ be βΦ-smooth and ∇Φ∗ ( w0 ) be a ( µΦ , νΦ ) -near-isometry . Then for all w such that ‖w −w0‖ ≤ µΦ 2βΦ , µΦ 2 ≤ σmin ( ∇Φ∗ ( w ) ) ≤ σmax ( ∇Φ∗ ( w ) ) ≤ 3νΦ 2 ( 10 ) The second step in the proof of Theorem 1 is to compute the expected length of the SGD trajectory which is spent inside the ball defined in Eq . ( 10 ) . We find an upper bound on this expected length depending on the initialization and learning rate , but independent of the number of iterations . Hence , under some proper initialization and learning rate , we can control the expected length of the trajectory for which Lemma 1 holds . In particular , we have Proposition 1 ( Expected length of trajectory ) . Let Assumptions 1 and 2 hold and let ζ > 1 . Let the random variable I denote the first iteration of SGD ( Eq . ( 4 ) ) such that wI /∈ B : = ball ( w0 , ρΦ ) : = { w : ‖w −w0‖ ≤ ρΦ } ( 11 ) or I =∞ if the trajectory does not leave B . Suppose that w0 satisfies Eq . ( 6 ) and SGD is executed with sufficiently small learning rate , which satisfies Eq . ( 7 ) . An upper bound on the expected length of the SGD trajectory is given by E [ ` ( I ) ] ≤ µΦ 2ζβΦ = ρΦ ζ . ( 12 ) We provide the sketch of the proof ( see Appendix A for the complete proof ) . We first find an upper bound on the expected length of the trajectory in terms of the norm of gradients of f . With a proper learning rate , we find an upper bound on the norm of the gradient in terms of the expected decent of f in two consecutive iterates , which are inside the ball . We also ensure that the learning rate is sufficiently small such that E [ ‖wI − wI−1‖ ] is bounded . Finally , under proper initialization , we obtain an upper bound on the expected length of the trajectory for the iterates inside the ball , i.e. , E [ ∑I−1 i=0 ‖wi −wi−1‖ ] . Remark 2 . A similar phenomenon that shows bounded length of the trajectory has been observed in various settings mainly for gradient descent ( Du et al. , 2019 ; Oymak & Soltanolkotabi , 2019 ; Anonymous ) . In this paper , we focus on a compositional non-convex problem trained with SGD , which is more challenging to analyze . Using the upper bound ( 12 ) on the expected length of the trajectory spent inside B = ball ( w0 , ρΦ ) , we can bound the probability that the SGD iterates leaves the ball B . Indeed , in order for the process to leave B starting from w0 , it is required that the length of the trajectory spent inside B satisfies l ( I ) ≥ ρΦ . Hence , using bound ( 12 ) on E [ ` ( I ) ] together with a concentration bound ( Markov inequality in our case ) , we can upper bound the probability of SGD iterates leaving B . Finally , under the event that the SGD iterates remain in B , an upper bound on E [ ` ( I ) ] implies the convergence of the iterates . Remark 3 . With a more involved analysis on the concentration properties of the random variable ` ( I ) , it may be possible to greatly improve the dependence of the initialization and step size on ζ . Indeed , the current analysis assumes the worst-case scenario , where the SGD iterates either remain at the initialization , or directly leave the ball B in a straight line ( this scenario indeed maximizes the probability that the process leaves the ball , given a bound on E [ ` ( I ) ] ) . Although ` ( I ) is obtained as a sum of random variables , the difficulty of obtaining better concentration bounds for ` ( I ) comes from the high level of dependence between all the variables involved . A better analysis would thus need to better understand how the trajectories behave inside the ball B , e.g. , by bounding the variance of ` ( I ) . In the following section , we specify our result to the special case of shallow neural networks . We will show that , in the case of quadratic loss , the strong growth condition naturally holds , with a constant depending on the batch size . Moreover , using Gaussian initialization for the neural network parameters , we can control the initial smoothness and near-isometry parameters involved in Theorem 1 with high probability . | This paper proved that a two-layer neural network with smooth activation and proper initialization can converge linearly to a global minima of training loss using mini-batch SGD when the width is larger than $\Omega(m^2/\sqrt{b})$ where $m$ is the number of training data and $b$ is batch size. As the batch size increases, this provides an interpolation between the quadratic result for SGD and the sub-quadratic result for full-batch GD. To prove this result, the authors first provide a general convergence result for SGD on a particular class of functions and then apply this framework to 2-layer neural networks to derive the width requirement. | SP:83f5e4ad9fa7ca35ada3a63eb113b1b1827b2926 |
HD-cos Networks: Efficient Neural Architechtures for Secure Multi-Party Computation | 1 INTRODUCTION . Machine learning models are often trained with user data that may contain private information . For example , in healthcare patients diagnostics contain sensitive information and in financial sectors , user data contains potentially private information such as salaries and taxes . In these applications , storing the user data in plain text format at a centralized server can be privacy invasive . There have been several efforts to design secure and private ways of learning and inferring machine learning models . In this work , we focus on secure multi-party computation ( MPC ) , a branch of cryptography that allows parties to collaboratively perform computations on data sets without revealing the data they possess to each other ( Evans et al. , 2017 ) . Recently , there are several research papers that proposed to train and infer machine learning models in a secure fashion via MPC ( Gilad-Bachrach et al. , 2016 ; Graepel et al. , 2012 ; Obla et al. , 2020 ) . Loosely speaking , in the MPC setup , a piece of sensitive data is split into multiple shards called secret shares , and each secret share is stored with a different party . These parties are further chosen such that their fundamental interests are to protect sensitive data and hence can be viewed as non-colluding . The cryptography guarantee states that unless all the parties ( or at least k out of all parties , depending on the cryptographic algorithm design ) collude , sensitive data can not be reconstructed and revealed to anyone/anything . Training in the MPC setup is challenging due to several reasons . Firstly , only limited data types ( e.g . integer ) and/or operations ( e.g . integer addition and multiplication ) are natively supported in most MPC algorithms . This increases the complexity to support non-trivial operations over MPC . Secondly , since data is encrypted into multiple secret shares and stored in multiple parties , one share per party , directly training a machine learning model on this data can be expensive , both in terms of communication between the servers and computation at the individual servers . More concretely if simple operations like addition and multiplications take orders of nanoseconds in the normal computation scenarios , in the MPC setup they can take milliseconds or more , if the operation requires the parties in the MPC setup to communicate with each other . Furthermore , one of the key bottlenecks of secret sharing mechanisms is that most non-linear operations e.g. , ReLU ( x ) = max ( 0 , x ) , can not be efficiently computed . In this paper , we address these questions by proposing a general network construct that can be implemented in MPC setup efficiently . Our proposal consists of two parts : 1 ) use the cosine function as the activation function , and 2 ) use a structured weight matrix based on the Hadamard transform in place of the standard fully connected layer . We provide an algorithm to compute cosine under twoparty computation ( 2PC ) setup . Unlike ReLU which involves multiple rounds of communication , our proposed algorithm for cosine requires only two online rounds of communication between the two computation servers . The use of the proposed Hadamard transform for weight matrices means that the number of parameters in each dense layer scales linearly with the input dimenion , as opposed to the standard dense layer which scales quadratically . We demonstrate on a number of challenging datasets that the combination of these two constructs leads to a model that is as accurate as the commonly used ReLU-based model with fully connected layers . The rest of the paper is organized as follows . We first overview multiparty computation in Section 2 and then overview related works in Section 3 . We present the cosine activation function and structured matrix transformation with theoretical motivations and analysis of their computational efficiency in Section 4 and Section 5 . We then provide extensive experimental evaluations on several datasets in Section 6 . 2 MULTI-PARTY COMPUTATION . Secure multi-party computation ( MPC ) is a branch of cryptography that allows two or more parties to collaboratively perform computations on data sets without revealing the data they possess to each other ( Evans et al. , 2017 ) . Following earlier works ( Liu et al. , 2017 ; Mohassel & Zhang , 2017 ; Kelkar et al. , 2021 ) , we focus on the two party computation ( 2PC ) setup . Our results can be extended to multi-party setup by existing mechanisms . If the two parties are non-colluding , then 2PC setup guarantees that the two parties will not learn anything from the computation process and hence there is no data leak . During training in the 2PC setup , each party receives features and labels of the training dataset in the form of secret shares . They compute and temporarily store all intermediate results in the form of secret shares . Thus during training , both the servers collaboratively learn a machine learning model , which again is split between two parties . Upon completion of the training process , the final result , i.e . the ML model itself , composed of trained parameters , are in secret shares to be held by each party in the 2PC setup . At prediction time , each party receives features in secret shares , and performs the prediction where all intermediate results are in secret shares . The MPC cluster sends the prediction results in secret share back to the caller who provided the features for prediction . The caller can combine all shares of the secret prediction result into its plaintext representation . In this entire training/prediction process , the MPC cluster does not learn any sensitive data . While MPC may provide security/privacy guarantee and is Turing complete , it might be significantly slower than equivalent plaintext operation . The overall performance of MPC is determined by the computation and communication cost . The computation cost in MPC is typically higher than the cost of equivalent operations in cleartext . The bigger bottleneck is the communication cost among the parties in the MPC setup . The communication cost has three components . • Number of rounds : the number of times that parties in the MPC setup need to communicate/synchronize with each other to complete the MPC crypto protocol . For 2PC , this is often equivalent to the number of Remote Procedure Calls ( or RPCs ) that the two parties need per the crypto protocol design . Many MPC algorithms differentiate offline rounds vs. online rounds , where the former is input-independent and can be performed asynchronously in advance , and the latter is input-dependent , is on the critical path for the computation and must be performed synchronously . For example , addition of additive secret shares requires no online rounds , whereas multiplication of additive secret shares requires one online round . • Network bandwidth : the number of bytes that parties in the MPC setup need to send to each other to complete the MPC crypto protocol . For 2PC , each RPC between the two parties has a request and response . The bandwidth cost is the sum of all the bytes to be transmitted in the request and response per the crypto protocol . • Network latency : the network latency is a property of the network connecting all parties in the MPC setup . It depends on the network technology ( e.g . 10 Gigabit Ethernet or 10GE ) , network topology , as well as applicable network Quality of Service ( QoS ) settings and the network load . In this work , we propose neural networks which can be implemented with a few online rounds of communication and little network bandwidth . Following earlier works , We consider neural network architectures where the majority of the parameters are on the fully connected layers . • We propose and systematically study using cosine as the activation and demonstrate that it achieves comparable performance to existing activation and can be efficiently implemented with two online rounds . • We show that dense matrices in neural networks can be replaced by structured matrices , which have comparable performance to existing neural network architectures and can be efficiently implemented in MPC setup by reducing the bandwidth . We show that by using structured matrices , we can reduce the number of per-layer secure multiplications from O ( d2 ) to O ( d ) , where d is the layer width , thus reducing the memory bandwidth . 3 RELATED WORKS . Neural network inference under MPC . Barni et al . ( 2006 ) considered inference of neural networks in the MPC setup , where the linear computations are done at the servers in the encrypted field and the non-linear activations are computed at the clients directly in plaintext . The main caveat of this approach is that , to compute a L layer neural network , L rounds of communication is required between server and clients which can be prohibitive and furthermore intermediate results are leaked to the clients , which may not be desired . To overcome the information leakage , Orlandi et al . ( 2007 ) proposed methods to hide the results of the intermediate data from the clients ; the method still requires multiple rounds of communication . Liu et al . ( 2017 ) proposed algorithms that allows for evaluating arbitrary neural networks ; the intermediate computations ( e.g. , sign ( x ) ) are much more expensive than summations and multiplications . Efficient activation functions . Since inferring arbitrary neural networks can be inefficient , several papers have proposed different activation functions which are easy to compute . Gilad-Bachrach et al . ( 2016 ) proposed to use the simple square activation function . They also proposed to use mean-pooling instead of max-pooling . Chabanne et al . ( 2017 ) also noticed the limited accuracy guarantees of the square function and proposed to approximate ReLU with a low degree polynomial and added a batch normalization layer to improve accuracy . Wu et al . ( 2018 ) proposed to train a polynomial as activation to improve the performance . Obla et al . ( 2020 ) proposed a different algorithm for approximating activation methods and showed that it achieves superior performance on several image recognition datasets . Recently Knott et al . ( 2021 ) released a library for training and inference of machine learning models in the multi-party setup . Cosine as activation function . Related to using cosine as the activation function , Yu et al . ( 2015 ) proposed the Compact Nonlinear Maps method which is equivalent of using cosine as the activation function for neural networks with one hidden layer . Parascandolo et al . ( 2016 ) studied using the sine function as activation . Xie et al . ( 2019 ) used cosine activation in deep kernel learning . Noel et al . ( 2021 ) proposed a variant of the cosine function called Growing Cosine Unit x cos ( x ) and shows that it can speed up training and reduce parameters in convolutions neural networks . All the above works are not under the MPC setup . Training machine learning models under MPC . Graepel et al . ( 2012 ) proposed to use training algorithms that can be expressed as low degree polynomials , so that the training phase can be done over encrypted data . Aslett et al . ( 2015 ) proposed algorithms to train models such as random forests over training data . Mohassel & Zhang ( 2017 ) proposed a 2PC setup for training and inference various types of models including neural networks where data is distributed to two non-colluding servers . Kelkar et al . ( 2021 ) proposed an efficient algorithm for Poisson regression by adding a secure exponentiation primitive . Combining with differential privacy . We note that while the focus of this work is multi-party computation , it can be combined with other privacy preserving techniques such as differential privacy ( Dwork et al. , 2014 ) . There are some recent works which combine MPC with differential privacy ( Jayaraman & Wang , 2018 ) . Systematically evaluating performances with the combination of our proposed technique and that of differential privacy remains an interesting future direction . | The paper proposes using a cosine activation function and Hadamard-Diagonal transformation as a means to improve the efficiency of MPC for machine learning. The paper considers a two-server model, where the training computation are carried out by two non-colluding parties. Experiments are provided to demonstrate the improvement on the test accuracy of the proposed approach over other baselines that use different activation functions. | SP:3a342130759e47057da1d63ad04c5e28e3955dbd |
HD-cos Networks: Efficient Neural Architechtures for Secure Multi-Party Computation | 1 INTRODUCTION . Machine learning models are often trained with user data that may contain private information . For example , in healthcare patients diagnostics contain sensitive information and in financial sectors , user data contains potentially private information such as salaries and taxes . In these applications , storing the user data in plain text format at a centralized server can be privacy invasive . There have been several efforts to design secure and private ways of learning and inferring machine learning models . In this work , we focus on secure multi-party computation ( MPC ) , a branch of cryptography that allows parties to collaboratively perform computations on data sets without revealing the data they possess to each other ( Evans et al. , 2017 ) . Recently , there are several research papers that proposed to train and infer machine learning models in a secure fashion via MPC ( Gilad-Bachrach et al. , 2016 ; Graepel et al. , 2012 ; Obla et al. , 2020 ) . Loosely speaking , in the MPC setup , a piece of sensitive data is split into multiple shards called secret shares , and each secret share is stored with a different party . These parties are further chosen such that their fundamental interests are to protect sensitive data and hence can be viewed as non-colluding . The cryptography guarantee states that unless all the parties ( or at least k out of all parties , depending on the cryptographic algorithm design ) collude , sensitive data can not be reconstructed and revealed to anyone/anything . Training in the MPC setup is challenging due to several reasons . Firstly , only limited data types ( e.g . integer ) and/or operations ( e.g . integer addition and multiplication ) are natively supported in most MPC algorithms . This increases the complexity to support non-trivial operations over MPC . Secondly , since data is encrypted into multiple secret shares and stored in multiple parties , one share per party , directly training a machine learning model on this data can be expensive , both in terms of communication between the servers and computation at the individual servers . More concretely if simple operations like addition and multiplications take orders of nanoseconds in the normal computation scenarios , in the MPC setup they can take milliseconds or more , if the operation requires the parties in the MPC setup to communicate with each other . Furthermore , one of the key bottlenecks of secret sharing mechanisms is that most non-linear operations e.g. , ReLU ( x ) = max ( 0 , x ) , can not be efficiently computed . In this paper , we address these questions by proposing a general network construct that can be implemented in MPC setup efficiently . Our proposal consists of two parts : 1 ) use the cosine function as the activation function , and 2 ) use a structured weight matrix based on the Hadamard transform in place of the standard fully connected layer . We provide an algorithm to compute cosine under twoparty computation ( 2PC ) setup . Unlike ReLU which involves multiple rounds of communication , our proposed algorithm for cosine requires only two online rounds of communication between the two computation servers . The use of the proposed Hadamard transform for weight matrices means that the number of parameters in each dense layer scales linearly with the input dimenion , as opposed to the standard dense layer which scales quadratically . We demonstrate on a number of challenging datasets that the combination of these two constructs leads to a model that is as accurate as the commonly used ReLU-based model with fully connected layers . The rest of the paper is organized as follows . We first overview multiparty computation in Section 2 and then overview related works in Section 3 . We present the cosine activation function and structured matrix transformation with theoretical motivations and analysis of their computational efficiency in Section 4 and Section 5 . We then provide extensive experimental evaluations on several datasets in Section 6 . 2 MULTI-PARTY COMPUTATION . Secure multi-party computation ( MPC ) is a branch of cryptography that allows two or more parties to collaboratively perform computations on data sets without revealing the data they possess to each other ( Evans et al. , 2017 ) . Following earlier works ( Liu et al. , 2017 ; Mohassel & Zhang , 2017 ; Kelkar et al. , 2021 ) , we focus on the two party computation ( 2PC ) setup . Our results can be extended to multi-party setup by existing mechanisms . If the two parties are non-colluding , then 2PC setup guarantees that the two parties will not learn anything from the computation process and hence there is no data leak . During training in the 2PC setup , each party receives features and labels of the training dataset in the form of secret shares . They compute and temporarily store all intermediate results in the form of secret shares . Thus during training , both the servers collaboratively learn a machine learning model , which again is split between two parties . Upon completion of the training process , the final result , i.e . the ML model itself , composed of trained parameters , are in secret shares to be held by each party in the 2PC setup . At prediction time , each party receives features in secret shares , and performs the prediction where all intermediate results are in secret shares . The MPC cluster sends the prediction results in secret share back to the caller who provided the features for prediction . The caller can combine all shares of the secret prediction result into its plaintext representation . In this entire training/prediction process , the MPC cluster does not learn any sensitive data . While MPC may provide security/privacy guarantee and is Turing complete , it might be significantly slower than equivalent plaintext operation . The overall performance of MPC is determined by the computation and communication cost . The computation cost in MPC is typically higher than the cost of equivalent operations in cleartext . The bigger bottleneck is the communication cost among the parties in the MPC setup . The communication cost has three components . • Number of rounds : the number of times that parties in the MPC setup need to communicate/synchronize with each other to complete the MPC crypto protocol . For 2PC , this is often equivalent to the number of Remote Procedure Calls ( or RPCs ) that the two parties need per the crypto protocol design . Many MPC algorithms differentiate offline rounds vs. online rounds , where the former is input-independent and can be performed asynchronously in advance , and the latter is input-dependent , is on the critical path for the computation and must be performed synchronously . For example , addition of additive secret shares requires no online rounds , whereas multiplication of additive secret shares requires one online round . • Network bandwidth : the number of bytes that parties in the MPC setup need to send to each other to complete the MPC crypto protocol . For 2PC , each RPC between the two parties has a request and response . The bandwidth cost is the sum of all the bytes to be transmitted in the request and response per the crypto protocol . • Network latency : the network latency is a property of the network connecting all parties in the MPC setup . It depends on the network technology ( e.g . 10 Gigabit Ethernet or 10GE ) , network topology , as well as applicable network Quality of Service ( QoS ) settings and the network load . In this work , we propose neural networks which can be implemented with a few online rounds of communication and little network bandwidth . Following earlier works , We consider neural network architectures where the majority of the parameters are on the fully connected layers . • We propose and systematically study using cosine as the activation and demonstrate that it achieves comparable performance to existing activation and can be efficiently implemented with two online rounds . • We show that dense matrices in neural networks can be replaced by structured matrices , which have comparable performance to existing neural network architectures and can be efficiently implemented in MPC setup by reducing the bandwidth . We show that by using structured matrices , we can reduce the number of per-layer secure multiplications from O ( d2 ) to O ( d ) , where d is the layer width , thus reducing the memory bandwidth . 3 RELATED WORKS . Neural network inference under MPC . Barni et al . ( 2006 ) considered inference of neural networks in the MPC setup , where the linear computations are done at the servers in the encrypted field and the non-linear activations are computed at the clients directly in plaintext . The main caveat of this approach is that , to compute a L layer neural network , L rounds of communication is required between server and clients which can be prohibitive and furthermore intermediate results are leaked to the clients , which may not be desired . To overcome the information leakage , Orlandi et al . ( 2007 ) proposed methods to hide the results of the intermediate data from the clients ; the method still requires multiple rounds of communication . Liu et al . ( 2017 ) proposed algorithms that allows for evaluating arbitrary neural networks ; the intermediate computations ( e.g. , sign ( x ) ) are much more expensive than summations and multiplications . Efficient activation functions . Since inferring arbitrary neural networks can be inefficient , several papers have proposed different activation functions which are easy to compute . Gilad-Bachrach et al . ( 2016 ) proposed to use the simple square activation function . They also proposed to use mean-pooling instead of max-pooling . Chabanne et al . ( 2017 ) also noticed the limited accuracy guarantees of the square function and proposed to approximate ReLU with a low degree polynomial and added a batch normalization layer to improve accuracy . Wu et al . ( 2018 ) proposed to train a polynomial as activation to improve the performance . Obla et al . ( 2020 ) proposed a different algorithm for approximating activation methods and showed that it achieves superior performance on several image recognition datasets . Recently Knott et al . ( 2021 ) released a library for training and inference of machine learning models in the multi-party setup . Cosine as activation function . Related to using cosine as the activation function , Yu et al . ( 2015 ) proposed the Compact Nonlinear Maps method which is equivalent of using cosine as the activation function for neural networks with one hidden layer . Parascandolo et al . ( 2016 ) studied using the sine function as activation . Xie et al . ( 2019 ) used cosine activation in deep kernel learning . Noel et al . ( 2021 ) proposed a variant of the cosine function called Growing Cosine Unit x cos ( x ) and shows that it can speed up training and reduce parameters in convolutions neural networks . All the above works are not under the MPC setup . Training machine learning models under MPC . Graepel et al . ( 2012 ) proposed to use training algorithms that can be expressed as low degree polynomials , so that the training phase can be done over encrypted data . Aslett et al . ( 2015 ) proposed algorithms to train models such as random forests over training data . Mohassel & Zhang ( 2017 ) proposed a 2PC setup for training and inference various types of models including neural networks where data is distributed to two non-colluding servers . Kelkar et al . ( 2021 ) proposed an efficient algorithm for Poisson regression by adding a secure exponentiation primitive . Combining with differential privacy . We note that while the focus of this work is multi-party computation , it can be combined with other privacy preserving techniques such as differential privacy ( Dwork et al. , 2014 ) . There are some recent works which combine MPC with differential privacy ( Jayaraman & Wang , 2018 ) . Systematically evaluating performances with the combination of our proposed technique and that of differential privacy remains an interesting future direction . | MPC is a cryptographic technique to allow multiple party to jointly compute a protocol without leaking sensitive data, but building blocks in the neural network converted to MPC setup usually suffer from heavy communication overhead among parties, and jointly training ML models is also computationally expensive. So, in this work, authors propose an efficient MPC-based neural network. The network consists of cosine function as activation function under 2PC setup and linear transformations by Hadamard-Diagonal method. | SP:3a342130759e47057da1d63ad04c5e28e3955dbd |
Contextual Multi-Armed Bandit with Communication Constraints | 1 INTRODUCTION . In the last few years , synergies between Machine Learning ( ML ) and communication networks have attracted a lot of interest in the research community , thanks to the fruitful interplay of the two fields in emerging applications from Internet of things ( IoT ) to autonomous vehicles and other edge services . In most of these applications , both the generated data and the processing power is distributed across a network of physically distant devices , thus a reliable communication infrastructure is pivotal to run ML algorithms that can leverage the collected distributed knowledge ( Park et al. , 2019 ) . To this end , a lot of recent works have tried to redesign networks and to efficiently represent information to support distributed ML applications , where the activities of data collection , processing , learning and inference are performed in different geographical locations , and should consider limited communication , memory , or processing resources , as well as addressing privacy issues . In contrast to the insatiable growth in our desire to gather more data and intelligence , available communication resources ( bandwidth and power , in particular ) are highly limited , and must be shared among many different devices and applications . This requires the design of highly communicationefficient distributed learning algorithms , particularly for edge applications . Information theory , in particular the rate-distortion theory , have laid the fundamental limits of efficient data compression with the aim to reconstructing the source signal with the highest fidelity ( Cover & Thomas , 2006b ) . However , in the aforementioned applications , the goal is often not to reconstruct the source signal , but to make some inference based on that . This requires task-oriented compression , filtering out the unnecessary information for the target application , and thus decreasing the number of bits that have to be transmitted over the communication networks . This approach should target the questions of what is the most useful information that has to be sent , and how to represent it , in order to meet the application requirements consuming the minimum amount of network resources . Our goal in this paper is to investigate a theoretically grounded method to efficiently transmit data in a Contextual Multi-Armed Bandit ( CMAB ) problem , in which the context information is available to a decision-maker , whereas the actions can be taken by a remote entity , called controller , controlling a multitude of agents . We assume that a limited communication link is available between the decisionmaker and the controller to communicate at each round the intended actions . The controller must decide on the actions to take based on the message received over the channel , while the decisionmaker observes the rewards at each round , and updates its policy accordingly . This scenario can model , for example , a personalized ad placement application , where the content owner observes the individual visitors to its website ; and hence , has the context information , but must convey the ads that must be shown to each visitor to a separate entity that manages the marketing content . This will require communicating hundreds or thousands of adds to be placed at each round , from among a large set of possible adds , within the communication resource and delay constraints of the underlying communication channel , which is quantified as the number of bits available per agent . This problem may arise in other similar applications of CMABs with communication constraints between the decision-maker and the controller ( Bouneffouf & Rish , 2019 ) . 1.1 RELATED WORK . Given the amount of data that is generated by machines , sensors and mobile devices , the design of distributed learning algorithms is a hot topic in the ML literature . These algorithms often impose communication constraints among agents , requiring the design of methods that would allow efficient representation of messages to be exchanged . While rate-distortion theory deals with efficient lossy transmission of signals ( Cover & Thomas , 2006b ) , in ML applications , we typically do not need to reconstruct the underlying signal , but make some inference based on that . These applications can be modeled through distributed hypothesis testing ( Berger , Sep. 1979 ; Ahlswede & Csiszár , 1986 ) and estimation ( Zhang et al. , 2013 ; Xu & Raginsky , 2017 ) problems under rate constraints . In parallel to the theoretical rate-distortion analysis , significant research efforts have been invested in the design of practical data compression algorithms , focusing on specific information sources , such as JPEG and BPG for image compression , or MPEG and H.264 for video compression . While adapting these tools to specific inference tasks is difficult , recently deep learning techniques have been employed to learn task-specific compression algorithms ( Torfason et al. , 2018 ; Jankowski et al. , 2021 ) , which achieve significant efficiency by bypassing image reconstruction . While the above mainly focus on the inference task through supervised learning , here we consider the CMAB problem . There is a growing literature on multi-agent Reinforcement Learning ( RL ) problems with communication links ( Foerster et al. , 2016 ; Sukhbaatar et al. , 2016 ; Havrylov & Titov , 2017 ; Lazaridou et al. , 2017 ) . These papers consider a multi-agent partially observable Markov decision process ( POMDP ) , where the agents collaborate to resolve a specific task . In addition to the usual reward signals , agents can also benefit from the available communication links to better cooperate and coordinate their actions . It is shown that communication can help overcome the inherent non-stationarity of the multi-agent environment . Our problem can be considered as a special case of this general RL formulation , where the state at each time is independent of the past states and actions . Moreover , we focus on a particular setting in which the communication is one-way , from the decision-maker that observes the state and the reward , towards the controller that takes the actions . This formulation is different from the existing results in the literature involving multi-agent Multi-Armed Bandit ( MAB ) . In Agarwal et al . ( 2021 ) , each agent can pull an arm and communicate with others . They do not consider the contextual case , and focus on a particular communication scheme , where each agent shares the index of the best arm according to its experience . Another related formulation is proposed in Hanna et al . ( 2021 ) , where a pool of agents collaborate to solve a common MAB problem with a rate-constrained communication channel from the agents to the server . In this case , agents observe their rewards and upload them to the server , which in turn updates the policy used to instruct them . In Park & Faradonbeh ( 2021 ) , the authors consider a partially observable CMAB scenario , where the agent has only partial information about the context . However , this paper does not consider any communication constraint , and the partial/ noisy view of the context is generated by nature . Differently from the existing literature , our goal here is to identify the fundamental information theoretic limits of learning with communication constraints in this particular scenario . 2 PROBLEM FORMULATION . 2.1 CONTEXTUAL MULTI-ARMED BANDIT ( CMAB ) PROBLEM . We considerN agents , which experience independent realizations of the same CMAB problem . The CMAB is a sequential decision game in which the environment imposes a probability distribution PS over a set of contexts , or states , S , which is finite in our case . The game proceeds in rounds , and at each round t = 1 , . . . , T , a realization of the state st , i ∈ S is sampled from the distribution PS for each agent i ∈ { 1 , . . . , N } . At each time step t , and for each agent i , states are sampled iid according to PS . In the usual CMAB setting , the decision-maker would observe the states { st , i } Ni=1 of the agents , and choose an action ( or arm ) at , i ∈ { 1 , . . . , K } = A , for each agent , where K is the total number of available actions , with probability πt , i ( at , i|st , i ) given by a ( possibly ) stochastic policy πt : S → ∆K . Here ∆K is the K-dimensional simplex , containing all possible distributions over the set of actions . Once the actions have been taken by all the agents , at each round t the environment returns rewards for all the agents following independent realizations of the same reward process , rt , i = r ( st , i , at , i ) ∼ PR ( r|st , i , at , i ) , ∀i ∈ { 1 , . . . , N } , which depends on the state and the action of the corresponding agent . Based on the history of returns up to round t − 1 , the decision-maker can optimize its policy to maximize the sum of the rewards G = ∑T t=1 ∑N i=1 rt , i . 2.2 RATE-CONSTRAINED CMAB . In our modified version , the process of observing the system states is spatially separated from the process of taking the actions . The environment states , { st , i } Ni=1 , are observed by a central entity , called the decision-maker , that has to communicate to the controller over a rateconstrained communication channel , at each round t , the information about the actions { at , i } Ni=1 the agents should take . The decision-maker can exploit the knowledge accumulated from the states and rewards observed by all the agents up to round t − 1 , denoted by H ( t − 1 ) = { ( { s1 , i } Ni=1 , { a1 , i } N i=1 , { r1 , i } N i=1 ) , . . . , ( { st−1 , i } N i=1 , { at−1 , i } N i=1 , { rt−1 , i } N i=1 ) , } ∈ H ( t−1 ) , to optimize the policy to be used at round t. Consequently , the problem is to communicate the action distribution , i.e. , the policy πt ( a|st ) , which depends on the specific state realizations observed in round t , to the controller within the available communication resources while inciting the minimal impact on the performance of the learning algorithm . Specifically , the decision-maker employs function f ( N ) t : H ( t−1 ) ×SN → { 1 , 2 , . . . , B } to map the history up to time t and the states of the agents at time t to a message index to be transmitted over the channel . The controller , on the other hand , employs a function g ( N ) t : { 1 , 2 , . . . , B } → AN to map the received message to a set of actions for the agents . In general , both functions f ( N ) t and g ( N ) t can be stochastic . Average per period regret achieved by sequences { f ( N ) t , g ( N ) t } T t=1 is given by ρ ( N ) ( T ) = 1 T E [ T∑ t=1 N∑ i=1 r ( st , i , a ∗ ( st , i ) − r ( st , i , at ) ] , ( 1 ) where at , i = gt , i ( m ( t ) ) is the action taken by agent i based on message m ( t ) = f ( N ) t ( H ( t− 1 ) , { st , i } Ni=1 ) transmitted in round t , a∗ ( st , i ) is the action with maximum mean reward in state st , i , i.e. , the optimal action , and the expectation is taken with respect to the state distribution PS and reward distribution PR . We say that , for a given time period T and N agents , an av- erage regret- communication rate pair ( ρ , R ) is achievable if there exist functions { f ( N ) t , g ( N ) t } T t=1 as defined above with rate 1N log2B ≤ R and regret ρ ( N ) ( T ) ≤ ρ . If a sufficiently large rate is available for communication , i.e. , R ≥ logK , then the intended action for each agent can be reliably conveyed to the controller . Otherwise , to achieve the learning goal while satisfying the rate constraint , the decision-maker must apply a lossy compression scheme , such that the action distribution adopted by the pool of agents resembles the intended policy as much as possible . | This paper studies a CMAB problem where the actions for multiple agents are sent from the decision-maker over a rate-limited communication channel. The authors developed information-theoretic performance bound for Thompson sampling based policies, which reduce the problem to transmitting conditional probability distributions over a communication channel. A practical coding method was also developed. Numerical experiments were carried out to validate the proposed design. | SP:68a322bf79a790fb6fac85ebb81f37ba3014d24b |
Contextual Multi-Armed Bandit with Communication Constraints | 1 INTRODUCTION . In the last few years , synergies between Machine Learning ( ML ) and communication networks have attracted a lot of interest in the research community , thanks to the fruitful interplay of the two fields in emerging applications from Internet of things ( IoT ) to autonomous vehicles and other edge services . In most of these applications , both the generated data and the processing power is distributed across a network of physically distant devices , thus a reliable communication infrastructure is pivotal to run ML algorithms that can leverage the collected distributed knowledge ( Park et al. , 2019 ) . To this end , a lot of recent works have tried to redesign networks and to efficiently represent information to support distributed ML applications , where the activities of data collection , processing , learning and inference are performed in different geographical locations , and should consider limited communication , memory , or processing resources , as well as addressing privacy issues . In contrast to the insatiable growth in our desire to gather more data and intelligence , available communication resources ( bandwidth and power , in particular ) are highly limited , and must be shared among many different devices and applications . This requires the design of highly communicationefficient distributed learning algorithms , particularly for edge applications . Information theory , in particular the rate-distortion theory , have laid the fundamental limits of efficient data compression with the aim to reconstructing the source signal with the highest fidelity ( Cover & Thomas , 2006b ) . However , in the aforementioned applications , the goal is often not to reconstruct the source signal , but to make some inference based on that . This requires task-oriented compression , filtering out the unnecessary information for the target application , and thus decreasing the number of bits that have to be transmitted over the communication networks . This approach should target the questions of what is the most useful information that has to be sent , and how to represent it , in order to meet the application requirements consuming the minimum amount of network resources . Our goal in this paper is to investigate a theoretically grounded method to efficiently transmit data in a Contextual Multi-Armed Bandit ( CMAB ) problem , in which the context information is available to a decision-maker , whereas the actions can be taken by a remote entity , called controller , controlling a multitude of agents . We assume that a limited communication link is available between the decisionmaker and the controller to communicate at each round the intended actions . The controller must decide on the actions to take based on the message received over the channel , while the decisionmaker observes the rewards at each round , and updates its policy accordingly . This scenario can model , for example , a personalized ad placement application , where the content owner observes the individual visitors to its website ; and hence , has the context information , but must convey the ads that must be shown to each visitor to a separate entity that manages the marketing content . This will require communicating hundreds or thousands of adds to be placed at each round , from among a large set of possible adds , within the communication resource and delay constraints of the underlying communication channel , which is quantified as the number of bits available per agent . This problem may arise in other similar applications of CMABs with communication constraints between the decision-maker and the controller ( Bouneffouf & Rish , 2019 ) . 1.1 RELATED WORK . Given the amount of data that is generated by machines , sensors and mobile devices , the design of distributed learning algorithms is a hot topic in the ML literature . These algorithms often impose communication constraints among agents , requiring the design of methods that would allow efficient representation of messages to be exchanged . While rate-distortion theory deals with efficient lossy transmission of signals ( Cover & Thomas , 2006b ) , in ML applications , we typically do not need to reconstruct the underlying signal , but make some inference based on that . These applications can be modeled through distributed hypothesis testing ( Berger , Sep. 1979 ; Ahlswede & Csiszár , 1986 ) and estimation ( Zhang et al. , 2013 ; Xu & Raginsky , 2017 ) problems under rate constraints . In parallel to the theoretical rate-distortion analysis , significant research efforts have been invested in the design of practical data compression algorithms , focusing on specific information sources , such as JPEG and BPG for image compression , or MPEG and H.264 for video compression . While adapting these tools to specific inference tasks is difficult , recently deep learning techniques have been employed to learn task-specific compression algorithms ( Torfason et al. , 2018 ; Jankowski et al. , 2021 ) , which achieve significant efficiency by bypassing image reconstruction . While the above mainly focus on the inference task through supervised learning , here we consider the CMAB problem . There is a growing literature on multi-agent Reinforcement Learning ( RL ) problems with communication links ( Foerster et al. , 2016 ; Sukhbaatar et al. , 2016 ; Havrylov & Titov , 2017 ; Lazaridou et al. , 2017 ) . These papers consider a multi-agent partially observable Markov decision process ( POMDP ) , where the agents collaborate to resolve a specific task . In addition to the usual reward signals , agents can also benefit from the available communication links to better cooperate and coordinate their actions . It is shown that communication can help overcome the inherent non-stationarity of the multi-agent environment . Our problem can be considered as a special case of this general RL formulation , where the state at each time is independent of the past states and actions . Moreover , we focus on a particular setting in which the communication is one-way , from the decision-maker that observes the state and the reward , towards the controller that takes the actions . This formulation is different from the existing results in the literature involving multi-agent Multi-Armed Bandit ( MAB ) . In Agarwal et al . ( 2021 ) , each agent can pull an arm and communicate with others . They do not consider the contextual case , and focus on a particular communication scheme , where each agent shares the index of the best arm according to its experience . Another related formulation is proposed in Hanna et al . ( 2021 ) , where a pool of agents collaborate to solve a common MAB problem with a rate-constrained communication channel from the agents to the server . In this case , agents observe their rewards and upload them to the server , which in turn updates the policy used to instruct them . In Park & Faradonbeh ( 2021 ) , the authors consider a partially observable CMAB scenario , where the agent has only partial information about the context . However , this paper does not consider any communication constraint , and the partial/ noisy view of the context is generated by nature . Differently from the existing literature , our goal here is to identify the fundamental information theoretic limits of learning with communication constraints in this particular scenario . 2 PROBLEM FORMULATION . 2.1 CONTEXTUAL MULTI-ARMED BANDIT ( CMAB ) PROBLEM . We considerN agents , which experience independent realizations of the same CMAB problem . The CMAB is a sequential decision game in which the environment imposes a probability distribution PS over a set of contexts , or states , S , which is finite in our case . The game proceeds in rounds , and at each round t = 1 , . . . , T , a realization of the state st , i ∈ S is sampled from the distribution PS for each agent i ∈ { 1 , . . . , N } . At each time step t , and for each agent i , states are sampled iid according to PS . In the usual CMAB setting , the decision-maker would observe the states { st , i } Ni=1 of the agents , and choose an action ( or arm ) at , i ∈ { 1 , . . . , K } = A , for each agent , where K is the total number of available actions , with probability πt , i ( at , i|st , i ) given by a ( possibly ) stochastic policy πt : S → ∆K . Here ∆K is the K-dimensional simplex , containing all possible distributions over the set of actions . Once the actions have been taken by all the agents , at each round t the environment returns rewards for all the agents following independent realizations of the same reward process , rt , i = r ( st , i , at , i ) ∼ PR ( r|st , i , at , i ) , ∀i ∈ { 1 , . . . , N } , which depends on the state and the action of the corresponding agent . Based on the history of returns up to round t − 1 , the decision-maker can optimize its policy to maximize the sum of the rewards G = ∑T t=1 ∑N i=1 rt , i . 2.2 RATE-CONSTRAINED CMAB . In our modified version , the process of observing the system states is spatially separated from the process of taking the actions . The environment states , { st , i } Ni=1 , are observed by a central entity , called the decision-maker , that has to communicate to the controller over a rateconstrained communication channel , at each round t , the information about the actions { at , i } Ni=1 the agents should take . The decision-maker can exploit the knowledge accumulated from the states and rewards observed by all the agents up to round t − 1 , denoted by H ( t − 1 ) = { ( { s1 , i } Ni=1 , { a1 , i } N i=1 , { r1 , i } N i=1 ) , . . . , ( { st−1 , i } N i=1 , { at−1 , i } N i=1 , { rt−1 , i } N i=1 ) , } ∈ H ( t−1 ) , to optimize the policy to be used at round t. Consequently , the problem is to communicate the action distribution , i.e. , the policy πt ( a|st ) , which depends on the specific state realizations observed in round t , to the controller within the available communication resources while inciting the minimal impact on the performance of the learning algorithm . Specifically , the decision-maker employs function f ( N ) t : H ( t−1 ) ×SN → { 1 , 2 , . . . , B } to map the history up to time t and the states of the agents at time t to a message index to be transmitted over the channel . The controller , on the other hand , employs a function g ( N ) t : { 1 , 2 , . . . , B } → AN to map the received message to a set of actions for the agents . In general , both functions f ( N ) t and g ( N ) t can be stochastic . Average per period regret achieved by sequences { f ( N ) t , g ( N ) t } T t=1 is given by ρ ( N ) ( T ) = 1 T E [ T∑ t=1 N∑ i=1 r ( st , i , a ∗ ( st , i ) − r ( st , i , at ) ] , ( 1 ) where at , i = gt , i ( m ( t ) ) is the action taken by agent i based on message m ( t ) = f ( N ) t ( H ( t− 1 ) , { st , i } Ni=1 ) transmitted in round t , a∗ ( st , i ) is the action with maximum mean reward in state st , i , i.e. , the optimal action , and the expectation is taken with respect to the state distribution PS and reward distribution PR . We say that , for a given time period T and N agents , an av- erage regret- communication rate pair ( ρ , R ) is achievable if there exist functions { f ( N ) t , g ( N ) t } T t=1 as defined above with rate 1N log2B ≤ R and regret ρ ( N ) ( T ) ≤ ρ . If a sufficiently large rate is available for communication , i.e. , R ≥ logK , then the intended action for each agent can be reliably conveyed to the controller . Otherwise , to achieve the learning goal while satisfying the rate constraint , the decision-maker must apply a lossy compression scheme , such that the action distribution adopted by the pool of agents resembles the intended policy as much as possible . | This work studies a rate-constrained contextual multi arm bandit (RC-CMAB) problem: the decision maker has to make action decisions for multiple parallel (independent and identical) CMAB problems (i.e. agents), but can only communicate the actions for each CMAB problem to a controller through a rate-constrained communication channel, from which the controller receives and decodes the actions of the decision maker, and applies such decoded decisions to each CMAB. The paper first formulates the problem as a policy compression problem under an information theoretic framework, and then characterizes the optimal compression scheme for infinite agents. Next, the paper presents a practical coding scheme to communicate actions to finite agents under rate constraints, and finally benchmarks its performance against the compression scheme in the asymptotic regime. | SP:68a322bf79a790fb6fac85ebb81f37ba3014d24b |
Space-Time Graph Neural Networks | We introduce space-time graph neural network ( ST-GNN ) , a novel GNN architecture , tailored to jointly process the underlying space-time topology of time-varying network data . The cornerstone of our proposed architecture is the composition of time and graph convolutional filters followed by pointwise nonlinear activation functions . We introduce a generic definition of convolution operators that mimic the diffusion process of signals over its underlying support . On top of this definition , we propose space-time graph convolutions that are built upon a composition of time and graph shift operators . We prove that ST-GNNs with multivariate integral Lipschitz filters are stable to small perturbations in the underlying graphs as well as small perturbations in the time domain caused by time warping . Our analysis shows that small variations in the network topology and time evolution of a system does not significantly affect the performance of ST-GNNs . Numerical experiments with decentralized control systems showcase the effectiveness and stability of the proposed ST-GNNs . 1 INTRODUCTION . Graph Neural Networks ( GNNs ) are powerful convolutional architectures designed for network data . GNNs inherit all the favorable properties convolutional neural networks ( CNNs ) admit , while they also exploit the graph structure . An important feature of GNNs , germane to their success , is that the number of learnable parameters is independent of the size of the underlying networks . GNNs have manifested remarkable performance in a plethora of applications , e.g. , recommendation systems ( Ying et al. , 2018 ; Wu et al. , 2020 ) , drug discovery and biology ( Gainza et al. , 2020 ; Strokach et al. , 2020 ; Wu et al. , 2021 ; Jiang et al. , 2021 ) , resource allocation in autonomous systems ( Lima et al. , 2020 ; Cranmer et al. , 2021 ) , to name a few . Recently , there has been an increased interest in time-varying network data , as they appear in various systems and carry valuable dynamical information . This interest is mostly prominent in applications as decentralized controllers ( Tolstaya et al. , 2020 ; Gama et al. , 2020b ; Yang and Matni , 2021 ; Gama and Sojoudi , 2021 ) , traffic-flow forecasting ( Yu et al. , 2018 ; Li et al. , 2018 ; Fang et al. , 2021 ) , and skeleton-based action detection ( Yan et al. , 2018 ; Cheng et al. , 2020 ; Pan et al. , 2021 ) . The state-ofthe-art ( SOTA ) usually deploys an additional architecture side by side with a GNN so the latter learns patterns from the graph domain while the former works on the time sequences . One choice could be a CNN as in ( Li et al. , 2020 ; Isufi and Mazzola , 2021 ; Wang et al. , 2021 ) or a recurrent neural network ( RNN ) as in ( Seo et al. , 2018 ; Nicolicioiu et al. , 2019 ; Ruiz et al. , 2020 ) . However , these joint architectures are performed in a centralized manner in the sense that the up-to-date data of all nodes are given at any given time . While this is well suited for , but not limited to , the case of social networks and recommendation systems , many physical-network applications are decentralized in nature and suffer from time delays in delivering messages . In this paper , we close the gap by developing a causal space-time convolutional architecture that jointly processes the graph-time underlying structure . That is , the convolutional layers preserve time delays in message passing . Our work is motivated by the following question . Is it possible to transfer learning between signals and datasets defined over different space-time underlying structures ? This is a well motivated question since in practice we execute these architectures on graphs that are different from the graphs used in training and signals are sampled at different sampling rates between training and execution . The answer to the above question was provided for the case of static graph signals in ( Gama et al. , 2020a ) , where the stability of traditional GNNs to graph perturbations was proved . In this work we give an affirmative answer to the above question in the case when time-varying graph signals are considered and space-time convolutional architectures are employed . The contribution of this paper is twofold . First we introduce a novel convolutional architecture for time-varying graph signals , and second we prove its stability . Specifically , we provide a general definition of convolutions for any arbitrary shift operator and define a space-time shift operator ( STSO ) as the linear composition of the graph shift operator ( GSO ) and time-shift operator ( TSO ) . We then introduce space-time graph neural networks ( ST-GNNs ) , a cascade of layers that consist of space-time graph filters followed by point-wise nonlinear activation functions . The proposed ST-GNN allows processing continuous-time graph signals , which is pivotal in the stability analysis . Furthermore , we study the effect of relative perturbations on ST-GNNs and prove that small variations in the graph and/or irregularities in the sampling process of time-varying graph signals do not essentially affect the performance of the proposed ST-GNN architecture . Our theoretical findings are also supported by thorough experimental analysis based on decentralized control applications . The rest of this paper is structured as follows . The related work is summarized in Section 2 . Sections 3 and 4 present our contributions listed above . Numerical experiments and conclusions are presented in Sections 5 and 6 , respectively . The proofs and extended experiments are provided in the appendices . Notation : Bold small and large symbols , i.e . x and X , denote vectors and matrices , respectively . Calligraphic letters mainly represent time-varying graph signals unless otherwise is stated . 2 RELATED WORK . GNNs for Time-varying Graph Signals . One of the early architectures was ( Yan et al. , 2018 ) , which introduced a convolutional filter that aggregates information only from 1-hop neighbors . Relying on product graphs , ( Isufi and Mazzola , 2021 ) introduced a convolutional architecture , where each node has access to the present and past data of the other nodes in the graph . A similar convolutional layer was studied in ( Pan et al. , 2021 ; Loukas and Foucard , 2016 ) , and while restricted to a domain that preserves time delays , ( Pan et al. , 2021 ) shows that it is not necessarily less expressive . Meanwhile , ( Wang et al. , 2021 ) performs GNNs over graph signals at each time instance separately before a temporal convolution is performed at the GNN outputs to capture the evolution of graph embeddings . Graph ( RNNs ) are another architecture developed to deal with time-varying graph signals . For example , ( Pareja et al. , 2020 ) uses an RNN to evolve the GNN parameters over time . Moreover , ( Hajiramezanali et al. , 2019 ) combined the GRNN with a variational autoencoder ( VGAE ) to improve the former ’ s expressive power . However , all these architectures did not take into account the physical restrictions in the form of time delays , associated with decentralized applications . Similar to our work , other architectures considered the diffusion equation to form message-passing layers , e.g. , ( Xhonneux et al. , 2020 ; Poli et al. , 2021 ; Fang et al. , 2021 ) . These architectures parameterize the dynamics of graph signals with GNNs . In simple words , they learn a parameterization that helps find the current state variables from the previous ones . The architecture in ( Chamberlain et al. , 2021 ) is another example of these architectures , but learns the graph weights instead of a limited number of filter coefficients ( i.e. , it resembles the parameterization of graph attention networks in ( Veličković et al. , 2018 ) ) . Stability . Deformation stability of CNNs was studied in ( Bruna and Mallat , 2013 ; Bietti and Mairal , 2019 ) . The notion of stability was then introduced to graph scattering transforms in ( Gama et al. , 2019 ; Zou and Lerman , 2020 ) . In a following work , Gama et al . ( 2020a ) presented a study of GNN stability to graph absolute and relative perturbations . Graphon neural networks was also analyzed in terms of its stability in ( Ruiz et al. , 2021 ) . Moreover , ( Pan et al. , 2021 ) proves the stability to absolute perturbations of space-time graph scattering transforms . 3 SPACE-TIME GRAPH NEURAL NETWORKS . In this section , we present the proposed ST-GNN architecture for time-varying graph signals . First , we provide a general definition of convolutions and then we develop the space-time graph filters , which are the cornerstone of the ST-GNN architecture . Our analysis starts with the homogeneous diffusion equation , which is defined with respect to the Laplacian differential operator L ∂X ( t ) ∂t = −LX ( t ) . ( 1 ) Equation ( 1 ) describes processes of signals that evolve across the diffusion dimension , t. The diffused signal , X ( t ) , is modeled as an abstract vector in a vector space V. The vector space is associated with an inner product ⟨. , .⟩V , and is closed under addition and scalar multiplication , e.g. , n-dimensional vector spaces and function spaces . The solution of ( 1 ) is X ( t ) = e−tLX ( 0 ) = e−tLX0 = e−tLX ( the subscript is omitted in what follows ) , and describes the signal after time t from the initial state . 3.1 CONVOLUTION . With the diffusion equation in our hands , we can now define the convolution operation as the linear combination of the diffusion sequence with a filter h ( t ) . Definition 1 ( Convolution Operator ) . For a linear shift-invariant filter with coefficients h ( t ) , t ≥ 0 , the convolution between the filter and an input signal X ∈ V , with respect to a linear differential operator L : V → V , is defined as h ∗D X = ∫ ∞ 0 h ( t ) e−tLXdt , ( 2 ) where ∗D denotes the convolution operator applied on signals with underlying structure D. Definition 1 is a valid convolution operator . With abuse of notation , we refer to L as the shift operator but it should be understood that the shift operation is executed using e−L . Definition 1 establishes a generalized form of convolutions for a wide variety of shift operators and signals . Next we discuss two convolution types of practical interest that follow directly from ( 2 ) , i.e. , time convolutions and graph convolutions . Time Convolutions : They involve continuous-time signals , denoted by x ( τ ) , that are elements of square-integrable function spaces , i.e , x ( τ ) ∈ L2 ( R ) . The underlying structure of x ( τ ) is the real line , since the time variable τ ∈ R. In order to generate the traditional definition of time convolution , the time shift operator ( TSO ) is chosen as the differential operator , Lτ = ∂/∂τ . One can show that e−t∂/∂τx ( τ ) = x ( τ − t ) , using the Taylor series , e−t ∂/∂τx ( τ ) = ∞∑ n=0 ( −t ) n n ! · ∂ n ∂τn x ( τ ) = ∞∑ n=0 ( u− τ ) n n ! · ∂ n ∂τn x ( τ ) = x ( u ) , with u = τ − t. In other words , the TSO performs a translation operation . Then ( 2 ) reduces to x ( τ ) ∗R h ( τ ) = ∫ ∞ 0 h ( t ) e−t ∂/∂τx ( τ ) dt = ∫ ∞ 0 h ( t ) x ( τ − t ) dt , ( 3 ) which is indeed the traditional definition of convolutions between time signals . It is also worth noting that ejωτ , ∀ω ∈ [ 0 , ∞ ) are eigenfunctions of the TSO Lτ = ∂/∂τ with associated eigenvalues jω . This observation is pivotal in the stability analysis of section 4 . Graph Convolutions : They involve graph signals , x ∈ L2 ( RN ) , that are N -dimensional squaresummable vectors containing information associated with N different nodes . The underlying structure of x is represented by a graph G = ( V , E , W ) , where V is the set of nodes with cardinality |V| = N , E ⊆ V × V is the set of edges , and W : E → R is a map assigning weights to the edges ( Shuman et al. , 2012 ) . The graph shift operator ( GSO ) , S ∈ RN×N , is a matrix representation of the graph sparsity , e.g. , graph adjacency or Laplacian ( Ortega et al. , 2018 ) . Applying S to a signal x results in a signal Sx , where [ Sx ] i represents aggregated data from all nodes j that satisfy that ( i , j ) ∈ E or ( j , i ) ∈ E . We focus on undirected graphs , and therefore , S is a real symmetric and diagonalizable matrix with a set of N eigenvectors { vi } Ni=1 , each associated with a real eigenvalue λi . The GSO is a linear operator S : L2 ( RN ) → L2 ( RN ) that deals with discrete signals . Therefore , it is more common to discretize the diffusion process over graphs at times kTs , k ∈ Z+ , where Ts is the sampling period . The convolution is then defined as x ∗G h = K−1∑ k=0 hke −kSx , ( 4 ) where { hk } k is the filter coefficients and K is the number of filter taps . The finite number of taps is a direct consequence of Cayley-Hamilton theorem , and h is a finite-impulse response ( FIR ) filter . Equation ( 4 ) generalizes graph convolutions in the literature , where convolutions are defined as polynomials in the shift operator , i.e. , x ∗G h = ∑K−1 k=0 hkS kx , ( Sandryhaila and Moura , 2013 ) . This definition executes the shift operation using the matrix S directly compared to e−S in ( 4 ) . | This paper proposes a new deep learning architecture called ST-GNN that learns representations on graphs that evolve over time. Their work focuses on developing an interesting time-varying convolutional architecture, which exploits the graph-time underlying structure of the signals, processing across both the graph and time domains. The authors introduce new graph shift operators (GSO), time shift operators (TSO), followed by a linear combination of those which results in a space-time shift operator termed STSO. The advantage of this paper is that it can handle continuous-time graph signals and the stability of this proposed architecture is studied theoretically (Section 4) with a significant result outlined in Proposition 1 of the paper where the difference between the space-time graph filters of the original graph and the perturbed graph are upper bounded by the order of error introduced. | SP:913e4b2754a85df298f868cd55e0f40b3e4e88a4 |
Space-Time Graph Neural Networks | We introduce space-time graph neural network ( ST-GNN ) , a novel GNN architecture , tailored to jointly process the underlying space-time topology of time-varying network data . The cornerstone of our proposed architecture is the composition of time and graph convolutional filters followed by pointwise nonlinear activation functions . We introduce a generic definition of convolution operators that mimic the diffusion process of signals over its underlying support . On top of this definition , we propose space-time graph convolutions that are built upon a composition of time and graph shift operators . We prove that ST-GNNs with multivariate integral Lipschitz filters are stable to small perturbations in the underlying graphs as well as small perturbations in the time domain caused by time warping . Our analysis shows that small variations in the network topology and time evolution of a system does not significantly affect the performance of ST-GNNs . Numerical experiments with decentralized control systems showcase the effectiveness and stability of the proposed ST-GNNs . 1 INTRODUCTION . Graph Neural Networks ( GNNs ) are powerful convolutional architectures designed for network data . GNNs inherit all the favorable properties convolutional neural networks ( CNNs ) admit , while they also exploit the graph structure . An important feature of GNNs , germane to their success , is that the number of learnable parameters is independent of the size of the underlying networks . GNNs have manifested remarkable performance in a plethora of applications , e.g. , recommendation systems ( Ying et al. , 2018 ; Wu et al. , 2020 ) , drug discovery and biology ( Gainza et al. , 2020 ; Strokach et al. , 2020 ; Wu et al. , 2021 ; Jiang et al. , 2021 ) , resource allocation in autonomous systems ( Lima et al. , 2020 ; Cranmer et al. , 2021 ) , to name a few . Recently , there has been an increased interest in time-varying network data , as they appear in various systems and carry valuable dynamical information . This interest is mostly prominent in applications as decentralized controllers ( Tolstaya et al. , 2020 ; Gama et al. , 2020b ; Yang and Matni , 2021 ; Gama and Sojoudi , 2021 ) , traffic-flow forecasting ( Yu et al. , 2018 ; Li et al. , 2018 ; Fang et al. , 2021 ) , and skeleton-based action detection ( Yan et al. , 2018 ; Cheng et al. , 2020 ; Pan et al. , 2021 ) . The state-ofthe-art ( SOTA ) usually deploys an additional architecture side by side with a GNN so the latter learns patterns from the graph domain while the former works on the time sequences . One choice could be a CNN as in ( Li et al. , 2020 ; Isufi and Mazzola , 2021 ; Wang et al. , 2021 ) or a recurrent neural network ( RNN ) as in ( Seo et al. , 2018 ; Nicolicioiu et al. , 2019 ; Ruiz et al. , 2020 ) . However , these joint architectures are performed in a centralized manner in the sense that the up-to-date data of all nodes are given at any given time . While this is well suited for , but not limited to , the case of social networks and recommendation systems , many physical-network applications are decentralized in nature and suffer from time delays in delivering messages . In this paper , we close the gap by developing a causal space-time convolutional architecture that jointly processes the graph-time underlying structure . That is , the convolutional layers preserve time delays in message passing . Our work is motivated by the following question . Is it possible to transfer learning between signals and datasets defined over different space-time underlying structures ? This is a well motivated question since in practice we execute these architectures on graphs that are different from the graphs used in training and signals are sampled at different sampling rates between training and execution . The answer to the above question was provided for the case of static graph signals in ( Gama et al. , 2020a ) , where the stability of traditional GNNs to graph perturbations was proved . In this work we give an affirmative answer to the above question in the case when time-varying graph signals are considered and space-time convolutional architectures are employed . The contribution of this paper is twofold . First we introduce a novel convolutional architecture for time-varying graph signals , and second we prove its stability . Specifically , we provide a general definition of convolutions for any arbitrary shift operator and define a space-time shift operator ( STSO ) as the linear composition of the graph shift operator ( GSO ) and time-shift operator ( TSO ) . We then introduce space-time graph neural networks ( ST-GNNs ) , a cascade of layers that consist of space-time graph filters followed by point-wise nonlinear activation functions . The proposed ST-GNN allows processing continuous-time graph signals , which is pivotal in the stability analysis . Furthermore , we study the effect of relative perturbations on ST-GNNs and prove that small variations in the graph and/or irregularities in the sampling process of time-varying graph signals do not essentially affect the performance of the proposed ST-GNN architecture . Our theoretical findings are also supported by thorough experimental analysis based on decentralized control applications . The rest of this paper is structured as follows . The related work is summarized in Section 2 . Sections 3 and 4 present our contributions listed above . Numerical experiments and conclusions are presented in Sections 5 and 6 , respectively . The proofs and extended experiments are provided in the appendices . Notation : Bold small and large symbols , i.e . x and X , denote vectors and matrices , respectively . Calligraphic letters mainly represent time-varying graph signals unless otherwise is stated . 2 RELATED WORK . GNNs for Time-varying Graph Signals . One of the early architectures was ( Yan et al. , 2018 ) , which introduced a convolutional filter that aggregates information only from 1-hop neighbors . Relying on product graphs , ( Isufi and Mazzola , 2021 ) introduced a convolutional architecture , where each node has access to the present and past data of the other nodes in the graph . A similar convolutional layer was studied in ( Pan et al. , 2021 ; Loukas and Foucard , 2016 ) , and while restricted to a domain that preserves time delays , ( Pan et al. , 2021 ) shows that it is not necessarily less expressive . Meanwhile , ( Wang et al. , 2021 ) performs GNNs over graph signals at each time instance separately before a temporal convolution is performed at the GNN outputs to capture the evolution of graph embeddings . Graph ( RNNs ) are another architecture developed to deal with time-varying graph signals . For example , ( Pareja et al. , 2020 ) uses an RNN to evolve the GNN parameters over time . Moreover , ( Hajiramezanali et al. , 2019 ) combined the GRNN with a variational autoencoder ( VGAE ) to improve the former ’ s expressive power . However , all these architectures did not take into account the physical restrictions in the form of time delays , associated with decentralized applications . Similar to our work , other architectures considered the diffusion equation to form message-passing layers , e.g. , ( Xhonneux et al. , 2020 ; Poli et al. , 2021 ; Fang et al. , 2021 ) . These architectures parameterize the dynamics of graph signals with GNNs . In simple words , they learn a parameterization that helps find the current state variables from the previous ones . The architecture in ( Chamberlain et al. , 2021 ) is another example of these architectures , but learns the graph weights instead of a limited number of filter coefficients ( i.e. , it resembles the parameterization of graph attention networks in ( Veličković et al. , 2018 ) ) . Stability . Deformation stability of CNNs was studied in ( Bruna and Mallat , 2013 ; Bietti and Mairal , 2019 ) . The notion of stability was then introduced to graph scattering transforms in ( Gama et al. , 2019 ; Zou and Lerman , 2020 ) . In a following work , Gama et al . ( 2020a ) presented a study of GNN stability to graph absolute and relative perturbations . Graphon neural networks was also analyzed in terms of its stability in ( Ruiz et al. , 2021 ) . Moreover , ( Pan et al. , 2021 ) proves the stability to absolute perturbations of space-time graph scattering transforms . 3 SPACE-TIME GRAPH NEURAL NETWORKS . In this section , we present the proposed ST-GNN architecture for time-varying graph signals . First , we provide a general definition of convolutions and then we develop the space-time graph filters , which are the cornerstone of the ST-GNN architecture . Our analysis starts with the homogeneous diffusion equation , which is defined with respect to the Laplacian differential operator L ∂X ( t ) ∂t = −LX ( t ) . ( 1 ) Equation ( 1 ) describes processes of signals that evolve across the diffusion dimension , t. The diffused signal , X ( t ) , is modeled as an abstract vector in a vector space V. The vector space is associated with an inner product ⟨. , .⟩V , and is closed under addition and scalar multiplication , e.g. , n-dimensional vector spaces and function spaces . The solution of ( 1 ) is X ( t ) = e−tLX ( 0 ) = e−tLX0 = e−tLX ( the subscript is omitted in what follows ) , and describes the signal after time t from the initial state . 3.1 CONVOLUTION . With the diffusion equation in our hands , we can now define the convolution operation as the linear combination of the diffusion sequence with a filter h ( t ) . Definition 1 ( Convolution Operator ) . For a linear shift-invariant filter with coefficients h ( t ) , t ≥ 0 , the convolution between the filter and an input signal X ∈ V , with respect to a linear differential operator L : V → V , is defined as h ∗D X = ∫ ∞ 0 h ( t ) e−tLXdt , ( 2 ) where ∗D denotes the convolution operator applied on signals with underlying structure D. Definition 1 is a valid convolution operator . With abuse of notation , we refer to L as the shift operator but it should be understood that the shift operation is executed using e−L . Definition 1 establishes a generalized form of convolutions for a wide variety of shift operators and signals . Next we discuss two convolution types of practical interest that follow directly from ( 2 ) , i.e. , time convolutions and graph convolutions . Time Convolutions : They involve continuous-time signals , denoted by x ( τ ) , that are elements of square-integrable function spaces , i.e , x ( τ ) ∈ L2 ( R ) . The underlying structure of x ( τ ) is the real line , since the time variable τ ∈ R. In order to generate the traditional definition of time convolution , the time shift operator ( TSO ) is chosen as the differential operator , Lτ = ∂/∂τ . One can show that e−t∂/∂τx ( τ ) = x ( τ − t ) , using the Taylor series , e−t ∂/∂τx ( τ ) = ∞∑ n=0 ( −t ) n n ! · ∂ n ∂τn x ( τ ) = ∞∑ n=0 ( u− τ ) n n ! · ∂ n ∂τn x ( τ ) = x ( u ) , with u = τ − t. In other words , the TSO performs a translation operation . Then ( 2 ) reduces to x ( τ ) ∗R h ( τ ) = ∫ ∞ 0 h ( t ) e−t ∂/∂τx ( τ ) dt = ∫ ∞ 0 h ( t ) x ( τ − t ) dt , ( 3 ) which is indeed the traditional definition of convolutions between time signals . It is also worth noting that ejωτ , ∀ω ∈ [ 0 , ∞ ) are eigenfunctions of the TSO Lτ = ∂/∂τ with associated eigenvalues jω . This observation is pivotal in the stability analysis of section 4 . Graph Convolutions : They involve graph signals , x ∈ L2 ( RN ) , that are N -dimensional squaresummable vectors containing information associated with N different nodes . The underlying structure of x is represented by a graph G = ( V , E , W ) , where V is the set of nodes with cardinality |V| = N , E ⊆ V × V is the set of edges , and W : E → R is a map assigning weights to the edges ( Shuman et al. , 2012 ) . The graph shift operator ( GSO ) , S ∈ RN×N , is a matrix representation of the graph sparsity , e.g. , graph adjacency or Laplacian ( Ortega et al. , 2018 ) . Applying S to a signal x results in a signal Sx , where [ Sx ] i represents aggregated data from all nodes j that satisfy that ( i , j ) ∈ E or ( j , i ) ∈ E . We focus on undirected graphs , and therefore , S is a real symmetric and diagonalizable matrix with a set of N eigenvectors { vi } Ni=1 , each associated with a real eigenvalue λi . The GSO is a linear operator S : L2 ( RN ) → L2 ( RN ) that deals with discrete signals . Therefore , it is more common to discretize the diffusion process over graphs at times kTs , k ∈ Z+ , where Ts is the sampling period . The convolution is then defined as x ∗G h = K−1∑ k=0 hke −kSx , ( 4 ) where { hk } k is the filter coefficients and K is the number of filter taps . The finite number of taps is a direct consequence of Cayley-Hamilton theorem , and h is a finite-impulse response ( FIR ) filter . Equation ( 4 ) generalizes graph convolutions in the literature , where convolutions are defined as polynomials in the shift operator , i.e. , x ∗G h = ∑K−1 k=0 hkS kx , ( Sandryhaila and Moura , 2013 ) . This definition executes the shift operation using the matrix S directly compared to e−S in ( 4 ) . | This paper introduces a new spatio-temporal Graph Neural Network, ST-GNN, for making predictions on temporal network. Its proposed space-time convolution operator is a composition of temporal convolution and graph diffusion. The paper further proves that under practical conditions their ST-GNN with Integral Lipschitz filters is stale to small perturbation in both time and graph domain. | SP:913e4b2754a85df298f868cd55e0f40b3e4e88a4 |
Deep Active Learning by Leveraging Training Dynamics | 1 INTRODUCTION . Training deep learning ( DL ) models usually requires a large amount of high-quality labeled data ( Zhang et al. , 2017 ) to optimize a model with a massive number of parameters . The acquisition of such annotated data is usually time-consuming and expensive , making it unaffordable in the fields that require high domain expertise . A promising approach for minimizing the labeling effort is active learning ( AL ) , which aims to identify and label the maximally informative samples , so that a high-performing classifier can be trained with minimal labeling effort ( Settles , 2009 ) . Under classical statistical learning settings , theories of active learning have been extensively studied from the perspective of VC dimension ( Hanneke et al. , 2014 ) . As a result , a variety of methods have been proposed , such as ( i ) the version-space-based approach , which requires maintaining a set of models ( Cohn et al. , 1994 ; Balcan et al. , 2009 ) , and ( ii ) the clustering-based approach , which assumes the data within the same cluster have pure labels ( Dasgupta & Hsu , 2008 ) . However , the theoretical analyses for these classical settings may not hold for over-parameterized deep neural networks where the traditional wisdom is ineffective ( Zhang et al. , 2017 ) . For example , marginbased methods select the labeling examples in the vicinity of the learned decision boundary ( Balcan et al. , 2007 ; Balcan & Long , 2013 ) . However , in the over-parameterized regime , every labeled example could potentially be near the learned decision boundary ( Karzand & Nowak , 2019 ) . As a result , theoretically , such analysis can hardly guide us to design practical active learning methods . Besides , empirically , multiple deep active learning works , borrowing observations and insights from the classical theories and methods , have been observed unable to outperform their passive learning counterparts in a few application scenarios ( Kirsch et al. , 2019 ; Ash et al. , 2020 ) . On the other hand , the analysis of neural network ’ s optimization and generalization performance has witnessed several exciting developments in recent years in terms of the deep learning theory ( Jacot et al. , 2018 ; Arora et al. , 2019b ; Lee et al. , 2019 ) . It is shown that the training dynamics of deep neural networks using gradient descent can be characterized by the Neural Tangent Kernel ( NTK ) of infinite ( Jacot et al. , 2018 ) or finite ( Hanin & Nica , 2020 ) width networks . This is further leveraged to characterize the generalization of over-parameterized networks through Rademacher complexity analysis ( Arora et al. , 2019b ; Cao & Gu , 2019 ) . We are therefore inspired to ask : How can we design a practical and generic active learning method for deep neural networks with theoretical justifications ? To answer this question , we firstly explore the connection between the model performance on testing data and the convergence speed on training data for the over-parameterized deep neural networks . Based on the NTK framework ( Jacot et al. , 2018 ; Arora et al. , 2019b ) , we theoretically show that if a deep neural network converges faster ( “ Train Faster ” ) , then it tends to have a better generalization performance ( “ Generalize Better ” ) , which matches with the existing observations ( Hardt et al. , 2016 ; Liu et al. , 2017 ; Lyle et al. , 2020 ; Ru et al. , 2020 ; Xu et al. , 2021 ) . Motivated by the aforementioned connection , we first introduce Training Dynamics , the derivative of training loss with respect to iteration , as a proxy to quantitatively describe the training process . On top of it , we formally propose our generic and theoretically-motivated deep active learning method , dynamicAL , which will query labels for a subset of unlabeled samples that maximally increases the training dynamics . In order to compute the training dynamics by merely using the unlabeled samples , we leverage two relaxations Pseudo-labeling and Subset Approximation to solve this non-trivial subset selection problem . Our relaxed approaches are capable of effectively estimating the training dynamics as well as efficiently solving the subset selection problem by reducing the complexity from O ( N b ) to O ( b ) . In theory , we coin a new term Alignment to measure the length of the label vector ’ s projection on the neural tangent kernel space . Then , we demonstrate that higher alignment usually comes with a faster convergence speed and a lower generalization bound . Furthermore , we extend the previous analysis to an active learning setting , where the i.i.d . assumption may not hold with the help of the maximum mean discrepancy ( Borgwardt et al. , 2006 ) . Finally , we show that alignment is positively correlated with our active learning goal , training dynamics , which implies that maximizing training dynamics will lead to a better generalization performance . Regarding experiments , we have empirically verified our theory by conducting extensive experiments on three datasets , CIFAR10 ( Krizhevsky et al. , 2009 ) , SVHN ( Netzer et al. , 2011 ) , and Caltech101 ( Fei-Fei et al. , 2004 ) using three types of network structure : vanilla CNN , ResNet ( He et al. , 2016 ) , and VGG ( Simonyan & Zisserman , 2015 ) . We first show that result of the subset selection problem delivered by the subset approximation is close to the global optimum solution . Furthermore , under active learning setting , our method not only outperforms the other baselines but also scales well on large deep learning models . The main contributions of our paper can be summarized as follows : • We propose a theory-driven deep active learning method , dynamicAL , inspired by the results of “ train faster , generalize better ” . To this end , we introduce the Training Dynamics , as a proxy to describe the training process and embody the inspiration . • We demonstrate that the convergence speed of training and the generalization performance is ( positively ) strongly correlated under the ultra-wide condition ; we also show that maximizing the training dynamics will lead to a lower generalization error in the scenario of active learning . • Our method is easy to implement . We conduct extensive experiments to evaluate the effectiveness of dynamicAL and empirically show that our method consistently outperforms other methods in a wide range of active learning settings . 2 BACKGROUND . 2.1 NOTATIONS . We use the random variable x ∈ X to represent input data feature and y ∈ Y as label where K is the number of classes and [ K ] : = { 1 , 2 , ... , K } . We are given a data source D with unknown distribution p ( x , y ) . We further denote the concatenation of x as X = [ x1 , x2 , ... , xM ] > and that of y as Y = [ y1 , y2 , ... , yM ] > . We consider a deep learning classifier hθ ( x ) = argmax σ ( f ( x ; θ ) ) : x→ y parameterized by θ ∈ Rp , where σ ( · ) is the softmax function and f is a neural network . Let ⊗ be the Kronecker Product and IK ∈ RK×K be an identity matrix . 2.2 ACTIVE LEARNING . The goal of active learning is to improve the learning efficiency of a model with a limited labeling budget . In this work , we consider the pool-based AL setup , where a finite data set S = { ( xl , yl ) } Ml=1 with M points are i.i.d . sampled from the p ( x , y ) as the ( initial ) labeled set . The AL model receives an unlabeled data set U sampled from p ( x ) and request labels according to p ( y|x ) for any x ∈ U in each query round . There are R rounds in total and for each round , a query set Q consisting of b unlabeled samples can be queried . The total budget size B = b×R . 2.3 NEURAL TANGENT KERNEL . The Neural Tangent Kernel ( Jacot et al. , 2018 ) has been widely applied to analyze the dynamics of neural networks . If the neural network is sufficiently wide , properly initialized , and trained by gradient descent with infinitesimal step size ( a.k.a . gradient flow ) , then the neural network is equivalent to kernel regression predictor with a deterministic kernel Θ ( · , · ) , called Neural Tangent Kernel ( NTK ) . When minimizing the mean squared error loss , at the iteration t , the dynamics of the neural network f has a closed-form expression : df ( X ; θ ( t ) ) dt = −Kt ( X , X ) ( f ( X ; θ ( t ) ) − Y ) ( 1 ) where θ ( t ) denotes the parameter of the neural network at iteration t , Kt ( X , X ) ∈ R|X |×K×|X|×K is called the empirical NTK and Ki , jt ( x , x′ ) = ∇θf i ( x ; θ ( t ) ) > ∇θf j ( x′ ; θ ( t ) ) , for two samples x , x′ ∈ X and i , j ∈ [ K ] . The time-variant kernel Kt ( · , · ) is equivalent to the ( time-invariant ) NTK with high probability , that is , if the neural network is sufficiently wide and properly initialized , then : Kt ( X , X ) = Θ ( X , X ) ⊗ IK ( 2 ) The final learned neural network at iteration t , is equivalent to the kernel regression solution with respect to the NTK ( Lee et al. , 2019 ) . For any input x and training data { X , Y } we have , f ( x ; θ ( t ) ) ≈ Θ ( x , X ) > Θ ( X , X ) −1 ( I − e−ηΘ ( X , X ) t ) Y ( 3 ) where η is the learning rate , Θ ( x , X ) is the NTK matrix between input x and all samples in training data X . 3 METHOD . In section 3.1 , we introduce the notion of training dynamics which can be used to describe the training process . Then , in section 3.2 , based on the training dynamics , we proposed dynamicAL . In section 3.3 , we discuss the connection between dynamicAL and existing deep active learning methods . 3.1 TRAINING DYNAMICS . In this section , we introduce the notion of training dynamics . The cross-entropy loss over labeled set S is defined as : L ( S ) = ∑ ( xl , yl ) ∈S ` ( f ( xl ; θ ) , yl ) = − ∑ ( xl , yl ) ∈S ∑ i∈ [ K ] yil log σ i ( f ( xl ; θ ) ) ( 4 ) where σi ( f ( x ; θ ) ) = exp ( f i ( x ; θ ) ) ∑ j exp ( f j ( x ; θ ) ) . We first analyze the dynamics of the training loss , with respect to iteration t , on one labeled sample ( derivation is in Appendix A.1 ) : ∂ ` ( f ( x ; θ ) , y ) ∂t = − ∑ i ( yi − σi ( f ( x ; θ ) ) ) ∇θf i ( x ; θ ) ∇ > t θ ( 5 ) For neural networks trained by gradient descent , if learning rate η is small , then∇tθ = θt+1 − θt = −η ∂ ∑ ( xl , yl ) ∈S ` ( f ( xl ; θ ) , yl ) ∂θ . Taking the partial derivative of the training loss with respect to the parameters , we have ( the derivation of the following equation can be found in Appendix A.2 ) : ∂ ` ( f ( x ; θ ) , y ) ∂θ = ∑ j∈ [ K ] ( σj ( f ( x ; θ ) ) − yj ) ∂f j ( x ; θ ) ∂θ ( 6 ) Therefore , we can further get the following result for the dynamics of training loss , ∂ ` ( f ( x ; θ ) , y ) ∂t = −η ∑ i ( σi ( f ( x ; θ ) ) − yi ) ∑ j ∑ ( x l ′ , y l ′ ) ∈S ∇θf i ( x ; θ ) > ∇θf j ( xl′ ; θ ) ( σj ( f ( xl′ ; θ ) ) − y j l ′ ) ( 7 ) Furthermore , we define di ( X , Y ) = σi ( f ( X ; θ ) ) − Y i and Y i is the label vector of all samples for i-th class . Then , the training dynamics ( dynamics of training loss ) over training set S is denoted by G ( S ) ∈ R : G ( S ) = −1 η ∑ ( xl , yl ) ∈S ∂ ` ( f ( xl ; θ ) , yl ) ∂t = ∑ i ∑ j di ( X , Y ) > Kij ( X , X ) dj ( X , Y ) ( 8 ) | The authors address the problem of active learning in the context of deep learning. Instead of querying new examples based on the decision boundary (which in nonlinear models can be tricky or even ill-defined), as it is usually done for linear models, they rely on the train-faster--generalize-better paradigm. Thus, they propose to optimize the "training dynamics", which is the time derivative of the loss function in the ultra-wide limit. By using pseudo labeling and subset approximation, their method allows for fast selection of the examples that should be added to the dataset. They justify their active learning strategy through an analysis in the limit of very wide models, through the neural tangent kernel, which is particularly convenient since the NTK does not depend on time in the ultra-wide limit. They study a quantity that they call "alignment" (which measures the correlation between input and output in the NTK space) and show that a higher alignment is related to better generalization (a better bound) and faster training (--> larger training dynamics). They then show that this is also true in the active-learning setting, where the data is no more iid, with the help of some empirical evidence. Finally, they test their method and compare it with other active learning strategies, which they systematically outperform. | SP:f352e3f7154d22c662b5a80eb2a309ce0345b453 |
Deep Active Learning by Leveraging Training Dynamics | 1 INTRODUCTION . Training deep learning ( DL ) models usually requires a large amount of high-quality labeled data ( Zhang et al. , 2017 ) to optimize a model with a massive number of parameters . The acquisition of such annotated data is usually time-consuming and expensive , making it unaffordable in the fields that require high domain expertise . A promising approach for minimizing the labeling effort is active learning ( AL ) , which aims to identify and label the maximally informative samples , so that a high-performing classifier can be trained with minimal labeling effort ( Settles , 2009 ) . Under classical statistical learning settings , theories of active learning have been extensively studied from the perspective of VC dimension ( Hanneke et al. , 2014 ) . As a result , a variety of methods have been proposed , such as ( i ) the version-space-based approach , which requires maintaining a set of models ( Cohn et al. , 1994 ; Balcan et al. , 2009 ) , and ( ii ) the clustering-based approach , which assumes the data within the same cluster have pure labels ( Dasgupta & Hsu , 2008 ) . However , the theoretical analyses for these classical settings may not hold for over-parameterized deep neural networks where the traditional wisdom is ineffective ( Zhang et al. , 2017 ) . For example , marginbased methods select the labeling examples in the vicinity of the learned decision boundary ( Balcan et al. , 2007 ; Balcan & Long , 2013 ) . However , in the over-parameterized regime , every labeled example could potentially be near the learned decision boundary ( Karzand & Nowak , 2019 ) . As a result , theoretically , such analysis can hardly guide us to design practical active learning methods . Besides , empirically , multiple deep active learning works , borrowing observations and insights from the classical theories and methods , have been observed unable to outperform their passive learning counterparts in a few application scenarios ( Kirsch et al. , 2019 ; Ash et al. , 2020 ) . On the other hand , the analysis of neural network ’ s optimization and generalization performance has witnessed several exciting developments in recent years in terms of the deep learning theory ( Jacot et al. , 2018 ; Arora et al. , 2019b ; Lee et al. , 2019 ) . It is shown that the training dynamics of deep neural networks using gradient descent can be characterized by the Neural Tangent Kernel ( NTK ) of infinite ( Jacot et al. , 2018 ) or finite ( Hanin & Nica , 2020 ) width networks . This is further leveraged to characterize the generalization of over-parameterized networks through Rademacher complexity analysis ( Arora et al. , 2019b ; Cao & Gu , 2019 ) . We are therefore inspired to ask : How can we design a practical and generic active learning method for deep neural networks with theoretical justifications ? To answer this question , we firstly explore the connection between the model performance on testing data and the convergence speed on training data for the over-parameterized deep neural networks . Based on the NTK framework ( Jacot et al. , 2018 ; Arora et al. , 2019b ) , we theoretically show that if a deep neural network converges faster ( “ Train Faster ” ) , then it tends to have a better generalization performance ( “ Generalize Better ” ) , which matches with the existing observations ( Hardt et al. , 2016 ; Liu et al. , 2017 ; Lyle et al. , 2020 ; Ru et al. , 2020 ; Xu et al. , 2021 ) . Motivated by the aforementioned connection , we first introduce Training Dynamics , the derivative of training loss with respect to iteration , as a proxy to quantitatively describe the training process . On top of it , we formally propose our generic and theoretically-motivated deep active learning method , dynamicAL , which will query labels for a subset of unlabeled samples that maximally increases the training dynamics . In order to compute the training dynamics by merely using the unlabeled samples , we leverage two relaxations Pseudo-labeling and Subset Approximation to solve this non-trivial subset selection problem . Our relaxed approaches are capable of effectively estimating the training dynamics as well as efficiently solving the subset selection problem by reducing the complexity from O ( N b ) to O ( b ) . In theory , we coin a new term Alignment to measure the length of the label vector ’ s projection on the neural tangent kernel space . Then , we demonstrate that higher alignment usually comes with a faster convergence speed and a lower generalization bound . Furthermore , we extend the previous analysis to an active learning setting , where the i.i.d . assumption may not hold with the help of the maximum mean discrepancy ( Borgwardt et al. , 2006 ) . Finally , we show that alignment is positively correlated with our active learning goal , training dynamics , which implies that maximizing training dynamics will lead to a better generalization performance . Regarding experiments , we have empirically verified our theory by conducting extensive experiments on three datasets , CIFAR10 ( Krizhevsky et al. , 2009 ) , SVHN ( Netzer et al. , 2011 ) , and Caltech101 ( Fei-Fei et al. , 2004 ) using three types of network structure : vanilla CNN , ResNet ( He et al. , 2016 ) , and VGG ( Simonyan & Zisserman , 2015 ) . We first show that result of the subset selection problem delivered by the subset approximation is close to the global optimum solution . Furthermore , under active learning setting , our method not only outperforms the other baselines but also scales well on large deep learning models . The main contributions of our paper can be summarized as follows : • We propose a theory-driven deep active learning method , dynamicAL , inspired by the results of “ train faster , generalize better ” . To this end , we introduce the Training Dynamics , as a proxy to describe the training process and embody the inspiration . • We demonstrate that the convergence speed of training and the generalization performance is ( positively ) strongly correlated under the ultra-wide condition ; we also show that maximizing the training dynamics will lead to a lower generalization error in the scenario of active learning . • Our method is easy to implement . We conduct extensive experiments to evaluate the effectiveness of dynamicAL and empirically show that our method consistently outperforms other methods in a wide range of active learning settings . 2 BACKGROUND . 2.1 NOTATIONS . We use the random variable x ∈ X to represent input data feature and y ∈ Y as label where K is the number of classes and [ K ] : = { 1 , 2 , ... , K } . We are given a data source D with unknown distribution p ( x , y ) . We further denote the concatenation of x as X = [ x1 , x2 , ... , xM ] > and that of y as Y = [ y1 , y2 , ... , yM ] > . We consider a deep learning classifier hθ ( x ) = argmax σ ( f ( x ; θ ) ) : x→ y parameterized by θ ∈ Rp , where σ ( · ) is the softmax function and f is a neural network . Let ⊗ be the Kronecker Product and IK ∈ RK×K be an identity matrix . 2.2 ACTIVE LEARNING . The goal of active learning is to improve the learning efficiency of a model with a limited labeling budget . In this work , we consider the pool-based AL setup , where a finite data set S = { ( xl , yl ) } Ml=1 with M points are i.i.d . sampled from the p ( x , y ) as the ( initial ) labeled set . The AL model receives an unlabeled data set U sampled from p ( x ) and request labels according to p ( y|x ) for any x ∈ U in each query round . There are R rounds in total and for each round , a query set Q consisting of b unlabeled samples can be queried . The total budget size B = b×R . 2.3 NEURAL TANGENT KERNEL . The Neural Tangent Kernel ( Jacot et al. , 2018 ) has been widely applied to analyze the dynamics of neural networks . If the neural network is sufficiently wide , properly initialized , and trained by gradient descent with infinitesimal step size ( a.k.a . gradient flow ) , then the neural network is equivalent to kernel regression predictor with a deterministic kernel Θ ( · , · ) , called Neural Tangent Kernel ( NTK ) . When minimizing the mean squared error loss , at the iteration t , the dynamics of the neural network f has a closed-form expression : df ( X ; θ ( t ) ) dt = −Kt ( X , X ) ( f ( X ; θ ( t ) ) − Y ) ( 1 ) where θ ( t ) denotes the parameter of the neural network at iteration t , Kt ( X , X ) ∈ R|X |×K×|X|×K is called the empirical NTK and Ki , jt ( x , x′ ) = ∇θf i ( x ; θ ( t ) ) > ∇θf j ( x′ ; θ ( t ) ) , for two samples x , x′ ∈ X and i , j ∈ [ K ] . The time-variant kernel Kt ( · , · ) is equivalent to the ( time-invariant ) NTK with high probability , that is , if the neural network is sufficiently wide and properly initialized , then : Kt ( X , X ) = Θ ( X , X ) ⊗ IK ( 2 ) The final learned neural network at iteration t , is equivalent to the kernel regression solution with respect to the NTK ( Lee et al. , 2019 ) . For any input x and training data { X , Y } we have , f ( x ; θ ( t ) ) ≈ Θ ( x , X ) > Θ ( X , X ) −1 ( I − e−ηΘ ( X , X ) t ) Y ( 3 ) where η is the learning rate , Θ ( x , X ) is the NTK matrix between input x and all samples in training data X . 3 METHOD . In section 3.1 , we introduce the notion of training dynamics which can be used to describe the training process . Then , in section 3.2 , based on the training dynamics , we proposed dynamicAL . In section 3.3 , we discuss the connection between dynamicAL and existing deep active learning methods . 3.1 TRAINING DYNAMICS . In this section , we introduce the notion of training dynamics . The cross-entropy loss over labeled set S is defined as : L ( S ) = ∑ ( xl , yl ) ∈S ` ( f ( xl ; θ ) , yl ) = − ∑ ( xl , yl ) ∈S ∑ i∈ [ K ] yil log σ i ( f ( xl ; θ ) ) ( 4 ) where σi ( f ( x ; θ ) ) = exp ( f i ( x ; θ ) ) ∑ j exp ( f j ( x ; θ ) ) . We first analyze the dynamics of the training loss , with respect to iteration t , on one labeled sample ( derivation is in Appendix A.1 ) : ∂ ` ( f ( x ; θ ) , y ) ∂t = − ∑ i ( yi − σi ( f ( x ; θ ) ) ) ∇θf i ( x ; θ ) ∇ > t θ ( 5 ) For neural networks trained by gradient descent , if learning rate η is small , then∇tθ = θt+1 − θt = −η ∂ ∑ ( xl , yl ) ∈S ` ( f ( xl ; θ ) , yl ) ∂θ . Taking the partial derivative of the training loss with respect to the parameters , we have ( the derivation of the following equation can be found in Appendix A.2 ) : ∂ ` ( f ( x ; θ ) , y ) ∂θ = ∑ j∈ [ K ] ( σj ( f ( x ; θ ) ) − yj ) ∂f j ( x ; θ ) ∂θ ( 6 ) Therefore , we can further get the following result for the dynamics of training loss , ∂ ` ( f ( x ; θ ) , y ) ∂t = −η ∑ i ( σi ( f ( x ; θ ) ) − yi ) ∑ j ∑ ( x l ′ , y l ′ ) ∈S ∇θf i ( x ; θ ) > ∇θf j ( xl′ ; θ ) ( σj ( f ( xl′ ; θ ) ) − y j l ′ ) ( 7 ) Furthermore , we define di ( X , Y ) = σi ( f ( X ; θ ) ) − Y i and Y i is the label vector of all samples for i-th class . Then , the training dynamics ( dynamics of training loss ) over training set S is denoted by G ( S ) ∈ R : G ( S ) = −1 η ∑ ( xl , yl ) ∈S ∂ ` ( f ( xl ; θ ) , yl ) ∂t = ∑ i ∑ j di ( X , Y ) > Kij ( X , X ) dj ( X , Y ) ( 8 ) | This work proposes DynamicsAL, a novel AL criteria that selects new training example base on its ability to maximize the training dynamics $\frac{\partial}{\partial t} l(f, y)$. The authors supplied a practical algorithm (Section 3.2) and compared the proposed criteria with existing methods (Section 3.3). The authors also derived theoretical result on faster converges leads to better generalization (Section 4) under the assumption that the network has infinite width, and also empirically verified their result based in the non-i.i.d. case. Experiments on standard benchmark and architecture (CNNs on CIFAR/SVHN/Caltech101) are conducted, where DynamicsAL is shown to outperform existing approaches. | SP:f352e3f7154d22c662b5a80eb2a309ce0345b453 |
Vector-quantized Image Modeling with Improved VQGAN | Pretraining language models with next-token prediction on massive text corpora has delivered phenomenal zero-shot , few-shot , transfer learning and multi-tasking capabilities on both generative and discriminative language tasks . Motivated by this success , we explore a Vector-quantized Image Modeling ( VIM ) approach that involves pretraining a Transformer to predict rasterized image tokens autoregressively . The discrete image tokens are encoded from a learned Vision-Transformerbased VQGAN ( ViT-VQGAN ) . We first propose multiple improvements over vanilla VQGAN from architecture to codebook learning , yielding better efficiency and reconstruction fidelity . The improved ViT-VQGAN further improves vectorquantized image modeling tasks , including unconditional , class-conditioned image generation and unsupervised representation learning . When trained on ImageNet at 256 × 256 resolution , we achieve Inception Score ( IS ) of 175.1 and Fréchet Inception Distance ( FID ) of 4.17 , a dramatic improvement over the vanilla VQGAN , which obtains 70.6 and 17.04 for IS and FID , respectively . Based on ViT-VQGAN and unsupervised pretraining , we further evaluate the pretrained Transformer by averaging intermediate features , similar to Image GPT ( iGPT ) . This ImageNet-pretrained VIM-L significantly beats iGPT-L on linear-probe accuracy from 60.3 % to 73.2 % for a similar model size . ViM-L also outperforms iGPT-XL which is trained with extra web image data and larger model size . 1 INTRODUCTION . Natural language processing ( NLP ) has recently experienced dramatic improvements from learning general-purpose representations by pretraining language models on unlabeled text corpora . This strategy has produced large performance gains for a wide range of natural language generation ( NLG ) and natural language understanding ( NLU ) tasks ( Dai & Le , 2015 ; Radford et al. , 2018 ; 2019 ; Brown et al. , 2020 ) . Conceptually , generative pretraining models the data density P ( X ) in a tractable way , with the hope of also helping discriminative tasks of P ( Y |X ) ( Lasserre et al. , 2006 ) ; importantly , there are no limitations on whether the signals are from the language domain or others , such as vision . In computer vision , in contrast , most recent unsupervised or self-supervised learning research focuses on applying different random augmentations to images , with the pretraining objective to distinguish image instances ( Chen et al. , 2020b ; He et al. , 2020 ; Chen et al. , 2020d ; Grill et al. , 2020 ; Chen et al. , 2020c ; Caron et al. , 2021 ) . The quality of learned representation relies on manually chosen augmentations , such as random brightness , cropping , blurring , and others . Chen et al . ( 2020a ) explored GPT-style ( Radford et al. , 2018 ) generative pretraining on images by autoregressively predicting pixels without incorporating knowledge of the 2D structure . Each pixel is represented as a 9-bit value created by clustering ( R , G , B ) pixel values , using k-means with k=512 . Unfortunately , this color encoding does not scale to typical image resolutions as it entails very long sequences to represent the image ( e.g. , 224× 224 resolution leads to 50,176 tokens per image ) , and this demands much more memory and computation for training , compared to language models . As a result , iGPT ’ s maximum resolution is 64 × 64 for image recognition at scale—which severely limits its representation capabilities . Remarkable image generation results have been achieved by pre-quantizing images into discrete latent variables and modeling them autoregressively , including VQVAE ( Oord et al. , 2017 ) , DALLE ( Ramesh et al. , 2021 ) and VQGAN ( Esser et al. , 2021 ) . In these approaches , a convolution neural network ( CNN ) is learned to auto-encode an image and a second stage CNN or Transformer is learned to model the density of encoded latent variables . These have been proved effective for image generation , but few studies have evaluated the learned representation in discriminative tasks ( Ramesh et al. , 2021 ; Esser et al. , 2021 ) . We explore an approach we refer to as Vector-quantized Image Modeling ( VIM ) and apply it to both image generation and image understanding tasks . VIM follows a two-stage approach : • Stage 1 : Image Quantization . Given an image of resolution 256×256 , a VisionTransformer-based VQGAN encodes it into 32×32 discretized latent codes where the codebook size is 8192 . We propose multiple improvements–from architecture to codebook learning–to VQGAN ( Esser et al. , 2021 ) . The resulting ViT-VQGAN is more efficient and improves reconstruction fidelity in terms of pixel-wise reconstruction metrics , Inception Score ( IS ) and Fréchet Inception Distance ( FID ) . ViT-VQGAN is trained end-to-end on image-only data with combined objective functions of logit-laplace loss , ` 2 loss , adversarial loss and perceptual loss ( Johnson et al. , 2016 ; Zhang et al. , 2018 ) . • Stage 2 : Vector-quantized Image Modeling . We train a Transformer model to predict rasterized 32×32 = 1024 image tokens autoregressively , where image tokens are encoded by a learned Stage 1 ViT-VQGAN . For unconditional image synthesis or unsupervised learning , we pretrain a decoder-only Transformer model to predict the next token . For class-conditioned image synthesis , a class-id token is prepended before the image tokens . To evaluate the quality of unsupervised learning , we average the intermediate Transformer features and learn a linear head to predict the logit of the classes ( a.k.a. , linear-probe ) . We show that one key component for improving both image generation and image understanding with VIM is to have a better image quantizer with respect to both computational efficiency and reconstruction quality . An efficient quantizer can speed up Stage 2 training , where random augmentations are applied first to an image , followed by the encoder of image quantizer to obtain the input tokens . Moreover , an image quantizer with better reconstruction quality can reduce information loss compared with the original image in pixel space , which is critical for image understanding tasks . The evaluations of our proposed ViT-VQGAN and VIM are studied with three aspects . ( 1 ) We evaluate the image quantizer based on reconstruction quality metrics including ` 1 distance , ` 2 distance , log-laplace distance , as well as Inception Score ( IS ) and Fréchet Inception Distance ( FID ) of reconstructed images . ( 2 ) We evaluate the capabilities of the learned quantizer for unconditional or class-conditioned image synthesis based on FID and IS , and compare with other methods . ( 3 ) We rely on linear-probe accuracy to evaluate representations with the common intuition that good features should linearly separate the classes of downstream tasks . 2 RELATED WORK . Image Synthesis . Image generation has received much attention with the progress of deep generative models , including Generative Adversarial Networks ( GANs ) ( Goodfellow et al. , 2014 ; Zhang et al. , 2019b ) , Variational Autoencoders ( VAEs ) ( Kingma & Welling , 2014 ; Vahdat & Kautz , 2020 ) , Diffusion Models ( Song & Ermon , 2019 ; Dhariwal & Nichol , 2021 ) and Autoregressive Models ( van den Oord et al. , 2016 ; Parmar et al. , 2018 ) . Unlike many autogressive methods which generate sequence directly in pixel space , VQVAE ( van den Oord et al. , 2017 ; Razavi et al. , 2019 ) decomposes the image generation process into two stages : the first stage trains a vector quantized autoencoder with image reconstruction objective to convert an image into a shorter sequence of discrete tokens . Then the second stage learns an autoregressive model , e.g. , PixelSNAIL ( Chen et al. , 2018 ) , to model the underlying distribution of token sequences . Driven by the effectiveness of VQVAE and progress in sequence modeling ( Vaswani et al. , 2017 ; Devlin et al. , 2019 ) , many approaches follow the two-stage paradigm . DALL-E ( Ramesh et al. , 2021 ) improves token prediction in second stage by using Transformers ( Vaswani et al. , 2017 ) , resulting in a strong text-to-image synthesis model . VQGAN ( Esser et al. , 2021 ) further uses adversarial loss and perceptual loss ( Johnson et al. , 2016 ; Zhang et al. , 2018 ) to train a better autoencoder in the first stage to synthesize greater detail in images . Image Recognition with Generative Pretraining . Many image generation models ( Goodfellow et al. , 2014 ; Kingma & Welling , 2014 ; Radford et al. , 2016 ; Donahue et al. , 2017 ; Higgins et al. , 2017 ) have been studied for their capabilities in representation learning . However , their performance is usually not superior to competing self-supervised approaches that solve auxiliary classification tasks ( Noroozi & Favaro , 2016a ; Gidaris et al. , 2018a ; van den Oord et al. , 2018 ) . BigBiGAN ( Donahue & Simonyan , 2019a ) first demonstrated that a generation-based model can match other self-supervised methods in representation learning on ImageNet . iGPT ( Chen et al. , 2020a ) uses the autoregressive objective to learn a giant transformer that directly predicts pixel values , producing even more competitive results . Compared to iGPT , our method first tokenizes the original image into discrete image tokens and then trains a transformer to predict them . As a result , our approach obtains comparable results with smaller model and less data . Similar to our method in predicting image tokens , BEiT ( Bao et al. , 2021 ) follows pre-training scheme of BERT Devlin et al . ( 2019 ) by learning to recover randomly masked image tokens with a bidirectional transformer . Unlike BEiT , we explore vector-quantized image modeling for image generation in addition to image recognition . 3 VECTOR-QUANTIZED IMAGES WITH VIT-VQGAN . The Vector-quantized Variational AutoEncoder ( VQVAE ) ( van den Oord et al. , 2017 ) is a CNNbased auto-encoder whose latent space is a matrix of discrete learnable variables , trained end-to-end via straight-through estimation . Esser et al . ( 2021 ) introduce VQGAN , a model which improves upon VQVAE by introducing an adversarial loss produced by a discriminator . Below , we introduce further improvements to VQGAN that boost efficiency and enhance reconstruction quality . 3.1 VQGAN WITH VISION TRANSFORMERS . The core network architectures used by both VQVAE and VQGAN to encode and reconstruct images are CNNs . VQGAN introduces transformer-like elements in the form of non-local attention block ( Zhang et al. , 2019a ) , allowing it to capture distant interactions with fewer layers . We propose taking this approach one step further by replacing the CNN encoder and decoder with Vision Transformer ( ViT ) ( Dosovitskiy et al. , 2020 ) , as shown in Figure 1 . Given sufficient data ( for which unlabeled image data is plentiful ) we find that ViT-VQGAN is less constrained by the inductive priors imposed by convolutions . Furthermore , ViT-VQGAN yields better computational efficiency on accelerators , and produces higher quality reconstructions , as shown in Table 1 . The encoder of ViT-VQGAN first maps 8×8 non-overlapping image patches into image tokens , followed by Transformer blocks , encoding a 256×256 resolution image into a 32×32=1024 token sequence . The decoder performs the inverse operation , mapping each image token from latent variables back to 8×8 image patches and regrouping them into a 256×256 image ( see Figure 1 ) . At the output of transformer blocks , we apply a two-layer feed-forward network with a tanh activation layer in the middle . No activation is applied at the output of ViT-VQGAN encoder or decoder . We find that this simple approach yields high quality reconstructions without any noticeable grid artifacts . | This paper mainly investigates how to further improve the image generation quality of previous work VQGAN, where several modifications are proposed to train a better quantized auto-encoder model. After modeling the discrete tokens with an auto-regressive transformer, we could observe that the generation results of the proposed ViT-VQGAN are really amazing and beat most of previous works in various benchmarks. Meanwhile, ViT-VQGAN also demonstrates its exceptional representation capabilities through unsupervised linear-probing. To summarize, it seems there are several key factors to obtain a better reconstruction model: - Project the latent codes into lower dimension, which leads to a larger codebook size and less ‘dead’ codes. - StyleGAN Discriminator. - $\ell_{2}$ normalization on latent variables. - Stronger backbone (ViT-like architecture or decoder with more parameters). | SP:4b745d0f1a688e009c1eff19df47effd48a053ee |
Vector-quantized Image Modeling with Improved VQGAN | Pretraining language models with next-token prediction on massive text corpora has delivered phenomenal zero-shot , few-shot , transfer learning and multi-tasking capabilities on both generative and discriminative language tasks . Motivated by this success , we explore a Vector-quantized Image Modeling ( VIM ) approach that involves pretraining a Transformer to predict rasterized image tokens autoregressively . The discrete image tokens are encoded from a learned Vision-Transformerbased VQGAN ( ViT-VQGAN ) . We first propose multiple improvements over vanilla VQGAN from architecture to codebook learning , yielding better efficiency and reconstruction fidelity . The improved ViT-VQGAN further improves vectorquantized image modeling tasks , including unconditional , class-conditioned image generation and unsupervised representation learning . When trained on ImageNet at 256 × 256 resolution , we achieve Inception Score ( IS ) of 175.1 and Fréchet Inception Distance ( FID ) of 4.17 , a dramatic improvement over the vanilla VQGAN , which obtains 70.6 and 17.04 for IS and FID , respectively . Based on ViT-VQGAN and unsupervised pretraining , we further evaluate the pretrained Transformer by averaging intermediate features , similar to Image GPT ( iGPT ) . This ImageNet-pretrained VIM-L significantly beats iGPT-L on linear-probe accuracy from 60.3 % to 73.2 % for a similar model size . ViM-L also outperforms iGPT-XL which is trained with extra web image data and larger model size . 1 INTRODUCTION . Natural language processing ( NLP ) has recently experienced dramatic improvements from learning general-purpose representations by pretraining language models on unlabeled text corpora . This strategy has produced large performance gains for a wide range of natural language generation ( NLG ) and natural language understanding ( NLU ) tasks ( Dai & Le , 2015 ; Radford et al. , 2018 ; 2019 ; Brown et al. , 2020 ) . Conceptually , generative pretraining models the data density P ( X ) in a tractable way , with the hope of also helping discriminative tasks of P ( Y |X ) ( Lasserre et al. , 2006 ) ; importantly , there are no limitations on whether the signals are from the language domain or others , such as vision . In computer vision , in contrast , most recent unsupervised or self-supervised learning research focuses on applying different random augmentations to images , with the pretraining objective to distinguish image instances ( Chen et al. , 2020b ; He et al. , 2020 ; Chen et al. , 2020d ; Grill et al. , 2020 ; Chen et al. , 2020c ; Caron et al. , 2021 ) . The quality of learned representation relies on manually chosen augmentations , such as random brightness , cropping , blurring , and others . Chen et al . ( 2020a ) explored GPT-style ( Radford et al. , 2018 ) generative pretraining on images by autoregressively predicting pixels without incorporating knowledge of the 2D structure . Each pixel is represented as a 9-bit value created by clustering ( R , G , B ) pixel values , using k-means with k=512 . Unfortunately , this color encoding does not scale to typical image resolutions as it entails very long sequences to represent the image ( e.g. , 224× 224 resolution leads to 50,176 tokens per image ) , and this demands much more memory and computation for training , compared to language models . As a result , iGPT ’ s maximum resolution is 64 × 64 for image recognition at scale—which severely limits its representation capabilities . Remarkable image generation results have been achieved by pre-quantizing images into discrete latent variables and modeling them autoregressively , including VQVAE ( Oord et al. , 2017 ) , DALLE ( Ramesh et al. , 2021 ) and VQGAN ( Esser et al. , 2021 ) . In these approaches , a convolution neural network ( CNN ) is learned to auto-encode an image and a second stage CNN or Transformer is learned to model the density of encoded latent variables . These have been proved effective for image generation , but few studies have evaluated the learned representation in discriminative tasks ( Ramesh et al. , 2021 ; Esser et al. , 2021 ) . We explore an approach we refer to as Vector-quantized Image Modeling ( VIM ) and apply it to both image generation and image understanding tasks . VIM follows a two-stage approach : • Stage 1 : Image Quantization . Given an image of resolution 256×256 , a VisionTransformer-based VQGAN encodes it into 32×32 discretized latent codes where the codebook size is 8192 . We propose multiple improvements–from architecture to codebook learning–to VQGAN ( Esser et al. , 2021 ) . The resulting ViT-VQGAN is more efficient and improves reconstruction fidelity in terms of pixel-wise reconstruction metrics , Inception Score ( IS ) and Fréchet Inception Distance ( FID ) . ViT-VQGAN is trained end-to-end on image-only data with combined objective functions of logit-laplace loss , ` 2 loss , adversarial loss and perceptual loss ( Johnson et al. , 2016 ; Zhang et al. , 2018 ) . • Stage 2 : Vector-quantized Image Modeling . We train a Transformer model to predict rasterized 32×32 = 1024 image tokens autoregressively , where image tokens are encoded by a learned Stage 1 ViT-VQGAN . For unconditional image synthesis or unsupervised learning , we pretrain a decoder-only Transformer model to predict the next token . For class-conditioned image synthesis , a class-id token is prepended before the image tokens . To evaluate the quality of unsupervised learning , we average the intermediate Transformer features and learn a linear head to predict the logit of the classes ( a.k.a. , linear-probe ) . We show that one key component for improving both image generation and image understanding with VIM is to have a better image quantizer with respect to both computational efficiency and reconstruction quality . An efficient quantizer can speed up Stage 2 training , where random augmentations are applied first to an image , followed by the encoder of image quantizer to obtain the input tokens . Moreover , an image quantizer with better reconstruction quality can reduce information loss compared with the original image in pixel space , which is critical for image understanding tasks . The evaluations of our proposed ViT-VQGAN and VIM are studied with three aspects . ( 1 ) We evaluate the image quantizer based on reconstruction quality metrics including ` 1 distance , ` 2 distance , log-laplace distance , as well as Inception Score ( IS ) and Fréchet Inception Distance ( FID ) of reconstructed images . ( 2 ) We evaluate the capabilities of the learned quantizer for unconditional or class-conditioned image synthesis based on FID and IS , and compare with other methods . ( 3 ) We rely on linear-probe accuracy to evaluate representations with the common intuition that good features should linearly separate the classes of downstream tasks . 2 RELATED WORK . Image Synthesis . Image generation has received much attention with the progress of deep generative models , including Generative Adversarial Networks ( GANs ) ( Goodfellow et al. , 2014 ; Zhang et al. , 2019b ) , Variational Autoencoders ( VAEs ) ( Kingma & Welling , 2014 ; Vahdat & Kautz , 2020 ) , Diffusion Models ( Song & Ermon , 2019 ; Dhariwal & Nichol , 2021 ) and Autoregressive Models ( van den Oord et al. , 2016 ; Parmar et al. , 2018 ) . Unlike many autogressive methods which generate sequence directly in pixel space , VQVAE ( van den Oord et al. , 2017 ; Razavi et al. , 2019 ) decomposes the image generation process into two stages : the first stage trains a vector quantized autoencoder with image reconstruction objective to convert an image into a shorter sequence of discrete tokens . Then the second stage learns an autoregressive model , e.g. , PixelSNAIL ( Chen et al. , 2018 ) , to model the underlying distribution of token sequences . Driven by the effectiveness of VQVAE and progress in sequence modeling ( Vaswani et al. , 2017 ; Devlin et al. , 2019 ) , many approaches follow the two-stage paradigm . DALL-E ( Ramesh et al. , 2021 ) improves token prediction in second stage by using Transformers ( Vaswani et al. , 2017 ) , resulting in a strong text-to-image synthesis model . VQGAN ( Esser et al. , 2021 ) further uses adversarial loss and perceptual loss ( Johnson et al. , 2016 ; Zhang et al. , 2018 ) to train a better autoencoder in the first stage to synthesize greater detail in images . Image Recognition with Generative Pretraining . Many image generation models ( Goodfellow et al. , 2014 ; Kingma & Welling , 2014 ; Radford et al. , 2016 ; Donahue et al. , 2017 ; Higgins et al. , 2017 ) have been studied for their capabilities in representation learning . However , their performance is usually not superior to competing self-supervised approaches that solve auxiliary classification tasks ( Noroozi & Favaro , 2016a ; Gidaris et al. , 2018a ; van den Oord et al. , 2018 ) . BigBiGAN ( Donahue & Simonyan , 2019a ) first demonstrated that a generation-based model can match other self-supervised methods in representation learning on ImageNet . iGPT ( Chen et al. , 2020a ) uses the autoregressive objective to learn a giant transformer that directly predicts pixel values , producing even more competitive results . Compared to iGPT , our method first tokenizes the original image into discrete image tokens and then trains a transformer to predict them . As a result , our approach obtains comparable results with smaller model and less data . Similar to our method in predicting image tokens , BEiT ( Bao et al. , 2021 ) follows pre-training scheme of BERT Devlin et al . ( 2019 ) by learning to recover randomly masked image tokens with a bidirectional transformer . Unlike BEiT , we explore vector-quantized image modeling for image generation in addition to image recognition . 3 VECTOR-QUANTIZED IMAGES WITH VIT-VQGAN . The Vector-quantized Variational AutoEncoder ( VQVAE ) ( van den Oord et al. , 2017 ) is a CNNbased auto-encoder whose latent space is a matrix of discrete learnable variables , trained end-to-end via straight-through estimation . Esser et al . ( 2021 ) introduce VQGAN , a model which improves upon VQVAE by introducing an adversarial loss produced by a discriminator . Below , we introduce further improvements to VQGAN that boost efficiency and enhance reconstruction quality . 3.1 VQGAN WITH VISION TRANSFORMERS . The core network architectures used by both VQVAE and VQGAN to encode and reconstruct images are CNNs . VQGAN introduces transformer-like elements in the form of non-local attention block ( Zhang et al. , 2019a ) , allowing it to capture distant interactions with fewer layers . We propose taking this approach one step further by replacing the CNN encoder and decoder with Vision Transformer ( ViT ) ( Dosovitskiy et al. , 2020 ) , as shown in Figure 1 . Given sufficient data ( for which unlabeled image data is plentiful ) we find that ViT-VQGAN is less constrained by the inductive priors imposed by convolutions . Furthermore , ViT-VQGAN yields better computational efficiency on accelerators , and produces higher quality reconstructions , as shown in Table 1 . The encoder of ViT-VQGAN first maps 8×8 non-overlapping image patches into image tokens , followed by Transformer blocks , encoding a 256×256 resolution image into a 32×32=1024 token sequence . The decoder performs the inverse operation , mapping each image token from latent variables back to 8×8 image patches and regrouping them into a 256×256 image ( see Figure 1 ) . At the output of transformer blocks , we apply a two-layer feed-forward network with a tanh activation layer in the middle . No activation is applied at the output of ViT-VQGAN encoder or decoder . We find that this simple approach yields high quality reconstructions without any noticeable grid artifacts . | This paper proposes vision transformer based VQGAN whose encoder and decoder are implemented as transformers rather than standard CNNs. It provides few improvements that demonstrates quantitatively better results in multiple datasets in unconditional / conditional image generation. It also shows how the proposed model can perform well as an unsupervised representation learning framework. | SP:4b745d0f1a688e009c1eff19df47effd48a053ee |
CLOOB: Modern Hopfield Networks with InfoLOOB Outperform CLIP | 1 INTRODUCTION . With the advent of large corpora of unlabeled data in vision and language , self-supervised learning via contrastive learning has become highly successful . Some contrastive learning objectives , such as those of BYOL ( Grill et al. , 2020 ) and SimSiam ( Chen & He , 2021 ) , do not require negative samples . However , the most popular objective for contrastive learning is InfoNCE ( van den Oord et al. , 2018 ) , in which for an anchor sample , a positive sample is contrasted with negative samples . The idea to use objectives with negative samples is well known in deep learning ( Gutmann & Hyvärinen , 2010 ; Chen et al. , 2017 ; Mikolov et al. , 2013 ) . For contrastive learning , the most successful objective is InfoNCE , which has been introduced as Contrastive Predictive Coding ( CPC ) ( van den Oord et al. , 2018 ) . InfoNCE has been applied to transfer learning ( Hénaff et al. , 2019 ) , to natural language response suggestion ( Henderson et al. , 2017 ) , to learning sentence representations from unlabelled data ( Logeswaran & Lee , 2018 ) , and to unsupervised feature learning by maximizing distinctions between instances ( Wu et al. , 2018 ) . InfoNCE has been used for learning visual representations in Pretext-Invariant Representation Learning ( PIRL ) ( Misra & vanDerMaaten , 2020 ) , in Momentum Contrast ( MoCo ) ( He et al. , 2020 ) , and in SimCLR ( Chen et al. , 2020 ) . SimCLR became well known as is was highly effective for transfer learning . Zero-shot transfer learning ( Lampert et al. , 2009 ) is one of the most ambitious goals in vision , since it would improve various real-world downstream applications . Current models in natural language processing and vision perform very well on standard benchmarks , but they fail at new data , new applications , deployments in the wild , and stress tests ( D ’ Amour et al. , 2020 ; Recht et al. , 2019 ; Taori et al. , 2020 ; Lapuschkin et al. , 2019 ; Geirhos et al. , 2020 ) . A model with high zero-shot transfer learning performance will not fail on such data , therefore will be trusted by practitioners . Contrastive Language-Image Pre-training ( CLIP ) based on the InfoNCE objective yielded very impressive results at zero-shot transfer learning ( Radford et al. , 2021 ) . CLIP learns expressive image embeddings directly from raw text , thereby leverages a much richer source of supervision than just labels . A plethora of CLIP follow-up work has already been published ( see Appendix Section A.5 ) . The CLIP model is considered as an important foundation model ( Bommasani et al. , 2021 ) . Though CLIP excels at zero-shot transfer learning , it can be improved . CLIP training suffers from an “ explaining away ” problem ( Wellman & Henrion , 1993 ) , which leads to “ shortcut learning ” ( Geirhos et al. , 2020 ) or the Clever Hans phenomenon ( Lapuschkin et al. , 2019 ) . Explaining away impedes the increase of the similarity between a text and a corresponding image , since learning focuses on only one common aspect and does not exploit the full covariance structure of the data . If one common aspect is sufficient for high similarity , the InfoNCE objective saturates , since it has the form a/ ( a+ b ) with a giving the similarity of a matched pair and b giving the average similarity of unmatched pairs . For a large similarity a , the objective saturates and increasing a has a small effect . Contrary to InfoNCE , the leave-one-out ( “ InfoLOOB ” ) bound ( Poole et al. , 2019 ) is of the form a/b which does not saturate . However , so far the InfoLOOB bound was not used as an objective in contrastive learning . We justify the maximization of the InfoLOOB bound for contrastive learning in Appendix Section A.1.3 . We show that maximizing the InfoLOOB bound leads to a good approximation of the mutual information , in particular for high mutual information . A problem of InfoLOOB is that it has high variance for small b . Even when InfoLOOB avoids saturation , CLIP insufficiently extracts the covariance structure in the data . The covariance originates from co-occurrences of related words in text or from co-occurrences of objects , textures , or colors in images . CLIP ’ s problem of insufficiently extracting the covariance structure of the data is tackled by modern Hopfield networks . Hopfield networks are energy-based , binary associative memories , which popularized artificial neural networks in the 1980s ( Hopfield , 1982 ; 1984 ) . Associative memory networks have been designed to store and retrieve samples . Their storage capacity can be considerably increased by polynomial terms in the energy function ( Chen et al. , 1986 ; Psaltis & Cheol , 1986 ; Baldi & Venkatesh , 1987 ; Gardner , 1987 ; Abbott & Arian , 1987 ; Horn & Usher , 1988 ; Caputo & Niemann , 2002 ; Krotov & Hopfield , 2016 ) . In contrast to these binary memory networks , we use continuous associative memory networks with very high storage capacity . These modern Hopfield networks for deep learning architectures have an energy function with continuous states and can retrieve samples with only one update ( Ramsauer et al. , 2021 ; 2020 ) . Modern Hopfield Networks have already been successfully applied to immune repertoire classification ( Widrich et al. , 2020 ) and chemical reaction prediction ( Seidl et al. , 2021 ) . Modern Hopfield networks reinforce the covariance structure in the data and stabilize the InfoLOOB objective by increasing b . The covariance structure of retrieved embeddings is amplified through co-occurrences of embedding features in the memory . Additionally , the retrieved embeddings are less noisy and more similar to one another which leads to a larger b . We introduce “ Contrastive Leave One Out Boost ” ( CLOOB ) which overcomes CLIP ’ s problems of ( i ) “ explaining away ” with saturation and ( ii ) insufficiently extracting the covariance structure of the data . CLOOB uses the leave-one-out ( “ InfoLOOB ” ) bound ( Poole et al. , 2019 ) as the objective in combination with modern Hopfield networks . Our contributions are : ( a ) we introduce a new contrastive learning method called CLOOB , ( b ) we propose InfoLOOB as an objective for contrastive learning , ( c ) we propose to use modern Hopfield networks to reinforce covariance structures , ( d ) we show theoretical properties of the InfoLOOB objective and loss function . 2 INFOLOOB VS. INFONCE . We discuss and analyse known bounds on the mutual information I ( X ; Y ) between random variables X and Y , which are distributed according to p ( x , y ) : I ( X ; Y ) = Ep ( x , y ) [ ln p ( x , y ) p ( x ) p ( y ) ] = Ep ( x , y ) [ ln p ( x | y ) p ( x ) ] = Ep ( x , y ) [ ln p ( y | x ) p ( y ) ] . ( 1 ) We consider the multi-sample lower bound “ InfoNCE ” ( van den Oord et al. , 2018 ) . A pair of an anchor sample y and a positive sample x1 is drawn via the joint distribution p ( x1 , y ) . The negative samples X̃ = { x2 , . . . , xN } are drawn iid according to the marginal distribution p ( x ) . Using X = { x1 , x2 , . . . , xN } , the probabilities of the datasets are p ( X̃ ) = ∏N i=2 p ( xi ) , p ( X | y ) = p ( x1 | y ) ∏N i=2 p ( xi ) , and p ( X ) = ∏N i=1 p ( xi ) . The InfoNCE with score function f ( x , y ) is IInfoNCE ( X1 ; Y ) = Ep ( y ) [ Ep ( X|y ) [ ln ( f ( x1 , y ) 1 N ∑N i=1 f ( xi , y ) ) ] ] , ( 2 ) using the factor 1/N as in Poole et al . ( 2019 ) ; Tschannen et al . ( 2019 ) ; Cheng et al . ( 2020 ) ; Chen et al . ( 2021 ) . For f ( x , y ) = p ( y | x ) , we obtain the InfoNCE with probabilities . The InfoNCE is a lower bound on the mutual information ( Poole et al. , 2019 ) , which is stated in the next theorem . Theorem 1 ( InfoNCE lower bound ) . InfoNCE with score function f ( x , y ) is a lower bound on the mutual information : I ( X1 ; Y ) ≥ Ep ( y ) [ Ep ( X|y ) [ ln ( f ( x1 , y ) 1 N ∑N i=1 f ( xi , y ) ) ] ] = IInfoNCE ( X1 ; Y ) . ( 3 ) In particular , the bound holds for InfoNCE with probabilities , i.e . for f ( x , y ) = p ( y | x ) . For a proof see Poole et al . ( 2019 ) and the proof of Theorem A1 in the Appendix . The “ Leave one out upper bound ” ( Poole et al. , 2019 ) on the mutual information was called “ L1Out ” in Cheng et al . ( 2020 ) , while we call it “ InfoLOOB ” ( LOOB for “ Leave One Out Bound ” ) . InfoLOOB is the same as InfoNCE ( Eq . ( 3 ) ) , but without the positive sample x1 in the denominator . Contrastive Log-ratio Upper Bound ( CLUB ) , another upper bound on the mutual information , was only used for minimizing it ( Cheng et al. , 2020 ) . Maximizing CLUB failed in experiments , because the embedding distribution was not uniform as known for similar objectives ( Wang & Liu , 2021 ) . Uniform embedding distributions are required for successful contrastive learning ( Wang & Isola , 2020 ) . We use InfoLOOB as an objective , since it approximates high mutual information better than InfoNCE . Maximizing an upper bound on the mutual information might be counter-intuitive . Therefore , we justify the maximization of the InfoLOOB bound for contrastive learning in Appendix Section A.1.3 . We show that maximizing the InfoLOOB bound approximates the mutual information , the better the higher it is . Recently , InfoLOOB was independently introduced for and successfully applied to image-to-image contrastive learning ( Yeh et al. , 2021 ) . The InfoLOOB with score function f ( x , y ) is defined in the following , where we obtain the InfoLOOB with probabilities for f ( x , y ) = p ( y | x ) : IInfoLOOB ( X1 ; Y ) = Ep ( y ) [ Ep̃ ( X|y ) [ ln ( f ( x1 , y ) 1 N−1 ∑N i=2 f ( xi , y ) ) ] ] . ( 4 ) Before we show that InfoLOOB with a score function is an upper bound on the mutual information , we need some definitions . p̃ ( x | y ) draws the positives for y with lower probability than p ( x ) , that is , the positives are under-sampled . Z ( y ) = Ep̃ ( x|y ) [ f ( x , y ) ] gives the average score f ( x , y ) , if under-sampling via p̃ ( x | y ) , while Z∗ ( y ) = Ep ( x ) [ f ( x , y ) ] average score f ( x , y ) if sampling from p ( x ) . We define the variational distribution q ( x | y ) = p ( x ) f ( x , y ) Z∗ ( y ) . Our main assumption is expressed by the log-ratio of the averages Z ( y ) and Z∗ ( y ) : Ep ( y ) [ KL ( p ( x | y ) ‖ q ( x | y ) ) ] 6 Ep ( y ) [ lnZ∗ ( y ) − lnZ ( y ) ] , ( 5 ) which ensures that the positives x are sufficiently under-sampled via p ( x | y ) . The Kullback-Leibler divergence gives the minimal difference between averaging f ( x , y ) via p ( x ) and via p̃ ( x | y ) . The next theorem shows that InfoLOOB is an upper bound on the mutual information . Theorem 2 ( InfoLOOB upper bound ) . If X̃ = { x2 , . . . , xN } are drawn iid according to p̃ ( x | y ) and if the main assumption Eq . ( 5 ) holds , then InfoLOOB with score function f ( x , y ) is an upper bound on the mutual information : I ( X1 ; Y ) 6 Ep ( y ) [ Ep̃ ( X|y ) [ ln ( f ( x1 , y ) 1 N−1 ∑N i=2 f ( xi , y ) ) ] ] = IInfoLOOB ( X1 ; Y ) . ( 6 ) The bound is valid for InfoLOOB with probabilities ( without under-sampling ) , where the negative samples X̃ = { x2 , . . . , xN } are drawn iid according to p ( x ) and f ( x , y ) = p ( y | x ) . The proof for this theorem is given as proof for Theorem A2 in the Appendix . Loss functions and their gradients . The training set { ( x1 , y1 ) , ( x2 , y2 ) , . . . , ( xN , yN ) } consists of N samples that are drawn iid from p ( x , y ) . InfoNCE uses the matrixX = ( x1 , . . . , xN ) , while InfoLOOB uses X̃ = ( x2 , . . . , xN ) . The matrices differ by the positive sample x1 . For the score function f ( x , y ) , we use f ( x , y ) = exp ( τ−1sim ( x , y ) ) with the similarity sim ( x , y ) = yTx and τ as the temperature . We have the InfoNCE and InfoLOOB loss functions : LInfoNCE = − 1 N N∑ i=1 ln exp ( τ−1 xTi yi ) ∑N j=1 exp ( τ −1 xTi yj ) − 1 N N∑ i=1 ln exp ( τ−1 xTi yi ) ∑N j=1 exp ( τ −1 xTj yi ) , ( 7 ) LInfoLOOB = − 1 N N∑ i=1 ln exp ( τ−1 xTi yi ) ∑N j 6=i exp ( τ −1 xTi yj ) − 1 N N∑ i=1 ln exp ( τ−1 xTi yi ) ∑N j 6=i exp ( τ −1 xTj yi ) . ( 8 ) In the second sum of the losses in Eq . 7 and Eq . 8 , we consider only the first term . For simplicity , we abbreviate y = y1 leading to the pair ( x1 , y ) and the negatives X̃ = ( x2 , . . . , xN ) . LInfoNCE ( y ) = − ln exp ( τ−1 xT1 y ) ∑N j=1 exp ( τ −1 xTj y ) , LInfoLOOB ( y ) = − ln exp ( τ−1 xT1 y ) ∑N j=2 exp ( τ −1 xTj y ) . These loss terms can be simplified to LInfoNCE ( y ) = −τ−1yTx1 + τ−1lse ( τ−1 , XTy ) and LInfoLOOB ( y ) = −τ−1yTx1 + τ−1lse ( τ−1 , X̃Ty ) , where lse is the log-sum-exp function ( see Eq . ( A103 ) in the Appendix ) . The gradient of the InfoNCE loss with respect to y is −τ−1x1 + τ−1Xsoftmax ( τ−1XTy ) and the gradient of the InfoLOOB loss is −τ−1x1 + τ−1X̃softmax ( τ−1X̃Ty ) . Using p = ( p1 , . . . , pN ) T = softmax ( τ−1XTy ) , the gradient of InfoNCE with respect to y is −τ−1 ( 1 − p1 ) ( x1 − X̃softmax ( τ−1X̃Ty ) ) and its gradient with respect to x1 is −τ−1 ( 1− p1 ) y ( see Appendix Subsection A.1.4 ) . By and large , the gradient of InfoNCE is scaled by ( 1− p1 ) compared to the gradient of InfoLOOB , where p1 is softmax similarity between the anchor y and positive sample x1 . Consequently , InfoNCE saturates and learning stalls when anchor and positive sample become similar to each other . | By using the InfoNCE loss for model training, CLIP has achieved great success. In this paper, the authors propose CLOOB, short for "Contrastive Leave One Out Boost", where modern Hopfield networks are used together with the InfoLOOB objective. InfoLOOB is a leave-one-out upper bound of mutual information, and modern Hopfield networks replace the original embeddings by retrieved embeddings. Results show that CLOOB outperforms CLIP at zero-shot transfer learning across multiple architectures and datasets. | SP:23873ae412ac3528036025fc3f53896c220984b4 |
CLOOB: Modern Hopfield Networks with InfoLOOB Outperform CLIP | 1 INTRODUCTION . With the advent of large corpora of unlabeled data in vision and language , self-supervised learning via contrastive learning has become highly successful . Some contrastive learning objectives , such as those of BYOL ( Grill et al. , 2020 ) and SimSiam ( Chen & He , 2021 ) , do not require negative samples . However , the most popular objective for contrastive learning is InfoNCE ( van den Oord et al. , 2018 ) , in which for an anchor sample , a positive sample is contrasted with negative samples . The idea to use objectives with negative samples is well known in deep learning ( Gutmann & Hyvärinen , 2010 ; Chen et al. , 2017 ; Mikolov et al. , 2013 ) . For contrastive learning , the most successful objective is InfoNCE , which has been introduced as Contrastive Predictive Coding ( CPC ) ( van den Oord et al. , 2018 ) . InfoNCE has been applied to transfer learning ( Hénaff et al. , 2019 ) , to natural language response suggestion ( Henderson et al. , 2017 ) , to learning sentence representations from unlabelled data ( Logeswaran & Lee , 2018 ) , and to unsupervised feature learning by maximizing distinctions between instances ( Wu et al. , 2018 ) . InfoNCE has been used for learning visual representations in Pretext-Invariant Representation Learning ( PIRL ) ( Misra & vanDerMaaten , 2020 ) , in Momentum Contrast ( MoCo ) ( He et al. , 2020 ) , and in SimCLR ( Chen et al. , 2020 ) . SimCLR became well known as is was highly effective for transfer learning . Zero-shot transfer learning ( Lampert et al. , 2009 ) is one of the most ambitious goals in vision , since it would improve various real-world downstream applications . Current models in natural language processing and vision perform very well on standard benchmarks , but they fail at new data , new applications , deployments in the wild , and stress tests ( D ’ Amour et al. , 2020 ; Recht et al. , 2019 ; Taori et al. , 2020 ; Lapuschkin et al. , 2019 ; Geirhos et al. , 2020 ) . A model with high zero-shot transfer learning performance will not fail on such data , therefore will be trusted by practitioners . Contrastive Language-Image Pre-training ( CLIP ) based on the InfoNCE objective yielded very impressive results at zero-shot transfer learning ( Radford et al. , 2021 ) . CLIP learns expressive image embeddings directly from raw text , thereby leverages a much richer source of supervision than just labels . A plethora of CLIP follow-up work has already been published ( see Appendix Section A.5 ) . The CLIP model is considered as an important foundation model ( Bommasani et al. , 2021 ) . Though CLIP excels at zero-shot transfer learning , it can be improved . CLIP training suffers from an “ explaining away ” problem ( Wellman & Henrion , 1993 ) , which leads to “ shortcut learning ” ( Geirhos et al. , 2020 ) or the Clever Hans phenomenon ( Lapuschkin et al. , 2019 ) . Explaining away impedes the increase of the similarity between a text and a corresponding image , since learning focuses on only one common aspect and does not exploit the full covariance structure of the data . If one common aspect is sufficient for high similarity , the InfoNCE objective saturates , since it has the form a/ ( a+ b ) with a giving the similarity of a matched pair and b giving the average similarity of unmatched pairs . For a large similarity a , the objective saturates and increasing a has a small effect . Contrary to InfoNCE , the leave-one-out ( “ InfoLOOB ” ) bound ( Poole et al. , 2019 ) is of the form a/b which does not saturate . However , so far the InfoLOOB bound was not used as an objective in contrastive learning . We justify the maximization of the InfoLOOB bound for contrastive learning in Appendix Section A.1.3 . We show that maximizing the InfoLOOB bound leads to a good approximation of the mutual information , in particular for high mutual information . A problem of InfoLOOB is that it has high variance for small b . Even when InfoLOOB avoids saturation , CLIP insufficiently extracts the covariance structure in the data . The covariance originates from co-occurrences of related words in text or from co-occurrences of objects , textures , or colors in images . CLIP ’ s problem of insufficiently extracting the covariance structure of the data is tackled by modern Hopfield networks . Hopfield networks are energy-based , binary associative memories , which popularized artificial neural networks in the 1980s ( Hopfield , 1982 ; 1984 ) . Associative memory networks have been designed to store and retrieve samples . Their storage capacity can be considerably increased by polynomial terms in the energy function ( Chen et al. , 1986 ; Psaltis & Cheol , 1986 ; Baldi & Venkatesh , 1987 ; Gardner , 1987 ; Abbott & Arian , 1987 ; Horn & Usher , 1988 ; Caputo & Niemann , 2002 ; Krotov & Hopfield , 2016 ) . In contrast to these binary memory networks , we use continuous associative memory networks with very high storage capacity . These modern Hopfield networks for deep learning architectures have an energy function with continuous states and can retrieve samples with only one update ( Ramsauer et al. , 2021 ; 2020 ) . Modern Hopfield Networks have already been successfully applied to immune repertoire classification ( Widrich et al. , 2020 ) and chemical reaction prediction ( Seidl et al. , 2021 ) . Modern Hopfield networks reinforce the covariance structure in the data and stabilize the InfoLOOB objective by increasing b . The covariance structure of retrieved embeddings is amplified through co-occurrences of embedding features in the memory . Additionally , the retrieved embeddings are less noisy and more similar to one another which leads to a larger b . We introduce “ Contrastive Leave One Out Boost ” ( CLOOB ) which overcomes CLIP ’ s problems of ( i ) “ explaining away ” with saturation and ( ii ) insufficiently extracting the covariance structure of the data . CLOOB uses the leave-one-out ( “ InfoLOOB ” ) bound ( Poole et al. , 2019 ) as the objective in combination with modern Hopfield networks . Our contributions are : ( a ) we introduce a new contrastive learning method called CLOOB , ( b ) we propose InfoLOOB as an objective for contrastive learning , ( c ) we propose to use modern Hopfield networks to reinforce covariance structures , ( d ) we show theoretical properties of the InfoLOOB objective and loss function . 2 INFOLOOB VS. INFONCE . We discuss and analyse known bounds on the mutual information I ( X ; Y ) between random variables X and Y , which are distributed according to p ( x , y ) : I ( X ; Y ) = Ep ( x , y ) [ ln p ( x , y ) p ( x ) p ( y ) ] = Ep ( x , y ) [ ln p ( x | y ) p ( x ) ] = Ep ( x , y ) [ ln p ( y | x ) p ( y ) ] . ( 1 ) We consider the multi-sample lower bound “ InfoNCE ” ( van den Oord et al. , 2018 ) . A pair of an anchor sample y and a positive sample x1 is drawn via the joint distribution p ( x1 , y ) . The negative samples X̃ = { x2 , . . . , xN } are drawn iid according to the marginal distribution p ( x ) . Using X = { x1 , x2 , . . . , xN } , the probabilities of the datasets are p ( X̃ ) = ∏N i=2 p ( xi ) , p ( X | y ) = p ( x1 | y ) ∏N i=2 p ( xi ) , and p ( X ) = ∏N i=1 p ( xi ) . The InfoNCE with score function f ( x , y ) is IInfoNCE ( X1 ; Y ) = Ep ( y ) [ Ep ( X|y ) [ ln ( f ( x1 , y ) 1 N ∑N i=1 f ( xi , y ) ) ] ] , ( 2 ) using the factor 1/N as in Poole et al . ( 2019 ) ; Tschannen et al . ( 2019 ) ; Cheng et al . ( 2020 ) ; Chen et al . ( 2021 ) . For f ( x , y ) = p ( y | x ) , we obtain the InfoNCE with probabilities . The InfoNCE is a lower bound on the mutual information ( Poole et al. , 2019 ) , which is stated in the next theorem . Theorem 1 ( InfoNCE lower bound ) . InfoNCE with score function f ( x , y ) is a lower bound on the mutual information : I ( X1 ; Y ) ≥ Ep ( y ) [ Ep ( X|y ) [ ln ( f ( x1 , y ) 1 N ∑N i=1 f ( xi , y ) ) ] ] = IInfoNCE ( X1 ; Y ) . ( 3 ) In particular , the bound holds for InfoNCE with probabilities , i.e . for f ( x , y ) = p ( y | x ) . For a proof see Poole et al . ( 2019 ) and the proof of Theorem A1 in the Appendix . The “ Leave one out upper bound ” ( Poole et al. , 2019 ) on the mutual information was called “ L1Out ” in Cheng et al . ( 2020 ) , while we call it “ InfoLOOB ” ( LOOB for “ Leave One Out Bound ” ) . InfoLOOB is the same as InfoNCE ( Eq . ( 3 ) ) , but without the positive sample x1 in the denominator . Contrastive Log-ratio Upper Bound ( CLUB ) , another upper bound on the mutual information , was only used for minimizing it ( Cheng et al. , 2020 ) . Maximizing CLUB failed in experiments , because the embedding distribution was not uniform as known for similar objectives ( Wang & Liu , 2021 ) . Uniform embedding distributions are required for successful contrastive learning ( Wang & Isola , 2020 ) . We use InfoLOOB as an objective , since it approximates high mutual information better than InfoNCE . Maximizing an upper bound on the mutual information might be counter-intuitive . Therefore , we justify the maximization of the InfoLOOB bound for contrastive learning in Appendix Section A.1.3 . We show that maximizing the InfoLOOB bound approximates the mutual information , the better the higher it is . Recently , InfoLOOB was independently introduced for and successfully applied to image-to-image contrastive learning ( Yeh et al. , 2021 ) . The InfoLOOB with score function f ( x , y ) is defined in the following , where we obtain the InfoLOOB with probabilities for f ( x , y ) = p ( y | x ) : IInfoLOOB ( X1 ; Y ) = Ep ( y ) [ Ep̃ ( X|y ) [ ln ( f ( x1 , y ) 1 N−1 ∑N i=2 f ( xi , y ) ) ] ] . ( 4 ) Before we show that InfoLOOB with a score function is an upper bound on the mutual information , we need some definitions . p̃ ( x | y ) draws the positives for y with lower probability than p ( x ) , that is , the positives are under-sampled . Z ( y ) = Ep̃ ( x|y ) [ f ( x , y ) ] gives the average score f ( x , y ) , if under-sampling via p̃ ( x | y ) , while Z∗ ( y ) = Ep ( x ) [ f ( x , y ) ] average score f ( x , y ) if sampling from p ( x ) . We define the variational distribution q ( x | y ) = p ( x ) f ( x , y ) Z∗ ( y ) . Our main assumption is expressed by the log-ratio of the averages Z ( y ) and Z∗ ( y ) : Ep ( y ) [ KL ( p ( x | y ) ‖ q ( x | y ) ) ] 6 Ep ( y ) [ lnZ∗ ( y ) − lnZ ( y ) ] , ( 5 ) which ensures that the positives x are sufficiently under-sampled via p ( x | y ) . The Kullback-Leibler divergence gives the minimal difference between averaging f ( x , y ) via p ( x ) and via p̃ ( x | y ) . The next theorem shows that InfoLOOB is an upper bound on the mutual information . Theorem 2 ( InfoLOOB upper bound ) . If X̃ = { x2 , . . . , xN } are drawn iid according to p̃ ( x | y ) and if the main assumption Eq . ( 5 ) holds , then InfoLOOB with score function f ( x , y ) is an upper bound on the mutual information : I ( X1 ; Y ) 6 Ep ( y ) [ Ep̃ ( X|y ) [ ln ( f ( x1 , y ) 1 N−1 ∑N i=2 f ( xi , y ) ) ] ] = IInfoLOOB ( X1 ; Y ) . ( 6 ) The bound is valid for InfoLOOB with probabilities ( without under-sampling ) , where the negative samples X̃ = { x2 , . . . , xN } are drawn iid according to p ( x ) and f ( x , y ) = p ( y | x ) . The proof for this theorem is given as proof for Theorem A2 in the Appendix . Loss functions and their gradients . The training set { ( x1 , y1 ) , ( x2 , y2 ) , . . . , ( xN , yN ) } consists of N samples that are drawn iid from p ( x , y ) . InfoNCE uses the matrixX = ( x1 , . . . , xN ) , while InfoLOOB uses X̃ = ( x2 , . . . , xN ) . The matrices differ by the positive sample x1 . For the score function f ( x , y ) , we use f ( x , y ) = exp ( τ−1sim ( x , y ) ) with the similarity sim ( x , y ) = yTx and τ as the temperature . We have the InfoNCE and InfoLOOB loss functions : LInfoNCE = − 1 N N∑ i=1 ln exp ( τ−1 xTi yi ) ∑N j=1 exp ( τ −1 xTi yj ) − 1 N N∑ i=1 ln exp ( τ−1 xTi yi ) ∑N j=1 exp ( τ −1 xTj yi ) , ( 7 ) LInfoLOOB = − 1 N N∑ i=1 ln exp ( τ−1 xTi yi ) ∑N j 6=i exp ( τ −1 xTi yj ) − 1 N N∑ i=1 ln exp ( τ−1 xTi yi ) ∑N j 6=i exp ( τ −1 xTj yi ) . ( 8 ) In the second sum of the losses in Eq . 7 and Eq . 8 , we consider only the first term . For simplicity , we abbreviate y = y1 leading to the pair ( x1 , y ) and the negatives X̃ = ( x2 , . . . , xN ) . LInfoNCE ( y ) = − ln exp ( τ−1 xT1 y ) ∑N j=1 exp ( τ −1 xTj y ) , LInfoLOOB ( y ) = − ln exp ( τ−1 xT1 y ) ∑N j=2 exp ( τ −1 xTj y ) . These loss terms can be simplified to LInfoNCE ( y ) = −τ−1yTx1 + τ−1lse ( τ−1 , XTy ) and LInfoLOOB ( y ) = −τ−1yTx1 + τ−1lse ( τ−1 , X̃Ty ) , where lse is the log-sum-exp function ( see Eq . ( A103 ) in the Appendix ) . The gradient of the InfoNCE loss with respect to y is −τ−1x1 + τ−1Xsoftmax ( τ−1XTy ) and the gradient of the InfoLOOB loss is −τ−1x1 + τ−1X̃softmax ( τ−1X̃Ty ) . Using p = ( p1 , . . . , pN ) T = softmax ( τ−1XTy ) , the gradient of InfoNCE with respect to y is −τ−1 ( 1 − p1 ) ( x1 − X̃softmax ( τ−1X̃Ty ) ) and its gradient with respect to x1 is −τ−1 ( 1− p1 ) y ( see Appendix Subsection A.1.4 ) . By and large , the gradient of InfoNCE is scaled by ( 1− p1 ) compared to the gradient of InfoLOOB , where p1 is softmax similarity between the anchor y and positive sample x1 . Consequently , InfoNCE saturates and learning stalls when anchor and positive sample become similar to each other . | This paper proposed a new contrastive learning method called CLOOB, which minimized the leave-one-out upper bound (InfoLOOB) on mutual information with the modern Hopfield networks. Concretely, Hopfield networks replace the original embeddings by retrieved embeddings in the InfoLOOB objective. The retrieved embeddings are more robust as they capture the common covariance structure of all sample embeddings, leading to a stable performance of InfoLOOB. Extensive experiments on several zero-shot datasets show that the proposed CLOOB method outperforms the well-known CLIP model across all considered architectures. | SP:23873ae412ac3528036025fc3f53896c220984b4 |
3D Pre-training improves GNNs for Molecular Property Prediction | Molecular property prediction is one of the fastest-growing applications of deep learning with critical real-world impacts . Including 3D molecular structure as input to learned models improves their performance for many molecular tasks . However , this information is infeasible to compute at the scale required by several real-world applications . We propose pre-training a model to reason about the geometry of molecules given only their 2D molecular graphs . Using methods from self-supervised learning , we maximize the mutual information between 3D summary vectors and the representations of a Graph Neural Network ( GNN ) such that they contain latent 3D information . During fine-tuning on molecules with unknown geometry , the GNN still produces implicit 3D information and can use it to improve downstream tasks . We show that 3D pre-training provides significant improvements for a wide range of properties , such as a 22 % average MAE reduction on eight quantum mechanical properties . Moreover , the learned representations can be effectively transferred between datasets in different molecular spaces . 1 INTRODUCTION . The understanding of molecular and quantum chemistry is a rapidly growing area for deep learning with models having direct real-world impacts in quantum chemistry ( Dral , 2020 ) , protein structure prediction ( Jumper et al. , 2021 ) , materials science ( Schmidt et al. , 2019 ) , and drug discovery ( Stokes et al. , 2020 ) . In particular , for the task of molecular property prediction , GNNs have had great success ( Yang et al. , 2019 ) . GNNs operate on the molecular graph by updating each atom ’ s representation based on the atoms connected to it via covalent bonds . However , these models reason poorly about other important interatomic forces that depend on the atoms ’ relative positions in space . Previous works showed that using the atoms ’ 3D coordinates in space improves the accuracy of molecular property prediction ( Schütt et al. , 2017 ; Klicpera et al. , 2020b ; Liu et al. , 2021 ; Klicpera et al. , 2021 ) . However , using classical molecular dynamics simulations to explicitly compute a molecule ’ s geometry before predicting its properties is computationally intractable for many real-world applications . Even recent Machine Learning ( ML ) methods for conformation generation ( Xu et al. , 2021b ; Shi et al. , 2021 ; Ganea et al. , 2021 ) are still too slow for large-scale applications . Our Solution : 3D Infomax We pre-train a GNN to encode implicit 3D information in its latent vectors using publicly available molecular structures . A GNN is pre-trained by maximizing the mutual information ( MI ) between its embedding of a 2D molecular graph and a representation capturing the 3D information that is produced by a separate network . This way , the GNN learns to produce latent 3D information using only the information given by the 2D molecular graphs . After pre-training , the weights can be transferred and fine-tuned on molecular datasets where no 3D information is available . For those molecules , the GNN is still able to produce implicit 3D information that can be used to inform property predictions . Several other self-supervised learning ( SSL ) methods that do not use 3D information have been proposed and evaluated to pre-train GNNs and obtain better property predictions after fine-tuning ( Hu et al. , 2020b ; You et al. , 2020 ; Xu et al. , 2021a ) . These often rely on augmentations ( such as removing atoms ) that significantly alter the molecules while assuming that their properties do not change . Meanwhile , 3D Infomax pre-training teaches the model to reason about how atoms interact in space , which is a principled and generalizable form of information . We analyze our method ’ s performance by pre-training with multiple 3D datasets before evaluating on ten quantum mechanical properties and ten datasets with biological , pharmacological , or chemical properties . 3D Infomax improves property predictions by large margins and the learned representations are highly generalizable : significant improvements are obtained even when the molecular space of the pre-training dataset is vastly different ( e.g. , in size ) from the kinds of molecules in the downstream tasks . While conventional pre-training methods sometimes suffer from negative transfer ( Pan & Yang , 2010 ) , i.e. , a decrease in performance , this is not observed for 3D Infomax . Our main contributions are : . • A 3D pre-training method that enables GNNs to reason about the geometry of molecules given only their 2D molecular graphs , which improves property predictions . • Experiments showing that our learned representations are meaningful for various quantum mechanical , chemical , biological , or pharmacological tasks , without negative transfer . • Empirical evidence that the embeddings generalize across different molecular spaces . • An approach to leverage information from multiple molecular conformers that further im- proves downstream property predictions and an evaluation to what extent this is possible . 2 BACKGROUND . Molecular Conformers We pre-train models to learn 3D information and transfer it to downstream molecular property prediction tasks . This 3D information is not given by a single set of coordinates . For a given molecular graph there are multiple conformers , i.e. , probable arrangements of the atoms , which can lead to different chemical properties . It is usual to consider only the conformers of lower energy since they have a higher probability of naturally occurring . Several tools exist to compute conformers ranging from methods based on classical force fields to slower but more accurate molecular dynamics simulations . Methods such as RDKit ’ s ETKDG algorithm ( Landrum , 2016 ) are fast but in our experiments we find that their less accurate 3D information does not necessarily improve predictions . The popular metadynamics method CREST ( Grimme , 2019 ) offers a good tradeoff between speed and accuracy but still requires about 6 hours per druglike molecule per CPU-core ( Axelrod & Gomez-Bombarelli , 2020 ) . This highlights the need to capture 3D information without explicitly computing structures , especially for drug-discovery screening datasets comprising of millions or billions of molecules ( Gorgulla et al. , 2020 ) . Symmetries of Molecules A molecule ’ s conformation does not change if all the atom coordinates are jointly translated or rotated around a point , i.e. , molecules are symmetric with respect to these two types of transformations which is also called SE ( 3 ) symmetry . Note that some molecules ( called chiral ) are not invariant to reflections : their properties depend on their chirality . Deep learning architectures that capture these symmetries are usually more sample efficient , and they generalize to all symmetric inputs the architecture has been designed for ( Bronstein et al. , 2021 ) . In our method , the produced representations of the 3D structure respect these symmetries of molecules . Scaffold Split The preferred way to evaluate molecular models is to use a scaffold split when generating the train-test sets , such that the molecules from the test set do not share a scaffold with those of the training set . This helps to avoid overestimating the generalization power ( Yang et al. , 2019 ) since ML models tend to memorize and overfit these structures . We use the common Bemis-Murcko scaffold ( Bemis & Murcko , 1996 ) ( see Figure 5 in Appendix A ) . Molecules that share identical scaffolds are put into the same set , i.e. , each scaffold goes into either the train , validation or test set . Graph Neural Networks We make use of GNNs to predict molecular properties given a molecular graph . Many GNNs can be described in the framework of Message Passing Neural Networks ( MPNNs ) ( Gilmer et al. , 2017 ) , such as the PNA model ( Corso et al. , 2020 ) which we employ . The aim of MPNNs is to learn a representation of a graph G = ( V , E ) with vertices V connected by edges E . They do so by iteratively applying message-passing layers and then combining all vertex representations in a readout function . A message-passing layer first creates messages for each edge based on the vertices it connects , then each vertex representation is updated by aggregating the messages of all connected edges and combining them with the previous layer ’ s representation . The messages are usually created by multi-layer perceptrons ( MLPs ) and are aggregated via permutation invariant functions such as taking their mean , max , or sum . After the message-passing layers , another permutation invariant function is used as readout to obtain a final graph level representation . 3 RELATED WORK . Molecular property predictions While ours is the first work on pre-training GNNs for molecular property prediction using 3D information , it heavily draws from the fields of SSL and ML for molecules . An important milestone for the latter was Gilmer et al . ( 2017 ) introducing MPNNs after which GNNs became popular for quantum chemistry ( Brockschmidt , 2020 ; Tang et al. , 2020 ; Withnall et al. , 2020 ) , drug discovery ( Li et al. , 2017 ; Stokes et al. , 2020 ; Torng & Altman , 2019 ) , and molecular property prediction in general ( Coley et al. , 2019 ; Hy et al. , 2018 ; Unke & Meuwly , 2019 ) . The field is well established with easily accessible molecular datasets driving progress ( Wu et al. , 2017 ; Hu et al. , 2020a ) and rigorous evaluations of MPNNs for property prediction ( Yang et al. , 2019 ) showing the effectiveness of the approach . While these GNNs have had great successes by operating on the 2D graph , many tasks on molecules can be improved by additionally using 3D information . A simple approach is to use bond lengths as edge features ( Chen et al. , 2020a ) , but methods that capture more molecular geometry improve on this such as SchNet ( Schütt et al. , 2017 ) . Similarly , DimeNet ( Klicpera et al. , 2020b ; a ) proposed extracting more 3D information via bond angles , which further improved quantum mechanical property prediction . Spherical Message Passing ( SMP ) ( Liu et al. , 2021 ) included another angular quantity , and GemNet ( Klicpera et al. , 2021 ) developed an approach to also capture torsion angles , such that all relative atom positions are uniquely defined . Equivariant Graph Neural Networks ( EGNN ) ( Satorras et al. , 2021 ) achieved the same by operating on all pairwise atom distances . Self-Supervised Learning attempts to find supervision signals in unlabelled data to learn meaningful representations . In particular , contrastive learning ( van den Oord et al. , 2018 ; Gutmann & Hyvärinen , 2010 ; Belghazi et al. , 2018 ; Hjelm et al. , 2019 ) is a popular class of methods . These learn representations by comparing the embeddings of similar and dissimilar inputs and have achieved impressive results in computer vision ( Chen et al. , 2020b ; Caron et al. , 2020 ) . Learning from unlabeled data also is a critical challenge in molecular chemistry since datasets are relatively small due to experimental costs . Several works have explored contrastive learning variants in the context of molecular graphs for non-quantum molecular properties ( Hu et al. , 2020b ; Wang et al. , 2021 ; You et al. , 2020 ; 2021 ; Xu et al. , 2021a ) . The improvements these methods provided in molecular property prediction are still limited and often fail to generalize . | This paper proposes a 3D pretraining method for molecular property prediction. As 3D information is infeasible to compute at the scale required by real-world applications, this paper reasons about the geometry of molecules given only their 2D molecular graphs. During pretraining with molecules whose 3D information is known beforehand, this paper uses a 2D GNN to encode these molecules. Then, it maximizes the mutual information between 3D summary vectors and the encoded representations for injecting 3D information into the representations. During fine-tuning, the model can take 2D molecules as input. The pretraining phase ensures that the representations during fine-tuning contain latent 3D information. The paper pre-trains on three datasets, QM9, GEOM-Drugs, and QMugs, and tests on both quantum mechanical properties (QM9 and GEOM-Drugs) and non-quantum properties (10 datasets, e.g. HIV and BACE). The paper claims that significant improvements are obtained for quantum mechanical properties. Also, the method does not suffer from the negative transfer. | SP:9a904b1fc758f8875bf1f6c2c483ebfadbebb9e8 |
3D Pre-training improves GNNs for Molecular Property Prediction | Molecular property prediction is one of the fastest-growing applications of deep learning with critical real-world impacts . Including 3D molecular structure as input to learned models improves their performance for many molecular tasks . However , this information is infeasible to compute at the scale required by several real-world applications . We propose pre-training a model to reason about the geometry of molecules given only their 2D molecular graphs . Using methods from self-supervised learning , we maximize the mutual information between 3D summary vectors and the representations of a Graph Neural Network ( GNN ) such that they contain latent 3D information . During fine-tuning on molecules with unknown geometry , the GNN still produces implicit 3D information and can use it to improve downstream tasks . We show that 3D pre-training provides significant improvements for a wide range of properties , such as a 22 % average MAE reduction on eight quantum mechanical properties . Moreover , the learned representations can be effectively transferred between datasets in different molecular spaces . 1 INTRODUCTION . The understanding of molecular and quantum chemistry is a rapidly growing area for deep learning with models having direct real-world impacts in quantum chemistry ( Dral , 2020 ) , protein structure prediction ( Jumper et al. , 2021 ) , materials science ( Schmidt et al. , 2019 ) , and drug discovery ( Stokes et al. , 2020 ) . In particular , for the task of molecular property prediction , GNNs have had great success ( Yang et al. , 2019 ) . GNNs operate on the molecular graph by updating each atom ’ s representation based on the atoms connected to it via covalent bonds . However , these models reason poorly about other important interatomic forces that depend on the atoms ’ relative positions in space . Previous works showed that using the atoms ’ 3D coordinates in space improves the accuracy of molecular property prediction ( Schütt et al. , 2017 ; Klicpera et al. , 2020b ; Liu et al. , 2021 ; Klicpera et al. , 2021 ) . However , using classical molecular dynamics simulations to explicitly compute a molecule ’ s geometry before predicting its properties is computationally intractable for many real-world applications . Even recent Machine Learning ( ML ) methods for conformation generation ( Xu et al. , 2021b ; Shi et al. , 2021 ; Ganea et al. , 2021 ) are still too slow for large-scale applications . Our Solution : 3D Infomax We pre-train a GNN to encode implicit 3D information in its latent vectors using publicly available molecular structures . A GNN is pre-trained by maximizing the mutual information ( MI ) between its embedding of a 2D molecular graph and a representation capturing the 3D information that is produced by a separate network . This way , the GNN learns to produce latent 3D information using only the information given by the 2D molecular graphs . After pre-training , the weights can be transferred and fine-tuned on molecular datasets where no 3D information is available . For those molecules , the GNN is still able to produce implicit 3D information that can be used to inform property predictions . Several other self-supervised learning ( SSL ) methods that do not use 3D information have been proposed and evaluated to pre-train GNNs and obtain better property predictions after fine-tuning ( Hu et al. , 2020b ; You et al. , 2020 ; Xu et al. , 2021a ) . These often rely on augmentations ( such as removing atoms ) that significantly alter the molecules while assuming that their properties do not change . Meanwhile , 3D Infomax pre-training teaches the model to reason about how atoms interact in space , which is a principled and generalizable form of information . We analyze our method ’ s performance by pre-training with multiple 3D datasets before evaluating on ten quantum mechanical properties and ten datasets with biological , pharmacological , or chemical properties . 3D Infomax improves property predictions by large margins and the learned representations are highly generalizable : significant improvements are obtained even when the molecular space of the pre-training dataset is vastly different ( e.g. , in size ) from the kinds of molecules in the downstream tasks . While conventional pre-training methods sometimes suffer from negative transfer ( Pan & Yang , 2010 ) , i.e. , a decrease in performance , this is not observed for 3D Infomax . Our main contributions are : . • A 3D pre-training method that enables GNNs to reason about the geometry of molecules given only their 2D molecular graphs , which improves property predictions . • Experiments showing that our learned representations are meaningful for various quantum mechanical , chemical , biological , or pharmacological tasks , without negative transfer . • Empirical evidence that the embeddings generalize across different molecular spaces . • An approach to leverage information from multiple molecular conformers that further im- proves downstream property predictions and an evaluation to what extent this is possible . 2 BACKGROUND . Molecular Conformers We pre-train models to learn 3D information and transfer it to downstream molecular property prediction tasks . This 3D information is not given by a single set of coordinates . For a given molecular graph there are multiple conformers , i.e. , probable arrangements of the atoms , which can lead to different chemical properties . It is usual to consider only the conformers of lower energy since they have a higher probability of naturally occurring . Several tools exist to compute conformers ranging from methods based on classical force fields to slower but more accurate molecular dynamics simulations . Methods such as RDKit ’ s ETKDG algorithm ( Landrum , 2016 ) are fast but in our experiments we find that their less accurate 3D information does not necessarily improve predictions . The popular metadynamics method CREST ( Grimme , 2019 ) offers a good tradeoff between speed and accuracy but still requires about 6 hours per druglike molecule per CPU-core ( Axelrod & Gomez-Bombarelli , 2020 ) . This highlights the need to capture 3D information without explicitly computing structures , especially for drug-discovery screening datasets comprising of millions or billions of molecules ( Gorgulla et al. , 2020 ) . Symmetries of Molecules A molecule ’ s conformation does not change if all the atom coordinates are jointly translated or rotated around a point , i.e. , molecules are symmetric with respect to these two types of transformations which is also called SE ( 3 ) symmetry . Note that some molecules ( called chiral ) are not invariant to reflections : their properties depend on their chirality . Deep learning architectures that capture these symmetries are usually more sample efficient , and they generalize to all symmetric inputs the architecture has been designed for ( Bronstein et al. , 2021 ) . In our method , the produced representations of the 3D structure respect these symmetries of molecules . Scaffold Split The preferred way to evaluate molecular models is to use a scaffold split when generating the train-test sets , such that the molecules from the test set do not share a scaffold with those of the training set . This helps to avoid overestimating the generalization power ( Yang et al. , 2019 ) since ML models tend to memorize and overfit these structures . We use the common Bemis-Murcko scaffold ( Bemis & Murcko , 1996 ) ( see Figure 5 in Appendix A ) . Molecules that share identical scaffolds are put into the same set , i.e. , each scaffold goes into either the train , validation or test set . Graph Neural Networks We make use of GNNs to predict molecular properties given a molecular graph . Many GNNs can be described in the framework of Message Passing Neural Networks ( MPNNs ) ( Gilmer et al. , 2017 ) , such as the PNA model ( Corso et al. , 2020 ) which we employ . The aim of MPNNs is to learn a representation of a graph G = ( V , E ) with vertices V connected by edges E . They do so by iteratively applying message-passing layers and then combining all vertex representations in a readout function . A message-passing layer first creates messages for each edge based on the vertices it connects , then each vertex representation is updated by aggregating the messages of all connected edges and combining them with the previous layer ’ s representation . The messages are usually created by multi-layer perceptrons ( MLPs ) and are aggregated via permutation invariant functions such as taking their mean , max , or sum . After the message-passing layers , another permutation invariant function is used as readout to obtain a final graph level representation . 3 RELATED WORK . Molecular property predictions While ours is the first work on pre-training GNNs for molecular property prediction using 3D information , it heavily draws from the fields of SSL and ML for molecules . An important milestone for the latter was Gilmer et al . ( 2017 ) introducing MPNNs after which GNNs became popular for quantum chemistry ( Brockschmidt , 2020 ; Tang et al. , 2020 ; Withnall et al. , 2020 ) , drug discovery ( Li et al. , 2017 ; Stokes et al. , 2020 ; Torng & Altman , 2019 ) , and molecular property prediction in general ( Coley et al. , 2019 ; Hy et al. , 2018 ; Unke & Meuwly , 2019 ) . The field is well established with easily accessible molecular datasets driving progress ( Wu et al. , 2017 ; Hu et al. , 2020a ) and rigorous evaluations of MPNNs for property prediction ( Yang et al. , 2019 ) showing the effectiveness of the approach . While these GNNs have had great successes by operating on the 2D graph , many tasks on molecules can be improved by additionally using 3D information . A simple approach is to use bond lengths as edge features ( Chen et al. , 2020a ) , but methods that capture more molecular geometry improve on this such as SchNet ( Schütt et al. , 2017 ) . Similarly , DimeNet ( Klicpera et al. , 2020b ; a ) proposed extracting more 3D information via bond angles , which further improved quantum mechanical property prediction . Spherical Message Passing ( SMP ) ( Liu et al. , 2021 ) included another angular quantity , and GemNet ( Klicpera et al. , 2021 ) developed an approach to also capture torsion angles , such that all relative atom positions are uniquely defined . Equivariant Graph Neural Networks ( EGNN ) ( Satorras et al. , 2021 ) achieved the same by operating on all pairwise atom distances . Self-Supervised Learning attempts to find supervision signals in unlabelled data to learn meaningful representations . In particular , contrastive learning ( van den Oord et al. , 2018 ; Gutmann & Hyvärinen , 2010 ; Belghazi et al. , 2018 ; Hjelm et al. , 2019 ) is a popular class of methods . These learn representations by comparing the embeddings of similar and dissimilar inputs and have achieved impressive results in computer vision ( Chen et al. , 2020b ; Caron et al. , 2020 ) . Learning from unlabeled data also is a critical challenge in molecular chemistry since datasets are relatively small due to experimental costs . Several works have explored contrastive learning variants in the context of molecular graphs for non-quantum molecular properties ( Hu et al. , 2020b ; Wang et al. , 2021 ; You et al. , 2020 ; 2021 ; Xu et al. , 2021a ) . The improvements these methods provided in molecular property prediction are still limited and often fail to generalize . | The authors present 3D Infomax, a graph neural network (GNN) pre-training solution that leverages 3D information to generate better learned embeddings and improve performance on down-stream prediction tasks where 3D information would be useful but not easily obtainable. The approach is useful for a range of downstream tasks involving molecules, including ones that are quantum mechnical, biological, and pharmacological in nature. They also demonstrate that the use of multiple 3D conformations (thereby encoding the inherent flexibility of molecules) further improves performance. | SP:9a904b1fc758f8875bf1f6c2c483ebfadbebb9e8 |
Hierarchically Regularized Deep Forecasting | 1 INTRODUCTION . Multivariate time series forecasting is a key problem in many domains such as retail demand forecasting ( Böse et al. , 2017 ) , financial predictions ( Zhou et al. , 2020 ) , power grid optimization ( Hyndman & Fan , 2009 ) , road traffic modeling ( Li et al. , 2017 ) , and online ads optimization ( Cui et al. , 2011 ) . In many of these setting , the problem involves simultaneously forecasting a large number of possibly correlated time series for various downstream applications . In the retail domain , the time series may capture sales of items in a product inventory , and in power grids , the time series may correspond to energy consumption in a household . Often , these time series are arranged in a natural multi-level hierarchy - for example in retail forecasting , items are grouped into subcategories and categories , and arranged in a product taxonomy . In the case of power consumption forecasting , individual households are grouped into neighborhoods , counties , and cities . The hierarchical structure among the time series can usually be represented as a tree , with the leaf nodes corresponding to time series at the finest granularity , and the edges representing parent-child relationships . Figure 1 illustrates a typical hierarchy in the retail forecasting domain for time series of product sales . In such settings , it is often required to obtain good forecasts , not just for the leaf level time-series ( fine grained forecasts ) , but also for the aggregated time-series corresponding to higher level nodes ( coarse gained forecasts ) . Furthermore , for interpretability and business decision making purposes , it is often desirable to obtain predictions that are roughly coherent or consistent ( Hyndman et al. , 2011 ) with respect to the hierarchy tree . This means that the predictions for each parent time-series is equal to the sum of the predictions for its children time-series . More importantly , incorporating coherence constraints in a hierarchical forecasting model captures the natural inductive bias in most hierarchical datasets , where the ground truth parent and children time series indeed adhere to additive constraints . For example , total sales of a product category is equal to the sum of sales of all items in that category . Some standard approaches for hierarchical forecasting include bottom-up aggregation , or reconciliation-based approaches . Bottom-Up aggregation involves training a model to obtain predictions for the leaf nodes , and then aggregate up along the hierarchy tree to obtain predictions for higher-level nodes . Reconciliation methods ( Ben Taieb & Koo , 2019 ; Taieb et al. , 2017 ; Van Erven & Cugliari , 2015 ; Hyndman et al. , 2016 ; Wickramasuriya et al. , 2015 ; 2020 ; Panagiotelis et al. , 2020 ) make use of a trained model to obtain predictions for all nodes of the tree , and then , in a separate post-processing phase , reconcile ( or modify ) them using various optimization formulations to obtain coherent predictions . Both of these approaches suffer from shortcomings in term of either aggregating noise as one moves to higher level predictions ( bottom-up aggregation ) , or not jointly optimizing the forecasting predictions along with the coherence constraints ( for instance , reconciliation ) . At the same time , there have been several recent advances on using Deep Neural Network models for multivariate forecasting , including Recurrent Neural Network ( RNN ) , Convolutional Neural Network ( CNN ) architectures ( Salinas et al. , 2020 ; Oreshkin et al. , 2019 ; Rangapuram et al. , 2018 ; Benidis et al. , 2020 ) , and models designed for multivariate time series based on dimensionality reduction techniques ( Sen et al. , 2019 ; Wang et al. , 2019 ; Nguyen & Quanz , 2021 ; Salinas et al. , 2019 ; Rasul et al. , 2020 ; de Bézenac et al. , 2020 ) , that have been shown to outperform classical time-series models such as autoregressive and exponential smoothing models ( McKenzie , 1984 ; Hyndman et al. , 2008 ; Hyndman & Athanasopoulos , 2018 ) , especially for large datasets . However , most of these approaches do not explicitly address the question of how to model the hierarchical relationships in the dataset . Deep forecasting models based on Graph Neural Networks ( GNN ) ( Bai et al. , 2020 ; Cao et al. , 2020 ; Yu et al. , 2017 ; Li et al. , 2017 ; Wu et al. , 2020 ) do offer a general framework for learning on graph-structured data . However it is well known ( Bojchevski et al. , 2020 ) that GNNs are hard to scale for learning on graphs with a very large number of nodes , which in real-world settings such as retail forecasting , could involve hundreds of thousands of time series . More importantly , a desirable practical feature for multi-variate forecasting models is to let the prediction of future values for a particular time series only require as input historical data from that time series ( along with covariates ) , without requiring access to historical data from all other time series in the hierarchy . This allows for scalable training and inference of such models using mini-batch gradient descent , without requiring each batch to contain all the time series in the hierarchy . This is often not possible for GNN-based forecasting models , which require batch sizes of the order of the number of time series . Problem Statement : Based on the above motivations , our goal is to design a hierarchical forecasting model with the following requirements : 1 ) The model can be trained using a single-stage pipeline on all the time series data , without any separate post-processing , 2 ) The model captures the additive coherence constraints along the edges of the hierarchy , 3 ) The model is efficiently trainable on large datasets , without requiring , for instance , batch sizes that scale with the number of time series . We propose a principled methodology to address all these above requirements for hierarchical forecasting . Our model comprises of two components , both of which can support coherence constraints . The first component is purely a function of the historical values of a time series , without distinguishing between the individual time series themselves in any other way . Coherence constraints on such a model correspond to imposing an additivity property on the prediction function - which constrains the model to be a linear autoregressive model . However , crucially , our model uses timevarying autoregressive coefficients that can themselves be nonlinear functions of the timestamp and other global features ( linear versions of time-varying AR have been historically used to deal with non-stationary signals ( Sharman & Friedlander , 1984 ) ) . We will refer to this component as the time-varying autoregressive model . The second component focuses on modeling the global temporal patterns in the dataset through identifying a small set of temporal global basis functions . The basis time-series , when combined in different ways , can express the individual dynamics of each time series . In our model , the basis time-series are encoded in a trained seq-2-seq model ( Sutskever et al. , 2014 ) model in a functional form . Each time series is then associated with a learned embedding vector that specifies the weights for decomposition along these basis functions . Predicting a time series into the future using this model then just involves extrapolating the global basis functions and combining them using its weight vector , without explicitly using the past values of that time series . The coherence constraints therefore only impose constraints on the embedding vectors of each time series , which can be easily modeled by a hierarchical regularization function . We call this component a basis decomposition model . As we will see , this part of the model is only approximately coherent unless the embedding constraints hold exactly . In particular , in this paper , we focus on improving model accuracy rather than preserving exact coherency . In Section A.2 , we also provide theoretical justification for how such hierarchical regularization using basis decomposition results in improved prediction accuracy . We experimentally evaluate our model on multiple publicly available hierarchical forecasting datasets . We compare our approach to state-of-the-art ( non-hierarchical ) deep forecasting models , GNN-based models and reconciliation models , and show that our approach can obtain consistently more accurate predictions at all levels of the hierarchy tree . 2 RELATED WORK ON DEEP HIERARCHICAL MODELS . In addition to the works referenced in the previous section , we now discuss a few papers that are more relevant to our approach . Specifically , we discuss some recent deep hierarchical forecasting methods that do not require a post-processing reconciliation step . Hierarchical forecasting methods can be roughly divided into two categories : point forecasters and probabilistic forecasters . Mishchenko et al . ( 2019 ) propose a point-forecasting approach which imposes coherency on a base model via ` 2 regularization on the predictions . Gleason ( 2020 ) extend the idea further to impose the hierarchy on an embedding space rather than the predictions directly . SHARQ ( Han et al. , 2021 ) follows a similar ` 2 regularization based approach as Mishchenko et al . ( 2019 ) , and also extends the idea to probabilistic forecasting . Their model is trained separately for each of the hierarchical levels starting from the leaf level , thus requiring a separate prediction model for each level . Probabilistic forecasting methods include , Hier-E2E ( Rangapuram et al. , 2021 ) which produces perfectly coherent forecasts by using a projection operation on base predictions from a DeepVAR model ( Salinas et al. , 2019 ) . It requires the whole hierarchy of time series to be fed as input to the model leading to a large number of parameters , and hence does not scale well to large hierarchies . Yanchenko et al . ( 2021 ) take a fully Bayesian approach by modelling the hierarchy using conditional distributions . 3 PROBLEM SETTING . We are given a set of N coherent time series of length T , arranged in a pre-defined hierarchy consisting of N nodes . At time step t , the time series data can be represented as a vector yt ∈ RN denoting the time series values of all N nodes . We compactly denote the set of time series for all T steps as a matrix Y = [ y1 , · · · , yT ] > ∈ RT×N . Also define y ( i ) as the ith column of the matrix Y denoting all time steps of the i th time series , and y ( i ) t as the t th value of the i th time series . We compactly denote the H-step history of Y by YH = [ yt−H , · · · , yt−1 ] > ∈ RH×N and the H-step history of y ( i ) by y ( i ) H = [ y ( i ) t−H , · · · , y ( i ) t−1 ] ∈ RH . Similarly define the F -step future of Y as YF = [ yt , · · · , yt+F−1 ] > ∈ RF×N . We use the ·̂ notation to denote predicted values , for example ŶF , ŷF and ŷt . Time series forecasts can often be improved by using features as input to the model along with historical time series . The features often evolve with time , for example , categorical features such as type of holiday , or continuous features such as time of the day . We denote the matrix of such features byX ∈ RT×D , where the t th row denotes the D-dimensional feature vector at the t time step . For simplicity , we assume that the features are global , meaning that they are shared across all time series . We similarly defineXH andXF as above . Hierarchically Coherent Time Series . We assume that the time series data are coherent , that is , they satisfy the sum constraints over the hierarchy . The time series at each node of the hierarchy is the equal to the sum of the time series of its children , or equivalently , equal to the sum of the leaf time series of the sub-tree rooted at that node . Figure 1 shows an example of a sub-tree rooted at a node . As a result of aggregation , the data can have widely varying scales with the values at higher level nodes being magnitudes higher than the leaf level nodes . It is well known that neural network training is more efficient if the data are similarly scaled . Hence , in this paper , we work with rescaled time series data . The time series at each node is downscaled by the number of leaves in the sub-tree rooted at the node , so that now they satisfy mean constraints rather than sum constraints described above . Denote by L ( p ) , the set of leaf nodes of the sub-tree rooted at p. Hierarchically coherent data satisfy the following data mean property , y ( p ) = 1 |L ( p ) | ∑ i∈L ( p ) y ( i ) ( Data Mean Property ) . ( 1 ) | The paper considers point forecasting of hierarchical time series, i.e. multivariate time series with hierarchical aggregation constraints. The authors propose a new approach based on decomposing the series along a global set of basis time series where (approximate) hierarchical constraints are applied on the coefficients of the basis decomposition. Forecasts are produced using a dynamic linear autoregressive model. Compared to existing state-of-the-art hierarchical models, the proposed approach improved overall performance on forecasts at different levels of the hierarchy on several public datasets. | SP:436ded90847e688e4edd7555ddf94838b4337dd4 |
Hierarchically Regularized Deep Forecasting | 1 INTRODUCTION . Multivariate time series forecasting is a key problem in many domains such as retail demand forecasting ( Böse et al. , 2017 ) , financial predictions ( Zhou et al. , 2020 ) , power grid optimization ( Hyndman & Fan , 2009 ) , road traffic modeling ( Li et al. , 2017 ) , and online ads optimization ( Cui et al. , 2011 ) . In many of these setting , the problem involves simultaneously forecasting a large number of possibly correlated time series for various downstream applications . In the retail domain , the time series may capture sales of items in a product inventory , and in power grids , the time series may correspond to energy consumption in a household . Often , these time series are arranged in a natural multi-level hierarchy - for example in retail forecasting , items are grouped into subcategories and categories , and arranged in a product taxonomy . In the case of power consumption forecasting , individual households are grouped into neighborhoods , counties , and cities . The hierarchical structure among the time series can usually be represented as a tree , with the leaf nodes corresponding to time series at the finest granularity , and the edges representing parent-child relationships . Figure 1 illustrates a typical hierarchy in the retail forecasting domain for time series of product sales . In such settings , it is often required to obtain good forecasts , not just for the leaf level time-series ( fine grained forecasts ) , but also for the aggregated time-series corresponding to higher level nodes ( coarse gained forecasts ) . Furthermore , for interpretability and business decision making purposes , it is often desirable to obtain predictions that are roughly coherent or consistent ( Hyndman et al. , 2011 ) with respect to the hierarchy tree . This means that the predictions for each parent time-series is equal to the sum of the predictions for its children time-series . More importantly , incorporating coherence constraints in a hierarchical forecasting model captures the natural inductive bias in most hierarchical datasets , where the ground truth parent and children time series indeed adhere to additive constraints . For example , total sales of a product category is equal to the sum of sales of all items in that category . Some standard approaches for hierarchical forecasting include bottom-up aggregation , or reconciliation-based approaches . Bottom-Up aggregation involves training a model to obtain predictions for the leaf nodes , and then aggregate up along the hierarchy tree to obtain predictions for higher-level nodes . Reconciliation methods ( Ben Taieb & Koo , 2019 ; Taieb et al. , 2017 ; Van Erven & Cugliari , 2015 ; Hyndman et al. , 2016 ; Wickramasuriya et al. , 2015 ; 2020 ; Panagiotelis et al. , 2020 ) make use of a trained model to obtain predictions for all nodes of the tree , and then , in a separate post-processing phase , reconcile ( or modify ) them using various optimization formulations to obtain coherent predictions . Both of these approaches suffer from shortcomings in term of either aggregating noise as one moves to higher level predictions ( bottom-up aggregation ) , or not jointly optimizing the forecasting predictions along with the coherence constraints ( for instance , reconciliation ) . At the same time , there have been several recent advances on using Deep Neural Network models for multivariate forecasting , including Recurrent Neural Network ( RNN ) , Convolutional Neural Network ( CNN ) architectures ( Salinas et al. , 2020 ; Oreshkin et al. , 2019 ; Rangapuram et al. , 2018 ; Benidis et al. , 2020 ) , and models designed for multivariate time series based on dimensionality reduction techniques ( Sen et al. , 2019 ; Wang et al. , 2019 ; Nguyen & Quanz , 2021 ; Salinas et al. , 2019 ; Rasul et al. , 2020 ; de Bézenac et al. , 2020 ) , that have been shown to outperform classical time-series models such as autoregressive and exponential smoothing models ( McKenzie , 1984 ; Hyndman et al. , 2008 ; Hyndman & Athanasopoulos , 2018 ) , especially for large datasets . However , most of these approaches do not explicitly address the question of how to model the hierarchical relationships in the dataset . Deep forecasting models based on Graph Neural Networks ( GNN ) ( Bai et al. , 2020 ; Cao et al. , 2020 ; Yu et al. , 2017 ; Li et al. , 2017 ; Wu et al. , 2020 ) do offer a general framework for learning on graph-structured data . However it is well known ( Bojchevski et al. , 2020 ) that GNNs are hard to scale for learning on graphs with a very large number of nodes , which in real-world settings such as retail forecasting , could involve hundreds of thousands of time series . More importantly , a desirable practical feature for multi-variate forecasting models is to let the prediction of future values for a particular time series only require as input historical data from that time series ( along with covariates ) , without requiring access to historical data from all other time series in the hierarchy . This allows for scalable training and inference of such models using mini-batch gradient descent , without requiring each batch to contain all the time series in the hierarchy . This is often not possible for GNN-based forecasting models , which require batch sizes of the order of the number of time series . Problem Statement : Based on the above motivations , our goal is to design a hierarchical forecasting model with the following requirements : 1 ) The model can be trained using a single-stage pipeline on all the time series data , without any separate post-processing , 2 ) The model captures the additive coherence constraints along the edges of the hierarchy , 3 ) The model is efficiently trainable on large datasets , without requiring , for instance , batch sizes that scale with the number of time series . We propose a principled methodology to address all these above requirements for hierarchical forecasting . Our model comprises of two components , both of which can support coherence constraints . The first component is purely a function of the historical values of a time series , without distinguishing between the individual time series themselves in any other way . Coherence constraints on such a model correspond to imposing an additivity property on the prediction function - which constrains the model to be a linear autoregressive model . However , crucially , our model uses timevarying autoregressive coefficients that can themselves be nonlinear functions of the timestamp and other global features ( linear versions of time-varying AR have been historically used to deal with non-stationary signals ( Sharman & Friedlander , 1984 ) ) . We will refer to this component as the time-varying autoregressive model . The second component focuses on modeling the global temporal patterns in the dataset through identifying a small set of temporal global basis functions . The basis time-series , when combined in different ways , can express the individual dynamics of each time series . In our model , the basis time-series are encoded in a trained seq-2-seq model ( Sutskever et al. , 2014 ) model in a functional form . Each time series is then associated with a learned embedding vector that specifies the weights for decomposition along these basis functions . Predicting a time series into the future using this model then just involves extrapolating the global basis functions and combining them using its weight vector , without explicitly using the past values of that time series . The coherence constraints therefore only impose constraints on the embedding vectors of each time series , which can be easily modeled by a hierarchical regularization function . We call this component a basis decomposition model . As we will see , this part of the model is only approximately coherent unless the embedding constraints hold exactly . In particular , in this paper , we focus on improving model accuracy rather than preserving exact coherency . In Section A.2 , we also provide theoretical justification for how such hierarchical regularization using basis decomposition results in improved prediction accuracy . We experimentally evaluate our model on multiple publicly available hierarchical forecasting datasets . We compare our approach to state-of-the-art ( non-hierarchical ) deep forecasting models , GNN-based models and reconciliation models , and show that our approach can obtain consistently more accurate predictions at all levels of the hierarchy tree . 2 RELATED WORK ON DEEP HIERARCHICAL MODELS . In addition to the works referenced in the previous section , we now discuss a few papers that are more relevant to our approach . Specifically , we discuss some recent deep hierarchical forecasting methods that do not require a post-processing reconciliation step . Hierarchical forecasting methods can be roughly divided into two categories : point forecasters and probabilistic forecasters . Mishchenko et al . ( 2019 ) propose a point-forecasting approach which imposes coherency on a base model via ` 2 regularization on the predictions . Gleason ( 2020 ) extend the idea further to impose the hierarchy on an embedding space rather than the predictions directly . SHARQ ( Han et al. , 2021 ) follows a similar ` 2 regularization based approach as Mishchenko et al . ( 2019 ) , and also extends the idea to probabilistic forecasting . Their model is trained separately for each of the hierarchical levels starting from the leaf level , thus requiring a separate prediction model for each level . Probabilistic forecasting methods include , Hier-E2E ( Rangapuram et al. , 2021 ) which produces perfectly coherent forecasts by using a projection operation on base predictions from a DeepVAR model ( Salinas et al. , 2019 ) . It requires the whole hierarchy of time series to be fed as input to the model leading to a large number of parameters , and hence does not scale well to large hierarchies . Yanchenko et al . ( 2021 ) take a fully Bayesian approach by modelling the hierarchy using conditional distributions . 3 PROBLEM SETTING . We are given a set of N coherent time series of length T , arranged in a pre-defined hierarchy consisting of N nodes . At time step t , the time series data can be represented as a vector yt ∈ RN denoting the time series values of all N nodes . We compactly denote the set of time series for all T steps as a matrix Y = [ y1 , · · · , yT ] > ∈ RT×N . Also define y ( i ) as the ith column of the matrix Y denoting all time steps of the i th time series , and y ( i ) t as the t th value of the i th time series . We compactly denote the H-step history of Y by YH = [ yt−H , · · · , yt−1 ] > ∈ RH×N and the H-step history of y ( i ) by y ( i ) H = [ y ( i ) t−H , · · · , y ( i ) t−1 ] ∈ RH . Similarly define the F -step future of Y as YF = [ yt , · · · , yt+F−1 ] > ∈ RF×N . We use the ·̂ notation to denote predicted values , for example ŶF , ŷF and ŷt . Time series forecasts can often be improved by using features as input to the model along with historical time series . The features often evolve with time , for example , categorical features such as type of holiday , or continuous features such as time of the day . We denote the matrix of such features byX ∈ RT×D , where the t th row denotes the D-dimensional feature vector at the t time step . For simplicity , we assume that the features are global , meaning that they are shared across all time series . We similarly defineXH andXF as above . Hierarchically Coherent Time Series . We assume that the time series data are coherent , that is , they satisfy the sum constraints over the hierarchy . The time series at each node of the hierarchy is the equal to the sum of the time series of its children , or equivalently , equal to the sum of the leaf time series of the sub-tree rooted at that node . Figure 1 shows an example of a sub-tree rooted at a node . As a result of aggregation , the data can have widely varying scales with the values at higher level nodes being magnitudes higher than the leaf level nodes . It is well known that neural network training is more efficient if the data are similarly scaled . Hence , in this paper , we work with rescaled time series data . The time series at each node is downscaled by the number of leaves in the sub-tree rooted at the node , so that now they satisfy mean constraints rather than sum constraints described above . Denote by L ( p ) , the set of leaf nodes of the sub-tree rooted at p. Hierarchically coherent data satisfy the following data mean property , y ( p ) = 1 |L ( p ) | ∑ i∈L ( p ) y ( i ) ( Data Mean Property ) . ( 1 ) | The paper introduces a method for hierarchical time series forecasting. The problem setting is: given historical hierarchical univariate time series data and given historical and future features (like holidays, etc..), try to predict future values for all time series, while keeping the coherence constraints of the hierarchy. The forecasting is broken down into an autoregressive part with shared parameters for all time series, and a basis decomposition with different weights for each time series (regularized by the hierarchy structure). The method is then being compared to different baseline methods on three datasets. | SP:436ded90847e688e4edd7555ddf94838b4337dd4 |
DiBB: Distributing Black-Box Optimization | 1 INTRODUCTION . Black Box Optimization ( BBO ) can be applied , by definition , to any problem independent of the specific application ( Audet & Hare , 2017 ) . In principle , this provides a method that is applicable to problems yet unsolved by the current state of the art . The most obvious catch lies in their computational requirements , which usually takes one of two forms : ( i ) simple black-box solvers suffers from high sample complexity ( i.e. , they are data hungry ) , in exchange for smaller computational requirements ( both in memory and CPU time ) . On the other hand , ( ii ) sophisticated solvers such as modern Evolution Strategies ( ES ; Hansen & Ostermeier 2001 ; Wierstra et al . 2014 ) have a high internal computational cost per sample , in exchange for a wide set of properties ( see Section 2 ) that make for significantly improved sample efficiency . In the first case ( simpler ES ) , the requirement for more samples can be mitigated—to some extent— through the embarrassingly parallel evaluation of a large population of candidate solutions . This approach however has its own limitations , as traversing a more complex fitness landscape often requires a disproportionate growth in the number of required samples as the dimensionality rises . In the second case however ( complex ES ) , algorithms relying on covariance matrix adaptation ( CMA ; e.g . CMA-ES by Hansen 1996 ) have a quadratic complexity in the number of variables for processing a sample . This strictly limits their application ( within a sensible time frame ) to problems within the tens of thousands variables . This limit has restricted the applicability of these methods to rather simple scenarios and applications so far . As a result , most successful applications of ES to high-dimensional problems ( e.g . training larger neural networks ) rely on simpler ES , such as the type ( i ) described above . Most of the per-sample complexity of type ( ii ) algorithms can be traced to the algorithm maintaining and updating the covariance information among the set of variables , which helps the sample efficiency of these algorithms ( as in convergence speed ) at the cost of longer run times ( as in wall-clock speed ) , eventually becoming intractable as the number of variables grows . Several algorithms ( Ros & Hansen , 2008 ; Schaul et al. , 2011 ) thereby implement an assumption of separability between the variables , relinquishing covariance information altogether for a greatly enhanced wall-clock speed per sample . Unsurprisingly , this comes at a cost in terms of convergence speed : these algorithms can require several orders of magnitude more samples to find comparable solutions , depending on the problem structure ( Hansen & Ostermeier , 2001 ) . The approach taken in this paper takes instead into account the fact that the correlation among variables is not uniform for most complex problems . Rather , certain groups of variables will display higher correlation between each other , with variables having lower correlation belonging instead into different groups . This induces two different assumptions on the variable set : groups having high intra-correlation support an assumption of partial correlation , while the low inter-group correlation displays the parallel argument of partial separability . We can represent this using a block-diagonal covariance matrix , which at the same time maintains full-covariance information within the variables belonging to one such group , and discarding the less useful ( and often negligible ) inter-group correlation altogether ( Cuccu & Gomez , 2012 ) . Such an approach allows leveraging covariance information where it is most efficient , while at the same time significantly reducing the memory footprint of the algorithm ( based on the number and size of the groups ) , and even offering additional opportunities for parallelization and distributed computing . We will use the term blocks to refer to the groups of variable with high intra-correlation in the rest of the paper . BBO algorithms are designed to ignore blocks , since they need to work in any unknowable ( blackbox ) environment . Even in a gray-box setting , black-box algorithm engineering can be useful to ensure that no illegitimate assumptions are made in their design . On the other hand , we aim to profit from the added information . Real applications often have a gray-box character , exposing a certain level of expert knowledge about the correlation between variables . Let us take for example the common application of Neuroevolution ( Stanley et al. , 2019 ) , where evolutionary algorithms ( such as ES ) are applied to learn the weights of a neural network . We know from the network ’ s equation that the weights of the connections entering the same neuron ( as opposed to entering different neurons ) are by necessity highly correlated , as they are composed in a linear fashion inside the neuron prior to activation . The same reasoning can be made for the weights of connections entering neurons belonging to the same layer , versus neurons in different layers , because outputs of a layer are linearly combined in the next layer . This principle remains true as the network expands : in complex applications such as those requiring deep networks , the correlation between weights of connections in the early versus late layers will be by design much more limited than in the neuron or layer examples above1 . Based on the above insights , this paper proposes a new framework for Distributed Black Box optimization , named DiBB , see Figure 1 . We leverage the assumption of partial correlation by partitioning the variables set into highly intra-correlated blocks ; then , switching the assumption to partial separability , we search each block with a different instance of the reference BBO algorithm , independently . This makes DiBB particularly suited for neuroevolution applications requiring larger/deep networks . In Section 2 , we provide rigorous theoretical arguments for the sample efficiency of this approach . From a practical perspective , this allows to search blocks asynchronously and even to distribute each BBO instance on different nodes in a cluster . Varying the partition of the variables enables the user to arbitrarily trade-off between wall-clock speed ( smaller blocks ) and sample efficiency ( larger blocks ) , while distributing the BBO instances decouples the complexity from the number of variables , as long 1The fundamental assumption of partial separability across network layers however does not seem to be very well studied in the literature , despite a considerable body of work on neural network loss landscapes ( Fort & Jastrzebski , 2019 ; Soltanolkotabi et al. , 2018 ) . This can be partially tracked to the limited availability of algorithms making use of partial correlation information . as enough machines are available to run the BBO instances . A major challenge comes with solution evaluation , as the variables constituting a sample are practically scattered across a network . This is addressed in Section 3 , by establishing a rather sparse communication scheme . It is important to notice at this point that no assumption or claim has yet been made on the underlying BBO algorithm of choice—nor will be made . While this paper explores the applicability of DiBB in the context of modern , sophisticated ESs , DiBB can be applied to any BBO algorithm with minimal interfaces . We analyze the performance of our framework on the classic COCO benchmark , both on the BBOB and BBOB large-scale suites , using the industry-standard CMA-ES as a reference , and as a blocklevel optimizer within DiBB . The sample complexity of our approach typically ( and as expected ) sits in between the full-covariance and the diagonal-covariance versions of CMA-ES , with few notable exceptions where maintaining extra covariance information is actually deceptive/misleading due to separability . Notably , on parallel hardward , DiBB is considerably faster in terms of wall clock time . To demonstrate the scalability of our algorithms , we present results on training a 20-layer neural network using 20 blocks on 20 machines , the largest neural network trained with neuroevolution to date , to the best of our knowledge . 1.1 CONTRIBUTIONS . Our key contributions are as follows : • We provide a novel way of parallelizing an ES , going beyond the parallel evaluation of candidate solutions forming a population , by optimizing blocks of variables with multiple ES instances . • We exploit the block structure to add covariance matrix information at low cost where it matters most , namely inside blocks of potentially highly correlated variables . • The resulting DiBB framework is particularly well-suited for neuroevolution . However , it can be applied to any BBO method . • We demonstrate that also large and deep networks can be trained efficiently with neuroevolution on highly parallel hardware . 2 A PRIMER ON EVOLUTION STRATEGIES . ES are direct search methods , which optimize a black-box objective function f : Rd → R by sampling candidate points from an adaptive Gaussian distribution . We briefly review the types of ES most relevant for our discussion . The classic variant is the ( 1+1 ) -ES ( Rechenberg , 1973 ) . Its central algorithmic mechanism is step size adaptation , i.e. , its ability to actively adapt the standard deviation σ > 0 of its Gaussian sampling distribution N ( m , σ2I ) to the current needs . For about 20 years , CMA-ES ( Hansen & Ostermeier , 2001 ) is the gold standard in ES research . Many variants exist , such as Natural Evolution Strategies ( NES ; Wierstra et al . 2014 ) . Its most important mechanism going beyond “ simple ” step-size adaptive ES is covariance matrix adaptation ( CMA ) , which means that not only the global step size σ , but also the full covariance matrix C of the Gaussian N ( m , σ2C ) is adapted to the problem at hand . CMA-ES is a powerful optimizer ; however , it was not designed for high-dimensional applications with hundreds of thousands of variables . Its internal parameters are not tuned with such a regime in mind , and learning a full covariance matrix with d ( d+1 ) 2 parameters is inherently slow . Such problems are best addressed by restricting C to a diagonal matrix ( Ros & Hansen , 2008 ) , to a diagonal plus a low-rank matrix ( Loshchilov , 2014 ; Akimoto et al. , 2014 ; Loshchilov et al. , 2018 ) , or to a blockdiagonal matrix ( Cuccu & Gomez , 2012 ) . The number of parameters of the covariance matrix can hence be chosen rather flexibly in the range d to d ( d+1 ) 2 . 2.1 ES FOR NEUROEVOLUTION . The application of ES to machine learning problems and to RL in particular has a long history ( Igel , 2003 ; Heidrich-Meisner & Igel , 2009 ) . In 2017 , the work of Salimans et al . ( 2017 ) sparked a renewed interest in ES by showcasing how to successfully exploit the embarrassing parallel nature of objective function evaluations in populations-based algorithms , considerably speeding-up the learning process . This triggered a large body of work on neuroevolution based on ES , see e.g . Plappert et al . ( 2017 ) ; Ha & Schmidhuber ( 2018 ) ; Chrabaszcz et al . ( 2018 ) ; Stanley et al . ( 2019 ) and references therein . 2.2 CONVERGENCE RATES AND COMPUTATIONAL COMPLEXITY . Due to Taylor ’ s theorem , local optima of C2 functions in d-dimensional space are well approximated ( up to O ( ‖x− x∗‖3 ) ) by convex quadratic functions f ( x ) = 12 ( x− x ∗ ) TH ( x− x∗ ) . The computational complexity of solving this problem with an ES to a fixed target precision ε > 0 is of the form O ( d · κ ( H ) · log ( 1/ε ) ) , where κ ( H ) denotes the condition number of the Hessian H ( Jägersküpper , 2006 ; Hansen et al. , 2015 ) . Hence , a step-size adaptive ES achieves linear convergence with rate O ( 1/ ( d · κ ( H ) ) ) . The linear dependency on d is optimal for comparison-based optimization ( Fournier & Teytaud , 2011 ) , but the dependency on H is sub-optimal . The advantage of maintaining covariance information is that the factor κ ( H ) is improved to κ ( HC∗ ) , where C∗ denotes the optimal covariance matrix available to the ES . When approaching C∗ = H−1 , methods maintaining full covariance achieve the optimal value κ ( HC∗ ) = 1 . In effect , as expected from a pseudo second order method , the convergence rate is independent of H . A diagonal covariance matrix C∗ acts as a diagonal pre-conditioner , with varying effectiveness depending on the problem . Obviously , the block-diagonal and the low-rank cases are in-between . The OpenAI-ES ( Salimans et al. , 2017 ) features neither step size adaptation nor covariance adaptation . Based on the NES framework of Wierstra et al . ( 2014 ) , it leverages the ability of ES to estimate the natural gradient of f from samples , and then applies the ADAM optimizer on top . In effect , this is roughly comparable to using diagonal C. CMA has a price in terms of algorithm internal complexity , and in addition the adaptation process is slow in terms of sample complexity . The above convergence rates measure time in terms of objective function evaluations ( sample complexity ) . When scaling up CMA to high dimensions , we need to take the following concepts into consideration . Algorithm internal complexity refers to the required ( amortized ) number of operations needed for creating a sample and for updating the internal state—the covariance matrix in particular . Regarding sample complexity , we distinguish between the number of samples needed to learn the covariance matrix , and the number of samples needed to solve the problem . Learning C with up to Θ ( d2 ) parameters is sample-inefficient . For example , a ( small ) network with d = 104 weights results in d ( d+1 ) 2 ≈ 5 · 10 7 parameters of the covariance matrix . Learning these takes hundreds of millions of samples , each of which can be a full RL episode . This is too slow for being useful . For larger d , even the storage of the full covariance matrix C becomes prohibitive . Furthermore , performing computations with C scales at least linear with the number of its parameters , which amounts to an internal complexity of Ω ( d2 ) for full CMA . Since network evaluation scales linearly with the number of weights d , CMA quickly becomes the computational bottleneck . Therefore , a different trade-off between fast convergence and internal complexity is needed , which can be realized for example with block-diagonal and low-rank structures , and combinations thereof . | This paper suggests Distributing Black-Box Optimization (DiBB) framework that enables the running of black-box optimization techniques in a distributed manner. Under the assumption that some optimization variables are correlated in a negligible manner to the optimization objective values, the authors partition the variables into the chunk of variables dubbed "Box." The core idea of DiBB is to perform black-box optimizations for each block and update the optimization results in an asynchronous manner. From the numerical experiments on the black box optimization benchmark (BBOB), the proposed DiBB shows marginally better performance when the underlying black box function matches the assumption that the optimization variables can form blocks. Additionally, the authors apply DiBB to perform a canonical example of RL tasks. | SP:b92c785318f5e3774a4ef5c933c72015cbf80327 |
DiBB: Distributing Black-Box Optimization | 1 INTRODUCTION . Black Box Optimization ( BBO ) can be applied , by definition , to any problem independent of the specific application ( Audet & Hare , 2017 ) . In principle , this provides a method that is applicable to problems yet unsolved by the current state of the art . The most obvious catch lies in their computational requirements , which usually takes one of two forms : ( i ) simple black-box solvers suffers from high sample complexity ( i.e. , they are data hungry ) , in exchange for smaller computational requirements ( both in memory and CPU time ) . On the other hand , ( ii ) sophisticated solvers such as modern Evolution Strategies ( ES ; Hansen & Ostermeier 2001 ; Wierstra et al . 2014 ) have a high internal computational cost per sample , in exchange for a wide set of properties ( see Section 2 ) that make for significantly improved sample efficiency . In the first case ( simpler ES ) , the requirement for more samples can be mitigated—to some extent— through the embarrassingly parallel evaluation of a large population of candidate solutions . This approach however has its own limitations , as traversing a more complex fitness landscape often requires a disproportionate growth in the number of required samples as the dimensionality rises . In the second case however ( complex ES ) , algorithms relying on covariance matrix adaptation ( CMA ; e.g . CMA-ES by Hansen 1996 ) have a quadratic complexity in the number of variables for processing a sample . This strictly limits their application ( within a sensible time frame ) to problems within the tens of thousands variables . This limit has restricted the applicability of these methods to rather simple scenarios and applications so far . As a result , most successful applications of ES to high-dimensional problems ( e.g . training larger neural networks ) rely on simpler ES , such as the type ( i ) described above . Most of the per-sample complexity of type ( ii ) algorithms can be traced to the algorithm maintaining and updating the covariance information among the set of variables , which helps the sample efficiency of these algorithms ( as in convergence speed ) at the cost of longer run times ( as in wall-clock speed ) , eventually becoming intractable as the number of variables grows . Several algorithms ( Ros & Hansen , 2008 ; Schaul et al. , 2011 ) thereby implement an assumption of separability between the variables , relinquishing covariance information altogether for a greatly enhanced wall-clock speed per sample . Unsurprisingly , this comes at a cost in terms of convergence speed : these algorithms can require several orders of magnitude more samples to find comparable solutions , depending on the problem structure ( Hansen & Ostermeier , 2001 ) . The approach taken in this paper takes instead into account the fact that the correlation among variables is not uniform for most complex problems . Rather , certain groups of variables will display higher correlation between each other , with variables having lower correlation belonging instead into different groups . This induces two different assumptions on the variable set : groups having high intra-correlation support an assumption of partial correlation , while the low inter-group correlation displays the parallel argument of partial separability . We can represent this using a block-diagonal covariance matrix , which at the same time maintains full-covariance information within the variables belonging to one such group , and discarding the less useful ( and often negligible ) inter-group correlation altogether ( Cuccu & Gomez , 2012 ) . Such an approach allows leveraging covariance information where it is most efficient , while at the same time significantly reducing the memory footprint of the algorithm ( based on the number and size of the groups ) , and even offering additional opportunities for parallelization and distributed computing . We will use the term blocks to refer to the groups of variable with high intra-correlation in the rest of the paper . BBO algorithms are designed to ignore blocks , since they need to work in any unknowable ( blackbox ) environment . Even in a gray-box setting , black-box algorithm engineering can be useful to ensure that no illegitimate assumptions are made in their design . On the other hand , we aim to profit from the added information . Real applications often have a gray-box character , exposing a certain level of expert knowledge about the correlation between variables . Let us take for example the common application of Neuroevolution ( Stanley et al. , 2019 ) , where evolutionary algorithms ( such as ES ) are applied to learn the weights of a neural network . We know from the network ’ s equation that the weights of the connections entering the same neuron ( as opposed to entering different neurons ) are by necessity highly correlated , as they are composed in a linear fashion inside the neuron prior to activation . The same reasoning can be made for the weights of connections entering neurons belonging to the same layer , versus neurons in different layers , because outputs of a layer are linearly combined in the next layer . This principle remains true as the network expands : in complex applications such as those requiring deep networks , the correlation between weights of connections in the early versus late layers will be by design much more limited than in the neuron or layer examples above1 . Based on the above insights , this paper proposes a new framework for Distributed Black Box optimization , named DiBB , see Figure 1 . We leverage the assumption of partial correlation by partitioning the variables set into highly intra-correlated blocks ; then , switching the assumption to partial separability , we search each block with a different instance of the reference BBO algorithm , independently . This makes DiBB particularly suited for neuroevolution applications requiring larger/deep networks . In Section 2 , we provide rigorous theoretical arguments for the sample efficiency of this approach . From a practical perspective , this allows to search blocks asynchronously and even to distribute each BBO instance on different nodes in a cluster . Varying the partition of the variables enables the user to arbitrarily trade-off between wall-clock speed ( smaller blocks ) and sample efficiency ( larger blocks ) , while distributing the BBO instances decouples the complexity from the number of variables , as long 1The fundamental assumption of partial separability across network layers however does not seem to be very well studied in the literature , despite a considerable body of work on neural network loss landscapes ( Fort & Jastrzebski , 2019 ; Soltanolkotabi et al. , 2018 ) . This can be partially tracked to the limited availability of algorithms making use of partial correlation information . as enough machines are available to run the BBO instances . A major challenge comes with solution evaluation , as the variables constituting a sample are practically scattered across a network . This is addressed in Section 3 , by establishing a rather sparse communication scheme . It is important to notice at this point that no assumption or claim has yet been made on the underlying BBO algorithm of choice—nor will be made . While this paper explores the applicability of DiBB in the context of modern , sophisticated ESs , DiBB can be applied to any BBO algorithm with minimal interfaces . We analyze the performance of our framework on the classic COCO benchmark , both on the BBOB and BBOB large-scale suites , using the industry-standard CMA-ES as a reference , and as a blocklevel optimizer within DiBB . The sample complexity of our approach typically ( and as expected ) sits in between the full-covariance and the diagonal-covariance versions of CMA-ES , with few notable exceptions where maintaining extra covariance information is actually deceptive/misleading due to separability . Notably , on parallel hardward , DiBB is considerably faster in terms of wall clock time . To demonstrate the scalability of our algorithms , we present results on training a 20-layer neural network using 20 blocks on 20 machines , the largest neural network trained with neuroevolution to date , to the best of our knowledge . 1.1 CONTRIBUTIONS . Our key contributions are as follows : • We provide a novel way of parallelizing an ES , going beyond the parallel evaluation of candidate solutions forming a population , by optimizing blocks of variables with multiple ES instances . • We exploit the block structure to add covariance matrix information at low cost where it matters most , namely inside blocks of potentially highly correlated variables . • The resulting DiBB framework is particularly well-suited for neuroevolution . However , it can be applied to any BBO method . • We demonstrate that also large and deep networks can be trained efficiently with neuroevolution on highly parallel hardware . 2 A PRIMER ON EVOLUTION STRATEGIES . ES are direct search methods , which optimize a black-box objective function f : Rd → R by sampling candidate points from an adaptive Gaussian distribution . We briefly review the types of ES most relevant for our discussion . The classic variant is the ( 1+1 ) -ES ( Rechenberg , 1973 ) . Its central algorithmic mechanism is step size adaptation , i.e. , its ability to actively adapt the standard deviation σ > 0 of its Gaussian sampling distribution N ( m , σ2I ) to the current needs . For about 20 years , CMA-ES ( Hansen & Ostermeier , 2001 ) is the gold standard in ES research . Many variants exist , such as Natural Evolution Strategies ( NES ; Wierstra et al . 2014 ) . Its most important mechanism going beyond “ simple ” step-size adaptive ES is covariance matrix adaptation ( CMA ) , which means that not only the global step size σ , but also the full covariance matrix C of the Gaussian N ( m , σ2C ) is adapted to the problem at hand . CMA-ES is a powerful optimizer ; however , it was not designed for high-dimensional applications with hundreds of thousands of variables . Its internal parameters are not tuned with such a regime in mind , and learning a full covariance matrix with d ( d+1 ) 2 parameters is inherently slow . Such problems are best addressed by restricting C to a diagonal matrix ( Ros & Hansen , 2008 ) , to a diagonal plus a low-rank matrix ( Loshchilov , 2014 ; Akimoto et al. , 2014 ; Loshchilov et al. , 2018 ) , or to a blockdiagonal matrix ( Cuccu & Gomez , 2012 ) . The number of parameters of the covariance matrix can hence be chosen rather flexibly in the range d to d ( d+1 ) 2 . 2.1 ES FOR NEUROEVOLUTION . The application of ES to machine learning problems and to RL in particular has a long history ( Igel , 2003 ; Heidrich-Meisner & Igel , 2009 ) . In 2017 , the work of Salimans et al . ( 2017 ) sparked a renewed interest in ES by showcasing how to successfully exploit the embarrassing parallel nature of objective function evaluations in populations-based algorithms , considerably speeding-up the learning process . This triggered a large body of work on neuroevolution based on ES , see e.g . Plappert et al . ( 2017 ) ; Ha & Schmidhuber ( 2018 ) ; Chrabaszcz et al . ( 2018 ) ; Stanley et al . ( 2019 ) and references therein . 2.2 CONVERGENCE RATES AND COMPUTATIONAL COMPLEXITY . Due to Taylor ’ s theorem , local optima of C2 functions in d-dimensional space are well approximated ( up to O ( ‖x− x∗‖3 ) ) by convex quadratic functions f ( x ) = 12 ( x− x ∗ ) TH ( x− x∗ ) . The computational complexity of solving this problem with an ES to a fixed target precision ε > 0 is of the form O ( d · κ ( H ) · log ( 1/ε ) ) , where κ ( H ) denotes the condition number of the Hessian H ( Jägersküpper , 2006 ; Hansen et al. , 2015 ) . Hence , a step-size adaptive ES achieves linear convergence with rate O ( 1/ ( d · κ ( H ) ) ) . The linear dependency on d is optimal for comparison-based optimization ( Fournier & Teytaud , 2011 ) , but the dependency on H is sub-optimal . The advantage of maintaining covariance information is that the factor κ ( H ) is improved to κ ( HC∗ ) , where C∗ denotes the optimal covariance matrix available to the ES . When approaching C∗ = H−1 , methods maintaining full covariance achieve the optimal value κ ( HC∗ ) = 1 . In effect , as expected from a pseudo second order method , the convergence rate is independent of H . A diagonal covariance matrix C∗ acts as a diagonal pre-conditioner , with varying effectiveness depending on the problem . Obviously , the block-diagonal and the low-rank cases are in-between . The OpenAI-ES ( Salimans et al. , 2017 ) features neither step size adaptation nor covariance adaptation . Based on the NES framework of Wierstra et al . ( 2014 ) , it leverages the ability of ES to estimate the natural gradient of f from samples , and then applies the ADAM optimizer on top . In effect , this is roughly comparable to using diagonal C. CMA has a price in terms of algorithm internal complexity , and in addition the adaptation process is slow in terms of sample complexity . The above convergence rates measure time in terms of objective function evaluations ( sample complexity ) . When scaling up CMA to high dimensions , we need to take the following concepts into consideration . Algorithm internal complexity refers to the required ( amortized ) number of operations needed for creating a sample and for updating the internal state—the covariance matrix in particular . Regarding sample complexity , we distinguish between the number of samples needed to learn the covariance matrix , and the number of samples needed to solve the problem . Learning C with up to Θ ( d2 ) parameters is sample-inefficient . For example , a ( small ) network with d = 104 weights results in d ( d+1 ) 2 ≈ 5 · 10 7 parameters of the covariance matrix . Learning these takes hundreds of millions of samples , each of which can be a full RL episode . This is too slow for being useful . For larger d , even the storage of the full covariance matrix C becomes prohibitive . Furthermore , performing computations with C scales at least linear with the number of its parameters , which amounts to an internal complexity of Ω ( d2 ) for full CMA . Since network evaluation scales linearly with the number of weights d , CMA quickly becomes the computational bottleneck . Therefore , a different trade-off between fast convergence and internal complexity is needed , which can be realized for example with block-diagonal and low-rank structures , and combinations thereof . | This paper proposes Distributed Black Box optimization (DiBB), which involves using disjoint distributed pipelines to perform CMA/Hessian-based updates, over functions with assumed separability in terms of parameters. The method is explained in detail, and experiments are performed on BBOB functions (with varying dimensions), along with Mujoco Walker2d with a relatively large policy architecture (10K+ parameters). Other ablations such as wall-clock time and varying block sizes are also experimentally presented. | SP:b92c785318f5e3774a4ef5c933c72015cbf80327 |
Neural Parameter Allocation Search | 1 INTRODUCTION . Training neural networks requires ever more computational resources , with GPU memory often being a significant limitation ( Rajbhandari et al. , 2021 ) . Methods such as checkpointing ( e.g. , Chen et al. , 2016 ; Gomez et al. , 2017 ; Jain et al. , 2020 ) and out-of-core algorithms ( e.g. , Ren et al. , 2021 ) have been developed to reduce memory from activations and improve training efficiency . Yet even with such techniques , Rajbhandari et al . ( 2021 ) find that to train efficiently , model parameters require significantly greater memory bandwidth than activations , indicating parameters are a key limit on future growth . One solution to this problem is cross-layer parameter sharing , which reduces the memory needed to store parameters . This can also reduce the cost of communicating model updates in distributed training ( Lan et al. , 2020 ; Jaegle et al. , 2021 ) and federated learning ( Konečný et al. , 2016 ; McMahan et al. , 2017 ) , as the model is smaller , and can help avoid overfitting ( Jaegle et al. , 2021 ) . However , prior work in cross-layer parameter sharing ( e.g. , Dehghani et al. , 2019 ; Savarese & Maire , 2019 ; Lan et al. , 2020 ; Jaegle et al. , 2021 ) has two significant limitations . First , they rely on suboptimal hand-crafted techniques for deciding where and how to share parameters . Second , they rely on models having many identical layers . This limits the network architectures they apply to ( e.g. , DenseNets ( Huang et al. , 2017 ) have few such layers ) and their parameter savings is only proportional to the number of identical layers . To move beyond these limits , we introduce Neural Parameter Allocation Search ( NPAS ) , a novel task which generalizes existing parameter sharing approaches . In NPAS , the goal is to identify where and how to distribute parameters in a neural network to produce a high-performing model using an arbitrary , fixed parameter budget and no architectural assumptions . Searching for good sharing strategies is challenging in many neural networks due to different layers requiring different numbers of parameters or weight dimensionalities , multiple layer types ( e.g. , convolutional , fully-connected , recurrent ) , and/or multiple modalities ( e.g. , text and images ) . Hand-crafted sharing approaches , as in prior work , can be seen as one implementation of NPAS , but they can be complicated to create for complex networks and have no guarantee that the sharing strategy is good . Trying all possible permutations of sharing across layers is computationally infeasible even for small networks . To our knowledge , we are the first to consider automatically searching for good parameter sharing strategies . By supporting arbitrary parameter budgets , NPAS explores two novel regimes . First , while prior work considered using sharing to reduce the number of parameters ( which we refer to as low-budget NPAS , LB-NPAS ) , we can also increase the number of parameters beyond what an architecture typically uses ( high-budget NPAS , HB-NPAS ) . HB-NPAS can be thought of as adding capacity to the network in order to improve its performance without changing its architecture ( e.g. , without increasing the number of channels that would also increase computational time ) . Second , we consider cases where there are fewer parameters available to a layer than needed to implement the layer ’ s operations . For such low-budget cases , we investigate parameter upsampling methods to generate the layer ’ s weights . A vast array of other techniques , including pruning ( Hoefler et al. , 2021 ) , quantization ( Gholami et al. , 2021 ) , knowledge distillation ( Gou et al. , 2021 ) , and low-rank approximations ( e.g. , Wu , 2019 ; Phan et al. , 2020 ) are used to reduce memory and/or FLOP requirements for a model . However , such methods typically only apply at test/inference time , and actually are more expensive to train due to requiring a fully-trained large network , in contrast to NPAS . Nevertheless , these are also orthogonal to NPAS and can be applied jointly . Indeed , we show that NPAS can be combined with pruning or distillation to produce improved networks . Figure 1 compares NPAS to closely related tasks . To implement NPAS , we propose Shapeshifter Networks ( SSNs ) , which can morph a given parameter budget to fit any architecture by learning where and how to share parameters . SSNs begin by learning which layers can effectively share parameters using a short preliminary training step . In this , all layers are implemented from a single shared set of parameters , and a representation is learned for each layer based on how it uses the parameters . Layers that use parameters in a similar way are then good candidates for sharing during the main training step . When training , SSNs generate weights for each layer by down- or upsampling the associated parameters as needed . We demonstrate SSN ’ s effectiveness by using them to implement high- and low-budget NPAS on a variety of networks , including vision , text , and multi-modal vision/language tasks . E.g. , a LB-NPAS SSN implements a WRN-50-2 ( Zagoruyko & Komodakis , 2016 ) using 19M parameters ( 69M in the original ) and achieves an Error @ 5 on ImageNet classification ( Deng et al. , 2009 ) 3 % lower than a WRN with the same budget . Similarity , we achieve a 1 % boost to SQuAD v2.0 ( Rajpurkar et al. , 2016 ) with 18M parameters ( 334M in the original ) over ALBERT ( Lan et al. , 2020 ) , prior work for parameter sharing in Transformers ( Vaswani et al. , 2017 ) . For HB-NPAS , we achieve a 1–1.5 % improvement in Error @ 1 on CIFAR ( Krizhevsky , 2009 ) by adding capacity compared to a traditional network . In summary , our key contributions are : • We introduce Neural Parameter Allocation Search ( NPAS ) , a novel task in which the goal is to implement a given network architecture using any parameter budget . • To solve NPAS , we propose Shapeshifter Networks ( SSNs ) , which automate parameter sharing . To our knowledge , SSNs are the first approach to automatically learn where and how to share parameters and to share parameters between layers of different sizes or types . • We benchmark SSNs for LB- and HB-NPAS and show they create high-performing networks when either using few parameters or adding network capacity . • We also show that SSNs can be combined with knowledge distillation and parameter pruning to boost performance over such methods alone . 2 NEURAL PARAMETER ALLOCATION SEARCH ( NPAS ) . In NPAS , the goal is to implement a neural network given a fixed parameter budget . More formally : Neural Parameter Architecture Search ( NPAS ) : Given a neural network architecture with layers ` 1 , . . . , ` L , which each require weights w1 , . . . , wL , and a fixed parameter budget θ , train a high-performing neural network using the given architecture and parameter budget . Any general solution to NPAS ( i.e. , that works for arbitrary θ or network ) must solve two subtasks : 1 . Parameter mapping : Assign to each layer ` i a subset of the available parameters . 2 . Weight generation : Generate ` i ’ s weights wi from its assigned parameters , which may be any size . Prior work , such as Savarese & Maire ( 2019 ) and Ha et al . ( 2016 ) , are examples of weight generation methods , but in limited cases , e.g. , Savarese & Maire ( 2019 ) does not support there being fewer parameters than weights . To our knowledge , no prior work has automated parameter mapping , instead relying on hand-crafted heuristics that do not generalize to many architectures . Note weight generation must be differentiable so gradients can be backpropagated to the underlying parameters . NPAS naturally decomposes into two different regimes based on the parameter budget relative to what would be required by a traditional neural network ( i.e. , ∑L i |wi| versus |θ| ) : • Low-budget ( LB-NPAS ) , with fewer parameters than standard networks ( ∑L i |wi| < |θ| ) . This regime has traditionally been the goal of cross-layer parameter sharing , and reduces memory at training and test time , and consequentially reduces communication for distributed training . • High-budget ( HB-NPAS ) , with more parameters than standard networks ( ∑L i |wi| > |θ| ) . This is , to our knowledge , a novel regime , and can be thought of as adding capacity to a network without changing the underlying architecture by allowing a layer to access more parameters . Note , in both cases , the FLOPs required of the network do not significantly increase . Thus , HB-NPAS can significantly reduce FLOP overhead compared to larger networks . The closest work to ours are Shared WideResNets ( SWRN ) ( Savarese & Maire , 2019 ) , Hypernetworks ( HN ) ( Ha et al. , 2016 ) , and Lookup-based Convolutional Networks ( LCNN ) ( Bagherinezhad et al. , 2017 ) . Each method demonstrated improved low-budget performance , with LCNN and SWRN focused on improving sharing across layers and HN learning to directly generate parameters . However , all require adaptation for new networks and make architectural assumptions . E.g. , LCNN was designed specifically for convolutional networks , while HN and SWRN ’ s benefits are proportional to the number of identical layers ( see Figure 3 ) . Thus , each method supports limited architectures and parameter budgets , making them unsuited for NPAS . LCNN and HN also both come with significant computational overhead . E.g. , the CNN used by Ha et al . requires 26.7M FLOPs for a forward pass on a 32×32 image , but weight generation with HN requires an additional 108.5M FLOPs ( 135.2M total ) . In contrast , our SSNs require 0.8M extra FLOPs ( 27.5M total , 5× fewer than HN ) . Across networks we consider , SSN overhead for a single image is typically 0.5–2 % of total FLOPs . Note both methods generate weights once per forward pass , amortizing overhead across a batch ( e.g. , SSN overhead is reduced to 0.008–0.03 % for batch size 64 ) . HB-NPAS is also reminiscent of mixture-of-experts ( e.g. , Shazeer et al. , 2017 ) ; both increase capacity without significantly increasing FLOPs , but NPAS allows this overparameterization to be learned without architectural changes required by prior work . NPAS can be thought of as searching for efficient and effective underlying representations for a neural network . Methods have been developed for other tasks that focus on directly searching for more effective architectures ( as opposed to their underlying representations ) . These include neural architecture search ( e.g. , Bashivan et al. , 2019 ; Dong & Yang , 2019 ; Tan et al. , 2019 ; Xiong et al. , 2019 ; Zoph & Le , 2017 ) and modular/self-assembling networks ( e.g. , Alet et al. , 2019 ; Ferran Alet , 2018 ; Devin et al. , 2017 ) . While these tasks create computationally efficient architectures , they do not reduce the number of parameters in a network during training like NPAS ( i.e. , they can not be used to train very large networks or for federated or distributed learning applications ) , and indeed are computationally expensive . NPAS methods can also provide additional flexibility to architecture search by enabling them to train larger and/or deeper architectures while keeping within a fixed parameter budget . In addition , the performance of any architectures these methods create could be improved by leveraging the added capacity from excess parameters when addressing HB-NPAS . | The paper presents a method to automatically select parameters to share between layers. It proposes to use a shape shifter network to either increase or decrease the number of parameters in the model. The parameters are mapped into parameter groups through a preliminary training step and k-mean cluster the layers. Layers in the same group share parameters. It will generate weights by downsampling or upsampling depending on the layer needs. The method is tested in Low Budget and High Budget regimes and on different tasks. It also shows that the method can be used together with distillation and pruning. | SP:1a3b5863b4113fd70eb6e9d252b555f58c7414b9 |
Neural Parameter Allocation Search | 1 INTRODUCTION . Training neural networks requires ever more computational resources , with GPU memory often being a significant limitation ( Rajbhandari et al. , 2021 ) . Methods such as checkpointing ( e.g. , Chen et al. , 2016 ; Gomez et al. , 2017 ; Jain et al. , 2020 ) and out-of-core algorithms ( e.g. , Ren et al. , 2021 ) have been developed to reduce memory from activations and improve training efficiency . Yet even with such techniques , Rajbhandari et al . ( 2021 ) find that to train efficiently , model parameters require significantly greater memory bandwidth than activations , indicating parameters are a key limit on future growth . One solution to this problem is cross-layer parameter sharing , which reduces the memory needed to store parameters . This can also reduce the cost of communicating model updates in distributed training ( Lan et al. , 2020 ; Jaegle et al. , 2021 ) and federated learning ( Konečný et al. , 2016 ; McMahan et al. , 2017 ) , as the model is smaller , and can help avoid overfitting ( Jaegle et al. , 2021 ) . However , prior work in cross-layer parameter sharing ( e.g. , Dehghani et al. , 2019 ; Savarese & Maire , 2019 ; Lan et al. , 2020 ; Jaegle et al. , 2021 ) has two significant limitations . First , they rely on suboptimal hand-crafted techniques for deciding where and how to share parameters . Second , they rely on models having many identical layers . This limits the network architectures they apply to ( e.g. , DenseNets ( Huang et al. , 2017 ) have few such layers ) and their parameter savings is only proportional to the number of identical layers . To move beyond these limits , we introduce Neural Parameter Allocation Search ( NPAS ) , a novel task which generalizes existing parameter sharing approaches . In NPAS , the goal is to identify where and how to distribute parameters in a neural network to produce a high-performing model using an arbitrary , fixed parameter budget and no architectural assumptions . Searching for good sharing strategies is challenging in many neural networks due to different layers requiring different numbers of parameters or weight dimensionalities , multiple layer types ( e.g. , convolutional , fully-connected , recurrent ) , and/or multiple modalities ( e.g. , text and images ) . Hand-crafted sharing approaches , as in prior work , can be seen as one implementation of NPAS , but they can be complicated to create for complex networks and have no guarantee that the sharing strategy is good . Trying all possible permutations of sharing across layers is computationally infeasible even for small networks . To our knowledge , we are the first to consider automatically searching for good parameter sharing strategies . By supporting arbitrary parameter budgets , NPAS explores two novel regimes . First , while prior work considered using sharing to reduce the number of parameters ( which we refer to as low-budget NPAS , LB-NPAS ) , we can also increase the number of parameters beyond what an architecture typically uses ( high-budget NPAS , HB-NPAS ) . HB-NPAS can be thought of as adding capacity to the network in order to improve its performance without changing its architecture ( e.g. , without increasing the number of channels that would also increase computational time ) . Second , we consider cases where there are fewer parameters available to a layer than needed to implement the layer ’ s operations . For such low-budget cases , we investigate parameter upsampling methods to generate the layer ’ s weights . A vast array of other techniques , including pruning ( Hoefler et al. , 2021 ) , quantization ( Gholami et al. , 2021 ) , knowledge distillation ( Gou et al. , 2021 ) , and low-rank approximations ( e.g. , Wu , 2019 ; Phan et al. , 2020 ) are used to reduce memory and/or FLOP requirements for a model . However , such methods typically only apply at test/inference time , and actually are more expensive to train due to requiring a fully-trained large network , in contrast to NPAS . Nevertheless , these are also orthogonal to NPAS and can be applied jointly . Indeed , we show that NPAS can be combined with pruning or distillation to produce improved networks . Figure 1 compares NPAS to closely related tasks . To implement NPAS , we propose Shapeshifter Networks ( SSNs ) , which can morph a given parameter budget to fit any architecture by learning where and how to share parameters . SSNs begin by learning which layers can effectively share parameters using a short preliminary training step . In this , all layers are implemented from a single shared set of parameters , and a representation is learned for each layer based on how it uses the parameters . Layers that use parameters in a similar way are then good candidates for sharing during the main training step . When training , SSNs generate weights for each layer by down- or upsampling the associated parameters as needed . We demonstrate SSN ’ s effectiveness by using them to implement high- and low-budget NPAS on a variety of networks , including vision , text , and multi-modal vision/language tasks . E.g. , a LB-NPAS SSN implements a WRN-50-2 ( Zagoruyko & Komodakis , 2016 ) using 19M parameters ( 69M in the original ) and achieves an Error @ 5 on ImageNet classification ( Deng et al. , 2009 ) 3 % lower than a WRN with the same budget . Similarity , we achieve a 1 % boost to SQuAD v2.0 ( Rajpurkar et al. , 2016 ) with 18M parameters ( 334M in the original ) over ALBERT ( Lan et al. , 2020 ) , prior work for parameter sharing in Transformers ( Vaswani et al. , 2017 ) . For HB-NPAS , we achieve a 1–1.5 % improvement in Error @ 1 on CIFAR ( Krizhevsky , 2009 ) by adding capacity compared to a traditional network . In summary , our key contributions are : • We introduce Neural Parameter Allocation Search ( NPAS ) , a novel task in which the goal is to implement a given network architecture using any parameter budget . • To solve NPAS , we propose Shapeshifter Networks ( SSNs ) , which automate parameter sharing . To our knowledge , SSNs are the first approach to automatically learn where and how to share parameters and to share parameters between layers of different sizes or types . • We benchmark SSNs for LB- and HB-NPAS and show they create high-performing networks when either using few parameters or adding network capacity . • We also show that SSNs can be combined with knowledge distillation and parameter pruning to boost performance over such methods alone . 2 NEURAL PARAMETER ALLOCATION SEARCH ( NPAS ) . In NPAS , the goal is to implement a neural network given a fixed parameter budget . More formally : Neural Parameter Architecture Search ( NPAS ) : Given a neural network architecture with layers ` 1 , . . . , ` L , which each require weights w1 , . . . , wL , and a fixed parameter budget θ , train a high-performing neural network using the given architecture and parameter budget . Any general solution to NPAS ( i.e. , that works for arbitrary θ or network ) must solve two subtasks : 1 . Parameter mapping : Assign to each layer ` i a subset of the available parameters . 2 . Weight generation : Generate ` i ’ s weights wi from its assigned parameters , which may be any size . Prior work , such as Savarese & Maire ( 2019 ) and Ha et al . ( 2016 ) , are examples of weight generation methods , but in limited cases , e.g. , Savarese & Maire ( 2019 ) does not support there being fewer parameters than weights . To our knowledge , no prior work has automated parameter mapping , instead relying on hand-crafted heuristics that do not generalize to many architectures . Note weight generation must be differentiable so gradients can be backpropagated to the underlying parameters . NPAS naturally decomposes into two different regimes based on the parameter budget relative to what would be required by a traditional neural network ( i.e. , ∑L i |wi| versus |θ| ) : • Low-budget ( LB-NPAS ) , with fewer parameters than standard networks ( ∑L i |wi| < |θ| ) . This regime has traditionally been the goal of cross-layer parameter sharing , and reduces memory at training and test time , and consequentially reduces communication for distributed training . • High-budget ( HB-NPAS ) , with more parameters than standard networks ( ∑L i |wi| > |θ| ) . This is , to our knowledge , a novel regime , and can be thought of as adding capacity to a network without changing the underlying architecture by allowing a layer to access more parameters . Note , in both cases , the FLOPs required of the network do not significantly increase . Thus , HB-NPAS can significantly reduce FLOP overhead compared to larger networks . The closest work to ours are Shared WideResNets ( SWRN ) ( Savarese & Maire , 2019 ) , Hypernetworks ( HN ) ( Ha et al. , 2016 ) , and Lookup-based Convolutional Networks ( LCNN ) ( Bagherinezhad et al. , 2017 ) . Each method demonstrated improved low-budget performance , with LCNN and SWRN focused on improving sharing across layers and HN learning to directly generate parameters . However , all require adaptation for new networks and make architectural assumptions . E.g. , LCNN was designed specifically for convolutional networks , while HN and SWRN ’ s benefits are proportional to the number of identical layers ( see Figure 3 ) . Thus , each method supports limited architectures and parameter budgets , making them unsuited for NPAS . LCNN and HN also both come with significant computational overhead . E.g. , the CNN used by Ha et al . requires 26.7M FLOPs for a forward pass on a 32×32 image , but weight generation with HN requires an additional 108.5M FLOPs ( 135.2M total ) . In contrast , our SSNs require 0.8M extra FLOPs ( 27.5M total , 5× fewer than HN ) . Across networks we consider , SSN overhead for a single image is typically 0.5–2 % of total FLOPs . Note both methods generate weights once per forward pass , amortizing overhead across a batch ( e.g. , SSN overhead is reduced to 0.008–0.03 % for batch size 64 ) . HB-NPAS is also reminiscent of mixture-of-experts ( e.g. , Shazeer et al. , 2017 ) ; both increase capacity without significantly increasing FLOPs , but NPAS allows this overparameterization to be learned without architectural changes required by prior work . NPAS can be thought of as searching for efficient and effective underlying representations for a neural network . Methods have been developed for other tasks that focus on directly searching for more effective architectures ( as opposed to their underlying representations ) . These include neural architecture search ( e.g. , Bashivan et al. , 2019 ; Dong & Yang , 2019 ; Tan et al. , 2019 ; Xiong et al. , 2019 ; Zoph & Le , 2017 ) and modular/self-assembling networks ( e.g. , Alet et al. , 2019 ; Ferran Alet , 2018 ; Devin et al. , 2017 ) . While these tasks create computationally efficient architectures , they do not reduce the number of parameters in a network during training like NPAS ( i.e. , they can not be used to train very large networks or for federated or distributed learning applications ) , and indeed are computationally expensive . NPAS methods can also provide additional flexibility to architecture search by enabling them to train larger and/or deeper architectures while keeping within a fixed parameter budget . In addition , the performance of any architectures these methods create could be improved by leveraging the added capacity from excess parameters when addressing HB-NPAS . | Parameter sharing can reduce memory footprint of neural networks and memory bandwidth requirements, but existing methods require manually tuning the sharing strategy. This paper uses a small phase of training to cluster the learned layer representations by groups. This allows networks to be scaled from small to large parameter counts (to be clear, number of trainable parameters) without changing the model architecture. Importantly, this procedure does not change the number of FLOPs in the model. Experiments across a wide set of tasks and networks compare this approach with either (1) SWRN from Savarasese & Maire, 2019), or (2) existing hand-tuned parameter scaling from families of networks such as EfficientNet, DenseNet, or ALBERT. | SP:1a3b5863b4113fd70eb6e9d252b555f58c7414b9 |
Tuformer: Data-Driven Design of Expressive Transformer by Tucker Tensor Representation | Transformers are neural network architectures that achieve remarkable performance in many areas . However , the core component of Transformers , multi-head selfattention ( MHSA ) , is mainly derived from heuristics , and the interactions across its components are not well understood . To address the problem , we first introduce a mathematically rigorous and yet intuitive tensor diagram representation of MHSA . Guided by tensor diagram representations , we formulate a design space where we can analyze the expressive power of the network structure , providing new directions and possibilities for enhanced performance . We then propose a novel design , namely Tunable Transformer ( Tuformers ) , with a guaranteed higher expressive power than MHSA by allowing learnable weight sharing across heads . Unlike vanilla Transformer models , where the number of heads is a pre-defined fixed constant , Tuformer ’ s structure is data-driven , and the number of heads is trainable . Training of Tuformers could be made very efficient as it allows initialization from existing pre-trained Transformer models . We test Tuformers on various tasks across multiple domains and show competitive results under a wide range of model sizes . 1 INTRODUCTION . Transformer models are first introduced by Vaswani et al . ( 2017 ) in the context of sequence modelling . They have demonstrated impressive results on a wide variety of tasks in many fields , such as language model pre-training ( Sanh et al. , 2019 ) , speech recognition ( Moritz et al. , 2020 ) , image classification ( Dosovitskiy et al. , 2020 ) , and generation ( Parmar et al. , 2018 ) . The core component of Transformer models is the multi-head self-attention ( MHSA ) which is extended from the standard attention mechanism ( Bahdanau et al. , 2014 ) . Each attention head in MHSA has a global receptive field , i.e. , each token ’ s representation is updated by attending to all other tokens , and H attention heads are computed in parallel and concatenated together . The current MHSA design is mainly derived from empirical studies or heuristics , leaving some unresolved challenges . ( 1 ) Lack of solid theoretical understanding . The theory behind MHSA is only starting to catch up with practice . The role of the components and their interactions in MHSA are not well understood rigorously from a theoretical perspective , which may lead to inefficiencies in the design . For example , Michel et al . ( 2019 ) show that most attention heads can be removed in the testing phase without much performance compromise , while Cordonnier et al . ( 2020 ) find empirical evidence of redundancy in key/query projections and propose a re-parameterization scheme . These works focus more on practical solutions , leading to questions about whether theoretical patterns exist in these designs . ( 2 ) The number of heads is not trainable . Intuitively , the heads in multi-heads are expected to capture different context information through each head . However , the number of heads is fixed in training . Thus , although we could tune the hyper-parameter , an exhaustive search would be time-consuming or not practical for large-scale tasks . ( 3 ) Hard to analyze the expressive power . Analyzing the expressive power ( as will be defined in Definition 2 ) of a neural network , i.e. , proving that some architectures are more expressive than others , is a non-trivial and challenging task . Such analysis has been done in Convolutional Neural Networks ( CNNs ) ( LeCun et al. , 1995 ; Cohen et al. , 2016 ) , Recurrent Neural Networks ( RNNs ) ( Mikolov et al. , 2010 ; Khrulkov et al. , 2018 ) , but no such work exists for interpreting MHSA or guiding the structural design . In response to the above challenges , we first interpret MHSA from a tensor representation perspective using the intuitive graphical tool , the tensor diagram . Current prevalent descriptions of MHSA use flow charts to convey high-level intuitions , which could cause ambiguities . Therefore , it is inevitable to pair those flow charts with mathematical formulas to understand the mechanism precisely . However , these two separated descriptions create difficulties for interpretations and inspections of the operations implemented in MHSA . To address this issue , we propose a graphical representation of MHSA , which is both semantically intuitive and mathematically rigorous . Specifically , we modify and extend the vanilla tensor diagrams ( Penrose , 1971 ) , which conveniently allow for rigorous graphical representation of multi-linear operations between multi-dimensional arrays ( i.e. , higher-order tensors ) to represent nonlinear operations . We also propose a novel data-driven structure that is guaranteed to have higher expressive power . Inspired from the tensor diagram representation of MHSA , we obtain a novel design , namely TunableHead Self-Attention ( THSA ) , which is a re-parameterization of the weight matrices to allow learnable weight sharing across heads . Transformers with THSA , named Tunable Transformers ( Tuformers ) , have several advantages compared against vanilla Transformers : ( 1 ) A guaranteed higher expressive power . We prove that MHSA is a special case of THSA . ( 2 ) The number of heads is trainable . The concept of the number of heads in THSA generalizes to the stable rank of the core matrix , allowing data-driven implicit training . ( 3 ) Tuformers allow initialization from pre-trained Transformers such as BERT ( Devlin et al. , 2019 ) and its variants . We experiment Tuformers with several tasks across multiple domains , from language modeling , machine translation to image generation under a wide range of model sizes . We demonstrate competitive results not only on Tuformers but also in cases where Tuformers are initialized with pre-trained Transformers for other downstream tasks and when combined with Linear Transformer ( Katharopoulos et al. , 2020 ) on the image generation task . Using tensor diagram representation , we project the current design of MHSA into its tensor form , which renders a holistic view of the weights in MHSA for better interpretation of the information flow and exchange among the components of MHSA . More importantly , we formulate a design space for MHSA that allows improving the expressive power of the network by finding better tensor representations of the weights through tensor representation theory in followup works . Summary of Contributions : . ( 1 ) We propose a mathematically rigorous and semantically intuitive tensor diagram representation of the multi-head self-attention , introducing a new tool to the ML community for future studies on interpretation and improvements of Transformers . ( 2 ) We propose a novel design of the MHSA , Tunable-Head Self-Attention ( THSA ) , resulting in Tuformers , which has a theoretical guaranteed improvement in expressive power . ( 3 ) We provide a constructive re-parameterization scheme from vanilla Transformers to Tuformers so that Tuformers can be easily used in fine-tuning tasks with pre-trained models and efficient Transformers such as Linear Transformer ( Katharopoulos et al. , 2020 ) and Performer ( Choromanski et al. , 2020 ) with the state-of-the-art computation and memory complexities . ( 4 ) We formulate a design space for attention unit design and a framework for analyzing their expressive power using tensor representation theory under the intuitive guidance of tensor diagrams . 2 TENSOR DIAGRAM REPRESENTATION . Notations . We use lower case letters ( e.g. , v ) to denote vectors , upper case letters ( e.g. , M ) to denote matrices , and curly letters ( e.g. , T ) to denote general tensors . For a tensor T ∈ RI1×···IM , we refer to the number of indices as order , each individual index as mode , and the length of one mode as dimension . For instance , T is an M th order tensor that has dimension Im at its mth mode . We reserve superscripts to distinguish similar arrays ( e.g. , WQ , WK , W V are query/key/value weight matrices ) , and subscripts to index the elements in an array ( e.g. , Wij is the ( i , j ) th element of W ) . We use colon : to slice an array ( e.g. , Wi , : denotes the ith row of W ) . We propose to use tensor diagrams ( Penrose , 1971 ) , a commonly used rigorous/precise and intuitive graphical representation for multi-linear operations among higher-order arrays ( i.e. , tensors ) , to represent multi-head self-attention ( MHSA ) . Since MHSA consists of multilinear operations and a nonlinear softmax function , we will introduce tensor diagrams and our novel design extending tensor diagrams to denote the composition of nonlinear and multilinear operations in MHSA . 2.1 TENSOR DIAGRAM BASICS v M 𝓣 Vector order 1 tensor Matrix order 2 tensor 3 dimensional array order 3 tensor A BA A B C Figure 1 : Arrays in tensor diagram . A vector is denoted as a node with 1 leg , a matrix as a node with 2 legs and an N -dimensional array as a node with N legs . Arrays denoted as nodes with legs . An array is represented as a node with leg ( s ) in a tensor diagram as shown in Figure 1 . We denote the order ( the number of dimensions ) of the array by the number of legs extending from the node . Each labeled leg represents one mode of a tensor . Every mode of the tensor needs to be uniquely labeled . We usually use the dimension of the mode as the label ( i.e. , an associated positive integer written on top of each leg ) . The legs do not need to be straight lines , and their orientations do not matter . Matrices M ∈ RA×B and M > ∈ RB×A can be represented via the same tensor diagram as long as the M node has two legs ( to denote that it is a matrix , wherever the legs extend to ) , labeled as A and B ( to denote its size ) . Operations in tensor diagrams . There are three types of operations in the calculation of MHSA : , contraction , softmax , and batch multiplication , as shown in Figure 2 and explained in its caption . Evaluation of tensor diagrams : ( 1 ) Evaluation order . We can evaluate a tensor diagram in any pair-wise order except for the nodes in the softmax box . Since the softmax function is nonlinear , we must first evaluate the nodes in the softmax box with arbitrary order before those outside the box . ( 2 ) Reading a tensor diagram . We can easily identify the output shape by the dangling edges . For instant , in Section 2.1 , there are three dangling legs M , N , R. Thus the output is a 3rd order tensor with dimensions M , N , R. Note that the softmax function does not change the shape of the tensor . Advantages of tensor diagrams : ( 1 ) Tensor diagram is orientation invariant , meaning that we can represent X and X > using the same tensor diagram . Thus in multi-head , we obtain a universal graphical representation regardless of whether we represent an embedding of each token in the sequence as rows or columns of the input embedding matrix X . ( 2 ) Multi-linear operations are concisely represented and interpreted . ( 3 ) The representation is both precise in math and intuitive , and the information flow is clear , making analysis of network structure more accessible . In addition , with the labels of the legs , we can read the model complexity explicitly . We include a comprehensive introduction to tensor diagram representation in Appendix A . | The paper investigates the multi-head self-attention mechanism (MHSA) of transformer networks through the lens of tensor decompositions via tensor diagram notation. The authors propose an extension to MHSA inspired by the Tucker decomposition (termed THSA), analyze its expressive power, and demonstrate that it belongs to a class of more expressive functions than MHSA. Further, the authors show the positive effect of this drop-in replacement on the downstream tasks. | SP:32abdf60d25c01e6a2025568fda331da4881e463 |
Tuformer: Data-Driven Design of Expressive Transformer by Tucker Tensor Representation | Transformers are neural network architectures that achieve remarkable performance in many areas . However , the core component of Transformers , multi-head selfattention ( MHSA ) , is mainly derived from heuristics , and the interactions across its components are not well understood . To address the problem , we first introduce a mathematically rigorous and yet intuitive tensor diagram representation of MHSA . Guided by tensor diagram representations , we formulate a design space where we can analyze the expressive power of the network structure , providing new directions and possibilities for enhanced performance . We then propose a novel design , namely Tunable Transformer ( Tuformers ) , with a guaranteed higher expressive power than MHSA by allowing learnable weight sharing across heads . Unlike vanilla Transformer models , where the number of heads is a pre-defined fixed constant , Tuformer ’ s structure is data-driven , and the number of heads is trainable . Training of Tuformers could be made very efficient as it allows initialization from existing pre-trained Transformer models . We test Tuformers on various tasks across multiple domains and show competitive results under a wide range of model sizes . 1 INTRODUCTION . Transformer models are first introduced by Vaswani et al . ( 2017 ) in the context of sequence modelling . They have demonstrated impressive results on a wide variety of tasks in many fields , such as language model pre-training ( Sanh et al. , 2019 ) , speech recognition ( Moritz et al. , 2020 ) , image classification ( Dosovitskiy et al. , 2020 ) , and generation ( Parmar et al. , 2018 ) . The core component of Transformer models is the multi-head self-attention ( MHSA ) which is extended from the standard attention mechanism ( Bahdanau et al. , 2014 ) . Each attention head in MHSA has a global receptive field , i.e. , each token ’ s representation is updated by attending to all other tokens , and H attention heads are computed in parallel and concatenated together . The current MHSA design is mainly derived from empirical studies or heuristics , leaving some unresolved challenges . ( 1 ) Lack of solid theoretical understanding . The theory behind MHSA is only starting to catch up with practice . The role of the components and their interactions in MHSA are not well understood rigorously from a theoretical perspective , which may lead to inefficiencies in the design . For example , Michel et al . ( 2019 ) show that most attention heads can be removed in the testing phase without much performance compromise , while Cordonnier et al . ( 2020 ) find empirical evidence of redundancy in key/query projections and propose a re-parameterization scheme . These works focus more on practical solutions , leading to questions about whether theoretical patterns exist in these designs . ( 2 ) The number of heads is not trainable . Intuitively , the heads in multi-heads are expected to capture different context information through each head . However , the number of heads is fixed in training . Thus , although we could tune the hyper-parameter , an exhaustive search would be time-consuming or not practical for large-scale tasks . ( 3 ) Hard to analyze the expressive power . Analyzing the expressive power ( as will be defined in Definition 2 ) of a neural network , i.e. , proving that some architectures are more expressive than others , is a non-trivial and challenging task . Such analysis has been done in Convolutional Neural Networks ( CNNs ) ( LeCun et al. , 1995 ; Cohen et al. , 2016 ) , Recurrent Neural Networks ( RNNs ) ( Mikolov et al. , 2010 ; Khrulkov et al. , 2018 ) , but no such work exists for interpreting MHSA or guiding the structural design . In response to the above challenges , we first interpret MHSA from a tensor representation perspective using the intuitive graphical tool , the tensor diagram . Current prevalent descriptions of MHSA use flow charts to convey high-level intuitions , which could cause ambiguities . Therefore , it is inevitable to pair those flow charts with mathematical formulas to understand the mechanism precisely . However , these two separated descriptions create difficulties for interpretations and inspections of the operations implemented in MHSA . To address this issue , we propose a graphical representation of MHSA , which is both semantically intuitive and mathematically rigorous . Specifically , we modify and extend the vanilla tensor diagrams ( Penrose , 1971 ) , which conveniently allow for rigorous graphical representation of multi-linear operations between multi-dimensional arrays ( i.e. , higher-order tensors ) to represent nonlinear operations . We also propose a novel data-driven structure that is guaranteed to have higher expressive power . Inspired from the tensor diagram representation of MHSA , we obtain a novel design , namely TunableHead Self-Attention ( THSA ) , which is a re-parameterization of the weight matrices to allow learnable weight sharing across heads . Transformers with THSA , named Tunable Transformers ( Tuformers ) , have several advantages compared against vanilla Transformers : ( 1 ) A guaranteed higher expressive power . We prove that MHSA is a special case of THSA . ( 2 ) The number of heads is trainable . The concept of the number of heads in THSA generalizes to the stable rank of the core matrix , allowing data-driven implicit training . ( 3 ) Tuformers allow initialization from pre-trained Transformers such as BERT ( Devlin et al. , 2019 ) and its variants . We experiment Tuformers with several tasks across multiple domains , from language modeling , machine translation to image generation under a wide range of model sizes . We demonstrate competitive results not only on Tuformers but also in cases where Tuformers are initialized with pre-trained Transformers for other downstream tasks and when combined with Linear Transformer ( Katharopoulos et al. , 2020 ) on the image generation task . Using tensor diagram representation , we project the current design of MHSA into its tensor form , which renders a holistic view of the weights in MHSA for better interpretation of the information flow and exchange among the components of MHSA . More importantly , we formulate a design space for MHSA that allows improving the expressive power of the network by finding better tensor representations of the weights through tensor representation theory in followup works . Summary of Contributions : . ( 1 ) We propose a mathematically rigorous and semantically intuitive tensor diagram representation of the multi-head self-attention , introducing a new tool to the ML community for future studies on interpretation and improvements of Transformers . ( 2 ) We propose a novel design of the MHSA , Tunable-Head Self-Attention ( THSA ) , resulting in Tuformers , which has a theoretical guaranteed improvement in expressive power . ( 3 ) We provide a constructive re-parameterization scheme from vanilla Transformers to Tuformers so that Tuformers can be easily used in fine-tuning tasks with pre-trained models and efficient Transformers such as Linear Transformer ( Katharopoulos et al. , 2020 ) and Performer ( Choromanski et al. , 2020 ) with the state-of-the-art computation and memory complexities . ( 4 ) We formulate a design space for attention unit design and a framework for analyzing their expressive power using tensor representation theory under the intuitive guidance of tensor diagrams . 2 TENSOR DIAGRAM REPRESENTATION . Notations . We use lower case letters ( e.g. , v ) to denote vectors , upper case letters ( e.g. , M ) to denote matrices , and curly letters ( e.g. , T ) to denote general tensors . For a tensor T ∈ RI1×···IM , we refer to the number of indices as order , each individual index as mode , and the length of one mode as dimension . For instance , T is an M th order tensor that has dimension Im at its mth mode . We reserve superscripts to distinguish similar arrays ( e.g. , WQ , WK , W V are query/key/value weight matrices ) , and subscripts to index the elements in an array ( e.g. , Wij is the ( i , j ) th element of W ) . We use colon : to slice an array ( e.g. , Wi , : denotes the ith row of W ) . We propose to use tensor diagrams ( Penrose , 1971 ) , a commonly used rigorous/precise and intuitive graphical representation for multi-linear operations among higher-order arrays ( i.e. , tensors ) , to represent multi-head self-attention ( MHSA ) . Since MHSA consists of multilinear operations and a nonlinear softmax function , we will introduce tensor diagrams and our novel design extending tensor diagrams to denote the composition of nonlinear and multilinear operations in MHSA . 2.1 TENSOR DIAGRAM BASICS v M 𝓣 Vector order 1 tensor Matrix order 2 tensor 3 dimensional array order 3 tensor A BA A B C Figure 1 : Arrays in tensor diagram . A vector is denoted as a node with 1 leg , a matrix as a node with 2 legs and an N -dimensional array as a node with N legs . Arrays denoted as nodes with legs . An array is represented as a node with leg ( s ) in a tensor diagram as shown in Figure 1 . We denote the order ( the number of dimensions ) of the array by the number of legs extending from the node . Each labeled leg represents one mode of a tensor . Every mode of the tensor needs to be uniquely labeled . We usually use the dimension of the mode as the label ( i.e. , an associated positive integer written on top of each leg ) . The legs do not need to be straight lines , and their orientations do not matter . Matrices M ∈ RA×B and M > ∈ RB×A can be represented via the same tensor diagram as long as the M node has two legs ( to denote that it is a matrix , wherever the legs extend to ) , labeled as A and B ( to denote its size ) . Operations in tensor diagrams . There are three types of operations in the calculation of MHSA : , contraction , softmax , and batch multiplication , as shown in Figure 2 and explained in its caption . Evaluation of tensor diagrams : ( 1 ) Evaluation order . We can evaluate a tensor diagram in any pair-wise order except for the nodes in the softmax box . Since the softmax function is nonlinear , we must first evaluate the nodes in the softmax box with arbitrary order before those outside the box . ( 2 ) Reading a tensor diagram . We can easily identify the output shape by the dangling edges . For instant , in Section 2.1 , there are three dangling legs M , N , R. Thus the output is a 3rd order tensor with dimensions M , N , R. Note that the softmax function does not change the shape of the tensor . Advantages of tensor diagrams : ( 1 ) Tensor diagram is orientation invariant , meaning that we can represent X and X > using the same tensor diagram . Thus in multi-head , we obtain a universal graphical representation regardless of whether we represent an embedding of each token in the sequence as rows or columns of the input embedding matrix X . ( 2 ) Multi-linear operations are concisely represented and interpreted . ( 3 ) The representation is both precise in math and intuitive , and the information flow is clear , making analysis of network structure more accessible . In addition , with the labels of the legs , we can read the model complexity explicitly . We include a comprehensive introduction to tensor diagram representation in Appendix A . | Focusing on the multi-head self-attention (MHSA) structure, this paper proposes an extension of the tensor diagram to denote self-attention (SA) structures more intuitively. Then inspired by the Tucker format, this paper also proposes a new form of SA named Tucker-Head Self-Attention (THSA), which can also be illustrated with the tensor diagram extension. Although THSA derives some success, THSA may lack theoretical guarantee and experiments seems insufficient. | SP:32abdf60d25c01e6a2025568fda331da4881e463 |
Bolstering Stochastic Gradient Descent with Model Building | 1 INTRODUCTION . Stochastic gradient descent ( SGD ) is a popular optimization algorithm for machine learning problems which can achieve very fast convergence rates when its stepsize and its scheduling are tuned well for the specific application at hand . This tuning procedure can take up to thousands of CPU/GPU days resulting in big energy costs ( Asi & Duchi , 2019 ) . A number of researchers have studied adaptive strategies for improving the direction and the stepsize choices of the stochastic gradient descent algorithm . Adaptive sample size selection ideas ( Byrd et al. , 2012 ; Balles et al. , 2016 ; Bollapragada et al. , 2018 ) improve the direction by reducing its variance around the negative gradient of the empirical loss function , while stochastic quasi-Newton algorithms ( Byrd et al. , 2016 ; Wang et al. , 2017 ) provide adaptive preconditioning . Recently , several stochastic line search approaches have been proposed . Not surprisingly , some of these work cover sample size selection as a component of the proposed line search algorithms ( Balles et al. , 2016 ; Paquette & Scheinberg , 2020 ) . The Stochastic Model Building ( SMB ) algorithm proposed in this paper is not designed as a stochastic quasi-Newton algorithm in the sense explained by Bottou et al . ( 2018 ) . However , it still produces a scaling matrix in the process of generating trial points , and its overall step at each outer iteration can be written in the form of matrix-vector multiplication . Unlike the algorithms proposed by Mokhtari & Ribeiro ( 2014 ) and Schraudolph et al . ( 2007 ) , we have no accumulation of curvature pairs throughout several iterations . Since there is no memory carried from earlier iterations , the scaling matrices in individual past iterations are based only on the data samples employed in those iterations . In other words , the scaling matrix and the incumbent random gradient vector are dependent . Vaswani et al . ( 2019 ) apply a deterministic globalization procedure on mini-batch loss functions . That is , the same sample is used in all function and gradient evaluations needed to apply the line search procedure at a given iteration . However , unlike our case , they employ a standard line search procedure that does not alter the search direction . They establish convergence guarantees for the empirical loss function under the interpolation assumption , which requires each component loss function to have zero gradient at a minimizer of the empirical loss . Mutschler & Zell ( 2020 ) assume that the optimal learning rate along the negative batch gradient is a good estimator for the optimal learning rate with respect to the empirical loss along the same direction . They test validity of this assumption empirically on deep neural networks ( DNNs ) . Rather than making such strong assumptions , we stick to the general theory for stochastic quasi-Newton methods . Other work follow a different approach to translate deterministic line search procedures into a stochastic setting , and they do not employ fixed samples . In Mahsereci & Hennig ( 2017 ) , a probabilistic model along the search direction is constructed via techniques from Bayesian optimization . Learning rates are chosen to maximize the expected improvement with respect to this model and the probability of satisfying Wolfe conditions . Paquette & Scheinberg ( 2020 ) suggest an algorithm closer to the deterministic counterpart where the convergence is based on the requirement that the stochastic function and gradient evaluations approximate their true values with a high enough probability . With our current work , we make the following contributions . We use a model building strategy for adjusting the stepsize and the direction of a stochastic gradient vector . This approach also permits us to work on subsets of parameters . This feature makes our model steps not only adaptive , but also suitable to incorporate into the existing implementations of deep learning networks . Our method changes the direction of the step as well as its size which separates our approach from the backtracking line search algorithms . It also incorporates the most recent curvature information from the current point . This is in contrast with the stochastic quasi-Newton methods which use the information from the previous steps . Capitalizing our discussion on the independence of the sample batches , we also give a convergence analysis for SMB . Finally , we illustrate the computational performance of our method with a set of numerical experiments and compare the results against those obtained with other well-known methods . 2 STOCHASTIC MODEL BUILDING . We introduce a new stochastic unconstrained optimization algorithm in order to approximately solve problems of the form min x2 < n f ( x ) = E [ F ( x , ⇠ ) ] , ( 1 ) where F : Rn ⇥ Rd ! R is continuously differentiable and possibly nonconvex , ⇠ 2 Rd denotes a random variable , and E [ . ] denotes the expectation taken with respect to ⇠ . We assume the existence of a stochastic first-order oracle which outputs a stochastic gradient g ( x , ⇠ ) of f for a given x . A common approach to tackle ( 1 ) is to solve the empirical risk problem min x2 < n f ( x ) = 1 N NX i=1 fi ( x ) , ( 2 ) where fi : Rn ! R is the loss function corresponding to the ith data sample , and N denotes the data sample size which can be very large in modern applications . As an alternative approach to line search for SGD , we propose a stochastic model building strategy inspired by the work of Öztoprak & Birbil ( 2018 ) . Unlike core SGD methods , our approach aims at including a curvature information that adjusts not only the stepsize but also the search direction . Öztoprak & Birbil ( 2018 ) consider only the deterministic setting and they apply the model building strategy repetitively until a sufficient decent is achieved . In our stochastic setting , however , we have observed experimentally that multiple model steps does not benefit much to the performance , and its cost to the run time can be extremely high in deep learning problems . Therefore , if the sufficient decent is not achieved by the stochastic gradient step , then we construct only one model to adjust the size and the direction of the step . Conventional stochastic quasi-Newton methods adjust the gradient direction by a scaling matrix that is constructed by the information from the previous steps . Our model building approach , however , uses the most recent curvature information around the latest iteration . In the popular deep learning model implementations , model parameters come in groups and updates are applied to each parameter group separately . Therefore , we also propose to build a model for each parameter group separately making the step lengths adaptive . The proposed iterative algorithm SMB works as follows : At step k , given the iterate xk , we calculate the stochastic function value fk = f ( xk , ⇠k ) and the mini-batch stochastic gradient gk = 1 mk Pmk i=1 g ( xk , ⇠k , i ) at xk , where mk is the batch size and ⇠k = ( ⇠k,1 , . . . , ⇠k , mk ) is the realization of the random vector ⇠ . Then , we apply the SGD update to calculate the trial step stk = ↵kgk , where { ↵k } k is a sequence of learning rates . With this trial step , we also calculate the function and gradient values f tk = f ( x t k , ⇠k ) and g t k = g ( x t k , ⇠k ) at x t k = xk + s t k. Then , we check the stochastic Armijo condition f tk fk c ↵kkgkk 2 , ( 3 ) where c > 0 is a hyper-parameter . If the condition is satisfied and we achieve sufficient decrease , then we set xk+1 = xtk as the next step . If the Armijo condition is not satisfied , then we build a quadratic model using the linear models at the points xk , p and xtk , p for each parameter group p and find the step sk , p to reach its minimum point . Here , xk , p and xtk , p denote respectively the coordinates of xk and xtk that corresponds to the parameter group p. We calculate the next iterate xk+1 = xk + sk , where sk = ( sk , p1 , . . . , sk , pn ) and n is the number of parameter groups , and proceed to the next step with xk+1 . This model step , if needed , requires extra mini-batch function and gradient evaluations ( forward and backward pass in deep neural networks ) . For each parameter group p , the quadratic model is built by combining the linear models at xk , p and xtk , p , given by l0k , p ( s ) : = fk , p + g > k , ps and l t k , p ( s s t k , p ) : = f t k , p + ( g t k , p ) > ( s stk , p ) , respectively . Then , the quadratic model becomes mtk , p ( s ) : = ↵ 0 k , p ( s ) l 0 k , p ( s ) + ↵ t k , p ( s ) l t k , p ( s s t k , p ) , where ↵0k , p ( s ) = ( s stk , p ) > ( stk , p ) ( stk , p ) > ( stk , p ) and ↵tk , p ( s ) = s > stk , p ( stk , p ) > stk , p . The constraint ksk2 + ks stk , pk 2 kstk , pk 2 , is also imposed so that the minimum is attained in the region bounded by xk , p and xtk , p . This constraint acts like a trust region . Figure 1 shows the steps of this construction . In this work , we solve a relaxation of this constrained model as explained in ( Öztoprak & Birbil , 2018 , Section 2.2 ) . The minimum value of the relaxed model is attained at the point xk , p + sk , p with sk , p = cg , p ( ) gk , p + cy , p ( ) yk , p + cs , p ( ) s t k , p , ( 4 ) where yk , p : = gtk , p gk , p . Here , the coefficients are given as cg , p ( ) = kstk , pk 2 2 , cy , p ( ) = kstk , pk 2 2 ✓ [ ( y > k , ps t k , p + 2 ) ( s t k , p ) > gk , p + ks t k , pk 2y > k , pgk , p ] , cs , p ( ) = kstk , pk 2 2 ✓ [ ( y > k , ps t k , p + 2 ) y > k , pgk , p + kyk , pk 2 ( stk , p ) > gk , p ] , with ✓ = ⇣ y > k , ps t k , p + 2 ⌘2 kstk , pk2kyk , pk2 and = 1 2 ✓ kstk , pk ✓ kyk , pk+ 1 ⌘ kgk , pk ◆ y > k , pstk , p ◆ , ( 5 ) where 0 < ⌘ < 1 is a constant which controls the size of sk , p by imposing the condition ksk , pk ⌘kstk , pk . Then , the adaptive model step becomes sk = ( sk , p1 , . . . , sk , pn ) . We note that our construction in terms of different parameter groups lends itself to constructing a different model for each parameter subspace . We summarize the steps of SMB in Algorithm 1 . Line 5 shows the trial point , which is obtained with the standard stochastic gradient step . If this step satisfies the stochastic Armijo condition , then we proceed with the next iteration ( line 8 ) . Otherwise , we continue with bulding the models for each parameter group ( lines 10- 12 ) , and move to the next iteration with the model building step in line 13 . Algorithm 1 : SMB : Stochastic Model Building 1 Input : x1 2 Rn , stepsizes { ↵k } Tk=1 , mini-batch sizes { mk } Tk=1 , c > 0 , and ↵max satisfying ( 8 ) 2 for k = 1 , . . . , T do 3 fk = f ( xk , ⇠k ) , gk = 1mk Pmk i=1 g ( xk , ⇠k , i ) ; 4 stk = ↵kgk ; 5 xtk = xk + s t k ; 6 f tk = f ( x t k , ⇠k ) , g t k = 1 mk Pmk i=1 g ( x t k , ⇠k , i ) ; 7 if f tk fk c ↵kkgkk2 then 8 xk+1 = xtk ; 9 else 10 for p = 1 , . . . , n do 11 yk , p = gtk , p gk , p ; 12 sk , p = cg , p ( ) gk , p + cy , p ( ) yk , p + cs , p ( ) stk , p ; 13 xk+1 = xk + sk with sk = ( sk , p1 , . . . , sk , pn ) ; | This paper proposes an alternative to stochastic line search which is based on forwarding step model building which corrects the direction of move and its magnitude at the same time. In its proposed algorithm it first checks if the given step size satisfies the stochastic line search. If yes then just use the step size and do the SGD update. Otherwise, it builds linear models around two points and combines these two models and minimizes this new model and this becomes the new iterate value. | SP:8f8b8725508f06303fd8cb959f8fcb00455f4ba7 |
Bolstering Stochastic Gradient Descent with Model Building | 1 INTRODUCTION . Stochastic gradient descent ( SGD ) is a popular optimization algorithm for machine learning problems which can achieve very fast convergence rates when its stepsize and its scheduling are tuned well for the specific application at hand . This tuning procedure can take up to thousands of CPU/GPU days resulting in big energy costs ( Asi & Duchi , 2019 ) . A number of researchers have studied adaptive strategies for improving the direction and the stepsize choices of the stochastic gradient descent algorithm . Adaptive sample size selection ideas ( Byrd et al. , 2012 ; Balles et al. , 2016 ; Bollapragada et al. , 2018 ) improve the direction by reducing its variance around the negative gradient of the empirical loss function , while stochastic quasi-Newton algorithms ( Byrd et al. , 2016 ; Wang et al. , 2017 ) provide adaptive preconditioning . Recently , several stochastic line search approaches have been proposed . Not surprisingly , some of these work cover sample size selection as a component of the proposed line search algorithms ( Balles et al. , 2016 ; Paquette & Scheinberg , 2020 ) . The Stochastic Model Building ( SMB ) algorithm proposed in this paper is not designed as a stochastic quasi-Newton algorithm in the sense explained by Bottou et al . ( 2018 ) . However , it still produces a scaling matrix in the process of generating trial points , and its overall step at each outer iteration can be written in the form of matrix-vector multiplication . Unlike the algorithms proposed by Mokhtari & Ribeiro ( 2014 ) and Schraudolph et al . ( 2007 ) , we have no accumulation of curvature pairs throughout several iterations . Since there is no memory carried from earlier iterations , the scaling matrices in individual past iterations are based only on the data samples employed in those iterations . In other words , the scaling matrix and the incumbent random gradient vector are dependent . Vaswani et al . ( 2019 ) apply a deterministic globalization procedure on mini-batch loss functions . That is , the same sample is used in all function and gradient evaluations needed to apply the line search procedure at a given iteration . However , unlike our case , they employ a standard line search procedure that does not alter the search direction . They establish convergence guarantees for the empirical loss function under the interpolation assumption , which requires each component loss function to have zero gradient at a minimizer of the empirical loss . Mutschler & Zell ( 2020 ) assume that the optimal learning rate along the negative batch gradient is a good estimator for the optimal learning rate with respect to the empirical loss along the same direction . They test validity of this assumption empirically on deep neural networks ( DNNs ) . Rather than making such strong assumptions , we stick to the general theory for stochastic quasi-Newton methods . Other work follow a different approach to translate deterministic line search procedures into a stochastic setting , and they do not employ fixed samples . In Mahsereci & Hennig ( 2017 ) , a probabilistic model along the search direction is constructed via techniques from Bayesian optimization . Learning rates are chosen to maximize the expected improvement with respect to this model and the probability of satisfying Wolfe conditions . Paquette & Scheinberg ( 2020 ) suggest an algorithm closer to the deterministic counterpart where the convergence is based on the requirement that the stochastic function and gradient evaluations approximate their true values with a high enough probability . With our current work , we make the following contributions . We use a model building strategy for adjusting the stepsize and the direction of a stochastic gradient vector . This approach also permits us to work on subsets of parameters . This feature makes our model steps not only adaptive , but also suitable to incorporate into the existing implementations of deep learning networks . Our method changes the direction of the step as well as its size which separates our approach from the backtracking line search algorithms . It also incorporates the most recent curvature information from the current point . This is in contrast with the stochastic quasi-Newton methods which use the information from the previous steps . Capitalizing our discussion on the independence of the sample batches , we also give a convergence analysis for SMB . Finally , we illustrate the computational performance of our method with a set of numerical experiments and compare the results against those obtained with other well-known methods . 2 STOCHASTIC MODEL BUILDING . We introduce a new stochastic unconstrained optimization algorithm in order to approximately solve problems of the form min x2 < n f ( x ) = E [ F ( x , ⇠ ) ] , ( 1 ) where F : Rn ⇥ Rd ! R is continuously differentiable and possibly nonconvex , ⇠ 2 Rd denotes a random variable , and E [ . ] denotes the expectation taken with respect to ⇠ . We assume the existence of a stochastic first-order oracle which outputs a stochastic gradient g ( x , ⇠ ) of f for a given x . A common approach to tackle ( 1 ) is to solve the empirical risk problem min x2 < n f ( x ) = 1 N NX i=1 fi ( x ) , ( 2 ) where fi : Rn ! R is the loss function corresponding to the ith data sample , and N denotes the data sample size which can be very large in modern applications . As an alternative approach to line search for SGD , we propose a stochastic model building strategy inspired by the work of Öztoprak & Birbil ( 2018 ) . Unlike core SGD methods , our approach aims at including a curvature information that adjusts not only the stepsize but also the search direction . Öztoprak & Birbil ( 2018 ) consider only the deterministic setting and they apply the model building strategy repetitively until a sufficient decent is achieved . In our stochastic setting , however , we have observed experimentally that multiple model steps does not benefit much to the performance , and its cost to the run time can be extremely high in deep learning problems . Therefore , if the sufficient decent is not achieved by the stochastic gradient step , then we construct only one model to adjust the size and the direction of the step . Conventional stochastic quasi-Newton methods adjust the gradient direction by a scaling matrix that is constructed by the information from the previous steps . Our model building approach , however , uses the most recent curvature information around the latest iteration . In the popular deep learning model implementations , model parameters come in groups and updates are applied to each parameter group separately . Therefore , we also propose to build a model for each parameter group separately making the step lengths adaptive . The proposed iterative algorithm SMB works as follows : At step k , given the iterate xk , we calculate the stochastic function value fk = f ( xk , ⇠k ) and the mini-batch stochastic gradient gk = 1 mk Pmk i=1 g ( xk , ⇠k , i ) at xk , where mk is the batch size and ⇠k = ( ⇠k,1 , . . . , ⇠k , mk ) is the realization of the random vector ⇠ . Then , we apply the SGD update to calculate the trial step stk = ↵kgk , where { ↵k } k is a sequence of learning rates . With this trial step , we also calculate the function and gradient values f tk = f ( x t k , ⇠k ) and g t k = g ( x t k , ⇠k ) at x t k = xk + s t k. Then , we check the stochastic Armijo condition f tk fk c ↵kkgkk 2 , ( 3 ) where c > 0 is a hyper-parameter . If the condition is satisfied and we achieve sufficient decrease , then we set xk+1 = xtk as the next step . If the Armijo condition is not satisfied , then we build a quadratic model using the linear models at the points xk , p and xtk , p for each parameter group p and find the step sk , p to reach its minimum point . Here , xk , p and xtk , p denote respectively the coordinates of xk and xtk that corresponds to the parameter group p. We calculate the next iterate xk+1 = xk + sk , where sk = ( sk , p1 , . . . , sk , pn ) and n is the number of parameter groups , and proceed to the next step with xk+1 . This model step , if needed , requires extra mini-batch function and gradient evaluations ( forward and backward pass in deep neural networks ) . For each parameter group p , the quadratic model is built by combining the linear models at xk , p and xtk , p , given by l0k , p ( s ) : = fk , p + g > k , ps and l t k , p ( s s t k , p ) : = f t k , p + ( g t k , p ) > ( s stk , p ) , respectively . Then , the quadratic model becomes mtk , p ( s ) : = ↵ 0 k , p ( s ) l 0 k , p ( s ) + ↵ t k , p ( s ) l t k , p ( s s t k , p ) , where ↵0k , p ( s ) = ( s stk , p ) > ( stk , p ) ( stk , p ) > ( stk , p ) and ↵tk , p ( s ) = s > stk , p ( stk , p ) > stk , p . The constraint ksk2 + ks stk , pk 2 kstk , pk 2 , is also imposed so that the minimum is attained in the region bounded by xk , p and xtk , p . This constraint acts like a trust region . Figure 1 shows the steps of this construction . In this work , we solve a relaxation of this constrained model as explained in ( Öztoprak & Birbil , 2018 , Section 2.2 ) . The minimum value of the relaxed model is attained at the point xk , p + sk , p with sk , p = cg , p ( ) gk , p + cy , p ( ) yk , p + cs , p ( ) s t k , p , ( 4 ) where yk , p : = gtk , p gk , p . Here , the coefficients are given as cg , p ( ) = kstk , pk 2 2 , cy , p ( ) = kstk , pk 2 2 ✓ [ ( y > k , ps t k , p + 2 ) ( s t k , p ) > gk , p + ks t k , pk 2y > k , pgk , p ] , cs , p ( ) = kstk , pk 2 2 ✓ [ ( y > k , ps t k , p + 2 ) y > k , pgk , p + kyk , pk 2 ( stk , p ) > gk , p ] , with ✓ = ⇣ y > k , ps t k , p + 2 ⌘2 kstk , pk2kyk , pk2 and = 1 2 ✓ kstk , pk ✓ kyk , pk+ 1 ⌘ kgk , pk ◆ y > k , pstk , p ◆ , ( 5 ) where 0 < ⌘ < 1 is a constant which controls the size of sk , p by imposing the condition ksk , pk ⌘kstk , pk . Then , the adaptive model step becomes sk = ( sk , p1 , . . . , sk , pn ) . We note that our construction in terms of different parameter groups lends itself to constructing a different model for each parameter subspace . We summarize the steps of SMB in Algorithm 1 . Line 5 shows the trial point , which is obtained with the standard stochastic gradient step . If this step satisfies the stochastic Armijo condition , then we proceed with the next iteration ( line 8 ) . Otherwise , we continue with bulding the models for each parameter group ( lines 10- 12 ) , and move to the next iteration with the model building step in line 13 . Algorithm 1 : SMB : Stochastic Model Building 1 Input : x1 2 Rn , stepsizes { ↵k } Tk=1 , mini-batch sizes { mk } Tk=1 , c > 0 , and ↵max satisfying ( 8 ) 2 for k = 1 , . . . , T do 3 fk = f ( xk , ⇠k ) , gk = 1mk Pmk i=1 g ( xk , ⇠k , i ) ; 4 stk = ↵kgk ; 5 xtk = xk + s t k ; 6 f tk = f ( x t k , ⇠k ) , g t k = 1 mk Pmk i=1 g ( x t k , ⇠k , i ) ; 7 if f tk fk c ↵kkgkk2 then 8 xk+1 = xtk ; 9 else 10 for p = 1 , . . . , n do 11 yk , p = gtk , p gk , p ; 12 sk , p = cg , p ( ) gk , p + cy , p ( ) yk , p + cs , p ( ) stk , p ; 13 xk+1 = xk + sk with sk = ( sk , p1 , . . . , sk , pn ) ; | The authors proposed a method called stochastic model building (SMB) that uses a combination of existing techniques to get faster convergence in stochastic non-convex optimization. In particular, they use a stochastic adaptation of the model-building globalization strategy from Oztoprak and Birbil (2018), in which the deterministic Armijo condition check is also computed using stochastic gradients. By re-writing their update as a preconditioned SGD step, they are able to bound the spectrum of the preconditioner. This allows them to obtain convergence results for smooth and non-convex objectives by directly invoking the analysis of Wang et al. (2017). Experiments demonstrate that with additional heuristics, their proposed method can outperform state-of-the-art optimizers on common deep learning benchmarks. | SP:8f8b8725508f06303fd8cb959f8fcb00455f4ba7 |
Neural graphical modelling in continuous-time: consistency guarantees and algorithms | 1 INTRODUCTION . This paper deals with learning directed graphs from a combination of temporal data and assumptions on the parameterization of the underlying structural dynamical system . Graphical models can offer a parsimonious , interpretable representation of the dynamics of stochastic processes , and have proven to be especially useful in problems involving complex systems , non-linear associations and chaotic behaviour that are characteristic in a wide array of applications in biology ( Trapnell et al. , 2014 ; Qiu et al. , 2017 ; Bracco et al. , 2018 ; Raia , 2008 ; Qian et al. , 2020 ) , neuroscience ( Friston et al. , 2003 ; Friston , 2009 ) and climate science ( Runge , 2018 ; Runge et al. , 2019 ) . In these contexts , inferring graphical models from temporal data subject to practical limitations as to how finely and regularly each variable can be measured over time is a longstanding challenge . Time series data is often assumed to be a sequence of observations from an underlying process evolving continuously in time . This underlying representation is fundamental to define the semantics of dependencies between sequences . Time defines an asymmetry between dependencies in dynamical systems , distinguishing between local , direct dependencies that occur over infinitesimal time intervals not mediated by other variables in the system and indirect dependencies that necessarily occur over longer time frames . In many applications , the underlying structural model is formalized as the state of random variables ( e.g . x ( t ) ∈ Rd ) contemporaneously influencing the rate of change of the same or other variables ( e.g . dx ( t ) ) , dx ( t ) = f ( x ( t ) ) dt+ dw ( t ) , x ( 0 ) = x0 , t ∈ [ 0 , T ] , ( 1 ) ∗Work primarily conducted while at the University of Cambridge and at the Alan Turing Institute . where w ( t ) a d-dimensional standard Brownian motion and x0 is a Gaussian random variable independent of w ( t ) . The functional dependence structure of the vector field f defines a directed graph G and associated adjacency matrix G ∈ { 0 , 1 } d×d , i.e. , Gij = 1 if and only if xj appears as an argument of fi = [ f ] i . The problem of structure learning is to search over the space of graphs compatible with the data , but the pattern of observation in dynamical systems emphasize a number of differences with respect to classical graphical modelling with static data or explicitly discrete-time stochastic process . • Observed data is sampled at a sequence of ( often irregular ) time points ( t1 , . . . , tn ) and is systematically subsampled . Most work on graphical modelling with time series data assume a fundamentally discrete parameterization of the underlying structural model ( e.g . based on vector autoregression models ) . Associations in discrete-time in general do not correspond to the structure of the underlying dynamical system and are highly dependent on the interval between observations . The same subsampled discrete model may disaggregate to several continuous models , which are observationally equivalent at the subsampled frequency , see e.g . ( Runge , 2018 ; Gong et al. , 2015 ; Danks & Plis , 2013 ) and a worked example in Appendix A . The realm of problems that involve irregularlysampled data are fundamentally out of scope in discrete-time in general . We complement this point in Figure 1 with an illustration of our performance results comparing a state of the art discrete-time graphical modelling method with our proposed continuous-time counterpart that is shown to be more accurate and more robust to the frequency and irregularity of sampling . • Discrete samples are not independent which can ( and does ) increase the sample complexity . An increasing sample frequency will produce an increasing number of distinct samples . However , samples become more dependent , and intuitively one expects that there is limited information to be harnessed from a given time interval [ 0 , T ] . Learning performance depends on the number of independent samples which is a function both of the number of samples n and the length of the observed interval T . • Non-parametric graphical modelling in dynamical systems is relatively unexplored . Existing approaches rely on specific model assumptions ( e.g . linearity , additivity ) to establish the consistency of structure recovery even though flexible model families , such as neural networks , are increasingly used in related problems such as feature selection and graphical modelling with static data . In addition , consistent derivative approximations are typically required for consistency arguments which in practice involve choices on the smoothness of the interpolated curve and makes two-step strategies far from automatic and applicable in general dynamical systems . Contributions . This paper establishes the consistency of score-based recovery of G when an analytic deep neural network model is imposed for f ( such as feed-forward networks with multiple hidden layers and convolutional neural networks ) under general observation patterns including irregular sampling . In particular , we consider penalized optimization problems of the form , arg min fθ 1 n n∑ i=1 ||x ( ti ) − x̂ ( ti ) ) ||22 , subject to ρn , T ( fθ ) ≤ η and dx̂ ( t ) = fθ ( x̂ ( t ) ) dt , ( 2 ) where the observation process ( x ( t1 ) , . . . , x ( tn ) ) is given by an irregular sequence of time points 0 ≤ t1 < · · · < tn ≤ T . ρn , T ( fθ ) is an adaptive group lasso constraint on the parameter space of fθ . We analyze this problem with fixed dimension d and increasing sample size n and horizon T – the sample complexity of this problem depending both on the frequency of sampling n as well as on the time horizon T . A second contribution is to propose an instantiation of this method using differential equations with vector fields parameterized by neural networks ( Chen et al. , 2018 ) to model the mean process of ( 1 ) with the advantage of implicitly inferring variable derivatives instead of involving a separate approximation step ( that is common in the dynamical systems literature ) . This construction shows that , empirically , graphical models in continuous-time can be inferred accurately in a large range of settings despite irregularly-sampled multivariate time series data and non-linear underlying dependencies . Code associated with this work may be found at https : //github.com/alexisbellot and at https : //github.com/vanderschaarlab/mlforhealthlabpub . 2 RELATED WORK . A substantial amount of work devoted to graphical modelling has considered the analysis of penalized least squares and its variants , most prominently in the high-dimensional regression literature with i.i.d data , see e.g . ( Friedman et al. , 2008 ; Zou , 2006 ; Zhao & Yu , 2006 ) . Closely related to our results are a number of extensions that have considered parameter identification in neural networks , using for instance a sparse one-to-one linear layers ( Li et al. , 2016 ) , group lasso constraints of the input layer of parameters ( Zhang et al. , 2019 ) and input to output residual connections ( Lemhadri et al. , 2021 ) . For a large class of neural networks Dinh & Ho ( 2020 ) proved the consistency of adaptive regularization methods . The distinction with our formalism in ( 2 ) is that the observations are not corrupted by i.i.d . noise ( since successive samples are correlated ) and therefore standard concentration inequalities are not sufficient . Learning graphical models with dependent noise terms is also a topic of significant literature in the context of Granger causality , proposed by Granger ( 1969 ) and also popularized by Sims ( 1980 ) within autoregressive models . Various authors have considered the consistency of penalized vector autoregression models and proposed tests of Granger causality using parameter estimates in these models , see e.g . ( Nardi & Rinaldo , 2011 ; Kock & Callot , 2015 ; Adamek et al. , 2020 ; Chernozhukov et al. , 2019 ) , and extended some of these approaches to models of neural networks , see e.g . ( Tank et al. , 2018 ; Khanna & Tan , 2019 ; Marcinkevičs & Vogt , 2021 ) ( without however proving consistency of inference ) . Methods exist also using conditional independence tests such as those given by Runge et al . ( 2017 ) and transfer entropy principles originating in Schreiber ( 2000 ) . The conceptual and statistical contrasts between discrete and continuous accounts of the underlying structural model are substantial and are discussed in the Appendix A . In the context of differential equations , penalized regression has been explored using two-stage collocation methods , first proposed by Varah ( 1982 ) , by which derivatives are estimated on smoothed data and subsequently regressed on observed samples for inference . The consistency of parameter estimates has been established for linear models in parameters , as done for example in ( Ramsay et al. , 2007 ; Chen et al. , 2017 ; Wu et al. , 2014 ; Brunton et al. , 2016 ) . From a modelling perspective , our approach in contrast is end-to-end , coupling the estimation of the underlying paths x and the vector field f . Graphical modelling has also been considered for linear stochastic differential equations by Bento et al . ( 2010 ) . Similarly to the discrete-time literature , proposals exist for recovering non-linear vector fields via neural networks ( see e.g . ( Raissi et al. , 2017 ; Bellot & van der Schaar , 2021 ) ) and Gaussian processes ( see e.g . ( Heinonen et al. , 2018 ; Wenk et al. , 2020 ) ) but we are not aware of any identifiability guarantees . 3 GRAPHICAL MODELLING IN CONTINUOUS-TIME . We consider the underlying structure of an evolving process to be described by a multivariate dynamical system of d distinct stochastic processes x = ( x1 , . . . , xd ) : [ 0 , T ] → X d with each instantiation in time xj ( t ) for j = 1 , . . . , d and t > 0 defined in a bounded open set X ⊂ R. Definition 1 ( Neural Dynamic Structural Model ( NDSM ) ) . We say that x = ( x1 , . . . , xd ) : [ 0 , T ] → X d follows a Neural Dynamic Structural Model if there exist functions f1 , . . . , fd ∈ F such that fj : X d → R and , dxj ( t ) = fj ( x ( t ) ) dt+ dwj ( t ) , x ( t0 ) = x0 , t ∈ [ 0 , T ] , ( 3 ) with F defined as the space of analytic feed-forward neural networks with sets of parameters θ ∈ Θ defined in bounded , real-valued intervals and wj ( t ) is standard Brownian motion independently generated across processes j1 . We will write fθ0 = ( f1 , . . . , fd ) for the true underlying vector field , parameterized by a set of parameter values θ0 . It will be useful to define each layer of each network precisely . Let A j 1 ∈ Rd×h denote the d × h weight matrix ( we omit biases for clarity ) in the input layer of fj , j = 1 , . . . , d. Let Ajm ∈ Rh×h , for m = 2 , . . . , M − 1 , denote the weight matrix of each hidden layer , and let AjM ∈ Rh×1 be the h× 1 dimensional output layers of each sub-network such that , fj ( X ) : = φ ( · · ·φ ( φ ( XAj1 ) A j 2 ) · · · ) A j M , j = 1 , . . . , d , ( 4 ) where φ ( · ) is an analytic activation function ( e.g . tanh , sigmoid , arctan , softplus , etc . ) and X ∈ Rn×d is the sequence of n d-dimensional instantiations of x . Assumption 1 ( Observation process ) . The data in practice , is a partial sequence of observations of x at n time points ( t1 , . . . , tn ) sampled from a temporal point process with positive intensity such that , ( x1 , . . . , xn ) ∼ N ( µ , Σn ) , ( 5 ) with a dependency structure encoded in Σn ∈ Rn×n . The closer in time two observations are the more closely correlated we can expect them to be . We assume the data to be normalized , i.e . diagonal elements of Σn to be equal to 1. µ are the instantiations of the mean process that can be described by an system of ordinary differential equations dx ( t ) = f ( x ( t ) ) dt , x ( 0 ) = x0 , t ∈ [ 0 , T ] . Time points at which observations are made are thus themselves assumed stochastic , driven by an independent temporal point process with intensity limdt→0 Pr ( Observation in [ t , t + dt ] |Ht ) > 0 for any t > 0 with respect to a filtrationHt that denotes sigma algebras generated by any sequence of prior observations . Perfectly homogeneous and systematic subsampling has measure zero under this probability model . This is important because it will enable , in principle , to infer local conditional independencies ( defined below ) arbitrarily well with increasing sample size . | This paper introduces a brand new graphical modeling framework from the perspective of neural ODEs. Traditionally structure learning involves using sampled data to learn the structure of graphs. This paper, however, looks at the graph structure learning problem from a different viewpoint, using continuous-time dynamics inspired from neural ODEs. Theoretical guarantees on parameter estimation are provided. Some experiments on benchmark time-series datasets are also conducted. | SP:c993d028cb6c4168ee0a40f62cb9020008ba8bf2 |
Neural graphical modelling in continuous-time: consistency guarantees and algorithms | 1 INTRODUCTION . This paper deals with learning directed graphs from a combination of temporal data and assumptions on the parameterization of the underlying structural dynamical system . Graphical models can offer a parsimonious , interpretable representation of the dynamics of stochastic processes , and have proven to be especially useful in problems involving complex systems , non-linear associations and chaotic behaviour that are characteristic in a wide array of applications in biology ( Trapnell et al. , 2014 ; Qiu et al. , 2017 ; Bracco et al. , 2018 ; Raia , 2008 ; Qian et al. , 2020 ) , neuroscience ( Friston et al. , 2003 ; Friston , 2009 ) and climate science ( Runge , 2018 ; Runge et al. , 2019 ) . In these contexts , inferring graphical models from temporal data subject to practical limitations as to how finely and regularly each variable can be measured over time is a longstanding challenge . Time series data is often assumed to be a sequence of observations from an underlying process evolving continuously in time . This underlying representation is fundamental to define the semantics of dependencies between sequences . Time defines an asymmetry between dependencies in dynamical systems , distinguishing between local , direct dependencies that occur over infinitesimal time intervals not mediated by other variables in the system and indirect dependencies that necessarily occur over longer time frames . In many applications , the underlying structural model is formalized as the state of random variables ( e.g . x ( t ) ∈ Rd ) contemporaneously influencing the rate of change of the same or other variables ( e.g . dx ( t ) ) , dx ( t ) = f ( x ( t ) ) dt+ dw ( t ) , x ( 0 ) = x0 , t ∈ [ 0 , T ] , ( 1 ) ∗Work primarily conducted while at the University of Cambridge and at the Alan Turing Institute . where w ( t ) a d-dimensional standard Brownian motion and x0 is a Gaussian random variable independent of w ( t ) . The functional dependence structure of the vector field f defines a directed graph G and associated adjacency matrix G ∈ { 0 , 1 } d×d , i.e. , Gij = 1 if and only if xj appears as an argument of fi = [ f ] i . The problem of structure learning is to search over the space of graphs compatible with the data , but the pattern of observation in dynamical systems emphasize a number of differences with respect to classical graphical modelling with static data or explicitly discrete-time stochastic process . • Observed data is sampled at a sequence of ( often irregular ) time points ( t1 , . . . , tn ) and is systematically subsampled . Most work on graphical modelling with time series data assume a fundamentally discrete parameterization of the underlying structural model ( e.g . based on vector autoregression models ) . Associations in discrete-time in general do not correspond to the structure of the underlying dynamical system and are highly dependent on the interval between observations . The same subsampled discrete model may disaggregate to several continuous models , which are observationally equivalent at the subsampled frequency , see e.g . ( Runge , 2018 ; Gong et al. , 2015 ; Danks & Plis , 2013 ) and a worked example in Appendix A . The realm of problems that involve irregularlysampled data are fundamentally out of scope in discrete-time in general . We complement this point in Figure 1 with an illustration of our performance results comparing a state of the art discrete-time graphical modelling method with our proposed continuous-time counterpart that is shown to be more accurate and more robust to the frequency and irregularity of sampling . • Discrete samples are not independent which can ( and does ) increase the sample complexity . An increasing sample frequency will produce an increasing number of distinct samples . However , samples become more dependent , and intuitively one expects that there is limited information to be harnessed from a given time interval [ 0 , T ] . Learning performance depends on the number of independent samples which is a function both of the number of samples n and the length of the observed interval T . • Non-parametric graphical modelling in dynamical systems is relatively unexplored . Existing approaches rely on specific model assumptions ( e.g . linearity , additivity ) to establish the consistency of structure recovery even though flexible model families , such as neural networks , are increasingly used in related problems such as feature selection and graphical modelling with static data . In addition , consistent derivative approximations are typically required for consistency arguments which in practice involve choices on the smoothness of the interpolated curve and makes two-step strategies far from automatic and applicable in general dynamical systems . Contributions . This paper establishes the consistency of score-based recovery of G when an analytic deep neural network model is imposed for f ( such as feed-forward networks with multiple hidden layers and convolutional neural networks ) under general observation patterns including irregular sampling . In particular , we consider penalized optimization problems of the form , arg min fθ 1 n n∑ i=1 ||x ( ti ) − x̂ ( ti ) ) ||22 , subject to ρn , T ( fθ ) ≤ η and dx̂ ( t ) = fθ ( x̂ ( t ) ) dt , ( 2 ) where the observation process ( x ( t1 ) , . . . , x ( tn ) ) is given by an irregular sequence of time points 0 ≤ t1 < · · · < tn ≤ T . ρn , T ( fθ ) is an adaptive group lasso constraint on the parameter space of fθ . We analyze this problem with fixed dimension d and increasing sample size n and horizon T – the sample complexity of this problem depending both on the frequency of sampling n as well as on the time horizon T . A second contribution is to propose an instantiation of this method using differential equations with vector fields parameterized by neural networks ( Chen et al. , 2018 ) to model the mean process of ( 1 ) with the advantage of implicitly inferring variable derivatives instead of involving a separate approximation step ( that is common in the dynamical systems literature ) . This construction shows that , empirically , graphical models in continuous-time can be inferred accurately in a large range of settings despite irregularly-sampled multivariate time series data and non-linear underlying dependencies . Code associated with this work may be found at https : //github.com/alexisbellot and at https : //github.com/vanderschaarlab/mlforhealthlabpub . 2 RELATED WORK . A substantial amount of work devoted to graphical modelling has considered the analysis of penalized least squares and its variants , most prominently in the high-dimensional regression literature with i.i.d data , see e.g . ( Friedman et al. , 2008 ; Zou , 2006 ; Zhao & Yu , 2006 ) . Closely related to our results are a number of extensions that have considered parameter identification in neural networks , using for instance a sparse one-to-one linear layers ( Li et al. , 2016 ) , group lasso constraints of the input layer of parameters ( Zhang et al. , 2019 ) and input to output residual connections ( Lemhadri et al. , 2021 ) . For a large class of neural networks Dinh & Ho ( 2020 ) proved the consistency of adaptive regularization methods . The distinction with our formalism in ( 2 ) is that the observations are not corrupted by i.i.d . noise ( since successive samples are correlated ) and therefore standard concentration inequalities are not sufficient . Learning graphical models with dependent noise terms is also a topic of significant literature in the context of Granger causality , proposed by Granger ( 1969 ) and also popularized by Sims ( 1980 ) within autoregressive models . Various authors have considered the consistency of penalized vector autoregression models and proposed tests of Granger causality using parameter estimates in these models , see e.g . ( Nardi & Rinaldo , 2011 ; Kock & Callot , 2015 ; Adamek et al. , 2020 ; Chernozhukov et al. , 2019 ) , and extended some of these approaches to models of neural networks , see e.g . ( Tank et al. , 2018 ; Khanna & Tan , 2019 ; Marcinkevičs & Vogt , 2021 ) ( without however proving consistency of inference ) . Methods exist also using conditional independence tests such as those given by Runge et al . ( 2017 ) and transfer entropy principles originating in Schreiber ( 2000 ) . The conceptual and statistical contrasts between discrete and continuous accounts of the underlying structural model are substantial and are discussed in the Appendix A . In the context of differential equations , penalized regression has been explored using two-stage collocation methods , first proposed by Varah ( 1982 ) , by which derivatives are estimated on smoothed data and subsequently regressed on observed samples for inference . The consistency of parameter estimates has been established for linear models in parameters , as done for example in ( Ramsay et al. , 2007 ; Chen et al. , 2017 ; Wu et al. , 2014 ; Brunton et al. , 2016 ) . From a modelling perspective , our approach in contrast is end-to-end , coupling the estimation of the underlying paths x and the vector field f . Graphical modelling has also been considered for linear stochastic differential equations by Bento et al . ( 2010 ) . Similarly to the discrete-time literature , proposals exist for recovering non-linear vector fields via neural networks ( see e.g . ( Raissi et al. , 2017 ; Bellot & van der Schaar , 2021 ) ) and Gaussian processes ( see e.g . ( Heinonen et al. , 2018 ; Wenk et al. , 2020 ) ) but we are not aware of any identifiability guarantees . 3 GRAPHICAL MODELLING IN CONTINUOUS-TIME . We consider the underlying structure of an evolving process to be described by a multivariate dynamical system of d distinct stochastic processes x = ( x1 , . . . , xd ) : [ 0 , T ] → X d with each instantiation in time xj ( t ) for j = 1 , . . . , d and t > 0 defined in a bounded open set X ⊂ R. Definition 1 ( Neural Dynamic Structural Model ( NDSM ) ) . We say that x = ( x1 , . . . , xd ) : [ 0 , T ] → X d follows a Neural Dynamic Structural Model if there exist functions f1 , . . . , fd ∈ F such that fj : X d → R and , dxj ( t ) = fj ( x ( t ) ) dt+ dwj ( t ) , x ( t0 ) = x0 , t ∈ [ 0 , T ] , ( 3 ) with F defined as the space of analytic feed-forward neural networks with sets of parameters θ ∈ Θ defined in bounded , real-valued intervals and wj ( t ) is standard Brownian motion independently generated across processes j1 . We will write fθ0 = ( f1 , . . . , fd ) for the true underlying vector field , parameterized by a set of parameter values θ0 . It will be useful to define each layer of each network precisely . Let A j 1 ∈ Rd×h denote the d × h weight matrix ( we omit biases for clarity ) in the input layer of fj , j = 1 , . . . , d. Let Ajm ∈ Rh×h , for m = 2 , . . . , M − 1 , denote the weight matrix of each hidden layer , and let AjM ∈ Rh×1 be the h× 1 dimensional output layers of each sub-network such that , fj ( X ) : = φ ( · · ·φ ( φ ( XAj1 ) A j 2 ) · · · ) A j M , j = 1 , . . . , d , ( 4 ) where φ ( · ) is an analytic activation function ( e.g . tanh , sigmoid , arctan , softplus , etc . ) and X ∈ Rn×d is the sequence of n d-dimensional instantiations of x . Assumption 1 ( Observation process ) . The data in practice , is a partial sequence of observations of x at n time points ( t1 , . . . , tn ) sampled from a temporal point process with positive intensity such that , ( x1 , . . . , xn ) ∼ N ( µ , Σn ) , ( 5 ) with a dependency structure encoded in Σn ∈ Rn×n . The closer in time two observations are the more closely correlated we can expect them to be . We assume the data to be normalized , i.e . diagonal elements of Σn to be equal to 1. µ are the instantiations of the mean process that can be described by an system of ordinary differential equations dx ( t ) = f ( x ( t ) ) dt , x ( 0 ) = x0 , t ∈ [ 0 , T ] . Time points at which observations are made are thus themselves assumed stochastic , driven by an independent temporal point process with intensity limdt→0 Pr ( Observation in [ t , t + dt ] |Ht ) > 0 for any t > 0 with respect to a filtrationHt that denotes sigma algebras generated by any sequence of prior observations . Perfectly homogeneous and systematic subsampling has measure zero under this probability model . This is important because it will enable , in principle , to infer local conditional independencies ( defined below ) arbitrarily well with increasing sample size . | The paper proposes to learn Jacobian-sparse neural network ODEs from irregular trajectories of a dynamical system. The main contribution is the sparsity of the ODE Jacobian, which results in learning of differential covariate causalities. Learning the differential structure is an important real-world problem. The proposed method is elegant, simple and effective, although incremental. | SP:c993d028cb6c4168ee0a40f62cb9020008ba8bf2 |
Optimal Transport for Causal Discovery | 1 INTRODUCTION . Determining causal direction between two variables is a fundamental and challenging causal discovery task ( Janzing et al. , 2012 ) . Conventional constraint-based and score-based causal discovery methods identify causal structures only up to Markov equivalent classes ( Spirtes et al. , 2001 ) , in which some causal directions are undetermined . To address this challenge , properly constrained functional causal models ( FCMs ) have been proposed . FCMs represent the effect as a function of its cause and independent noise , and can help identify the causal direction between two variables by imposing substantial structural constraints on model classes , such as additive noise models ( ANMs ) ( Shimizu et al. , 2006 ; Hoyer et al. , 2008 ) and post-nonlinear models ( PNLs ) ( Zhang and Hyvärinen , 2009b ) . While some of the models , such as PNLs , are highly flexible , the constraints are still restrictive and difficult to interpret and relax . Inevitably , the performance of these methods is sensitive to model assumptions and optimization algorithms , especially in real-world applications . To handle the mentioned issues , we consider FCMs from a dynamical-system view . By augmenting a time dimension for the static causal discovery task , we interpret FCMs with dynamical causal processes under the least action principle ( Arnol ’ d , 2013 ) . The new interpretation connects FCMs with a large class of models in dynamical systems . It then provides more freedom to model causal influences , possibilities to derive new causal discovery criteria , and a potential direction to generalize causal models with identifiable causal direction . In particular , we exploit the above idea by leveraging the intrinsic connection between FCMs and optimal transport . Optimal transport is originally introduced by Monge ( 1781 ) , which has been ap- FIX ( GA77 , pBTi ) plied in a large range of applications , not only because it is a natural way to describe moving particles ( Ambrosio et al. , 2012 ) but also because of its recent improvement of the computational methods ( Cuturi , 2013 ; Kolouri et al. , 2019 ) . Recently , it has also been largely applied to generative models for measuring the distance of probability distributions ( Arjovsky et al. , 2017 ; Kolouri et al. , 2018 ; Genevay et al. , 2018 ) . Among different optimal transport definitions , the L2 Wasserstein distance got extensive applications in statistics ( Rachev and Rüschendorf , 1998 ) , functional analysis ( Barthe , 1998 ) , and multiple disciplines of science ( McCann , 1997 ; Otto , 1997 ) . The dynamical formulation of the L2 Wasserstein distance is introduced by Benamou and Brenier ( 2000 ) for relaxing the computational costs . We find that in the context of the dynamical formulation , FCMs can be connected with optimal transport . Furthermore , with the dynamical interpretation of optimal transport , one can naturally understand FCMs from a dynamical-system view , which makes it possible to derive new criteria to identify causal direction . Moreover , it also enables us to develop practical algorithms with optimal transport for static causal discovery tasks in the bivariate case without learning a regression model . Accordingly , our main contributions are : 1 . Dynamical interpretation of FCMs in the bivariate case . We provide dynamical interpretations of optimal transport under the constraints of FCMs . Furthermore , we introduce a time variable , determine the underlying dynamical process under the least action principle ( Arnol ’ d , 2013 ) for the static bivariate causal discovery task , and characterize properties of the corresponding dynamical systems ( Sec . 3.1 and Sec . 3.2 ) . 2 . A criterion of determining causal direction between two variables for ANMs . We study the corresponding dynamical systems of FCMs , and prove that ANMs correspond to volume-preserving pressureless flows . Moreover , based on the divergence of their velocity fields , we propose a criterion to determine causal direction , and show that under the identifiability conditions of ANMs , it is a valid criterion for ANMs , which can be extended to PNLs directly ( Sec . 3.2 ) . 3 . An optimal transport based approach ( DIVOT ) for distinguishing cause from effect between two . variables . DIVOT inherits the advantages of one-dimensional optimal transport . It can be computed efficiently , and does not require independence tests , learning a regression model , or deriving likelihood functions for complicated distributions . Experimental results show that our method is robust to the choice of models , and has a promising performance compared with the state-of-the-art methods on both synthetic and real cause-effect pair datasets ( Sec . 4 and Sec . 6 ) . 2 PRELIMINARIES . 2.1 OPTIMAL TRANSPORT . In this work we mainly use the L2 Wasserstein distance and we introduce its framework following the notations and definitions of ( Benamou and Brenier , 2000 ) in this section . FIX ( pBTi ) The underdetermined Jacobian problem . Suppose that two density functions , ρ0 ( x ) and ρT ( x ) where x ∈ Rd , are non-negative and bounded with total mass one . The transfer of ρ0 ( x ) to ρT ( x ) is realized with a smooth one-to-one map M : Rd → Rd . The Jacobian problem is to find M that satisfies the Jacobian equation : ρ0 ( x0 ) = ρT ( M ( x0 ) ) |det ( ∇M ( x0 ) ) | , xT =M ( x0 ) , ( 1 ) where det ( · ) denotes determinant . This is an underdetermined problem as many maps can be the solutions . Thus , a natural way is to choose the optimal one in the sense of lowest cost depending on applications . A common cost function is the Lp Wasserstein distance ( Kantorovich , 1948 ) . Lp Wasserstein distance and its one-dimensional closed-form solution . The Lp Wasserstein distance between p0 and pT , denoted by Wp ( p0 , pT ) , is defined by Wp ( p0 , pT ) p = infM ∫ |M ( x0 ) − x0|pp0 ( x0 ) dx0 , where p ≥ 1 . We say that the optimal transport M∗ achieving the infimum solves the optimal transport ( or Lp Monge-Kantorovich ) problem . In this work , we mainly use the square of the L2 Wasserstein distance , denoted by W 22 . Moreover , following the approach of Kantorovich ( 1948 ) , the one-dimensional ( 1D ) Lp Wasserstein distance has a closed-form solution , e.g. , the 1D optimal solution of W 22 is M∗ = P−1T ◦ P0 , ( 2 ) where P0 and PT are the cumulative distribution functions for p0 and pT , and “ ◦ ” represents the function composition . In practice , the 1D optimal solution in Eqn . ( 2 ) can be computed with the average square distance between the sorted samples from p0 and pT ( Kolouri et al. , 2019 ) . 2.2 FUNCTIONAL CAUSAL MODELS . A FCM represents the effect Y as a function f ( · ) of the direct cause X and independent noise Ey , where function f describes the causal influence of X on Y , and Ey is the exogenous vari- able/noise . Without any additional assumption on the functional classes , the causal direction is not identifiable ( Hyvärinen and Pajunen , 1999 ; Zhang et al. , 2015a ) . Roughly speaking , this is because given variable pair ( X , Y ) , one can always construct Y = f ( X , Ey ) and another different FCM , X = f̃ ( Y , Ex ) , such that both of them are consistent with the data distribution and have independent “ noise ” ( Hyvärinen and Pajunen , 1999 ; Zhang et al. , 2015a ) . Several works further introduce proper assumptions on the functional form of the FCMs and the distributions of the involved variables , and then identify causal direction in the bivariate case , i.e. , the independence of cause and noise only holds in the causal direction . Examples include the ANM and PNL models : ANM : Y = g ( X ) + Ey ; ( 3 ) PNL : Y = h ( g ( X ) + Ey ) , ( 4 ) where g and h are nonlinear functions and h is invertible . 3 DYNAMICAL INTERPRETATION OF FUNCTIONAL CAUSAL MODELS . We first show the connection between FCMs and optimal transport in Sec . 3.1 . In Sec . 3.2 , we further elaborate the analogy between the optimal transport problem and the causal direction determination problem . We then study the optimal transport under the constraints of FCMs , show the corresponding dynamical systems of FCMs , and characterize the properties of such systems . 3.1 CAUSALITY AND OPTIMALITY OF THE MAPS IN THE JACOBIAN PROBLEM . As introduced in Sec . 2.2 , FCMs are used to approximate the true data generation process . Given the FCM , Y = f ( X , Ey ) , we rewrite it in a Jacobian equation way , xT = [ X Y ] = [ Ex f ( X , Ey ) ] =M ( [ Ex Ey ] ) =M ( x0 ) , ( 5 ) where x0 , xT ∈ R2 , their probability densities p0 , pT ≥ 0 , and M : R2 → R2 . As an analogy to the mass transfer scenario ( Monge , 1781 ) , we consider the samples of independent noise Ex and Ey as the particles of materials in the mass transfer problem and regard the map M in Eqn . ( 5 ) as a special transformation of the independent noise samples . As shown in Fig . 1 , one can consider the data points are transferred from the original positions ( which are unmeasured ) in the plane Ex–Ey at time 0 to the observed positions in the plane X–Y at time T . Such transformation considers the transfer as a causal process which moves the unmeasured independent noise x0 = [ Ex , Ey ] ′ 1 and consequently leads to the observations xT = [ X , Y ] ′ . From the perspective of FCM-based causal FIX ( pBTi ) discovery approaches , causal influences are represented by FCMs which represent the effect as a function of its direct cause and an unmeasured noise satisfying the FCM constraints : 1 “ ′ ” denotes the transpose of vectors or matrices . ( i ) The map constraint : the values of X are determined by the values of its corresponding noise , i.e. , X = Ex , while the values of the effect depend on cause X and noise Ey ; ( ii ) The independence constraint : the noise terms are independent , i.e , Ex is independent of Ey . How is causality defined with the FCM constraints connected with the optimality of maps in optimal transport ? The optimal transport M∗ with the minimal Lp Wasserstein distance is not necessary to be the causal one given by Eqn . ( 5 ) , because it has no information about the FCM constraints or the true data generation process . In other words , given two sample sets of x0 and xT , the couplings FIX ( pBTi ) given by optimal transport are not necessary to be the ones generated from the ground-truth FCM . 3.2 DYNAMICAL INTERPRETATION OF FCMS : OPTIMAL TRANSPORT UNDER THE FCM CONSTRAINTS . In this section we jointly consider causality and optimality of the maps in the Jacobian problem . It provides both a causal sense of the transformation and a dynamical view of FCMs . We first recap the dynamical formulation of theL2 Wasserstein distance , and then study such dynamical systems under the FCM constraints . Furthermore , we show their properties under the FCM and ANM constraints . Dynamical interpretation of the L2 Wasserstein distance . Benamou and Brenier ( 2000 ) formulate the L2 Monge-Kantorovich problem as a convex space-time minimization problem in a continuum mechanics framework . Fixing a time interval [ 0 , T ] , they introduce the concepts of smooth time-dependent density ρ ( t , xt ) ≥ 0 and velocity fields v ( t , xt ) . When they are clear from context , we denote them by ρ and v. Because we are considering the bivariate case , xt ∈ R2 and v ∈ R2 . Then , they give the dynamical formulation of W 22 : W 22 ( p0 , pT ) = inf ρ , v T ∫ R2 ∫ T 0 ρ ( t , xt ) |v ( t , xt ) |2dxtdt , ( 6 ) s.t . { initial and final conditions : ρ ( 0 , · ) = p0 , ρ ( T , · ) = pT the continuity equation : ∂tρ+∇ · ( ρv ) = 0 . They prove that the solutions of ( 6 ) are pressureless potential flows , of which the fluid particles are FIX ( pBTi ) not subject to any pressure or force and their trajectories are determined given their initial positions and velocities or given their initial and final positions . Suppose that M∗ is the solution given by W 22 . The corresponding flows follow time evolution equation , xt = x0 + t T v ( t , xt ) , where v ( t , xt ) = v ( 0 , x0 ) =M∗ ( x0 ) − x0 and t ∈ [ 0 , T ] . ( 7 ) The time evolution equation shows that xt is just a convex combination of x0 and M∗ ( x0 ) . As an analogy between the optimal transport problem and causal direction determination , the density ρ and the velocity v of moving particles can be considered as the probability density and the velocity of changing values of data points . Moreover , the dynamical interpretation of the L2 Wasserstein distance introduces a time variable and provides a natural time interpolation ρ ( t , xt ) of ρ0 and ρT together with the velocity field v ( t , xt ) under the least action principle . Similarly , we can also have the natural time interpolation p ( t , xt ) between p0 and pT as well as the velocity field v ( t , xt ) under the least action principle , which is the dynamical interpretation of FCMs . Dynamical L2 Wasserstein distance under the FCMs constraints . First , we introduce FCM constraints in the context of the dynamical L2 Wasserstein distance . According to time evolution equation ( 7 ) , we know that the velocity is fully determined by the initial and final values of xt . We first consider FCM constraint ( i ) . For the initial and final values of the cause , the value of its observation X is equal to its noise value Ex in Eqn . ( 5 ) . Consequently , denoting v = [ vx , vy ] ′ , where vx and vy represent the velocities along the Ex/X-axis and Ey/Y -axis respectively as shown in Fi.g 1 , we know that ∀t ∈ [ 0 , T ] , xt ∈ R , vx ( t , xt ) = 0 . As for FCM constraint ( ii ) , it implies that the initial noise of cause and effect , corresponding to Ex and Ey at the time 0 , are independent . Therefore , we have the FCM constraints for the dynamical L2 Wasserstein distance , ( I ) The map constraints : v ( t , xt ) = [ vx ( t , xt ) , vy ( t , yt ) ] ′ , ∀xt , yt ∈ R , t ∈ [ 0 , T ] , vx ( t , xt ) = 0 ; ( II ) The independence constraint : Two random variables ( cause and effect ) at the initial time have the joint probability density function p0 ( x0 ) and they are independent . Second , we characterize the properties of the dynamical optimal transport ( L2 Wasserstein distance ) under constraints ( I ) and ( II ) . According to Eqn . ( 5 ) , the form of M∗ is determined as M∗ ( x0 ) = [ Ex f ( Ex , Ey ) ] ; ( 8 ) otherwise , the FCM constraints will be violated . Moreover , the two-dimensionalW 22 under the FCM constraints can be computed with the one-dimensional W 22 as shown in Prop . 1 ( the derivation is in App . D ) , Proposition 1 . Under constraints ( I ) and ( II ) the square of the L2 Wasserstein distance between p0 and pT is W 22 ( p0 , pT ) = EEx [ W 22 ( p ( Ey ) , p ( Y |Ex ) ) ] . ( 9 ) Furthermore , we consider the constraints of ANMs and characterize the corresponding dynamical systems for now , which can be directly extended to PNLs as mentioned in Sec . 4.2 . Based on constraints ( I ) and ( II ) , we further introduce the ANM constraint , ( III ) the effect is the sum of noise and a nonlinear function of cause as defined in Eqn . ( 3 ) . Theorem 1 ( Zero divergence of the velocity field ) . Under constraints ( I ) and ( II ) , the dynamical systems given by the L2 Wasserstein distance are pressureless flows . Further under ANM constraint ( III ) , they become volume-preserving pressureless flows , of which the divergence of the velocity field , v ( t , xt ) = [ vx ( t , xt ) , vy ( t , yt ) ] ′ , satisfies div v ( t , xt ) = ∂vx ( t , xt ) ∂xt + ∂vy ( t , yt ) ∂yt = 0 , ∀t ∈ [ 0 , T ] , xt , yt ∈ R , where div is the divergence operator in vector calculus . Thm . 1 determines the corresponding dynamical systems of FCMs and ANMs by analyzing their densities and velocity fields ( the details of the proof are in App . D ) , and shows a property of the corresponding dynamical systems of ANMs . Importantly , the property indicates a potential criterion for causal direction determination , that in the causal direction the divergence of the velocity field is zero everywhere , while in the reverse direction it may not always hold . Next , we will verify the criterion rigorously , propose an algorithm based on it , and show the extension for the PNL cases . | The paper tackles the problem of causal discovery in the basic case where a pair of variables is considered. In particular, it is concerned with Functional Causal Models and how to establlish the causal direction for a pair of continuous variables. It motivates the contibution by poiting out thet the performance of availabel algorithms is sensitive to the model assumptions, which makes it difficult for practitioners to use them in real settings. Then, the main contibution is a novel dynamical-system view of Functional Causal Models which aims to identify the causal direction in the case of pairs of variables. The paper exploits connection between functional causal models and optimal transport. Then, the paper studies the problem of optimal transport by taking into account the constraint originating from the considered functional causal model. | SP:10c1db18ba9a4ee43ab04f5d2fab030c6e8aecb3 |
Optimal Transport for Causal Discovery | 1 INTRODUCTION . Determining causal direction between two variables is a fundamental and challenging causal discovery task ( Janzing et al. , 2012 ) . Conventional constraint-based and score-based causal discovery methods identify causal structures only up to Markov equivalent classes ( Spirtes et al. , 2001 ) , in which some causal directions are undetermined . To address this challenge , properly constrained functional causal models ( FCMs ) have been proposed . FCMs represent the effect as a function of its cause and independent noise , and can help identify the causal direction between two variables by imposing substantial structural constraints on model classes , such as additive noise models ( ANMs ) ( Shimizu et al. , 2006 ; Hoyer et al. , 2008 ) and post-nonlinear models ( PNLs ) ( Zhang and Hyvärinen , 2009b ) . While some of the models , such as PNLs , are highly flexible , the constraints are still restrictive and difficult to interpret and relax . Inevitably , the performance of these methods is sensitive to model assumptions and optimization algorithms , especially in real-world applications . To handle the mentioned issues , we consider FCMs from a dynamical-system view . By augmenting a time dimension for the static causal discovery task , we interpret FCMs with dynamical causal processes under the least action principle ( Arnol ’ d , 2013 ) . The new interpretation connects FCMs with a large class of models in dynamical systems . It then provides more freedom to model causal influences , possibilities to derive new causal discovery criteria , and a potential direction to generalize causal models with identifiable causal direction . In particular , we exploit the above idea by leveraging the intrinsic connection between FCMs and optimal transport . Optimal transport is originally introduced by Monge ( 1781 ) , which has been ap- FIX ( GA77 , pBTi ) plied in a large range of applications , not only because it is a natural way to describe moving particles ( Ambrosio et al. , 2012 ) but also because of its recent improvement of the computational methods ( Cuturi , 2013 ; Kolouri et al. , 2019 ) . Recently , it has also been largely applied to generative models for measuring the distance of probability distributions ( Arjovsky et al. , 2017 ; Kolouri et al. , 2018 ; Genevay et al. , 2018 ) . Among different optimal transport definitions , the L2 Wasserstein distance got extensive applications in statistics ( Rachev and Rüschendorf , 1998 ) , functional analysis ( Barthe , 1998 ) , and multiple disciplines of science ( McCann , 1997 ; Otto , 1997 ) . The dynamical formulation of the L2 Wasserstein distance is introduced by Benamou and Brenier ( 2000 ) for relaxing the computational costs . We find that in the context of the dynamical formulation , FCMs can be connected with optimal transport . Furthermore , with the dynamical interpretation of optimal transport , one can naturally understand FCMs from a dynamical-system view , which makes it possible to derive new criteria to identify causal direction . Moreover , it also enables us to develop practical algorithms with optimal transport for static causal discovery tasks in the bivariate case without learning a regression model . Accordingly , our main contributions are : 1 . Dynamical interpretation of FCMs in the bivariate case . We provide dynamical interpretations of optimal transport under the constraints of FCMs . Furthermore , we introduce a time variable , determine the underlying dynamical process under the least action principle ( Arnol ’ d , 2013 ) for the static bivariate causal discovery task , and characterize properties of the corresponding dynamical systems ( Sec . 3.1 and Sec . 3.2 ) . 2 . A criterion of determining causal direction between two variables for ANMs . We study the corresponding dynamical systems of FCMs , and prove that ANMs correspond to volume-preserving pressureless flows . Moreover , based on the divergence of their velocity fields , we propose a criterion to determine causal direction , and show that under the identifiability conditions of ANMs , it is a valid criterion for ANMs , which can be extended to PNLs directly ( Sec . 3.2 ) . 3 . An optimal transport based approach ( DIVOT ) for distinguishing cause from effect between two . variables . DIVOT inherits the advantages of one-dimensional optimal transport . It can be computed efficiently , and does not require independence tests , learning a regression model , or deriving likelihood functions for complicated distributions . Experimental results show that our method is robust to the choice of models , and has a promising performance compared with the state-of-the-art methods on both synthetic and real cause-effect pair datasets ( Sec . 4 and Sec . 6 ) . 2 PRELIMINARIES . 2.1 OPTIMAL TRANSPORT . In this work we mainly use the L2 Wasserstein distance and we introduce its framework following the notations and definitions of ( Benamou and Brenier , 2000 ) in this section . FIX ( pBTi ) The underdetermined Jacobian problem . Suppose that two density functions , ρ0 ( x ) and ρT ( x ) where x ∈ Rd , are non-negative and bounded with total mass one . The transfer of ρ0 ( x ) to ρT ( x ) is realized with a smooth one-to-one map M : Rd → Rd . The Jacobian problem is to find M that satisfies the Jacobian equation : ρ0 ( x0 ) = ρT ( M ( x0 ) ) |det ( ∇M ( x0 ) ) | , xT =M ( x0 ) , ( 1 ) where det ( · ) denotes determinant . This is an underdetermined problem as many maps can be the solutions . Thus , a natural way is to choose the optimal one in the sense of lowest cost depending on applications . A common cost function is the Lp Wasserstein distance ( Kantorovich , 1948 ) . Lp Wasserstein distance and its one-dimensional closed-form solution . The Lp Wasserstein distance between p0 and pT , denoted by Wp ( p0 , pT ) , is defined by Wp ( p0 , pT ) p = infM ∫ |M ( x0 ) − x0|pp0 ( x0 ) dx0 , where p ≥ 1 . We say that the optimal transport M∗ achieving the infimum solves the optimal transport ( or Lp Monge-Kantorovich ) problem . In this work , we mainly use the square of the L2 Wasserstein distance , denoted by W 22 . Moreover , following the approach of Kantorovich ( 1948 ) , the one-dimensional ( 1D ) Lp Wasserstein distance has a closed-form solution , e.g. , the 1D optimal solution of W 22 is M∗ = P−1T ◦ P0 , ( 2 ) where P0 and PT are the cumulative distribution functions for p0 and pT , and “ ◦ ” represents the function composition . In practice , the 1D optimal solution in Eqn . ( 2 ) can be computed with the average square distance between the sorted samples from p0 and pT ( Kolouri et al. , 2019 ) . 2.2 FUNCTIONAL CAUSAL MODELS . A FCM represents the effect Y as a function f ( · ) of the direct cause X and independent noise Ey , where function f describes the causal influence of X on Y , and Ey is the exogenous vari- able/noise . Without any additional assumption on the functional classes , the causal direction is not identifiable ( Hyvärinen and Pajunen , 1999 ; Zhang et al. , 2015a ) . Roughly speaking , this is because given variable pair ( X , Y ) , one can always construct Y = f ( X , Ey ) and another different FCM , X = f̃ ( Y , Ex ) , such that both of them are consistent with the data distribution and have independent “ noise ” ( Hyvärinen and Pajunen , 1999 ; Zhang et al. , 2015a ) . Several works further introduce proper assumptions on the functional form of the FCMs and the distributions of the involved variables , and then identify causal direction in the bivariate case , i.e. , the independence of cause and noise only holds in the causal direction . Examples include the ANM and PNL models : ANM : Y = g ( X ) + Ey ; ( 3 ) PNL : Y = h ( g ( X ) + Ey ) , ( 4 ) where g and h are nonlinear functions and h is invertible . 3 DYNAMICAL INTERPRETATION OF FUNCTIONAL CAUSAL MODELS . We first show the connection between FCMs and optimal transport in Sec . 3.1 . In Sec . 3.2 , we further elaborate the analogy between the optimal transport problem and the causal direction determination problem . We then study the optimal transport under the constraints of FCMs , show the corresponding dynamical systems of FCMs , and characterize the properties of such systems . 3.1 CAUSALITY AND OPTIMALITY OF THE MAPS IN THE JACOBIAN PROBLEM . As introduced in Sec . 2.2 , FCMs are used to approximate the true data generation process . Given the FCM , Y = f ( X , Ey ) , we rewrite it in a Jacobian equation way , xT = [ X Y ] = [ Ex f ( X , Ey ) ] =M ( [ Ex Ey ] ) =M ( x0 ) , ( 5 ) where x0 , xT ∈ R2 , their probability densities p0 , pT ≥ 0 , and M : R2 → R2 . As an analogy to the mass transfer scenario ( Monge , 1781 ) , we consider the samples of independent noise Ex and Ey as the particles of materials in the mass transfer problem and regard the map M in Eqn . ( 5 ) as a special transformation of the independent noise samples . As shown in Fig . 1 , one can consider the data points are transferred from the original positions ( which are unmeasured ) in the plane Ex–Ey at time 0 to the observed positions in the plane X–Y at time T . Such transformation considers the transfer as a causal process which moves the unmeasured independent noise x0 = [ Ex , Ey ] ′ 1 and consequently leads to the observations xT = [ X , Y ] ′ . From the perspective of FCM-based causal FIX ( pBTi ) discovery approaches , causal influences are represented by FCMs which represent the effect as a function of its direct cause and an unmeasured noise satisfying the FCM constraints : 1 “ ′ ” denotes the transpose of vectors or matrices . ( i ) The map constraint : the values of X are determined by the values of its corresponding noise , i.e. , X = Ex , while the values of the effect depend on cause X and noise Ey ; ( ii ) The independence constraint : the noise terms are independent , i.e , Ex is independent of Ey . How is causality defined with the FCM constraints connected with the optimality of maps in optimal transport ? The optimal transport M∗ with the minimal Lp Wasserstein distance is not necessary to be the causal one given by Eqn . ( 5 ) , because it has no information about the FCM constraints or the true data generation process . In other words , given two sample sets of x0 and xT , the couplings FIX ( pBTi ) given by optimal transport are not necessary to be the ones generated from the ground-truth FCM . 3.2 DYNAMICAL INTERPRETATION OF FCMS : OPTIMAL TRANSPORT UNDER THE FCM CONSTRAINTS . In this section we jointly consider causality and optimality of the maps in the Jacobian problem . It provides both a causal sense of the transformation and a dynamical view of FCMs . We first recap the dynamical formulation of theL2 Wasserstein distance , and then study such dynamical systems under the FCM constraints . Furthermore , we show their properties under the FCM and ANM constraints . Dynamical interpretation of the L2 Wasserstein distance . Benamou and Brenier ( 2000 ) formulate the L2 Monge-Kantorovich problem as a convex space-time minimization problem in a continuum mechanics framework . Fixing a time interval [ 0 , T ] , they introduce the concepts of smooth time-dependent density ρ ( t , xt ) ≥ 0 and velocity fields v ( t , xt ) . When they are clear from context , we denote them by ρ and v. Because we are considering the bivariate case , xt ∈ R2 and v ∈ R2 . Then , they give the dynamical formulation of W 22 : W 22 ( p0 , pT ) = inf ρ , v T ∫ R2 ∫ T 0 ρ ( t , xt ) |v ( t , xt ) |2dxtdt , ( 6 ) s.t . { initial and final conditions : ρ ( 0 , · ) = p0 , ρ ( T , · ) = pT the continuity equation : ∂tρ+∇ · ( ρv ) = 0 . They prove that the solutions of ( 6 ) are pressureless potential flows , of which the fluid particles are FIX ( pBTi ) not subject to any pressure or force and their trajectories are determined given their initial positions and velocities or given their initial and final positions . Suppose that M∗ is the solution given by W 22 . The corresponding flows follow time evolution equation , xt = x0 + t T v ( t , xt ) , where v ( t , xt ) = v ( 0 , x0 ) =M∗ ( x0 ) − x0 and t ∈ [ 0 , T ] . ( 7 ) The time evolution equation shows that xt is just a convex combination of x0 and M∗ ( x0 ) . As an analogy between the optimal transport problem and causal direction determination , the density ρ and the velocity v of moving particles can be considered as the probability density and the velocity of changing values of data points . Moreover , the dynamical interpretation of the L2 Wasserstein distance introduces a time variable and provides a natural time interpolation ρ ( t , xt ) of ρ0 and ρT together with the velocity field v ( t , xt ) under the least action principle . Similarly , we can also have the natural time interpolation p ( t , xt ) between p0 and pT as well as the velocity field v ( t , xt ) under the least action principle , which is the dynamical interpretation of FCMs . Dynamical L2 Wasserstein distance under the FCMs constraints . First , we introduce FCM constraints in the context of the dynamical L2 Wasserstein distance . According to time evolution equation ( 7 ) , we know that the velocity is fully determined by the initial and final values of xt . We first consider FCM constraint ( i ) . For the initial and final values of the cause , the value of its observation X is equal to its noise value Ex in Eqn . ( 5 ) . Consequently , denoting v = [ vx , vy ] ′ , where vx and vy represent the velocities along the Ex/X-axis and Ey/Y -axis respectively as shown in Fi.g 1 , we know that ∀t ∈ [ 0 , T ] , xt ∈ R , vx ( t , xt ) = 0 . As for FCM constraint ( ii ) , it implies that the initial noise of cause and effect , corresponding to Ex and Ey at the time 0 , are independent . Therefore , we have the FCM constraints for the dynamical L2 Wasserstein distance , ( I ) The map constraints : v ( t , xt ) = [ vx ( t , xt ) , vy ( t , yt ) ] ′ , ∀xt , yt ∈ R , t ∈ [ 0 , T ] , vx ( t , xt ) = 0 ; ( II ) The independence constraint : Two random variables ( cause and effect ) at the initial time have the joint probability density function p0 ( x0 ) and they are independent . Second , we characterize the properties of the dynamical optimal transport ( L2 Wasserstein distance ) under constraints ( I ) and ( II ) . According to Eqn . ( 5 ) , the form of M∗ is determined as M∗ ( x0 ) = [ Ex f ( Ex , Ey ) ] ; ( 8 ) otherwise , the FCM constraints will be violated . Moreover , the two-dimensionalW 22 under the FCM constraints can be computed with the one-dimensional W 22 as shown in Prop . 1 ( the derivation is in App . D ) , Proposition 1 . Under constraints ( I ) and ( II ) the square of the L2 Wasserstein distance between p0 and pT is W 22 ( p0 , pT ) = EEx [ W 22 ( p ( Ey ) , p ( Y |Ex ) ) ] . ( 9 ) Furthermore , we consider the constraints of ANMs and characterize the corresponding dynamical systems for now , which can be directly extended to PNLs as mentioned in Sec . 4.2 . Based on constraints ( I ) and ( II ) , we further introduce the ANM constraint , ( III ) the effect is the sum of noise and a nonlinear function of cause as defined in Eqn . ( 3 ) . Theorem 1 ( Zero divergence of the velocity field ) . Under constraints ( I ) and ( II ) , the dynamical systems given by the L2 Wasserstein distance are pressureless flows . Further under ANM constraint ( III ) , they become volume-preserving pressureless flows , of which the divergence of the velocity field , v ( t , xt ) = [ vx ( t , xt ) , vy ( t , yt ) ] ′ , satisfies div v ( t , xt ) = ∂vx ( t , xt ) ∂xt + ∂vy ( t , yt ) ∂yt = 0 , ∀t ∈ [ 0 , T ] , xt , yt ∈ R , where div is the divergence operator in vector calculus . Thm . 1 determines the corresponding dynamical systems of FCMs and ANMs by analyzing their densities and velocity fields ( the details of the proof are in App . D ) , and shows a property of the corresponding dynamical systems of ANMs . Importantly , the property indicates a potential criterion for causal direction determination , that in the causal direction the divergence of the velocity field is zero everywhere , while in the reverse direction it may not always hold . Next , we will verify the criterion rigorously , propose an algorithm based on it , and show the extension for the PNL cases . | The authors frame the bivariate causal discovery problem in terms of the analysis of a dynamical-system. They use results from the field of optimal transport to interpret additive noise models from this framework. They also develop a novel criterion and a causal discovery algorithm based thereupon, and compare their results with previous methods used in bivariate causal discovery. | SP:10c1db18ba9a4ee43ab04f5d2fab030c6e8aecb3 |
Hidden Parameter Recurrent State Space Models For Changing Dynamics Scenarios | 1 INTRODUCTION . System identification , i.e. , learning models of dynamical systems from observed data ( Ljung ( 1998 ) ; Gevers ( 2005 ) ) , is a key ingredient of model-predictive control ( Camacho & Alba ( 2013 ) ) and model-based reinforcement learning ( RL ) . State space models ( Hamilton ( 1994 ) ; Jordan ( 2004 ) ; Schön et al . ( 2011 ) ) ( SSMs ) provide a principled framework for modelling dynamics . Recently there have been several works that fused SSMs with deep ( recurrent ) neural networks achieving superior results in time series modelling ( Haarnoja et al. , 2016 ; Karl et al. , 2016 ) and system identification tasks ( Becker et al. , 2019 ; Hafner et al. , 2019 ; Shaj et al. , 2020 ) . Learning the dynamics in an encoded latent space allows us to work with high dimensional observations like images and was proven to be successful for planning from high dimensional sensory inputs . However , most of these tasks assume a fixed , unchanging dynamics , which is quite restrictive in real-world scenarios . Several control applications involve situations where an agent must learn to solve tasks with similar , but not identical , dynamics . A robot playing table tennis may encounter several bats with different weights or lengths , while an agent manipulating a bottle may face bottles with varying amounts of liquid . Humanoids learning to walk may face different terrains with varying slopes or friction coefficients . Any real-world dynamical system might change over time due to multiple reasons , some of which might not be directly observable or understood . For example , in soft robotics small variations in temperature or changes in friction coefficients of the cable drives of a robot can significantly change the dynamics . Similarly , a robot may undergo wear and tear over time which can change its dynamics . Thus , assuming a global model that is accurate throughout the entire state space or duration of use is a limiting factor for using such models in real-world applications . We found that existing literature on recurrent models fails to model the dynamics accurately in these situations . Thus , we introduce hidden parameter state-space models ( HiP-SSM ) , which allow capturing the variation in the dynamics of different instances through a set of hidden task parameters . We formalize the HiP-SSM and show how to perform inference in this graphical model . Under Gaussian assumptions , we obtain a probabilistically principled yet scalable approach . We name the resulting probabilistic recurrent neural network as Hidden Parameter Recurrent State Space Model ( HiP-RSSM ) . HiP-RSSM achieves state-of-the-art performance for several systems whose dynamics change over time . Interestingly , we also observe that HiP-RSSM often exceeds traditional RSSMs in performance for dynamical systems previously assumed to have unchanging global dynamics due to the identification of unobserved causal effects in the dynamics . 2 PRELIMINARIES . In this section , we introduce the fundamental concepts that underlie the design of our proposed model and inference procedure . 2.1 GAUSSIAN STATE SPACE MODELS . State space models are Bayesian probabilistic graphical models ( Koller & Friedman , 2009 ; Jordan , 2004 ) that are popular for learning patterns and predicting behavior in sequential data and dynamical systems . Let f ( · ) be any arbitrary dynamic model , and let h ( · ) be any arbitrary observation model . Then , the dynamic systems of a Gaussian state space model can be represented using the following equations zt = f ( zt−1 , at ) + ut , ut ∼ N ( 0 , Q ) ( 1 ) ot = h ( zt ) + vt , vt ∼ N ( 0 , R ) . ( 2 ) Here zt , at and ot are the latent states , control inputs/actions and observations at time t. The vectors ut ∼ N ( 0 , Q ) and vt ∼ N ( 0 , R ) denote zero-mean Gaussian noise . Further , based on the assumptions made for f ( · ) and h ( · ) , we can have different variants of Gaussian state space models ( Ribeiro , 2004 ; Wan & Van Der Merwe , 2000 ) . In the linear case , inference can be performed efficiently using Kalman Filters . 2.2 BAYESIAN CONTEXT AGGREGATION . Inferring a latent task variable l ∈ L using observed context data Cl = { xln } Nn=1 has been explored previously by different neural process architectures ( Gordon et al. , 2018 ; Garnelo et al. , 2018 ) . Neural processes are a meta-learning technique that rely on deep set functions ( Zaheer et al. , 2017 ) which output a latent representation out of varying number of context points in a permutation invariant manner . Volpp et al . ( 2020 ) formulated context data aggregation as a Bayesian inference problem , where the information contained in Cl is directly aggregated into the statistical description of l based on a factorized Gaussian observation model of the form p ( rln|l ) , where p ( rln|l ) = N ( rln|l , diag ( ( σln ) 2 ) ) , rln = encr ( xln ) , ( σln ) 2 = encσ ( xln ) . ( 3 ) Here n is the index of an element from context set Cl . Given a prior p0 ( l ) = N ( l|µ0 , diag ( σ20 ) ) we can compute the posterior p ( l|Cl ) using Bayes rule . The Gaussian assumption allows us to get a closed form solution for the posterior estimate of the latent task variable , p ( l|Cl ) based on Gaussian conditioning . The factorization assumption further simplifies this update rule by avoiding computationally expensive matrix inversions into a simpler update rule as σ2l = ( ( σ20 ) ⊖ + N∑ n=1 ( ( σln ) 2 ) ⊖ ) ⊖ , µl = µ0 + σ 2 l ⊙ N∑ n=1 ( rln − µ0 ) 2 ⊘ ( σln ) 2 , ( 4 ) where ⊖ , ⊙ and ⊘ denote element-wise inversion , product , and division , respectively . Intuitively the mean of the latent task variable µl is a weighted sum of the individual latent observations rln , while the variance of the latent task variable σ2l gives the uncertainty of this task representation . 3 HIDDEN PARAMETER RECURRENT STATE SPACE MODELS . Our goal is to learn a state space model that can model the dynamics of partially observable robotic systems under scenarios where the dynamics changes overtime . Often , the dynamics of real systems may differ in significant ways from the system our models were trained on . However , it is unreasonable to train a model across all possible conditions an agent may encounter . Instead , we propose a state space model that learns to account for the causal factors of variation observed across tasks at training time , and then infer at test time the model that best describe the system . Thus , we introduce a new formulation namely Hidden Parameter State Space Models ( HiP-SSMs ) , a framework for modeling families of SSMs with different but related dynamics using low-dimensional latent task embeddings . In this section , we formally define the HiP-SSM family in Section 3.1 , propose a probabilistically principled inference scheme for HiP-SSMs based on the forward algorithm ( Jordan , 2004 ) in Section 3.2 , and finally provide training scheme for the setting in Section 3.3 . 3.1 HIDDEN PARAMETER STATE SPACE MODELS ( HIP-SSMS ) We denote a set of SSMs with transition dynamics fl that are fully described by hidden parameters l and observation model h as a Hidden Parameter SSM ( HiP-SSM ) . In this definition we assume the observation model h to be independent of the hidden parameter l as we only focus on cases where the dynamics changes . HiP-SSMs allows us to extend SSMs to multi-task settings where dynamics can vary across tasks . Defining the changes in dynamics by a latent variable unifies dynamics across tasks as a single global function . In dynamical systems , for example , parameters can be physical quantities like gravity , friction of a surface , or the strength of a robot actuator . Their effects influence the dynamics but not directly observed ; and hence l is not part of the observation space and is treated as latent task parameter vector . Formally , a HiP-SSM is defined by a tuple { Z , A , W , L , f , h } , where Z , A and W are the sets of hidden states z , actions a , and observations w respectively . L is the set of all possible latent task parameters and let p0 ( l ) be the prior over these parameters . Thus , a HiP-RSSM describes a class of dynamics and a particular instance of that class is obtained by fixing the parameter vector l ∈ L. The dynamics f for each instance depend on the value of the hidden parameters l. Each instance of a HiP-SSM is an SSM conditioned on l. We also make the additional assumption that the parameter vector l is fixed for the duration of the task , and thus the latent task parameter has no dynamics . This assumption considerably simplifies the procedure for inferring the hidden parametrization and is reasonable since dynamics can be assumed to be locally-consistent over small trajectories in most applications ( Nagabandi et al. , 2018a ) . The definition is inspired from related literature on HiP-MDPs ( Doshi-Velez & Konidaris , 2016 ) , where the only unobserved variable is the latent task variable . One can connect HiP-SSMs with HiP-MDPs by including rewards to the definition and formalize HiP-POMDPs . However this is left for future work . 3.2 LEARNING AND INFERENCE . We perform inference and learning in the HiP-SSM borrowing concepts from both deep learning and graphical model communities following recent works on recurrent neural network models ( Haarnoja et al. , 2016 ; Becker et al. , 2019 ) , where the architecture of the network is informed by the structure of the probabilistic state estimator . Aside from the simplicity of the training procedure , one of the key advantages of this approach is the ability to incorporate arbitrary nonlinear components into the observation and transition functions . We denote the resulting probabilistic recurrent neural network architecture as Hidden Parameter Recurrent State Space Model ( HiP-RSSM ) . The structure of the Bayesian network shown in Figure 1 allows tractable inference of latent variables by the forward algorithm ( Jordan , 2004 ; Koller & Friedman , 2009 ) . Since we are dealing with continuous dynamical systems , we assume a Gaussian multivariate distribution over all variables ( both observed and hidden ) for the graph shown in Figure 1 . This assumption has several advantages . Firstly , it makes the inference very similar to the well studied Kalman Filtering approaches . Secondly , the Gaussian assumptions and conditional in-dependencies allows us to have a closed form solution to each of these update procedures which are fully differentiable and can be backpropagated to the deep encoders . The belief update over the hidden variables zt and l happens in three stages . Similar to Kalman filtering approaches , we have two recursive belief state update stages , the time update and observation update which calculate the prior and posterior belief over the latent states respectively . However , we have an additional hierarchical latent variable l which models the ( unobserved ) causal factors of variation in dynamics in order to achieve efficient gener- alization . Hence , we have a third belief update stage to calculate the posterior over the latent task variable based on the observed context set . Each of these three stages are detailed in the sections below : | The paper proposes a method to learn a probabilistic recurrent state-space model for time-varying dynamics. The proposed method combines the Kalman filtering-based update rule with deep network-based encoder and decoder model. Effectively, the method can be used to replace RNN cells in a recurrent model, and is shown to outperform baseline models in modeling various robotic tasks. | SP:67a5ff36ee4df5da8185f078c826943f5c101898 |
Hidden Parameter Recurrent State Space Models For Changing Dynamics Scenarios | 1 INTRODUCTION . System identification , i.e. , learning models of dynamical systems from observed data ( Ljung ( 1998 ) ; Gevers ( 2005 ) ) , is a key ingredient of model-predictive control ( Camacho & Alba ( 2013 ) ) and model-based reinforcement learning ( RL ) . State space models ( Hamilton ( 1994 ) ; Jordan ( 2004 ) ; Schön et al . ( 2011 ) ) ( SSMs ) provide a principled framework for modelling dynamics . Recently there have been several works that fused SSMs with deep ( recurrent ) neural networks achieving superior results in time series modelling ( Haarnoja et al. , 2016 ; Karl et al. , 2016 ) and system identification tasks ( Becker et al. , 2019 ; Hafner et al. , 2019 ; Shaj et al. , 2020 ) . Learning the dynamics in an encoded latent space allows us to work with high dimensional observations like images and was proven to be successful for planning from high dimensional sensory inputs . However , most of these tasks assume a fixed , unchanging dynamics , which is quite restrictive in real-world scenarios . Several control applications involve situations where an agent must learn to solve tasks with similar , but not identical , dynamics . A robot playing table tennis may encounter several bats with different weights or lengths , while an agent manipulating a bottle may face bottles with varying amounts of liquid . Humanoids learning to walk may face different terrains with varying slopes or friction coefficients . Any real-world dynamical system might change over time due to multiple reasons , some of which might not be directly observable or understood . For example , in soft robotics small variations in temperature or changes in friction coefficients of the cable drives of a robot can significantly change the dynamics . Similarly , a robot may undergo wear and tear over time which can change its dynamics . Thus , assuming a global model that is accurate throughout the entire state space or duration of use is a limiting factor for using such models in real-world applications . We found that existing literature on recurrent models fails to model the dynamics accurately in these situations . Thus , we introduce hidden parameter state-space models ( HiP-SSM ) , which allow capturing the variation in the dynamics of different instances through a set of hidden task parameters . We formalize the HiP-SSM and show how to perform inference in this graphical model . Under Gaussian assumptions , we obtain a probabilistically principled yet scalable approach . We name the resulting probabilistic recurrent neural network as Hidden Parameter Recurrent State Space Model ( HiP-RSSM ) . HiP-RSSM achieves state-of-the-art performance for several systems whose dynamics change over time . Interestingly , we also observe that HiP-RSSM often exceeds traditional RSSMs in performance for dynamical systems previously assumed to have unchanging global dynamics due to the identification of unobserved causal effects in the dynamics . 2 PRELIMINARIES . In this section , we introduce the fundamental concepts that underlie the design of our proposed model and inference procedure . 2.1 GAUSSIAN STATE SPACE MODELS . State space models are Bayesian probabilistic graphical models ( Koller & Friedman , 2009 ; Jordan , 2004 ) that are popular for learning patterns and predicting behavior in sequential data and dynamical systems . Let f ( · ) be any arbitrary dynamic model , and let h ( · ) be any arbitrary observation model . Then , the dynamic systems of a Gaussian state space model can be represented using the following equations zt = f ( zt−1 , at ) + ut , ut ∼ N ( 0 , Q ) ( 1 ) ot = h ( zt ) + vt , vt ∼ N ( 0 , R ) . ( 2 ) Here zt , at and ot are the latent states , control inputs/actions and observations at time t. The vectors ut ∼ N ( 0 , Q ) and vt ∼ N ( 0 , R ) denote zero-mean Gaussian noise . Further , based on the assumptions made for f ( · ) and h ( · ) , we can have different variants of Gaussian state space models ( Ribeiro , 2004 ; Wan & Van Der Merwe , 2000 ) . In the linear case , inference can be performed efficiently using Kalman Filters . 2.2 BAYESIAN CONTEXT AGGREGATION . Inferring a latent task variable l ∈ L using observed context data Cl = { xln } Nn=1 has been explored previously by different neural process architectures ( Gordon et al. , 2018 ; Garnelo et al. , 2018 ) . Neural processes are a meta-learning technique that rely on deep set functions ( Zaheer et al. , 2017 ) which output a latent representation out of varying number of context points in a permutation invariant manner . Volpp et al . ( 2020 ) formulated context data aggregation as a Bayesian inference problem , where the information contained in Cl is directly aggregated into the statistical description of l based on a factorized Gaussian observation model of the form p ( rln|l ) , where p ( rln|l ) = N ( rln|l , diag ( ( σln ) 2 ) ) , rln = encr ( xln ) , ( σln ) 2 = encσ ( xln ) . ( 3 ) Here n is the index of an element from context set Cl . Given a prior p0 ( l ) = N ( l|µ0 , diag ( σ20 ) ) we can compute the posterior p ( l|Cl ) using Bayes rule . The Gaussian assumption allows us to get a closed form solution for the posterior estimate of the latent task variable , p ( l|Cl ) based on Gaussian conditioning . The factorization assumption further simplifies this update rule by avoiding computationally expensive matrix inversions into a simpler update rule as σ2l = ( ( σ20 ) ⊖ + N∑ n=1 ( ( σln ) 2 ) ⊖ ) ⊖ , µl = µ0 + σ 2 l ⊙ N∑ n=1 ( rln − µ0 ) 2 ⊘ ( σln ) 2 , ( 4 ) where ⊖ , ⊙ and ⊘ denote element-wise inversion , product , and division , respectively . Intuitively the mean of the latent task variable µl is a weighted sum of the individual latent observations rln , while the variance of the latent task variable σ2l gives the uncertainty of this task representation . 3 HIDDEN PARAMETER RECURRENT STATE SPACE MODELS . Our goal is to learn a state space model that can model the dynamics of partially observable robotic systems under scenarios where the dynamics changes overtime . Often , the dynamics of real systems may differ in significant ways from the system our models were trained on . However , it is unreasonable to train a model across all possible conditions an agent may encounter . Instead , we propose a state space model that learns to account for the causal factors of variation observed across tasks at training time , and then infer at test time the model that best describe the system . Thus , we introduce a new formulation namely Hidden Parameter State Space Models ( HiP-SSMs ) , a framework for modeling families of SSMs with different but related dynamics using low-dimensional latent task embeddings . In this section , we formally define the HiP-SSM family in Section 3.1 , propose a probabilistically principled inference scheme for HiP-SSMs based on the forward algorithm ( Jordan , 2004 ) in Section 3.2 , and finally provide training scheme for the setting in Section 3.3 . 3.1 HIDDEN PARAMETER STATE SPACE MODELS ( HIP-SSMS ) We denote a set of SSMs with transition dynamics fl that are fully described by hidden parameters l and observation model h as a Hidden Parameter SSM ( HiP-SSM ) . In this definition we assume the observation model h to be independent of the hidden parameter l as we only focus on cases where the dynamics changes . HiP-SSMs allows us to extend SSMs to multi-task settings where dynamics can vary across tasks . Defining the changes in dynamics by a latent variable unifies dynamics across tasks as a single global function . In dynamical systems , for example , parameters can be physical quantities like gravity , friction of a surface , or the strength of a robot actuator . Their effects influence the dynamics but not directly observed ; and hence l is not part of the observation space and is treated as latent task parameter vector . Formally , a HiP-SSM is defined by a tuple { Z , A , W , L , f , h } , where Z , A and W are the sets of hidden states z , actions a , and observations w respectively . L is the set of all possible latent task parameters and let p0 ( l ) be the prior over these parameters . Thus , a HiP-RSSM describes a class of dynamics and a particular instance of that class is obtained by fixing the parameter vector l ∈ L. The dynamics f for each instance depend on the value of the hidden parameters l. Each instance of a HiP-SSM is an SSM conditioned on l. We also make the additional assumption that the parameter vector l is fixed for the duration of the task , and thus the latent task parameter has no dynamics . This assumption considerably simplifies the procedure for inferring the hidden parametrization and is reasonable since dynamics can be assumed to be locally-consistent over small trajectories in most applications ( Nagabandi et al. , 2018a ) . The definition is inspired from related literature on HiP-MDPs ( Doshi-Velez & Konidaris , 2016 ) , where the only unobserved variable is the latent task variable . One can connect HiP-SSMs with HiP-MDPs by including rewards to the definition and formalize HiP-POMDPs . However this is left for future work . 3.2 LEARNING AND INFERENCE . We perform inference and learning in the HiP-SSM borrowing concepts from both deep learning and graphical model communities following recent works on recurrent neural network models ( Haarnoja et al. , 2016 ; Becker et al. , 2019 ) , where the architecture of the network is informed by the structure of the probabilistic state estimator . Aside from the simplicity of the training procedure , one of the key advantages of this approach is the ability to incorporate arbitrary nonlinear components into the observation and transition functions . We denote the resulting probabilistic recurrent neural network architecture as Hidden Parameter Recurrent State Space Model ( HiP-RSSM ) . The structure of the Bayesian network shown in Figure 1 allows tractable inference of latent variables by the forward algorithm ( Jordan , 2004 ; Koller & Friedman , 2009 ) . Since we are dealing with continuous dynamical systems , we assume a Gaussian multivariate distribution over all variables ( both observed and hidden ) for the graph shown in Figure 1 . This assumption has several advantages . Firstly , it makes the inference very similar to the well studied Kalman Filtering approaches . Secondly , the Gaussian assumptions and conditional in-dependencies allows us to have a closed form solution to each of these update procedures which are fully differentiable and can be backpropagated to the deep encoders . The belief update over the hidden variables zt and l happens in three stages . Similar to Kalman filtering approaches , we have two recursive belief state update stages , the time update and observation update which calculate the prior and posterior belief over the latent states respectively . However , we have an additional hierarchical latent variable l which models the ( unobserved ) causal factors of variation in dynamics in order to achieve efficient gener- alization . Hence , we have a third belief update stage to calculate the posterior over the latent task variable based on the observed context set . Each of these three stages are detailed in the sections below : | This work proposes to extend latent state-space models (SSMs) with a latent variable that changes the dynamics. Update equations akin to Kalman filtering are provided, along with a training loss and method. Experiments on several robotics tasks appear to indicate that the method performs well relative to alternative methods that do not consider latent dynamics differences (up to the points below). | SP:67a5ff36ee4df5da8185f078c826943f5c101898 |
Self-Organized Polynomial-time Coordination Graphs | 1 INTRODUCTION . Cooperative multi-agent reinforcement learning ( MARL ) is a promising approach to a variety of real-world applications , such as sensor networks ( Zhang & Lesser , 2011 ; Ye et al. , 2015 ) , traffic light control ( Van der Pol & Oliehoek , 2016 ) , and multi-robot formation ( Alonso-Mora et al. , 2017 ) . One of the long-lasting challenges of cooperative MARL is how to organize coordination for a large multi-agent system . Coordination graph ( Guestrin et al. , 2001 ) is a classical approach to represent coordination relations in the reinforcement learning framework . It decomposes a multi-agent system into a suite of overlapping factors . Each factor is a hyper-edge covering a subset of agents that may involve coordinated behaviors . More specifically , the joint value function of the multi-agent system is factorized to the summation of local value functions based on factors or edges . Such a graph structure is a particular type of inductive bias that encodes task-specific coordination dependencies . It is known that conducting appropriate inductive bias can both reduce the model complexity and improve the generalizability ( Battaglia et al. , 2018 ) . One fundamental problem for coordination graphs is the trade-off between the representational capacity of value functions and the computational complexity of policy execution . To obtain value functions with high expressiveness , an advanced approach , deep coordination graphs ( DCG ) ( Böhmer et al. , 2020 ) , considers a static complete graph connecting all pairs of agents . This graph structure has high representational capacity in terms of function expressiveness but raises a challenge for computation in the execution phase . The greedy action selection over a coordination graph can be formalized to a decentralized constraint optimization problem ( DCOP ) , finding the maximum-value joint actions ( Guestrin et al. , 2001 ; Zhang & Lesser , 2013 ; Böhmer et al. , 2020 ) . Note that the DCOP and its any constant-ratio approximation are NP-hard problems , especially for the complete graph used in DCG ( Dagum & Luby , 1993 ; Park & Darwiche , 2004 ) . From the perspective of theoretical computer science , any scalable heuristic algorithm ( e.g. , max-sum algorithm ( Pearl , 1988 ) ) for DCOP problem may have an unpredictable gap with the optimal solution . To visualize this phenomenon , we conduct a motivating example for generating a suite of complete-graph DCOPs with random edge-values . More detailed experiment setting are deferred to to Appendix A . We investigate the accuracy and the relative joint Q error of the max-sum algorithm in computing optimal joint actions , which is the default implementation of MARL methods based on coordination graphs ( Stranders et al. , 2009 ; Zhang & Lesser , 2013 ; Böhmer et al. , 2020 ) . The results are shown in Figure 1 . As the number of agents increases , the accuracy of greedy action selection consistently decreases , and the relative joint Q error between the selected and optimal joint actions increases accordingly . How to incorporating polynomial-time complexity guarantee into coordination graphs with sufficient function expressiveness remains an open problem in MARL . In this paper , we aim to overcome a dilemma in coordination graphs , i.e. , expressive graph structures lead to computationally intractable DCOPs but concise graph structures are in lack of function expressiveness . To tackle this problem , we propose a novel graph-based MARL method for multiagent coordination , named Self-Organized Polynomial-time Coordination Graphs ( SOP-CG ) , that ( 1 ) utilizes structured graph topologies with polynomial-time guarantees for DCOPs and ( 2 ) extends their representation expressiveness through a dynamic graph organization mechanism . These two characteristics open up a new family of MARL algorithms . More specifically , we first construct graph classes guaranteeing polynomial-time DCOPs and then conduct a state-dependent graph selection mechanism . Such a dynamic factorization structure can be self-organized . We introduce an imaginary coordinator agent , whose action is to select a graph topology in a given class at each time step . SOP-CG incorporates this imaginary agent into the Bellman optimality equation supporting end-to-end learning . Figure 2 illustrates the basic idea of SOP-CG . We integrate the search of graph structures into the MARL paradigm . The utilities of different graph topologies are learned along with the RL objective . As the graph utilities are updated through agent-environment interactions , the coordination graph will evolve to the topology characterizing the coordination dependencies . We evaluate the performance of SOP-CG in both grid-world and simulated physical environments . Empirical results on challenging tasks demonstrate that SOP-CG outperforms state-of-the-art baselines . By extensive ablation studies , we verify that harnessing specific structures with optimality guarantee of the induced DCOPs improves the sample quality and the accuracy of the one-step TD target . Furthermore , we show that SOP-CG can learn interpretable and context-dependent coordination graphs , which induces effective and dynamic coordination among agents . 2 RELATED WORK . Multi-agent reinforcement learning ( OroojlooyJadid & Hajinezhad , 2019 ) is challenged by the size of joint action space , which grows exponentially with the number of agents . Independent Q-learning ( Tan , 1993 ; Foerster et al. , 2017 ) models agents as independent learners , which makes the environment non-stationary in the perspective of each agent . An alternative paradigm called centralized training and decentralized execution ( CTDE ; Kraemer & Banerjee , 2016 ) is widely used in both policy-based and value-based methods . Policy-based multi-agent reinforcement learning methods use a centralized critic to compute gradient for the local actors ( Lowe et al. , 2017 ; Foerster et al. , 2018 ; Wen et al. , 2019 ; Wang et al. , 2020d ) . Value-based methods usually decompose the joint value function into individual value functions under the IGM ( individual-global-max ) principle , which guarantees the consistency between local action selection and joint action optimization ( Sunehag et al. , 2018 ; Rashid et al. , 2020b ; Son et al. , 2019 ; Wang et al. , 2021a ; Rashid et al. , 2020a ) . Other work also studies this problem from the perspective of agent roles and individuality ( Wang et al. , 2020a ; b ; Jiang & Lu , 2021 ) or communication learning ( Singh et al. , 2018 ; Das et al. , 2019 ; Wang et al. , 2020c ) . Compared to these methods , our work is built upon graph-based value decomposition , which explicitly models the interaction among agents . Coordination graphs are classical technique for planning in multi-agent systems ( Guestrin et al. , 2001 ; 2002b ) . They are combined with multi-agent deep reinforcement learning by recent work ( Castellini et al. , 2019 ; Böhmer et al. , 2020 ; Li et al. , 2020 ; Wang et al. , 2021b ) . Joint action selection on coordination graphs can be modeled as a decentralized constraint optimization problem ( DCOP ) , and previous methods compute approximate solutions by message passing among agents ( Pearl , 1988 ) . As the work which is most closed to our method , Zhang & Lesser ( 2013 ) presents an algorithm based on coordination graph searching . They define a measurement to quantify the potential loss of the lack of coordination between agents and search for a coordination structure to minimize the communication cost within restricted loss of utilities . However , their induced DCOPs still remain NP-hard . In contrast , minimizing communication is not our core motivation , and we aim to use a structured graph class to maintain sufficient function expressiveness when bypassing the computational hardness of large-scale DCOPs ( Dagum & Luby , 1993 ; Park & Darwiche , 2004 ) . 3 BACKGROUND . In this paper , we consider about fully cooperative multi-agent tasks that can be modelled as a DecPOMDP ( Oliehoek et al. , 2016 ) defined asM = ⟨D , S , { Ai } ni=1 , T , { Oi } ni=1 , { σi } ni=1 , R , h , b0 , γ⟩ , where D = { 1 , . . . , n } is the set of n agents , S is a set of states , h is the horizon of the environment , γ ∈ [ 0 , 1 ) is the discount factor , and b0 ∈ ∆ ( S ) denotes the initial state distribution . At each stage t , each agent i takes an action ai ∈ Ai and forms the joint action a = ( a1 . . . , an ) , which leads to a next state s′ according to the transition function T ( s′|s , a ) and an immediate reward R ( s , a ) shared by all agents . Each agent i observes the state only partially by drawing observations oi ∈ Oi , according to σi . The joint history of agent i ’ s observations oi , t and actions ai , t is denoted as τi , t = ( oi,0 , ai,0 , . . . , oi , t−1 , ai , t−1 , oi , t ) ∈ ( Oi ×Ai ) t ×Oi . Deep Q-Learning . Q-learning algorithms is a well-known algorithm to find the optimal joint action-value function Q∗ ( s , a ) = r ( s , a ) +γEs′ [ maxa′ Q∗ ( s′ , a′ ) ] . Deep Q-learning approximates the action-value function with a deep neural network with parameters θ . In Multi-agent Q-learning algorithms ( Sunehag et al. , 2018 ; Rashid et al. , 2020b ; Son et al. , 2019 ; Wang et al. , 2021a ) , a replay memory D is used to store the transition tuple ( τ , a , r , τ ′ ) , where r is the immediate reward when taking action a at joint action-observation history τ with a transition to τ ′ . Q ( τ , a ; θ ) is used in place of Q ( s , a ; θ ) , because of partial observability . Hence , parameters θ are learnt by minimizing the following expect TD error : L ( θ ) = E ( τ , a , r , τ ′ ) ∈D [ ( r + γV ( τ ′ ; θ− ) −Q ( τ , a ; θ ) ) 2 ] ( 1 ) where V ( τ ′ ; θ− ) = maxa′ Q ( τ ′ , a′ ; θ− ) is the one-step expected future return of the TD target and θ− are the parameters of the target network , which will be periodically updated with θ . Coordination graphs . An undirect coordination graph ( CG , Guestrin et al . ( 2001 ) ) G = ⟨V , E⟩ contains vertex vi ∈ V for each agent 1 ≤ i ≤ n and a set of ( hyper- ) edges in E ⊆ 2V which represents coordination dependencies among agents . Prior work considers higher order coordination where the edges depend on actions of several agents ( Guestrin et al. , 2002a ; Kok & Vlassis , 2006 ; Guestrin et al. , 2002b ) . Such a coordination graph induces a factorization of global Q function : Qtot ( s , a ) = ∑ vi∈V f i ( ai|s ) + ∑ e= { e1 , ... , e|e| } ∈E fe ( ae1 , . . . , ae|e| |s ) ( 2 ) , where f i represents the individual utility of agent i and fe specifies the payoff contribution for the actions of the agents connected by the ( hyper- ) edge e , so that the global optimal solution can be found through maximizing this joint value . The special case that E is an empty set yields VDN , but each additional edge enables the value representation of the joint actions of a pair of agents and can thus help to avoid relative-overgeneralization ( Böhmer et al. , 2020 ) . In many coordination graph learning works ( Zhang & Lesser , 2013 ; Böhmer et al. , 2020 ; Wang et al. , 2021b ) , the hyper-edges are simplified into pairwise edges . The graph is usually considered to be specified before training . Guestrin et al . ( 2002b ) and Zhang & Lesser ( 2013 ) suggest that the graph could also depend on states , which means each state can have its own unique CG . | This paper proposes an extension of deep coordination graph, called Self-Organized Polynomial-time Coordination Graphs (SOP-CG). Instead of pre-specified graph topology used in DCG, their method allows graph topology to be state-dependent, which is achieved by a coordinator agent, and the optimization of this agent is incorporated in a modified temporal difference learning paradigm. Two pre-specified undirected acyclic graph classes are used to ensure polynomial-time graph selection and accurate greedy action selection. The result on sensor network, grid world and MPE shows that such a trade-off between the representational capacity of graph topology and the computational accuracy can improve the performance of MARL and learn meaningful graph topology. | SP:7a0df8dec9ab3e72c6daea7ed2288d1c59b6d2ec |
Self-Organized Polynomial-time Coordination Graphs | 1 INTRODUCTION . Cooperative multi-agent reinforcement learning ( MARL ) is a promising approach to a variety of real-world applications , such as sensor networks ( Zhang & Lesser , 2011 ; Ye et al. , 2015 ) , traffic light control ( Van der Pol & Oliehoek , 2016 ) , and multi-robot formation ( Alonso-Mora et al. , 2017 ) . One of the long-lasting challenges of cooperative MARL is how to organize coordination for a large multi-agent system . Coordination graph ( Guestrin et al. , 2001 ) is a classical approach to represent coordination relations in the reinforcement learning framework . It decomposes a multi-agent system into a suite of overlapping factors . Each factor is a hyper-edge covering a subset of agents that may involve coordinated behaviors . More specifically , the joint value function of the multi-agent system is factorized to the summation of local value functions based on factors or edges . Such a graph structure is a particular type of inductive bias that encodes task-specific coordination dependencies . It is known that conducting appropriate inductive bias can both reduce the model complexity and improve the generalizability ( Battaglia et al. , 2018 ) . One fundamental problem for coordination graphs is the trade-off between the representational capacity of value functions and the computational complexity of policy execution . To obtain value functions with high expressiveness , an advanced approach , deep coordination graphs ( DCG ) ( Böhmer et al. , 2020 ) , considers a static complete graph connecting all pairs of agents . This graph structure has high representational capacity in terms of function expressiveness but raises a challenge for computation in the execution phase . The greedy action selection over a coordination graph can be formalized to a decentralized constraint optimization problem ( DCOP ) , finding the maximum-value joint actions ( Guestrin et al. , 2001 ; Zhang & Lesser , 2013 ; Böhmer et al. , 2020 ) . Note that the DCOP and its any constant-ratio approximation are NP-hard problems , especially for the complete graph used in DCG ( Dagum & Luby , 1993 ; Park & Darwiche , 2004 ) . From the perspective of theoretical computer science , any scalable heuristic algorithm ( e.g. , max-sum algorithm ( Pearl , 1988 ) ) for DCOP problem may have an unpredictable gap with the optimal solution . To visualize this phenomenon , we conduct a motivating example for generating a suite of complete-graph DCOPs with random edge-values . More detailed experiment setting are deferred to to Appendix A . We investigate the accuracy and the relative joint Q error of the max-sum algorithm in computing optimal joint actions , which is the default implementation of MARL methods based on coordination graphs ( Stranders et al. , 2009 ; Zhang & Lesser , 2013 ; Böhmer et al. , 2020 ) . The results are shown in Figure 1 . As the number of agents increases , the accuracy of greedy action selection consistently decreases , and the relative joint Q error between the selected and optimal joint actions increases accordingly . How to incorporating polynomial-time complexity guarantee into coordination graphs with sufficient function expressiveness remains an open problem in MARL . In this paper , we aim to overcome a dilemma in coordination graphs , i.e. , expressive graph structures lead to computationally intractable DCOPs but concise graph structures are in lack of function expressiveness . To tackle this problem , we propose a novel graph-based MARL method for multiagent coordination , named Self-Organized Polynomial-time Coordination Graphs ( SOP-CG ) , that ( 1 ) utilizes structured graph topologies with polynomial-time guarantees for DCOPs and ( 2 ) extends their representation expressiveness through a dynamic graph organization mechanism . These two characteristics open up a new family of MARL algorithms . More specifically , we first construct graph classes guaranteeing polynomial-time DCOPs and then conduct a state-dependent graph selection mechanism . Such a dynamic factorization structure can be self-organized . We introduce an imaginary coordinator agent , whose action is to select a graph topology in a given class at each time step . SOP-CG incorporates this imaginary agent into the Bellman optimality equation supporting end-to-end learning . Figure 2 illustrates the basic idea of SOP-CG . We integrate the search of graph structures into the MARL paradigm . The utilities of different graph topologies are learned along with the RL objective . As the graph utilities are updated through agent-environment interactions , the coordination graph will evolve to the topology characterizing the coordination dependencies . We evaluate the performance of SOP-CG in both grid-world and simulated physical environments . Empirical results on challenging tasks demonstrate that SOP-CG outperforms state-of-the-art baselines . By extensive ablation studies , we verify that harnessing specific structures with optimality guarantee of the induced DCOPs improves the sample quality and the accuracy of the one-step TD target . Furthermore , we show that SOP-CG can learn interpretable and context-dependent coordination graphs , which induces effective and dynamic coordination among agents . 2 RELATED WORK . Multi-agent reinforcement learning ( OroojlooyJadid & Hajinezhad , 2019 ) is challenged by the size of joint action space , which grows exponentially with the number of agents . Independent Q-learning ( Tan , 1993 ; Foerster et al. , 2017 ) models agents as independent learners , which makes the environment non-stationary in the perspective of each agent . An alternative paradigm called centralized training and decentralized execution ( CTDE ; Kraemer & Banerjee , 2016 ) is widely used in both policy-based and value-based methods . Policy-based multi-agent reinforcement learning methods use a centralized critic to compute gradient for the local actors ( Lowe et al. , 2017 ; Foerster et al. , 2018 ; Wen et al. , 2019 ; Wang et al. , 2020d ) . Value-based methods usually decompose the joint value function into individual value functions under the IGM ( individual-global-max ) principle , which guarantees the consistency between local action selection and joint action optimization ( Sunehag et al. , 2018 ; Rashid et al. , 2020b ; Son et al. , 2019 ; Wang et al. , 2021a ; Rashid et al. , 2020a ) . Other work also studies this problem from the perspective of agent roles and individuality ( Wang et al. , 2020a ; b ; Jiang & Lu , 2021 ) or communication learning ( Singh et al. , 2018 ; Das et al. , 2019 ; Wang et al. , 2020c ) . Compared to these methods , our work is built upon graph-based value decomposition , which explicitly models the interaction among agents . Coordination graphs are classical technique for planning in multi-agent systems ( Guestrin et al. , 2001 ; 2002b ) . They are combined with multi-agent deep reinforcement learning by recent work ( Castellini et al. , 2019 ; Böhmer et al. , 2020 ; Li et al. , 2020 ; Wang et al. , 2021b ) . Joint action selection on coordination graphs can be modeled as a decentralized constraint optimization problem ( DCOP ) , and previous methods compute approximate solutions by message passing among agents ( Pearl , 1988 ) . As the work which is most closed to our method , Zhang & Lesser ( 2013 ) presents an algorithm based on coordination graph searching . They define a measurement to quantify the potential loss of the lack of coordination between agents and search for a coordination structure to minimize the communication cost within restricted loss of utilities . However , their induced DCOPs still remain NP-hard . In contrast , minimizing communication is not our core motivation , and we aim to use a structured graph class to maintain sufficient function expressiveness when bypassing the computational hardness of large-scale DCOPs ( Dagum & Luby , 1993 ; Park & Darwiche , 2004 ) . 3 BACKGROUND . In this paper , we consider about fully cooperative multi-agent tasks that can be modelled as a DecPOMDP ( Oliehoek et al. , 2016 ) defined asM = ⟨D , S , { Ai } ni=1 , T , { Oi } ni=1 , { σi } ni=1 , R , h , b0 , γ⟩ , where D = { 1 , . . . , n } is the set of n agents , S is a set of states , h is the horizon of the environment , γ ∈ [ 0 , 1 ) is the discount factor , and b0 ∈ ∆ ( S ) denotes the initial state distribution . At each stage t , each agent i takes an action ai ∈ Ai and forms the joint action a = ( a1 . . . , an ) , which leads to a next state s′ according to the transition function T ( s′|s , a ) and an immediate reward R ( s , a ) shared by all agents . Each agent i observes the state only partially by drawing observations oi ∈ Oi , according to σi . The joint history of agent i ’ s observations oi , t and actions ai , t is denoted as τi , t = ( oi,0 , ai,0 , . . . , oi , t−1 , ai , t−1 , oi , t ) ∈ ( Oi ×Ai ) t ×Oi . Deep Q-Learning . Q-learning algorithms is a well-known algorithm to find the optimal joint action-value function Q∗ ( s , a ) = r ( s , a ) +γEs′ [ maxa′ Q∗ ( s′ , a′ ) ] . Deep Q-learning approximates the action-value function with a deep neural network with parameters θ . In Multi-agent Q-learning algorithms ( Sunehag et al. , 2018 ; Rashid et al. , 2020b ; Son et al. , 2019 ; Wang et al. , 2021a ) , a replay memory D is used to store the transition tuple ( τ , a , r , τ ′ ) , where r is the immediate reward when taking action a at joint action-observation history τ with a transition to τ ′ . Q ( τ , a ; θ ) is used in place of Q ( s , a ; θ ) , because of partial observability . Hence , parameters θ are learnt by minimizing the following expect TD error : L ( θ ) = E ( τ , a , r , τ ′ ) ∈D [ ( r + γV ( τ ′ ; θ− ) −Q ( τ , a ; θ ) ) 2 ] ( 1 ) where V ( τ ′ ; θ− ) = maxa′ Q ( τ ′ , a′ ; θ− ) is the one-step expected future return of the TD target and θ− are the parameters of the target network , which will be periodically updated with θ . Coordination graphs . An undirect coordination graph ( CG , Guestrin et al . ( 2001 ) ) G = ⟨V , E⟩ contains vertex vi ∈ V for each agent 1 ≤ i ≤ n and a set of ( hyper- ) edges in E ⊆ 2V which represents coordination dependencies among agents . Prior work considers higher order coordination where the edges depend on actions of several agents ( Guestrin et al. , 2002a ; Kok & Vlassis , 2006 ; Guestrin et al. , 2002b ) . Such a coordination graph induces a factorization of global Q function : Qtot ( s , a ) = ∑ vi∈V f i ( ai|s ) + ∑ e= { e1 , ... , e|e| } ∈E fe ( ae1 , . . . , ae|e| |s ) ( 2 ) , where f i represents the individual utility of agent i and fe specifies the payoff contribution for the actions of the agents connected by the ( hyper- ) edge e , so that the global optimal solution can be found through maximizing this joint value . The special case that E is an empty set yields VDN , but each additional edge enables the value representation of the joint actions of a pair of agents and can thus help to avoid relative-overgeneralization ( Böhmer et al. , 2020 ) . In many coordination graph learning works ( Zhang & Lesser , 2013 ; Böhmer et al. , 2020 ; Wang et al. , 2021b ) , the hyper-edges are simplified into pairwise edges . The graph is usually considered to be specified before training . Guestrin et al . ( 2002b ) and Zhang & Lesser ( 2013 ) suggest that the graph could also depend on states , which means each state can have its own unique CG . | This paper introduced a novel method called Self-Organized Polynomial-time Coordination Graphs (SOP-CG), aiming to handle the decentralized constraint optimization problem (DCOP). This paper is well organized and the experiments are explicitly presented. Therefore, I think the work of this paper is very interesting and the contributions are sufficient. | SP:7a0df8dec9ab3e72c6daea7ed2288d1c59b6d2ec |
Learning Efficient Online 3D Bin Packing on Packing Configuration Trees | 1 INTRODUCTION . As one of the most classic combinatorial optimization problems , the 3D bin packing problem usually refers to packing a set of cuboid-shaped items i ∈ I , with sizes sxi , s y i , s z i along x , y , z axes , respectively , into the minimum number of bins with sizes Sx , Sy , Sz , in an axis-aligned fashion . Traditional 3D-BPP assumes that all the items to be packed are known a priori ( Martello et al. , 2000 ) , which is also called offline BPP . The problem is known to be strongly NP-hard ( De Castro Silva et al. , 2003 ) . However , in many real-world application scenarios , e.g. , logistics or warehousing ( Wang & Hauser , 2019a ) , the upcoming items can not be fully observed ; only the current item to be packed is observable . Packing items without the knowledge of all upcoming items is referred to as online BPP ( Seiden , 2002 ) . Due to its obvious practical usefulness , online 3D-BPP has received increasing attention recently . Given the limited knowledge , the problem can not be solved by usual search-based methods . Different from offline 3D-BPP where the items can be placed in an arbitrary order , online BPP must place items following their coming order , which imposes additional constraints . Online 3D-BPP is usually solved with either heuristic methods ( Ha et al. , 2017 ) or learning-based ones ( Zhao et al. , 2021 ) , with complementary pros and cons . Heuristic methods are generally not limited by the size of action space , but they find difficulties in handling complex practical constraints such as packing stability or specific packing preferences . Learning-based approaches usually perform better than heuristic methods , especially under various complicated constraints . However , the learning is hard to converge with a large action space , which has greatly limited the applicability of learning-based methods due to , e.g. , the limited resolution of spatial discretization ( Zhao et al. , 2021 ) . We propose to enhance learning-based online 3D-BPP towards practical applicability through learning with a novel hierarchical representation –– packing configuration tree ( PCT ) . PCT is a dynamically growing tree where the internal nodes describe the space configurations of packed items and ∗Work conducted while the author was visiting the National Key Lab for Novel Software Technology . †Kai Xu is the corresponding author . leaf nodes the packable placements of the current item . PCT is a full-fledged description of the state and action space of bin packing which can support packing policy learning based on deep reinforcement learning ( DRL ) . We extract state features from PCT using graph attention networks ( Velickovic et al. , 2018 ) which encodes the spatial relations of all space configuration nodes . The state feature is input into the actor and critic networks of the DRL model . The actor network , designed based on pointer mechanism , weighs the leaf nodes and outputs the action ( the final placement ) . During training , PCT grows under the guidance of heuristics such as Corner Point ( Martello et al. , 2000 ) , Extreme Point ( Crainic et al. , 2008 ) , and Empty Maximal Space ( Ha et al. , 2017 ) . Although PCT is expanded with heuristic rules , confining the solution space to what the heuristics could explore , our DRL model learns a discriminant fitness function ( the actor network ) for the candidate placements , resulting in an effective and robust packing policy exceeding the heuristic methods . Furthermore , the size of the packing action space is proportional to the number of leaf nodes , making the DRL model easy to train and well-performing even with continuous solution space where the packing coordinates are continuous values . Through extensive evaluation , we demonstrate that our method outperforms all existing online 3D-BPP methods and is versatile in terms of incorporating various practical constraints such as isle friendliness and load balancing ( Gzara et al. , 2020 ) . Our work is , to our knowledge , the first that deploys the learning-based method on solving online 3DBPP with continuous solution space successfully . 2 RELATED WORK . Offline 3D-BPP The early interest of 3D-BPP mainly focused on its offline setting . Offline 3DBPP assumes that all items are known as a priori and can be placed in an arbitrary order . Martello et al . ( 2000 ) first solved this problem with an exact branch-and-bound approach . Limited by exponential worst-case complexity of exact approaches , lots of heuristic and meta-heuristic algorithms are proposed to get an approximate solution quickly , such as guided local search ( Faroe et al. , 2003 ) , tabu search ( Crainic et al. , 2009 ) , and hybrid genetic algorithm ( Kang et al. , 2012 ) . Hu et al . ( 2017 ) decompose the offline 3D-BPP into packing order decisions and online placement decisions . The packing order is optimized with an end-to-end DRL agent and the online placement policy is a handdesigned heuristic . This two-step fashion is widely accepted and followed by Duan et al . ( 2019 ) , Hu et al . ( 2020 ) , and Zhang et al . ( 2021 ) . Heuristics for Online 3D-BPP Although offline 3D-BPP has been well studied , their searchbased approaches can not be directly transferred to the online setting . Instead , lots of heuristic methods have been proposed to solve this problem . For reasons of simplicity and good performance , the deep-bottom-left ( DBL ) heuristic ( Karabulut & Inceoglu , 2004 ) has long been a favorite . Ha et al . ( 2017 ) sort the empty spaces with this DBL order and place the current item into the first fit one . Wang & Hauser ( 2019b ) propose a Heightmap-Minimization method to minimize the volume increase of the packed items as observed from the loading direction . Hu et al . ( 2020 ) optimize the empty spaces available for the packing future with a Maximize-Accessible-Convex-Space method . DRL for Online 3D-BPP The heuristic methods are intuitive to implement and can be easily applied to various scenarios . However , the price of good flexibility is that these methods perform mediocrely , especially for online 3D-BPP with specific constraints . Designing new heuristics for specific classes of 3D-BPP is heavy work since this problem has an NP-hard solution space , many situations need to be premeditated manually by trial and error . Substantial domain knowledge is also necessary to ensure safety and reliability . To automatically generate a policy that works well on specified online 3D-BPP , Verma et al . ( 2020 ) ; Zhao et al . ( 2021 ) employ the DRL method on solving this problem , however , their methods only work in small discrete coordinate spaces . Despite their limitations , these works are soon followed by Hong et al . ( 2020 ) ; Yang et al . ( 2021 ) ; Zhao et al . ( 2022 ) for logistics robot implementation . Zhang et al . ( 2021 ) adopt a similar online placement policy for offline packing needs referring to Hu et al . ( 2017 ) . All these learning-based methods only work in a grid world with limited discretization accuracy , which reduces their practical applicability . Practical Constraints The majority of literature for 3D-BPP ( Martello et al. , 2000 ) only considers the basic non-overlapping constraint 1 and containment constraint 2 : pdi + s d i ≤ pdj + Sd ( 1− edij ) i 6= j , i , j ∈ I , d ∈ { x , y , z } ( 1 ) 0 ≤ pdi ≤ Sd − sdi i ∈ I , d ∈ { x , y , z } ( 2 ) Where pi means the front-left-bottom coordinate of item i and d the coordinate axis , eij takes value 1 otherwise 0 if item i precedes item j along d. The algorithms for 3D-BPP are of limited practical applicability if no even basic real-world constraints , e.g. , stability ( Ramos et al. , 2016 ) , are considered . Zhao et al . ( 2022 ) propose a fast stability estimation method for DRL training and test their learned policies with real logistics boxes . The flaw of their work is the heightmap ( the upper frontier of packed items ) state representation like Zhang et al . ( 2021 ) is still used , while the underlying constraints between packed items are missed . The unavailability of underlying spatial information makes their problem a partially observable Markov Decision Process ( Spaan , 2012 ) which is not conducive to DRL training and limits the performance on 3D-BPP instances with more complex practical constraints , like isle friendliness and load balancing ( Gzara et al. , 2020 ) . 3 METHOD . In this section , we first introduce our PCT concept in Section 3.1 for describing the online packing process . The parameterization of the tree structure and the leaf node selection policy are introduced in Section 3.2 and Section 3.3 respectively . In Section 3.4 , we formulate online 3D-BPP as Markov Decision Process based on PCT , followed by the description of the training method . 3.1 PACKING CONFIGURATION TREE . When a rectangular item nt is added to a given packing with position ( pxn , p y n , p z n ) at time step t , it introduces a series of new candidate positions where future items can be accommodated , as illustrated in Figure 1 . Combined with the axis-aligned orientation o ∈ O for nt based on existing positions , we get candidate placements ( i.e . position and orientation ) . The packing process can be seen as a placement node being replaced by a packed item node , and new candidate placement nodes are generated as children . As the packing time step t goes on , these nodes are iteratively updated and a dynamic packing configuration tree is formed , denoted as T . The internal node set Bt ∈ Tt represents the space configurations of packed items , and the leaf node set Lt ∈ Tt the packable candidate placements . During the packing , leaf nodes that are no longer feasible , e.g. , covered by packed items , will be removed from Lt . When there is no packable leaf node that makes nt satisfy the constraints of placement , the packing episode ends . Without loss of generality , we stipulate a vertical top-down packing within a single bin ( Wang & Hauser , 2019b ) . Traditional 3D-BPP literature only cares about the remaining placements for accommodating the current item nt , their packing policies can be written as π ( Lt|Lt , nt ) . If we want to promote this problem for practical demands , 3D-BPP needs to satisfy more complex practical constraints which also act on Bt . Taking packing stability for instance , a newly added item nt has possibly force and torque effect on the whole item set Bt ( Ramos et al. , 2016 ) . The addition of nt should make Bt a more stable spatial distribution so that more items can be added in the future . Therefore , our packing policy over Lt is defined as π ( Lt|Tt , nt ) , which means probabilities of selecting leaf nodes from Lt given Tt and nt . For online packing , we hope to find the best leaf node selection policy to expand the PCT with more relaxed constraints so that more future items can be appended . Leaf Node Expansion Schemes The performance of online 3D-BPP policies has a strong relationship with the choice of leaf node expansion schemes –– which incrementally calculate new candidate placements introduced by the just placed item nt . A good expansion scheme should reduce the number of solutions to be explored while not missing too many feasible packings . Meanwhile , polynomially computability is also expected . Designing such a scheme from scratch is non-trivial . Fortunately , several placement rules independent from particular packing problems have been proposed , such as Corner Point ( Martello et al. , 2000 ) , Extreme Point ( Crainic et al. , 2008 ) , and Empty Maximal Space ( Ha et al. , 2017 ) . We extend these schemes which have proven to be accurate and efficient to our PCT expansion . The performance of learned policies will be reported in Section 4.1 . | This work proposes a tree-based learning method for online 3D packing problem. Packing configuration tree nodes is constructed using heuristic-based tree expansion, which acts as the action space of deep reinforcement learning. The tree search schema is interesting, but this work still has lots of space to improve in terms of its methodology and experiments. | SP:ab030a8c07a5d9c3e0fa0a6b7cf224b4c23f68d1 |
Learning Efficient Online 3D Bin Packing on Packing Configuration Trees | 1 INTRODUCTION . As one of the most classic combinatorial optimization problems , the 3D bin packing problem usually refers to packing a set of cuboid-shaped items i ∈ I , with sizes sxi , s y i , s z i along x , y , z axes , respectively , into the minimum number of bins with sizes Sx , Sy , Sz , in an axis-aligned fashion . Traditional 3D-BPP assumes that all the items to be packed are known a priori ( Martello et al. , 2000 ) , which is also called offline BPP . The problem is known to be strongly NP-hard ( De Castro Silva et al. , 2003 ) . However , in many real-world application scenarios , e.g. , logistics or warehousing ( Wang & Hauser , 2019a ) , the upcoming items can not be fully observed ; only the current item to be packed is observable . Packing items without the knowledge of all upcoming items is referred to as online BPP ( Seiden , 2002 ) . Due to its obvious practical usefulness , online 3D-BPP has received increasing attention recently . Given the limited knowledge , the problem can not be solved by usual search-based methods . Different from offline 3D-BPP where the items can be placed in an arbitrary order , online BPP must place items following their coming order , which imposes additional constraints . Online 3D-BPP is usually solved with either heuristic methods ( Ha et al. , 2017 ) or learning-based ones ( Zhao et al. , 2021 ) , with complementary pros and cons . Heuristic methods are generally not limited by the size of action space , but they find difficulties in handling complex practical constraints such as packing stability or specific packing preferences . Learning-based approaches usually perform better than heuristic methods , especially under various complicated constraints . However , the learning is hard to converge with a large action space , which has greatly limited the applicability of learning-based methods due to , e.g. , the limited resolution of spatial discretization ( Zhao et al. , 2021 ) . We propose to enhance learning-based online 3D-BPP towards practical applicability through learning with a novel hierarchical representation –– packing configuration tree ( PCT ) . PCT is a dynamically growing tree where the internal nodes describe the space configurations of packed items and ∗Work conducted while the author was visiting the National Key Lab for Novel Software Technology . †Kai Xu is the corresponding author . leaf nodes the packable placements of the current item . PCT is a full-fledged description of the state and action space of bin packing which can support packing policy learning based on deep reinforcement learning ( DRL ) . We extract state features from PCT using graph attention networks ( Velickovic et al. , 2018 ) which encodes the spatial relations of all space configuration nodes . The state feature is input into the actor and critic networks of the DRL model . The actor network , designed based on pointer mechanism , weighs the leaf nodes and outputs the action ( the final placement ) . During training , PCT grows under the guidance of heuristics such as Corner Point ( Martello et al. , 2000 ) , Extreme Point ( Crainic et al. , 2008 ) , and Empty Maximal Space ( Ha et al. , 2017 ) . Although PCT is expanded with heuristic rules , confining the solution space to what the heuristics could explore , our DRL model learns a discriminant fitness function ( the actor network ) for the candidate placements , resulting in an effective and robust packing policy exceeding the heuristic methods . Furthermore , the size of the packing action space is proportional to the number of leaf nodes , making the DRL model easy to train and well-performing even with continuous solution space where the packing coordinates are continuous values . Through extensive evaluation , we demonstrate that our method outperforms all existing online 3D-BPP methods and is versatile in terms of incorporating various practical constraints such as isle friendliness and load balancing ( Gzara et al. , 2020 ) . Our work is , to our knowledge , the first that deploys the learning-based method on solving online 3DBPP with continuous solution space successfully . 2 RELATED WORK . Offline 3D-BPP The early interest of 3D-BPP mainly focused on its offline setting . Offline 3DBPP assumes that all items are known as a priori and can be placed in an arbitrary order . Martello et al . ( 2000 ) first solved this problem with an exact branch-and-bound approach . Limited by exponential worst-case complexity of exact approaches , lots of heuristic and meta-heuristic algorithms are proposed to get an approximate solution quickly , such as guided local search ( Faroe et al. , 2003 ) , tabu search ( Crainic et al. , 2009 ) , and hybrid genetic algorithm ( Kang et al. , 2012 ) . Hu et al . ( 2017 ) decompose the offline 3D-BPP into packing order decisions and online placement decisions . The packing order is optimized with an end-to-end DRL agent and the online placement policy is a handdesigned heuristic . This two-step fashion is widely accepted and followed by Duan et al . ( 2019 ) , Hu et al . ( 2020 ) , and Zhang et al . ( 2021 ) . Heuristics for Online 3D-BPP Although offline 3D-BPP has been well studied , their searchbased approaches can not be directly transferred to the online setting . Instead , lots of heuristic methods have been proposed to solve this problem . For reasons of simplicity and good performance , the deep-bottom-left ( DBL ) heuristic ( Karabulut & Inceoglu , 2004 ) has long been a favorite . Ha et al . ( 2017 ) sort the empty spaces with this DBL order and place the current item into the first fit one . Wang & Hauser ( 2019b ) propose a Heightmap-Minimization method to minimize the volume increase of the packed items as observed from the loading direction . Hu et al . ( 2020 ) optimize the empty spaces available for the packing future with a Maximize-Accessible-Convex-Space method . DRL for Online 3D-BPP The heuristic methods are intuitive to implement and can be easily applied to various scenarios . However , the price of good flexibility is that these methods perform mediocrely , especially for online 3D-BPP with specific constraints . Designing new heuristics for specific classes of 3D-BPP is heavy work since this problem has an NP-hard solution space , many situations need to be premeditated manually by trial and error . Substantial domain knowledge is also necessary to ensure safety and reliability . To automatically generate a policy that works well on specified online 3D-BPP , Verma et al . ( 2020 ) ; Zhao et al . ( 2021 ) employ the DRL method on solving this problem , however , their methods only work in small discrete coordinate spaces . Despite their limitations , these works are soon followed by Hong et al . ( 2020 ) ; Yang et al . ( 2021 ) ; Zhao et al . ( 2022 ) for logistics robot implementation . Zhang et al . ( 2021 ) adopt a similar online placement policy for offline packing needs referring to Hu et al . ( 2017 ) . All these learning-based methods only work in a grid world with limited discretization accuracy , which reduces their practical applicability . Practical Constraints The majority of literature for 3D-BPP ( Martello et al. , 2000 ) only considers the basic non-overlapping constraint 1 and containment constraint 2 : pdi + s d i ≤ pdj + Sd ( 1− edij ) i 6= j , i , j ∈ I , d ∈ { x , y , z } ( 1 ) 0 ≤ pdi ≤ Sd − sdi i ∈ I , d ∈ { x , y , z } ( 2 ) Where pi means the front-left-bottom coordinate of item i and d the coordinate axis , eij takes value 1 otherwise 0 if item i precedes item j along d. The algorithms for 3D-BPP are of limited practical applicability if no even basic real-world constraints , e.g. , stability ( Ramos et al. , 2016 ) , are considered . Zhao et al . ( 2022 ) propose a fast stability estimation method for DRL training and test their learned policies with real logistics boxes . The flaw of their work is the heightmap ( the upper frontier of packed items ) state representation like Zhang et al . ( 2021 ) is still used , while the underlying constraints between packed items are missed . The unavailability of underlying spatial information makes their problem a partially observable Markov Decision Process ( Spaan , 2012 ) which is not conducive to DRL training and limits the performance on 3D-BPP instances with more complex practical constraints , like isle friendliness and load balancing ( Gzara et al. , 2020 ) . 3 METHOD . In this section , we first introduce our PCT concept in Section 3.1 for describing the online packing process . The parameterization of the tree structure and the leaf node selection policy are introduced in Section 3.2 and Section 3.3 respectively . In Section 3.4 , we formulate online 3D-BPP as Markov Decision Process based on PCT , followed by the description of the training method . 3.1 PACKING CONFIGURATION TREE . When a rectangular item nt is added to a given packing with position ( pxn , p y n , p z n ) at time step t , it introduces a series of new candidate positions where future items can be accommodated , as illustrated in Figure 1 . Combined with the axis-aligned orientation o ∈ O for nt based on existing positions , we get candidate placements ( i.e . position and orientation ) . The packing process can be seen as a placement node being replaced by a packed item node , and new candidate placement nodes are generated as children . As the packing time step t goes on , these nodes are iteratively updated and a dynamic packing configuration tree is formed , denoted as T . The internal node set Bt ∈ Tt represents the space configurations of packed items , and the leaf node set Lt ∈ Tt the packable candidate placements . During the packing , leaf nodes that are no longer feasible , e.g. , covered by packed items , will be removed from Lt . When there is no packable leaf node that makes nt satisfy the constraints of placement , the packing episode ends . Without loss of generality , we stipulate a vertical top-down packing within a single bin ( Wang & Hauser , 2019b ) . Traditional 3D-BPP literature only cares about the remaining placements for accommodating the current item nt , their packing policies can be written as π ( Lt|Lt , nt ) . If we want to promote this problem for practical demands , 3D-BPP needs to satisfy more complex practical constraints which also act on Bt . Taking packing stability for instance , a newly added item nt has possibly force and torque effect on the whole item set Bt ( Ramos et al. , 2016 ) . The addition of nt should make Bt a more stable spatial distribution so that more items can be added in the future . Therefore , our packing policy over Lt is defined as π ( Lt|Tt , nt ) , which means probabilities of selecting leaf nodes from Lt given Tt and nt . For online packing , we hope to find the best leaf node selection policy to expand the PCT with more relaxed constraints so that more future items can be appended . Leaf Node Expansion Schemes The performance of online 3D-BPP policies has a strong relationship with the choice of leaf node expansion schemes –– which incrementally calculate new candidate placements introduced by the just placed item nt . A good expansion scheme should reduce the number of solutions to be explored while not missing too many feasible packings . Meanwhile , polynomially computability is also expected . Designing such a scheme from scratch is non-trivial . Fortunately , several placement rules independent from particular packing problems have been proposed , such as Corner Point ( Martello et al. , 2000 ) , Extreme Point ( Crainic et al. , 2008 ) , and Empty Maximal Space ( Ha et al. , 2017 ) . We extend these schemes which have proven to be accurate and efficient to our PCT expansion . The performance of learned policies will be reported in Section 4.1 . | This paper addresses the problem of online 3D bin packing where the order of objects is out of the model's control and it must make placement decisions one object at a time. Training is framed as a deep RL problem closely following recent work [Zhao et al]. The main contribution is a rethinking of the state and action space which yields much better performance. Prior work trained models to predict placement in a voxelized grid that led to a large action space that could not scale well. Instead, this work represents existing objects and potential placement locations as nodes in a tree which are processed with a graph network. Given a new object, placement nodes can be heuristically instantiated to cover valid locations, and the model uses attention to output a distribution over these nodes and determine the object placement. | SP:ab030a8c07a5d9c3e0fa0a6b7cf224b4c23f68d1 |
Deep Fair Discriminative Clustering | 1 INTRODUCTION . Clustering is essential as it is the basis of many AI tools and has been widely used in real-world applications involving humans ( Jain et al. , 1999 ) such as market research , social network analysis , and crime analysis . However , as AI tools augment and even replace humans in decision-making , the need to ensure clustering is fair becomes paramount . Here fairness is measured using protected status variables ( PSVs ) such as gender , race , or education level . Fairness takes two primary forms ( Binns , 2020 ) : i ) group-level fairness and ii ) individual-level fairness . In this paper , we study the former which ensures that no one cluster contains a disproportionately small number of individuals with protected status . Motivated by this goal , our work aims to add fairness rules to deep clustering . Recent works ( Rösner & Schmidt , 2018 ; Schmidt et al. , 2019 ; Kleindessner et al. , 2019b ; Backurs et al. , 2019 ; Bera et al. , 2019 ) have been proposed for non-deep fair clustering algorithms . To ensure group-level fairness , many of these works use the notion of the disparate impact doctrine encoded as a constraint , that instances from different protected groups must have approximately ( within a tolerance ) equal representation in a cluster compared to the population . Different geographic regions place this tolerance at different levels ( Chierichetti et al. , 2017 ) . These existing algorithms optimize the clustering quality by minimizing some well-known clustering objectives while satisfying the group-level fairness constraints . Previous examples of adding fairness to clustering algorithms include k-median based approaches ( Chierichetti et al. , 2017 ; Backurs et al. , 2019 ; Bera et al. , 2019 ) and spectral clustering based algorithm ( Kleindessner et al. , 2019b ) . However , all these works evaluate their performance on low-dimensional tabular data and ( Chierichetti et al. , 2017 ; Kleindessner et al. , 2019b ; Backurs et al. , 2019 ) study the problems only with binary PSV . Deep clustering ( Xie et al. , 2016 ; Hu et al. , 2017 ; Guo et al. , 2017 ; Wang et al. , 2019 ) has the ability to simultaneously cluster and learn a representation for problems with large amounts of complex data ( i.e. , images , texts , graphs ) . However , the representation learning ability sometimes makes the learner suffer from bias hidden in the data which can lead to unfair clustering results . For example , clustering of portraits may create clusters based on features which are surrogates for racial and other protected status information . One way to overcome this is by adding group-level fairness to deep clustering which is a challenging and understudied problem . A significant challenge is it is hard to translate the current fair clustering algorithms into an end-to-end deep clustering setting . For example , geometric pre-processing steps such as computing fairlets ( Chierichetti et al. , 2017 ) to ensure fairness will not work as the end-to-end learning of deep learners means the underlying features that clustering is performed on are unknown apriori . Similarly , another line of work that adds constraints into deep learning models such as ( Xu et al. , 2018 ; Zhang et al. , 2019 ) are not appropriate either as these constraints are at the instance level , whereas we require to apply fairness rules at a cluster level . The work on fair deep clustering is relatively new . The first work on fair deep clustering ( Wang & Davidson , 2019 ) studies deep fair clustering problem from a geometric perspective which aims to learn a fair representation with multi-state PSV . The most recent work ( Li et al. , 2020 ) proposes a deep fair visual clustering model with adversarial learning to encourage the clustering partition to be statistically independent of each sensitive attribute ( PSV ) . Although these deep clustering approaches demonstrate better clustering performance compared to the traditional fair clustering algorithms ( Table 1 ) , their fairness results are relatively poor compared to those fair clusterings with fairness guarantees ( Chierichetti et al. , 2017 ; Backurs et al. , 2019 ) . Our work can be seen as combining the benefits of deep learning and discrete optimization to produce guaranteed fair predictions on clustered data with PSVs while making out-of-sample fair predictions for data without PSVs . In this paper , we propose a novel deep fair clustering framework to address the above issues . We adopt a probabilistic discriminative clustering network and learn a representation that naturally yields compact clusters . To incorporate the group-level fairness rules in the deep learner , we first formulate our fairness objective as an integer linear programming ( ILP ) problem that guarantees group-level fairness . This ILP is efficient to solve as its constraint matrix is totally unimodular . Further , we propose a refinement learning algorithm to combine the solved fair assignments and the clustering objective . Experimental results on real-world datasets demonstrate that our model achieves guaranteed fair results with competitive clustering performance . We also examine the novel uses of our framework in predictive clustering , flexible fair clustering , and challenging tasks with multi-state PSVs . The major contributions of this paper are summarized as follows : • We optimize a general notion of fairness for multi-state PSVs which we prove is equivalent to optimize the general balance measure ( Chierichetti et al. , 2017 ) for disparate impact . • We formulate our fairness assignment sub-problem as an ILP which is NP-hard . We show that by relaxing our constraint matrix to be totally unimodular our sub-problem can be efficiently solved by an LP solver ( but still generate integer solutions ) . ( See Theorem 4.2 ) . • We propose an end-to-end refinement learning algorithm that combines deep learning and discrete optimization to learn fair representation for clustering . ( See Algorithm 1 ) . • Extensive experimental results show that our work can achieve guaranteed fairness with competitive clustering performance . We demonstrate our novel extensions for fair clustering tasks in predictive clustering , multi-state PSVs and flexible fairness rules . ( See Section 5.2 ) . In the next section 2 we discuss the related work . Then we outline our measure of fairness and how it relates to classic measures of disparate impact in section 3 . In our approach section 4 , we introduce our clustering framework and encode our fairness objective as an ILP which can be efficiently solved via our relaxation . A refinement learning algorithm is proposed for end-to-end fair clustering . Finally we empirically evaluate the effectiveness of our approach in section 5 and conclude in section 6 . 2 RELATED WORK . Fair clustering has received much attention recently ( Schmidt et al. , 2019 ; Kleindessner et al. , 2019a ; Ahmadian et al. , 2019 ; Chen et al. , 2019 ; Davidson & Ravi , 2020 ; Mahabadi & Vakilian , 2020 ; Brubach et al. , 2020 ) . Chierichetti et al . ( 2017 ) first addressed the disparate impact for clustering problems in the presence of binary PSVs . Their work apriori groups instances into many fairlets which are used as input into standard k-medians style algorithms . Their work is guaranteed to produce a specified level of fairness and achieve a constant factor approximation with respect to cluster quality . Backurs et al . ( 2019 ) improves the fair decomposition algorithm to linear run-time . Later on , Bera et al . ( 2019 ) propose a general fair clustering algorithm that allows human-specified upper and lower bounds on any protected group in any cluster . Their work can be applied to any clustering problems under ` p norms such as k-median , k-means , and k-center . Besides the centroid-based method , Kleindessner et al . ( 2019b ) extends the fairness notion to graph spectral clustering problems . Ziko et al . ( 2021 ) propose a general , variational and bound-optimization framework of fair clustering . Previous fair clustering approaches mainly focus on adding fairness constraints into traditional clustering algorithms . In our work , we aim to study the fairness problem for recently proposed deep clustering algorithms ( Xie et al. , 2016 ; Yang et al. , 2017 ; Hu et al. , 2017 ; Caron et al. , 2018 ; Shaham et al. , 2018 ; Tzoreff et al. , 2018 ; Shah & Koltun , 2018 ) . Deep clustering algorithms connect representation learning and clustering together and have demonstrated their advantages over the two-phase clustering algorithms which use feature transformation first and then clustering . The goal of deep fair clustering is to learn a fair and clustering-favored representation . We illustrate the basic intuitions behind traditional fair clustering methods and deep fair clustering approaches in Figure 1 . One of the earliest works ( Wang & Davidson , 2019 ) to address the deep fair clustering problem learns a latent representation such that the cluster centroids are equidistant from every “ fairoid ” ( the centroid of all the data belonging to the same protected group ) . Recently , Li et al . ( 2020 ) encodes the fairness constraints as an adversarial loss and concatenates the fairness loss to a centroid-based deep clustering objective as a unified model . Unlike previous deep fair clustering works , we translate the fairness requirements into an ILP problem that generates guaranteed fair solutions given the PSVs . Meanwhile , our formulation allows for a general notion of fairness that supports flexible fairness constraints and multi-state PSVs . Moreover , we propose a novel learning framework to train fair clustering models via simultaneous clustering and fitting the self-generated fairness signals . 3 DEFINITIONS OF GROUP-LEVEL FAIRNESS . We begin this section by overviewing the seminal definition of group-level fairness in clustering ( see equation 1 ) and then its extension to multi-state PSVs ( see equation 2 ) . We then go onto show a new measure that our deep clustering framework will optimize ( see equation 3 ) and equation 2 have the same optimal condition as shown in Theorem 3.2 . 3.1 NOTION OF FAIRNESS . Let X ∈ RN×D denote N data points with D dimension features . The prediction function φ assigns each instance to one unique cluster , φ : x→ { 1 , ... K } , which forms K disjoint clusters { C1 , ... CK } . Given the protected status variable ( denoted as PSV ) A with T states , X can be partitioned into T demographic groups as { G1 , G2 , ... GT } . Definition 1 . The seminal proposed measure of fairness for clustering with binary PSV ( Chierichetti et al. , 2017 ) encoded disparate impact as follows : balance ( Ck ) = min ( N1k N2k , N2k N1k ) ∈ [ 0 , 1 ] ( 1 ) Here N1k and N 2 k represent the populations of the first and second demographic groups in cluster Ck . Such a measure of fairness only works for binary PSV . To allow for multi-state PSVs , let Nmink = min ( N 1 k . . . N T k ) denotes the smallest ( in size ) protected group in cluster k and Nmaxk = max ( N 1 k . . . N T k ) denotes the largest group . We extend the balance measure for multistate PSV as : balance ( Ck ) = Nmink Nmaxk ∈ [ 0 , 1 ] ( 2 ) Recent works ( Rösner & Schmidt , 2018 ; Bera et al. , 2019 ) also propose a new fairness measure to allow for fair clustering problems with multi-state PSVs . Definition 2 . Let ρi be the representation of group Gi in the dataset as ρi = |Gi|/N , and ρi ( k ) be the representation of group Gi in the cluster Ck : ρi ( k ) = |Ck ∩Gi|/|Ck| . Using these two values , the fairness value for cluster Ck is : fairness ( Ck ) = min ( ρi ρi ( k ) , ρi ( k ) ρi ) ∈ [ 0 , 1 ] ∀i ∈ { 1 , . . . T } ( 3 ) The overall fairness of a clustering is defined as the minimum fairness value over all the clusters . Similarly , the overall balance is the minimum balance value of all the clusters . | This paper proposes a method for fair clustering (where a clustering is considered fair when each protected group is present in every cluster in the same proportion as in the population) using deep neural networks. The method works by training a neural network for clustering using the deep clustering with virtual adversarial training approach proposed by (Hu et al., 2017) and then refining (retraining) the network by adding a fairness term to the loss function (where the fairness term is the cross entropy loss between the current networks prediction and the fair assignments obtained using an LP solver on a constraint matrix that enforces the group fairness/balance constraints). It also presents some experiments that demonstrate the method is more effective at finding high quality fair clusterings than existing deep clustering, fair clustering, and deep fair clustering methods. | SP:055233a234a97d1e4a37a02b1740303eb41a3dc5 |
Deep Fair Discriminative Clustering | 1 INTRODUCTION . Clustering is essential as it is the basis of many AI tools and has been widely used in real-world applications involving humans ( Jain et al. , 1999 ) such as market research , social network analysis , and crime analysis . However , as AI tools augment and even replace humans in decision-making , the need to ensure clustering is fair becomes paramount . Here fairness is measured using protected status variables ( PSVs ) such as gender , race , or education level . Fairness takes two primary forms ( Binns , 2020 ) : i ) group-level fairness and ii ) individual-level fairness . In this paper , we study the former which ensures that no one cluster contains a disproportionately small number of individuals with protected status . Motivated by this goal , our work aims to add fairness rules to deep clustering . Recent works ( Rösner & Schmidt , 2018 ; Schmidt et al. , 2019 ; Kleindessner et al. , 2019b ; Backurs et al. , 2019 ; Bera et al. , 2019 ) have been proposed for non-deep fair clustering algorithms . To ensure group-level fairness , many of these works use the notion of the disparate impact doctrine encoded as a constraint , that instances from different protected groups must have approximately ( within a tolerance ) equal representation in a cluster compared to the population . Different geographic regions place this tolerance at different levels ( Chierichetti et al. , 2017 ) . These existing algorithms optimize the clustering quality by minimizing some well-known clustering objectives while satisfying the group-level fairness constraints . Previous examples of adding fairness to clustering algorithms include k-median based approaches ( Chierichetti et al. , 2017 ; Backurs et al. , 2019 ; Bera et al. , 2019 ) and spectral clustering based algorithm ( Kleindessner et al. , 2019b ) . However , all these works evaluate their performance on low-dimensional tabular data and ( Chierichetti et al. , 2017 ; Kleindessner et al. , 2019b ; Backurs et al. , 2019 ) study the problems only with binary PSV . Deep clustering ( Xie et al. , 2016 ; Hu et al. , 2017 ; Guo et al. , 2017 ; Wang et al. , 2019 ) has the ability to simultaneously cluster and learn a representation for problems with large amounts of complex data ( i.e. , images , texts , graphs ) . However , the representation learning ability sometimes makes the learner suffer from bias hidden in the data which can lead to unfair clustering results . For example , clustering of portraits may create clusters based on features which are surrogates for racial and other protected status information . One way to overcome this is by adding group-level fairness to deep clustering which is a challenging and understudied problem . A significant challenge is it is hard to translate the current fair clustering algorithms into an end-to-end deep clustering setting . For example , geometric pre-processing steps such as computing fairlets ( Chierichetti et al. , 2017 ) to ensure fairness will not work as the end-to-end learning of deep learners means the underlying features that clustering is performed on are unknown apriori . Similarly , another line of work that adds constraints into deep learning models such as ( Xu et al. , 2018 ; Zhang et al. , 2019 ) are not appropriate either as these constraints are at the instance level , whereas we require to apply fairness rules at a cluster level . The work on fair deep clustering is relatively new . The first work on fair deep clustering ( Wang & Davidson , 2019 ) studies deep fair clustering problem from a geometric perspective which aims to learn a fair representation with multi-state PSV . The most recent work ( Li et al. , 2020 ) proposes a deep fair visual clustering model with adversarial learning to encourage the clustering partition to be statistically independent of each sensitive attribute ( PSV ) . Although these deep clustering approaches demonstrate better clustering performance compared to the traditional fair clustering algorithms ( Table 1 ) , their fairness results are relatively poor compared to those fair clusterings with fairness guarantees ( Chierichetti et al. , 2017 ; Backurs et al. , 2019 ) . Our work can be seen as combining the benefits of deep learning and discrete optimization to produce guaranteed fair predictions on clustered data with PSVs while making out-of-sample fair predictions for data without PSVs . In this paper , we propose a novel deep fair clustering framework to address the above issues . We adopt a probabilistic discriminative clustering network and learn a representation that naturally yields compact clusters . To incorporate the group-level fairness rules in the deep learner , we first formulate our fairness objective as an integer linear programming ( ILP ) problem that guarantees group-level fairness . This ILP is efficient to solve as its constraint matrix is totally unimodular . Further , we propose a refinement learning algorithm to combine the solved fair assignments and the clustering objective . Experimental results on real-world datasets demonstrate that our model achieves guaranteed fair results with competitive clustering performance . We also examine the novel uses of our framework in predictive clustering , flexible fair clustering , and challenging tasks with multi-state PSVs . The major contributions of this paper are summarized as follows : • We optimize a general notion of fairness for multi-state PSVs which we prove is equivalent to optimize the general balance measure ( Chierichetti et al. , 2017 ) for disparate impact . • We formulate our fairness assignment sub-problem as an ILP which is NP-hard . We show that by relaxing our constraint matrix to be totally unimodular our sub-problem can be efficiently solved by an LP solver ( but still generate integer solutions ) . ( See Theorem 4.2 ) . • We propose an end-to-end refinement learning algorithm that combines deep learning and discrete optimization to learn fair representation for clustering . ( See Algorithm 1 ) . • Extensive experimental results show that our work can achieve guaranteed fairness with competitive clustering performance . We demonstrate our novel extensions for fair clustering tasks in predictive clustering , multi-state PSVs and flexible fairness rules . ( See Section 5.2 ) . In the next section 2 we discuss the related work . Then we outline our measure of fairness and how it relates to classic measures of disparate impact in section 3 . In our approach section 4 , we introduce our clustering framework and encode our fairness objective as an ILP which can be efficiently solved via our relaxation . A refinement learning algorithm is proposed for end-to-end fair clustering . Finally we empirically evaluate the effectiveness of our approach in section 5 and conclude in section 6 . 2 RELATED WORK . Fair clustering has received much attention recently ( Schmidt et al. , 2019 ; Kleindessner et al. , 2019a ; Ahmadian et al. , 2019 ; Chen et al. , 2019 ; Davidson & Ravi , 2020 ; Mahabadi & Vakilian , 2020 ; Brubach et al. , 2020 ) . Chierichetti et al . ( 2017 ) first addressed the disparate impact for clustering problems in the presence of binary PSVs . Their work apriori groups instances into many fairlets which are used as input into standard k-medians style algorithms . Their work is guaranteed to produce a specified level of fairness and achieve a constant factor approximation with respect to cluster quality . Backurs et al . ( 2019 ) improves the fair decomposition algorithm to linear run-time . Later on , Bera et al . ( 2019 ) propose a general fair clustering algorithm that allows human-specified upper and lower bounds on any protected group in any cluster . Their work can be applied to any clustering problems under ` p norms such as k-median , k-means , and k-center . Besides the centroid-based method , Kleindessner et al . ( 2019b ) extends the fairness notion to graph spectral clustering problems . Ziko et al . ( 2021 ) propose a general , variational and bound-optimization framework of fair clustering . Previous fair clustering approaches mainly focus on adding fairness constraints into traditional clustering algorithms . In our work , we aim to study the fairness problem for recently proposed deep clustering algorithms ( Xie et al. , 2016 ; Yang et al. , 2017 ; Hu et al. , 2017 ; Caron et al. , 2018 ; Shaham et al. , 2018 ; Tzoreff et al. , 2018 ; Shah & Koltun , 2018 ) . Deep clustering algorithms connect representation learning and clustering together and have demonstrated their advantages over the two-phase clustering algorithms which use feature transformation first and then clustering . The goal of deep fair clustering is to learn a fair and clustering-favored representation . We illustrate the basic intuitions behind traditional fair clustering methods and deep fair clustering approaches in Figure 1 . One of the earliest works ( Wang & Davidson , 2019 ) to address the deep fair clustering problem learns a latent representation such that the cluster centroids are equidistant from every “ fairoid ” ( the centroid of all the data belonging to the same protected group ) . Recently , Li et al . ( 2020 ) encodes the fairness constraints as an adversarial loss and concatenates the fairness loss to a centroid-based deep clustering objective as a unified model . Unlike previous deep fair clustering works , we translate the fairness requirements into an ILP problem that generates guaranteed fair solutions given the PSVs . Meanwhile , our formulation allows for a general notion of fairness that supports flexible fairness constraints and multi-state PSVs . Moreover , we propose a novel learning framework to train fair clustering models via simultaneous clustering and fitting the self-generated fairness signals . 3 DEFINITIONS OF GROUP-LEVEL FAIRNESS . We begin this section by overviewing the seminal definition of group-level fairness in clustering ( see equation 1 ) and then its extension to multi-state PSVs ( see equation 2 ) . We then go onto show a new measure that our deep clustering framework will optimize ( see equation 3 ) and equation 2 have the same optimal condition as shown in Theorem 3.2 . 3.1 NOTION OF FAIRNESS . Let X ∈ RN×D denote N data points with D dimension features . The prediction function φ assigns each instance to one unique cluster , φ : x→ { 1 , ... K } , which forms K disjoint clusters { C1 , ... CK } . Given the protected status variable ( denoted as PSV ) A with T states , X can be partitioned into T demographic groups as { G1 , G2 , ... GT } . Definition 1 . The seminal proposed measure of fairness for clustering with binary PSV ( Chierichetti et al. , 2017 ) encoded disparate impact as follows : balance ( Ck ) = min ( N1k N2k , N2k N1k ) ∈ [ 0 , 1 ] ( 1 ) Here N1k and N 2 k represent the populations of the first and second demographic groups in cluster Ck . Such a measure of fairness only works for binary PSV . To allow for multi-state PSVs , let Nmink = min ( N 1 k . . . N T k ) denotes the smallest ( in size ) protected group in cluster k and Nmaxk = max ( N 1 k . . . N T k ) denotes the largest group . We extend the balance measure for multistate PSV as : balance ( Ck ) = Nmink Nmaxk ∈ [ 0 , 1 ] ( 2 ) Recent works ( Rösner & Schmidt , 2018 ; Bera et al. , 2019 ) also propose a new fairness measure to allow for fair clustering problems with multi-state PSVs . Definition 2 . Let ρi be the representation of group Gi in the dataset as ρi = |Gi|/N , and ρi ( k ) be the representation of group Gi in the cluster Ck : ρi ( k ) = |Ck ∩Gi|/|Ck| . Using these two values , the fairness value for cluster Ck is : fairness ( Ck ) = min ( ρi ρi ( k ) , ρi ( k ) ρi ) ∈ [ 0 , 1 ] ∀i ∈ { 1 , . . . T } ( 3 ) The overall fairness of a clustering is defined as the minimum fairness value over all the clusters . Similarly , the overall balance is the minimum balance value of all the clusters . | This paper proposes a fair clustering algorithm that uses DL models to map the data into deep representations. The authors also show the equivalence between the practical fairness measure and the balance measure. The algorithms can be concluded as two steps: 1) find fair assignments $\hat y$ based on $y$; 2) tune the latent representations and $y$ according to the pseudo-label $\hat y$. | SP:055233a234a97d1e4a37a02b1740303eb41a3dc5 |
Structure by Architecture: Disentangled Representations without Regularization | 1 INTRODUCTION . Deep learning has achieved strong results on a plethora of challenging tasks . However , performing well on a highly specific dataset is usually insufficient to satisfactorily solve real-world problems ( Tan et al. , 2018 ; Zhuang et al. , 2019 ) . This has lead to a particular interest in consistently learning more structured representations with useful properties to help with a variety of downstream tasks ( Bengio et al. , 2013 ; Tschannen et al. , 2018 ; Bengio et al. , 2017 ; Tschannen et al. , 2018 ; Radhakrishnan et al. , 2018 ) . Here , deep learning provides a flexible paradigm to train complex architectures based on autoencoders ( Ballard , 1987 ; Lange and Riedmiller , 2010 ) which are typically latent variable models , thus allowing us to embed powerful inductive biases into the models to further structure the representations . However , it is still largely an open question as to what kinds of structure in a representation are the most effective for generative modeling and how to learn such structures without supervision ( Locatello et al. , 2018 ; Khrulkov et al. , 2021 ; Shu et al. , 2019 ; Chen et al. , 2020 ; Nie et al. , 2020 ; Mathieu et al. , 2019 ; Vaswani et al. , 2017 ; Kwon and Ye , 2021 ) . One direction that may contribute to an answer is causal modeling , as it focuses on the underlying ( causal ) mechanisms that generate the observations , instead of relying on ( possibly spurious ) correlations ( Pearl , 2009 ; Peters et al. , 2017 ; Schölkopf , 2019 ; Louizos et al. , 2017 ; Mitrovic et al. , 2020 ; Shen et al. , 2020 ) . With the versatility of deep learning on one hand , and the conceptual insights of causality on the other , our contributions herein include : • We propose an architecture called the Structural Autoencoder ( SAE ) , where the structural decoder emulates a general acyclic structural causal model to learn a hierarchical representation that can separate and order the underlying factors of variation in the data . • We provide a sampling method that can be used for any autoencoder-based generative models which does not use an explicit regularization objective and instead relies on independence in the latent space . • We investigate how well the encoder and decoder are able to extrapolate upon seeing novel samples . We release our code at * anonymized * . 1.1 RELATED WORK . The most popular autoencoder based method is the Variational Autoencoder ( VAE ) ( Kingma and Welling , 2013a ) and the closely related βVAE ( Higgins et al. , 2017 ) . These methods focus on matching the distribution in the latent space to a known prior distribution by regularizing the reconstruction training objective ( Locatello et al. , 2020a ; Zhou et al. , 2020 ) . Although this structure is convenient for generative modeling and even tends to disentangle the latent space to some extent , it comes at the cost of somewhat blurry images due to posterior collapse and holes in the latent space ( Locatello et al. , 2018 ; Higgins et al. , 2017 ; Burgess et al. , 2018 ; Kim and Mnih , 2018 ; Stühmer et al. , 2020 ) . To mitigate the double-edged nature of VAEs , less aggressive regularization techniques have been proposed such as the Wasserstein Autoencoder ( WAE ) , which focuses on the aggregate posterior ( Tolstikhin et al. , 2018 ) . Unfortunately , WAEs generally fail to produce a particularly meaningful or disentangled latent space ( Rubenstein et al. , 2018 ) , unless weak supervision is available ( Han et al. , 2021 ) . A more structured alternative is the Variational Ladder autoencoder ( VLAE ) ( Zhao et al. , 2017 ) which separates the latent space into separate chunks each of which is processed at different levels of the encoder and decoder ( called ” rungs ” ) . Our proposed architecture takes inspiration from the VLAEs but crucially we do not use the variational regularization , and instead use a sampling method based on hybridization ( Besserve et al. , 2018 ) . We also infuse the information from the latent variables using Str-Tfm layers ( see section 2.2 ) which are based on the Ada-IN layers from Style-GANs ( Karras et al. , 2019 ) , which significantly improves on the ladder rungs . Lastly , unlike the VLAEs , the SAEs use a simple feed-forward CNN encoder ( like all the other unstructured models ) , which simplifies analysis without significantly impacting the ability to structure the representation ( see further discussion in section 4.2 ) . 2 METHODS . 2.1 CAUSAL REPRESENTATION LEARNING . Graphical causal modeling represents the relationship between random variables Si using a directed acyclic graph ( DAG ) whose edges indicate direct causation and structural equations of the form Si : = fi ( PAi , Ui ) , ( i = 1 , . . . , D ) , ( 1 ) encoding the dependence of variable Si on its parents PAi in the graph and on an unexplained noise variable Ui . The noises U1 , . . . , UD are assumed to be jointly independent . The DAG along with the mechanisms ( 1 ) is referred to as a Structural Causal Model ( SCM ) ( Pearl , 2009 ) . Any joint distribution of the Si can be expressed as an SCM using suitable fi and Ui . However , the SCM entails additional assumptions regarding how statistical dependencies between the Si are generated by mechanisms ( 1 ) , such that changes due to interventions can be modelled as well ( e.g. , by setting some Ui or Si to constants ) . Real-world observations are often not structured into meaningful causal variables and mechanisms to begin with . E.g. , images are high-dimensional , and it is hard to learn objects and their causal relationships from data ( Lopez-Paz et al. , 2017 ) . One may thus attempt to learn a representation consisting of causal variables or disentangled “ factors ” which are statistically independent ( Higgins et al. , 2017 ) . However , in an SCM it is not the Si that should be statistically independent , but the Ui . For this reason , our representations will comprise the Ui as latent variables , driving causal mechanisms via learned functions fi ( 1 ) . This embeds an SCM into a larger model whose inputs and outputs may be high-dimensional and unstructured ( e.g. , images ) ( Suter et al. , 2018a ; Schölkopf , 2019 ) . Given ( high-dimensional ) X = ( X1 , . . . , Xd ) , our goal is to learn a low-dimensional representation U = ( U1 , . . . , UD ) ( D d ) using an encoder Rd → RD , and model the generative process ( including the SCM ) that produced X from the inferred latent variables using a decoder RD → Rd . If the causal graph of the true generative process were known , the topology of the decoder could be fixed accordingly . However , in the fully unsupervised setting , the generator must be capable of modeling a general SCM , so our architecture specifies a causal ordering ( while learning what information to embed in the specified ordering ) , while the edges between parents and children in the SCM are learned implicitly in the computation layers . Specifically , the learned generative process , a.k.a . decoder , produces a reconstruction X̂ of X by feeding each of the Ui into subsequent computation layers . Here , the root node S1 in the DAG only depends on U1 , while later Si depend on their noise Ui and potentially their parents Sj ( j < i ) . Thus the depth in the network corresponds to a causal ordering ( see Supplement for further discussion ) . 2.2 STRUCTURAL DECODERS This model architecture is implemented by the structural decoder , using D StructuralTransform ( Str-Tfm ) layers placed evenly in between the convolution blocks . From the corresponding latent variable Ui , the ith Str-Tfm layer estimates a scale αi and bias βi which are then used to pixelwise transform the intermediate features of the lth layer vl ( as seen in Figure 1 ) much like in Ada-IN ( Karras et al. , 2019 ) except without the preceding normalization . Each Str-Tfm layer thus acts like an fi in ( 1 ) by integrating the information from a latent variable Ui to transform the features PAi from earlier layers . This variable decoder depth for each of the latent variables biases high-level non-linear information towards the earlier ( and thereby deeper ) latent variables , while the model capacity is reduced for the later variables so they can only capture relatively low-level linear features with respect to the data space . Meanwhile , the random initialization of the MLPs in the Str-Tfm layers produce more distinct activations with re- spect to each of the latent variables than if they are all transformed linearly by same dense layers . This architectural asymmetry between latent variables thereby encourages statistical independence and induces a relatively intuitive hierarchical structure of the latent space . In theory , without some form of supervision or side information , the learned latent variables are not guaranteed to disentangle the true factors of variation , much less that the learned SCM matches the true one ( Locatello et al. , 2020b ) . Instead , all we are guaranteed from training on observational data is that the model is optimized to reproduce the same observational distribution as the true generative process . However , for datasets with independent factors of variation , the independent latent variables may align with the true factors , thus disentangling the factors in the representation . Regardless of disentanglement , independence between latent variables also enables principled interventions on individual variables for generating new samples , using hybrid sampling , which is akin to intervening on the learned SCM for generative modeling . 2.3 HYBRID SAMPLING . For generative modeling , it is necessary to sample novel latent vectors that are transformed into ( synthetic ) observations using the decoder . Usually , this is done by regularizing the training objective so the posterior matches some simple prior ( e.g . the standard normal ) . However , in practice , regularization techniques can fail to match the prior perfectly and actually exacerbate the information bottleneck , leading to blurry samples from holes in the learned latent distribution and unused latent dimensions due to posterior collapse ( Dai and Wipf , 2019 ; Stühmer et al. , 2020 ; Lucas et al. , 2019 ; Hoffman and Johnson , 2016 ) . Instead of trying to match some prior distribution in the latent space , we suggest an alternative sampling method that eliminates the need for any regularization of the loss . Inspired by Besserve et al . ( 2018 ) , we refer to it as hybrid sampling : the model stores a finite set of N ( = 128 in our case ) latent vectors , selected uniformly at random from the training set . To generate a new latent vector Ũ , a value for each of theD latent variables Ũi is selected independently from theN stored latent vectors { U ( j ) } Nj=1 uniformly at random , such that : Ũi ← U ( j ) i where j ∼ { 1 , ... , N } This allows the model to generate ND distinct latent vectors , and since we assume D d , N can easily be increased up to the full training set size without significant memory costs . Note that hybrid sampling is directly applicable to any learned representation as it does not affect training at all , however the fidelity of generated samples will diminish if there are strong correlations between latent dimensions . Consequently , the goal is to achieve maximal independence between latent variables without compromising on the fidelity of the decoder ( i.e . reconstruction error ) . Hybrid sampling implicitly relies on the statistical independence of the latent variables since resampling the marginal of the aggregate posterior independently breaks any existing correlations . Not only does this align well with the objectives of unsupervised disentanglement methods , but it is also consistent with the causal perspective of the latent variables as independent noises Ui driving an SCM . | This paper structures how latents are used in an autoencoder to improve its performance. They are motivated by causal structure and independence of latent variables. They also sample using a sort of discrete mixup between latent codes from pushing forward data, and show various improvements there. | SP:249f8a78affc76e690b74ebe05057bb1c30df872 |
Structure by Architecture: Disentangled Representations without Regularization | 1 INTRODUCTION . Deep learning has achieved strong results on a plethora of challenging tasks . However , performing well on a highly specific dataset is usually insufficient to satisfactorily solve real-world problems ( Tan et al. , 2018 ; Zhuang et al. , 2019 ) . This has lead to a particular interest in consistently learning more structured representations with useful properties to help with a variety of downstream tasks ( Bengio et al. , 2013 ; Tschannen et al. , 2018 ; Bengio et al. , 2017 ; Tschannen et al. , 2018 ; Radhakrishnan et al. , 2018 ) . Here , deep learning provides a flexible paradigm to train complex architectures based on autoencoders ( Ballard , 1987 ; Lange and Riedmiller , 2010 ) which are typically latent variable models , thus allowing us to embed powerful inductive biases into the models to further structure the representations . However , it is still largely an open question as to what kinds of structure in a representation are the most effective for generative modeling and how to learn such structures without supervision ( Locatello et al. , 2018 ; Khrulkov et al. , 2021 ; Shu et al. , 2019 ; Chen et al. , 2020 ; Nie et al. , 2020 ; Mathieu et al. , 2019 ; Vaswani et al. , 2017 ; Kwon and Ye , 2021 ) . One direction that may contribute to an answer is causal modeling , as it focuses on the underlying ( causal ) mechanisms that generate the observations , instead of relying on ( possibly spurious ) correlations ( Pearl , 2009 ; Peters et al. , 2017 ; Schölkopf , 2019 ; Louizos et al. , 2017 ; Mitrovic et al. , 2020 ; Shen et al. , 2020 ) . With the versatility of deep learning on one hand , and the conceptual insights of causality on the other , our contributions herein include : • We propose an architecture called the Structural Autoencoder ( SAE ) , where the structural decoder emulates a general acyclic structural causal model to learn a hierarchical representation that can separate and order the underlying factors of variation in the data . • We provide a sampling method that can be used for any autoencoder-based generative models which does not use an explicit regularization objective and instead relies on independence in the latent space . • We investigate how well the encoder and decoder are able to extrapolate upon seeing novel samples . We release our code at * anonymized * . 1.1 RELATED WORK . The most popular autoencoder based method is the Variational Autoencoder ( VAE ) ( Kingma and Welling , 2013a ) and the closely related βVAE ( Higgins et al. , 2017 ) . These methods focus on matching the distribution in the latent space to a known prior distribution by regularizing the reconstruction training objective ( Locatello et al. , 2020a ; Zhou et al. , 2020 ) . Although this structure is convenient for generative modeling and even tends to disentangle the latent space to some extent , it comes at the cost of somewhat blurry images due to posterior collapse and holes in the latent space ( Locatello et al. , 2018 ; Higgins et al. , 2017 ; Burgess et al. , 2018 ; Kim and Mnih , 2018 ; Stühmer et al. , 2020 ) . To mitigate the double-edged nature of VAEs , less aggressive regularization techniques have been proposed such as the Wasserstein Autoencoder ( WAE ) , which focuses on the aggregate posterior ( Tolstikhin et al. , 2018 ) . Unfortunately , WAEs generally fail to produce a particularly meaningful or disentangled latent space ( Rubenstein et al. , 2018 ) , unless weak supervision is available ( Han et al. , 2021 ) . A more structured alternative is the Variational Ladder autoencoder ( VLAE ) ( Zhao et al. , 2017 ) which separates the latent space into separate chunks each of which is processed at different levels of the encoder and decoder ( called ” rungs ” ) . Our proposed architecture takes inspiration from the VLAEs but crucially we do not use the variational regularization , and instead use a sampling method based on hybridization ( Besserve et al. , 2018 ) . We also infuse the information from the latent variables using Str-Tfm layers ( see section 2.2 ) which are based on the Ada-IN layers from Style-GANs ( Karras et al. , 2019 ) , which significantly improves on the ladder rungs . Lastly , unlike the VLAEs , the SAEs use a simple feed-forward CNN encoder ( like all the other unstructured models ) , which simplifies analysis without significantly impacting the ability to structure the representation ( see further discussion in section 4.2 ) . 2 METHODS . 2.1 CAUSAL REPRESENTATION LEARNING . Graphical causal modeling represents the relationship between random variables Si using a directed acyclic graph ( DAG ) whose edges indicate direct causation and structural equations of the form Si : = fi ( PAi , Ui ) , ( i = 1 , . . . , D ) , ( 1 ) encoding the dependence of variable Si on its parents PAi in the graph and on an unexplained noise variable Ui . The noises U1 , . . . , UD are assumed to be jointly independent . The DAG along with the mechanisms ( 1 ) is referred to as a Structural Causal Model ( SCM ) ( Pearl , 2009 ) . Any joint distribution of the Si can be expressed as an SCM using suitable fi and Ui . However , the SCM entails additional assumptions regarding how statistical dependencies between the Si are generated by mechanisms ( 1 ) , such that changes due to interventions can be modelled as well ( e.g. , by setting some Ui or Si to constants ) . Real-world observations are often not structured into meaningful causal variables and mechanisms to begin with . E.g. , images are high-dimensional , and it is hard to learn objects and their causal relationships from data ( Lopez-Paz et al. , 2017 ) . One may thus attempt to learn a representation consisting of causal variables or disentangled “ factors ” which are statistically independent ( Higgins et al. , 2017 ) . However , in an SCM it is not the Si that should be statistically independent , but the Ui . For this reason , our representations will comprise the Ui as latent variables , driving causal mechanisms via learned functions fi ( 1 ) . This embeds an SCM into a larger model whose inputs and outputs may be high-dimensional and unstructured ( e.g. , images ) ( Suter et al. , 2018a ; Schölkopf , 2019 ) . Given ( high-dimensional ) X = ( X1 , . . . , Xd ) , our goal is to learn a low-dimensional representation U = ( U1 , . . . , UD ) ( D d ) using an encoder Rd → RD , and model the generative process ( including the SCM ) that produced X from the inferred latent variables using a decoder RD → Rd . If the causal graph of the true generative process were known , the topology of the decoder could be fixed accordingly . However , in the fully unsupervised setting , the generator must be capable of modeling a general SCM , so our architecture specifies a causal ordering ( while learning what information to embed in the specified ordering ) , while the edges between parents and children in the SCM are learned implicitly in the computation layers . Specifically , the learned generative process , a.k.a . decoder , produces a reconstruction X̂ of X by feeding each of the Ui into subsequent computation layers . Here , the root node S1 in the DAG only depends on U1 , while later Si depend on their noise Ui and potentially their parents Sj ( j < i ) . Thus the depth in the network corresponds to a causal ordering ( see Supplement for further discussion ) . 2.2 STRUCTURAL DECODERS This model architecture is implemented by the structural decoder , using D StructuralTransform ( Str-Tfm ) layers placed evenly in between the convolution blocks . From the corresponding latent variable Ui , the ith Str-Tfm layer estimates a scale αi and bias βi which are then used to pixelwise transform the intermediate features of the lth layer vl ( as seen in Figure 1 ) much like in Ada-IN ( Karras et al. , 2019 ) except without the preceding normalization . Each Str-Tfm layer thus acts like an fi in ( 1 ) by integrating the information from a latent variable Ui to transform the features PAi from earlier layers . This variable decoder depth for each of the latent variables biases high-level non-linear information towards the earlier ( and thereby deeper ) latent variables , while the model capacity is reduced for the later variables so they can only capture relatively low-level linear features with respect to the data space . Meanwhile , the random initialization of the MLPs in the Str-Tfm layers produce more distinct activations with re- spect to each of the latent variables than if they are all transformed linearly by same dense layers . This architectural asymmetry between latent variables thereby encourages statistical independence and induces a relatively intuitive hierarchical structure of the latent space . In theory , without some form of supervision or side information , the learned latent variables are not guaranteed to disentangle the true factors of variation , much less that the learned SCM matches the true one ( Locatello et al. , 2020b ) . Instead , all we are guaranteed from training on observational data is that the model is optimized to reproduce the same observational distribution as the true generative process . However , for datasets with independent factors of variation , the independent latent variables may align with the true factors , thus disentangling the factors in the representation . Regardless of disentanglement , independence between latent variables also enables principled interventions on individual variables for generating new samples , using hybrid sampling , which is akin to intervening on the learned SCM for generative modeling . 2.3 HYBRID SAMPLING . For generative modeling , it is necessary to sample novel latent vectors that are transformed into ( synthetic ) observations using the decoder . Usually , this is done by regularizing the training objective so the posterior matches some simple prior ( e.g . the standard normal ) . However , in practice , regularization techniques can fail to match the prior perfectly and actually exacerbate the information bottleneck , leading to blurry samples from holes in the learned latent distribution and unused latent dimensions due to posterior collapse ( Dai and Wipf , 2019 ; Stühmer et al. , 2020 ; Lucas et al. , 2019 ; Hoffman and Johnson , 2016 ) . Instead of trying to match some prior distribution in the latent space , we suggest an alternative sampling method that eliminates the need for any regularization of the loss . Inspired by Besserve et al . ( 2018 ) , we refer to it as hybrid sampling : the model stores a finite set of N ( = 128 in our case ) latent vectors , selected uniformly at random from the training set . To generate a new latent vector Ũ , a value for each of theD latent variables Ũi is selected independently from theN stored latent vectors { U ( j ) } Nj=1 uniformly at random , such that : Ũi ← U ( j ) i where j ∼ { 1 , ... , N } This allows the model to generate ND distinct latent vectors , and since we assume D d , N can easily be increased up to the full training set size without significant memory costs . Note that hybrid sampling is directly applicable to any learned representation as it does not affect training at all , however the fidelity of generated samples will diminish if there are strong correlations between latent dimensions . Consequently , the goal is to achieve maximal independence between latent variables without compromising on the fidelity of the decoder ( i.e . reconstruction error ) . Hybrid sampling implicitly relies on the statistical independence of the latent variables since resampling the marginal of the aggregate posterior independently breaks any existing correlations . Not only does this align well with the objectives of unsupervised disentanglement methods , but it is also consistent with the causal perspective of the latent variables as independent noises Ui driving an SCM . | This paper presents a hierarchical latent variable model and accompanying sampling procedure for learning disentangled representations. Rather than a latent feature map/vector, the latent variables are used to condition affine transforms in the decoder. The authors combine this with a ‘hybrid’ sampling strategy, effectively sampling from the aggregate approximate posterior. Comparing with several baselines, the authors compare their model in terms of FID and various disentanglement scores. The authors also investigate generalization. | SP:249f8a78affc76e690b74ebe05057bb1c30df872 |
Translating Robot Skills: Learning Unsupervised Skill Correspondences Across Robots | 1 INTRODUCTION . Humans have a remarkable ability to efficiently learn to perform tasks by watching others demonstrate similar tasks . For example , children quickly learn the skills needed to play a new sport by watching their parents perform skills such as kicking a ball . Notably , they are able to learn from these visual demonstrations despite significant differences between themselves and the demonstrator , including visual perspectives , environments , kinematic and dynamic properties , and morphologies . This ability may be attributed to two factors ; firstly , humans have well-developed basic motor skills that we can execute with little effort . Second , we can recognize the sequence of skills ( or the high-level strategy ) the demonstrator uses , and understand a corresponding set of skills that we can execute ourselves ( Meltzoff & Moore , 1977 ) . In this paper , we explore how we can endow robots with this ability - i.e. , to adopt task strategies from morphologically different robot demonstrators , and then execute corresponding skills to solve similar tasks . Key to solving this problem is for the robot to identify how its owns skills correspond to those of the demonstrator , which is tremendously powerful . First , it allows the robot to adopt the demonstrator ’ s strategies for solving various tasks . Second , by adopting and adapting these strategies for itself , the robot can efficiently learn to solve a variety of tasks previously outside its repertoire . Finally , it allows us to understand the task strategies used by various robots in a unified manner , enabling robots to learn from data collected with a heterogeneous collection of tasks and robot morphologies . Skills provide a natural framework to facilitate such concise knowledge transfer across robots compared to low-level robot controls ; skills inherently abstract away low-level details that may differ across the demonstrator and the learner , and instead focus on the commonalities between them , such as the task strategy . For example , skills such as reaching and placing on robot manipulators abstract away differences in morphologies or configuration , and are thus well grounded across robots , while there may not be obvious correspondence in their low-level actions . How can one acquire correspondences between skills ? Stated more formally , given morphologically different robots , a set of unlabelled demonstrations of each robot solving a variety of tasks , and a method for extracting skills from those demonstrations , how can one learn correspondences between the skills of the different robots ? Learning such correspondences is straightforward when supervised pairs of skills or trajectories are available . However , collecting and annotating such data is timeconsuming and tedious , and requires a high degree of human expertise , particularly at the scale necessary to successfully learn correspondences across a diverse set of skills . In contrast , we explore whether we can learn such skill correspondences in an unsupervised manner , i.e. , without access to supervised skill or trajectory pairs . Learning unsupervised skill correspondences potentially allows for learning a broad scope of correspondences from the diverse unlabelled and unsegmented data newly available in robotics ( Sharma et al. , 2018 ; Mandlekar et al. , 2018 ) . Unfortunately , learning unsupervised correspondences is a difficult problem to solve - without supervision , it is difficult to guide learning towards the right correspondences . While this may be alleviated to some extent by incorporating unsupervised constraints ( Zhu et al. , 2017 ; Ganin et al. , 2016 ; Zhou et al. , 2019 ) , there are many spurious correspondences that satisfy these constraints . How can one then go about learning such skill correspondences in an unsupervised manner ? We propose leveraging the two following insights to do so . Our first insight is that different morphological robots use similar task strategies ( in terms of sequences of skills ) to solve similar tasks ; in other words , the sequences of skills executed by different robots to solve similar tasks ought to belong to similar distributions . We observe that this is generally true ; for example , a robot pouring out a cup of tea would likely first reach for the kettle , grasp it , move it appropriately over the cup , and then begin to pour the tea , irrespective of its exact morphology . Our second insight is that learning skill correspondences without access to supervised data closely mirrors unsupervised machine translation ( UMT ) , where the objective is to learn a translation between representations in different languages ( such as between word embeddings across languages ) , without access to parallel data ( Conneau et al. , 2017 ; Lample et al. , 2018 ) . Inspired by these two insights , we derive an unsupervised objective to guide our learning towards meaningful skill correspondences . We approach the problem of learning unsupervised skill correspondences by learning a translation model to map from the skill space on one “ source ” robot to the skill space on another “ target ” robot . We construct an unsupervised objective that encourages the translation model to respect our first insight - i.e. , to preserve the sequences of skills observed across both the ( translated source ) and target robots . To do this , we take inspiration from our second insight , and specifically from Zhou et al . ( 2019 ) , and construct explicit probability density models over the sequences of skills observed on the source and target robots , and then train the translation model to match these distributions . We evaluate the ability of our approach to learn unsupervised skill correspondences across three different robots , the Sawyer robot , and the left and right hands of the Baxter robot . Our approach is able to learn semantically meaningful correspondences across each of the 3 pairs of robots , despite being completely unsupervised , as depicted in fig . 1 . The learnt correspondences facilitate transferring task strategies across across domains , as we demonstrate on a set of downstream tasks . Our results are visualized at https : //sites.google.com/view/translatingrobotskills/home . 2 RELATED WORK . Skill Learning : Eysenbach et al . ( 2019 ) ; Sharma et al . ( 2020 ) both address unsuperivsed skill learning from interaction data , by constructing information theoretic approaches . Fox et al . ( 2017 ) ; Krishnan et al . ( 2017 ) ; Shankar et al . ( 2020 ) ; Sharma et al . ( 2018 ) ; Shankar & Gupta ( 2020 ) ; Kipf et al . ( 2019 ) ; Gregor et al . ( 2019 ) ; Kim et al . ( 2019 ) instead learn skills or abstractions from unlabelled demonstration data by performing latent variable inference . These frameworks all learn skills in the context of a single domain , while we seek to learn correspondences of skills across domains . Unsupervised Correspondence Learning : Our problem bears a close resemblance with unsupervised machine translation ( Conneau et al. , 2017 ; Zhou et al. , 2019 ) , and unpaired image translation ( Zhu et al. , 2017 ; Park et al. , 2020 ) . Specifically , they all share the notion of learning correspondences across representations learnt from unpaired , “ monolingual ” data : • Unsupervised Correspondence in Machine Translation : i i i l ti : s r s rr s r se e e e ce ac e a ai i i l ti : r rr r Conneau et al . ( 2017 ) leveraged domainadversarial training ( Ganin et al. , 2016 ) to align word embeddings of two languages . Sennrich et al . ( 2016 ) ; Lample et al . ( 2018 ) use the idea of back-translation to constraint the learnt translation models across languages . Zhou et al . ( 2019 ) learn bilingual word embeddings by matching explicit density functions over the word embedding spaces across languages . • Unsupervised Correspondence in Image Translation : i i l ti : s r s rr s I r se e e e ce a e a ai i l ti : r rr I r The vision community has similarly explored the unpaired image-to-image translation setting ( Zhu et al. , 2017 ; Park et al. , 2020 ) , using cycle-consistency losses ( Zhu et al. , 2017 ) or contrastive losses ( Park et al. , 2020 ) . • Unsupervised Correspondence in Video : i i i : s r s rr se e e e ce ei i i : r rr Bansal et al . ( 2018 ) ; Wang et al . ( 2019 ) extend CycleGAN ( Zhu et al. , 2017 ) to the video domain , by incorporating temporal consistency losses . Domain Transfer in Robotics and Graphics : The robotics and graphics communities have taken interest in cross-domain transfer of policies in recent years : • Policy Transfer with Paired Data : li it i t : r sf r rc a e a e a ali it i t : r f r r Gupta et al . ( 2017 ) ; Sermanet et al . learn morphology and viewpoint invariant feature spaces for policy transfer respectively , but require paired data to do so . • Policy Transfer via Modularity : li i l it : r sf r rc a e a ali i l it : r f r r Hejna et al . ( 2020 ) ; Devin et al . ( 2017 ) ; Sharma et al . ( 2019 ) address morphological transfer by modularity in their policies . Hejna et al . ( 2020 ) ; Sharma et al . ( 2019 ) adopt modularity in a hierarchical sense , but leverage common grounding of subgoals across morphologies to perform transfer . We do not assume access to such common grounding . • State based Policy Transfer : t t li : s r sf ra e a e c a et t li : r f r Liu et al . ( 2020 ) ; Schroecker & Isbell ( 2017 ) ; Ammar et al . ( 2015 ) address cross-morphology transfer by state based imitation learning . • Motion Retargetting : ti t tti : re a eti t tti : r The graphics community has addressed transferring behaviors across morphologically different characters ( Hecker et al. , 2008 ; Aberman et al. , 2020 ; Villegas et al. , 2018 ; Abdul-Massih et al. , 2017 ) , using carefully handcrafted kinematic models . These works transfer behaviors by imitating joint positions , and performing inverse kinematics to retrieve the full character state , which is often infeasible for widely different morphological characters . • Unsupervised Action Correspondence : i ti : s r s rr se e c e e cei ti : r rr Zhang et al . ( 2021 ) ; Kim et al . ( 2020 ) ; Smith et al . ( 2020 ) address learning low-level state and action correspondences from unpaired , unaligned interaction and demonstration data respectively . While similar in spirit , our work argues that learning highlevel skill correspondence instead is a more natural choice , as mentioned in the introduction . Applicability to learning skill correspondences : While successful in their respective problem domains , existing approaches are not trivially applicable to our problem . The adversarial training used in most of these approaches is notoriously difficult to train , and is prone to the mode dropping problem ( Li & Malik , 2019 ) . They require strong constraints such as pixel-wise or joint-wise identity losses ( Zhu et al. , 2017 ; Zhang et al. , 2021 ) , or inherent similarity of the spaces to be aligned , such as word embeddings across languages ( Conneau et al. , 2017 ; Zhou et al. , 2019 ) . Learnt skill representations do not possess this property in general . Shortcomings notwithstanding , these approaches provide insight into how we may pursue learning unsupervised skill correspondences . | The paper proposed to learn skills correspondences between robots of different morphologies in an unsupervised way - without requiring paired data from the robots. They learn a skill translation model that maps skills from a source robot to a target robot. The translation model is learned by minimizing a loss composed of two components: (1) the likelihood of the translated skills under the target distribution estimated from target robot skills data, and (2) the likelihood of the target skills under the translated distribution estimated from the translated skills data. The proposed approaches hinges on the assumption that robots with different morphologies follow similar high-level strategies when performing similar tasks. So, a sequence of tasks across the robots is used to learn the skills correspondences. | SP:3b90d1be98c9d3d60ce7ef415b471a824076b967 |
Translating Robot Skills: Learning Unsupervised Skill Correspondences Across Robots | 1 INTRODUCTION . Humans have a remarkable ability to efficiently learn to perform tasks by watching others demonstrate similar tasks . For example , children quickly learn the skills needed to play a new sport by watching their parents perform skills such as kicking a ball . Notably , they are able to learn from these visual demonstrations despite significant differences between themselves and the demonstrator , including visual perspectives , environments , kinematic and dynamic properties , and morphologies . This ability may be attributed to two factors ; firstly , humans have well-developed basic motor skills that we can execute with little effort . Second , we can recognize the sequence of skills ( or the high-level strategy ) the demonstrator uses , and understand a corresponding set of skills that we can execute ourselves ( Meltzoff & Moore , 1977 ) . In this paper , we explore how we can endow robots with this ability - i.e. , to adopt task strategies from morphologically different robot demonstrators , and then execute corresponding skills to solve similar tasks . Key to solving this problem is for the robot to identify how its owns skills correspond to those of the demonstrator , which is tremendously powerful . First , it allows the robot to adopt the demonstrator ’ s strategies for solving various tasks . Second , by adopting and adapting these strategies for itself , the robot can efficiently learn to solve a variety of tasks previously outside its repertoire . Finally , it allows us to understand the task strategies used by various robots in a unified manner , enabling robots to learn from data collected with a heterogeneous collection of tasks and robot morphologies . Skills provide a natural framework to facilitate such concise knowledge transfer across robots compared to low-level robot controls ; skills inherently abstract away low-level details that may differ across the demonstrator and the learner , and instead focus on the commonalities between them , such as the task strategy . For example , skills such as reaching and placing on robot manipulators abstract away differences in morphologies or configuration , and are thus well grounded across robots , while there may not be obvious correspondence in their low-level actions . How can one acquire correspondences between skills ? Stated more formally , given morphologically different robots , a set of unlabelled demonstrations of each robot solving a variety of tasks , and a method for extracting skills from those demonstrations , how can one learn correspondences between the skills of the different robots ? Learning such correspondences is straightforward when supervised pairs of skills or trajectories are available . However , collecting and annotating such data is timeconsuming and tedious , and requires a high degree of human expertise , particularly at the scale necessary to successfully learn correspondences across a diverse set of skills . In contrast , we explore whether we can learn such skill correspondences in an unsupervised manner , i.e. , without access to supervised skill or trajectory pairs . Learning unsupervised skill correspondences potentially allows for learning a broad scope of correspondences from the diverse unlabelled and unsegmented data newly available in robotics ( Sharma et al. , 2018 ; Mandlekar et al. , 2018 ) . Unfortunately , learning unsupervised correspondences is a difficult problem to solve - without supervision , it is difficult to guide learning towards the right correspondences . While this may be alleviated to some extent by incorporating unsupervised constraints ( Zhu et al. , 2017 ; Ganin et al. , 2016 ; Zhou et al. , 2019 ) , there are many spurious correspondences that satisfy these constraints . How can one then go about learning such skill correspondences in an unsupervised manner ? We propose leveraging the two following insights to do so . Our first insight is that different morphological robots use similar task strategies ( in terms of sequences of skills ) to solve similar tasks ; in other words , the sequences of skills executed by different robots to solve similar tasks ought to belong to similar distributions . We observe that this is generally true ; for example , a robot pouring out a cup of tea would likely first reach for the kettle , grasp it , move it appropriately over the cup , and then begin to pour the tea , irrespective of its exact morphology . Our second insight is that learning skill correspondences without access to supervised data closely mirrors unsupervised machine translation ( UMT ) , where the objective is to learn a translation between representations in different languages ( such as between word embeddings across languages ) , without access to parallel data ( Conneau et al. , 2017 ; Lample et al. , 2018 ) . Inspired by these two insights , we derive an unsupervised objective to guide our learning towards meaningful skill correspondences . We approach the problem of learning unsupervised skill correspondences by learning a translation model to map from the skill space on one “ source ” robot to the skill space on another “ target ” robot . We construct an unsupervised objective that encourages the translation model to respect our first insight - i.e. , to preserve the sequences of skills observed across both the ( translated source ) and target robots . To do this , we take inspiration from our second insight , and specifically from Zhou et al . ( 2019 ) , and construct explicit probability density models over the sequences of skills observed on the source and target robots , and then train the translation model to match these distributions . We evaluate the ability of our approach to learn unsupervised skill correspondences across three different robots , the Sawyer robot , and the left and right hands of the Baxter robot . Our approach is able to learn semantically meaningful correspondences across each of the 3 pairs of robots , despite being completely unsupervised , as depicted in fig . 1 . The learnt correspondences facilitate transferring task strategies across across domains , as we demonstrate on a set of downstream tasks . Our results are visualized at https : //sites.google.com/view/translatingrobotskills/home . 2 RELATED WORK . Skill Learning : Eysenbach et al . ( 2019 ) ; Sharma et al . ( 2020 ) both address unsuperivsed skill learning from interaction data , by constructing information theoretic approaches . Fox et al . ( 2017 ) ; Krishnan et al . ( 2017 ) ; Shankar et al . ( 2020 ) ; Sharma et al . ( 2018 ) ; Shankar & Gupta ( 2020 ) ; Kipf et al . ( 2019 ) ; Gregor et al . ( 2019 ) ; Kim et al . ( 2019 ) instead learn skills or abstractions from unlabelled demonstration data by performing latent variable inference . These frameworks all learn skills in the context of a single domain , while we seek to learn correspondences of skills across domains . Unsupervised Correspondence Learning : Our problem bears a close resemblance with unsupervised machine translation ( Conneau et al. , 2017 ; Zhou et al. , 2019 ) , and unpaired image translation ( Zhu et al. , 2017 ; Park et al. , 2020 ) . Specifically , they all share the notion of learning correspondences across representations learnt from unpaired , “ monolingual ” data : • Unsupervised Correspondence in Machine Translation : i i i l ti : s r s rr s r se e e e ce ac e a ai i i l ti : r rr r Conneau et al . ( 2017 ) leveraged domainadversarial training ( Ganin et al. , 2016 ) to align word embeddings of two languages . Sennrich et al . ( 2016 ) ; Lample et al . ( 2018 ) use the idea of back-translation to constraint the learnt translation models across languages . Zhou et al . ( 2019 ) learn bilingual word embeddings by matching explicit density functions over the word embedding spaces across languages . • Unsupervised Correspondence in Image Translation : i i l ti : s r s rr s I r se e e e ce a e a ai i l ti : r rr I r The vision community has similarly explored the unpaired image-to-image translation setting ( Zhu et al. , 2017 ; Park et al. , 2020 ) , using cycle-consistency losses ( Zhu et al. , 2017 ) or contrastive losses ( Park et al. , 2020 ) . • Unsupervised Correspondence in Video : i i i : s r s rr se e e e ce ei i i : r rr Bansal et al . ( 2018 ) ; Wang et al . ( 2019 ) extend CycleGAN ( Zhu et al. , 2017 ) to the video domain , by incorporating temporal consistency losses . Domain Transfer in Robotics and Graphics : The robotics and graphics communities have taken interest in cross-domain transfer of policies in recent years : • Policy Transfer with Paired Data : li it i t : r sf r rc a e a e a ali it i t : r f r r Gupta et al . ( 2017 ) ; Sermanet et al . learn morphology and viewpoint invariant feature spaces for policy transfer respectively , but require paired data to do so . • Policy Transfer via Modularity : li i l it : r sf r rc a e a ali i l it : r f r r Hejna et al . ( 2020 ) ; Devin et al . ( 2017 ) ; Sharma et al . ( 2019 ) address morphological transfer by modularity in their policies . Hejna et al . ( 2020 ) ; Sharma et al . ( 2019 ) adopt modularity in a hierarchical sense , but leverage common grounding of subgoals across morphologies to perform transfer . We do not assume access to such common grounding . • State based Policy Transfer : t t li : s r sf ra e a e c a et t li : r f r Liu et al . ( 2020 ) ; Schroecker & Isbell ( 2017 ) ; Ammar et al . ( 2015 ) address cross-morphology transfer by state based imitation learning . • Motion Retargetting : ti t tti : re a eti t tti : r The graphics community has addressed transferring behaviors across morphologically different characters ( Hecker et al. , 2008 ; Aberman et al. , 2020 ; Villegas et al. , 2018 ; Abdul-Massih et al. , 2017 ) , using carefully handcrafted kinematic models . These works transfer behaviors by imitating joint positions , and performing inverse kinematics to retrieve the full character state , which is often infeasible for widely different morphological characters . • Unsupervised Action Correspondence : i ti : s r s rr se e c e e cei ti : r rr Zhang et al . ( 2021 ) ; Kim et al . ( 2020 ) ; Smith et al . ( 2020 ) address learning low-level state and action correspondences from unpaired , unaligned interaction and demonstration data respectively . While similar in spirit , our work argues that learning highlevel skill correspondence instead is a more natural choice , as mentioned in the introduction . Applicability to learning skill correspondences : While successful in their respective problem domains , existing approaches are not trivially applicable to our problem . The adversarial training used in most of these approaches is notoriously difficult to train , and is prone to the mode dropping problem ( Li & Malik , 2019 ) . They require strong constraints such as pixel-wise or joint-wise identity losses ( Zhu et al. , 2017 ; Zhang et al. , 2021 ) , or inherent similarity of the spaces to be aligned , such as word embeddings across languages ( Conneau et al. , 2017 ; Zhou et al. , 2019 ) . Learnt skill representations do not possess this property in general . Shortcomings notwithstanding , these approaches provide insight into how we may pursue learning unsupervised skill correspondences . | This paper addresses the problem of transferring skills between morphologically different robots. This approach to learning skill correspondences is framed as a problem of matching distributions of sequences of skills across robots. The paper proposes an unsupervised objective, inspired by work in unsupervised machine translation, that makes the skill translation model learn to match the distribution of skill sequences. The proposed approach is experimentally evaluated on 3 transfer settings in a simulated robot environment. | SP:3b90d1be98c9d3d60ce7ef415b471a824076b967 |
Back2Future: Leveraging Backfill Dynamics for Improving Real-time Predictions in Future | 1 INTRODUCTION . The current COVID-19 pandemic has challenged our response capabilities to large disruptive events , affecting the health and economy of millions of people . A major tool in our response has been forecasting epidemic trajectories , which has provided lead time to policymakers to optimize and plan interventions ( Holmdahl & Buckee , 2020 ) . Broadly two classes of approaches have been devised : traditional mechanistic epidemiological models ( Shaman & Karspeck , 2012 ; Zhang et al. , 2017 ) , and the fairly newer statistical approaches ( Brooks et al. , 2018 ; Adhikari et al. , 2019 ; Osthus et al. , 2019b ) including deep learning models ( Adhikari et al. , 2019 ; Deng et al. , 2020 ; Panagopoulos et al. , 2021 ; Rodríguez et al. , 2021a ) , which have become among the top-performing ones for multiple forecasting tasks ( Reich et al. , 2019 ) . These also leverage newer digital indicators like search queries ( Ginsberg et al. , 2009 ; Yang et al. , 2015 ) and social media ( Culotta , 2010 ; Lampos et al. , 2010 ) . As noted in multiple previous works ( Metcalf & Lessler , 2017 ; Biggerstaff et al. , 2018 ) , epidemic forecasting is a challenging enterprise because it is affected by weather , mobility , strains , and others . However , real-time forecasting also brings new challenges . As noted in multiple CDC real-time forecasting initiatives for diseases like flu ( Osthus et al. , 2019a ) and COVID-19 ( Cramer et al. , 2021 ) , as well as in macroeconomics ( Clements & Galvão , 2019 ; Aguiar , 2015 ) the initially released public health data is revised many times after and is known as the ’ backfill ’ phenomenon.The various factors that affect backfill are multiple and complex , ranging from surveillance resources to human factors like coordination between health institutes and government organizations within and across regions ( Chakraborty et al. , 2018 ; Reich et al. , 2019 ; Altieri et al. , 2021 ; Stierholz , 2017 ) . While previous works have addressed anomalies ( Liu et al. , 2017 ) , missing data ( Yin et al. , 2020 ) , and data delays ( Žliobaite , 2010 ) in general time-series problems , the backfill problem has not been addressed . In contrast , the topic of revisions has not received as much attention , with few exceptions . For example in epidemic forecasting , a few papers have either ( a ) mentioned about the ‘ backfill problem ’ and its effects on performance ( Chakraborty et al. , 2018 ; Rodríguez et al. , 2021b ; Altieri et al. , 2021 ; Rangarajan et al. , 2019 ) and evaluation ( Reich et al. , 2019 ) ; or ( b ) proposed to address the problem via simple models like linear regression ( Chakraborty et al. , 2014 ) or ’ backcasting ’ ( Brooks et al. , 2018 ) the observed targets c ) used data assimilation and sensor fusion from a readily available stable set of features to refine unrevised features ( Farrow , 2016 ; Osthus et al. , 2019a ) . However , they focus only on revisions in the target and typically study in the context of influenza forecasting , which is substantially less noisy and more regular than the novel COVID-19 pandemic or assume access to stable values for some features which is not the case for COVID-19 . In economics , Clements & Galvão ( 2019 ) surveys several domain-specific ( Carriero et al. , 2015 ) or essentially linear techniques for data revision/correction behavior of several macroeconomic indicators ( Croushore , 2011 ) . Motivated from above , we study the more challenging problem of multi-variate backfill for both features and targets . We go further beyond prior work and also show how to leverage our insights for a more general neural framework to improve both predictions ( i.e . refinement of the model ’ s predictions ) and performance evaluation ( i.e . rectification from the evaluator ’ s perspective ) . Our specific contributions are the following : •Multi-variate backfill problem : We introduce the multi-variate backfill problem using real-time epidemiological forecasting as the primary motivating example . In this challenging setting , which generalizes ( the limited ) prior work , the forecast targets , as well as exogenous features , are subject to retrospective revision . Using a carefully collected diverse dataset for COVID-19 forecasting for the past year , we discover several patterns in backfill dynamics , show that there is a significant difference in real-time and revised feature measurements , and highlight the negative effects of using unrevised features for incidence forecasting in different models both for model performance and evaluation . Building on our empirical observations , we formulate the problem BFRP , which aims to ‘ correct ’ given model predictions to achieve better performance on eventual fully revised data . • Spatial and Feature level backfill modeling to refine model predictions : Motivated by the patterns in revision and observations from our empirical study , we propose a deep-learning model Back2Future ( B2F ) to model backfill revision patterns and derive latent encodings for features . B2F combines Graph Convolutional Networks that capture sparse , cross-feature , and cross-regional backfill dynamics similarity and deep sequential models that capture temporal dynamics of each features ’ backfill dynamics across time . The latent representation of all features is used along with the history of the model ’ s predictions to improve diverse classes of models trained on real-time targets , to predict targets closer to revised ground truth values . Our technique can be used as a ‘ wrapper ’ to improve model performance of any forecasting model ( mechanistic/statistical ) . • Refined top models ’ predictions and improved model evaluation : We perform an extensive empirical evaluation to show that incorporating backfill dynamics through B2F consistently improves the performance of diverse classes of top-performing COVID-19 forecasting models ( from the CDC COVID-19 Forecast Hub , including the top-performing official ensemble ) significantly . We also utilize B2F to help forecast evaluators and policy-makers better evaluate the ‘ eventual ’ true accuracy of participating models ( against revised ground truth , which may not be available until weeks later ) . This allows the model evaluators to quickly estimate models that perform better w.r.t revised stable targets instead of potentially misleading current targets . Our methodology can be adapted for other time-series forecasting problems in general . We also show the generalizability of our framework and model B2F to other domains by significantly improving predictions of non-trivial baselines for US National GDP forecasting ( Marcellino , 2008 ; Tkacz & Hu , 1999 ) . 2 NATURE OF BACKFILL DYNAMICS . In this section , we study important properties of the revision dynamics of our signals . We introduce some concepts and definitions to aid in the understanding of our empirical observations and method . Real-time forecasting . We are given a set of signals F = Reg × Feat , where Reg is the set of all regions ( where we want to forecast ) and set Feat contains our features and forecasting target ( s ) for each region . At prediction week t , x ( t ) i,1 : t is a time series from 1 to t for feature i , and the set of all signals results in the multi-variate time series X ( t ) 1 : t 1 . Similarly , Y ( t ) 1 : t is the forecasting target ( s ) time series . Further , let ’ s call all data available at time t , D ( t ) 1 : t = { X ( t ) 1 : t , Y ( t ) 1 : t } as real-time sequence . For clarity we refer to ‘ signal ’ i ∈ F as a sequence of either a feature or a target , and denote it as d ( t ) i,1 : t. 1In practice , delays are possible too , i.e , at week t , we have data for some feature i only until t− δi . All our results incorporate these situations . We defer the minor needed notational extensions to Appendix for clarity . Thus , at prediction week t , the real-time forecasting problem is : Given D ( t ) 1 : t , predict next k values of forecasting target ( s ) , i.e . ŷt+1 : t+k . Typically for CDC settings and this paper , our time unit is week , k = 4 ( up to 4 weeks ahead ) and our target is COVID-19 mortality incidence ( Deaths ) . Revisions . Data revisions ( ‘ backfill ’ ) are common . At prediction week t+ 1 , the real-time sequence D ( t+1 ) 1 : t+1 is available . In addition to the length of the sequences increasing by one ( new data point ) , values of D ( t+1 ) 1 : t+1 already in D ( t ) 1 : t may be revised i.e. , D ( t ) 1 : t 6= D ( t+1 ) 1 : t . Note that previous work has studied backfill limited to Y ( t ) , while we address it in both X ( t ) and Y ( t ) . Also , note that the data in the backfill is the same used for real-time forecasting , but just seen from a different perspective . Backfill sequences : Another useful way we propose to look at backfill is by focusing on revisions of a single value . Let ’ s focus on value of signal i at an observation week t′ . For this observation week , the value of the signal can be revised at any t > t′ , which induces a sequence of revisions . We refer to revision week r ≥ 0 as the relative amount of time that has passed since the observation week t′ . Defn . 1 . ( Backfill Sequence BSEQ ) For signal i and observation week t′ , its backfill sequence is BSEQ ( i , t′ ) = 〈d ( t ′ ) i , t′ , d ( t′+1 ) i , t′ , . . . , d ( ∞ ) i , t′ 〉 , where d ( t′ ) i , t′ is the initial value of the signal and d ( ∞ ) i , t′ is the final/stable value of the signal . Defn . 2 . ( Backfill Error BERR ) For revision week r of a backfill sequence , the backfill error is BERR ( r , i , t′ ) = |d ( t ′+r ) i , t′ − d ( ∞ ) i , t′ | / |d ( ∞ ) i , t′ | . Defn . 3 . ( Stability time STIME ) of a backfill sequence BSEQ is the revision week r∗ that is the minimum r for which the backfill error BERR < for all r > r∗ , i.e. , the time when BSEQ stabilizes . Note : We ensured that BSEQ length is at least 7 , and found that in our dataset most signals stabilize before r = 20 . For d ( ∞ ) i , t′ , we use d ( tf ) i , t′ , at the final week tf in our revisions dataset . In case we do not find BERR < in any BSEQ , we set STIME to the length of that BSEQ . We use = 0.05 . Example : For BSEQ { 223 , 236 , 236 , 404 , . . . , 404 } , BERR for third week is |236−404|404 = 0.41 and STIME is 4 . 2.1 DATASET DESCRIPTION Table 1 : List of features in our CoVDS Type Features Patient Line-List ERVisits , HospRate , +veInc , HospInc , Recovered , onVentilator , inICU Testing TestResultsInc , -veInc , Facilities Mobility RetailRec , Grocery , Parks , Transit , WorkSpace , Resident , AppleMob Exposure DexA Social Survey FbCLI , FbWiLi We collected important publicly available signals from a variety of trusted sources that are relevant to COVID-19 forecasting to form the COVID-19 Surveillance Dataset ( CoVDS ) . See Table 1 for the list of 20 features ( |Feat| = 21 , including Deaths ) . Our revisions dataset contains signals that we collected every week since April 2020 and ends on July 2021 . Our analysis covers 30 observation weeks from June 2020 to December 2020 ( to ensure all our backfill sequences are of length at least 7 ) for all |Reg| = 50 US states . The rest of the unseen data from Jan 2021 to July 2021 is used strictly for evaluation . Patient line-list : traditional surveillance signals used in epidemiological models ( Chakraborty et al. , 2014 ; Brooks et al. , 2018 ) derived from line-list records e.g . hospitalizations from CDC ( CDC , 2020 ) , positive cases , ICU admissions from COVID Tracking ( COVID-Tracking , 2020 ) . Testing : measure changes in testing from CDC and COVIDTracking e.g . tested population , negative tests , used by Rodríguez et al . ( 2021b ) . Mobility : track people movement to several point of interests ( POIs ) , from LLC ( 2020 ) and Inc. ( 2020 ) , and serve as digital proxy for social distancing ( Arik et al. , 2020 ) . Exposure : digital signal measuring closeness between people at POIs , collected from mobile phones ( Chevalier et al. , 2021 ) Social Survey : previously used by ( Wang et al. , 2020 ; Rodríguez et al. , 2021b ) CMU/Facebook Symptom Survey Data , which contains self-reported responses about COVID-19 symptoms . | The authors deal with the problem of revising previous recorded data and its effect on timeseries predictions. They showcase how revisions in past data, quantified as the backfill error, can introduce a considerable error in predictions. Towards that, they propose a novel deep learning approach, the Back2Future, that refines the model predictions using backfill dynamics. They demonstrate its efficiency on a real COVID dataset. | SP:b2c42a7bda0971e7fa51ecfd4cdf4cdb895295de |
Back2Future: Leveraging Backfill Dynamics for Improving Real-time Predictions in Future | 1 INTRODUCTION . The current COVID-19 pandemic has challenged our response capabilities to large disruptive events , affecting the health and economy of millions of people . A major tool in our response has been forecasting epidemic trajectories , which has provided lead time to policymakers to optimize and plan interventions ( Holmdahl & Buckee , 2020 ) . Broadly two classes of approaches have been devised : traditional mechanistic epidemiological models ( Shaman & Karspeck , 2012 ; Zhang et al. , 2017 ) , and the fairly newer statistical approaches ( Brooks et al. , 2018 ; Adhikari et al. , 2019 ; Osthus et al. , 2019b ) including deep learning models ( Adhikari et al. , 2019 ; Deng et al. , 2020 ; Panagopoulos et al. , 2021 ; Rodríguez et al. , 2021a ) , which have become among the top-performing ones for multiple forecasting tasks ( Reich et al. , 2019 ) . These also leverage newer digital indicators like search queries ( Ginsberg et al. , 2009 ; Yang et al. , 2015 ) and social media ( Culotta , 2010 ; Lampos et al. , 2010 ) . As noted in multiple previous works ( Metcalf & Lessler , 2017 ; Biggerstaff et al. , 2018 ) , epidemic forecasting is a challenging enterprise because it is affected by weather , mobility , strains , and others . However , real-time forecasting also brings new challenges . As noted in multiple CDC real-time forecasting initiatives for diseases like flu ( Osthus et al. , 2019a ) and COVID-19 ( Cramer et al. , 2021 ) , as well as in macroeconomics ( Clements & Galvão , 2019 ; Aguiar , 2015 ) the initially released public health data is revised many times after and is known as the ’ backfill ’ phenomenon.The various factors that affect backfill are multiple and complex , ranging from surveillance resources to human factors like coordination between health institutes and government organizations within and across regions ( Chakraborty et al. , 2018 ; Reich et al. , 2019 ; Altieri et al. , 2021 ; Stierholz , 2017 ) . While previous works have addressed anomalies ( Liu et al. , 2017 ) , missing data ( Yin et al. , 2020 ) , and data delays ( Žliobaite , 2010 ) in general time-series problems , the backfill problem has not been addressed . In contrast , the topic of revisions has not received as much attention , with few exceptions . For example in epidemic forecasting , a few papers have either ( a ) mentioned about the ‘ backfill problem ’ and its effects on performance ( Chakraborty et al. , 2018 ; Rodríguez et al. , 2021b ; Altieri et al. , 2021 ; Rangarajan et al. , 2019 ) and evaluation ( Reich et al. , 2019 ) ; or ( b ) proposed to address the problem via simple models like linear regression ( Chakraborty et al. , 2014 ) or ’ backcasting ’ ( Brooks et al. , 2018 ) the observed targets c ) used data assimilation and sensor fusion from a readily available stable set of features to refine unrevised features ( Farrow , 2016 ; Osthus et al. , 2019a ) . However , they focus only on revisions in the target and typically study in the context of influenza forecasting , which is substantially less noisy and more regular than the novel COVID-19 pandemic or assume access to stable values for some features which is not the case for COVID-19 . In economics , Clements & Galvão ( 2019 ) surveys several domain-specific ( Carriero et al. , 2015 ) or essentially linear techniques for data revision/correction behavior of several macroeconomic indicators ( Croushore , 2011 ) . Motivated from above , we study the more challenging problem of multi-variate backfill for both features and targets . We go further beyond prior work and also show how to leverage our insights for a more general neural framework to improve both predictions ( i.e . refinement of the model ’ s predictions ) and performance evaluation ( i.e . rectification from the evaluator ’ s perspective ) . Our specific contributions are the following : •Multi-variate backfill problem : We introduce the multi-variate backfill problem using real-time epidemiological forecasting as the primary motivating example . In this challenging setting , which generalizes ( the limited ) prior work , the forecast targets , as well as exogenous features , are subject to retrospective revision . Using a carefully collected diverse dataset for COVID-19 forecasting for the past year , we discover several patterns in backfill dynamics , show that there is a significant difference in real-time and revised feature measurements , and highlight the negative effects of using unrevised features for incidence forecasting in different models both for model performance and evaluation . Building on our empirical observations , we formulate the problem BFRP , which aims to ‘ correct ’ given model predictions to achieve better performance on eventual fully revised data . • Spatial and Feature level backfill modeling to refine model predictions : Motivated by the patterns in revision and observations from our empirical study , we propose a deep-learning model Back2Future ( B2F ) to model backfill revision patterns and derive latent encodings for features . B2F combines Graph Convolutional Networks that capture sparse , cross-feature , and cross-regional backfill dynamics similarity and deep sequential models that capture temporal dynamics of each features ’ backfill dynamics across time . The latent representation of all features is used along with the history of the model ’ s predictions to improve diverse classes of models trained on real-time targets , to predict targets closer to revised ground truth values . Our technique can be used as a ‘ wrapper ’ to improve model performance of any forecasting model ( mechanistic/statistical ) . • Refined top models ’ predictions and improved model evaluation : We perform an extensive empirical evaluation to show that incorporating backfill dynamics through B2F consistently improves the performance of diverse classes of top-performing COVID-19 forecasting models ( from the CDC COVID-19 Forecast Hub , including the top-performing official ensemble ) significantly . We also utilize B2F to help forecast evaluators and policy-makers better evaluate the ‘ eventual ’ true accuracy of participating models ( against revised ground truth , which may not be available until weeks later ) . This allows the model evaluators to quickly estimate models that perform better w.r.t revised stable targets instead of potentially misleading current targets . Our methodology can be adapted for other time-series forecasting problems in general . We also show the generalizability of our framework and model B2F to other domains by significantly improving predictions of non-trivial baselines for US National GDP forecasting ( Marcellino , 2008 ; Tkacz & Hu , 1999 ) . 2 NATURE OF BACKFILL DYNAMICS . In this section , we study important properties of the revision dynamics of our signals . We introduce some concepts and definitions to aid in the understanding of our empirical observations and method . Real-time forecasting . We are given a set of signals F = Reg × Feat , where Reg is the set of all regions ( where we want to forecast ) and set Feat contains our features and forecasting target ( s ) for each region . At prediction week t , x ( t ) i,1 : t is a time series from 1 to t for feature i , and the set of all signals results in the multi-variate time series X ( t ) 1 : t 1 . Similarly , Y ( t ) 1 : t is the forecasting target ( s ) time series . Further , let ’ s call all data available at time t , D ( t ) 1 : t = { X ( t ) 1 : t , Y ( t ) 1 : t } as real-time sequence . For clarity we refer to ‘ signal ’ i ∈ F as a sequence of either a feature or a target , and denote it as d ( t ) i,1 : t. 1In practice , delays are possible too , i.e , at week t , we have data for some feature i only until t− δi . All our results incorporate these situations . We defer the minor needed notational extensions to Appendix for clarity . Thus , at prediction week t , the real-time forecasting problem is : Given D ( t ) 1 : t , predict next k values of forecasting target ( s ) , i.e . ŷt+1 : t+k . Typically for CDC settings and this paper , our time unit is week , k = 4 ( up to 4 weeks ahead ) and our target is COVID-19 mortality incidence ( Deaths ) . Revisions . Data revisions ( ‘ backfill ’ ) are common . At prediction week t+ 1 , the real-time sequence D ( t+1 ) 1 : t+1 is available . In addition to the length of the sequences increasing by one ( new data point ) , values of D ( t+1 ) 1 : t+1 already in D ( t ) 1 : t may be revised i.e. , D ( t ) 1 : t 6= D ( t+1 ) 1 : t . Note that previous work has studied backfill limited to Y ( t ) , while we address it in both X ( t ) and Y ( t ) . Also , note that the data in the backfill is the same used for real-time forecasting , but just seen from a different perspective . Backfill sequences : Another useful way we propose to look at backfill is by focusing on revisions of a single value . Let ’ s focus on value of signal i at an observation week t′ . For this observation week , the value of the signal can be revised at any t > t′ , which induces a sequence of revisions . We refer to revision week r ≥ 0 as the relative amount of time that has passed since the observation week t′ . Defn . 1 . ( Backfill Sequence BSEQ ) For signal i and observation week t′ , its backfill sequence is BSEQ ( i , t′ ) = 〈d ( t ′ ) i , t′ , d ( t′+1 ) i , t′ , . . . , d ( ∞ ) i , t′ 〉 , where d ( t′ ) i , t′ is the initial value of the signal and d ( ∞ ) i , t′ is the final/stable value of the signal . Defn . 2 . ( Backfill Error BERR ) For revision week r of a backfill sequence , the backfill error is BERR ( r , i , t′ ) = |d ( t ′+r ) i , t′ − d ( ∞ ) i , t′ | / |d ( ∞ ) i , t′ | . Defn . 3 . ( Stability time STIME ) of a backfill sequence BSEQ is the revision week r∗ that is the minimum r for which the backfill error BERR < for all r > r∗ , i.e. , the time when BSEQ stabilizes . Note : We ensured that BSEQ length is at least 7 , and found that in our dataset most signals stabilize before r = 20 . For d ( ∞ ) i , t′ , we use d ( tf ) i , t′ , at the final week tf in our revisions dataset . In case we do not find BERR < in any BSEQ , we set STIME to the length of that BSEQ . We use = 0.05 . Example : For BSEQ { 223 , 236 , 236 , 404 , . . . , 404 } , BERR for third week is |236−404|404 = 0.41 and STIME is 4 . 2.1 DATASET DESCRIPTION Table 1 : List of features in our CoVDS Type Features Patient Line-List ERVisits , HospRate , +veInc , HospInc , Recovered , onVentilator , inICU Testing TestResultsInc , -veInc , Facilities Mobility RetailRec , Grocery , Parks , Transit , WorkSpace , Resident , AppleMob Exposure DexA Social Survey FbCLI , FbWiLi We collected important publicly available signals from a variety of trusted sources that are relevant to COVID-19 forecasting to form the COVID-19 Surveillance Dataset ( CoVDS ) . See Table 1 for the list of 20 features ( |Feat| = 21 , including Deaths ) . Our revisions dataset contains signals that we collected every week since April 2020 and ends on July 2021 . Our analysis covers 30 observation weeks from June 2020 to December 2020 ( to ensure all our backfill sequences are of length at least 7 ) for all |Reg| = 50 US states . The rest of the unseen data from Jan 2021 to July 2021 is used strictly for evaluation . Patient line-list : traditional surveillance signals used in epidemiological models ( Chakraborty et al. , 2014 ; Brooks et al. , 2018 ) derived from line-list records e.g . hospitalizations from CDC ( CDC , 2020 ) , positive cases , ICU admissions from COVID Tracking ( COVID-Tracking , 2020 ) . Testing : measure changes in testing from CDC and COVIDTracking e.g . tested population , negative tests , used by Rodríguez et al . ( 2021b ) . Mobility : track people movement to several point of interests ( POIs ) , from LLC ( 2020 ) and Inc. ( 2020 ) , and serve as digital proxy for social distancing ( Arik et al. , 2020 ) . Exposure : digital signal measuring closeness between people at POIs , collected from mobile phones ( Chevalier et al. , 2021 ) Social Survey : previously used by ( Wang et al. , 2020 ; Rodríguez et al. , 2021b ) CMU/Facebook Symptom Survey Data , which contains self-reported responses about COVID-19 symptoms . | The authors consider the effects of backfill dynamics--the correction of historical data--on time series prediction. They use COVID-19 forecasting as the motivating application. Both the features (ER visits, hospitalization rate, etc.) and the target (deaths) are subject to revision, and the authors collect a data set showing that the backfill error due to revisions can be extremely large. The authors make several other interesting observations regarding backfill error and sequences in their data. A key finding is that real-time forecasts tend to overestimate their accuracy when compared to the stable accuracy after errors are corrected. The authors then propose a Back2Future (B2F) pipeline that can be used to refine predictions from a model when backfill dynamics are present. They demonstrate consistent improvement on stable accuracy for multiple COVID-19 forecasts. | SP:b2c42a7bda0971e7fa51ecfd4cdf4cdb895295de |
Linear algebra with transformers | 1 INTRODUCTION . Since their introduction by Vaswani et al . ( 2017 ) , transformers , originally designed for machine translation , were applied to various problems , from text generation ( Radford et al. , 2018 ; 2019 ) to image processing ( Carion et al. , 2020 ) and speech recognition ( Dong et al. , 2018 ) where they soon achieved state-of-the-art performance ( Dosovitskiy et al. , 2021 ; Wang et al. , 2020b ) . In mathematics , transformers were used for symbolic integration ( Lample & Charton , 2019 ) , theorem proving ( Polu & Sutskever , 2020 ) , formal logic ( Hahn et al. , 2021 ) , SAT solving ( Shi et al. , 2021 ) , symbolic regression ( Biggio et al. , 2021 ) and dynamical systems ( Charton et al. , 2020 ) . All these problems pertain to symbolic mathematics , or involve a large amount of symbolic computation . When working on these tasks , transformers manipulate mathematical symbols , just like words in natural language . But mathematics are not limited to symbol manipulation : many practical applications involve numerical calculations , either exact ( e.g . arithmetic ) or approximate ( e.g . function evaluation , numerical solutions of equations ) . The use of transformers for numerical computation has been less studied , and many early experiments with arithmetic have proved disappointing ( Nogueira et al. , 2021 ) . This is , nevertheless , an important question : most problems in mathematics and science involve both symbolic and numerical computations . If we want transformers to solve these problems end-to-end , they need to be able to perform numerical calculations with high accuracy . In this paper , we train transformers to compute solutions of problems of linear algebra , which serve as fundamental building blocks in many scientific problems : basic operations on matrices , matrix inversion , eigenvalue and singular value decompositions . We introduce and discuss four encodings to represent problems and solutions as sequences that transformers can process , and train small transformers ( up to 6 layers , 10 to 50 million trainable parameters ) over generated datasets of random matrices . Trained models can compute approximate solutions to these problems ( to a few percents of their L1 norm ) with over 90 % accuracy ( 99 % in most cases ) . We also show that they can generalize out of their training distribution , and be retrained to extrapolate to larger problems than the ones they were trained on . We believe these results pave the way for using transformers as end to end solvers for problems of mathematics and science . After introducing the problems of linear algebra we are studying and presenting the encodings we use to represent them as sequences that can be used by our models , we discuss data generation , architecture and experimental settings . Then , we present our experiments on nine different problems , and discuss out-of-distribution generalization and few shot learning for eigenvalue computation . Finally , we discuss our results and future directions for research , and present related works . 2 PROBLEMS AND DATASETS . Let M and N be m× n matrices and V ∈ Rm . We study nine problems of linear algebra : • matrix transposition : find MT , a n×m matrix , • matrix addition : find M +N , a m× n matrix , • matrix-vector multiplication : find MTV , a vector in Rn , • matrix multiplication : find MTN , a n× n matrix , • eigenvalues : M symmetric , find its n ( real ) eigenvalues , sorted in descending order , • eigenvectors : M symmetric , find D diagonal and Q orthogonal such that M = QTDQ , set as a ( n+ 1 ) × n matrix , with ( sorted ) eigenvalues in its first line , • singular values : find the n eigenvalues of MTM , sorted in descending order , • singular value decomposition : find orthogonal U , V and diagonal S such that M = USV , set as a ( m+ n+ 1 ) ×min ( m , n ) matrix , • inversion : M square and invertible , find its inverse P , such that MP = PM = Id . These problems range from basic operations on individual coefficients of the input matrices ( transposition and addition ) , to computations involving several arithmetic operations over many coefficients ( multiplication ) , and complex nonlinear transformations involving the whole matrix , with cubic complexity ( decompositions and inversion ) . For each problem , we generate datasets of pairs of matrices ( I , O ) , by sampling random input matrices I ( see section 2.2 ) , and computing the output O with a linear algebra package ( NumPy linalg ) . When a problem has several input or output matrices , they are concatenated into one ( for instance , the two m× n operands of the addition task are concatenated into onem×2nmatrix I ) . All coefficients in I andO are set in base ten floating-point representation , and rounded to three significant digits in the mantissa . 2.1 ENCODING MATRICES AS SEQUENCES . The input and output to our problems are matrices . To be processed by transformers , they need to be converted into sequences of tokens . We encode a m×n matrix by first coding its dimensions as two symbolic tokens ( Vm and Vn ) , followed by its mn coefficients , encoded as sequences . Through this paper , we will use four encoding schemes for matrix coefficients : P10 , P1000 , B1999 , and FP15 . In base 10 positional encoding ( P10 ) , a number is represented as a sequence of five tokens : one sign token ( + or - ) , 3 digits ( from 0 to 9 ) for the mantissa , and a symbolic token ( from E-100 to E+100 ) for the exponent . For instance 3.14 will be represented as 314.10−2 , and encoded as [ + , 3 , 1 , 4 , E-2 ] . P1000 ( positional base 1000 ) provides a more compact representation by encoding the mantissa as a single token ( from 0 to 999 ) , and representing a number as the triplet ( sign , mantissa , exponent ) . B1999 ( balanced base 1999 ) pushes this one step further by encoding together the sign and mantissa ( from -999 to 999 ) . Finally , FP15 encodes each floating point number x = m10b as a unique token FPm/b . Table 1 provides examples of these encodings . Additional details and examples can be found in Appendix A . Selecting an encoding is a trade-off . Long encodings ( P10 , P1000 ) embed knowledge about numbers that the model can leverage ( e.g . numbers can be compared using their signs and exponents , addition and multiplication can be learned by memorizing small tables ) . Compact encodings use a larger vocabulary ( harder to learn ) , but generate shorter sequences that facilitate training with transformers . In P10 , a 20 × 20 matrix is a sequence of 2002 tokens , close to the practical limit of transformer implementations that use a quadratic attention mechanism . In FP15 , it is only 402 tokens long . 2.2 RANDOM MATRIX GENERATION . In most of our experiments , we train models over datasets of random matrices with uniformly distributed coefficients in [ −A , A ] ( with A = 10 ) . Occasionally , we sample gaussian coefficients with the same standard deviation ( σ = A/ √ 3 ) . In the symmetric case , these matrices are known as Wigner matrices . Their eigenvalues have a centered distribution with standard deviation σ = √ ns , where s is the standard deviation of the coefficients ( Mehta , 2004 ) . As n increases , this distribution converges to the semi-circle law ( p ( λ ) = √ 4σ2 − λ2/2πσ2 ) for all coefficient distributions with bounded variance . If the coefficients are gaussian , the associated eigenvectors are uniformly distributed over the unit sphere . When investigating out-of-distribution generalization for the eigenvalue problem , we will need to generate random symmetric matrices with different distributions of their eigenvalues ( corresponding to random matrices with non iid coefficients ) . To this effect , we randomly sample symmetric matrices M , with gaussian coefficients , and compute their eigenvalue decomposition M = PDPT , with P the orthogonal matrix of eigenvectors ( uniformly distributed over the unit sphere since the coefficients are gaussian ) . We then replace D , the diagonal matrix of eigenvalues of M , with a diagonal D′ sampled from another distribution . Finally , we recompute M ′ = PD′PT , a symmetric matrix ( because P is orthogonal ) with eigenvalues distributed as we choose , and eigenvectors uniformly distributed over the unit sphere . 3 MODELS AND EXPERIMENTAL SETTINGS . We use the standard transformer architecture introduced in Vaswani et al . ( 2017 ) , with an encoder and a decoder connected by a cross-attention mechanism . Most of our models have 512 dimensions , 8 attention heads and up to 6 layers . We experiment with different number of layers and attention heads in the encoder and decoder . All training is supervised , and minimizes the cross-entropy between model prediction and the correct solution . We use the Adam optimizer ( Kingma & Ba , 2014 ) with a learning rate of 10−4 , an initial warm-up phase of 10,000 steps and cosine scheduling ( Loshchilov & Hutter , 2016 ) . All training data is generated on the fly , in batches of 64 examples . Every 300,000 examples , 10,000 random problems are generated and used to evaluate the model . When evaluating , we consider that a predicted sequence seqP is a correct solution to the problem ( I , O ) ( I and O the input and output matrices ) if it can be decoded as a valid matrix P ( several matrices for singular and eigen decomposition ) that approximates the correct solution to a given tolerance τ ( τ ∈ { 5 , 2 , 1 , 0.5 % } ) . For addition , transposition , multiplication , eigen and singular values we check that P verifies ‖P − O‖ < τ‖O‖ ( with ‖A‖ = ∑ i , j |ai , j | , for A = ( ai , j ) , i.e . L1 norm ) . For eigenvalue decomposition , we check that the solution ( Q , D ) predicted by the model can reconstruct the input matrix , i.e . ‖QTDQ− I‖ < τ‖I‖ . For singular value decomposition , we check that ‖USV − I‖ < τ‖I‖ . For matrix inversion , we check that ‖PI − Id‖ < τ‖Id‖ = τ . The choice of the L1 norm is important : norms like L2 and L∞ will favor models that correctly predict the largest coefficients in the solution . For eigen and singular value problems , this amounts to predicting the largest values , an easier problem than the one we want to solve . We consider different tolerances for different problems . Since we round numbers to three significant digits , 0.5 % is the best we can hope . In fact , a number xwith mantissa 1.00 is subjected to a maximal rounding error of 0.5 % ( x ∈ ] 1.005 , 0.995 ] ) , which may accumulate when several ( rounded ) numbers are summed , and increase again when nonlinear operations are considered . When discussing results , we consider tolerances of 0 % for transposition , which involves no arithmetic , 1 % for basic matrix operations ( addition , multiplication ) , and 2 or 5 % for non linear operations ( decomposition , inversion ) , but we usually provide results for all tolerance levels . Most of our experiments focus on 5× 5 square matrices , or rectangular matrices with as many coefficients ( e.g . 6× 4 , 2× 13 ) . This helps when comparing encodings : for larger dimensions , varying sequence lengths make comparisons difficult . We also study scaled-up versions of the problems ( from 8 × 8 to 15 × 15 ) , and datasets with matrices of variable dimensions ( 5-10 or 5-15 ) . In this paper , we limit ourselves to problem that can be solved using small models ( with up to 6 layers ) . Scaling to larger problems , and leveraging deeper architectures is left for future research . | This paper “Linear algebra with transformers” studies the application of seq2seq transformers to matrix operations. It studies their performance across different encodings of floating point numbers, different sizes of matrices, different operations, and different (synthetic) data distributions. The main findings are that transformers work surprisingly well on various matrix operations (addition, multiplication, eigenvalues, inversion, SVD, …) for small matrices (e.g. 5x5), and that generalization to OOD problems is not symmetric (I.e. generalization from one distribution to another does not imply the other way round). | SP:b665f2dbd3a30e5a4d3942abc7b8f9d45db41cb8 |
Linear algebra with transformers | 1 INTRODUCTION . Since their introduction by Vaswani et al . ( 2017 ) , transformers , originally designed for machine translation , were applied to various problems , from text generation ( Radford et al. , 2018 ; 2019 ) to image processing ( Carion et al. , 2020 ) and speech recognition ( Dong et al. , 2018 ) where they soon achieved state-of-the-art performance ( Dosovitskiy et al. , 2021 ; Wang et al. , 2020b ) . In mathematics , transformers were used for symbolic integration ( Lample & Charton , 2019 ) , theorem proving ( Polu & Sutskever , 2020 ) , formal logic ( Hahn et al. , 2021 ) , SAT solving ( Shi et al. , 2021 ) , symbolic regression ( Biggio et al. , 2021 ) and dynamical systems ( Charton et al. , 2020 ) . All these problems pertain to symbolic mathematics , or involve a large amount of symbolic computation . When working on these tasks , transformers manipulate mathematical symbols , just like words in natural language . But mathematics are not limited to symbol manipulation : many practical applications involve numerical calculations , either exact ( e.g . arithmetic ) or approximate ( e.g . function evaluation , numerical solutions of equations ) . The use of transformers for numerical computation has been less studied , and many early experiments with arithmetic have proved disappointing ( Nogueira et al. , 2021 ) . This is , nevertheless , an important question : most problems in mathematics and science involve both symbolic and numerical computations . If we want transformers to solve these problems end-to-end , they need to be able to perform numerical calculations with high accuracy . In this paper , we train transformers to compute solutions of problems of linear algebra , which serve as fundamental building blocks in many scientific problems : basic operations on matrices , matrix inversion , eigenvalue and singular value decompositions . We introduce and discuss four encodings to represent problems and solutions as sequences that transformers can process , and train small transformers ( up to 6 layers , 10 to 50 million trainable parameters ) over generated datasets of random matrices . Trained models can compute approximate solutions to these problems ( to a few percents of their L1 norm ) with over 90 % accuracy ( 99 % in most cases ) . We also show that they can generalize out of their training distribution , and be retrained to extrapolate to larger problems than the ones they were trained on . We believe these results pave the way for using transformers as end to end solvers for problems of mathematics and science . After introducing the problems of linear algebra we are studying and presenting the encodings we use to represent them as sequences that can be used by our models , we discuss data generation , architecture and experimental settings . Then , we present our experiments on nine different problems , and discuss out-of-distribution generalization and few shot learning for eigenvalue computation . Finally , we discuss our results and future directions for research , and present related works . 2 PROBLEMS AND DATASETS . Let M and N be m× n matrices and V ∈ Rm . We study nine problems of linear algebra : • matrix transposition : find MT , a n×m matrix , • matrix addition : find M +N , a m× n matrix , • matrix-vector multiplication : find MTV , a vector in Rn , • matrix multiplication : find MTN , a n× n matrix , • eigenvalues : M symmetric , find its n ( real ) eigenvalues , sorted in descending order , • eigenvectors : M symmetric , find D diagonal and Q orthogonal such that M = QTDQ , set as a ( n+ 1 ) × n matrix , with ( sorted ) eigenvalues in its first line , • singular values : find the n eigenvalues of MTM , sorted in descending order , • singular value decomposition : find orthogonal U , V and diagonal S such that M = USV , set as a ( m+ n+ 1 ) ×min ( m , n ) matrix , • inversion : M square and invertible , find its inverse P , such that MP = PM = Id . These problems range from basic operations on individual coefficients of the input matrices ( transposition and addition ) , to computations involving several arithmetic operations over many coefficients ( multiplication ) , and complex nonlinear transformations involving the whole matrix , with cubic complexity ( decompositions and inversion ) . For each problem , we generate datasets of pairs of matrices ( I , O ) , by sampling random input matrices I ( see section 2.2 ) , and computing the output O with a linear algebra package ( NumPy linalg ) . When a problem has several input or output matrices , they are concatenated into one ( for instance , the two m× n operands of the addition task are concatenated into onem×2nmatrix I ) . All coefficients in I andO are set in base ten floating-point representation , and rounded to three significant digits in the mantissa . 2.1 ENCODING MATRICES AS SEQUENCES . The input and output to our problems are matrices . To be processed by transformers , they need to be converted into sequences of tokens . We encode a m×n matrix by first coding its dimensions as two symbolic tokens ( Vm and Vn ) , followed by its mn coefficients , encoded as sequences . Through this paper , we will use four encoding schemes for matrix coefficients : P10 , P1000 , B1999 , and FP15 . In base 10 positional encoding ( P10 ) , a number is represented as a sequence of five tokens : one sign token ( + or - ) , 3 digits ( from 0 to 9 ) for the mantissa , and a symbolic token ( from E-100 to E+100 ) for the exponent . For instance 3.14 will be represented as 314.10−2 , and encoded as [ + , 3 , 1 , 4 , E-2 ] . P1000 ( positional base 1000 ) provides a more compact representation by encoding the mantissa as a single token ( from 0 to 999 ) , and representing a number as the triplet ( sign , mantissa , exponent ) . B1999 ( balanced base 1999 ) pushes this one step further by encoding together the sign and mantissa ( from -999 to 999 ) . Finally , FP15 encodes each floating point number x = m10b as a unique token FPm/b . Table 1 provides examples of these encodings . Additional details and examples can be found in Appendix A . Selecting an encoding is a trade-off . Long encodings ( P10 , P1000 ) embed knowledge about numbers that the model can leverage ( e.g . numbers can be compared using their signs and exponents , addition and multiplication can be learned by memorizing small tables ) . Compact encodings use a larger vocabulary ( harder to learn ) , but generate shorter sequences that facilitate training with transformers . In P10 , a 20 × 20 matrix is a sequence of 2002 tokens , close to the practical limit of transformer implementations that use a quadratic attention mechanism . In FP15 , it is only 402 tokens long . 2.2 RANDOM MATRIX GENERATION . In most of our experiments , we train models over datasets of random matrices with uniformly distributed coefficients in [ −A , A ] ( with A = 10 ) . Occasionally , we sample gaussian coefficients with the same standard deviation ( σ = A/ √ 3 ) . In the symmetric case , these matrices are known as Wigner matrices . Their eigenvalues have a centered distribution with standard deviation σ = √ ns , where s is the standard deviation of the coefficients ( Mehta , 2004 ) . As n increases , this distribution converges to the semi-circle law ( p ( λ ) = √ 4σ2 − λ2/2πσ2 ) for all coefficient distributions with bounded variance . If the coefficients are gaussian , the associated eigenvectors are uniformly distributed over the unit sphere . When investigating out-of-distribution generalization for the eigenvalue problem , we will need to generate random symmetric matrices with different distributions of their eigenvalues ( corresponding to random matrices with non iid coefficients ) . To this effect , we randomly sample symmetric matrices M , with gaussian coefficients , and compute their eigenvalue decomposition M = PDPT , with P the orthogonal matrix of eigenvectors ( uniformly distributed over the unit sphere since the coefficients are gaussian ) . We then replace D , the diagonal matrix of eigenvalues of M , with a diagonal D′ sampled from another distribution . Finally , we recompute M ′ = PD′PT , a symmetric matrix ( because P is orthogonal ) with eigenvalues distributed as we choose , and eigenvectors uniformly distributed over the unit sphere . 3 MODELS AND EXPERIMENTAL SETTINGS . We use the standard transformer architecture introduced in Vaswani et al . ( 2017 ) , with an encoder and a decoder connected by a cross-attention mechanism . Most of our models have 512 dimensions , 8 attention heads and up to 6 layers . We experiment with different number of layers and attention heads in the encoder and decoder . All training is supervised , and minimizes the cross-entropy between model prediction and the correct solution . We use the Adam optimizer ( Kingma & Ba , 2014 ) with a learning rate of 10−4 , an initial warm-up phase of 10,000 steps and cosine scheduling ( Loshchilov & Hutter , 2016 ) . All training data is generated on the fly , in batches of 64 examples . Every 300,000 examples , 10,000 random problems are generated and used to evaluate the model . When evaluating , we consider that a predicted sequence seqP is a correct solution to the problem ( I , O ) ( I and O the input and output matrices ) if it can be decoded as a valid matrix P ( several matrices for singular and eigen decomposition ) that approximates the correct solution to a given tolerance τ ( τ ∈ { 5 , 2 , 1 , 0.5 % } ) . For addition , transposition , multiplication , eigen and singular values we check that P verifies ‖P − O‖ < τ‖O‖ ( with ‖A‖ = ∑ i , j |ai , j | , for A = ( ai , j ) , i.e . L1 norm ) . For eigenvalue decomposition , we check that the solution ( Q , D ) predicted by the model can reconstruct the input matrix , i.e . ‖QTDQ− I‖ < τ‖I‖ . For singular value decomposition , we check that ‖USV − I‖ < τ‖I‖ . For matrix inversion , we check that ‖PI − Id‖ < τ‖Id‖ = τ . The choice of the L1 norm is important : norms like L2 and L∞ will favor models that correctly predict the largest coefficients in the solution . For eigen and singular value problems , this amounts to predicting the largest values , an easier problem than the one we want to solve . We consider different tolerances for different problems . Since we round numbers to three significant digits , 0.5 % is the best we can hope . In fact , a number xwith mantissa 1.00 is subjected to a maximal rounding error of 0.5 % ( x ∈ ] 1.005 , 0.995 ] ) , which may accumulate when several ( rounded ) numbers are summed , and increase again when nonlinear operations are considered . When discussing results , we consider tolerances of 0 % for transposition , which involves no arithmetic , 1 % for basic matrix operations ( addition , multiplication ) , and 2 or 5 % for non linear operations ( decomposition , inversion ) , but we usually provide results for all tolerance levels . Most of our experiments focus on 5× 5 square matrices , or rectangular matrices with as many coefficients ( e.g . 6× 4 , 2× 13 ) . This helps when comparing encodings : for larger dimensions , varying sequence lengths make comparisons difficult . We also study scaled-up versions of the problems ( from 8 × 8 to 15 × 15 ) , and datasets with matrices of variable dimensions ( 5-10 or 5-15 ) . In this paper , we limit ourselves to problem that can be solved using small models ( with up to 6 layers ) . Scaling to larger problems , and leveraging deeper architectures is left for future research . | The authors train generic, dense transformers to perform several standard linear algebra computations, ranging from simple tasks like transposition to complex nonlinear tasks such as matrix inversion. They restrict themselves to relatively small matrices due to the practical limits of the dense, quadratic attention mechanism. The main result of the paper is that transformers can perform fairly well on all tasks, meaning that they can usually produce outputs that are correct upto relatively small tolerance. The paper also shows that some forms of out-of-distribution generalization are possible, and that this phenomenon is sensitive to the details of the training distribution. | SP:b665f2dbd3a30e5a4d3942abc7b8f9d45db41cb8 |
Multi-Task Processes | 1 INTRODUCTION . Neural Processes ( NPs ) ( Garnelo et al. , 2018b ) are a class of meta-learning methods that model a distribution of functions ( i.e . a stochastic process ) . By considering a task as a function realized from the underlying stochastic process , they can flexibly adapt to various unseen tasks through inference on functions . The adaptation requires only one forward step of a trained neural network without any costly retraining or fine-tuning , and has linear complexity to the data size . NPs can also quantify their prediction uncertainty , which is essential in risk-sensitive applications ( Gal & Ghahramani , 2016 ) . Thanks to such appealing properties , there have been increasing attempts to improve NPs in various domains , such as image regression ( Kim et al. , 2019 ; Gordon et al. , 2020 ) , image classification ( Requeima et al. , 2019 ; Wang & Van Hoof , 2020 ) , time series regression ( Qin et al. , 2019 ; Norcliffe et al. , 2021 ) , and spatio-temporal regression ( Singh et al. , 2019 ) . In this paper , we explore extending NPs to a multi-task setting where correlated tasks are realized simultaneously from multiple stochastic processes . Many real-world data represent multiple correlated functions , such as different attributes or modalities . For instance , medical data ( Johnson et al. , 2016 ; Harutyunyan et al. , 2019 ) or climate data ( Wang et al. , 2016 ) contain various correlated attributes on a patient or a region that need to be inferred simultaneously . Similarly , in multi-task vision data ( Lin et al. , 2014 ; Zhou et al. , 2017 ; Zamir et al. , 2018 ) , multiple labels of different visual modalities are associated with an image . In such scenarios , it is beneficial to exploit functional correlation by modeling the functions jointly rather than independently , in terms of performance and efficiency ( Caruana , 1997 ) . Unfortunately , naive NPs lack mechanisms to jointly handle a set of multiple functions and can not capture their correlations either . This motivates us to extend NPs to model multiple tasks jointly by exploiting the inter-task correlation . In addition to extending NPs to multi-task settings , we note that handling multi-task data often faces a practical challenge where observations can be incomplete ( i.e . not all the functions share the common sample locations ) . For example , when we collect multi-modal signals from different sensors , the sensors may have asynchronous sampling rates , in which case we can observe signals from only an arbitrary subset of sensors at a time . To fully utilize such incomplete observations , the model should be able to associate functions observed in different inputs such that it can improve the predictive performance of all functions using their correlation . A multivariate extension of Gaussian Processes ( GPs ) ( Álvarez et al. , 2012 ) can handle incomplete observations to infer multiple functions jointly . However , naive GPs suffer from cubic complexity to the data size and needs approximations to reduce the complexity . Also , their behaviour depend heavily on the kernel choice ( Kim et al. , 2019 ) . To address these challenges , we introduce Multi-Task Neural Processes ( MTNPs ) , a new family of stochastic processes that jointly models multiple tasks given possibly incomplete data . We first design a combined space of multiple functions , which allows not only joint inference on the functions but also handling incomplete data . Then we define a Latent Variable Model ( LVM ) of MTNP that theoretically induces a stochastic process over the combined function space . To exploit the inter-task correlation , we introduce a hierarchical LVM consists of ( 1 ) a global latent variable that captures knowledge about all tasks and ( 2 ) task-specific latent variables that additionally capture knowledge specific to each task conditioned on the global latent variable . Inducing each task conditioned on the global latent , the hierarchical LVM allows MTNP to effectively learn and exploit functional correlation in multi-task inference . MTNP also inherits advantages of NP , such as flexible adaptation , scalable inference , and uncertainty-aware prediction . Experiments in synthetic and real-world datasets show that MTNPs effectively utilize incomplete observations from multiple tasks and outperform several NP variants in terms of accuracy , uncertainty estimation , and prediction coherency . 2 PRELIMINARY . 2.1 BACKGROUND : NEURAL PROCESSES . We consider a task f t : X → Yt as a realization of a stochastic process over a function space ( Yt ) X that generates a data Dt = ( XD , Y tD ) = { ( xi , yti ) } i∈I ( Dt ) , where I ( Dt ) denotes a set of data index . Neural Processes ( NPs ) use a conditional latent variable model to learn the stochastic process . Given a set of observations Ct = ( XC , Y tC ) = { ( xi , yti ) } i∈I ( Ct ) , NP infers the target task f t through a latent variable z and models the data Dt by a factorized conditional distribution p ( Y tD|XD , z ) : p ( Y tD|XD , Ct ) = ∫ p ( Y tD|XD , z ) p ( z|Ct ) dz = ∫ ∏ i∈I ( Dt ) p ( yti |xi , z ) p ( z|Ct ) dz . ( 1 ) We refer to the set of observations Ct as a context data and the modeling data Dt as a target data . NP models the generative model p ( Y tD|XD , z ) and the conditional prior p ( z|Ct ) by two neural networks , a decoder pθ and an encoder qφ , respectively . Since the direct optimization of Eq.1 is intractable , the networks are trained by maximizing the following variational lower-bound . log pθ ( Y t D|XD , Ct ) ≥ Eqφ ( z|Dt ) [ log pθ ( Y t D|XD , z ) ] −DKL ( qφ ( z|Dt ) ||qφ ( z|Ct ) ) . ( 2 ) Note that the decoder network qφ is also used as a variational posterior qφ ( z|D ) . The parameter sharing between model prior and variational posterior gives us an intuitive interpretation of the loss function : the KL term acts as a regularizer for the encoder qφ such that the summary of the context is close to the summary of the target . This reflects the assumption that the context and target are generated by the same underlying data-generating process and aids effective test-time adaptation . After training , NP infers the target function according to the latent variable model ( Eq.1 ) . 2.2 EXTENDING TO MULTIPLE TARGET FUNCTIONS . Now we extend the setting to multi-task learning problems where multiple tasks f1 , · · · , fT are realized from T stochastic processes simultaneously , each of which has its own function space ( Yt ) X , ∀t ∈ T = { 1 , 2 , · · · , T } . Let D = ( XD , Y 1 : TD ) = ⋃ t∈T D t be a multi-task target data , where each Dt corresponds to the data of task f t. Then the learning objective for the set of T realized tasks is to model the conditional probability p ( Y 1 : TD |XD , C ) given the multi-task context C = ( XC , Y 1 : T C ) = ⋃ t∈T C t , where each Ct is a set of observations of task f t. The sets C and D can be arbitrarily chosen , but we assume C ⊂ D for simplicity . However , assuming the complete context C for all tasks is often challenged by many practical issues , such as asynchronous sampling across multiple sensors or missing labels in multi-attribute data . To address such challenges , we relax the assumptions on context C and let I ( Ct ) be different across t ∈ T . In this case , an input point xi can be associated with a partial set of output values { yti } t∈Ti , Ti ( T , which is referred incomplete observation . Next , we present two ways to use NPs to model the multi-task data and discuss their limitations . Single-Task Neural Processes ( STNPs ) A straightforward application of NPs to the multi-task setting is assuming independence across tasks and define independent NPs over the function spaces ( Y1 ) X , · · · , ( YT ) X . We refer to this approach as Single-Task Neural Processes ( STNPs ) . Specifically , a STNP has T independent latent variables v1 , · · · , vT , where each vt implicitly represents a task f t. p ( Y 1 : TD |XD , C ) = T∏ t=1 ∫ p ( Y tD|XD , vt ) p ( vt|Ct ) dvt . ( 3 ) Thanks to the independence assumption , STNPs can handle incomplete context by conditioning on each task-specific data Ct independently . However , this approach can only model the marginal distributions for each task , ignoring complex inter-task correlation within the joint distribution of the tasks . Note that this is especially impractical for multi-task settings under the incomplete data since each task f t can be learned only from Ct , ignoring rich contexts available in other data Ct ′ , ∀t′ 6= t. Joint-Task Neural Process ( JTNP ) An alternative approach is to combine output spaces to a product space Y1 : T = ∏ t∈T Yt and define a single NP over the function space ( Y1 : T ) X . We refer to this approach as Joint-Task Neural Processes ( JTNPs ) . In this case , a single latent variable z governs all T tasks jointly . p ( Y 1 : TD |XD , C ) = ∫ p ( Y 1 : TD |XD , z ) p ( z|C ) dz . ( 4 ) JTNPs are amenable to incorporate correlation across tasks through the shared variable z . However , by definition , they require complete context and target for both training and inference . This is because any incomplete set of output values { yti } t∈Ti for an input point xi such that Ti 6= T is not a valid element of the product space Y1 : T . In addition , it relies solely on a single latent variable to explain all tasks , ignoring per-task stochastic factors in each function f t. In what follows , we propose an alternative formulation for jointly handling multiple tasks on incomplete data , which ( 1 ) enables a probabilistic inference on the incomplete data and ( 2 ) is more amenable for learning both task-specific and task-agnostic functional representations . 3 MULTI-TASK NEURAL PROCESSES . In this section , we describe Multi-Task Neural Processes ( MTNPs ) , a family of stochastic processes to model multiple functions jointly and handle incomplete data . We first formulate MTNPs using a hierarchical LVM . Then we propose the training objective and a neural network model . 3.1 FORMULATION . Our objective is to extend NPs to jointly infer multiple tasks from incomplete context . Discussions in Section 2.2 suggest that direct modeling of a distribution over functions of form f : X →∏ t∈T Yt is achievable via JTNP ( Eq . 4 ) , yet it requires complete data in both training and inference . To circumvent this problem , we reformulate the functional form by h : X × T → ⋃ t∈T Yt . Note that this functional form allows us to model the same set of functions as JTNP by f ( xi ) = ( h ( xi , 1 ) , · · · , h ( xi , T ) ) . However , by using the union form we can exploit incomplete data since any partial set of output values { yti } t∈Ti now becomes a set of valid output values at different input points ( xi , t ) , t ∈ Ti . For notational convenience , we denote xti = ( xi , t ) and assume input points in the context C and the target D are embedded by the task indices , i.e. , C = ( X1 : TC , Y 1 : T C ) = ⋃ t∈T C t where Ct = ( XtC , Y t C ) = { ( xti , yti ) } i∈I ( Ct ) and the same for D. Next , we present a latent variable model that induces a stochastic process over functions of form h. To make use of both task-agnostic and task-specific knowledge , we define a hierarchical latent variable model ( Figure 1 ( c ) ) . In this model , the global latent variable z captures shared stochastic factors across tasks using the whole context C , while per-task stochastic factors are captured by the task-specific latent variable vt using Ct and z . It induces the predictive distribution on the target by : p ( Y 1 : TD |X1 : TD , C ) = ∫ ∫ [ T∏ t=1 p ( Y tD|XtD , vt ) p ( vt|z , Ct ) ] p ( z|C ) dv1 : T dz , ( 5 ) where v1 : T : = ( v1 , · · · , vT ) . Similar to Eq . 1 , we assume the conditional independence on p ( Y tD|XtD , vt ) . Note that this hierarchical model can capture and leverage the inter-task correlation by sharing the same z across v1 : T . Also , it is amenable to fully utilize the incomplete data : since the global variable z is inferred from the entire context data C = ⋃ t∈T C t and is conditioned to infer task-specific latent variable vt , each function f t induced by vt exploits the observations available for not only itself Ct , but also for other tasks Ct ′ , ∀t′ 6= t. Next , we show that Eq . 5 induces a stochastic process over the functions of form h : X × T → ⋃ t∈T Yt . Proposition 1 . Consider the following generative process on data D and context C , which is a generalized form of Eq . 5. z ∼ p ( z|C ) , vt ∼ p ( vt|z , t , C ) , yti ∼ p ( yti |xti , vt ) , ∀t ∈ T , ∀i ∈ I ( D ) . ( 6 ) Then under some mild assumptions , there exists a stochastic process over functions of form h : X × T → ⋃ t∈T Yt , where the data D is generated . Proof . We leave the proof in Appendix A.2 . We refer to the resulting stochastic processes as Multi-Task Neural Processes ( MTNPs ) . In the perspective of stochastic process , Eq . 5 allows us to learn functional posterior not only on each task via vt , but also across the tasks via z . Then optimizing Eq . 5 can be interpreted as learning to learn each task captured by vt together with the functional correlation captured by z . | The paper presents a novel model for multi-task learning with missing data based on Neural Processes (NP). Inter-task correlations are modelled via a shared latent variable. The model has been tested on 1 synthetic and 2 real-world datasets and is experimentally shown to perform better against 4 baselines including 2 naive extensions of NP to the multi-task setting and 2 multi-output Gaussian process models (with spectral kernels). | SP:2020439f6e52ec592e2fbc454633c1613e8a82c1 |
Multi-Task Processes | 1 INTRODUCTION . Neural Processes ( NPs ) ( Garnelo et al. , 2018b ) are a class of meta-learning methods that model a distribution of functions ( i.e . a stochastic process ) . By considering a task as a function realized from the underlying stochastic process , they can flexibly adapt to various unseen tasks through inference on functions . The adaptation requires only one forward step of a trained neural network without any costly retraining or fine-tuning , and has linear complexity to the data size . NPs can also quantify their prediction uncertainty , which is essential in risk-sensitive applications ( Gal & Ghahramani , 2016 ) . Thanks to such appealing properties , there have been increasing attempts to improve NPs in various domains , such as image regression ( Kim et al. , 2019 ; Gordon et al. , 2020 ) , image classification ( Requeima et al. , 2019 ; Wang & Van Hoof , 2020 ) , time series regression ( Qin et al. , 2019 ; Norcliffe et al. , 2021 ) , and spatio-temporal regression ( Singh et al. , 2019 ) . In this paper , we explore extending NPs to a multi-task setting where correlated tasks are realized simultaneously from multiple stochastic processes . Many real-world data represent multiple correlated functions , such as different attributes or modalities . For instance , medical data ( Johnson et al. , 2016 ; Harutyunyan et al. , 2019 ) or climate data ( Wang et al. , 2016 ) contain various correlated attributes on a patient or a region that need to be inferred simultaneously . Similarly , in multi-task vision data ( Lin et al. , 2014 ; Zhou et al. , 2017 ; Zamir et al. , 2018 ) , multiple labels of different visual modalities are associated with an image . In such scenarios , it is beneficial to exploit functional correlation by modeling the functions jointly rather than independently , in terms of performance and efficiency ( Caruana , 1997 ) . Unfortunately , naive NPs lack mechanisms to jointly handle a set of multiple functions and can not capture their correlations either . This motivates us to extend NPs to model multiple tasks jointly by exploiting the inter-task correlation . In addition to extending NPs to multi-task settings , we note that handling multi-task data often faces a practical challenge where observations can be incomplete ( i.e . not all the functions share the common sample locations ) . For example , when we collect multi-modal signals from different sensors , the sensors may have asynchronous sampling rates , in which case we can observe signals from only an arbitrary subset of sensors at a time . To fully utilize such incomplete observations , the model should be able to associate functions observed in different inputs such that it can improve the predictive performance of all functions using their correlation . A multivariate extension of Gaussian Processes ( GPs ) ( Álvarez et al. , 2012 ) can handle incomplete observations to infer multiple functions jointly . However , naive GPs suffer from cubic complexity to the data size and needs approximations to reduce the complexity . Also , their behaviour depend heavily on the kernel choice ( Kim et al. , 2019 ) . To address these challenges , we introduce Multi-Task Neural Processes ( MTNPs ) , a new family of stochastic processes that jointly models multiple tasks given possibly incomplete data . We first design a combined space of multiple functions , which allows not only joint inference on the functions but also handling incomplete data . Then we define a Latent Variable Model ( LVM ) of MTNP that theoretically induces a stochastic process over the combined function space . To exploit the inter-task correlation , we introduce a hierarchical LVM consists of ( 1 ) a global latent variable that captures knowledge about all tasks and ( 2 ) task-specific latent variables that additionally capture knowledge specific to each task conditioned on the global latent variable . Inducing each task conditioned on the global latent , the hierarchical LVM allows MTNP to effectively learn and exploit functional correlation in multi-task inference . MTNP also inherits advantages of NP , such as flexible adaptation , scalable inference , and uncertainty-aware prediction . Experiments in synthetic and real-world datasets show that MTNPs effectively utilize incomplete observations from multiple tasks and outperform several NP variants in terms of accuracy , uncertainty estimation , and prediction coherency . 2 PRELIMINARY . 2.1 BACKGROUND : NEURAL PROCESSES . We consider a task f t : X → Yt as a realization of a stochastic process over a function space ( Yt ) X that generates a data Dt = ( XD , Y tD ) = { ( xi , yti ) } i∈I ( Dt ) , where I ( Dt ) denotes a set of data index . Neural Processes ( NPs ) use a conditional latent variable model to learn the stochastic process . Given a set of observations Ct = ( XC , Y tC ) = { ( xi , yti ) } i∈I ( Ct ) , NP infers the target task f t through a latent variable z and models the data Dt by a factorized conditional distribution p ( Y tD|XD , z ) : p ( Y tD|XD , Ct ) = ∫ p ( Y tD|XD , z ) p ( z|Ct ) dz = ∫ ∏ i∈I ( Dt ) p ( yti |xi , z ) p ( z|Ct ) dz . ( 1 ) We refer to the set of observations Ct as a context data and the modeling data Dt as a target data . NP models the generative model p ( Y tD|XD , z ) and the conditional prior p ( z|Ct ) by two neural networks , a decoder pθ and an encoder qφ , respectively . Since the direct optimization of Eq.1 is intractable , the networks are trained by maximizing the following variational lower-bound . log pθ ( Y t D|XD , Ct ) ≥ Eqφ ( z|Dt ) [ log pθ ( Y t D|XD , z ) ] −DKL ( qφ ( z|Dt ) ||qφ ( z|Ct ) ) . ( 2 ) Note that the decoder network qφ is also used as a variational posterior qφ ( z|D ) . The parameter sharing between model prior and variational posterior gives us an intuitive interpretation of the loss function : the KL term acts as a regularizer for the encoder qφ such that the summary of the context is close to the summary of the target . This reflects the assumption that the context and target are generated by the same underlying data-generating process and aids effective test-time adaptation . After training , NP infers the target function according to the latent variable model ( Eq.1 ) . 2.2 EXTENDING TO MULTIPLE TARGET FUNCTIONS . Now we extend the setting to multi-task learning problems where multiple tasks f1 , · · · , fT are realized from T stochastic processes simultaneously , each of which has its own function space ( Yt ) X , ∀t ∈ T = { 1 , 2 , · · · , T } . Let D = ( XD , Y 1 : TD ) = ⋃ t∈T D t be a multi-task target data , where each Dt corresponds to the data of task f t. Then the learning objective for the set of T realized tasks is to model the conditional probability p ( Y 1 : TD |XD , C ) given the multi-task context C = ( XC , Y 1 : T C ) = ⋃ t∈T C t , where each Ct is a set of observations of task f t. The sets C and D can be arbitrarily chosen , but we assume C ⊂ D for simplicity . However , assuming the complete context C for all tasks is often challenged by many practical issues , such as asynchronous sampling across multiple sensors or missing labels in multi-attribute data . To address such challenges , we relax the assumptions on context C and let I ( Ct ) be different across t ∈ T . In this case , an input point xi can be associated with a partial set of output values { yti } t∈Ti , Ti ( T , which is referred incomplete observation . Next , we present two ways to use NPs to model the multi-task data and discuss their limitations . Single-Task Neural Processes ( STNPs ) A straightforward application of NPs to the multi-task setting is assuming independence across tasks and define independent NPs over the function spaces ( Y1 ) X , · · · , ( YT ) X . We refer to this approach as Single-Task Neural Processes ( STNPs ) . Specifically , a STNP has T independent latent variables v1 , · · · , vT , where each vt implicitly represents a task f t. p ( Y 1 : TD |XD , C ) = T∏ t=1 ∫ p ( Y tD|XD , vt ) p ( vt|Ct ) dvt . ( 3 ) Thanks to the independence assumption , STNPs can handle incomplete context by conditioning on each task-specific data Ct independently . However , this approach can only model the marginal distributions for each task , ignoring complex inter-task correlation within the joint distribution of the tasks . Note that this is especially impractical for multi-task settings under the incomplete data since each task f t can be learned only from Ct , ignoring rich contexts available in other data Ct ′ , ∀t′ 6= t. Joint-Task Neural Process ( JTNP ) An alternative approach is to combine output spaces to a product space Y1 : T = ∏ t∈T Yt and define a single NP over the function space ( Y1 : T ) X . We refer to this approach as Joint-Task Neural Processes ( JTNPs ) . In this case , a single latent variable z governs all T tasks jointly . p ( Y 1 : TD |XD , C ) = ∫ p ( Y 1 : TD |XD , z ) p ( z|C ) dz . ( 4 ) JTNPs are amenable to incorporate correlation across tasks through the shared variable z . However , by definition , they require complete context and target for both training and inference . This is because any incomplete set of output values { yti } t∈Ti for an input point xi such that Ti 6= T is not a valid element of the product space Y1 : T . In addition , it relies solely on a single latent variable to explain all tasks , ignoring per-task stochastic factors in each function f t. In what follows , we propose an alternative formulation for jointly handling multiple tasks on incomplete data , which ( 1 ) enables a probabilistic inference on the incomplete data and ( 2 ) is more amenable for learning both task-specific and task-agnostic functional representations . 3 MULTI-TASK NEURAL PROCESSES . In this section , we describe Multi-Task Neural Processes ( MTNPs ) , a family of stochastic processes to model multiple functions jointly and handle incomplete data . We first formulate MTNPs using a hierarchical LVM . Then we propose the training objective and a neural network model . 3.1 FORMULATION . Our objective is to extend NPs to jointly infer multiple tasks from incomplete context . Discussions in Section 2.2 suggest that direct modeling of a distribution over functions of form f : X →∏ t∈T Yt is achievable via JTNP ( Eq . 4 ) , yet it requires complete data in both training and inference . To circumvent this problem , we reformulate the functional form by h : X × T → ⋃ t∈T Yt . Note that this functional form allows us to model the same set of functions as JTNP by f ( xi ) = ( h ( xi , 1 ) , · · · , h ( xi , T ) ) . However , by using the union form we can exploit incomplete data since any partial set of output values { yti } t∈Ti now becomes a set of valid output values at different input points ( xi , t ) , t ∈ Ti . For notational convenience , we denote xti = ( xi , t ) and assume input points in the context C and the target D are embedded by the task indices , i.e. , C = ( X1 : TC , Y 1 : T C ) = ⋃ t∈T C t where Ct = ( XtC , Y t C ) = { ( xti , yti ) } i∈I ( Ct ) and the same for D. Next , we present a latent variable model that induces a stochastic process over functions of form h. To make use of both task-agnostic and task-specific knowledge , we define a hierarchical latent variable model ( Figure 1 ( c ) ) . In this model , the global latent variable z captures shared stochastic factors across tasks using the whole context C , while per-task stochastic factors are captured by the task-specific latent variable vt using Ct and z . It induces the predictive distribution on the target by : p ( Y 1 : TD |X1 : TD , C ) = ∫ ∫ [ T∏ t=1 p ( Y tD|XtD , vt ) p ( vt|z , Ct ) ] p ( z|C ) dv1 : T dz , ( 5 ) where v1 : T : = ( v1 , · · · , vT ) . Similar to Eq . 1 , we assume the conditional independence on p ( Y tD|XtD , vt ) . Note that this hierarchical model can capture and leverage the inter-task correlation by sharing the same z across v1 : T . Also , it is amenable to fully utilize the incomplete data : since the global variable z is inferred from the entire context data C = ⋃ t∈T C t and is conditioned to infer task-specific latent variable vt , each function f t induced by vt exploits the observations available for not only itself Ct , but also for other tasks Ct ′ , ∀t′ 6= t. Next , we show that Eq . 5 induces a stochastic process over the functions of form h : X × T → ⋃ t∈T Yt . Proposition 1 . Consider the following generative process on data D and context C , which is a generalized form of Eq . 5. z ∼ p ( z|C ) , vt ∼ p ( vt|z , t , C ) , yti ∼ p ( yti |xti , vt ) , ∀t ∈ T , ∀i ∈ I ( D ) . ( 6 ) Then under some mild assumptions , there exists a stochastic process over functions of form h : X × T → ⋃ t∈T Yt , where the data D is generated . Proof . We leave the proof in Appendix A.2 . We refer to the resulting stochastic processes as Multi-Task Neural Processes ( MTNPs ) . In the perspective of stochastic process , Eq . 5 allows us to learn functional posterior not only on each task via vt , but also across the tasks via z . Then optimizing Eq . 5 can be interpreted as learning to learn each task captured by vt together with the functional correlation captured by z . | This work proposes a multi-task learning architecture for neural processes termed the Multi-task process (MTP). The MTP model conditions task-specific latent variables on a global latent variable that is responsible for information sharing between the tasks, and is able to handle both the isotopic and the heterotopic cases. The model was instantiated with an attentive neural process architecture and the generative model of the MTP was shown to correspond to a stochastic process by a Kolmogorov Extension Theorem argument. | SP:2020439f6e52ec592e2fbc454633c1613e8a82c1 |
Reverse Engineering of Imperceptible Adversarial Image Perturbations | 1 INTRODUCTION . Deep neural networks ( DNNs ) are susceptible to adversarially-crafted tiny input perturbations during inference . Such imperceptible perturbations , a.k.a . adversarial attacks , could cause DNNs to draw manifestly wrong conclusions . The existence of adversarial attacks was first uncovered in the domain of image classification ( Goodfellow et al. , 2014 ; Carlini & Wagner , 2017 ; Papernot et al. , 2016b ) , and was then rapidly extended to the other domains , such as object detection ( Xie et al. , 2017 ; Serban et al. , 2020 ) , language modeling ( Cheng et al. , 2020 ; Srikant et al. , 2021 ) , and medical machine learning ( Finlayson et al. , 2019 ; Antun et al. , 2020 ) . Despite different applications , the underlying attack formulations and generation methods commonly obey the ones used in image classification . A vast volume of existing works have been devoted to designing defenses against such attacks , mostly focusing on either detecting adversarial examples ( Grosse et al. , 2017 ; Yang et al. , 2020 ; Metzen et al. , 2017 ; Meng & Chen , 2017 ; Wójcik et al. , 2020 ) or acquiring adversarially robust DNNs ( Madry et al. , 2017 ; Zhang et al. , 2019 ; Wong & Kolter , 2017 ; Salman et al. , 2020 ; Wong et al. , 2020 ; Carmon et al. , 2019 ; Shafahi et al. , 2019 ) . Despite the plethora of prior work on adversarial defenses , it seems impossible to achieve ‘ perfect ’ robustness . Given the fact that adversarial attacks are inevitable ( Shafahi et al. , 2020 ) , we ask whether or not an adversarial attack can be reverseengineered so that one can estimate the adversary ’ s information ( e.g. , adversarial perturbations ) behind the attack instances . The above problem is referred to as Reverse Engineering of Deceptions ( RED ) , fostering a new adversarial learning regime . The development of RED technologies will also enable the adversarial situation awareness in high-stake applications . To the best of our knowledge , few work studied the RED problem . The most relevant one that we are aware of is ( Pang et al. , 2020 ) , which proposed the so-called query of interest ( QOI ) estimation model to infer the adversary ’ s target class by model queries . However , the work ( Pang et al. , 2020 ) was restricted to the black-box attack scenario and thus lacks a general formulation of RED . Furthermore , it has not built a complete RED pipeline , which should not only provide a solution to estimating the adversarial example but also formalizing evaluation metrics to comprehensively measure the performance of RED . In this paper , we aim to take a solid step towards addressing the RED problem . 1.1 CONTRIBUTIONS . The main contributions of our work is listed below . • We formulate the Reverse Engineering of Deceptions ( RED ) problem that is able to estimate adversarial perturbations and provides the feasibility of inferring the intention of an adversary , e.g. , ‘ adversary saliency regions ’ of an adversarial image . •We identify a series of RED principles to effectively estimate the adversarially-crafted tiny perturbations . We find that the class-discriminative ability is crucial to evaluate the RED performance . We also find that data augmentation , e.g. , spatial transformations , is another key to improve the RED result . Furthermore , we integrate the developed RED principles into image denoising and propose a denoiser-assisted RED approach . •We build a comprehensive evaluation pipeline to quantify the RED performance from different perspectives , such as pixel-level reconstruction error , prediction-level alignment , and attribution-level adversary saliency region recovery . With an extensive experimental study , we show that , compared to image denoising baselines , our proposal yields a consistent improvement across diverse RED evaluation metrics and attack generation methods , e.g. , FGSM ( Goodfellow et al. , 2014 ) , CW ( Carlini & Wagner , 2017 ) , PGD ( Madry et al. , 2017 ) and AutoAttack ( Croce & Hein , 2020 ) . 1.2 RELATED WORK . Adversarial attacks . Different types of adversarial attacks have been proposed , ranging from digital attacks ( Goodfellow et al. , 2014 ; Carlini & Wagner , 2017 ; Madry et al. , 2017 ; Croce & Hein , 2020 ; Xu et al. , 2019b ; Chen et al. , 2017a ; Xiao et al. , 2018 ) to physical attacks ( Eykholt et al. , 2018 ; Li et al. , 2019 ; Athalye et al. , 2018 ; Chen et al. , 2018 ; Xu et al. , 2019c ) . The former gives the most fundamental threat model that commonly deceives DNN models during inference by crafting imperceptible adversarial perturbations . The latter extends the former to fool the victim models in the physical environment . Compared to digital attacks , physical attacks require much larger perturbation strengths to enhance the adversary ’ s resilience to various physical conditions such as lightness and object deformation ( Athalye et al. , 2018 ; Xu et al. , 2019c ) . In this paper , we focus on ` p-norm ball constrained attacks , a.k.a . ` p attacks , for p ∈ { 1 , 2 , ∞ } , most widely-used in digital attacks . Examples include FGSM ( Goodfellow et al. , 2014 ) , PGD ( Madry et al. , 2017 ) , CW ( Carlini & Wagner , 2017 ) , and the recently-released attack benchmark AutoAttack ( Croce & Hein , 2020 ) . Based on the adversary ’ s intent , ` p attacks are further divided into untargeted attacks and targeted attacks , where in contrast to the former , the latter designates the ( incorrect ) prediction label of a victim model . When an adversary has no access to victim models ’ detailed information ( such as architectures and model weights ) , ` p attacks can be further generalized to black-box attacks by leveraging either surrogate victim models ( Papernot et al. , 2017 ; 2016a ; Dong et al. , 2019 ; Liu et al. , 2017 ) or input-output queries from the original black-box models ( Chen et al. , 2017b ; Liu et al. , 2019 ; Cheng et al. , 2019 ) . Adversarial defenses . To improve the robustness of DNNs , a variety of approaches have been proposed to defend against ` p attacks . One line of research focuses on enhancing the robustness of DNNs during training , e.g. , adversarial training ( Madry et al. , 2017 ) , TRADES ( Zhang et al. , 2019 ) , randomized smoothing ( Wong & Kolter , 2017 ) , and their variants ( Salman et al. , 2020 ; Wong et al. , 2020 ; Carmon et al. , 2019 ; Shafahi et al. , 2019 ; Uesato et al. , 2019 ; Chen et al. , 2020 ) . Another line of research is to detect adversarial attacks without altering the victim model or the training process . The key technique is to differentiate between benign and adversarial examples by measuring their ‘ distance. ’ Such a distance measure has been defined in the input space via pixel-level reconstruction error ( Meng & Chen , 2017 ; Liao et al. , 2018 ) , in the intermediate layers via neuron activation anomalies ( Xu et al. , 2019a ) , and in the logit space by tracking the sensitivity of deep feature attributions to input perturbations ( Yang et al. , 2020 ) . In contrast to RED , adversarial detection is a relatively simpler problem as a roughly approximated distance possesses detection-ability ( Meng & Chen , 2017 ; Luo et al. , 2015 ) . Among the existing adversarial defense techniques , the recently-proposed Denoised Smoothing ( DS ) method ( Salman et al. , 2020 ) is more related to ours . In ( Salman et al. , 2020 ) , an image denoising network is prepended to an existing victim model so that the augmented system can be performed as a smoothed image classifier with certified robustness . Although DS is not designed for RED , its denoised output can be regarded as a benign example estimate . The promotion of classification stability in DS also motivates us to design the RED methods with class-discriminative ability . Thus , DS will be a main baseline approach for comparison . 2 REVERSE ENGINEERING OF DECEPTIONS : FORMULATION AND CHALLENGES . In this section , we first introduce the threat model of our interest : adversarial attacks on images . Based on that , we formalize the Reverse Engineering of Deceptions ( RED ) problem and demonstrate its challenges through some ‘ warm-up ’ examples . Preliminaries on threat model . We focus on ` p attacks , where the adversary ’ s goal is to generate imperceptible input perturbations to fool a well-trained image classifier . Formally , let x denote a benign image , and δ an additive perturbation variable . Given a victim classifier f and a perturbation strength tolerance ( in terms of , e.g. , ` ∞-norm constraint ‖δ‖∞ ≤ ) , the desired attack generation algorithmA then seeks the optimal δ subject to the perturbation constraints . Such an attack generation process is denoted by δ = A ( x , f , ) , resulting in an adversarial example x′ = x+ δ . Here A can be fulfilled by different attack methods , e.g. , FGSM ( Goodfellow et al. , 2014 ) , CW ( Carlini & Wagner , 2017 ) , PGD ( Madry et al. , 2017 ) , and AutoAttack ( Croce & Hein , 2020 ) . Problem formulation of RED . Different from conventional defenses to detect or reject adversarial instances ( Pang et al. , 2020 ; Liao et al. , 2018 ; Shafahi et al. , 2020 ; Niu et al. , 2020 ) , RED aims to address the following question . ( RED problem ) Given an adversarial instance , can we reverse-engineer the adversarial perturbations δ , and infer the adversary ’ s objective and knowledge , e.g. , true image class behind deception and adversary saliency image region ? Formally , we aim to recover δ from an adversarial example x′ under the prior knowledge of the victim model f or its substitute f̂ if the former is a black box . We denote the RED operation as δ = R ( x′ , f̂ ) , which covers the white-box scenario ( f̂ = f ) as a special case . We propose to learn a parametric model Dθ ( e.g. , a denoising neural network that we will focus on ) as an approximation ofR through a training dataset of adversary-benignity pairs Ω = { ( x′ , x ) } . Through Dθ , RED will provide a benign example estimate xRED and a adversarial example estimate x′RED as below : xRED = Dθ ( x′ ) , x′RED = x′ − xRED︸ ︷︷ ︸ perturbation estimate +x , ( 1 ) where a perturbation estimate is given by subtracting the RED ’ s output with its input , x′ −Dθ ( x′ ) . We highlight that RED yields a new defensive approach aiming to ‘ diagnose ’ the perturbation details of an existing adversarial example in a post-hoc , forensic manner . This is different from adversarial detection ( AD ) . Fig.1 provides a visual comparison of RED with AD . Although AD is also designed in a post-hoc manner , it aims to determine whether an input is an adversarial example for a victim model based on certain statistics on model features or logits . Besides , AD might be used as a pre-processing step of RED , where the former provides ‘ detected ’ adversarial examples for fine-level RED diagnosis . In our experiments , we will also show that the outputs of RED can be leveraged to guide the design of adversarial detection . In this sense , RED and AD are complementary building blocks within a closed loop . Challenges of RED In this work , we will specify the RED model Dθ as a denoising network . However , it is highly non-trivial to design a proper denoiser for RED . Speaking at a high level , there exist two main challenges . First , unlike the conventional image denoising strategies ( Zhang et al. , 2017 ) , the design of an RED-aware denoiser needs to take into account the effects of victim models and data properties of adversary-benignity pairs . Second , it might be insufficient to merely minimize the reconstruction error as the adversarial perturbation is finely-crafted ( Niu et al. , 2020 ) . Therefore , either under- or over-denoising will lead to poor RED performance . | The paper considers the problem of automatically reconstructing adversarial perturbations from examples in a post-hoc manner. The authors argue that for an effective reconstruction, it is not sufficient to only minimize the reconstruction error but also it is essential to align the predictions of the original and their reconstructed versions. To achieve these goals, the authors combine a denoising network, with a prediction alignment network via a standard combination of their respective losses. The authors incorporate data augmentation to further improve the performance of their approach. The empirical result indicates that the new architecture is able to better balance the prediction alignment and the reconstruction error than the baselines. | SP:cf2a87c633ea31f81e59e310d79f3fa0b4c4b031 |
Reverse Engineering of Imperceptible Adversarial Image Perturbations | 1 INTRODUCTION . Deep neural networks ( DNNs ) are susceptible to adversarially-crafted tiny input perturbations during inference . Such imperceptible perturbations , a.k.a . adversarial attacks , could cause DNNs to draw manifestly wrong conclusions . The existence of adversarial attacks was first uncovered in the domain of image classification ( Goodfellow et al. , 2014 ; Carlini & Wagner , 2017 ; Papernot et al. , 2016b ) , and was then rapidly extended to the other domains , such as object detection ( Xie et al. , 2017 ; Serban et al. , 2020 ) , language modeling ( Cheng et al. , 2020 ; Srikant et al. , 2021 ) , and medical machine learning ( Finlayson et al. , 2019 ; Antun et al. , 2020 ) . Despite different applications , the underlying attack formulations and generation methods commonly obey the ones used in image classification . A vast volume of existing works have been devoted to designing defenses against such attacks , mostly focusing on either detecting adversarial examples ( Grosse et al. , 2017 ; Yang et al. , 2020 ; Metzen et al. , 2017 ; Meng & Chen , 2017 ; Wójcik et al. , 2020 ) or acquiring adversarially robust DNNs ( Madry et al. , 2017 ; Zhang et al. , 2019 ; Wong & Kolter , 2017 ; Salman et al. , 2020 ; Wong et al. , 2020 ; Carmon et al. , 2019 ; Shafahi et al. , 2019 ) . Despite the plethora of prior work on adversarial defenses , it seems impossible to achieve ‘ perfect ’ robustness . Given the fact that adversarial attacks are inevitable ( Shafahi et al. , 2020 ) , we ask whether or not an adversarial attack can be reverseengineered so that one can estimate the adversary ’ s information ( e.g. , adversarial perturbations ) behind the attack instances . The above problem is referred to as Reverse Engineering of Deceptions ( RED ) , fostering a new adversarial learning regime . The development of RED technologies will also enable the adversarial situation awareness in high-stake applications . To the best of our knowledge , few work studied the RED problem . The most relevant one that we are aware of is ( Pang et al. , 2020 ) , which proposed the so-called query of interest ( QOI ) estimation model to infer the adversary ’ s target class by model queries . However , the work ( Pang et al. , 2020 ) was restricted to the black-box attack scenario and thus lacks a general formulation of RED . Furthermore , it has not built a complete RED pipeline , which should not only provide a solution to estimating the adversarial example but also formalizing evaluation metrics to comprehensively measure the performance of RED . In this paper , we aim to take a solid step towards addressing the RED problem . 1.1 CONTRIBUTIONS . The main contributions of our work is listed below . • We formulate the Reverse Engineering of Deceptions ( RED ) problem that is able to estimate adversarial perturbations and provides the feasibility of inferring the intention of an adversary , e.g. , ‘ adversary saliency regions ’ of an adversarial image . •We identify a series of RED principles to effectively estimate the adversarially-crafted tiny perturbations . We find that the class-discriminative ability is crucial to evaluate the RED performance . We also find that data augmentation , e.g. , spatial transformations , is another key to improve the RED result . Furthermore , we integrate the developed RED principles into image denoising and propose a denoiser-assisted RED approach . •We build a comprehensive evaluation pipeline to quantify the RED performance from different perspectives , such as pixel-level reconstruction error , prediction-level alignment , and attribution-level adversary saliency region recovery . With an extensive experimental study , we show that , compared to image denoising baselines , our proposal yields a consistent improvement across diverse RED evaluation metrics and attack generation methods , e.g. , FGSM ( Goodfellow et al. , 2014 ) , CW ( Carlini & Wagner , 2017 ) , PGD ( Madry et al. , 2017 ) and AutoAttack ( Croce & Hein , 2020 ) . 1.2 RELATED WORK . Adversarial attacks . Different types of adversarial attacks have been proposed , ranging from digital attacks ( Goodfellow et al. , 2014 ; Carlini & Wagner , 2017 ; Madry et al. , 2017 ; Croce & Hein , 2020 ; Xu et al. , 2019b ; Chen et al. , 2017a ; Xiao et al. , 2018 ) to physical attacks ( Eykholt et al. , 2018 ; Li et al. , 2019 ; Athalye et al. , 2018 ; Chen et al. , 2018 ; Xu et al. , 2019c ) . The former gives the most fundamental threat model that commonly deceives DNN models during inference by crafting imperceptible adversarial perturbations . The latter extends the former to fool the victim models in the physical environment . Compared to digital attacks , physical attacks require much larger perturbation strengths to enhance the adversary ’ s resilience to various physical conditions such as lightness and object deformation ( Athalye et al. , 2018 ; Xu et al. , 2019c ) . In this paper , we focus on ` p-norm ball constrained attacks , a.k.a . ` p attacks , for p ∈ { 1 , 2 , ∞ } , most widely-used in digital attacks . Examples include FGSM ( Goodfellow et al. , 2014 ) , PGD ( Madry et al. , 2017 ) , CW ( Carlini & Wagner , 2017 ) , and the recently-released attack benchmark AutoAttack ( Croce & Hein , 2020 ) . Based on the adversary ’ s intent , ` p attacks are further divided into untargeted attacks and targeted attacks , where in contrast to the former , the latter designates the ( incorrect ) prediction label of a victim model . When an adversary has no access to victim models ’ detailed information ( such as architectures and model weights ) , ` p attacks can be further generalized to black-box attacks by leveraging either surrogate victim models ( Papernot et al. , 2017 ; 2016a ; Dong et al. , 2019 ; Liu et al. , 2017 ) or input-output queries from the original black-box models ( Chen et al. , 2017b ; Liu et al. , 2019 ; Cheng et al. , 2019 ) . Adversarial defenses . To improve the robustness of DNNs , a variety of approaches have been proposed to defend against ` p attacks . One line of research focuses on enhancing the robustness of DNNs during training , e.g. , adversarial training ( Madry et al. , 2017 ) , TRADES ( Zhang et al. , 2019 ) , randomized smoothing ( Wong & Kolter , 2017 ) , and their variants ( Salman et al. , 2020 ; Wong et al. , 2020 ; Carmon et al. , 2019 ; Shafahi et al. , 2019 ; Uesato et al. , 2019 ; Chen et al. , 2020 ) . Another line of research is to detect adversarial attacks without altering the victim model or the training process . The key technique is to differentiate between benign and adversarial examples by measuring their ‘ distance. ’ Such a distance measure has been defined in the input space via pixel-level reconstruction error ( Meng & Chen , 2017 ; Liao et al. , 2018 ) , in the intermediate layers via neuron activation anomalies ( Xu et al. , 2019a ) , and in the logit space by tracking the sensitivity of deep feature attributions to input perturbations ( Yang et al. , 2020 ) . In contrast to RED , adversarial detection is a relatively simpler problem as a roughly approximated distance possesses detection-ability ( Meng & Chen , 2017 ; Luo et al. , 2015 ) . Among the existing adversarial defense techniques , the recently-proposed Denoised Smoothing ( DS ) method ( Salman et al. , 2020 ) is more related to ours . In ( Salman et al. , 2020 ) , an image denoising network is prepended to an existing victim model so that the augmented system can be performed as a smoothed image classifier with certified robustness . Although DS is not designed for RED , its denoised output can be regarded as a benign example estimate . The promotion of classification stability in DS also motivates us to design the RED methods with class-discriminative ability . Thus , DS will be a main baseline approach for comparison . 2 REVERSE ENGINEERING OF DECEPTIONS : FORMULATION AND CHALLENGES . In this section , we first introduce the threat model of our interest : adversarial attacks on images . Based on that , we formalize the Reverse Engineering of Deceptions ( RED ) problem and demonstrate its challenges through some ‘ warm-up ’ examples . Preliminaries on threat model . We focus on ` p attacks , where the adversary ’ s goal is to generate imperceptible input perturbations to fool a well-trained image classifier . Formally , let x denote a benign image , and δ an additive perturbation variable . Given a victim classifier f and a perturbation strength tolerance ( in terms of , e.g. , ` ∞-norm constraint ‖δ‖∞ ≤ ) , the desired attack generation algorithmA then seeks the optimal δ subject to the perturbation constraints . Such an attack generation process is denoted by δ = A ( x , f , ) , resulting in an adversarial example x′ = x+ δ . Here A can be fulfilled by different attack methods , e.g. , FGSM ( Goodfellow et al. , 2014 ) , CW ( Carlini & Wagner , 2017 ) , PGD ( Madry et al. , 2017 ) , and AutoAttack ( Croce & Hein , 2020 ) . Problem formulation of RED . Different from conventional defenses to detect or reject adversarial instances ( Pang et al. , 2020 ; Liao et al. , 2018 ; Shafahi et al. , 2020 ; Niu et al. , 2020 ) , RED aims to address the following question . ( RED problem ) Given an adversarial instance , can we reverse-engineer the adversarial perturbations δ , and infer the adversary ’ s objective and knowledge , e.g. , true image class behind deception and adversary saliency image region ? Formally , we aim to recover δ from an adversarial example x′ under the prior knowledge of the victim model f or its substitute f̂ if the former is a black box . We denote the RED operation as δ = R ( x′ , f̂ ) , which covers the white-box scenario ( f̂ = f ) as a special case . We propose to learn a parametric model Dθ ( e.g. , a denoising neural network that we will focus on ) as an approximation ofR through a training dataset of adversary-benignity pairs Ω = { ( x′ , x ) } . Through Dθ , RED will provide a benign example estimate xRED and a adversarial example estimate x′RED as below : xRED = Dθ ( x′ ) , x′RED = x′ − xRED︸ ︷︷ ︸ perturbation estimate +x , ( 1 ) where a perturbation estimate is given by subtracting the RED ’ s output with its input , x′ −Dθ ( x′ ) . We highlight that RED yields a new defensive approach aiming to ‘ diagnose ’ the perturbation details of an existing adversarial example in a post-hoc , forensic manner . This is different from adversarial detection ( AD ) . Fig.1 provides a visual comparison of RED with AD . Although AD is also designed in a post-hoc manner , it aims to determine whether an input is an adversarial example for a victim model based on certain statistics on model features or logits . Besides , AD might be used as a pre-processing step of RED , where the former provides ‘ detected ’ adversarial examples for fine-level RED diagnosis . In our experiments , we will also show that the outputs of RED can be leveraged to guide the design of adversarial detection . In this sense , RED and AD are complementary building blocks within a closed loop . Challenges of RED In this work , we will specify the RED model Dθ as a denoising network . However , it is highly non-trivial to design a proper denoiser for RED . Speaking at a high level , there exist two main challenges . First , unlike the conventional image denoising strategies ( Zhang et al. , 2017 ) , the design of an RED-aware denoiser needs to take into account the effects of victim models and data properties of adversary-benignity pairs . Second , it might be insufficient to merely minimize the reconstruction error as the adversarial perturbation is finely-crafted ( Niu et al. , 2020 ) . Therefore , either under- or over-denoising will lead to poor RED performance . | This paper proposes a methodology for reverse engineering adversarial perturbations. This allows a defender to recover the original image used to produce an adversarial example and may be an effective tool to mitigating adversarial example attacks. The paper introduces the concept of reverse engineering adversarial perturbations, defines metrics that quantify reverse engineering performance, creates a framework for training a denoising model to find the adversarial perturbations, and compares the resulting model against adversarial denoising techniques. | SP:cf2a87c633ea31f81e59e310d79f3fa0b4c4b031 |
rQdia: Regularizing Q-Value Distributions With Image Augmentation | 1 INTRODUCTION . Human perception is invariant to and remarkably robust against many perturbations , like discoloration , obfuscation , and low exposure . On the other hand , artificial neural networks do not intrinsically carry these invariance properties , not without regularizers or hand-crafted inductive biases like convolution , kernel rotation , dilation , attention , and recurrence . In deep reinforcement learning ( RL ) from pixels , an agent must learn to visually interpret a scene in order to decide on an action . Thus , recent approaches in RL have turned to the self-supervision and data augmentation techniques found in computer vision . Indeed , such contrastive learning auxiliary losses ( Srinivas et al. , 2020 ) or data augmentation regularizers ( Yarats et al. , 2021b ) have afforded greater sample efficiency and final scores in both the DeepMind Continuous Control Suite ( Tassa et al. , 2018 ) from pixels and Atari Arcade Learning Environments ( Bellemare et al. , 2013 ) . Nevertheless , pixel-based approaches continue to lag behind models that learn directly from state embeddings , not just in terms of sample efficiency , but also in longer-term asymptotic performance . For example , the recent DrQ ( Yarats et al. , 2021b ) , an image augmentation-based regularizer added to SAC ( Haarnoja et al. , 2018 ) , reports falling 14.5 % short of its state embedding-based SAC counterpart on the Cheetah Run task . Such discrepancies indicate that visual representations are not yet up to par with state embeddings , at least not for locomotive continuous control . State embeddings have many properties that facilitate generalization , such as location invariance , and to a degree , invariance between morphological relations . If a subset of the dimensions of a state embedding always indicates feet position , then the relation “ one foot in front of the other ” will be represented by those dimensions invariant to the placement of the robot ’ s arms , head , or other body parts . Parametric visual encodings are not guaranteed to learn such invariances with respect to the robot ’ s morphology . What other signals in deep RL can guide visual representation learning toward more invariant encodings ? We propose Q-value distributions , sets of cumulative discounted rewards , as such a signal . For state s , Q-function Q , and actions a ( 0 ) , . . . , a ( m ) ∼ D ( A ) from some statistical distribution D over action space A , we define Q-value distribution simply as : Q ( s , a ( 0 ) ) , . . . , Q ( s , a ( m ) ) . Since Q-values are optimally proportional to action probabilities , this “ distribution ” is representative of the actual policy distribution when D = π . Furthermore , it is a measure of the current and future value of each action for that state . We review the MDP framework in Section 2.1 . This signal is amenable to many of the same invariances afforded by state embeddings , if not additional ones . For example , if the optimal action is “ put one foot in front of the other , ” then the Q-value distribution reflects this action ’ s relation to other actions regardless of ( invariant to ) where the agent is located . While recent work shows individual Q-values benefit from regularizing across augmented images ( Yarats et al. , 2021b ) , we consider that Q-value distributions are also important , as they contain information not just about one action in isolation , but multiple actions in relation to one another . 2 BACKGROUND . 2.1 DEEP RL FROM PIXELS . A Markov Decision Process ( MDP ) consists of an action a ∈ IRda , state s ∈ IRds , and reward r ∈ IR . “ From pixels ” assumes that state s is an image frame or multiple image frames stacked together . The action is sampled from a policy at any t time step at ∼ π ( st ) . Taking such actions yields a trajectory τ = ( s0 , a0 , s1 , a1 , ... , sT ) via the dynamics model st+1 ∼ f ( st , at ) of the environment and its rewards rt+1 = R ( st , at ) . The goal is to maximize cumulative discounted reward R ( τ ) = ∑T t=0 rtγ t where γ is the temporal discount factor . The optimal action for a state a∗ ( s ) = argmaxaQ ∗ ( s , a ) thus depends on the state-action value function , also known as the Qvalue , Qπ ( s , a ) = Eτ∼π [ R ( τ ) |s0 = s , a0 = a ] . 2.2 SOFT ACTOR-CRITIC & DRQ . Soft-Actor Critic ( SAC ) ( Haarnoja et al. , 2018 ) is an RL algorithm which learns a min-reduced ensemble of Q-value functions Qφ ( s , a ) = mini=1,2Qφi ( s , a ) optimized with one-step Bellman error , and a stochastic Gaussian policy πθ ( s , a ) optimized by maximizing Qφ ( s , a ) and entropy H ( s ) = −πθ ( s ) log ( πθ ( s ) ) , made differentiable via the reparameterization trick . To further encourage exploration and avoid premature policy collapse , entropy H ( s ) is also added as part of the agent ’ s reward . In visual domains , Qφ and πθ are typically equipped with a shared convolutional neural net encoder . DrQ ( Yarats et al. , 2021b ) sets the Bellman target as the average of the augmented and non-augmented next-state targets , and minimizes Bellman error for both Qφ ( s , a ) and Qφ ( aug ( s ) , a ) where aug is the random augmentation . 2.3 DATA-EFFICIENT RAINBOW ( DER ) . Rainbow ( Hessel et al. , 2018 ) maps directly to Q-value estimates for discrete actions . Compared to vanilla DQN ( Mnih et al. , 2013 ) , several refinements are used : Q-values are sampled from a multivariate Gaussian probabilistically ( Dabney et al. , 2018 ) , noise is injected into network parameters ( Plappert et al. , 2017 ) , double Q networks ( Van Hasselt et al. , 2016 ) , dueling DQNs ( Wang et al. , 2016 ) , n-step returns ( Watkins , 1989 ) , and mini-batches are sampled from a prioritized experience replay ( Schaul et al. , 2015 ) . “ Data-efficient ” refers to the Atari sample limit of 100k environmental interactions , a much more challenging setting for notoriously inefficient RL . 3 RELATED WORK . 3.1 DATA-EFFICIENT RL . Data-efficient RL is a paramount concern to the practicality of RL in real-world use cases . Image augmentation has proven an extremely effective regularizer for improving the sample efficiency of model-free off-policy RL algorithms ( Yarats et al. , 2019a ; Srinivas et al. , 2020 ; Sermanet et al. , 2018 ; Dwibedi et al. , 2018 ) , so much so that basic augmentation techniques suffice to rival or surpass model-based RL algorithms ( Hafner et al. , 2019c ; Lee et al. , 2019b ; Hafner et al. , 2019b ) in the sample efficiency metric . Curiously , these methods have become progressively simpler . CURL ( Srinivas et al. , 2020 ) employed contrastive learning , using positive and negative samples extracted from the mini-batch , requiring a computation of quadratic complexity w.r.t . the mini-batch size . RAD ( Laskin et al. , 2020 ) and DrQ ( Yarats et al. , 2021b ) showed that simpler methods work just as well or better , either by augmenting images naively , or augmenting and averaging their Q-values , respectively . Even more recently ( contemporaneously ) , the as-yet unpublished DrQv2 ( Yarats et al. , 2021a ) found basic augmentation alone suffices under a DDPG-based algorithm , with significant efficiency improvements over prior methods despite the exceptional simplicity . While these recent methods have traded CURL ’ s mini-batch statistics for mere augmentation , rQdia marks the first combination of the two that uses mini-batch statistics to enforce consistency across Q-value distributions , in a manner both simple and complementary to the above implements . 3.2 MINI-BATCH REGULARIZATION IN RL . Mini-batch-based regularization has not commonly been used in RL . For example , Batch Norm ( Ioffe & Szegedy , 2015 ) , a common regularizer in computer vision , is not as notably employed in RL . This type of regularization remained unexploited in RL until CURL ( Srinivas et al. , 2020 ) showed that contrastive learning via image augmentation ( Chen et al. , 2020 ; He et al. , 2020 ; Misra & Maaten , 2020 ; Henaff , 2020 ) greatly improved RL data efficiency . CURL contrasts a state ’ s “ positive ” augmentation sample with the rest of the mini-batch ’ s “ negative ” augmentation samples . These negative samples can be thought of as sampled from a Uniform distribution over the agent ’ s experience replay , inspiring rQdia . However , contrastive learning en- forces a non-guaranteed ground truth , disassociating negative samples regardless of actual similarity . See Figure 2 for an example of this negative samples problem , where similar states are contrasted to have dissimilar encodings as an inadvertent byproduct of the uniform randomness . rQdia bypasses this flaw by only enforcing a guaranteed constraint : that the Q-value for any sampled action , regardless of statistical distribution , be consistent across the same states invariant to augmentation . This indeed should always be the case , thus yielding gains over CURL while remaining complementary to methods like DrQ and DrQv2 . 3.3 IMAGE AUGMENTATION . Image augmentation is commonly used to counter over-fitting in computer vision . Techniques include color shift , affinity translation , scale , etc . ( Ciregan et al. , 2012 ; Cireşan et al. , 2011 ; Simard et al. , 2003 ; Krizhevsky et al. , 2012 ; Chen et al. , 2020 ) . In Yarats et al . ( 2021b ) , the authors investigated several common image transformations and concluded that random shifts strike a good balance between simplicity and performance for the MuJoCo environments . A variety of different augmentations are useful for different games in the Procgen benchmark ( Raileanu et al. , 2020 ) , and Yarats et al . ( 2021b ) used Intensity variation for the Atari environments . These techniques have proven critical to MuJoCo from pixels . 4 METHODS . rQdia is the first RL Q-value regularizer that does not necessarily depend on either the on-policy or the off-policy states and actions . n , m such states and actions are instead sampled from arbitrary distributions , let ’ s call them D1 and D2 , of state space S and action space A , respectively : s ( 0 ) , ... , s ( n−1 ) ∼ D1 ( S ) a ( 0 ) , ... , a ( m−1 ) ∼ D2 ( A ) . ( 1 ) Then , the following constraint is enforced for Qφ ( · ) , the neural network that models Qπ ( · ) the Q-value function : Qφ ( s ( i ) , a ( j ) ) = Qφ ( aug ( s ( i ) ) , a ( j ) ) ∀i , j , ( 2 ) where aug ( · ) is an arbitrary augmentation transform . aug ( · ) and D1 , D2 could vary . For aug ( · ) , in line with Yarats et al . ( 2021b ) , we use translation for MuJoCo and intensity jittering for Atari . Specifically , to translate , we pad by 4 pixels , then crop randomly inward by 4 pixels ; to intensity jitter , each image is multiplied by some random noise s = 1.1×clip ( r , −2 , 2 ) , r ∼ N ( 0 , 1 ) . For D1 , D2 in MuJoCo continuous action spaces , we implement a simple approach analogous to CURL ’ s negative-sample sampling , except sampling both states and actions rather than just states . That is , states and actions are directly lifted from the mini-batchB ( n = m = |B| ) , in effect sampled from a Uniform distribution over the agent ’ s experience replay . By using historical states and actions as opposed to random noise , we compute Q-value distributions over state-action pairs that could more feasibly be encountered in a deployed roll-out . In discrete Atari , actions may be lifted from the action space directly , that is , a ( 0 ) , ... , a ( m−1 ) = A . Thus , given mini-batch states s ( 0 ) , ... , s ( n−1 ) and mini-batch ( or action space ) actions a ( 0 ) , ... , a ( m−1 ) , the following auxiliary loss is proposed to constitute a basic implement of rQdia : LrQdia = 1 nm ∑ i < n , j < m ( Qφ ( s ( i ) , a ( j ) ) −Qφ ( aug ( s ( i ) ) , a ( j ) ) ) 2 . ( 3 ) Then this auxiliary loss is simply added to the RL agent ’ s standard loss term . Voila , rQdia ( visualized “ in a nutshell ” in Figure 1 ) . This is applied in parallel for each s ( i ) , a ( j ) pair . If mini-batches or actions spaces are very large , it is possible to convolve a smaller subset of n states and m actions . In MuJoCo , we note that while D1 , D2 are treated as Uniform distributions over an agent ’ s history similar to CURL ’ s negative sampling , D1 , D2 could be more sophisticated . For example , the probability of sampling an action could be proportional to state similarities . Or , like MPO ( Abdolmaleki et al. , 2018 ) , actions could be sampled directly from the policy itself . Algorithm 1 provides pseudo-code for rQdia in continuous control algorithms like SAC-AE and DrQ . All code for rQdia will be released open-source . | Image augmentations have recently become a standard component of deep RL algorithms. Previous work has enforced consistencies at a sample-level. This paper proposes to look at the distribution of statistics at a minibatch-level in order to enforce consistencies. Paper shows results on standard benchmarks in discrete and continuous control (Atari and DMC). | SP:21726ae5d1bf57c0e73a5b584475409de91f1214 |
rQdia: Regularizing Q-Value Distributions With Image Augmentation | 1 INTRODUCTION . Human perception is invariant to and remarkably robust against many perturbations , like discoloration , obfuscation , and low exposure . On the other hand , artificial neural networks do not intrinsically carry these invariance properties , not without regularizers or hand-crafted inductive biases like convolution , kernel rotation , dilation , attention , and recurrence . In deep reinforcement learning ( RL ) from pixels , an agent must learn to visually interpret a scene in order to decide on an action . Thus , recent approaches in RL have turned to the self-supervision and data augmentation techniques found in computer vision . Indeed , such contrastive learning auxiliary losses ( Srinivas et al. , 2020 ) or data augmentation regularizers ( Yarats et al. , 2021b ) have afforded greater sample efficiency and final scores in both the DeepMind Continuous Control Suite ( Tassa et al. , 2018 ) from pixels and Atari Arcade Learning Environments ( Bellemare et al. , 2013 ) . Nevertheless , pixel-based approaches continue to lag behind models that learn directly from state embeddings , not just in terms of sample efficiency , but also in longer-term asymptotic performance . For example , the recent DrQ ( Yarats et al. , 2021b ) , an image augmentation-based regularizer added to SAC ( Haarnoja et al. , 2018 ) , reports falling 14.5 % short of its state embedding-based SAC counterpart on the Cheetah Run task . Such discrepancies indicate that visual representations are not yet up to par with state embeddings , at least not for locomotive continuous control . State embeddings have many properties that facilitate generalization , such as location invariance , and to a degree , invariance between morphological relations . If a subset of the dimensions of a state embedding always indicates feet position , then the relation “ one foot in front of the other ” will be represented by those dimensions invariant to the placement of the robot ’ s arms , head , or other body parts . Parametric visual encodings are not guaranteed to learn such invariances with respect to the robot ’ s morphology . What other signals in deep RL can guide visual representation learning toward more invariant encodings ? We propose Q-value distributions , sets of cumulative discounted rewards , as such a signal . For state s , Q-function Q , and actions a ( 0 ) , . . . , a ( m ) ∼ D ( A ) from some statistical distribution D over action space A , we define Q-value distribution simply as : Q ( s , a ( 0 ) ) , . . . , Q ( s , a ( m ) ) . Since Q-values are optimally proportional to action probabilities , this “ distribution ” is representative of the actual policy distribution when D = π . Furthermore , it is a measure of the current and future value of each action for that state . We review the MDP framework in Section 2.1 . This signal is amenable to many of the same invariances afforded by state embeddings , if not additional ones . For example , if the optimal action is “ put one foot in front of the other , ” then the Q-value distribution reflects this action ’ s relation to other actions regardless of ( invariant to ) where the agent is located . While recent work shows individual Q-values benefit from regularizing across augmented images ( Yarats et al. , 2021b ) , we consider that Q-value distributions are also important , as they contain information not just about one action in isolation , but multiple actions in relation to one another . 2 BACKGROUND . 2.1 DEEP RL FROM PIXELS . A Markov Decision Process ( MDP ) consists of an action a ∈ IRda , state s ∈ IRds , and reward r ∈ IR . “ From pixels ” assumes that state s is an image frame or multiple image frames stacked together . The action is sampled from a policy at any t time step at ∼ π ( st ) . Taking such actions yields a trajectory τ = ( s0 , a0 , s1 , a1 , ... , sT ) via the dynamics model st+1 ∼ f ( st , at ) of the environment and its rewards rt+1 = R ( st , at ) . The goal is to maximize cumulative discounted reward R ( τ ) = ∑T t=0 rtγ t where γ is the temporal discount factor . The optimal action for a state a∗ ( s ) = argmaxaQ ∗ ( s , a ) thus depends on the state-action value function , also known as the Qvalue , Qπ ( s , a ) = Eτ∼π [ R ( τ ) |s0 = s , a0 = a ] . 2.2 SOFT ACTOR-CRITIC & DRQ . Soft-Actor Critic ( SAC ) ( Haarnoja et al. , 2018 ) is an RL algorithm which learns a min-reduced ensemble of Q-value functions Qφ ( s , a ) = mini=1,2Qφi ( s , a ) optimized with one-step Bellman error , and a stochastic Gaussian policy πθ ( s , a ) optimized by maximizing Qφ ( s , a ) and entropy H ( s ) = −πθ ( s ) log ( πθ ( s ) ) , made differentiable via the reparameterization trick . To further encourage exploration and avoid premature policy collapse , entropy H ( s ) is also added as part of the agent ’ s reward . In visual domains , Qφ and πθ are typically equipped with a shared convolutional neural net encoder . DrQ ( Yarats et al. , 2021b ) sets the Bellman target as the average of the augmented and non-augmented next-state targets , and minimizes Bellman error for both Qφ ( s , a ) and Qφ ( aug ( s ) , a ) where aug is the random augmentation . 2.3 DATA-EFFICIENT RAINBOW ( DER ) . Rainbow ( Hessel et al. , 2018 ) maps directly to Q-value estimates for discrete actions . Compared to vanilla DQN ( Mnih et al. , 2013 ) , several refinements are used : Q-values are sampled from a multivariate Gaussian probabilistically ( Dabney et al. , 2018 ) , noise is injected into network parameters ( Plappert et al. , 2017 ) , double Q networks ( Van Hasselt et al. , 2016 ) , dueling DQNs ( Wang et al. , 2016 ) , n-step returns ( Watkins , 1989 ) , and mini-batches are sampled from a prioritized experience replay ( Schaul et al. , 2015 ) . “ Data-efficient ” refers to the Atari sample limit of 100k environmental interactions , a much more challenging setting for notoriously inefficient RL . 3 RELATED WORK . 3.1 DATA-EFFICIENT RL . Data-efficient RL is a paramount concern to the practicality of RL in real-world use cases . Image augmentation has proven an extremely effective regularizer for improving the sample efficiency of model-free off-policy RL algorithms ( Yarats et al. , 2019a ; Srinivas et al. , 2020 ; Sermanet et al. , 2018 ; Dwibedi et al. , 2018 ) , so much so that basic augmentation techniques suffice to rival or surpass model-based RL algorithms ( Hafner et al. , 2019c ; Lee et al. , 2019b ; Hafner et al. , 2019b ) in the sample efficiency metric . Curiously , these methods have become progressively simpler . CURL ( Srinivas et al. , 2020 ) employed contrastive learning , using positive and negative samples extracted from the mini-batch , requiring a computation of quadratic complexity w.r.t . the mini-batch size . RAD ( Laskin et al. , 2020 ) and DrQ ( Yarats et al. , 2021b ) showed that simpler methods work just as well or better , either by augmenting images naively , or augmenting and averaging their Q-values , respectively . Even more recently ( contemporaneously ) , the as-yet unpublished DrQv2 ( Yarats et al. , 2021a ) found basic augmentation alone suffices under a DDPG-based algorithm , with significant efficiency improvements over prior methods despite the exceptional simplicity . While these recent methods have traded CURL ’ s mini-batch statistics for mere augmentation , rQdia marks the first combination of the two that uses mini-batch statistics to enforce consistency across Q-value distributions , in a manner both simple and complementary to the above implements . 3.2 MINI-BATCH REGULARIZATION IN RL . Mini-batch-based regularization has not commonly been used in RL . For example , Batch Norm ( Ioffe & Szegedy , 2015 ) , a common regularizer in computer vision , is not as notably employed in RL . This type of regularization remained unexploited in RL until CURL ( Srinivas et al. , 2020 ) showed that contrastive learning via image augmentation ( Chen et al. , 2020 ; He et al. , 2020 ; Misra & Maaten , 2020 ; Henaff , 2020 ) greatly improved RL data efficiency . CURL contrasts a state ’ s “ positive ” augmentation sample with the rest of the mini-batch ’ s “ negative ” augmentation samples . These negative samples can be thought of as sampled from a Uniform distribution over the agent ’ s experience replay , inspiring rQdia . However , contrastive learning en- forces a non-guaranteed ground truth , disassociating negative samples regardless of actual similarity . See Figure 2 for an example of this negative samples problem , where similar states are contrasted to have dissimilar encodings as an inadvertent byproduct of the uniform randomness . rQdia bypasses this flaw by only enforcing a guaranteed constraint : that the Q-value for any sampled action , regardless of statistical distribution , be consistent across the same states invariant to augmentation . This indeed should always be the case , thus yielding gains over CURL while remaining complementary to methods like DrQ and DrQv2 . 3.3 IMAGE AUGMENTATION . Image augmentation is commonly used to counter over-fitting in computer vision . Techniques include color shift , affinity translation , scale , etc . ( Ciregan et al. , 2012 ; Cireşan et al. , 2011 ; Simard et al. , 2003 ; Krizhevsky et al. , 2012 ; Chen et al. , 2020 ) . In Yarats et al . ( 2021b ) , the authors investigated several common image transformations and concluded that random shifts strike a good balance between simplicity and performance for the MuJoCo environments . A variety of different augmentations are useful for different games in the Procgen benchmark ( Raileanu et al. , 2020 ) , and Yarats et al . ( 2021b ) used Intensity variation for the Atari environments . These techniques have proven critical to MuJoCo from pixels . 4 METHODS . rQdia is the first RL Q-value regularizer that does not necessarily depend on either the on-policy or the off-policy states and actions . n , m such states and actions are instead sampled from arbitrary distributions , let ’ s call them D1 and D2 , of state space S and action space A , respectively : s ( 0 ) , ... , s ( n−1 ) ∼ D1 ( S ) a ( 0 ) , ... , a ( m−1 ) ∼ D2 ( A ) . ( 1 ) Then , the following constraint is enforced for Qφ ( · ) , the neural network that models Qπ ( · ) the Q-value function : Qφ ( s ( i ) , a ( j ) ) = Qφ ( aug ( s ( i ) ) , a ( j ) ) ∀i , j , ( 2 ) where aug ( · ) is an arbitrary augmentation transform . aug ( · ) and D1 , D2 could vary . For aug ( · ) , in line with Yarats et al . ( 2021b ) , we use translation for MuJoCo and intensity jittering for Atari . Specifically , to translate , we pad by 4 pixels , then crop randomly inward by 4 pixels ; to intensity jitter , each image is multiplied by some random noise s = 1.1×clip ( r , −2 , 2 ) , r ∼ N ( 0 , 1 ) . For D1 , D2 in MuJoCo continuous action spaces , we implement a simple approach analogous to CURL ’ s negative-sample sampling , except sampling both states and actions rather than just states . That is , states and actions are directly lifted from the mini-batchB ( n = m = |B| ) , in effect sampled from a Uniform distribution over the agent ’ s experience replay . By using historical states and actions as opposed to random noise , we compute Q-value distributions over state-action pairs that could more feasibly be encountered in a deployed roll-out . In discrete Atari , actions may be lifted from the action space directly , that is , a ( 0 ) , ... , a ( m−1 ) = A . Thus , given mini-batch states s ( 0 ) , ... , s ( n−1 ) and mini-batch ( or action space ) actions a ( 0 ) , ... , a ( m−1 ) , the following auxiliary loss is proposed to constitute a basic implement of rQdia : LrQdia = 1 nm ∑ i < n , j < m ( Qφ ( s ( i ) , a ( j ) ) −Qφ ( aug ( s ( i ) ) , a ( j ) ) ) 2 . ( 3 ) Then this auxiliary loss is simply added to the RL agent ’ s standard loss term . Voila , rQdia ( visualized “ in a nutshell ” in Figure 1 ) . This is applied in parallel for each s ( i ) , a ( j ) pair . If mini-batches or actions spaces are very large , it is possible to convolve a smaller subset of n states and m actions . In MuJoCo , we note that while D1 , D2 are treated as Uniform distributions over an agent ’ s history similar to CURL ’ s negative sampling , D1 , D2 could be more sophisticated . For example , the probability of sampling an action could be proportional to state similarities . Or , like MPO ( Abdolmaleki et al. , 2018 ) , actions could be sampled directly from the policy itself . Algorithm 1 provides pseudo-code for rQdia in continuous control algorithms like SAC-AE and DrQ . All code for rQdia will be released open-source . | This paper proposes a regularization method for reinforcement learning that encourages the Q-value of the original image (i.e., original state) and the Q-value of the transformed image (new state) to be the same. This method enhances the robustness of RL methods against environment variation. This paper introduces the background and the motivation of the proposed method. Discussion and comparison of the difference between related works, such as SAC and DrQ, is also provided. Experiments show that the proposed method can improve the performance of image-based methods, even outperforming several state-based methods. | SP:21726ae5d1bf57c0e73a5b584475409de91f1214 |
Sparse MoEs meet Efficient Ensembles | 1 INTRODUCTION . Neural networks typically use all their parameters to process an input . Sustaining the growth of such models—reaching today up to 100B parameters ( Brown et al. , 2020 ) —is challenging , e.g. , due to their high computational and environmental costs ( Strubell et al. , 2019 ; Patterson et al. , 2021 ) . In this context , sparse mixtures of experts ( sparse MoEs ) employ conditional computation ( Bengio et al. , 2013 ) to combine multiple submodels ( experts ) and route examples to certain experts ( Shazeer et al. , 2017 ; Lepikhin et al. , 2021 ; Fedus et al. , 2021 ; Riquelme et al. , 2021 ; Yang et al. , 2021 ) . Conditional computation can decouple the growth of the number of parameters from the training and inference costs , by only activating a subset of the overall model in an input-dependent fashion . Paralleling this trend , the deployment of ML systems in safety-critical fields , e.g. , medical diagnosis ( Dusenberry et al. , 2020b ) and self-driving cars ( Levinson et al. , 2011 ) , has motivated the development of reliable deep learning , e.g. , for calibrated and robust predictions ( Ovadia et al. , 2019 ) . Among the approaches , ensembles of neural networks have remarkable performance for calibration and accuracy under dataset shifts ( Ovadia et al. , 2019 ) . These methods improve reliability by aggregating the predictions of individual submodels ( ensemble members ) . While sharing conceptual similarities , these two classes of models—MoEs and ensembles—have different properties . Sparse MoEs adaptively combine their experts depending on the inputs , and the combination generally happens at internal activation levels . Ensembles typically combine several models in a static way and at the prediction level . Moreover , these two classes of models tend to be benchmarked on different tasks : few-shot classification for MoEs ( Riquelme et al. , 2021 ) and uncertainty-related evaluation for ensembles ( Ovadia et al. , 2019 ; Gustafsson et al. , 2020 ) . CONTRIBUTIONS : In this paper , we study the interplay between sparse MoEs and ensembles . This results in two sets of contributions . Contribution 1 : Complementarity of MoEs and ensembles . We show that sparse MoEs and ensembles have complementary features and benefit from each other . Specifically : • The adaptive computation in sparse MoEs and the static combination in ensembles are orthogonal , with additive benefits when associated together . Their association results in insightful performance versus FLOPs trade-offs while varying the ensemble size and sparsity . • In sparse MoEs , combining models at the prediction level leads to improved uncertainty estimates . • Over tasks where either sparse MoEs or ensembles are known to perform well , naive—and computationally expensive—ensembles of MoEs provide the best predictive performance . Our benchmarking effort includes the first evaluation of sparse MoEs on uncertainty-related vision tasks , which builds upon the empirical work of Riquelme et al . ( 2021 ) . 1 Under review as a conference paper at ICLR 2022 Contribution 2 : Partitioned batch ensembles . We propose partitioned batch ensembles ( pBE ) , see Figure 1 , an efficient ensemble approach tailored to sparse MoEs . Specifically : • pBE improves over sparse MoEs across metrics including few-shot performance , likelihood and calibration error . pBE matches the performance of deep ensembles for 30 % -43 % fewer FLOPs . • pBE gracefully scales up to vision Transformers with up to 2.7B parameters . • pBE is both simple ( requiring only minor implementation changes ) and convenient because standard sparse-MoE checkpoints can be used directly to initialize pBEs for fine-tuning . 2 PRELIMINARIES . We focus on classification tasks where we learn classifiers of the form f ( x ; θ ) based on some training data D = { ( xn , yn ) } Nn=1 . A pair ( xn , yn ) corresponds to an input xn ∈ RP together with its label yn ∈ { 1 , . . . , C } belonging to one of the C classes . The model f ( · ; θ ) is parametrized by θ and outputs a C-dimensional probability vector . We use ◦ to refer to matrix element-wise product . 2.1 VISION TRANSFORMERS AND SPARSE MOES . Vision Transformers . Throughout the paper , we choose the model f to be a vision Transformer ( ViT ) ( Dosovitskiy et al. , 2021 ) . ViT is growing in popularity for vision , especially in transferlearning settings where it was shown to outperform convolutional networks while requiring fewer pre-training resources . ViT operates at the level of patches . An input image is split into equal-sized patches ( e.g. , 32× 32 , 16× 16 , or 14× 14 pixels ) whose resulting sequence is ( linearly ) embedded and processed by a Transformer ( Vaswani et al. , 2017 ) . The operations in the Transformer then mostly consist of a succession of multiheaded self-attention ( MSA ) and MLP layers . ViT is defined at different scales ( Dosovitskiy et al. , 2021 ) : S ( mall ) , B ( ase ) , L ( arge ) and H ( uge ) ; see specifications in Appendix A . For example , ViT-L/16 stands for a large ViT with patch size 16× 16 . Sparse MoEs and V-MoEs . The main feature of sparsely-gated mixture-of-experts models ( sparse MoEs ) lies in the joint use of sparsity and conditional computation ( Bengio et al. , 2013 ) . In those models , we only activate a small subset of the network parameters for a given input , which allows the total number of parameters θ to grow while keeping the overall computational cost constant . The subparts of the network that are activated on a per-input fashion are known as experts . Central to our study , Riquelme et al . ( 2021 ) recently extended ViT to sparse MoEs . Their extension , referred to as V-MoE , follows the successful applications of sparse models in NLP ( Shazeer et al. , 2 Under review as a conference paper at ICLR 2022 2017 ) . Riquelme et al . ( 2021 ) show that V-MoEs dominate their “ dense ” ViT counterparts on a variety of tasks for the same computational cost . In the specific case of V-MoEs , the experts are placed in the MLP layers of the Transformer , a design choice reminiscent of Lepikhin et al . ( 2021 ) in NLP . Given the input h ∈ RD of such a layer , the output of a single MLP ( h ) is replaced by MoE ( h ) = E∑ e=1 ge ( h ) · MLPe ( h ) with { ge ( h ) } Ee=1 = topK ( softmax ( Wh ) ) , ( 1 ) where the routing weights { ge ( h ) } Ee=1 combine the outputs of the E different experts { MLPe } Ee=1 . To sparsely select the experts , topK sets all but the K largest weights to zero . The router parameters W ∈ RE×D are trained together with the rest of the network parameters . We call the layer defined by ( 1 ) an MoE layer . In practice , the weights { ge ( h ) } Ee=1 are obtained by a noisy version of the routing function topK ( softmax ( Wh+ σε ) ) with ε ∼ N ( 0 , I ) , which mitigates the nondifferentiability of topK when combined with auxiliary losses ( Shazeer et al. , 2017 ) . We use the shorthand gateK ( z ) = topK ( softmax ( z + σε ) ) and take σ = 1/E ( Riquelme et al. , 2021 ) . In this paper , we take the “ last-n ” setting of Riquelme et al . ( 2021 ) wherein only a few MoE layers are placed at the end of the Transformer ( n = 2 for the { S , B , L } scale and n = 5 for H ) . This setting retains most of the performance gains of V-MoEs while greatly reducing the training cost . 2.2 ENSEMBLES OF NEURAL NETWORKS . Ensembles . We build on the idea of ensembles , which is a known scheme to improve the performance of individual models ( Hansen & Salamon , 1990 ; Geman et al. , 1992 ; Krogh & Vedelsby , 1995 ; Opitz & Maclin , 1999 ; Dietterich , 2000 ; Lakshminarayanan et al. , 2017 ) . Formally , we assume a set of M model parameters Θ = { θm } Mm=1 . We refer to M as the ensemble size . Prediction proceeds by computing 1M ∑ θ∈Θ f ( x ; θ ) , i.e. , the average probability vector over the M models . To assess the diversity of the predictions in the ensemble , we will use the KL divergence DKL ( f ( xt ; θm ) ‖f ( xt ; θm′ ) ) between the predictive distributions f ( xt ; θm ) and f ( xt ; θm′ ) , averaged over the test input xt and all pairs ( m , m′ ) of ensemble members . Batch ensembles . Ensembles differ in the way Θ is defined . Central to our study , batch ensembles ( BE ) ( Wen et al. , 2019 ) build the ensemble as a collection of submodels , with the parameters θm ∈ Θ sharing components . This mitigates the computational and memory cost of ensembling , enabling one to improve the performance of the original model at little extra cost . We focus on the example of a single dense layer in f with parameters U ∈ RD×L , assuming no bias . BE defines M copies of parameters { Um } Mm=1 so that Um = U ◦ ( rms > m ) , where U are parameters shared across ensemble members , and rm and sm are separate D- and L-dimensional vectors for ensemble member m. Given an input , the BE produces M outputs , and the M outputs are averaged after applying all layers . Despite the simple rank-1 parametrization , BE leads to remarkable predictive performance and robustness ( Wen et al. , 2019 ) . Notably , the efficiency of BE relies on tiling the inputs to simultaneously predict with the M ensemble members , an insight that we also exploit . 2.3 UPSTREAM PRE-TRAINING AND DOWNSTREAM FINE-TUNING . Large-scale Transformers pre-trained on upstream tasks were shown to have strong performance when fine-tuned on smaller downstream tasks , across a variety of domains ( Devlin et al. , 2018 ; Dosovitskiy et al. , 2021 ; Radford et al. , 2021 ) . We follow this paradigm and focus on the finetuning of models pre-trained on JFT-300M ( Sun et al. , 2017 ) , similar to Riquelme et al . ( 2021 ) . We will thus assume the availability of already pre-trained ViT and V-MoE model checkpoints . Our assumption relies on the growing popularity of transfer learning , e.g . Kolesnikov et al . ( 2020 ) , and the increasing accessibility of pre-trained models in repositories such as www.tensorflow . org/hub or www.pytorch.org/hub . The fine-tuning of all the approaches we study here , including extensions of ViT and V-MoE , will be either directly compatible with those checkpoints or require only mild adjustments , e.g. , reshaping or introducing new downstream-specific parameters ( see Appendix C ) . Also , unless otherwise mentioned , the performance we report will always be downstream , e.g. , for ImageNet ( Deng et al. , 2009 ) or Cifar10/100 ( Krizhevsky , 2009 ) . In all our comparisons , we will use the downstream training floating point operations per second ( FLOPs ) , or GFLOPs ( i.e. , 109×FLOPs ) , to quantify the computational cost of the different methods . 3 Under review as a conference paper at ICLR 2022 | The authors show empirically that Sparse MOEs and Ensembles have complementary features, and suggest that combining the two should lead to improved performance. Authors build on the Vision Transformer (ViT) for their experiments. To efficiently combine Sparse MOEs and Ensembles, the paper presents Partitioned Batch Ensembles (PBE), where the parameters of the self-attention layers are shared, and an ensemble of Sparse MOEs are used for the MLP layers of the Transformer blocks. | SP:9d6a017b80845249601f40d6e8c4f98cbbe78f56 |
Sparse MoEs meet Efficient Ensembles | 1 INTRODUCTION . Neural networks typically use all their parameters to process an input . Sustaining the growth of such models—reaching today up to 100B parameters ( Brown et al. , 2020 ) —is challenging , e.g. , due to their high computational and environmental costs ( Strubell et al. , 2019 ; Patterson et al. , 2021 ) . In this context , sparse mixtures of experts ( sparse MoEs ) employ conditional computation ( Bengio et al. , 2013 ) to combine multiple submodels ( experts ) and route examples to certain experts ( Shazeer et al. , 2017 ; Lepikhin et al. , 2021 ; Fedus et al. , 2021 ; Riquelme et al. , 2021 ; Yang et al. , 2021 ) . Conditional computation can decouple the growth of the number of parameters from the training and inference costs , by only activating a subset of the overall model in an input-dependent fashion . Paralleling this trend , the deployment of ML systems in safety-critical fields , e.g. , medical diagnosis ( Dusenberry et al. , 2020b ) and self-driving cars ( Levinson et al. , 2011 ) , has motivated the development of reliable deep learning , e.g. , for calibrated and robust predictions ( Ovadia et al. , 2019 ) . Among the approaches , ensembles of neural networks have remarkable performance for calibration and accuracy under dataset shifts ( Ovadia et al. , 2019 ) . These methods improve reliability by aggregating the predictions of individual submodels ( ensemble members ) . While sharing conceptual similarities , these two classes of models—MoEs and ensembles—have different properties . Sparse MoEs adaptively combine their experts depending on the inputs , and the combination generally happens at internal activation levels . Ensembles typically combine several models in a static way and at the prediction level . Moreover , these two classes of models tend to be benchmarked on different tasks : few-shot classification for MoEs ( Riquelme et al. , 2021 ) and uncertainty-related evaluation for ensembles ( Ovadia et al. , 2019 ; Gustafsson et al. , 2020 ) . CONTRIBUTIONS : In this paper , we study the interplay between sparse MoEs and ensembles . This results in two sets of contributions . Contribution 1 : Complementarity of MoEs and ensembles . We show that sparse MoEs and ensembles have complementary features and benefit from each other . Specifically : • The adaptive computation in sparse MoEs and the static combination in ensembles are orthogonal , with additive benefits when associated together . Their association results in insightful performance versus FLOPs trade-offs while varying the ensemble size and sparsity . • In sparse MoEs , combining models at the prediction level leads to improved uncertainty estimates . • Over tasks where either sparse MoEs or ensembles are known to perform well , naive—and computationally expensive—ensembles of MoEs provide the best predictive performance . Our benchmarking effort includes the first evaluation of sparse MoEs on uncertainty-related vision tasks , which builds upon the empirical work of Riquelme et al . ( 2021 ) . 1 Under review as a conference paper at ICLR 2022 Contribution 2 : Partitioned batch ensembles . We propose partitioned batch ensembles ( pBE ) , see Figure 1 , an efficient ensemble approach tailored to sparse MoEs . Specifically : • pBE improves over sparse MoEs across metrics including few-shot performance , likelihood and calibration error . pBE matches the performance of deep ensembles for 30 % -43 % fewer FLOPs . • pBE gracefully scales up to vision Transformers with up to 2.7B parameters . • pBE is both simple ( requiring only minor implementation changes ) and convenient because standard sparse-MoE checkpoints can be used directly to initialize pBEs for fine-tuning . 2 PRELIMINARIES . We focus on classification tasks where we learn classifiers of the form f ( x ; θ ) based on some training data D = { ( xn , yn ) } Nn=1 . A pair ( xn , yn ) corresponds to an input xn ∈ RP together with its label yn ∈ { 1 , . . . , C } belonging to one of the C classes . The model f ( · ; θ ) is parametrized by θ and outputs a C-dimensional probability vector . We use ◦ to refer to matrix element-wise product . 2.1 VISION TRANSFORMERS AND SPARSE MOES . Vision Transformers . Throughout the paper , we choose the model f to be a vision Transformer ( ViT ) ( Dosovitskiy et al. , 2021 ) . ViT is growing in popularity for vision , especially in transferlearning settings where it was shown to outperform convolutional networks while requiring fewer pre-training resources . ViT operates at the level of patches . An input image is split into equal-sized patches ( e.g. , 32× 32 , 16× 16 , or 14× 14 pixels ) whose resulting sequence is ( linearly ) embedded and processed by a Transformer ( Vaswani et al. , 2017 ) . The operations in the Transformer then mostly consist of a succession of multiheaded self-attention ( MSA ) and MLP layers . ViT is defined at different scales ( Dosovitskiy et al. , 2021 ) : S ( mall ) , B ( ase ) , L ( arge ) and H ( uge ) ; see specifications in Appendix A . For example , ViT-L/16 stands for a large ViT with patch size 16× 16 . Sparse MoEs and V-MoEs . The main feature of sparsely-gated mixture-of-experts models ( sparse MoEs ) lies in the joint use of sparsity and conditional computation ( Bengio et al. , 2013 ) . In those models , we only activate a small subset of the network parameters for a given input , which allows the total number of parameters θ to grow while keeping the overall computational cost constant . The subparts of the network that are activated on a per-input fashion are known as experts . Central to our study , Riquelme et al . ( 2021 ) recently extended ViT to sparse MoEs . Their extension , referred to as V-MoE , follows the successful applications of sparse models in NLP ( Shazeer et al. , 2 Under review as a conference paper at ICLR 2022 2017 ) . Riquelme et al . ( 2021 ) show that V-MoEs dominate their “ dense ” ViT counterparts on a variety of tasks for the same computational cost . In the specific case of V-MoEs , the experts are placed in the MLP layers of the Transformer , a design choice reminiscent of Lepikhin et al . ( 2021 ) in NLP . Given the input h ∈ RD of such a layer , the output of a single MLP ( h ) is replaced by MoE ( h ) = E∑ e=1 ge ( h ) · MLPe ( h ) with { ge ( h ) } Ee=1 = topK ( softmax ( Wh ) ) , ( 1 ) where the routing weights { ge ( h ) } Ee=1 combine the outputs of the E different experts { MLPe } Ee=1 . To sparsely select the experts , topK sets all but the K largest weights to zero . The router parameters W ∈ RE×D are trained together with the rest of the network parameters . We call the layer defined by ( 1 ) an MoE layer . In practice , the weights { ge ( h ) } Ee=1 are obtained by a noisy version of the routing function topK ( softmax ( Wh+ σε ) ) with ε ∼ N ( 0 , I ) , which mitigates the nondifferentiability of topK when combined with auxiliary losses ( Shazeer et al. , 2017 ) . We use the shorthand gateK ( z ) = topK ( softmax ( z + σε ) ) and take σ = 1/E ( Riquelme et al. , 2021 ) . In this paper , we take the “ last-n ” setting of Riquelme et al . ( 2021 ) wherein only a few MoE layers are placed at the end of the Transformer ( n = 2 for the { S , B , L } scale and n = 5 for H ) . This setting retains most of the performance gains of V-MoEs while greatly reducing the training cost . 2.2 ENSEMBLES OF NEURAL NETWORKS . Ensembles . We build on the idea of ensembles , which is a known scheme to improve the performance of individual models ( Hansen & Salamon , 1990 ; Geman et al. , 1992 ; Krogh & Vedelsby , 1995 ; Opitz & Maclin , 1999 ; Dietterich , 2000 ; Lakshminarayanan et al. , 2017 ) . Formally , we assume a set of M model parameters Θ = { θm } Mm=1 . We refer to M as the ensemble size . Prediction proceeds by computing 1M ∑ θ∈Θ f ( x ; θ ) , i.e. , the average probability vector over the M models . To assess the diversity of the predictions in the ensemble , we will use the KL divergence DKL ( f ( xt ; θm ) ‖f ( xt ; θm′ ) ) between the predictive distributions f ( xt ; θm ) and f ( xt ; θm′ ) , averaged over the test input xt and all pairs ( m , m′ ) of ensemble members . Batch ensembles . Ensembles differ in the way Θ is defined . Central to our study , batch ensembles ( BE ) ( Wen et al. , 2019 ) build the ensemble as a collection of submodels , with the parameters θm ∈ Θ sharing components . This mitigates the computational and memory cost of ensembling , enabling one to improve the performance of the original model at little extra cost . We focus on the example of a single dense layer in f with parameters U ∈ RD×L , assuming no bias . BE defines M copies of parameters { Um } Mm=1 so that Um = U ◦ ( rms > m ) , where U are parameters shared across ensemble members , and rm and sm are separate D- and L-dimensional vectors for ensemble member m. Given an input , the BE produces M outputs , and the M outputs are averaged after applying all layers . Despite the simple rank-1 parametrization , BE leads to remarkable predictive performance and robustness ( Wen et al. , 2019 ) . Notably , the efficiency of BE relies on tiling the inputs to simultaneously predict with the M ensemble members , an insight that we also exploit . 2.3 UPSTREAM PRE-TRAINING AND DOWNSTREAM FINE-TUNING . Large-scale Transformers pre-trained on upstream tasks were shown to have strong performance when fine-tuned on smaller downstream tasks , across a variety of domains ( Devlin et al. , 2018 ; Dosovitskiy et al. , 2021 ; Radford et al. , 2021 ) . We follow this paradigm and focus on the finetuning of models pre-trained on JFT-300M ( Sun et al. , 2017 ) , similar to Riquelme et al . ( 2021 ) . We will thus assume the availability of already pre-trained ViT and V-MoE model checkpoints . Our assumption relies on the growing popularity of transfer learning , e.g . Kolesnikov et al . ( 2020 ) , and the increasing accessibility of pre-trained models in repositories such as www.tensorflow . org/hub or www.pytorch.org/hub . The fine-tuning of all the approaches we study here , including extensions of ViT and V-MoE , will be either directly compatible with those checkpoints or require only mild adjustments , e.g. , reshaping or introducing new downstream-specific parameters ( see Appendix C ) . Also , unless otherwise mentioned , the performance we report will always be downstream , e.g. , for ImageNet ( Deng et al. , 2009 ) or Cifar10/100 ( Krizhevsky , 2009 ) . In all our comparisons , we will use the downstream training floating point operations per second ( FLOPs ) , or GFLOPs ( i.e. , 109×FLOPs ) , to quantify the computational cost of the different methods . 3 Under review as a conference paper at ICLR 2022 | The paper investigates the benefits of combining (Sparse) Mixture of Experts (MoE) and ensembling. Sparse MoE’s employ conditional computation to reduce computational and environmental costs of DNNs while maintaining (or increasing) performance. On the other hand, ensembling models has been shown to achieve the highest robustness in the presence of dataset shift, e.g., higher accuracy and better estimation of uncertainty. The present submission empirically demonstrates that Sparse MoE’s can be ensembled to attain the benefits of both techniques simultaneously, i.e., conditional computation (with its implications to scalability) together with robustness in the presence of dataset shift. The main components of the approach are: 1) Disjoint MoE’s as ensemble members. 2) Tiling of representations which enables all ensemble members to compute the output for a batch in a single forward pass. A number of experiments compare predictive performance vs computational cost for the proposed approach (pBE), vision Sparse MoE’s (V-MoE) and Vision Transformers (ViT). The results show that, under some conditions, pBE displays the known benefits of Sparse MoE’s and ensembling, which leads to performance gains w.r.t. ViT and V-MoE under metrics like accuracy, negative log-likelihood (NLL) and expected calibration error (ECE). | SP:9d6a017b80845249601f40d6e8c4f98cbbe78f56 |
Towards General Robustness to Bad Training Data | 1 INTRODUCTION . The quality of training data is a fundamental ingredient towards useful and reliable ML-based applications . Unfortunately , there are unaccountably many possible data issue types . For example , errors and bias occur frequently in data generation and collection processes . Bad data could also be caused by adversarial attacks ( e.g. , data poisoning and backdoor attacks ) , as training data are often collected from anonymous and unverified sources . On the other hand , most of the existing data selection strategies only applicable to specific data issues . Due to the diversity of data issues , there is an urgent need to achieve general robustness to bad data of various types and even unknown types . Purging bad data is a long-standing problem , intensively studied by both the database and the ML community . Most of the existing approaches , however , can only achieve specialized robustness to bad data of certain types . In the database community , the state-of-the-art data cleaning approaches such as ActiveClean ( Krishnan et al. , 2016 ) , BoostClean ( Krishnan et al. , 2017 ) , AlphaClean ( Krishnan and Wu , 2019 ) , and CPClean ( Karlaš et al. , 2020 ) are only applicable to certain classes of ML models and data issues . In particular , they can not detect adversarial attacks on training data . The endeavors of the ML community have covered a wider range of data quality issues such as adversarial attacks ( Wang et al. , 2019 ; Chen et al. , 2019 ) , data debiasing ( Zemel et al. , 2013 ; Madras et al. , 2018 ) , and mislabel detection ( Zhao et al. , 2019 ) . However , each aforementioned solution only focuses on addressing a specific data issue effectively . The effectiveness of these approaches is based on the premise that the data quality issues are known a priori , which usually does not hold in reality . Few recent works have the potential to achieve general robustness to unknown data issues . One line of such works is based on differentially private training ( Du et al. , 2019 ; Hong et al. , 2020 ) . These approaches do not perform data selection ; instead , they attempt to restrict the impact of each training data point on the learning outcome in an undifferentiated manner . As a side effect , these approaches hinder learning from good data , thereby leading to poor learning performance in practice ( Tramèr and Boneh , 2020 ) . Another line of works that has potential to achieve general robustness is based on data valuation . These works first adopt a data importance metric , e.g. , influence function ( Koh and Liang , 2017 ; Koh et al. , 2019 ; Feldman and Zhang , 2020 ) or Shapley value ( Ghorbani and Zou , 2019 ; Jia et al. , 2019a ) , to quantify each training data point ’ s contribution to the training process . Then , which data to retain or remove is decided based on the ranking of data value . However , past empirical studies ( Jia et al. , 2019b ) and our experiments ( Section 6 ) show that their performance varies considerably across different data and learning algorithms . Overall , existing approaches to bad data filtering either can not identify unknown data issues by design or suffer from poor detection efficacy . In this work , we take a step towards general robustness to bad training data . Our work is underpinned by a key insight about what defines “ bad training data ” . Despite the diverse types of data issues , the crucial commonality is that all bad data contribute little to achieving good model performance . If a data point contributes positively to learning , it would be beneficial to just keep it as part of the training set , thus not considered a “ bad ” point . Hence , a promising way to select data without knowing data issue types in advance is to search for data subsets that results in the highest trained model performance . More generally , the data analyst may have a utility function beyond model performance , so we formulate data selection as a utility optimization problem ( Section 3 ) . Secondly , with the utility optimization objective in mind , we present a novel theoretical framework ( Section 4 ) for rigorously analyzing the worst-case performance of data selection approaches . The line of existing works closest to achieving general robustness is the aforementioned data value ranking approaches . However , we show that these approaches have unsatisfying worst-case performance guarantees due to failure to capture the interactions amongst selected data points ( also empirically shown in Appendix F.5.2 ) . In particular , the popular Shapley value-based approach could select the worst data in some common scenarios . We then design a general algorithmic framework guided by the theoretically optimal ( but computationally infeasible ) solution to utility optimization ( Section 5 ) . A significant technical challenge for finding the subset that optimize the model utility is that , in order to evaluate the impact of different subsets of data on model performance , we need to retrain model on every possible subset . To solve the computational challenge , we introduce DATASIFTER , which directly learns a parametric function to predict the performance of a model trained on a given subset and then performs data selection via optimizing the function . Compared with prior data selection algorithms , DATASIFTER has the following advantages : ( 1 ) being able to handle various data issues ( general robustness ) , ( 2 ) applies to any target ML model architectures ( model-agnostic ) , and ( 3 ) instantiated by the goal of downstream ML tasks ( task-driven ) . Finally , we conduct a thorough empirical study on a range of data issues ( Section 6 ) , including backdoor and poisoning attack detection , noisy label/feature detection , data summarization , and data debiasing . Our experiments demonstrate that DATASIFTER achieves and most often significantly improves the state-of-the-art performance of data valuation-based approaches . 2 RELATED WORK . Data valuation-based approaches can potentially achieve general robustness against diverse data issues by quantifying data importance or “ data value ” , and then picking data points with high value for model training process . One simple idea to quantify data importance is to use the leave-one-out error . Koh and Liang ( 2017 ) provides an efficient algorithm to approximate leave-one-out error for each training point . Recent works leverage credit allocation schemes originated from cooperative game theory to quantify data importance . Particularly , Shapley value has been widely used ( Ghorbani and Zou , 2019 ; Jia et al. , 2019a ; c ; b ; Wang et al. , 2020 ) , as it uniquely satisfies a set of desirable axiomatic properties . More recently , Yan and Procaccia ( 2020 ) suggests that the Least core is also a viable alternative to Shapley value for measuring data importance . However , computing the exact Shapley and Least core values are generally NP-hard . Several approximation heuristics , such as TMC-Shapley ( Ghorbani and Zou , 2019 ) , G-Shapley ( Ghorbani and Zou , 2019 ) , KNN-Shapley ( Jia et al. , 2019c ) , have been proposed for the Shapley value . Despite their computational advantage , they are biased in nature . On the other hand , unbiased estimators such as Permutation Sampling ( Maleki , 2015 ) and Group Testing ( Jia et al. , 2019a ) still require retraining models many times for any decent approximation accuracy . TracIn ( Pruthi et al. , 2020 ) estimates the importance by tracing the test loss change caused by a training example during the training process . The representer point method ( Yeh et al. , 2018 ) captures the importance of training point by decomposing the pre-activation prediction of a neural network into a linear combination of activations of training points . The typical paradigm of data valuation-based approaches for selecting high-quality data ( or filtering bad data ) is straightforward : ( 1 ) each data point ’ s value ( e.g. , Shapley value ) is computed . ( 2 ) data points are sorted by value and data points with the highest value are selected . However , this paradigm fails capture the interactions amongst selected data points ( Section 4 and Appendix F.5.2 ) , i.e. , the existence of one data point often affect the importance of another . Differentially private training ( Du et al. , 2019 ; Hong et al. , 2020 ) have the potential to achieve general robustness to unknown data issues . However , fundamentally , these approaches diminish the influence of each training data on the learned model in an undifferentiated manner . Hence , these approaches hinder learning from good data , which lead to poor learning performance ( Tramèr and Boneh , 2020 ) . Data cleaning approaches from database community are not able to achieve general robustness . The state-of-the-art data cleaning approaches leverage the information about downstream ML tasks to guide the cleaning process ; examples include ActiveClean ( Krishnan et al. , 2016 ) , BoostClean ( Krishnan et al. , 2017 ) , AlphaClean ( Krishnan and Wu , 2019 ) , and CPClean ( Karlaš et al. , 2020 ) . However , the state-of-the-art data cleaning methods are only applicable to certain architectures of ML models ( e.g. , convex model , nearest neighbors ) , data format ( e.g. , tabular data ) , and data issues ( e.g. , missing values , outliers ) . In particular , data cleaning approaches can not be straightforwardly extended to adversarial attacks such as data poisoning attacks and backdoor attacks . 3 FORMALISM . We propose to formulate the problem of achieving general robustness to bad data as finding a subset of data points with the highest utility . We use the data utility function to characterize the mapping from a set of data points to its utility . More formally , let D = { ( xi , yi ) } ni=1 denote the training set with data points of different quality . A learning algorithm A is a function that takes a dataset S ⊆ D and outputs a classifier f̂ . A metric function u takes f̂ as input and outputs its model utility . In the machine learning context , we often use test accuracy as the metric , u ( f̂ , V ) = 1|V| ∑ ( x , y ) ∈V 1 [ f̂ ( x ) = y ] for a test set V . However , test set V is usually not available during the training time . In practice , u ( f̂ , V ) is typically approximated by validation accuracy u ( f̂ , V ) where V is a validation set separated from the training set . With a potentially randomized learning algorithmA and a corresponding metric function u , we define the data utility function as UA , u ( S ) = EA [ u ( A ( S ) , V ) ] . When the context is clear , we omit the subscript and simply write U ( S ) . The concept of data utility functions was originally discussed in Wang et al . ( 2021a ) , where it is used for active learning tasks . The critical difference between our formulation and Wang et al . ( 2021a ) is that our formulation incorporates the label information as the input to a data utility function . This is important as label information is required for identifying both mislabeled and many types of adversarial attacks on training data . With the modified notion of the data utility function , we abstract the objective of selecting high-quality data as a utility optimization problem : max S⊆D : |S|=k U ( S ) ( 1 ) where 0 < k < n indicates the selection budget , which can be predetermined ( e.g. , based on the prior knowledge about potential data defects or computational requirements ) . The fundamental intuition behind this formulation is that despite the diversity of data issue types , all “ bad data ” have the commonality that they all contribute little or negatively to model performance . Hence , optimizing data utility function is a principled way to achieve general robustness . Besides , the interactions between data points will significantly affect model performance . A “ good data ” can only be defined relative to the rest of the data points in the dataset . Therefore , high-quality data selection needs to be done in a batch-style instead of one-by-one . Overall , a promising way to deal with unknown data issues is to search for a set of data points that results in the highest trained model performance on a clean validation set . | This paper proposes, *DataSifter*, an optimization-based, general-purpose framework for filtering "bad data" from a training set. General-purpose broadly covers different data corruption types (e.g., adversarial perturbation, label noise, etc.), different model architectures, and performance metrics (e.g., test error). | SP:a8937ce7ccd4a5a0daa3ef434aed388abb1ab0d8 |
Towards General Robustness to Bad Training Data | 1 INTRODUCTION . The quality of training data is a fundamental ingredient towards useful and reliable ML-based applications . Unfortunately , there are unaccountably many possible data issue types . For example , errors and bias occur frequently in data generation and collection processes . Bad data could also be caused by adversarial attacks ( e.g. , data poisoning and backdoor attacks ) , as training data are often collected from anonymous and unverified sources . On the other hand , most of the existing data selection strategies only applicable to specific data issues . Due to the diversity of data issues , there is an urgent need to achieve general robustness to bad data of various types and even unknown types . Purging bad data is a long-standing problem , intensively studied by both the database and the ML community . Most of the existing approaches , however , can only achieve specialized robustness to bad data of certain types . In the database community , the state-of-the-art data cleaning approaches such as ActiveClean ( Krishnan et al. , 2016 ) , BoostClean ( Krishnan et al. , 2017 ) , AlphaClean ( Krishnan and Wu , 2019 ) , and CPClean ( Karlaš et al. , 2020 ) are only applicable to certain classes of ML models and data issues . In particular , they can not detect adversarial attacks on training data . The endeavors of the ML community have covered a wider range of data quality issues such as adversarial attacks ( Wang et al. , 2019 ; Chen et al. , 2019 ) , data debiasing ( Zemel et al. , 2013 ; Madras et al. , 2018 ) , and mislabel detection ( Zhao et al. , 2019 ) . However , each aforementioned solution only focuses on addressing a specific data issue effectively . The effectiveness of these approaches is based on the premise that the data quality issues are known a priori , which usually does not hold in reality . Few recent works have the potential to achieve general robustness to unknown data issues . One line of such works is based on differentially private training ( Du et al. , 2019 ; Hong et al. , 2020 ) . These approaches do not perform data selection ; instead , they attempt to restrict the impact of each training data point on the learning outcome in an undifferentiated manner . As a side effect , these approaches hinder learning from good data , thereby leading to poor learning performance in practice ( Tramèr and Boneh , 2020 ) . Another line of works that has potential to achieve general robustness is based on data valuation . These works first adopt a data importance metric , e.g. , influence function ( Koh and Liang , 2017 ; Koh et al. , 2019 ; Feldman and Zhang , 2020 ) or Shapley value ( Ghorbani and Zou , 2019 ; Jia et al. , 2019a ) , to quantify each training data point ’ s contribution to the training process . Then , which data to retain or remove is decided based on the ranking of data value . However , past empirical studies ( Jia et al. , 2019b ) and our experiments ( Section 6 ) show that their performance varies considerably across different data and learning algorithms . Overall , existing approaches to bad data filtering either can not identify unknown data issues by design or suffer from poor detection efficacy . In this work , we take a step towards general robustness to bad training data . Our work is underpinned by a key insight about what defines “ bad training data ” . Despite the diverse types of data issues , the crucial commonality is that all bad data contribute little to achieving good model performance . If a data point contributes positively to learning , it would be beneficial to just keep it as part of the training set , thus not considered a “ bad ” point . Hence , a promising way to select data without knowing data issue types in advance is to search for data subsets that results in the highest trained model performance . More generally , the data analyst may have a utility function beyond model performance , so we formulate data selection as a utility optimization problem ( Section 3 ) . Secondly , with the utility optimization objective in mind , we present a novel theoretical framework ( Section 4 ) for rigorously analyzing the worst-case performance of data selection approaches . The line of existing works closest to achieving general robustness is the aforementioned data value ranking approaches . However , we show that these approaches have unsatisfying worst-case performance guarantees due to failure to capture the interactions amongst selected data points ( also empirically shown in Appendix F.5.2 ) . In particular , the popular Shapley value-based approach could select the worst data in some common scenarios . We then design a general algorithmic framework guided by the theoretically optimal ( but computationally infeasible ) solution to utility optimization ( Section 5 ) . A significant technical challenge for finding the subset that optimize the model utility is that , in order to evaluate the impact of different subsets of data on model performance , we need to retrain model on every possible subset . To solve the computational challenge , we introduce DATASIFTER , which directly learns a parametric function to predict the performance of a model trained on a given subset and then performs data selection via optimizing the function . Compared with prior data selection algorithms , DATASIFTER has the following advantages : ( 1 ) being able to handle various data issues ( general robustness ) , ( 2 ) applies to any target ML model architectures ( model-agnostic ) , and ( 3 ) instantiated by the goal of downstream ML tasks ( task-driven ) . Finally , we conduct a thorough empirical study on a range of data issues ( Section 6 ) , including backdoor and poisoning attack detection , noisy label/feature detection , data summarization , and data debiasing . Our experiments demonstrate that DATASIFTER achieves and most often significantly improves the state-of-the-art performance of data valuation-based approaches . 2 RELATED WORK . Data valuation-based approaches can potentially achieve general robustness against diverse data issues by quantifying data importance or “ data value ” , and then picking data points with high value for model training process . One simple idea to quantify data importance is to use the leave-one-out error . Koh and Liang ( 2017 ) provides an efficient algorithm to approximate leave-one-out error for each training point . Recent works leverage credit allocation schemes originated from cooperative game theory to quantify data importance . Particularly , Shapley value has been widely used ( Ghorbani and Zou , 2019 ; Jia et al. , 2019a ; c ; b ; Wang et al. , 2020 ) , as it uniquely satisfies a set of desirable axiomatic properties . More recently , Yan and Procaccia ( 2020 ) suggests that the Least core is also a viable alternative to Shapley value for measuring data importance . However , computing the exact Shapley and Least core values are generally NP-hard . Several approximation heuristics , such as TMC-Shapley ( Ghorbani and Zou , 2019 ) , G-Shapley ( Ghorbani and Zou , 2019 ) , KNN-Shapley ( Jia et al. , 2019c ) , have been proposed for the Shapley value . Despite their computational advantage , they are biased in nature . On the other hand , unbiased estimators such as Permutation Sampling ( Maleki , 2015 ) and Group Testing ( Jia et al. , 2019a ) still require retraining models many times for any decent approximation accuracy . TracIn ( Pruthi et al. , 2020 ) estimates the importance by tracing the test loss change caused by a training example during the training process . The representer point method ( Yeh et al. , 2018 ) captures the importance of training point by decomposing the pre-activation prediction of a neural network into a linear combination of activations of training points . The typical paradigm of data valuation-based approaches for selecting high-quality data ( or filtering bad data ) is straightforward : ( 1 ) each data point ’ s value ( e.g. , Shapley value ) is computed . ( 2 ) data points are sorted by value and data points with the highest value are selected . However , this paradigm fails capture the interactions amongst selected data points ( Section 4 and Appendix F.5.2 ) , i.e. , the existence of one data point often affect the importance of another . Differentially private training ( Du et al. , 2019 ; Hong et al. , 2020 ) have the potential to achieve general robustness to unknown data issues . However , fundamentally , these approaches diminish the influence of each training data on the learned model in an undifferentiated manner . Hence , these approaches hinder learning from good data , which lead to poor learning performance ( Tramèr and Boneh , 2020 ) . Data cleaning approaches from database community are not able to achieve general robustness . The state-of-the-art data cleaning approaches leverage the information about downstream ML tasks to guide the cleaning process ; examples include ActiveClean ( Krishnan et al. , 2016 ) , BoostClean ( Krishnan et al. , 2017 ) , AlphaClean ( Krishnan and Wu , 2019 ) , and CPClean ( Karlaš et al. , 2020 ) . However , the state-of-the-art data cleaning methods are only applicable to certain architectures of ML models ( e.g. , convex model , nearest neighbors ) , data format ( e.g. , tabular data ) , and data issues ( e.g. , missing values , outliers ) . In particular , data cleaning approaches can not be straightforwardly extended to adversarial attacks such as data poisoning attacks and backdoor attacks . 3 FORMALISM . We propose to formulate the problem of achieving general robustness to bad data as finding a subset of data points with the highest utility . We use the data utility function to characterize the mapping from a set of data points to its utility . More formally , let D = { ( xi , yi ) } ni=1 denote the training set with data points of different quality . A learning algorithm A is a function that takes a dataset S ⊆ D and outputs a classifier f̂ . A metric function u takes f̂ as input and outputs its model utility . In the machine learning context , we often use test accuracy as the metric , u ( f̂ , V ) = 1|V| ∑ ( x , y ) ∈V 1 [ f̂ ( x ) = y ] for a test set V . However , test set V is usually not available during the training time . In practice , u ( f̂ , V ) is typically approximated by validation accuracy u ( f̂ , V ) where V is a validation set separated from the training set . With a potentially randomized learning algorithmA and a corresponding metric function u , we define the data utility function as UA , u ( S ) = EA [ u ( A ( S ) , V ) ] . When the context is clear , we omit the subscript and simply write U ( S ) . The concept of data utility functions was originally discussed in Wang et al . ( 2021a ) , where it is used for active learning tasks . The critical difference between our formulation and Wang et al . ( 2021a ) is that our formulation incorporates the label information as the input to a data utility function . This is important as label information is required for identifying both mislabeled and many types of adversarial attacks on training data . With the modified notion of the data utility function , we abstract the objective of selecting high-quality data as a utility optimization problem : max S⊆D : |S|=k U ( S ) ( 1 ) where 0 < k < n indicates the selection budget , which can be predetermined ( e.g. , based on the prior knowledge about potential data defects or computational requirements ) . The fundamental intuition behind this formulation is that despite the diversity of data issue types , all “ bad data ” have the commonality that they all contribute little or negatively to model performance . Hence , optimizing data utility function is a principled way to achieve general robustness . Besides , the interactions between data points will significantly affect model performance . A “ good data ” can only be defined relative to the rest of the data points in the dataset . Therefore , high-quality data selection needs to be done in a batch-style instead of one-by-one . Overall , a promising way to deal with unknown data issues is to search for a set of data points that results in the highest trained model performance on a clean validation set . | This paper focuses on the problem of identifying bad training data when the underlying cause is unknown in advance. Authors develop an algorithmic framework, DATASIFTER, for general robustness to bad training data. Empirical evaluation show efficacy of DATASIFTER in a wide range of tasks, including backdoor, poison, noisy/mislabel data detection, data summarization, and data debiasing | SP:a8937ce7ccd4a5a0daa3ef434aed388abb1ab0d8 |
FedNAS: Federated Deep Learning via Neural Architecture Search | 1 INTRODUCTION . Federated Learning ( FL ) is a promising approach for decentralized machine learning , which aims to avoid data sharing and lower the communication cost ( McMahan et al. , 2016 ) . As such , it has gained a lot of attention in various domains of machine learning such as computer vision , natural language processing , and data mining . Despite its widespread popularity , one of the key challenges of FL is data heterogeneity . Since users ’ data are not identically or independently distributed ( non-IID ) in nature , a globally learned model may not perform optimally on all user devices . When interweaving with data heterogeneity , data invisibility is another issue that has rarely been studied . For this reason , to find a better model architecture with higher accuracy , developers must design or choose multiple architectures , then tune hyperparameters remotely to fit the scattered data . This process is extremely expensive because attempting many rounds of training on edge devices results in a remarkably higher communication cost and on-device computational burden than the data center environment . To mitigate the challenge of data heterogeneity , researchers have proposed methods to train a global model , including FedProx Li et al . ( 2018 ) , FedNova Wang et al . ( 2020 ) , and FedOPT Reddi et al . ( 2020 ) . Additionally , personalized frameworks such as Ditto Li et al . ( 2020 ) , pFedMe Dinh et al . ( 2020 ) , and PerFedAvg Fallah et al . ( 2020 ) have been recently developed to optimize personalized models to adapt to individual user ’ s data . These prior works have made remarkable progress in designing optimization schemes for pre-defined model architectures operated at pure optimization . However , these algorithms all require lots of effort to tune hyperparameters ; this is attributed to their strong prior assumptions , which may not always match the unknown data distribution . For example , practitioners must tune the regularization parameter in Ditto Li et al . ( 2020 ) and pFedMe Dinh et al . ( 2020 ) to find a proper correlation between the aggregated global model and local model . Moreover , their design is only in optimization level and does not consider the efficacy of model selection and neural architecture design , leading to a suboptimal solution when using a pre-defined model . We aim to address data heterogeneity in FL via a different and complementary approach that is based on model personalization through neural architecture search ( NAS ) . NAS has recently gained much momentum to adapt heterogeneity in neural architecture design Smithson et al . ( 2016 ) ; Chen et al . ( 2020 ) , latency Wu et al . ( 2019 ) ; Tan et al . ( 2019 ) ; Cai et al . ( 2019 ) , memory footprint Cai et al . ( 2018 ) ; Marchisio et al . ( 2020 ) , energy consumption Hsu et al . ( 2018 ) ; Yang et al . ( 2020 ) for edge devices . NAS methods are often categorized into three types : gradient-based methods Liu et al . ( 2018 ) , evolutionary methods Liu et al . ( 2020 ) , and reinforcement learning ( RL ) -based methods Jaafra et al . ( 2019 ) . Among these , gradient-based methods are the most efficient as they can finish searching in only a few hours , compared to thousands of GPU days with other methods . In this work , to search for a personalized neural architecture for mitigating the data heterogeneity , we adopt an improved variant of the gradient-based method , MiLeNAS He et al . ( 2020c ) , which is computationally tractable and particularly suitable for resource-constrained edge devices . Particularly , we propose a new method named Federated NAS ( FedNAS ) to search model architectures among edge devices collaboratively . As shown in Figure 1 , FedNAS works in the following way . We first utilize the MiLeNAS He et al . ( 2020c ) as a local searcher on each client ’ s local data , which can be distributed easily and efficiently in search time ( Step 1 ) . Formally , it formulates NAS as a mixed-level problem : w = w − ηw∇wLtr ( w , α ) , α = α − ηα ( ∇αLtr ( w , α ) + λ∇αLval ( w , α ) ) , where w represents the network weight and α represents the neural architecture . Ltr ( w , α ) and Lval ( w , α ) denote the loss with respect to training data and validation data , respectively . After the local search , each client then transmits weights w and architecture α to the server ( Step 2 ) . The server then applies a weighted aggregation to obtain the server-side α and w ( Step 3 ) and sends the updated parameters back to each client for the next round of searching ( Step 4 ) . During the searching process , we can personalize the α and w parameters by alternative local adaptation . Such personalization method can either obtain a higher accuracy for various data distributions , or automate the training process with lightweight hyper-parameter searching efforts . We evaluate FedNAS comprehensively in curated non-I.I.D . datasets , including CIFAR-10 and GLD-23K . Our datasets cover both global model training and personalized model training . We also consider different training scenarios : cross-silo FL and cross-device FL , which has a different total number of clients and number of clients per round . We demonstrate that the personalized model architectures learned by the individual clients perform better than the fine-tuned FedAvg and other representative personalized FL methods such Ditto Li et al . ( 2020 ) and perFedAvg Fallah et al . ( 2020 ) with default hyper-parameters in most settings . In summary , our main contributions in this paper are three-fold . 1 . We propose the FedNAS method to search for both global model and personalized model architectures collaboratively among edge devices and show its satisfying performance in a variety of FL settings . 2 . We investigate the role of NAS to address the challenge of data-heterogeneity in FL and demonstrate via experimental results that it can adapt to users ’ data better than existing local adaptation and personalization schemes . 3 . We experimentally show that FedNAS can achieve state-of-the-art performance for both cross-silo and cross-device settings . 2 PROPOSED METHOD . 2.1 PROBLEM DEFINITION . In the federated learning setting , there are K nodes in the network . Each node has a dataset Dk : = { ( xki , yi ) } Nk i=1 which is non-IID . When collaboratively training a deep neural network ( DNN ) model with K nodes , the objective function is defined as : min w f ( w , α︸︷︷︸ fixed ) def = min w K∑ k=1 Nk N · 1 Nk ∑ i∈Dk ` ( xi , yi ; w , α︸︷︷︸ fixed ) ( 1 ) wherew represents the network weight , α determines the neural architecture , and ` is the loss function of the DNN model . To minimize the objective function above , previous works choose a fixed model architecture α then design variant optimization techniques to train the model w. We propose to optimize the federated learning problem from a completely different angle , optimizing w and α simultaneously . Formally , we can reformulate the objective function as : min w , α f ( w , α ) def = min w , α K∑ k=1 Nk N · 1 Nk ∑ i∈Dk ` ( xi , yi ; w , α ) ( 2 ) In other words , for the non-IID dataset scattered across many workers , our goal is to search for an optimal architecture α and related model parameters w to fit the dataset more effectively thus achieve better model performance . In this work , we consider searching for CNN architecture to improve the performance of the image classification task . 2.2 SEARCH SPACE . Normally , NAS includes three consecutive components : the search space definition , the search algorithm , and the performance estimation strategy Hutter et al . ( 2019 ) . Our search space follows the mixed-operation search space defined in DARTS Liu et al . ( 2018 ) and MiLeNAS He et al . ( 2020c ) , where we search in two shared convolutional cells and then build it up as an entire model architecture ( as shown in Figure 2 ) . Inside the cell , to relax the categorical candidate operations between two nodes ( e.g. , convolution , max pooling , skip connection , zero ) to a continuous search space , mixed operation using softmax over all possible operations is proposed : ō ( i , j ) ( x ) = d∑ k=1 exp ( α ( i , j ) k ) ∑d k′=1 exp ( α ( i , j ) k′ ) ︸ ︷︷ ︸ pk ok ( x ) ( 3 ) where the weight pk of the mixed operation ō ( i , j ) ( x ) for a pair of nodes ( i , j ) is parameterized by a vector αi , j . Thus , all architecture operation options inside a network ( model ) can be parameterized as α . More details are introduced in Appendix A.1.1 . 2.3 LOCAL SEARCH . Following the above-mentioned search space , each worker searches locally by utilizing the mixedlevel optimization technique MiLeNAS He et al . ( 2020c ) : w = w − ηw∇wLtr ( w , α ) α = α− ηα ( ∇αLtr ( w , α ) + λ∇αLval ( w , α ) ) ( 4 ) where Ltr ( w , α ) and Lval ( w , α ) denote the loss with respect to the local training data and validation data with w and α , respectively . 2.4 FEDNAS : FEDERATED NEURAL ARCHITECTURE SEARCH . Algorithm 1 FedNAS Algorithm . 1 : Initialization : initialize w0 and α0 ; K clients are selected and indexed by k ; E is the number of local epochs ; T is the number of rounds . 2 : Server executes : 3 : for each round t = 0 , 1 , 2 , ... , T − 1 do 4 : for each client k in parallel do 5 : wkt+1 , αkt+1 ← ClientLocalSearch ( k , wt , αt ) 6 : wt+1 ← ∑K k=1 Nk N wkt+1 7 : αt+1 ← ∑K k=1 Nk N αkt+1 8 : 9 : ClientLocalSearch ( k , w , α ) : // Run on client k 10 : for e in epoch do 11 : for minibatch in training and validation data do 12 : Update w = w − ηw∇wLtr ( w , α ) 13 : Update 14 : α = α− ηα ( ∇αLtr ( w , α ) + λ∇αLval ( w , α ) ) 15 : return w , α to server We propose FedNAS , a distributed neural architecture search algorithm that aims at optimizing the objective function in Equation 2 under the FL setting . We introduce FedNAS corresponding to four steps in Figure 1 : 1 ) The local searching process : each worker optimizes α and w simultaneously using Eq . 4 for several epochs ; 2 ) All clients send their α and w to the server ; 3 ) The central server aggregates these gradients as follows : wt+1 ← K∑ k=1 Nk N wkt+1 αt+1 ← K∑ k=1 Nk N αkt+1 ( 5 ) 4 ) The server sends back the updated α and w to clients , and each client updates its local α and w accordingly , before running the next round of searching . This process is summarized in Algorithm 1 . After searching , an additional evaluation stage is conducted by using a traditional federated optimization method such as FedAvg McMahan et al . ( 2016 ) . | The authors employ an existing neural architecture search method in the federated learning setting. Specifically, the authors propose FeNAS and extend an existing NAS method MiLeNAS into federated learning to address the data heterogeneity problem and conduct personalization. The experiments show that the proposed method is able to achieve improvement compared to some other federated learning methods. | SP:9ef06b25ac4a048d02a32376f5ac24e1ea8f546a |
FedNAS: Federated Deep Learning via Neural Architecture Search | 1 INTRODUCTION . Federated Learning ( FL ) is a promising approach for decentralized machine learning , which aims to avoid data sharing and lower the communication cost ( McMahan et al. , 2016 ) . As such , it has gained a lot of attention in various domains of machine learning such as computer vision , natural language processing , and data mining . Despite its widespread popularity , one of the key challenges of FL is data heterogeneity . Since users ’ data are not identically or independently distributed ( non-IID ) in nature , a globally learned model may not perform optimally on all user devices . When interweaving with data heterogeneity , data invisibility is another issue that has rarely been studied . For this reason , to find a better model architecture with higher accuracy , developers must design or choose multiple architectures , then tune hyperparameters remotely to fit the scattered data . This process is extremely expensive because attempting many rounds of training on edge devices results in a remarkably higher communication cost and on-device computational burden than the data center environment . To mitigate the challenge of data heterogeneity , researchers have proposed methods to train a global model , including FedProx Li et al . ( 2018 ) , FedNova Wang et al . ( 2020 ) , and FedOPT Reddi et al . ( 2020 ) . Additionally , personalized frameworks such as Ditto Li et al . ( 2020 ) , pFedMe Dinh et al . ( 2020 ) , and PerFedAvg Fallah et al . ( 2020 ) have been recently developed to optimize personalized models to adapt to individual user ’ s data . These prior works have made remarkable progress in designing optimization schemes for pre-defined model architectures operated at pure optimization . However , these algorithms all require lots of effort to tune hyperparameters ; this is attributed to their strong prior assumptions , which may not always match the unknown data distribution . For example , practitioners must tune the regularization parameter in Ditto Li et al . ( 2020 ) and pFedMe Dinh et al . ( 2020 ) to find a proper correlation between the aggregated global model and local model . Moreover , their design is only in optimization level and does not consider the efficacy of model selection and neural architecture design , leading to a suboptimal solution when using a pre-defined model . We aim to address data heterogeneity in FL via a different and complementary approach that is based on model personalization through neural architecture search ( NAS ) . NAS has recently gained much momentum to adapt heterogeneity in neural architecture design Smithson et al . ( 2016 ) ; Chen et al . ( 2020 ) , latency Wu et al . ( 2019 ) ; Tan et al . ( 2019 ) ; Cai et al . ( 2019 ) , memory footprint Cai et al . ( 2018 ) ; Marchisio et al . ( 2020 ) , energy consumption Hsu et al . ( 2018 ) ; Yang et al . ( 2020 ) for edge devices . NAS methods are often categorized into three types : gradient-based methods Liu et al . ( 2018 ) , evolutionary methods Liu et al . ( 2020 ) , and reinforcement learning ( RL ) -based methods Jaafra et al . ( 2019 ) . Among these , gradient-based methods are the most efficient as they can finish searching in only a few hours , compared to thousands of GPU days with other methods . In this work , to search for a personalized neural architecture for mitigating the data heterogeneity , we adopt an improved variant of the gradient-based method , MiLeNAS He et al . ( 2020c ) , which is computationally tractable and particularly suitable for resource-constrained edge devices . Particularly , we propose a new method named Federated NAS ( FedNAS ) to search model architectures among edge devices collaboratively . As shown in Figure 1 , FedNAS works in the following way . We first utilize the MiLeNAS He et al . ( 2020c ) as a local searcher on each client ’ s local data , which can be distributed easily and efficiently in search time ( Step 1 ) . Formally , it formulates NAS as a mixed-level problem : w = w − ηw∇wLtr ( w , α ) , α = α − ηα ( ∇αLtr ( w , α ) + λ∇αLval ( w , α ) ) , where w represents the network weight and α represents the neural architecture . Ltr ( w , α ) and Lval ( w , α ) denote the loss with respect to training data and validation data , respectively . After the local search , each client then transmits weights w and architecture α to the server ( Step 2 ) . The server then applies a weighted aggregation to obtain the server-side α and w ( Step 3 ) and sends the updated parameters back to each client for the next round of searching ( Step 4 ) . During the searching process , we can personalize the α and w parameters by alternative local adaptation . Such personalization method can either obtain a higher accuracy for various data distributions , or automate the training process with lightweight hyper-parameter searching efforts . We evaluate FedNAS comprehensively in curated non-I.I.D . datasets , including CIFAR-10 and GLD-23K . Our datasets cover both global model training and personalized model training . We also consider different training scenarios : cross-silo FL and cross-device FL , which has a different total number of clients and number of clients per round . We demonstrate that the personalized model architectures learned by the individual clients perform better than the fine-tuned FedAvg and other representative personalized FL methods such Ditto Li et al . ( 2020 ) and perFedAvg Fallah et al . ( 2020 ) with default hyper-parameters in most settings . In summary , our main contributions in this paper are three-fold . 1 . We propose the FedNAS method to search for both global model and personalized model architectures collaboratively among edge devices and show its satisfying performance in a variety of FL settings . 2 . We investigate the role of NAS to address the challenge of data-heterogeneity in FL and demonstrate via experimental results that it can adapt to users ’ data better than existing local adaptation and personalization schemes . 3 . We experimentally show that FedNAS can achieve state-of-the-art performance for both cross-silo and cross-device settings . 2 PROPOSED METHOD . 2.1 PROBLEM DEFINITION . In the federated learning setting , there are K nodes in the network . Each node has a dataset Dk : = { ( xki , yi ) } Nk i=1 which is non-IID . When collaboratively training a deep neural network ( DNN ) model with K nodes , the objective function is defined as : min w f ( w , α︸︷︷︸ fixed ) def = min w K∑ k=1 Nk N · 1 Nk ∑ i∈Dk ` ( xi , yi ; w , α︸︷︷︸ fixed ) ( 1 ) wherew represents the network weight , α determines the neural architecture , and ` is the loss function of the DNN model . To minimize the objective function above , previous works choose a fixed model architecture α then design variant optimization techniques to train the model w. We propose to optimize the federated learning problem from a completely different angle , optimizing w and α simultaneously . Formally , we can reformulate the objective function as : min w , α f ( w , α ) def = min w , α K∑ k=1 Nk N · 1 Nk ∑ i∈Dk ` ( xi , yi ; w , α ) ( 2 ) In other words , for the non-IID dataset scattered across many workers , our goal is to search for an optimal architecture α and related model parameters w to fit the dataset more effectively thus achieve better model performance . In this work , we consider searching for CNN architecture to improve the performance of the image classification task . 2.2 SEARCH SPACE . Normally , NAS includes three consecutive components : the search space definition , the search algorithm , and the performance estimation strategy Hutter et al . ( 2019 ) . Our search space follows the mixed-operation search space defined in DARTS Liu et al . ( 2018 ) and MiLeNAS He et al . ( 2020c ) , where we search in two shared convolutional cells and then build it up as an entire model architecture ( as shown in Figure 2 ) . Inside the cell , to relax the categorical candidate operations between two nodes ( e.g. , convolution , max pooling , skip connection , zero ) to a continuous search space , mixed operation using softmax over all possible operations is proposed : ō ( i , j ) ( x ) = d∑ k=1 exp ( α ( i , j ) k ) ∑d k′=1 exp ( α ( i , j ) k′ ) ︸ ︷︷ ︸ pk ok ( x ) ( 3 ) where the weight pk of the mixed operation ō ( i , j ) ( x ) for a pair of nodes ( i , j ) is parameterized by a vector αi , j . Thus , all architecture operation options inside a network ( model ) can be parameterized as α . More details are introduced in Appendix A.1.1 . 2.3 LOCAL SEARCH . Following the above-mentioned search space , each worker searches locally by utilizing the mixedlevel optimization technique MiLeNAS He et al . ( 2020c ) : w = w − ηw∇wLtr ( w , α ) α = α− ηα ( ∇αLtr ( w , α ) + λ∇αLval ( w , α ) ) ( 4 ) where Ltr ( w , α ) and Lval ( w , α ) denote the loss with respect to the local training data and validation data with w and α , respectively . 2.4 FEDNAS : FEDERATED NEURAL ARCHITECTURE SEARCH . Algorithm 1 FedNAS Algorithm . 1 : Initialization : initialize w0 and α0 ; K clients are selected and indexed by k ; E is the number of local epochs ; T is the number of rounds . 2 : Server executes : 3 : for each round t = 0 , 1 , 2 , ... , T − 1 do 4 : for each client k in parallel do 5 : wkt+1 , αkt+1 ← ClientLocalSearch ( k , wt , αt ) 6 : wt+1 ← ∑K k=1 Nk N wkt+1 7 : αt+1 ← ∑K k=1 Nk N αkt+1 8 : 9 : ClientLocalSearch ( k , w , α ) : // Run on client k 10 : for e in epoch do 11 : for minibatch in training and validation data do 12 : Update w = w − ηw∇wLtr ( w , α ) 13 : Update 14 : α = α− ηα ( ∇αLtr ( w , α ) + λ∇αLval ( w , α ) ) 15 : return w , α to server We propose FedNAS , a distributed neural architecture search algorithm that aims at optimizing the objective function in Equation 2 under the FL setting . We introduce FedNAS corresponding to four steps in Figure 1 : 1 ) The local searching process : each worker optimizes α and w simultaneously using Eq . 4 for several epochs ; 2 ) All clients send their α and w to the server ; 3 ) The central server aggregates these gradients as follows : wt+1 ← K∑ k=1 Nk N wkt+1 αt+1 ← K∑ k=1 Nk N αkt+1 ( 5 ) 4 ) The server sends back the updated α and w to clients , and each client updates its local α and w accordingly , before running the next round of searching . This process is summarized in Algorithm 1 . After searching , an additional evaluation stage is conducted by using a traditional federated optimization method such as FedAvg McMahan et al . ( 2016 ) . | This paper combines gradient-based NAS (DARTS-like algorithm: MileNAS) with Federated Learning (FL) setup, to improve both global and personalization performance with learned neural architecture. Since both NAS and FL learning are based on gradient, the extension to FL setup becomes intuitive and effective. Empirically FedNAS shows improved performance comparing to existing FL methods. | SP:9ef06b25ac4a048d02a32376f5ac24e1ea8f546a |
AestheticNet: Reducing bias in facial data sets under ethical considerations | 1 MOTIVATION . In 2016 Beauty.AI , a Hong-Kong based technology company , hosted the first international beauty contest judged by artificial intelligence ( beauty.ai , 2016 ) but the results were heavily biased , for example , against dark skin ( Levin , 2016 ) subjects . “ Machine learning models are prone to biased decisions , due to biases in data-sets ” ( Sharma et al. , 2020 ) . Biased training data potentially leads to discriminatory models , as the datasets are created by humans or derived from human activities in the past , for example hiring algorithms ( Bogen , 2019 ) . The reason for racist and discriminatory tendencies must be identified . As the learning algorithms become more complex , understanding why the decisions are made , or even how , prove to be nearly impossible ( Bostrom & Yudkowsky , 2018 ) . Therefore , the development of non-biased and fair training data and AI algorithms ( defined by the European Commission High-Level Expert Group on Artificial Intelligence ( European Commission High-Level Expert Group on Artificial Intelligence [ AI HLEG ] , 2019 ) ) is a new and increasingly complex challenge for scientists around the world ( Bellamy et al. , 2018 ) . The specific field of aesthetic judgement is especially vulnerable to being biased , as aesthetic judgement itself is already a subjective rating ( Richmond , 2017 ) . The purpose of facial beauty prediction ( FBP ) research is to classify images mimicking subjective human judgements . Investigations related to machine perception in a ground-truth free setting show that the data source depends on the measurement of human perception ( Prijatelj et al. , 2020 ) . Therefore , artificial networks need a process to determine labels of the average person ’ s judgement . Our data analysis has already proven that people consider their own ethnicity to be more attractive than others ( Gerlach et al. , 2020 ) , this is the major bias in our experiments and within our dataset . With this tendency , it becomes difficult to generate input data to train a machine-learning algorithm , which assesses a person ’ s attractiveness without bias . This work not only helps to achieve moral enhancement through AI ( see appendix B.1 ) , but also helps eliminating social problems with this new technology ( see appendix B.2 ) . 2 STATE OF THE ART . While research on the estimation of images or portraits is not a new trend , it has gained increasing attention since the emergence of artificial intelligence ( Zhang & Kreiman , 2021 ) . Although , for many applications like autonomous driving , or image classification , AI undoubtedly is the best solution , applications that are affected by unconscious bias , like beauty prediction ( Dornaika et al. , 2020 ) , tend to reflect bias that is likely to be prevalent within given datasets . Especially , when people subjective preferences play a role , such as in attractiveness judgement ( Shank & DeSanti , 2018 ) or human resource evaluation ( Lloyd , 2018 ) , bias is almost certain to happen . Carrera ( 2020 ) conducted a piece of research on the implication of racism in image databases , that analysed the association of aggressiveness , kindness , beauty and ugliness with different images and found that the decisions of many people are affected by subconscious racism . Since researchers are aware of such effect , they found different ways to reduce subconscious bias in machine learning . Since the problem originates from the given databases , either the databases , or the training need to be changed . The possibilities to change the databases include adding data , also referred to as fair preprocessing ( Bellamy et al. , 2018 ) , either by selection or augmentation to insert underrepresented samples . While , deleting images is usually a bad idea , since it increases the chances of the network overfitting , it could theoretically be used to eliminate overrepresented images . On the other side , training can be altered by selecting only images , that do not increase the variance of each class currently used as training input . For example , variational autoencoders can be used to extract the features of the image , to later determine their variance , and only select images as input that do not increase the variance within given classes . Bellamy et al . ( 2018 ) also describe a third method , they called fair post-processing . Since their pipeline aimed to create debiased databases , the post-processing step is usually not applicable for most machine learning applications not creating databases . 3 BIASED AI . 3.1 BIAS FROM HUMAN INDICATIONS . First , we propose hypothesis 1 : The results of the evaluation of the attractiveness of female pictures in the Asia-Europe data set by annotators in China and Germany are implicitly biased . We use our latest data set , which includes a total of 12,034 images of people from different social and ethnical backgrounds , with a total of 5.4 million annotations . Chinese and German participants have rated the pictures in the data set . We then have a comparison result to prove whether hypothesis 1 is true and mark this evaluation result as a ground truth . Figure 1 and fig . 2 confirm the statement of the first hypothesis . Further more , in this process , the results of our research also shows that aesthetic bias is not only related to ethnic background , but also related to age which also has been proven by other researchers ( Gerlach et al. , 2020 ) , ( Akbari et al. , 2020 ) . 3.2 AI TAKES ON HUMAN BIAS . We propose hypothesis 2 : artificial intelligence will copy the human bias . We use convolutional neural networks ( CNN ) to predict facial aesthetic scores and introduce AestheticNet . Related Work . With the introduction of CNNs and large-scale image repositories , facial image and video tasks get more powerful ( Krizhevsky et al. , 2017 ; Zeiler & Fergus , 2013 ; Deng et al. , 2009 ) . Xie et al . ( Xie et al. , 2015a ) present the SCUT-FBP500 dataset , containing 500 Asian female subjects with attractiveness ratings . Since “ FBP is a multi-paradigm computation problem ” the successor SCUT-FBP5500 ( Liang et al. , 2018 ) is introduced in 2018 , including an increased database of 5500 frontal faces with multiple attributes : male/female , Asian/Caucasian , age , beauty score . Liang et al . ( 2018 ) have evaluated their database “ using different combinations of feature and predictor , and various deep learning methods ” on AlexNet ( Krizhevsky et al. , 2017 ) , ResNet-18 ( He et al. , 2015 ) and ResNeXt-50 and achieved the Pearson Correlation PC : 0.8777 ; mean average error MAE : 0.2518 ; root-mean-square error RMSE : 0.3325 as a benchmark . In summary it can be said that all deep CNN models are superior to the shallow predictor with hand-crafted geometric feature or appearance feature ( Liang et al. , 2018 ) . Benchmark Dataset . The SCUT-FBP 5500 data set is a small data set for deep learning tasks . Therefore , it is an even greater challenge to train soft features like aesthetic or beauty . In order to measure the accuracy of the network and to be comparable to recent experiments in facial beauty prediction , we calculate the Pearson correlation coefficient ( PC ) , mean absolute error ( MAE ) and root mean square error ( RMSE ) . AestheticNet predictor architecture . The VGG Face architecture ( Simonyan & Zisserman , 2015 ) is the basis of our AestheticNet . Inspired by an idea of the paper from Shelhamer et al . ( 2017 ) we then add modifications to the network by exploiting feature maps from the third and fourth convolution block . Since the size of the features maps differ from the size of the resulting feature vector , we implement an additional max pooling layer to achieve the wanted output . For the predictions of the network , we concatenate the softmax results into a single feature vector as shown in fig . 3 . Our proposed network achieves a Pearson correlation coefficient of 0.9601 , which indicates an almost linear correspondence between annotations and predictions . Our training results have a very high accuracy and outperform state-of-the-art results . The normalised mean square error is 3.896 % and the normalised root mean square error is 5.580 % . These are measurements of the average error of the predicted labels , which are used to evaluate the accuracy of the network . The results are normalised because there are different datasets with different score ranges . Reannotation of SCUT-FBP5500 dataset . Since 2013 , for our study of facial aesthetics , we conducted online surveys on multiple image datasets ( mentioned in table 2 ) where thousands of students and their relatives participated . With this process we have been able to gather enough data to train a convolutional neural network with the goal to improve facial beauty prediction . During training convolutional neural networks ( CNN ) on this data , we recognised a large bias in this data . This led us to evaluate the annotations from Chinese and German universities and take a closer look at the bias . Our null hypothesis was that there is no bias in dependency of the ethical group , the proof for the presence of bias was done by reductio ad absurdum . In null hypothesis significance testing , the p-value is the probability of obtaining test results at least as extreme as the results actually observed , under the assumption that the null hypothesis is correct ( Aschwanden , 2015 ) . The precise calculation of the p-value in this experiment is difficult because the factorials raise too high , to be reasonably computed on the thousands of labelled values . We calculate the p-value on 300 representative annotations which lead to a p-value of approximately 0.063 % , therefore it is safe to say the null hypothesis can be rejected and we do have an ethical bias . 4 TRAINING OF UNBIASED AI . In general , there are three main paths to reach the goal of unbiased predictions : fair pre-processing , fair in-processing and fair post-processing ( Bellamy et al. , 2018 ) . Within this paper , we present two approaches based on those paths to train an unbiased network with biased data , for FBP . The first approach relies on data pre-processing before training to introduce fairness , we call it “ balanced training ” . The second approach relies on a categorical cross entropy loss function , for the network to learn the bias and decrease it . Those processes are explained in the following sections . 4.1 DATASET AND GAN IMAGES . Machine learning has evolved in the past decades and stands out due to the fact that the knowledge in the system is not provided by experts . Facial beauty prediction ( FBP ) that is consistent with human perception , is a significant visual recognition problem and a much-studied subject in recent decades . Eisenthal et al . ( 2006 ) and ( Kagian et al. , 2008 ) were among the first to publish their research about automatic facial attractiveness predictors and supervised learning techniques , based on the extraction of feature landmarks on faces . We analysed the data that we gathered with our Analysis Toolbox and could measure a significant bias within the prediction of aesthetics through different ethnicities . Therefore , training a network with the goal to create unbiased results is still a challenge in deep learning tasks . In the following we will first describe our data set blend and the accompanying Analysis Toolbox and we explain how we used a GAN to create artificial portraits with European and Asian ethnicities . Starting in 2017 , we used the Asian-European-dataset SCUT-FBP ( Xie et al. , 2015b ; Liang et al. , 2018 ) to evaluate biased annotations from Chinese and German universities . The results proved the assumption that German students favour images of European women and vice versa Chinese students rate Asian portraits higher . Since the SCUT-FBP 5500 dataset is a small dataset for deep learning tasks , we use data augmentation methods to enlarge the sample size of the training set by generating GAN images with either Asian or European or mixed images as input and new synthesised images as output . This augmentation method proves superior to geometric transformations like cropping and rotating . All images are preprocessed , by normalisation methods to harmonise face pose , facial landmark positions and image size . For the purpose of a thorough analysis , we blend multiple datasets in the domain of facial aesthetics together . Our complete set of databases which is described in table 2 , consists of multiracial and multiethnic individuals . In total , this data set includes 12,034 portrait images from persons of different ethnicities with individual social backgrounds . These images are labelled and annotated in surveys over a period of 8 years with a total number of 5.4 million annotations . Additionally , recently we add the FairFace ( Kärkkäinen & Joo , 2019 ) database , which includes male and female portraits of seven different ethnic groups . The synthesised Eurasians images are artificially generated with StarGAN v2 ( Choi et al. , 2020 ) to determine the influence of the biased view of annotators on aesthetics of persons from different ethnicities . We used different customised input for the source and reference images to control the amount of ethnic admixture . Figure 4 shows one exemplary set of images for the Eurasians dataset . After annotating the dataset , the unconscious bias in the annotations can be uncovered . Figure 5 shows the biased average score of our networks on the SCUT-FBP dataset and the Eurasian dataset . Figure 6 illustrates the analysis on the distribution of aesthetic score and age for Asians , Europeans and three mixed-racial subgroups . The different group annotation points are displayed in different colours . We calculate the following metrics for each group cluster i : Horizontal dashed lines are average attractiveness values ai . Vertical dashed lines are average age values yi . As can be seen , the interval of ai has a small span , yet however the interval of yi has a significantly larger span . Each ai and yi values intersection point forms an per group attractiveness-age-factor AAFi = ai/yi . In a fair machine , these AAFi points would be closer together , as the yi span is small . This idea is further elaborated in section 4 . | This paper proposes an AestheticNet and a new approach to bias-free machine learning tools. The former shows a higher Pearson correlation coefficient and a lower mean absolute error than competitive approaches. The latter helps to train an unbiased network with biased data for facial beauty prediction. | SP:3e91cc255d09c478f8da733ba2f45ea40aa2da89 |
AestheticNet: Reducing bias in facial data sets under ethical considerations | 1 MOTIVATION . In 2016 Beauty.AI , a Hong-Kong based technology company , hosted the first international beauty contest judged by artificial intelligence ( beauty.ai , 2016 ) but the results were heavily biased , for example , against dark skin ( Levin , 2016 ) subjects . “ Machine learning models are prone to biased decisions , due to biases in data-sets ” ( Sharma et al. , 2020 ) . Biased training data potentially leads to discriminatory models , as the datasets are created by humans or derived from human activities in the past , for example hiring algorithms ( Bogen , 2019 ) . The reason for racist and discriminatory tendencies must be identified . As the learning algorithms become more complex , understanding why the decisions are made , or even how , prove to be nearly impossible ( Bostrom & Yudkowsky , 2018 ) . Therefore , the development of non-biased and fair training data and AI algorithms ( defined by the European Commission High-Level Expert Group on Artificial Intelligence ( European Commission High-Level Expert Group on Artificial Intelligence [ AI HLEG ] , 2019 ) ) is a new and increasingly complex challenge for scientists around the world ( Bellamy et al. , 2018 ) . The specific field of aesthetic judgement is especially vulnerable to being biased , as aesthetic judgement itself is already a subjective rating ( Richmond , 2017 ) . The purpose of facial beauty prediction ( FBP ) research is to classify images mimicking subjective human judgements . Investigations related to machine perception in a ground-truth free setting show that the data source depends on the measurement of human perception ( Prijatelj et al. , 2020 ) . Therefore , artificial networks need a process to determine labels of the average person ’ s judgement . Our data analysis has already proven that people consider their own ethnicity to be more attractive than others ( Gerlach et al. , 2020 ) , this is the major bias in our experiments and within our dataset . With this tendency , it becomes difficult to generate input data to train a machine-learning algorithm , which assesses a person ’ s attractiveness without bias . This work not only helps to achieve moral enhancement through AI ( see appendix B.1 ) , but also helps eliminating social problems with this new technology ( see appendix B.2 ) . 2 STATE OF THE ART . While research on the estimation of images or portraits is not a new trend , it has gained increasing attention since the emergence of artificial intelligence ( Zhang & Kreiman , 2021 ) . Although , for many applications like autonomous driving , or image classification , AI undoubtedly is the best solution , applications that are affected by unconscious bias , like beauty prediction ( Dornaika et al. , 2020 ) , tend to reflect bias that is likely to be prevalent within given datasets . Especially , when people subjective preferences play a role , such as in attractiveness judgement ( Shank & DeSanti , 2018 ) or human resource evaluation ( Lloyd , 2018 ) , bias is almost certain to happen . Carrera ( 2020 ) conducted a piece of research on the implication of racism in image databases , that analysed the association of aggressiveness , kindness , beauty and ugliness with different images and found that the decisions of many people are affected by subconscious racism . Since researchers are aware of such effect , they found different ways to reduce subconscious bias in machine learning . Since the problem originates from the given databases , either the databases , or the training need to be changed . The possibilities to change the databases include adding data , also referred to as fair preprocessing ( Bellamy et al. , 2018 ) , either by selection or augmentation to insert underrepresented samples . While , deleting images is usually a bad idea , since it increases the chances of the network overfitting , it could theoretically be used to eliminate overrepresented images . On the other side , training can be altered by selecting only images , that do not increase the variance of each class currently used as training input . For example , variational autoencoders can be used to extract the features of the image , to later determine their variance , and only select images as input that do not increase the variance within given classes . Bellamy et al . ( 2018 ) also describe a third method , they called fair post-processing . Since their pipeline aimed to create debiased databases , the post-processing step is usually not applicable for most machine learning applications not creating databases . 3 BIASED AI . 3.1 BIAS FROM HUMAN INDICATIONS . First , we propose hypothesis 1 : The results of the evaluation of the attractiveness of female pictures in the Asia-Europe data set by annotators in China and Germany are implicitly biased . We use our latest data set , which includes a total of 12,034 images of people from different social and ethnical backgrounds , with a total of 5.4 million annotations . Chinese and German participants have rated the pictures in the data set . We then have a comparison result to prove whether hypothesis 1 is true and mark this evaluation result as a ground truth . Figure 1 and fig . 2 confirm the statement of the first hypothesis . Further more , in this process , the results of our research also shows that aesthetic bias is not only related to ethnic background , but also related to age which also has been proven by other researchers ( Gerlach et al. , 2020 ) , ( Akbari et al. , 2020 ) . 3.2 AI TAKES ON HUMAN BIAS . We propose hypothesis 2 : artificial intelligence will copy the human bias . We use convolutional neural networks ( CNN ) to predict facial aesthetic scores and introduce AestheticNet . Related Work . With the introduction of CNNs and large-scale image repositories , facial image and video tasks get more powerful ( Krizhevsky et al. , 2017 ; Zeiler & Fergus , 2013 ; Deng et al. , 2009 ) . Xie et al . ( Xie et al. , 2015a ) present the SCUT-FBP500 dataset , containing 500 Asian female subjects with attractiveness ratings . Since “ FBP is a multi-paradigm computation problem ” the successor SCUT-FBP5500 ( Liang et al. , 2018 ) is introduced in 2018 , including an increased database of 5500 frontal faces with multiple attributes : male/female , Asian/Caucasian , age , beauty score . Liang et al . ( 2018 ) have evaluated their database “ using different combinations of feature and predictor , and various deep learning methods ” on AlexNet ( Krizhevsky et al. , 2017 ) , ResNet-18 ( He et al. , 2015 ) and ResNeXt-50 and achieved the Pearson Correlation PC : 0.8777 ; mean average error MAE : 0.2518 ; root-mean-square error RMSE : 0.3325 as a benchmark . In summary it can be said that all deep CNN models are superior to the shallow predictor with hand-crafted geometric feature or appearance feature ( Liang et al. , 2018 ) . Benchmark Dataset . The SCUT-FBP 5500 data set is a small data set for deep learning tasks . Therefore , it is an even greater challenge to train soft features like aesthetic or beauty . In order to measure the accuracy of the network and to be comparable to recent experiments in facial beauty prediction , we calculate the Pearson correlation coefficient ( PC ) , mean absolute error ( MAE ) and root mean square error ( RMSE ) . AestheticNet predictor architecture . The VGG Face architecture ( Simonyan & Zisserman , 2015 ) is the basis of our AestheticNet . Inspired by an idea of the paper from Shelhamer et al . ( 2017 ) we then add modifications to the network by exploiting feature maps from the third and fourth convolution block . Since the size of the features maps differ from the size of the resulting feature vector , we implement an additional max pooling layer to achieve the wanted output . For the predictions of the network , we concatenate the softmax results into a single feature vector as shown in fig . 3 . Our proposed network achieves a Pearson correlation coefficient of 0.9601 , which indicates an almost linear correspondence between annotations and predictions . Our training results have a very high accuracy and outperform state-of-the-art results . The normalised mean square error is 3.896 % and the normalised root mean square error is 5.580 % . These are measurements of the average error of the predicted labels , which are used to evaluate the accuracy of the network . The results are normalised because there are different datasets with different score ranges . Reannotation of SCUT-FBP5500 dataset . Since 2013 , for our study of facial aesthetics , we conducted online surveys on multiple image datasets ( mentioned in table 2 ) where thousands of students and their relatives participated . With this process we have been able to gather enough data to train a convolutional neural network with the goal to improve facial beauty prediction . During training convolutional neural networks ( CNN ) on this data , we recognised a large bias in this data . This led us to evaluate the annotations from Chinese and German universities and take a closer look at the bias . Our null hypothesis was that there is no bias in dependency of the ethical group , the proof for the presence of bias was done by reductio ad absurdum . In null hypothesis significance testing , the p-value is the probability of obtaining test results at least as extreme as the results actually observed , under the assumption that the null hypothesis is correct ( Aschwanden , 2015 ) . The precise calculation of the p-value in this experiment is difficult because the factorials raise too high , to be reasonably computed on the thousands of labelled values . We calculate the p-value on 300 representative annotations which lead to a p-value of approximately 0.063 % , therefore it is safe to say the null hypothesis can be rejected and we do have an ethical bias . 4 TRAINING OF UNBIASED AI . In general , there are three main paths to reach the goal of unbiased predictions : fair pre-processing , fair in-processing and fair post-processing ( Bellamy et al. , 2018 ) . Within this paper , we present two approaches based on those paths to train an unbiased network with biased data , for FBP . The first approach relies on data pre-processing before training to introduce fairness , we call it “ balanced training ” . The second approach relies on a categorical cross entropy loss function , for the network to learn the bias and decrease it . Those processes are explained in the following sections . 4.1 DATASET AND GAN IMAGES . Machine learning has evolved in the past decades and stands out due to the fact that the knowledge in the system is not provided by experts . Facial beauty prediction ( FBP ) that is consistent with human perception , is a significant visual recognition problem and a much-studied subject in recent decades . Eisenthal et al . ( 2006 ) and ( Kagian et al. , 2008 ) were among the first to publish their research about automatic facial attractiveness predictors and supervised learning techniques , based on the extraction of feature landmarks on faces . We analysed the data that we gathered with our Analysis Toolbox and could measure a significant bias within the prediction of aesthetics through different ethnicities . Therefore , training a network with the goal to create unbiased results is still a challenge in deep learning tasks . In the following we will first describe our data set blend and the accompanying Analysis Toolbox and we explain how we used a GAN to create artificial portraits with European and Asian ethnicities . Starting in 2017 , we used the Asian-European-dataset SCUT-FBP ( Xie et al. , 2015b ; Liang et al. , 2018 ) to evaluate biased annotations from Chinese and German universities . The results proved the assumption that German students favour images of European women and vice versa Chinese students rate Asian portraits higher . Since the SCUT-FBP 5500 dataset is a small dataset for deep learning tasks , we use data augmentation methods to enlarge the sample size of the training set by generating GAN images with either Asian or European or mixed images as input and new synthesised images as output . This augmentation method proves superior to geometric transformations like cropping and rotating . All images are preprocessed , by normalisation methods to harmonise face pose , facial landmark positions and image size . For the purpose of a thorough analysis , we blend multiple datasets in the domain of facial aesthetics together . Our complete set of databases which is described in table 2 , consists of multiracial and multiethnic individuals . In total , this data set includes 12,034 portrait images from persons of different ethnicities with individual social backgrounds . These images are labelled and annotated in surveys over a period of 8 years with a total number of 5.4 million annotations . Additionally , recently we add the FairFace ( Kärkkäinen & Joo , 2019 ) database , which includes male and female portraits of seven different ethnic groups . The synthesised Eurasians images are artificially generated with StarGAN v2 ( Choi et al. , 2020 ) to determine the influence of the biased view of annotators on aesthetics of persons from different ethnicities . We used different customised input for the source and reference images to control the amount of ethnic admixture . Figure 4 shows one exemplary set of images for the Eurasians dataset . After annotating the dataset , the unconscious bias in the annotations can be uncovered . Figure 5 shows the biased average score of our networks on the SCUT-FBP dataset and the Eurasian dataset . Figure 6 illustrates the analysis on the distribution of aesthetic score and age for Asians , Europeans and three mixed-racial subgroups . The different group annotation points are displayed in different colours . We calculate the following metrics for each group cluster i : Horizontal dashed lines are average attractiveness values ai . Vertical dashed lines are average age values yi . As can be seen , the interval of ai has a small span , yet however the interval of yi has a significantly larger span . Each ai and yi values intersection point forms an per group attractiveness-age-factor AAFi = ai/yi . In a fair machine , these AAFi points would be closer together , as the yi span is small . This idea is further elaborated in section 4 . | In this paper, the authors study the problem of bias in facial beauty prediction problem. To this end, they first show that there do exist bias in an existing dataset. Then, they show that deep networks trained with such a biased dataset do capture and reflect the bias. Finally, they propose two solutions for addressing such bias. | SP:3e91cc255d09c478f8da733ba2f45ea40aa2da89 |
Node Feature Extraction by Self-Supervised Multi-scale Neighborhood Prediction | 1 INTRODUCTION . The ubiquity of graph-structured data and its importance in solving various real-world problems such as node and graph classification have made graph-centered machine learning an important research area ( Lü & Zhou , 2011 ; Shervashidze et al. , 2011 ; Zhu , 2005 ) . Graph neural networks ( GNNs ) offer state-of-the-art performance on many graph learning tasks and have by now become a standard methodology in the field ( Kipf & Welling , 2017 ; Hamilton et al. , 2017 ; Velickovic et al. , 2018 ; Chien et al. , 2020 ) . In most such studies , GNNs take graphs with numerical node attributes as inputs and train them with task-specific labels . Recent research has shown that self-supervised learning ( SSL ) leads to performance improvements in many applications , including graph learning , natural language processing and computer vision . Several SSL approaches have also been successfully used with GNNs ( Hu et al. , 2020b ; You et al. , 2018 ; 2020 ; Hu et al. , 2020c ; Velickovic et al. , 2019 ; Kipf & Welling , 2016 ; Deng et al. , 2020 ) . The common idea behind these works is to explore the correlated information provided by the numerical node features and graph topology , which can lead to improved node representations and GNN initialization . However , one critical yet neglected issue in the current graph learning literature is how to actually obtain the numerical node features from raw data such as text , images and audio signals . As an example , when dealing with raw text features , the standard approach is to apply graph-agnostic methods such as bag-of-words , word2vec ( Mikolov et al. , 2013 ) or pre-trained BERT ( Devlin et al. , 2018 ) ( As a further example , raw texts of product descriptions are used to construct node features via the bag-of-words model for benchmarking GNNs on the ogbn-products dataset ( Hu et al. , 2020a ; Chiang et al. , 2019 ) ) . The pre-trained BERT language model , as well as convolutional neural networks ( CNNs ) ( Goyal et al. , 2019 ; Kolesnikov et al. , 2019 ) , produce numerical features that can significantly improve the performance of various downstream learners ( Devlin et al. , 2018 ) . Still , none of these works leverage graph information for actual self-supervision . Clearly , using graphagnostic methods to extract numerical features is sub-optimal , as correlations between the graph topology and raw features are ignored . Motivated by the recent success of SSL approaches for GNNs , we propose GIANT , an SSL framework that resolves the aforementioned issue of graph-agnostic feature extraction in the standard GNN learning pipeline . Our framework takes raw node attributes and generates numerical node features with graph-structured self-supervision . To integrate the graph topology information into language models such as BERT , we also propose a novel SSL task termed neighborhood prediction , which works for both homophilous and heterophilous graphs , and establish connections between neighborhood prediction and the eXtreme Multi-label Classification ( XMC ) problem ( Shen et al. , 2020 ; Yu et al. , 2020 ; Chang et al. , 2020b ) . Roughly speaking , the neighborhood of each node can be encoded using binary multi-labels ( indicating whether a node is a neighbor or not ) and the BERT model is fine-tuned by successively improving the predicted neighborhoods . This approach allows us to not only leverage the advanced solvers for the XMC problem and address the issue of graph-agnostic feature extraction , but also to perform a theoretical study of the XMC problem and determine its importance in the context of graph-guided SSL . Throughout the work , we focus on raw texts as these are the most common data used for largescale graph benchmarking . Examples include titles/abstracts in citation networks and product descriptions in co-purchase networks . To solve our proposed self-supervised XMC task , we adopt the state-of-the-art XR-Transformer method ( Zhang et al. , 2021a ) . By using the encoder from the XR-Transformer pre-trained with GIANT , we obtain informative numerical node features which consistently boost the performance of GNNs on downstream tasks . Notably , GIANT significantly improves state-of-the-art methods for node classification tasks described on the Open Graph Benchmark ( OGB ) ( Hu et al. , 2020a ) leaderboard on three large-scale graph datasets , with absolute improvements in accuracy roughly 1.5 % for the first-ranked methods , 3 % for standard GNNs and 14 % for multilayer perceptron ( MLP ) . GIANT coupled with XRTransformer is also highly scalable and can be combined with other downstream learning methods . Our contributions may be summarized as follows . 1 . We identify the issue of graph-agnostic feature extraction in standard GNN pipelines and propose a new GIANT self-supervised framework as a solution to the problem . 2 . We introduce a new approach to numerical feature extraction supervised by graph information based on the idea of neighborhood prediction . The gist of the approach is to use neighborhood pre- diction within a language model such as BERT to guide the process of fine-tuning the features . Unlike link-prediction , neighborhood prediction resolves problems associated with heterophilic graphs . 3 . We establish pertinent connections between neighborhood prediction and the XMC problem by noting that neighborhoods of individual nodes can be encoded by binary vectors which may be interpreted as multi-labels . This allows for performing neighborhood prediction via XR-Transformers , especially designed to solve XMC problems at scale . 4 . We demonstrate through extensive experiments that GIANT consistently improves the performance of tested GNNs on downstream tasks by large margins . We also report new state-of-the-art results on the OGB leaderboard , including absolute improvements in accuracy roughly 1.5 % compared to the top-ranked method , 3 % for standard GNNs and 14 % for multilayer perceptron ( MLP ) . More precisely , we improve the accuracy of the top-ranked method GAMLP ( Zhang et al. , 2021b ) from 68.25 % to 69.67 % , SGC ( Wu et al. , 2019 ) from 63.29 % to 66.10 % and MLP from 47.24 % to 61.10 % on the ogbn-papers100M dataset . 5 . We present a new theoretical analysis that verifies the benefits of key components in XRTransformers on our neighborhood prediction task . This analysis also further improves our understanding of XR-Transformers and the XMC problem . Due to the space limitation , all proofs are deferred to the Appendix . 2 BACKGROUND AND RELATED WORK . General notation . Throughout the paper , we use bold capital letters such as A to denote matrices . We use Ai for the i-th row of the matrix and Aij for its entry in row i and column j . We reserve bold lowercase letters such as a for vectors . The symbol I denotes the identity matrix while 1 denotes the all-ones vector . We use o ( · ) , O ( · ) , ω ( · ) , Θ ( · ) in the standard manner . SSL in GNNs . SSL is a topic of substantial interest due to its potential for improving the performance of GNNs on various tasks . Exploiting the correlation between node features and the graph structure is known to lead to better node representations or GNN initialization ( Hu et al. , 2020b ; You et al. , 2018 ; 2020 ; Hu et al. , 2020c ) . Several methods have been proposed for improving node representations , including ( variational ) graph autoencoders ( Kipf & Welling , 2016 ) , Deep Graph Infomax ( Velickovic et al. , 2019 ) and GraphZoom ( Deng et al. , 2020 ) . For more information , the interested reader is referred to a survey of SSL GNNs ( Xie et al. , 2021 ) . While these methods can be used as SSL modules in GNNs ( Figure 1 ) , it is clear that they do not solve the described graph agnostics issue in the standard GNN pipeline . Furthermore , as the above described SSL GNNs modules and other pre-processing and post-processing methods for GNNs such as C & S ( Huang et al. , 2021 ) and FLAG ( Kong et al. , 2020 ) in general improve graph learners , it is worth pointing out that they can be naturally be integrated into the GIANT framework . This topic is left as a future work . The XMC problem , PECOS and XR-Transformer . The XMC problem can be succinctly formulated as follows : We are given a training set { Ti , yi } ni=1 , where Ti ∈ D is the ith input text instance and yi ∈ { 0 , 1 } L is the target multi-label from an extremely large collection of labels . The goal is to learn a function f : D× [ L ] 7→ R , where f ( T , l ) captures the relevance between the input text T and the label l. The XMC problem is of importance in many real-world applications ( Jiang et al. , 2021 ; Ye et al. , 2020 ) : For example , in E-commerce dynamic search advertising , XMC arises when trying to find a “ good ” mapping from items to bid queries on the market ( Prabhu et al. , 2018 ; Prabhu & Varma , 2014 ) . In open-domain question answering , XMC problems arise when trying to map questions to “ evidence ” passages containing the answers ( Chang et al. , 2020a ; Lee et al. , 2019 ) . Many methods for the XMC problem leverage hierarchical clustering approaches for labels ( Prabhu et al. , 2018 ; You et al. , 2019 ) . This organizational structure allows one to handle potentially enormous numbers of labels , such as used by PECOS ( Yu et al. , 2020 ) . The key is to take advantage of the correlations among labels within the hierarchical clustering . In our approach , we observe that the multi-labels correspond to neighborhoods of nodes in the given graph . Neighborhoods have to be predicted using the textual information in order to best match the a priori given graph topology . We use the state-of-the-art XR-Transformer ( Zhang et al. , 2021a ) method for solving the XMC problem to achieve this goal . The high-level idea is to first cluster the output labels , and then learn the instance-to-cluster “ matchers ” ( please refer to Figure 2 ) . Note that many other methods have used PECOS ( including XR-Transformers ) for solving large-scale real-world learning problems ( Etter et al. , 2021 ; Liu et al. , 2021 ; Chang et al. , 2020b ; Baharav et al. , 2021 ; Chang et al. , 2021 ; Yadav et al. , 2021 ; Sen et al. , 2021 ) , but not in the context of self-supervised numerical feature extraction as done in our work . GNNs with raw text data . It is conceptually possible to jointly train BERT and GNNs in an end-to-end fashion , which could potentially resolve the issue of being graph agnostic in the standard pipeline . However , the excessive model complexity of BERT makes such a combination practically prohibitive due to GPU memory limitations . Furthermore , it is nontrivial to train this combination of methods with arbitrary mini-batch sizes ( Chiang et al. , 2019 ; Zeng et al. , 2020 ) . In contrast , the XRTransformer architecture naturally supports mini-batch training and scales well ( Jiang et al. , 2021 ) . Hence , our GIANT method uses XR-Transformers instead of combinations of BERT and GNNs . To the best of our knowledge , we are aware of only one prior work that uses raw text inputs for node classification problem ( Zhang et al. , 2020 ) , but it still follows the standard pipeline described in Figure 1 . Some other works apply GNNs on texts and for document classification , where the actual graphs are constructed based on the raw text . This is clearly not the focus of this work ( Yao et al. , 2019 ; Huang et al. , 2019 ; Zhang & Zhang , 2020 ; Liu et al. , 2020 ) . | This paper develops a self-supervised learning framework to extract node features with the aid of graph. Connections between neighborhood prediction and the XMC problem are also established. Experiments on large-scale data show the superiority of the proposed method. | SP:5e57ecc0e0bf2e70846f7d2c0e9b1b625f5e1f0e |
Node Feature Extraction by Self-Supervised Multi-scale Neighborhood Prediction | 1 INTRODUCTION . The ubiquity of graph-structured data and its importance in solving various real-world problems such as node and graph classification have made graph-centered machine learning an important research area ( Lü & Zhou , 2011 ; Shervashidze et al. , 2011 ; Zhu , 2005 ) . Graph neural networks ( GNNs ) offer state-of-the-art performance on many graph learning tasks and have by now become a standard methodology in the field ( Kipf & Welling , 2017 ; Hamilton et al. , 2017 ; Velickovic et al. , 2018 ; Chien et al. , 2020 ) . In most such studies , GNNs take graphs with numerical node attributes as inputs and train them with task-specific labels . Recent research has shown that self-supervised learning ( SSL ) leads to performance improvements in many applications , including graph learning , natural language processing and computer vision . Several SSL approaches have also been successfully used with GNNs ( Hu et al. , 2020b ; You et al. , 2018 ; 2020 ; Hu et al. , 2020c ; Velickovic et al. , 2019 ; Kipf & Welling , 2016 ; Deng et al. , 2020 ) . The common idea behind these works is to explore the correlated information provided by the numerical node features and graph topology , which can lead to improved node representations and GNN initialization . However , one critical yet neglected issue in the current graph learning literature is how to actually obtain the numerical node features from raw data such as text , images and audio signals . As an example , when dealing with raw text features , the standard approach is to apply graph-agnostic methods such as bag-of-words , word2vec ( Mikolov et al. , 2013 ) or pre-trained BERT ( Devlin et al. , 2018 ) ( As a further example , raw texts of product descriptions are used to construct node features via the bag-of-words model for benchmarking GNNs on the ogbn-products dataset ( Hu et al. , 2020a ; Chiang et al. , 2019 ) ) . The pre-trained BERT language model , as well as convolutional neural networks ( CNNs ) ( Goyal et al. , 2019 ; Kolesnikov et al. , 2019 ) , produce numerical features that can significantly improve the performance of various downstream learners ( Devlin et al. , 2018 ) . Still , none of these works leverage graph information for actual self-supervision . Clearly , using graphagnostic methods to extract numerical features is sub-optimal , as correlations between the graph topology and raw features are ignored . Motivated by the recent success of SSL approaches for GNNs , we propose GIANT , an SSL framework that resolves the aforementioned issue of graph-agnostic feature extraction in the standard GNN learning pipeline . Our framework takes raw node attributes and generates numerical node features with graph-structured self-supervision . To integrate the graph topology information into language models such as BERT , we also propose a novel SSL task termed neighborhood prediction , which works for both homophilous and heterophilous graphs , and establish connections between neighborhood prediction and the eXtreme Multi-label Classification ( XMC ) problem ( Shen et al. , 2020 ; Yu et al. , 2020 ; Chang et al. , 2020b ) . Roughly speaking , the neighborhood of each node can be encoded using binary multi-labels ( indicating whether a node is a neighbor or not ) and the BERT model is fine-tuned by successively improving the predicted neighborhoods . This approach allows us to not only leverage the advanced solvers for the XMC problem and address the issue of graph-agnostic feature extraction , but also to perform a theoretical study of the XMC problem and determine its importance in the context of graph-guided SSL . Throughout the work , we focus on raw texts as these are the most common data used for largescale graph benchmarking . Examples include titles/abstracts in citation networks and product descriptions in co-purchase networks . To solve our proposed self-supervised XMC task , we adopt the state-of-the-art XR-Transformer method ( Zhang et al. , 2021a ) . By using the encoder from the XR-Transformer pre-trained with GIANT , we obtain informative numerical node features which consistently boost the performance of GNNs on downstream tasks . Notably , GIANT significantly improves state-of-the-art methods for node classification tasks described on the Open Graph Benchmark ( OGB ) ( Hu et al. , 2020a ) leaderboard on three large-scale graph datasets , with absolute improvements in accuracy roughly 1.5 % for the first-ranked methods , 3 % for standard GNNs and 14 % for multilayer perceptron ( MLP ) . GIANT coupled with XRTransformer is also highly scalable and can be combined with other downstream learning methods . Our contributions may be summarized as follows . 1 . We identify the issue of graph-agnostic feature extraction in standard GNN pipelines and propose a new GIANT self-supervised framework as a solution to the problem . 2 . We introduce a new approach to numerical feature extraction supervised by graph information based on the idea of neighborhood prediction . The gist of the approach is to use neighborhood pre- diction within a language model such as BERT to guide the process of fine-tuning the features . Unlike link-prediction , neighborhood prediction resolves problems associated with heterophilic graphs . 3 . We establish pertinent connections between neighborhood prediction and the XMC problem by noting that neighborhoods of individual nodes can be encoded by binary vectors which may be interpreted as multi-labels . This allows for performing neighborhood prediction via XR-Transformers , especially designed to solve XMC problems at scale . 4 . We demonstrate through extensive experiments that GIANT consistently improves the performance of tested GNNs on downstream tasks by large margins . We also report new state-of-the-art results on the OGB leaderboard , including absolute improvements in accuracy roughly 1.5 % compared to the top-ranked method , 3 % for standard GNNs and 14 % for multilayer perceptron ( MLP ) . More precisely , we improve the accuracy of the top-ranked method GAMLP ( Zhang et al. , 2021b ) from 68.25 % to 69.67 % , SGC ( Wu et al. , 2019 ) from 63.29 % to 66.10 % and MLP from 47.24 % to 61.10 % on the ogbn-papers100M dataset . 5 . We present a new theoretical analysis that verifies the benefits of key components in XRTransformers on our neighborhood prediction task . This analysis also further improves our understanding of XR-Transformers and the XMC problem . Due to the space limitation , all proofs are deferred to the Appendix . 2 BACKGROUND AND RELATED WORK . General notation . Throughout the paper , we use bold capital letters such as A to denote matrices . We use Ai for the i-th row of the matrix and Aij for its entry in row i and column j . We reserve bold lowercase letters such as a for vectors . The symbol I denotes the identity matrix while 1 denotes the all-ones vector . We use o ( · ) , O ( · ) , ω ( · ) , Θ ( · ) in the standard manner . SSL in GNNs . SSL is a topic of substantial interest due to its potential for improving the performance of GNNs on various tasks . Exploiting the correlation between node features and the graph structure is known to lead to better node representations or GNN initialization ( Hu et al. , 2020b ; You et al. , 2018 ; 2020 ; Hu et al. , 2020c ) . Several methods have been proposed for improving node representations , including ( variational ) graph autoencoders ( Kipf & Welling , 2016 ) , Deep Graph Infomax ( Velickovic et al. , 2019 ) and GraphZoom ( Deng et al. , 2020 ) . For more information , the interested reader is referred to a survey of SSL GNNs ( Xie et al. , 2021 ) . While these methods can be used as SSL modules in GNNs ( Figure 1 ) , it is clear that they do not solve the described graph agnostics issue in the standard GNN pipeline . Furthermore , as the above described SSL GNNs modules and other pre-processing and post-processing methods for GNNs such as C & S ( Huang et al. , 2021 ) and FLAG ( Kong et al. , 2020 ) in general improve graph learners , it is worth pointing out that they can be naturally be integrated into the GIANT framework . This topic is left as a future work . The XMC problem , PECOS and XR-Transformer . The XMC problem can be succinctly formulated as follows : We are given a training set { Ti , yi } ni=1 , where Ti ∈ D is the ith input text instance and yi ∈ { 0 , 1 } L is the target multi-label from an extremely large collection of labels . The goal is to learn a function f : D× [ L ] 7→ R , where f ( T , l ) captures the relevance between the input text T and the label l. The XMC problem is of importance in many real-world applications ( Jiang et al. , 2021 ; Ye et al. , 2020 ) : For example , in E-commerce dynamic search advertising , XMC arises when trying to find a “ good ” mapping from items to bid queries on the market ( Prabhu et al. , 2018 ; Prabhu & Varma , 2014 ) . In open-domain question answering , XMC problems arise when trying to map questions to “ evidence ” passages containing the answers ( Chang et al. , 2020a ; Lee et al. , 2019 ) . Many methods for the XMC problem leverage hierarchical clustering approaches for labels ( Prabhu et al. , 2018 ; You et al. , 2019 ) . This organizational structure allows one to handle potentially enormous numbers of labels , such as used by PECOS ( Yu et al. , 2020 ) . The key is to take advantage of the correlations among labels within the hierarchical clustering . In our approach , we observe that the multi-labels correspond to neighborhoods of nodes in the given graph . Neighborhoods have to be predicted using the textual information in order to best match the a priori given graph topology . We use the state-of-the-art XR-Transformer ( Zhang et al. , 2021a ) method for solving the XMC problem to achieve this goal . The high-level idea is to first cluster the output labels , and then learn the instance-to-cluster “ matchers ” ( please refer to Figure 2 ) . Note that many other methods have used PECOS ( including XR-Transformers ) for solving large-scale real-world learning problems ( Etter et al. , 2021 ; Liu et al. , 2021 ; Chang et al. , 2020b ; Baharav et al. , 2021 ; Chang et al. , 2021 ; Yadav et al. , 2021 ; Sen et al. , 2021 ) , but not in the context of self-supervised numerical feature extraction as done in our work . GNNs with raw text data . It is conceptually possible to jointly train BERT and GNNs in an end-to-end fashion , which could potentially resolve the issue of being graph agnostic in the standard pipeline . However , the excessive model complexity of BERT makes such a combination practically prohibitive due to GPU memory limitations . Furthermore , it is nontrivial to train this combination of methods with arbitrary mini-batch sizes ( Chiang et al. , 2019 ; Zeng et al. , 2020 ) . In contrast , the XRTransformer architecture naturally supports mini-batch training and scales well ( Jiang et al. , 2021 ) . Hence , our GIANT method uses XR-Transformers instead of combinations of BERT and GNNs . To the best of our knowledge , we are aware of only one prior work that uses raw text inputs for node classification problem ( Zhang et al. , 2020 ) , but it still follows the standard pipeline described in Figure 1 . Some other works apply GNNs on texts and for document classification , where the actual graphs are constructed based on the raw text . This is clearly not the focus of this work ( Yao et al. , 2019 ; Huang et al. , 2019 ; Zhang & Zhang , 2020 ; Liu et al. , 2020 ) . | The paper proposed a self-supervised learning framework for learning node feature by exploring the correlation between the node feature and the graph structure, which leverages the graph information based on neighborhood prediction. To be specific, the proposed GIANT approach is combined with the pre-trained language model BERT, and incorporated the XMC formalism based on XR-Transformer. Partial theoretical analysis is also presented. Experiments conducted on three large benchmark datasets show promissing improvements. | SP:5e57ecc0e0bf2e70846f7d2c0e9b1b625f5e1f0e |
Local Feature Swapping for Generalization in Reinforcement Learning | 1 INTRODUCTION . Advances made in deep learning have opened the way to many applications in computer vision such as classification , object recognition , or image segmentation . The powerful representation capabilities of deep neural networks paved the way for many successes in deep reinforcement learning with the design of agents able to take decisions directly from pixels ( Mnih et al. , 2013 ; 2015 ) . However , the sensitivity of neural networks to the distribution of training data strongly affects their generalization abilities . Neural networks are intrinsically designed to memorize the data they are trained upon , since their fitting implies empirical risk minimization ( Vapnik , 1992 ) ( they minimize the empirical average prediction error over a large training dataset ) . Therefore , they are prone to prediction errors on unseen samples . RL agents also suffer from this handicap and tend to memorize training trajectories , rather than general skills and features leading to transferable policies . This phenomenon , usually known as overfitting , takes a double sense in RL . Generalization in RL implies the ability to generalize across states ( as in supervised learning ) , but also across environments . It is only recently that several environments with different configurations for training and testing have emerged and received a lot of attention ( Nichol et al. , 2018 ; Justesen et al. , 2018 ; Zhang et al. , 2018a ; Cobbe et al. , 2019 ; 2020 ) , shedding light on the generalization issue which remained mostly overlooked , and confirming the poor generalization ability of current algorithms . Strategies to achieve good generalization and avoid overfitting in deep learning fall into three categories of regularization : explicit regularization ( e.g. , loss penalization , weight decay ) , implicit regularization via the architecture and optimization ( e.g. , dropout , batch-normalization , batch size selection , momentum , early stopping ) , or implicit regularization by enhancement of the input data ( data augmentation ) . Direct application of these strategies to deep RL agents has demonstrated some improvements in agent generalization abilities in some environments , but much progress remains to be made to integrate RL systems in real-world applications . In this work , we address the observational overfitting issue introduced in Song et al . ( 2019 ) which considers a zero-shot generalization RL setting . An agent is trained on a specific distribution of environments ( for example some levels of a platform video game ) and tested on similar environments sharing the same high-level goal and dynamics but with different layouts and visual attributes ( background or assets ) . We argue that a structured stochastic permutation of features of an RL agent during training leads to state-of-theart generalization performance for vision-based policies . We introduce an efficient regularization technique based on Channel-consistent LOcal Permutations ( CLOP ) of the feature maps that mitigates overfitting . We implement it as an intermediate layer in feed-forward neural networks , and demonstrate its effectiveness on several reinforcement and supervised learning problems . This paper is organized as follows . Section 2 presents the necessary background on generalization in supervised learning and reinforcement learning . Section 3 reviews recent work in the literature that allows for a critical look at our contribution and put it in perspective . Section 4 introduces the CLOP technique and the corresponding layer . Section 5 empirically evaluates agents using CLOP against state-of-the-art generalization methods and discusses their strengths , weaknesses , and variants . Section 6 summarizes and concludes this paper . 2 WHAT IS GENERALIZATION ? . Generalization in supervised learning ( SL ) . LetX be an input space of descriptors andY an output space of labels . A SL problem is defined by a distribution p ( x , y ) of elements of X × Y , and a loss L ( ŷ , y ) which measures how different ŷ ∈ Y and y ∈ Y are . Then , for a given function f intended to capture the mapping from X to Y underlying the p distribution , one defines the ( expected ) risk as R ( f ) = Ep [ L ( f ( x ) , y ) ] . Since the true p is generally unknown , one can not directly minimize the risk in search for the optimal f . Given a training set S = { ( xi , yi ) } ni=1 of n items in X × Y drawn i.i.d . according to p ( x , y ) , empirical risk minimization ( Vapnik , 1992 ) seeks to minimize RS ( f ) = 1/n ∑n i=1 [ L ( f ( xi ) , yi ) ] . The ability of f to generalize to unseen samples is then defined by the generalization gap R ( f ) − RS ( f ) , which is often evaluated by approaching R ( f ) as the empirical risk RT ( f ) over a test set T = { ( xi , yi ) } n ′ i=1 also drawn i.i.d . from p ( x , y ) . Closing the generalization gap can be attempted through structural risk minimization , which modifies RS so as to include a regularization penalty into the optimization , or more generally by the introduction of inductive biases ( Mitchell , 1980 ) . Reinforcement learning ( RL ) . RL ( Sutton & Barto , 2018 ) considers the problem of learning a decision making policy for an agent interacting over multiple time steps with a dynamic environment . At each time step , the agent and environment are described through a state s ∈ S , and an action a ∈ A is performed ; then the system transitions to a new state s′ according to probability T ( s′|s , a ) , while receiving reward R ( s , a ) . The tuple M = ( S , A , T , R ) forms a Markov Decision Process ( Puterman , 2014 , MDP ) , which is often complemented with the knowledge of an initial state distribution p0 ( s ) . A decision making policy parameterized by θ is a function πθ ( a|s ) mapping states to distributions over actions . Training a reinforcement learning agent consists in finding the policy that maximizes the discounted expected return : J ( πθ ) = E [ ∑∞ t=0 γ tR ( st , at ) ] . Generalization in RL . Departing from the rather intuitive definition of generalization in SL , the idea of generalization in RL may lead to misconceptions . One could expect a policy that generalizes well to perform well across environments . It seems important to disambiguate this notion and stress out the difference between generalization in the SL sense ( which is a single MDP problem ) , and domain generalization or robustness . For instance , one could expect a policy that learned to play a certain level of a platform game to be able to play on another level , provided the key game features ( e.g . platforms , enemies , treasures ) remain similar enough and the game dynamics are the same . This type of generalization benchmark is typically captured by procedurally generated environments , such as Procgen ( Cobbe et al. , 2020 ) . Finding a policy that yields a guaranteed minimal performance among a set of MDPs ( sharing common state and action spaces ) is the problem of solving Robust MDPs ( Iyengar , 2005 ) . Similarly , that of policy optimization over a distribution over MDPs ( sharing common states and actions too ) is that of domain generalization ( Tobin et al. , 2017 ) . We argue that these problems are unrelated and much harder than vanilla generalization in RL . Robust MDPs induce a maxπminT , R problem , domain generalization is a maxπ ET , R one , while vanilla generalization as understood in SL remains a maxπ problem that we try to solve for all states within a single MDP ( and not only the ones in the training set ) . Consequently , the ability to generalize in RL is a broader notion than structural risk minimization , which , unfortunately , uses the same name of generalization . In a given game , finding a policy that plays well on all levels is still solving the very same MDP . The underlying transition and reward models are the same and only the parts of the state space explored in each level are different . Note that these explored subsets of the state space may have non-empty intersections ( e.g . the final part of two different levels might be common ) and the optimal distribution over actions for a given state is unique . In this work we focus on generalization as the problem of preventing overfitting ( and thus reducing the generalization gap ) within a single MDP , which we call observational overfitting ( Song et al. , 2019 ) . Observational overfitting ( OO ) in RL . The inability to generalize might be caused by overfitting to the partially explored environment dynamics ( Rajeswaran et al. , 2017 ) , or to some misleading signal that is correlated with progress but does not generalize to new levels ( Machado et al. , 2018 ; Song et al. , 2019 ) . Therefore , preventing OO in RL remains the ability to generalize across states , within the same MDP . Beyond the ability of RL agents to memorize good actions in explored states , it boils down to their ability to capture rules that extend to unencountered states , just as in structural risk minimization . As in SL , many policies might fit the observed data , but few might generalize to the true mechanisms of the underlying MDP . Song et al . ( 2019 ) propose to capture OO through a framework where a unique latent state space is transformed into a variety of observation spaces . Observation functions are built by combining useful features with purely decorative and unimportant ones which vary from one observation function to the next . They suppose the observation functions are drawn from a certain distribution ( over procedural generation parameters for instance ) and define the corresponding distribution over MDPs . In turn , they define the risk and the generalization gap with respect to this distribution over MDPs . We slightly depart from their derivation and argue this distinction is unnecessary : what is being solved is the unique MDP defined by the underlying dynamics and the projection of latent states into observations . The risk is thus defined with respect to the distribution over observations induced by the distributions over initial states and observation functions . Overall , this allows capturing the problem of generalization gap minimization in RL and underpins the developments proposed in the remainder of this paper . 3 RELATED WORK . In the following paragraphs , we cover essential works which aim to improve the generalization abilities of neural networks in both supervised learning and reinforcement learning . In supervised learning , the process of modifying a learning algorithm with the objective to reduce its test error while preserving its train error is known as regularization ( Goodfellow et al. , 2016 ) . Direct , or explicit , regularization can be achieved by adding a regularizer term into the loss function , such as an L2 penalty on networks parameters ( Plaut et al. , 1986 ; Krogh & Hertz , 1992 ) . A second , implicit , regularization strategy consists in feature-level manipulations like dropout ( Srivastava et al. , 2014 ) , drop-connect ( Wan et al. , 2013 ) or batch-normalization ( Ioffe & Szegedy , 2015 ) . Regularization can also be achieved implicitly by directly augmenting the training data with perturbations such as adding Gaussian noise ( Bishop , 1995 ) , or , in the case of visual inputs , random cropping and flipping ( Krizhevsky et al. , 2012 ; Szegedy et al. , 2017 ) or removing structured parts of the image ( DeVries & Taylor , 2017 ) . Another efficient augmentation strategy , called label smoothing ( Szegedy et al. , 2016 ) , consists in penalizing overconfident predictions of neural networks by perturbing the labels . Combining perturbation of both inputs and outputs , Zhang et al . ( 2018c ) ; Yun et al . ( 2019 ) , produce synthetic data and labels using two different samples and their corresponding labels . Many studies have highlighted the limited ability of RL agents to generalize to new scenarios ( Farebrother et al. , 2018 ; Packer et al. , 2018 ; Zhang et al. , 2018b ; Song et al. , 2019 ; Cobbe et al. , 2019 ) . Using saliency maps , Song et al . ( 2019 ) exhibit that RL agents trained from pixels in environments with rich and textured observations , such as platform video games ( e.g . Sonic ( Nichol et al. , 2018 ) ) , focus on elements of the scenery correlated with in-game progress but which lead to poor generalization in later situations . One of the identified counter-measures to overfitting in RL consists in applying standard methods in supervised learning . Cobbe et al . ( 2019 ; 2020 ) demonstrated the contribution of classical supervised learning regularization techniques like weight decay , dropout , or batch-normalization to generalization in procedurally generated environments . Similar to dataaugmentation in supervised learning , Raileanu et al . ( 2020 ) ; Laskin et al . ( 2020 ) ; Yarats et al . ( 2020 ) apply visual-data-augmentation on the observations provided by the environment to train robust agents . Igl et al . ( 2019 ) use a selective noise injection and information bottleneck to regularize their agent . Wang et al . ( 2020 ) propose mixreg , a direct application of mixup ( Zhang et al. , 2018c ) in RL , combining two randomly sampled observations , and training the RL agent using their interpo- lated supervision signal . Lee et al . ( 2020 ) use a random convolution layer ahead of the network architecture , to modify the color and texture of the visual observations during training . Tobin et al . ( 2017 ) tackle the sim-to-real problem , using domain randomization on visual inputs to bridge the gap between simulation and reality in robotics . Raileanu & Fergus ( 2021 ) dissociate the optimization process of the policy and value function represented by separate networks and introduce an auxiliary loss that encourages the representation to be invariant to task-irrelevant properties of the environment . Another recent strategy consists in learning representations that are invariant to visual changes . Higgins et al . ( 2017 ) use a two-stage learning process : first they extract disentangled representations from random observation and then they exploit these representations to train an RL agent . Zhang et al . ( 2020 ) use bisimulation metrics to quantify behavioral similarity between states and learn robust task-relevant representations . Wang et al . ( 2021b ) extract , without supervision , the visual foreground to provide background invariant inputs to the policy learner . Our work focuses on the OO situations , where an agent overfits visual observations features that are irrelevant to the latent dynamics of the MDP . Our method approaches the augmentation of data by noise injection at the feature level , thus avoiding the computationally costly operations of highdimensional image transformation in regular data augmentation . By directly modifying the encountered features ’ spatial localization , the CLOP layer aims to remove the correlations between spurious features and rewards . | In this work, a novel regularization method for deep neural networks is introduced. By locally swapping dimensions of intermediate feature maps, the authors report generalization improvements in supervised learning and on several reinforcement learning benchmarks. The method is evaluated against several other common regularization techniques and was found to lead to better results. | SP:ed090d8999fb0edf10ab2d239f7c0b309c2b9fea |
Local Feature Swapping for Generalization in Reinforcement Learning | 1 INTRODUCTION . Advances made in deep learning have opened the way to many applications in computer vision such as classification , object recognition , or image segmentation . The powerful representation capabilities of deep neural networks paved the way for many successes in deep reinforcement learning with the design of agents able to take decisions directly from pixels ( Mnih et al. , 2013 ; 2015 ) . However , the sensitivity of neural networks to the distribution of training data strongly affects their generalization abilities . Neural networks are intrinsically designed to memorize the data they are trained upon , since their fitting implies empirical risk minimization ( Vapnik , 1992 ) ( they minimize the empirical average prediction error over a large training dataset ) . Therefore , they are prone to prediction errors on unseen samples . RL agents also suffer from this handicap and tend to memorize training trajectories , rather than general skills and features leading to transferable policies . This phenomenon , usually known as overfitting , takes a double sense in RL . Generalization in RL implies the ability to generalize across states ( as in supervised learning ) , but also across environments . It is only recently that several environments with different configurations for training and testing have emerged and received a lot of attention ( Nichol et al. , 2018 ; Justesen et al. , 2018 ; Zhang et al. , 2018a ; Cobbe et al. , 2019 ; 2020 ) , shedding light on the generalization issue which remained mostly overlooked , and confirming the poor generalization ability of current algorithms . Strategies to achieve good generalization and avoid overfitting in deep learning fall into three categories of regularization : explicit regularization ( e.g. , loss penalization , weight decay ) , implicit regularization via the architecture and optimization ( e.g. , dropout , batch-normalization , batch size selection , momentum , early stopping ) , or implicit regularization by enhancement of the input data ( data augmentation ) . Direct application of these strategies to deep RL agents has demonstrated some improvements in agent generalization abilities in some environments , but much progress remains to be made to integrate RL systems in real-world applications . In this work , we address the observational overfitting issue introduced in Song et al . ( 2019 ) which considers a zero-shot generalization RL setting . An agent is trained on a specific distribution of environments ( for example some levels of a platform video game ) and tested on similar environments sharing the same high-level goal and dynamics but with different layouts and visual attributes ( background or assets ) . We argue that a structured stochastic permutation of features of an RL agent during training leads to state-of-theart generalization performance for vision-based policies . We introduce an efficient regularization technique based on Channel-consistent LOcal Permutations ( CLOP ) of the feature maps that mitigates overfitting . We implement it as an intermediate layer in feed-forward neural networks , and demonstrate its effectiveness on several reinforcement and supervised learning problems . This paper is organized as follows . Section 2 presents the necessary background on generalization in supervised learning and reinforcement learning . Section 3 reviews recent work in the literature that allows for a critical look at our contribution and put it in perspective . Section 4 introduces the CLOP technique and the corresponding layer . Section 5 empirically evaluates agents using CLOP against state-of-the-art generalization methods and discusses their strengths , weaknesses , and variants . Section 6 summarizes and concludes this paper . 2 WHAT IS GENERALIZATION ? . Generalization in supervised learning ( SL ) . LetX be an input space of descriptors andY an output space of labels . A SL problem is defined by a distribution p ( x , y ) of elements of X × Y , and a loss L ( ŷ , y ) which measures how different ŷ ∈ Y and y ∈ Y are . Then , for a given function f intended to capture the mapping from X to Y underlying the p distribution , one defines the ( expected ) risk as R ( f ) = Ep [ L ( f ( x ) , y ) ] . Since the true p is generally unknown , one can not directly minimize the risk in search for the optimal f . Given a training set S = { ( xi , yi ) } ni=1 of n items in X × Y drawn i.i.d . according to p ( x , y ) , empirical risk minimization ( Vapnik , 1992 ) seeks to minimize RS ( f ) = 1/n ∑n i=1 [ L ( f ( xi ) , yi ) ] . The ability of f to generalize to unseen samples is then defined by the generalization gap R ( f ) − RS ( f ) , which is often evaluated by approaching R ( f ) as the empirical risk RT ( f ) over a test set T = { ( xi , yi ) } n ′ i=1 also drawn i.i.d . from p ( x , y ) . Closing the generalization gap can be attempted through structural risk minimization , which modifies RS so as to include a regularization penalty into the optimization , or more generally by the introduction of inductive biases ( Mitchell , 1980 ) . Reinforcement learning ( RL ) . RL ( Sutton & Barto , 2018 ) considers the problem of learning a decision making policy for an agent interacting over multiple time steps with a dynamic environment . At each time step , the agent and environment are described through a state s ∈ S , and an action a ∈ A is performed ; then the system transitions to a new state s′ according to probability T ( s′|s , a ) , while receiving reward R ( s , a ) . The tuple M = ( S , A , T , R ) forms a Markov Decision Process ( Puterman , 2014 , MDP ) , which is often complemented with the knowledge of an initial state distribution p0 ( s ) . A decision making policy parameterized by θ is a function πθ ( a|s ) mapping states to distributions over actions . Training a reinforcement learning agent consists in finding the policy that maximizes the discounted expected return : J ( πθ ) = E [ ∑∞ t=0 γ tR ( st , at ) ] . Generalization in RL . Departing from the rather intuitive definition of generalization in SL , the idea of generalization in RL may lead to misconceptions . One could expect a policy that generalizes well to perform well across environments . It seems important to disambiguate this notion and stress out the difference between generalization in the SL sense ( which is a single MDP problem ) , and domain generalization or robustness . For instance , one could expect a policy that learned to play a certain level of a platform game to be able to play on another level , provided the key game features ( e.g . platforms , enemies , treasures ) remain similar enough and the game dynamics are the same . This type of generalization benchmark is typically captured by procedurally generated environments , such as Procgen ( Cobbe et al. , 2020 ) . Finding a policy that yields a guaranteed minimal performance among a set of MDPs ( sharing common state and action spaces ) is the problem of solving Robust MDPs ( Iyengar , 2005 ) . Similarly , that of policy optimization over a distribution over MDPs ( sharing common states and actions too ) is that of domain generalization ( Tobin et al. , 2017 ) . We argue that these problems are unrelated and much harder than vanilla generalization in RL . Robust MDPs induce a maxπminT , R problem , domain generalization is a maxπ ET , R one , while vanilla generalization as understood in SL remains a maxπ problem that we try to solve for all states within a single MDP ( and not only the ones in the training set ) . Consequently , the ability to generalize in RL is a broader notion than structural risk minimization , which , unfortunately , uses the same name of generalization . In a given game , finding a policy that plays well on all levels is still solving the very same MDP . The underlying transition and reward models are the same and only the parts of the state space explored in each level are different . Note that these explored subsets of the state space may have non-empty intersections ( e.g . the final part of two different levels might be common ) and the optimal distribution over actions for a given state is unique . In this work we focus on generalization as the problem of preventing overfitting ( and thus reducing the generalization gap ) within a single MDP , which we call observational overfitting ( Song et al. , 2019 ) . Observational overfitting ( OO ) in RL . The inability to generalize might be caused by overfitting to the partially explored environment dynamics ( Rajeswaran et al. , 2017 ) , or to some misleading signal that is correlated with progress but does not generalize to new levels ( Machado et al. , 2018 ; Song et al. , 2019 ) . Therefore , preventing OO in RL remains the ability to generalize across states , within the same MDP . Beyond the ability of RL agents to memorize good actions in explored states , it boils down to their ability to capture rules that extend to unencountered states , just as in structural risk minimization . As in SL , many policies might fit the observed data , but few might generalize to the true mechanisms of the underlying MDP . Song et al . ( 2019 ) propose to capture OO through a framework where a unique latent state space is transformed into a variety of observation spaces . Observation functions are built by combining useful features with purely decorative and unimportant ones which vary from one observation function to the next . They suppose the observation functions are drawn from a certain distribution ( over procedural generation parameters for instance ) and define the corresponding distribution over MDPs . In turn , they define the risk and the generalization gap with respect to this distribution over MDPs . We slightly depart from their derivation and argue this distinction is unnecessary : what is being solved is the unique MDP defined by the underlying dynamics and the projection of latent states into observations . The risk is thus defined with respect to the distribution over observations induced by the distributions over initial states and observation functions . Overall , this allows capturing the problem of generalization gap minimization in RL and underpins the developments proposed in the remainder of this paper . 3 RELATED WORK . In the following paragraphs , we cover essential works which aim to improve the generalization abilities of neural networks in both supervised learning and reinforcement learning . In supervised learning , the process of modifying a learning algorithm with the objective to reduce its test error while preserving its train error is known as regularization ( Goodfellow et al. , 2016 ) . Direct , or explicit , regularization can be achieved by adding a regularizer term into the loss function , such as an L2 penalty on networks parameters ( Plaut et al. , 1986 ; Krogh & Hertz , 1992 ) . A second , implicit , regularization strategy consists in feature-level manipulations like dropout ( Srivastava et al. , 2014 ) , drop-connect ( Wan et al. , 2013 ) or batch-normalization ( Ioffe & Szegedy , 2015 ) . Regularization can also be achieved implicitly by directly augmenting the training data with perturbations such as adding Gaussian noise ( Bishop , 1995 ) , or , in the case of visual inputs , random cropping and flipping ( Krizhevsky et al. , 2012 ; Szegedy et al. , 2017 ) or removing structured parts of the image ( DeVries & Taylor , 2017 ) . Another efficient augmentation strategy , called label smoothing ( Szegedy et al. , 2016 ) , consists in penalizing overconfident predictions of neural networks by perturbing the labels . Combining perturbation of both inputs and outputs , Zhang et al . ( 2018c ) ; Yun et al . ( 2019 ) , produce synthetic data and labels using two different samples and their corresponding labels . Many studies have highlighted the limited ability of RL agents to generalize to new scenarios ( Farebrother et al. , 2018 ; Packer et al. , 2018 ; Zhang et al. , 2018b ; Song et al. , 2019 ; Cobbe et al. , 2019 ) . Using saliency maps , Song et al . ( 2019 ) exhibit that RL agents trained from pixels in environments with rich and textured observations , such as platform video games ( e.g . Sonic ( Nichol et al. , 2018 ) ) , focus on elements of the scenery correlated with in-game progress but which lead to poor generalization in later situations . One of the identified counter-measures to overfitting in RL consists in applying standard methods in supervised learning . Cobbe et al . ( 2019 ; 2020 ) demonstrated the contribution of classical supervised learning regularization techniques like weight decay , dropout , or batch-normalization to generalization in procedurally generated environments . Similar to dataaugmentation in supervised learning , Raileanu et al . ( 2020 ) ; Laskin et al . ( 2020 ) ; Yarats et al . ( 2020 ) apply visual-data-augmentation on the observations provided by the environment to train robust agents . Igl et al . ( 2019 ) use a selective noise injection and information bottleneck to regularize their agent . Wang et al . ( 2020 ) propose mixreg , a direct application of mixup ( Zhang et al. , 2018c ) in RL , combining two randomly sampled observations , and training the RL agent using their interpo- lated supervision signal . Lee et al . ( 2020 ) use a random convolution layer ahead of the network architecture , to modify the color and texture of the visual observations during training . Tobin et al . ( 2017 ) tackle the sim-to-real problem , using domain randomization on visual inputs to bridge the gap between simulation and reality in robotics . Raileanu & Fergus ( 2021 ) dissociate the optimization process of the policy and value function represented by separate networks and introduce an auxiliary loss that encourages the representation to be invariant to task-irrelevant properties of the environment . Another recent strategy consists in learning representations that are invariant to visual changes . Higgins et al . ( 2017 ) use a two-stage learning process : first they extract disentangled representations from random observation and then they exploit these representations to train an RL agent . Zhang et al . ( 2020 ) use bisimulation metrics to quantify behavioral similarity between states and learn robust task-relevant representations . Wang et al . ( 2021b ) extract , without supervision , the visual foreground to provide background invariant inputs to the policy learner . Our work focuses on the OO situations , where an agent overfits visual observations features that are irrelevant to the latent dynamics of the MDP . Our method approaches the augmentation of data by noise injection at the feature level , thus avoiding the computationally costly operations of highdimensional image transformation in regular data augmentation . By directly modifying the encountered features ’ spatial localization , the CLOP layer aims to remove the correlations between spurious features and rewards . | This paper proposes a new regularization scheme, which involves randomly permuting nearby (in terms of spatial locations in the downsized feature tensor) depth blocks. The authors show its effectiveness in supervised learning tasks and establish a SOTA-like result over Procgen generalization, and also provide several empirical ablations and visualizations over the method to understand its inner workings. The paper shows that regularization which involves the locality of objects is particularly effective. | SP:ed090d8999fb0edf10ab2d239f7c0b309c2b9fea |
Prospect Pruning: Finding Trainable Weights at Initialization using Meta-Gradients | 1 INTRODUCTION . Pruning at initialization—where we remove weights from a model before training begins—is a recent and promising area of research that enables us to enjoy the benefits of pruning at training time , and which may aid our understanding of training deep neural networks . Frankle & Carbin ( 2019 ) provide empirical evidence for the existence of sparse sub-networks that can be trained from initialization and achieve accuracies comparable to the original network . These “ winning tickets ” were originally found in an iterative process where , in each iteration , the network is trained to full convergence followed by pruning a subset of the weights by magnitude . The values of the remaining weights are then rewound to their value at initialization , and the process is repeated iteratively until the desired sparsity level is achieved . This process , known as Lottery Ticket Rewinding ( LTR ) , is very compute-intensive and is prone to failures . For instance , Frankle et al . ( 2020 ) show better results by rewinding weights not all the way back to initialization , but to early stages of training instead . LTR is especially prone to failure for more difficult problems ( e.g. , training on ImageNet ) , where we must rewind weights to their state several epochs into training . A recent line of work proposes alternative practical solutions to identify these sub-networks before training begins , without the cost of retraining the network iteratively Lee et al . ( 2018 ) ; Wang et al . ( 2020 ) ; de Jorge et al . ( 2021 ) ; Tanaka et al . ( 2020 ) . This class of methods uses gradients to assess the importance of neural network weights . These gradients are often known as Synaptic Saliencies and are used to estimate the effect of pruning a single parameter in isolation on various objectives , typically the loss function . This objective is not so different from classical pruning-at-convergence methods , but the gradients for a well-trained model are small ; therefore these methods must inspect higher-order metrics such as the Hessian to estimate the pruning effect ( LeCun et al. , 1990 ; Hassibi & Stork , 1993 ) . Pruning at initialization is desirable because the benefits of pruning ( in terms of memory and speed ) can be reaped during training , rather than only at inference/deployment time . However , the performance of prune-at-init methods remains poor : the degradation in accuracy is still significant compared to training the full model and LTR , making these methods impractical for many real-world problems ( Frankle et al. , 2021 ) . In this paper , we identify a fundamental limitation in the objective formulation of current methods , namely that saliency criteria do not take into account the fact that the model is going to be trained after the pruning step . If our aim was to simply prune a subset of weights without affecting the loss , then these saliency criteria are estimating the correct objective . However , this estimate does not take into account that we are going to train the weights after we prune them . We need a metric that captures the trainability of the weights during the optimization steps , rather than a single myopic estimate . Many methods attempt to overcome this by pruning gradually and/or adding training steps between iterative pruning steps ( Zhu & Gupta , 2018 ; You et al. , 2020 ; de Jorge et al. , 2021 ) . Although this approach has been shown to be effective , it is expensive and cumbersome in practice and ultimately is an indirect approximation to the trainability criteria we are looking to incorporate into our objective . In this paper , we propose Prospect Pruning ( ProsPr ) , a new pruning-at-init method that learns from the first few steps of optimization which parameters to prune . We explicitly formulate our saliency criteria to account for the fact that the network will be trained after pruning . More precisely , ProsPr uses meta-gradients by backpropagating through the first few model updates in order to estimate the effect the initial pruning parameters have on the loss after a few gradient descent steps . Effectively this enables us to account for both higher-order effects of pruning weights on the loss , as well as the trainability of individual weights . Similar to other methods we apply pruning to initialization values of weights and train our models from scratch . In summary , our contributions are : • We identify a key limitation in prior saliency criteria for pruning neural networks—namely that they do not explicitly incorporate trainability-after-pruning into their criteria . • We propose a new pruning-at-init method , ProsPr , that uses meta-gradients over the first few training steps to bridge the gap between pruning and training . • We show empirically that ProsPr achieves higher accuracy compared to existing pruningat-init methods1 . Unlike other methods , our approach is single shot in the sense that the pruning is applied to the network initial weights in a single step . 2 BACKGROUND . In this section we review the key concepts that our method builds upon . We delay comparisons to other pruning techniques in the literature to Section 5 . Classic post-training pruning methods aim to identify and remove network weights with the least impact on the loss ( LeCun et al. , 1990 ; Hassibi & Stork , 1993 ) . They typically use the Taylor expansion of the loss with respect to parameters to define a saliency score for each parameter : δL ≈ ∇θL > δθ + 12δθ > H δθ , where H = ∇2θL is the Hessian matrix . When the network has converged , the first-order term in the expansion is negligible , and hence these methods resort to using H. Lee et al . ( 2018 ) introduce SNIP , and show that the same objective of minimizing the change in loss can be used at initialization to obtain a trainable pruned network . At initialization , the first-order gradients ∇θ in the local quadratic approximation are still significant , so higher-order terms can be ignored . Hence the computation of the parameter saliencies can be done using backpropagation . The Taylor expansion approximates the effect of small additive perturbations to the loss . To better approximate the effect of removing a weight , Lee et al . ( 2018 ) attach a multiplicative all-one mask to the computation graph of each weight . This does not change the forward-pass of the network , but it enables us to form the Taylor expansion around the mask values , rather than the weights , to estimate the effect of changing the mask values from 1 to 0 . More specifically , SNIP computes the saliency scores according to : sj = |gj ( w , D ) |∑m k=1 |gk ( w , D ) | , ( 1 ) with gj ( w , D ) = ∂L ( c w , D ) ∂cj , ( 2 ) 1Our code and models are publicly available at https : //anonymous-during-review where m is the number of weights in the network , c ∈ { 0 , 1 } m is the pruning mask ( initialised to 1 above ) , D is the training dataset , w are the neural network weights , L is the loss function , and is the Hadamard product . These saliency scores are computed before training the network , using one ( or more ) mini-batches from the training set . The global Top-K weights with the highest saliency scores are retained ( cj = 1 ) , and all other weights are pruned ( cj = 0 ) , before the network is trained . Our method , to be introduced in Section 3 , also relies on computing the saliency scores for each mask element , but uses a more sophisticated loss function to incorporate the notion of trainability . 3 OUR METHOD : PROSPR . In this section we introduce our method , Prospect Pruning ( ProsPr ) . We note that for the problem of pruning at initialization , the pruning step is immediately followed by training . Therefore , pruning should take into account the trainability of a weight , instead of only its immediate impact on the loss before training . In other words , we want to be able to identify weights that are not only important at initialization , but which may be useful for reducing the loss during training . To this end , we propose to estimate the effect of pruning on the loss over several steps of gradient descent at the beginning of training , rather than the changes in loss at initialization . More specifically , ProsPr models how training would happen by performing multiple ( M ) iterations of backpropagation and weight updates—like during normal training . We can then backpropagate through the entire computation graph , from the loss several steps into training , back to the original mask , since the gradient descent procedure is itself differentiable . Once the pruning mask is computed , we rewind the weights back to their values at initialization and train the pruned network . The gradient-of-gradients is called a meta-gradient . This algorithm is illustrated visually in Figure 1 . The higher-order information in the meta-gradient includes interactions between the weights during training . When pruning at initialization , our ultimate goal is to pick a pruned model , A , which is more trainable than an alternative pruned model B . That means we want the loss L ( ŷA , y ) to be lower than L ( ŷB , y ) at convergence ( for a fixed pruning ratio ) . Finding the optimal pruning mask is generally infeasible since the training horizon is long ( i.e. , evaluation is costly ) and the space of possible pruning masks is large . Unlike other methods that must compute the saliency scores iteratively , we can use the meta-gradients to compute the pruning mask in one shot . This picks a line in loss-space , which more closely predicts the eventual actual loss . This is because it smooths out over more steps , and takes into account interactions between weights in the training dynamics . Crucially , in the limit of large M , the match to the ultimate objective is exact . 3.1 SALIENCY SCORES VIA META-GRADIENTS . We now introduce ProsPr formally . After initialising the network weights randomly to obtain winit , we apply a weight mask to the initial weights , w0 = c winit . ( 3 ) This weight mask contains only ones , c = 1 , as in SNIP ( Lee et al. , 2018 ) , and represents the connectivity of the corresponding weights . We then sample M+1 batches of data Di ∼ Dtrain ( i ∈ { 0 , . . . , M } ; M ≥ 1 ) for the pruning step , and perform M weight updates2 , w1 = w0 − α∇w0L ( w0 , D0 ) ( 4 ) ... wM = wM−1 − α∇wM−1L ( wM−1 , DM−1 ) . ( 5 ) Then , we compute a meta-gradient that backpropagates through these updates . Specifically , we compute the gradient of the final loss w.r.t . the initial mask , ∇c L ( wM , DM ) . ( 6 ) Using the chain rule , we can write out the form of the meta-gradient beginning from the last step : ∇cL ( wM , D ) = ∇wML ( wM , D ) ( ∇cwM ) , ( 7 ) repeating for each step until we reach the zero ’ th step whose gradient is trivial , = ∇wML ( wM , D ) ( ∇wM−1wM ) . . . ( ∇w0w1 ) ( ∇cw0 ) ( 8 ) = ∇wML ( wM , D ) ( ∇wM−1wM ) . . . ( ∇w0w1 ) ( ∇c ( c winit ) ) ( 9 ) = ∇wML ( wM , D ) [ M∏ m=1 ( ∇wm−1wm ) ] winit . ( 10 ) In practice , we can compute the meta-gradients by relying on automatic differentiation software such as PyTorch ( Paszke et al. , 2019 ) . However , care must be taken to ensure that weights at each step are kept in memory so that the entire computation graph , including gradients , is visible to the automatic differentiation software . The saliency scores are now given by sj = |gj ( w , D ) |∑m k=1 |gk ( w , D ) | , ( 11 ) with gj ( w , D ) = ∂L ( wM , D ) ∂cj , ( 12 ) where wM is a function of c. Equation ( 12 ) stands in contrast to SNIP , where the saliency is computed using the loss at c ·winit rather than wM . The saliency scores are then used to prune the initial weights winit : the ones with the highest saliency scores are retained ( cj = 1 ) , and all other weights are pruned ( cj = 0 ) . Finally , the network is trained with the pruned weights ŵinit . Algorithm 1 summarises the proposed method , ProsPr . | This work studies the problem of pruning neural networks at initialization. It first identifies that the saliency score defined by the existing method SNIP has room for improvement. Specifically, the authors propose a method named prospect pruning to take into account the sequence of weight updates to determine the pruning mask. The experimental results on Tiny ImageNet and CIFAR show that the proposed method achieves better performance than existing methods of pruning at initialization. | SP:b61b07e85d8e940816c1a769cb4c695112f5c7ad |
Prospect Pruning: Finding Trainable Weights at Initialization using Meta-Gradients | 1 INTRODUCTION . Pruning at initialization—where we remove weights from a model before training begins—is a recent and promising area of research that enables us to enjoy the benefits of pruning at training time , and which may aid our understanding of training deep neural networks . Frankle & Carbin ( 2019 ) provide empirical evidence for the existence of sparse sub-networks that can be trained from initialization and achieve accuracies comparable to the original network . These “ winning tickets ” were originally found in an iterative process where , in each iteration , the network is trained to full convergence followed by pruning a subset of the weights by magnitude . The values of the remaining weights are then rewound to their value at initialization , and the process is repeated iteratively until the desired sparsity level is achieved . This process , known as Lottery Ticket Rewinding ( LTR ) , is very compute-intensive and is prone to failures . For instance , Frankle et al . ( 2020 ) show better results by rewinding weights not all the way back to initialization , but to early stages of training instead . LTR is especially prone to failure for more difficult problems ( e.g. , training on ImageNet ) , where we must rewind weights to their state several epochs into training . A recent line of work proposes alternative practical solutions to identify these sub-networks before training begins , without the cost of retraining the network iteratively Lee et al . ( 2018 ) ; Wang et al . ( 2020 ) ; de Jorge et al . ( 2021 ) ; Tanaka et al . ( 2020 ) . This class of methods uses gradients to assess the importance of neural network weights . These gradients are often known as Synaptic Saliencies and are used to estimate the effect of pruning a single parameter in isolation on various objectives , typically the loss function . This objective is not so different from classical pruning-at-convergence methods , but the gradients for a well-trained model are small ; therefore these methods must inspect higher-order metrics such as the Hessian to estimate the pruning effect ( LeCun et al. , 1990 ; Hassibi & Stork , 1993 ) . Pruning at initialization is desirable because the benefits of pruning ( in terms of memory and speed ) can be reaped during training , rather than only at inference/deployment time . However , the performance of prune-at-init methods remains poor : the degradation in accuracy is still significant compared to training the full model and LTR , making these methods impractical for many real-world problems ( Frankle et al. , 2021 ) . In this paper , we identify a fundamental limitation in the objective formulation of current methods , namely that saliency criteria do not take into account the fact that the model is going to be trained after the pruning step . If our aim was to simply prune a subset of weights without affecting the loss , then these saliency criteria are estimating the correct objective . However , this estimate does not take into account that we are going to train the weights after we prune them . We need a metric that captures the trainability of the weights during the optimization steps , rather than a single myopic estimate . Many methods attempt to overcome this by pruning gradually and/or adding training steps between iterative pruning steps ( Zhu & Gupta , 2018 ; You et al. , 2020 ; de Jorge et al. , 2021 ) . Although this approach has been shown to be effective , it is expensive and cumbersome in practice and ultimately is an indirect approximation to the trainability criteria we are looking to incorporate into our objective . In this paper , we propose Prospect Pruning ( ProsPr ) , a new pruning-at-init method that learns from the first few steps of optimization which parameters to prune . We explicitly formulate our saliency criteria to account for the fact that the network will be trained after pruning . More precisely , ProsPr uses meta-gradients by backpropagating through the first few model updates in order to estimate the effect the initial pruning parameters have on the loss after a few gradient descent steps . Effectively this enables us to account for both higher-order effects of pruning weights on the loss , as well as the trainability of individual weights . Similar to other methods we apply pruning to initialization values of weights and train our models from scratch . In summary , our contributions are : • We identify a key limitation in prior saliency criteria for pruning neural networks—namely that they do not explicitly incorporate trainability-after-pruning into their criteria . • We propose a new pruning-at-init method , ProsPr , that uses meta-gradients over the first few training steps to bridge the gap between pruning and training . • We show empirically that ProsPr achieves higher accuracy compared to existing pruningat-init methods1 . Unlike other methods , our approach is single shot in the sense that the pruning is applied to the network initial weights in a single step . 2 BACKGROUND . In this section we review the key concepts that our method builds upon . We delay comparisons to other pruning techniques in the literature to Section 5 . Classic post-training pruning methods aim to identify and remove network weights with the least impact on the loss ( LeCun et al. , 1990 ; Hassibi & Stork , 1993 ) . They typically use the Taylor expansion of the loss with respect to parameters to define a saliency score for each parameter : δL ≈ ∇θL > δθ + 12δθ > H δθ , where H = ∇2θL is the Hessian matrix . When the network has converged , the first-order term in the expansion is negligible , and hence these methods resort to using H. Lee et al . ( 2018 ) introduce SNIP , and show that the same objective of minimizing the change in loss can be used at initialization to obtain a trainable pruned network . At initialization , the first-order gradients ∇θ in the local quadratic approximation are still significant , so higher-order terms can be ignored . Hence the computation of the parameter saliencies can be done using backpropagation . The Taylor expansion approximates the effect of small additive perturbations to the loss . To better approximate the effect of removing a weight , Lee et al . ( 2018 ) attach a multiplicative all-one mask to the computation graph of each weight . This does not change the forward-pass of the network , but it enables us to form the Taylor expansion around the mask values , rather than the weights , to estimate the effect of changing the mask values from 1 to 0 . More specifically , SNIP computes the saliency scores according to : sj = |gj ( w , D ) |∑m k=1 |gk ( w , D ) | , ( 1 ) with gj ( w , D ) = ∂L ( c w , D ) ∂cj , ( 2 ) 1Our code and models are publicly available at https : //anonymous-during-review where m is the number of weights in the network , c ∈ { 0 , 1 } m is the pruning mask ( initialised to 1 above ) , D is the training dataset , w are the neural network weights , L is the loss function , and is the Hadamard product . These saliency scores are computed before training the network , using one ( or more ) mini-batches from the training set . The global Top-K weights with the highest saliency scores are retained ( cj = 1 ) , and all other weights are pruned ( cj = 0 ) , before the network is trained . Our method , to be introduced in Section 3 , also relies on computing the saliency scores for each mask element , but uses a more sophisticated loss function to incorporate the notion of trainability . 3 OUR METHOD : PROSPR . In this section we introduce our method , Prospect Pruning ( ProsPr ) . We note that for the problem of pruning at initialization , the pruning step is immediately followed by training . Therefore , pruning should take into account the trainability of a weight , instead of only its immediate impact on the loss before training . In other words , we want to be able to identify weights that are not only important at initialization , but which may be useful for reducing the loss during training . To this end , we propose to estimate the effect of pruning on the loss over several steps of gradient descent at the beginning of training , rather than the changes in loss at initialization . More specifically , ProsPr models how training would happen by performing multiple ( M ) iterations of backpropagation and weight updates—like during normal training . We can then backpropagate through the entire computation graph , from the loss several steps into training , back to the original mask , since the gradient descent procedure is itself differentiable . Once the pruning mask is computed , we rewind the weights back to their values at initialization and train the pruned network . The gradient-of-gradients is called a meta-gradient . This algorithm is illustrated visually in Figure 1 . The higher-order information in the meta-gradient includes interactions between the weights during training . When pruning at initialization , our ultimate goal is to pick a pruned model , A , which is more trainable than an alternative pruned model B . That means we want the loss L ( ŷA , y ) to be lower than L ( ŷB , y ) at convergence ( for a fixed pruning ratio ) . Finding the optimal pruning mask is generally infeasible since the training horizon is long ( i.e. , evaluation is costly ) and the space of possible pruning masks is large . Unlike other methods that must compute the saliency scores iteratively , we can use the meta-gradients to compute the pruning mask in one shot . This picks a line in loss-space , which more closely predicts the eventual actual loss . This is because it smooths out over more steps , and takes into account interactions between weights in the training dynamics . Crucially , in the limit of large M , the match to the ultimate objective is exact . 3.1 SALIENCY SCORES VIA META-GRADIENTS . We now introduce ProsPr formally . After initialising the network weights randomly to obtain winit , we apply a weight mask to the initial weights , w0 = c winit . ( 3 ) This weight mask contains only ones , c = 1 , as in SNIP ( Lee et al. , 2018 ) , and represents the connectivity of the corresponding weights . We then sample M+1 batches of data Di ∼ Dtrain ( i ∈ { 0 , . . . , M } ; M ≥ 1 ) for the pruning step , and perform M weight updates2 , w1 = w0 − α∇w0L ( w0 , D0 ) ( 4 ) ... wM = wM−1 − α∇wM−1L ( wM−1 , DM−1 ) . ( 5 ) Then , we compute a meta-gradient that backpropagates through these updates . Specifically , we compute the gradient of the final loss w.r.t . the initial mask , ∇c L ( wM , DM ) . ( 6 ) Using the chain rule , we can write out the form of the meta-gradient beginning from the last step : ∇cL ( wM , D ) = ∇wML ( wM , D ) ( ∇cwM ) , ( 7 ) repeating for each step until we reach the zero ’ th step whose gradient is trivial , = ∇wML ( wM , D ) ( ∇wM−1wM ) . . . ( ∇w0w1 ) ( ∇cw0 ) ( 8 ) = ∇wML ( wM , D ) ( ∇wM−1wM ) . . . ( ∇w0w1 ) ( ∇c ( c winit ) ) ( 9 ) = ∇wML ( wM , D ) [ M∏ m=1 ( ∇wm−1wm ) ] winit . ( 10 ) In practice , we can compute the meta-gradients by relying on automatic differentiation software such as PyTorch ( Paszke et al. , 2019 ) . However , care must be taken to ensure that weights at each step are kept in memory so that the entire computation graph , including gradients , is visible to the automatic differentiation software . The saliency scores are now given by sj = |gj ( w , D ) |∑m k=1 |gk ( w , D ) | , ( 11 ) with gj ( w , D ) = ∂L ( wM , D ) ∂cj , ( 12 ) where wM is a function of c. Equation ( 12 ) stands in contrast to SNIP , where the saliency is computed using the loss at c ·winit rather than wM . The saliency scores are then used to prune the initial weights winit : the ones with the highest saliency scores are retained ( cj = 1 ) , and all other weights are pruned ( cj = 0 ) . Finally , the network is trained with the pruned weights ŵinit . Algorithm 1 summarises the proposed method , ProsPr . | This work focuses on weight pruning at initialization. In this paper, the authors point out an important problem that the pruned subnetwork at initialization is going to be trained and previous prune-at-init methods ignore this fact. As a result, these prune-at-init methods ignore the trainability of weights. This paper proposes to use meta-gradients through the first few steps of optimization to determine which weights to prune. Experimental results show that ProsPr (this paper) achieves state-of-the-art pruning performance. | SP:b61b07e85d8e940816c1a769cb4c695112f5c7ad |
Dissecting Local Properties of Adversarial Examples | 1 INTRODUCTION . Despite deep neural networks ( DNNs ) perform well in many fields ( He et al. , 2016 ; Devlin et al. , 2019 ) , their counter-intuitive vulnerability attracts increasing attention , both for safety-critical applications ( Sharif et al. , 2016 ) and the black-box mechanism of DNNs ( Fazlyab et al. , 2019 ) . DNNs have been found vulnerable to adversarial examples ( Szegedy et al. , 2014 ; Goodfellow et al. , 2015 ) , where small perturbations on the input can easily change the predictions of a well-trained DNN with high confidence . In computer vision , adversarial examples exhibit their destructiveness both in the digital world and the physical world ( Kurakin et al. , 2017 ) . Since then , how to alleviate the vulnerability of DNN so as to narrow the performance gap between adversarial/natural examples is another key issue . Existing methods including defensive distillation ( Papernot et al. , 2016 ) and pixel denoising ( Liao et al. , 2018 ) have shown their limitations due to follow-up attack strategies ( Carlini & Wagner , 2017 ) or gradient masking ( Athalye et al. , 2018 ) . Amongst them , adversarial training ( Goodfellow et al. , 2015 ; Madry et al. , 2018 ) and its variants ( Zhang et al. , 2019 ; Wang et al. , 2020b ) indicate their reliable robustness and outperform . Moreover , as a data augmentation method , adversarial training currently seems to rely on additional data ( Schmidt et al. , 2018 ; Rebuffi et al. , 2021 ) to further improve robustness , while is sensitive to some basic model hyper-parameters , e.g. , weight decay ( Pang et al. , 2021 ) . Apart from these , the effect of simply early stopping ( Rice et al. , 2020 ) even exceeds some promotion methods according to recent benchmarks ( Croce & Hein , 2020 ; Chen & Gu , 2020 ) . These studies arise our curiosity to further explore the relationship between adversarial examples and adversarial training , hoping to provide some new understanding . Recalling that high-frequency components can be potentially linked to adversarial examples ( Wang et al. , 2020a ; Yin et al. , 2019 ; Harder et al. , 2021 ) , however , few explorations discuss the relationship between high-frequency components and the destructiveness of adversarial examples . In this paper , we first demonstrate that high-frequency components of adversarial examples tend to mislead the standard DNNs , yet little impact on the adversarially robust models . We further show that adversarial examples statistically have more high-frequency components than natural ones , indicating relatively drastic local changes among pixels of adversarial examples . Since adversarial examples exhibit more semantically meaningful on robust models ( Tsipras et al. , 2019 ) , we further notice that adversarial examples show locally-consistent perturbations related to image shapes on adversariallytrained models , in contrast to disorderly perturbations on standard models . Both explorations on the frequency and spatial domain emphasize local properties of adversarial examples , and motivated by the local receptive field of the convolution kernels , we propose a locally intermediate response perspective to rethink the vulnerability of DNNs . Different from the existing global activation perspective ( Bai et al. , 2021 ; Xu et al. , 2019 ) , our local perspective reflects the joint effect of local features and the intermediate layers of the model . Based on the local perspective , we emphasize that large enough local response differences make it difficult for the network to treat an image and its potentially adversarial examples as one category , and demonstrate DNN models are naturally fragile at least attributed to it . Motivated by adversarially-trained models tend to have ‘ smooth ’ kernels ( Wang et al. , 2020a ) , we simply use the smoother kernels to alleviate local response differences on adversarially-trained models , which in turn affects the model robustness and reduces the robust overfitting ( Rice et al. , 2020 ) . To a certain extent , this explains why weight decay effectively affects model robustness ( Pang et al. , 2021 ) . Our main contributions are summarized as follows : • We first reveal some properties of adversarial examples in the frequency and spatial domain : 1 ) the high-frequency components of adversarial examples tend to mislead naturally-trained DNNs , yet have little impact on adversarially-trained models , and 2 ) adversarial examples have locally-consistent perturbations on adversarially-trained models , compared with disorderly local perturbations on naturally-trained models . • Then we introduce local response and emphasize its importance in the model adversarial robustness . That is , naturally-trained DNNs are often fragile , at least for non-ignorable local response differences through the same layer between potentially adversarial examples and natural ones . In contrast , adversarially-trained models effectively alleviate the local response differences . And the smoother adversarially-trained models show better adversarial robustness as they can reduce local response differences . • Finally we empirically study local response with generated adversarial examples . We further show that , compared with failed attacks , adversarial examples ( successful attacks ) statistically show larger local response differences with natural examples . Moreover , compared with adversarial examples generated by the model itself , those transferred by other models show markedly smaller local response differences . 2 RELATED WORK . Understandings of model vulnerability . Since the discovery of adversarial examples ( Szegedy et al. , 2014 ) , a number of understandings on model vulnerability has been developed . For instance , linear property of DNNs ( Goodfellow et al. , 2015 ) , submanifold ( Tanay & Griffin , 2016 ) and geometry of the manifold ( Gilmer et al. , 2018 ) were considered from the high-dimensional perspective ; the computing of Lipschitz constant ( Szegedy et al. , 2014 ; Fazlyab et al. , 2019 ) and lower/upper bounds ( Fawzi et al. , 2018 ; Weng et al. , 2018 ) were considered from the definition of model robustness ; non-robust features ( Ilyas et al. , 2019 ) , high-frequency components ( Wang et al. , 2020a ; Yin et al. , 2019 ) , high-rank features ( Jere et al. , 2020 ) and high-order interactions among pixels ( Ren et al. , 2021 ) were explored adversarial examples from the different perspectives on images , which imply our local perspective ; feature denosing ( Xie et al. , 2019 ) , robust pruning ( Madaan & Ju Hwang. , 2020 ) and activation suppressing ( Bai et al. , 2021 ) were focused on global intermediate activations of models . On the other hand , taken adversarial training into consideration , Tsipras et al . ( 2019 ) , Schmidt et al . ( 2018 ) and Zhang et al . ( 2019 ) explored the trade-off between robustness and accuracy ; Wang et al . ( 2020a ) found adversarially-trained models tend to show smooth kernels ; Tsipras et al . ( 2019 ) and Zhang & Zhu ( 2018 ) argued adversarially robust models learned more shape-biased representations . Different from these studies , we characterize the adversarial examples from both frequency and spatial domain to emphasize local properties of adversarial examples , and propose a locally intermediate response to rethink the vulnerability of DNNs . Adversarial training . Adversarial training can be seen as a min-max optimization problem : min θ 1 n n∑ i=1 max x′i∈B ( x ) L ( fθ ( x ′ i ) , yi ) where f denotes a DNN model with parameters θ , and ( xi , yi ) denotes a pair of a natural example xi and its ground-truth label yi . Given a classification loss L , the inner maximization problem can be regarded as searching for suitable perturbations in boundary B to maximize loss , while the outer minimization problem is to optimize model parameters on adversarial examples { x′i } ni=1 generated from the inner maximization . 3 DIFFERENT PERTURBATIONS AFFECT THE VULNERABILITY OF THE MODEL . In this section , we first investigate adversarial examples in the frequency and spatial domain , and show the connections between models and their adversarial examples . Note that our threat model is a white-box model , and the fact that the adversarial example is only defined by the misleading result under the legal threat model , our findings suggest that the properties of the sampled examples can broadly reflect the fragile tendency of the model . Setup . We generate ` ∞ bounded adversarial examples by PGD-10 ( maximum perturbation = 8/255 and step size 2/255 ) with random start for the robust model ( Madry et al. , 2018 ) . Specifically , we use ResNet-18 ( He et al. , 2016 ) as the backbone to train the standard and adversarially-trained models for 100 epochs on CIFAR-10 ( Krizhevsky , 2009 ) . Following ( Pang et al. , 2021 ) , we use the SGD optimizer with momentum 0.9 , weight decay 5 × 10−4 and initial learning rate 0.1 , with a three-stage learning rate divided by 10 at 50 and 75 epoch respectively . The robustness of both models is evaluated by PGD-20 ( step size 1/255 ) . 3.1 THE DESTRUCTIVENESS OF HIGH-FREQUENCY COMPONENTS FROM ADVERSARIES . Inspired by ( Wang et al. , 2020a ) , we are naturally curious whether the adversarial examples cause considerable damage to the model mainly because of their high-frequency components . To answer this question , Figure 1 illustrates the trend of model performance and robustness on the test set with the high-frequency components increased ( the increase of the filtering scale denotes that more highfrequency components are added to the filtered images ) . Figure 1 ( a ) shows that , for standard models , the high-frequency components of natural examples promote classification and reach the model performance ( green line ) ; on the contrary , the performance of the filtered adversarial examples first rises to get the highest accuracy 47.5 % , and then drops rapidly to reach 0.0 % ( red line ) . Obviously , in the low-frequency range , the performance of natural and adversarial examples are quite close , yet more high-frequency components widen the difference . That is , the special high-frequency components caused by adversarial perturbations exhibit a clear destructive effect on standard models , and simply filter out them can effectively alleviate the destructiveness of adversaries even on standard models . However , for robust models , we show that the prediction performance finally reaches robustness without a rapid drop in Figure 1 ( b ) . But surprisingly , we find that the performance of filtered adversarial examples in some range exceeds the final robustness 47.5 % ( red line ) , reaching a maximum of 51.2 % . That is , although these high-frequency components do not exhibit a clear destructive effect , simply filtering out them has a positive impact on alleviating robust overfitting ( Rice et al. , 2020 ) . We then swap their high-frequency components between both examples controlled by a frequency threshold in Figure 1 ( c ) -1 ( d ) . For merged natural examples with high-frequency components from adversaries , the increase of the frequency threshold controls the accuracy increasing from the model robustness ( red line ) to the model performance ( green line ) , the opposite occurs on merged adversarial examples . These clearly illustrate the boost effect of the high-frequency components from natural examples and the destructive effect of the high-frequency components from adversarial examples . To further illustrate , we find that statistically , the main difference in the frequency domain between natural and adversarial examples is concentrated in the high-frequency region in Figure 2 . We visualize the logarithmic amplitude spectrum of both examples . Figure 2 ( a ) and 2 ( b ) show that , compare with natural examples ’ , the high-frequency components of the adversaries are hard to ignore . Figure 2 ( c ) further emphasizes that adversarial examples markedly show more high-frequency components , indicating relatively drastic local changes among pixels . This statistical difference explains the high detection rate of using Magnitude Fourier Spectrum ( Harder et al. , 2021 ) to detect adversarial examples . Furthermore , Figure 2 ( d ) and 2 ( e ) show that the high-frequency components of adversarial examples generated by robust models are less than those from standard models , yet still more than natural examples ’ . Besides , the analysis of filtering out low-frequency components in Figure 6 ( Appendix A ) also emphasizes our statement . That is , compared with natural examples ’ , the special high-frequency components of adversarial examples show their serious misleading effects on standard models , yet are not enough to be fully responsible for the destructiveness to robust models . | This paper studies the properties of adversarial examples from a spatial and frequency perspective and shows that naturally trained models are more vulnerable to high-frequency components in adversarial examples. Perturbations for naturally trained models are disordered, but perturbations for adv-trained models are image shape related. Based on these observations, the authors find that smoother adversarially-trained can achieve better robustness. | SP:d9b458c1ddd8165e4cef7861b7995d80fcf3c434 |
Dissecting Local Properties of Adversarial Examples | 1 INTRODUCTION . Despite deep neural networks ( DNNs ) perform well in many fields ( He et al. , 2016 ; Devlin et al. , 2019 ) , their counter-intuitive vulnerability attracts increasing attention , both for safety-critical applications ( Sharif et al. , 2016 ) and the black-box mechanism of DNNs ( Fazlyab et al. , 2019 ) . DNNs have been found vulnerable to adversarial examples ( Szegedy et al. , 2014 ; Goodfellow et al. , 2015 ) , where small perturbations on the input can easily change the predictions of a well-trained DNN with high confidence . In computer vision , adversarial examples exhibit their destructiveness both in the digital world and the physical world ( Kurakin et al. , 2017 ) . Since then , how to alleviate the vulnerability of DNN so as to narrow the performance gap between adversarial/natural examples is another key issue . Existing methods including defensive distillation ( Papernot et al. , 2016 ) and pixel denoising ( Liao et al. , 2018 ) have shown their limitations due to follow-up attack strategies ( Carlini & Wagner , 2017 ) or gradient masking ( Athalye et al. , 2018 ) . Amongst them , adversarial training ( Goodfellow et al. , 2015 ; Madry et al. , 2018 ) and its variants ( Zhang et al. , 2019 ; Wang et al. , 2020b ) indicate their reliable robustness and outperform . Moreover , as a data augmentation method , adversarial training currently seems to rely on additional data ( Schmidt et al. , 2018 ; Rebuffi et al. , 2021 ) to further improve robustness , while is sensitive to some basic model hyper-parameters , e.g. , weight decay ( Pang et al. , 2021 ) . Apart from these , the effect of simply early stopping ( Rice et al. , 2020 ) even exceeds some promotion methods according to recent benchmarks ( Croce & Hein , 2020 ; Chen & Gu , 2020 ) . These studies arise our curiosity to further explore the relationship between adversarial examples and adversarial training , hoping to provide some new understanding . Recalling that high-frequency components can be potentially linked to adversarial examples ( Wang et al. , 2020a ; Yin et al. , 2019 ; Harder et al. , 2021 ) , however , few explorations discuss the relationship between high-frequency components and the destructiveness of adversarial examples . In this paper , we first demonstrate that high-frequency components of adversarial examples tend to mislead the standard DNNs , yet little impact on the adversarially robust models . We further show that adversarial examples statistically have more high-frequency components than natural ones , indicating relatively drastic local changes among pixels of adversarial examples . Since adversarial examples exhibit more semantically meaningful on robust models ( Tsipras et al. , 2019 ) , we further notice that adversarial examples show locally-consistent perturbations related to image shapes on adversariallytrained models , in contrast to disorderly perturbations on standard models . Both explorations on the frequency and spatial domain emphasize local properties of adversarial examples , and motivated by the local receptive field of the convolution kernels , we propose a locally intermediate response perspective to rethink the vulnerability of DNNs . Different from the existing global activation perspective ( Bai et al. , 2021 ; Xu et al. , 2019 ) , our local perspective reflects the joint effect of local features and the intermediate layers of the model . Based on the local perspective , we emphasize that large enough local response differences make it difficult for the network to treat an image and its potentially adversarial examples as one category , and demonstrate DNN models are naturally fragile at least attributed to it . Motivated by adversarially-trained models tend to have ‘ smooth ’ kernels ( Wang et al. , 2020a ) , we simply use the smoother kernels to alleviate local response differences on adversarially-trained models , which in turn affects the model robustness and reduces the robust overfitting ( Rice et al. , 2020 ) . To a certain extent , this explains why weight decay effectively affects model robustness ( Pang et al. , 2021 ) . Our main contributions are summarized as follows : • We first reveal some properties of adversarial examples in the frequency and spatial domain : 1 ) the high-frequency components of adversarial examples tend to mislead naturally-trained DNNs , yet have little impact on adversarially-trained models , and 2 ) adversarial examples have locally-consistent perturbations on adversarially-trained models , compared with disorderly local perturbations on naturally-trained models . • Then we introduce local response and emphasize its importance in the model adversarial robustness . That is , naturally-trained DNNs are often fragile , at least for non-ignorable local response differences through the same layer between potentially adversarial examples and natural ones . In contrast , adversarially-trained models effectively alleviate the local response differences . And the smoother adversarially-trained models show better adversarial robustness as they can reduce local response differences . • Finally we empirically study local response with generated adversarial examples . We further show that , compared with failed attacks , adversarial examples ( successful attacks ) statistically show larger local response differences with natural examples . Moreover , compared with adversarial examples generated by the model itself , those transferred by other models show markedly smaller local response differences . 2 RELATED WORK . Understandings of model vulnerability . Since the discovery of adversarial examples ( Szegedy et al. , 2014 ) , a number of understandings on model vulnerability has been developed . For instance , linear property of DNNs ( Goodfellow et al. , 2015 ) , submanifold ( Tanay & Griffin , 2016 ) and geometry of the manifold ( Gilmer et al. , 2018 ) were considered from the high-dimensional perspective ; the computing of Lipschitz constant ( Szegedy et al. , 2014 ; Fazlyab et al. , 2019 ) and lower/upper bounds ( Fawzi et al. , 2018 ; Weng et al. , 2018 ) were considered from the definition of model robustness ; non-robust features ( Ilyas et al. , 2019 ) , high-frequency components ( Wang et al. , 2020a ; Yin et al. , 2019 ) , high-rank features ( Jere et al. , 2020 ) and high-order interactions among pixels ( Ren et al. , 2021 ) were explored adversarial examples from the different perspectives on images , which imply our local perspective ; feature denosing ( Xie et al. , 2019 ) , robust pruning ( Madaan & Ju Hwang. , 2020 ) and activation suppressing ( Bai et al. , 2021 ) were focused on global intermediate activations of models . On the other hand , taken adversarial training into consideration , Tsipras et al . ( 2019 ) , Schmidt et al . ( 2018 ) and Zhang et al . ( 2019 ) explored the trade-off between robustness and accuracy ; Wang et al . ( 2020a ) found adversarially-trained models tend to show smooth kernels ; Tsipras et al . ( 2019 ) and Zhang & Zhu ( 2018 ) argued adversarially robust models learned more shape-biased representations . Different from these studies , we characterize the adversarial examples from both frequency and spatial domain to emphasize local properties of adversarial examples , and propose a locally intermediate response to rethink the vulnerability of DNNs . Adversarial training . Adversarial training can be seen as a min-max optimization problem : min θ 1 n n∑ i=1 max x′i∈B ( x ) L ( fθ ( x ′ i ) , yi ) where f denotes a DNN model with parameters θ , and ( xi , yi ) denotes a pair of a natural example xi and its ground-truth label yi . Given a classification loss L , the inner maximization problem can be regarded as searching for suitable perturbations in boundary B to maximize loss , while the outer minimization problem is to optimize model parameters on adversarial examples { x′i } ni=1 generated from the inner maximization . 3 DIFFERENT PERTURBATIONS AFFECT THE VULNERABILITY OF THE MODEL . In this section , we first investigate adversarial examples in the frequency and spatial domain , and show the connections between models and their adversarial examples . Note that our threat model is a white-box model , and the fact that the adversarial example is only defined by the misleading result under the legal threat model , our findings suggest that the properties of the sampled examples can broadly reflect the fragile tendency of the model . Setup . We generate ` ∞ bounded adversarial examples by PGD-10 ( maximum perturbation = 8/255 and step size 2/255 ) with random start for the robust model ( Madry et al. , 2018 ) . Specifically , we use ResNet-18 ( He et al. , 2016 ) as the backbone to train the standard and adversarially-trained models for 100 epochs on CIFAR-10 ( Krizhevsky , 2009 ) . Following ( Pang et al. , 2021 ) , we use the SGD optimizer with momentum 0.9 , weight decay 5 × 10−4 and initial learning rate 0.1 , with a three-stage learning rate divided by 10 at 50 and 75 epoch respectively . The robustness of both models is evaluated by PGD-20 ( step size 1/255 ) . 3.1 THE DESTRUCTIVENESS OF HIGH-FREQUENCY COMPONENTS FROM ADVERSARIES . Inspired by ( Wang et al. , 2020a ) , we are naturally curious whether the adversarial examples cause considerable damage to the model mainly because of their high-frequency components . To answer this question , Figure 1 illustrates the trend of model performance and robustness on the test set with the high-frequency components increased ( the increase of the filtering scale denotes that more highfrequency components are added to the filtered images ) . Figure 1 ( a ) shows that , for standard models , the high-frequency components of natural examples promote classification and reach the model performance ( green line ) ; on the contrary , the performance of the filtered adversarial examples first rises to get the highest accuracy 47.5 % , and then drops rapidly to reach 0.0 % ( red line ) . Obviously , in the low-frequency range , the performance of natural and adversarial examples are quite close , yet more high-frequency components widen the difference . That is , the special high-frequency components caused by adversarial perturbations exhibit a clear destructive effect on standard models , and simply filter out them can effectively alleviate the destructiveness of adversaries even on standard models . However , for robust models , we show that the prediction performance finally reaches robustness without a rapid drop in Figure 1 ( b ) . But surprisingly , we find that the performance of filtered adversarial examples in some range exceeds the final robustness 47.5 % ( red line ) , reaching a maximum of 51.2 % . That is , although these high-frequency components do not exhibit a clear destructive effect , simply filtering out them has a positive impact on alleviating robust overfitting ( Rice et al. , 2020 ) . We then swap their high-frequency components between both examples controlled by a frequency threshold in Figure 1 ( c ) -1 ( d ) . For merged natural examples with high-frequency components from adversaries , the increase of the frequency threshold controls the accuracy increasing from the model robustness ( red line ) to the model performance ( green line ) , the opposite occurs on merged adversarial examples . These clearly illustrate the boost effect of the high-frequency components from natural examples and the destructive effect of the high-frequency components from adversarial examples . To further illustrate , we find that statistically , the main difference in the frequency domain between natural and adversarial examples is concentrated in the high-frequency region in Figure 2 . We visualize the logarithmic amplitude spectrum of both examples . Figure 2 ( a ) and 2 ( b ) show that , compare with natural examples ’ , the high-frequency components of the adversaries are hard to ignore . Figure 2 ( c ) further emphasizes that adversarial examples markedly show more high-frequency components , indicating relatively drastic local changes among pixels . This statistical difference explains the high detection rate of using Magnitude Fourier Spectrum ( Harder et al. , 2021 ) to detect adversarial examples . Furthermore , Figure 2 ( d ) and 2 ( e ) show that the high-frequency components of adversarial examples generated by robust models are less than those from standard models , yet still more than natural examples ’ . Besides , the analysis of filtering out low-frequency components in Figure 6 ( Appendix A ) also emphasizes our statement . That is , compared with natural examples ’ , the special high-frequency components of adversarial examples show their serious misleading effects on standard models , yet are not enough to be fully responsible for the destructiveness to robust models . | This paper provides a set of empirical studies of the spectral and spatial properties of adversarial examples of deep neural nets (DNNs) classifiers. The studies illustrate that standard DNNs are much more sensitive to high frequency components of adversarial examples compared to adversarially-trained DNNs, and also that the adversarial examples corresponding to the latter exhibit more local consistency in the spatial domain. The paper then connects the effectiveness of an adversarial example to the concept of inducing larger differences in the local response of DNN layers compared to the corresponding natural example, denoted local response differences, and justifies this connection by empirically showing that: adversarially-trained DNNs have smaller local response differences on adversarial examples compared to standard DNNs; the smoother the DNN the better its robustness; successful attacks (adversarial examples) induce larger local response differences; and finally that adversarial examples transferred from other models, hence weaker examples, also induce smaller local response differences. | SP:d9b458c1ddd8165e4cef7861b7995d80fcf3c434 |
Curriculum learning as a tool to uncover learning principles in the brain | We present a novel approach to use curricula to identify principles by which a system learns . Previous work in curriculum learning has focused on how curricula can be designed to improve learning of a model on particular tasks . We consider the inverse problem : what can a curriculum tell us about how a learning system acquired a task ? Using recurrent neural networks ( RNNs ) and models of common experimental neuroscience tasks , we demonstrate that curricula can be used to differentiate learning principles using target-based and a representation-based loss functions as use cases . In particular , we compare the performance of RNNs using a target-based learning principle versus those using a representational learning principle on three different curricula in the context of two tasks . We show that the learned state-space trajectories of RNNs trained by these two learning principles under all curricula tested are indistinguishable . However , by comparing learning times during different curricula , we can disambiguate the learning principles and challenge traditional approaches of interrogating learning systems . Although all animals in neuroscience lab settings are trained by curriculum-based procedures called shaping , almost no behavioral or neural data are collected or published on the relative successes or training times under different curricula . Our results motivate the systematic collection and curation of data during shaping by demonstrating curriculum learning in RNNs as a tool to probe and differentiate learning principles used by biological systems , over statistical analyses of learned state spaces . 1 INTRODUCTION . The biological brain is thought to be the ultimate learner as it learns from few examples , solves unstructured problems , and has an impressive task repertoire . Understanding how it achieves these learning feats could lead us to better artificial intelligence ( AI ) algorithms ( Hassabis et al. , 2017 ; Macpherson et al. , 2021 ) . Interrogating learning in the brain , however , poses significant challenges both experimentally and computationally . Experimentally , measuring the entire synaptic connectivity map or connectome–a primary substrate of learning–is only just approaching reality for small brains ( Zador et al. , 2012 ; Dorkenwald et al. , 2020 ) . Even so , the emerging connectome data provides just a snapshot in time whereas learning concerns connectome dynamics , and these temporal data are still far off . Computationally , it is unclear how a sequence of brain-wide connectivities would be registered in order to reveal how animals learn different tasks ( Babai , 2015 ) . Uncovering the key substrates linking structural ( connectome ) , dynamic ( neural activity ) , and behavioral elements in biological brains could help us develop better AI algorithms with brain-like learning properties . In this paper , we use behavioral dynamics to infer learning principles . Measuring behavior in animals is comparatively easier than neural recordings or synaptic strengths . The challenge , however , is for theory to attribute individual behaviors to specific learning principles . We suggest the use of curricula to get information from behavioral dynamics about underlying learning principles . A curriculum is a schedule for information to be presented to a student learner . In the machine learning ( ML ) framework we consider , the student learner is a neural network , specifically an RNN . Recurrence in network models brings some key advantages we exploit here–ability to produce dynamics and analogy to the biological brain ’ s ubiquitous feedback connections ( Yang et al. , 2019 ; Singer , 2021 ; Ehrlich et al. , 2021 ) . Although some benefits of curricula have been shown in ML ( Graves et al. , 2017 ; Weinshall et al. , 2018 ; Saglietti et al. , 2021 ) , curriculum learning has not been widely adopted for practical applications , with notable exceptions in robotics ( James et al. , 2019 ) and reinforcement learning ( Taylor & Stone , 2009 ) . In contrast , curriculum learning is very important to experimental neuroscience–animals in neuroscience lab settings are trained using curricula , a process called shaping ( Pinto et al. , 2018 ; Koay et al. , 2021 ; Guo et al. , 2014 ) . Yet , very little relevant neuroscience data on curricula exists , as data are most often collected from `` expert '' animals after shaping . Our goal is to classify learners–here , RNNs–based on the principles they use to learn different tasks using a set of pre-designed curricula . We build and analyze RNNs trained on two common experimental neuroscience tasks using three different curricula inspired by shaping procedures . In particular , we use the evidence accumulation task ( Pinto et al. , 2018 ; Stine et al. , 2020 ) and delayed decision task ( Romo et al. , 1999 ; Constantinidis et al. , 2018 ; Liu et al. , 2014 ) . We show , using only behavioral dynamics during the execution of different curricula , that it is possible to distinguish two learning principles solely on the basis of outcomes : target-based learning from learning through representational constraints . Importantly , we find that all RNNs , regardless of curriculum or learning rule , are indistinguishable post-shaping by standard statistical analyses applied to neural dynamics in their trained state . Our results emphasize the importance of studying animals during shaping and the value of curriculum learning in RNNs as a hypothesis test-bed for probing learning principles in the biological brain . 1.1 RELATED WORK . Curriculum learning has long been relevant to the fields of AI/ML and neuroscience ( Wang et al. , 2021 ) . Curricula have been used to learn difficult control problems in robotics and reinforcement learning ( Selfridge et al . ( 1985 ) , Schmidhuber ( 1991 ) , Sanger ( 1994 ) ) . Elman ( 1993 ) noted that humans and animals use curricula and asked how they could benefit machines ; and Bengio et al . ( 2009 ) has related curriculum learning to input complexity in a key paper on optimizing learning . Despite the presence of curricula in ML literature for several decades , our work is the first we are aware of that uses curricula to characterize learning principles used by neural network models to learn tasks , analogously to experimental animals in lab settings . Recently , the question of identifying learning rules was studied by Nayebi et al . ( 2020 ) , where the full knowledge of network activations available to artificial systems is used and related to neural data from experimental recordings . Here , we are interested in being able to glean learning principles solely from behavioral data . Ultimately , our two approaches may be used in tandem to further our understanding of learning principles . Ashwood et al . ( 2020 ) link behavioral data and learning rules using large-scale data from a mouse task in the International Brain Lab ( IBL ) . The IBL task and consequently , the Ashwood et al . ( 2020 ) model includes no time dependence , history , or state dependence . Furthermore , mice can learn the task easily without a curriculum . Our work is distinct in that we target complex tasks with temporal dependencies for which a ) curricula are appropriate , and b ) the analogous experiments require shaping procedures for the lab animal to learn . In this paper , we demonstrate that different learning principles and curricula converge to similar solutions in all cases ( Fig 5 ) . In Maheswaranathan et al . ( 2019 ) , the authors claim that there is a universal solution for a given task that all learning algorithms converge to . Their approach does not incorporate curricula ; our work posits a different , complementary invariance . Furtheremore , our goal is not to prove universality , but rather to identify learning principles that may be inaccessible by only studying the trained or post-shaping state . 2 MODELS AND METHODS . 2.1 RECURRENT NEURAL NETWORKS ( RNNS ) . We use neural networks with N = 350 recurrently connected , continuous , firing rate based , leaky integrating model neurons . A neuron with index n connects to a neuron with index m through the recurrent weight wrecnm and input channel index j through input weight w inp nj . The internal state of neuron n , xn , is determined by : τ dxn dt = wrecnmam ( t ) + w inp nj vj ( t ) − xn ( 1 ) where v ( t ) is a time-dependent , task-relevant input at time t and a ( t ) is the activation function applied to the internal state–here , the hyperbolic tangent function : an ( t ) = tanh ( xn ( t ) ) . τ is the time constant of the neuron , here , 10ms . We use the Euler method to calculate neural states with dt = 1ms . We define the linear readout of a network at time t , z ( t ) , as the weighted sum of the activations a ( t ) via weights woutn : z ( t ) = w out n an ( t ) Recurrent weights W rec are initialized i.i.d from a Gaussian with mean 0 and variance g 2 N . We set , g = 1 , the critical point above which random networks are chaotic ( Sompolinsky et al. , 1988 ) and backpropagation fails . Input- W inp and readout weights W out are each drawn from a uniform distribution from -1 to 1 . Internal states , X , are initialized from a Gaussian ( mean 0 , variance 1 ) . Figure 1 - Full Width 2.2 TASKS . Our tasks model commonly used neuroscience tasks for studying working memory and decision making in rodents , non-human primates , and humans ( Pinto et al. , 2018 ; Stine et al. , 2020 ; Romo et al. , 1999 ; Constantinidis et al. , 2018 ) . In the rodent setup , a mouse runs down a hall with cues on its left and right . The number of left or right cues inform the mouse which of two turns it should make when the corridor ends , and is rewarded if it turns toward the side with more cues . In our model tasks , we have a evidence period to mimic the hall in the mouse task and task parameters chosen to be proportional to mouse experiments in Pinto et al . ( 2018 ) . Two input channels , corresponding to left and right cues in the mouse task , send pulsatile input events into the RNN units , each with an amplitude of 0.25 and duration of 50ms . Cue start times for each channel are Poisson distributed with rates λ of 150ms−1 and 300ms−1 for the two channels throughout . On each simulated trial , λs for input channels are randomly swapped . The RNN also has a third input channel which produces a 0.25 amplitude `` go cue '' lasting 50ms in the decision period . The target function , ztar , for the linearly read out RNN-unit activations is 0 during the cue period . During the decision period , the target function is half a cosine wave starting an ending at zero with amplitude either 2 or -2 depending on which channel accumulated more cues ( Fig 1C ) . We use two task variants : The first is an evidence accumulation ( EA ) task ( Fig 1A ) to challenge primacy and recency biases . RNNs on this task , similar to lab animals , sometimes overweigh early or recent evidence at the cost of running counts and relative discrepancy of cues between the two channels . The second is a delayed decision ( DD ) task ( Fig 1B ) , with a delay period between the evidence and decision periods to challenge temporal credit assignment , which is often problematic for networks to span . Evidence Accumulation ( EA ) tasks have a 2.4s cue period followed by a 0.25s decision period . Delayed Decision ( DD ) tasks have a 0.5s cue period , a 0.5s delay period , and a 0.25s decision period . The target function during the delay is 0 with no cues during this time . | This paper simulates simple RNNs performing two classic decision-neuroscience experiments (a free choice evidence accumulation task and a delayed decision evidence accumulation task). The paper examines learning behaviour of these networks under three hand-crafted curricula, for each of two different RNN loss functions. The paper claims that one can diagnose the underlying learning rule (really the loss function) an RNN is using based upon the learning behaviour observed across the set of training curricula. They suggest a similar approach can be used to identify learning rules in animal neuroscience experiments. | SP:6a87b089a5efc03251112b2b8551df432c7efb42 |
Curriculum learning as a tool to uncover learning principles in the brain | We present a novel approach to use curricula to identify principles by which a system learns . Previous work in curriculum learning has focused on how curricula can be designed to improve learning of a model on particular tasks . We consider the inverse problem : what can a curriculum tell us about how a learning system acquired a task ? Using recurrent neural networks ( RNNs ) and models of common experimental neuroscience tasks , we demonstrate that curricula can be used to differentiate learning principles using target-based and a representation-based loss functions as use cases . In particular , we compare the performance of RNNs using a target-based learning principle versus those using a representational learning principle on three different curricula in the context of two tasks . We show that the learned state-space trajectories of RNNs trained by these two learning principles under all curricula tested are indistinguishable . However , by comparing learning times during different curricula , we can disambiguate the learning principles and challenge traditional approaches of interrogating learning systems . Although all animals in neuroscience lab settings are trained by curriculum-based procedures called shaping , almost no behavioral or neural data are collected or published on the relative successes or training times under different curricula . Our results motivate the systematic collection and curation of data during shaping by demonstrating curriculum learning in RNNs as a tool to probe and differentiate learning principles used by biological systems , over statistical analyses of learned state spaces . 1 INTRODUCTION . The biological brain is thought to be the ultimate learner as it learns from few examples , solves unstructured problems , and has an impressive task repertoire . Understanding how it achieves these learning feats could lead us to better artificial intelligence ( AI ) algorithms ( Hassabis et al. , 2017 ; Macpherson et al. , 2021 ) . Interrogating learning in the brain , however , poses significant challenges both experimentally and computationally . Experimentally , measuring the entire synaptic connectivity map or connectome–a primary substrate of learning–is only just approaching reality for small brains ( Zador et al. , 2012 ; Dorkenwald et al. , 2020 ) . Even so , the emerging connectome data provides just a snapshot in time whereas learning concerns connectome dynamics , and these temporal data are still far off . Computationally , it is unclear how a sequence of brain-wide connectivities would be registered in order to reveal how animals learn different tasks ( Babai , 2015 ) . Uncovering the key substrates linking structural ( connectome ) , dynamic ( neural activity ) , and behavioral elements in biological brains could help us develop better AI algorithms with brain-like learning properties . In this paper , we use behavioral dynamics to infer learning principles . Measuring behavior in animals is comparatively easier than neural recordings or synaptic strengths . The challenge , however , is for theory to attribute individual behaviors to specific learning principles . We suggest the use of curricula to get information from behavioral dynamics about underlying learning principles . A curriculum is a schedule for information to be presented to a student learner . In the machine learning ( ML ) framework we consider , the student learner is a neural network , specifically an RNN . Recurrence in network models brings some key advantages we exploit here–ability to produce dynamics and analogy to the biological brain ’ s ubiquitous feedback connections ( Yang et al. , 2019 ; Singer , 2021 ; Ehrlich et al. , 2021 ) . Although some benefits of curricula have been shown in ML ( Graves et al. , 2017 ; Weinshall et al. , 2018 ; Saglietti et al. , 2021 ) , curriculum learning has not been widely adopted for practical applications , with notable exceptions in robotics ( James et al. , 2019 ) and reinforcement learning ( Taylor & Stone , 2009 ) . In contrast , curriculum learning is very important to experimental neuroscience–animals in neuroscience lab settings are trained using curricula , a process called shaping ( Pinto et al. , 2018 ; Koay et al. , 2021 ; Guo et al. , 2014 ) . Yet , very little relevant neuroscience data on curricula exists , as data are most often collected from `` expert '' animals after shaping . Our goal is to classify learners–here , RNNs–based on the principles they use to learn different tasks using a set of pre-designed curricula . We build and analyze RNNs trained on two common experimental neuroscience tasks using three different curricula inspired by shaping procedures . In particular , we use the evidence accumulation task ( Pinto et al. , 2018 ; Stine et al. , 2020 ) and delayed decision task ( Romo et al. , 1999 ; Constantinidis et al. , 2018 ; Liu et al. , 2014 ) . We show , using only behavioral dynamics during the execution of different curricula , that it is possible to distinguish two learning principles solely on the basis of outcomes : target-based learning from learning through representational constraints . Importantly , we find that all RNNs , regardless of curriculum or learning rule , are indistinguishable post-shaping by standard statistical analyses applied to neural dynamics in their trained state . Our results emphasize the importance of studying animals during shaping and the value of curriculum learning in RNNs as a hypothesis test-bed for probing learning principles in the biological brain . 1.1 RELATED WORK . Curriculum learning has long been relevant to the fields of AI/ML and neuroscience ( Wang et al. , 2021 ) . Curricula have been used to learn difficult control problems in robotics and reinforcement learning ( Selfridge et al . ( 1985 ) , Schmidhuber ( 1991 ) , Sanger ( 1994 ) ) . Elman ( 1993 ) noted that humans and animals use curricula and asked how they could benefit machines ; and Bengio et al . ( 2009 ) has related curriculum learning to input complexity in a key paper on optimizing learning . Despite the presence of curricula in ML literature for several decades , our work is the first we are aware of that uses curricula to characterize learning principles used by neural network models to learn tasks , analogously to experimental animals in lab settings . Recently , the question of identifying learning rules was studied by Nayebi et al . ( 2020 ) , where the full knowledge of network activations available to artificial systems is used and related to neural data from experimental recordings . Here , we are interested in being able to glean learning principles solely from behavioral data . Ultimately , our two approaches may be used in tandem to further our understanding of learning principles . Ashwood et al . ( 2020 ) link behavioral data and learning rules using large-scale data from a mouse task in the International Brain Lab ( IBL ) . The IBL task and consequently , the Ashwood et al . ( 2020 ) model includes no time dependence , history , or state dependence . Furthermore , mice can learn the task easily without a curriculum . Our work is distinct in that we target complex tasks with temporal dependencies for which a ) curricula are appropriate , and b ) the analogous experiments require shaping procedures for the lab animal to learn . In this paper , we demonstrate that different learning principles and curricula converge to similar solutions in all cases ( Fig 5 ) . In Maheswaranathan et al . ( 2019 ) , the authors claim that there is a universal solution for a given task that all learning algorithms converge to . Their approach does not incorporate curricula ; our work posits a different , complementary invariance . Furtheremore , our goal is not to prove universality , but rather to identify learning principles that may be inaccessible by only studying the trained or post-shaping state . 2 MODELS AND METHODS . 2.1 RECURRENT NEURAL NETWORKS ( RNNS ) . We use neural networks with N = 350 recurrently connected , continuous , firing rate based , leaky integrating model neurons . A neuron with index n connects to a neuron with index m through the recurrent weight wrecnm and input channel index j through input weight w inp nj . The internal state of neuron n , xn , is determined by : τ dxn dt = wrecnmam ( t ) + w inp nj vj ( t ) − xn ( 1 ) where v ( t ) is a time-dependent , task-relevant input at time t and a ( t ) is the activation function applied to the internal state–here , the hyperbolic tangent function : an ( t ) = tanh ( xn ( t ) ) . τ is the time constant of the neuron , here , 10ms . We use the Euler method to calculate neural states with dt = 1ms . We define the linear readout of a network at time t , z ( t ) , as the weighted sum of the activations a ( t ) via weights woutn : z ( t ) = w out n an ( t ) Recurrent weights W rec are initialized i.i.d from a Gaussian with mean 0 and variance g 2 N . We set , g = 1 , the critical point above which random networks are chaotic ( Sompolinsky et al. , 1988 ) and backpropagation fails . Input- W inp and readout weights W out are each drawn from a uniform distribution from -1 to 1 . Internal states , X , are initialized from a Gaussian ( mean 0 , variance 1 ) . Figure 1 - Full Width 2.2 TASKS . Our tasks model commonly used neuroscience tasks for studying working memory and decision making in rodents , non-human primates , and humans ( Pinto et al. , 2018 ; Stine et al. , 2020 ; Romo et al. , 1999 ; Constantinidis et al. , 2018 ) . In the rodent setup , a mouse runs down a hall with cues on its left and right . The number of left or right cues inform the mouse which of two turns it should make when the corridor ends , and is rewarded if it turns toward the side with more cues . In our model tasks , we have a evidence period to mimic the hall in the mouse task and task parameters chosen to be proportional to mouse experiments in Pinto et al . ( 2018 ) . Two input channels , corresponding to left and right cues in the mouse task , send pulsatile input events into the RNN units , each with an amplitude of 0.25 and duration of 50ms . Cue start times for each channel are Poisson distributed with rates λ of 150ms−1 and 300ms−1 for the two channels throughout . On each simulated trial , λs for input channels are randomly swapped . The RNN also has a third input channel which produces a 0.25 amplitude `` go cue '' lasting 50ms in the decision period . The target function , ztar , for the linearly read out RNN-unit activations is 0 during the cue period . During the decision period , the target function is half a cosine wave starting an ending at zero with amplitude either 2 or -2 depending on which channel accumulated more cues ( Fig 1C ) . We use two task variants : The first is an evidence accumulation ( EA ) task ( Fig 1A ) to challenge primacy and recency biases . RNNs on this task , similar to lab animals , sometimes overweigh early or recent evidence at the cost of running counts and relative discrepancy of cues between the two channels . The second is a delayed decision ( DD ) task ( Fig 1B ) , with a delay period between the evidence and decision periods to challenge temporal credit assignment , which is often problematic for networks to span . Evidence Accumulation ( EA ) tasks have a 2.4s cue period followed by a 0.25s decision period . Delayed Decision ( DD ) tasks have a 0.5s cue period , a 0.5s delay period , and a 0.25s decision period . The target function during the delay is 0 with no cues during this time . | In this paper, the authors propose an approach using curricula to identify how a system has learned. Using two commonly used tasks in neuroscience: evidence accumulation and delayed decision recurrent neural networks (RNNs) are trained using two different loss functions (target based and representation based). They show that by simply comparing the learning time during different curricula , we can identify which loss function was used. On the other hand, the learned state-space trajectories of RNNs are indistinguishable thus unable to disambiguate which loss function was used for training. The findings here put emphasis on the collection of behavioral and neural data while animals in neuroscience labs undergo curriculum-based learning on top of the data that is collected after the animal has learned. | SP:6a87b089a5efc03251112b2b8551df432c7efb42 |
When in Doubt, Summon the Titans: A Framework for Efficient Inference with Large Models | Scaling neural networks to “ large ” sizes , with billions of parameters , has been shown to yield impressive results on many challenging problems . However , the inference cost incurred by such large models often prevent their application in most real-world settings . In this paper , we propose a two-stage framework based on distillation that realizes the modelling benefits of the large models , while largely preserving the computational benefits of inference with more lightweight models . In a nutshell , we use the large teacher models to guide the lightweight student models to only make correct predictions on a subset of “ easy ” examples ; for the “ hard ” examples , we fall-back to the teacher . Such an approach allows us to efficiently employ large models in practical scenarios where easy examples are much more frequent than rare hard examples . Our proposed use of distillation to only handle easy instances allows for a more aggressive trade-off in the student size , thereby reducing the amortized cost of inference and achieving better accuracy than standard distillation . Empirically , we demonstrate the benefits of our approach on both image classification and natural language processing benchmarks . 1 INTRODUCTION . Scaling neural networks to “ large ” sizes has brought dramatic quality gains over a wide variety of machine learning problems , including at the tails . In computer vision , the high performing models for image classification ( Kolesnikov et al. , 2019 ; Xie et al. , 2020 ; Tan & Le , 2019 ; Foret et al. , 2021 ) and segmentation ( Ghiasi et al. , 2020 ) have upto 928M parameters and require up to 600G FLOPs for a prediction . Similarly , in natural language processing , transformer-based approaches , which have several billion parameters and require up to a tera-FLOP for a prediction , are leading performance on language understanding tasks ( Raffel et al. , 2019 ; Brown et al. , 2020 ; Fedus et al . ) and neural machine translation ( Bapna & Firat , 2019 ; Huang et al. , 2018 ) . The immensely expensive inference cost of these large models is , however , hindering their direct widespread adoption ( Jouppi et al. , 2017 ; Ning , 2013 ; Crankshaw et al. , 2017 ; Zhang et al. , 2019 ) . The issue is further exacerbated in deployment over resource-constrained edge devices such as mobile phones ( Zhang et al. , 2020 ) . As a workaround , many model compression techniques have been proposed to reduce the computational cost and memory footprint by trading-off accuracy , including quantization ( Mozer & Smolensky , 1988 ; Han et al. , 2015 ) , pruning ( LeCun et al. , 1989 ; Hassibi & Stork , 1993 ) , and distillation ( Bucilǎ et al. , 2006 ; Romero et al. , 2014 ; Hinton et al. , 2015 ) . However , there is a limit to how far such model compression techniques can be pushed to reduce inference cost while retaining good performance across all inputs ( cf . teacher-student accuracy gaps in ( Cho & Hariharan , 2019 ; Menon et al. , 2020b ; Mirzadeh et al. , 2020 ; Wang et al. , 2017a ) ) . Ideally , the compute required to make predictions on an instance should depend on the hardness of the instance . But the large models do not adapt their computational budget based on the complexity of the task at hand . We conjecture that the full ability of a large model is needed only for a small fraction of “ hard ” instances . The majority of real-inputs are “ easy ” , for which performing full computation of a large model is wasteful ; rendering the overall ML system inefficient . Such an inefficient utilization of compute gets even more pronounced for many real-world data that are heavily long-tailed ( Zhu et al. , 2014 ; Wang et al. , 2017b ; Van Horn & Perona , 2017 ) , with hard instances belonging to the tail . In this paper , we focus on realizing the benefits of a large model on the hard instance without incurring the unnecessary large inference cost on prevalent easy instances . Towards this , we propose to employ a novel distillation-based two-stage inference framework in Figure 1 ( left ) : First use a lightweight student model to make a prediction . If the student is confident , we emit the prediction and we want the student to be confident on all the easy instances , which should be a large fraction of the test time queries . When the student is in doubt , ideally only for a small number of hard examples , we fall-back to the large teacher . Our main contributions for leveraging the excellent performance of large models to realize a desirable inference cost vs. performance trade-off are as follows . • The instance-aware two-stage inference mechanism crucially relies on the ability of the student model to detect the “ hardness ” of an input instance on the fly and routing it to the large model . To enable this routing , we propose modified distillation procedures . In particular , we employ novel distillation loss functions ( cf . Sec . 4 ) such that the student gets penalized heavily for making mistakes on easy examples while for harder out-of-domain examples we encourage the student to be less confident , e.g. , the prediction distribution be closer to the uniform distribution . • We conduct a detailed empirical evaluation of the proposed distillation-based two-stage inference framework ( cf . Sec . 5 ) and show that it allows us to much more aggressively trade-off size of the student for multiple image classification and natural language processing ( NLP ) benchmarks . Interestingly , as summarized in Figure 1 , there is a sweet spot where we can achieve the same accuracy as the teacher with 45 % less compute . This benefit is further magnified when considering only in-domain examples . Thus , we can reduce the overall computation over the data distribution and achieve better accuracy than performing inference with only the student model . Note that , traditionally , the distillation approach aims to utilize a complex model to learn a simple model that has its overall performance as close to the complex model as possible . This is done under the assumption that during the inference time one can ‘ throw away ’ the complex model and rely on only the simple model for the final predictions . We would like to highlight that our goal is not to train a student/simple model that will be used as a standalone model to generate predictions . It ’ s worth mentioning that the proposed two-stage inference can also be useful in a modern setup like edge computing and 5G cloudlets ( Fang et al. , 2019 ) , where a lightweight student model runs on a device to make most of the predictions with low latency and only once in a while a hard instance is delegated to a shared large teacher model running in the cloud . 2 RELATED WORK . Techniques to reduce inference cost for deep models mainly fall under two different approaches : quantization and pruning , and adaptive computation . Quantization and pruning . The primary way suggested in the literature to accelerate predictions from deep neural networks has been quantization and pruning ( Mozer & Smolensky , 1988 ; LeCun et al. , 1989 ; Hassibi & Stork , 1993 ; Li et al. , 2020 ; Carreira-Perpinán , 2017 ; Howard et al. , 2019 ) . Significant progress was made by introducing Huffman encoding methods for non-uniform quantization which led to a reduction in network sizes by orders of magnitude and up to 4x reduction in overall prediction cost ( Han et al. , 2015 ) . Since then pruning and quantization have been widely adopted in computer vision and more details can be found in the recent survey by Liang et al . ( 2021 ) . In the NLP domain , Gordon et al . ( 2020 ) ; Zadeh et al . ( 2020 ) proposed pruning BERT during training , which resulted in 30 % -40 % reduction in model size with minimal effect on the accuracy of the final task , however , not much compute/time savings was observed as arbitrary sparsity might not be leveraged by modern hardware accelerators . Towards this , structured pruning is more beneficial , as it removes a series of weights that correspond to an entire component of the model ( Ganesh et al. , 2020 ) . In transformers , this would correspond to pruning out entire attention heads ( Kovaleva et al. , 2019 ; Raganato et al. , 2020 ) or encoder units ( Fan et al. , 2019 ) . Our proposed approach of two-stage inference is complementary to such techniques and can be combined with these to further reduce the inference cost . Adaptive computation . In line with our proposed approach , there have been works trying to adapt the amount of computation of neural model based on an input instance . Effort in this space started in the vision community for enabling real-time object detection by Rowley et al . ( 1998 ) and later formalized by Viola & Jones ( 2001 ) . The basic idea was to design a cascade of independent classifier and reject early on and cheaply . The idea has been generalized from a linear chain of cascaded classifiers to trees ( Xu et al. , 2014 ) . Instead of combining many independent classifiers , a similar idea to stop early has emerged in monolithic deep models . One approach to this problem is represented by Adaptive Computation Time ( ACT ) ( Graves , 2016 ; Chung et al. , 2016 ) . ACT is a mechanism for learning a scalar halting probability , called the “ ponder time ” , to dynamically modulate the number of computational steps needed for each input . An alternative approach is represented by Adaptive Early Exit Networks ( Bolukbasi et al. , 2017 ) , which gives the network the ability to exit prematurely - i.e. , not computing the whole hierarchy of layers - if no more computation is needed . A modern incarnation of this approach in NLP with transformers encoders appeared in Schwartz et al . ( 2020 ) ; Liu et al . ( 2020 ) ; Dabre et al . ( 2020 ) . This idea has been extended to generative tasks as well , where a number of decoder layers per time step are adapted in Elbayad et al . ( 2020 ) . As a further generalization , Bapna et al . ( 2020 ) introduced “ control symbols ” to determine which components are skipped in a transformer , i.e . not all previous components need to be executed . Similar ideas had already existed in the vision community , for example , Wang et al . ( 2017a ; 2018 ) introduced a method for dynamically skipping convolutional layers . All of these approaches are specialized to a task and rely on designing the whole pipeline from scratch which can be expensive if we want to achieve state-of-the-art ( SoTA ) performance . In contrast , we want to design efficient inference techniques achieving SoTA performance by only training cheap components , like the student model using a novel distillation procedure , while leveraging existing SoTA large models without re-training or modifying them . Moreover , our approach is a generic framework to leverage the large models independent of the underlying model architecture and problem domain . Our proposed approach ensures that large model is only invoked on instances that necessarily benefit from its large model capacity and a lite distilled model suffices to predict a large portion of test instances . | The paper proposes a two-stage distillation framework to improve inference efficiency and reduce the dependency on large teacher models. The goal of this framework is to only use the large/teacher model for difficult and rare examples and to use the student, smaller model for the more frequent easy examples. The procedure is composed of a training phase and an inference phase. During the training phase, the dataset is separated into two subsets: one containing the hard/difficult examples and one containing the easy examples. Using a loss incorporating a combination of label-smoothing and distillation, the student model is taught to be certain on the easy examples (by using distillation of the large model) and to be less certain on the hard/difficult examples. During the inference phase, in order to route the hard examples to the larger teacher model, several possible methods are proposed relying in particular on whether the margin of the student’s softmax is higher or lower than a threshold. The authors validate their two-stage framework empirically on three benchmark image datasets (CIFAR-100, ImageNet-1k and ImageNet-21k) and two benchmark NLP datasets (SQuAD and MNLI). | SP:26369f7db26705f4f172a38ba17240f9a32e5c0d |
When in Doubt, Summon the Titans: A Framework for Efficient Inference with Large Models | Scaling neural networks to “ large ” sizes , with billions of parameters , has been shown to yield impressive results on many challenging problems . However , the inference cost incurred by such large models often prevent their application in most real-world settings . In this paper , we propose a two-stage framework based on distillation that realizes the modelling benefits of the large models , while largely preserving the computational benefits of inference with more lightweight models . In a nutshell , we use the large teacher models to guide the lightweight student models to only make correct predictions on a subset of “ easy ” examples ; for the “ hard ” examples , we fall-back to the teacher . Such an approach allows us to efficiently employ large models in practical scenarios where easy examples are much more frequent than rare hard examples . Our proposed use of distillation to only handle easy instances allows for a more aggressive trade-off in the student size , thereby reducing the amortized cost of inference and achieving better accuracy than standard distillation . Empirically , we demonstrate the benefits of our approach on both image classification and natural language processing benchmarks . 1 INTRODUCTION . Scaling neural networks to “ large ” sizes has brought dramatic quality gains over a wide variety of machine learning problems , including at the tails . In computer vision , the high performing models for image classification ( Kolesnikov et al. , 2019 ; Xie et al. , 2020 ; Tan & Le , 2019 ; Foret et al. , 2021 ) and segmentation ( Ghiasi et al. , 2020 ) have upto 928M parameters and require up to 600G FLOPs for a prediction . Similarly , in natural language processing , transformer-based approaches , which have several billion parameters and require up to a tera-FLOP for a prediction , are leading performance on language understanding tasks ( Raffel et al. , 2019 ; Brown et al. , 2020 ; Fedus et al . ) and neural machine translation ( Bapna & Firat , 2019 ; Huang et al. , 2018 ) . The immensely expensive inference cost of these large models is , however , hindering their direct widespread adoption ( Jouppi et al. , 2017 ; Ning , 2013 ; Crankshaw et al. , 2017 ; Zhang et al. , 2019 ) . The issue is further exacerbated in deployment over resource-constrained edge devices such as mobile phones ( Zhang et al. , 2020 ) . As a workaround , many model compression techniques have been proposed to reduce the computational cost and memory footprint by trading-off accuracy , including quantization ( Mozer & Smolensky , 1988 ; Han et al. , 2015 ) , pruning ( LeCun et al. , 1989 ; Hassibi & Stork , 1993 ) , and distillation ( Bucilǎ et al. , 2006 ; Romero et al. , 2014 ; Hinton et al. , 2015 ) . However , there is a limit to how far such model compression techniques can be pushed to reduce inference cost while retaining good performance across all inputs ( cf . teacher-student accuracy gaps in ( Cho & Hariharan , 2019 ; Menon et al. , 2020b ; Mirzadeh et al. , 2020 ; Wang et al. , 2017a ) ) . Ideally , the compute required to make predictions on an instance should depend on the hardness of the instance . But the large models do not adapt their computational budget based on the complexity of the task at hand . We conjecture that the full ability of a large model is needed only for a small fraction of “ hard ” instances . The majority of real-inputs are “ easy ” , for which performing full computation of a large model is wasteful ; rendering the overall ML system inefficient . Such an inefficient utilization of compute gets even more pronounced for many real-world data that are heavily long-tailed ( Zhu et al. , 2014 ; Wang et al. , 2017b ; Van Horn & Perona , 2017 ) , with hard instances belonging to the tail . In this paper , we focus on realizing the benefits of a large model on the hard instance without incurring the unnecessary large inference cost on prevalent easy instances . Towards this , we propose to employ a novel distillation-based two-stage inference framework in Figure 1 ( left ) : First use a lightweight student model to make a prediction . If the student is confident , we emit the prediction and we want the student to be confident on all the easy instances , which should be a large fraction of the test time queries . When the student is in doubt , ideally only for a small number of hard examples , we fall-back to the large teacher . Our main contributions for leveraging the excellent performance of large models to realize a desirable inference cost vs. performance trade-off are as follows . • The instance-aware two-stage inference mechanism crucially relies on the ability of the student model to detect the “ hardness ” of an input instance on the fly and routing it to the large model . To enable this routing , we propose modified distillation procedures . In particular , we employ novel distillation loss functions ( cf . Sec . 4 ) such that the student gets penalized heavily for making mistakes on easy examples while for harder out-of-domain examples we encourage the student to be less confident , e.g. , the prediction distribution be closer to the uniform distribution . • We conduct a detailed empirical evaluation of the proposed distillation-based two-stage inference framework ( cf . Sec . 5 ) and show that it allows us to much more aggressively trade-off size of the student for multiple image classification and natural language processing ( NLP ) benchmarks . Interestingly , as summarized in Figure 1 , there is a sweet spot where we can achieve the same accuracy as the teacher with 45 % less compute . This benefit is further magnified when considering only in-domain examples . Thus , we can reduce the overall computation over the data distribution and achieve better accuracy than performing inference with only the student model . Note that , traditionally , the distillation approach aims to utilize a complex model to learn a simple model that has its overall performance as close to the complex model as possible . This is done under the assumption that during the inference time one can ‘ throw away ’ the complex model and rely on only the simple model for the final predictions . We would like to highlight that our goal is not to train a student/simple model that will be used as a standalone model to generate predictions . It ’ s worth mentioning that the proposed two-stage inference can also be useful in a modern setup like edge computing and 5G cloudlets ( Fang et al. , 2019 ) , where a lightweight student model runs on a device to make most of the predictions with low latency and only once in a while a hard instance is delegated to a shared large teacher model running in the cloud . 2 RELATED WORK . Techniques to reduce inference cost for deep models mainly fall under two different approaches : quantization and pruning , and adaptive computation . Quantization and pruning . The primary way suggested in the literature to accelerate predictions from deep neural networks has been quantization and pruning ( Mozer & Smolensky , 1988 ; LeCun et al. , 1989 ; Hassibi & Stork , 1993 ; Li et al. , 2020 ; Carreira-Perpinán , 2017 ; Howard et al. , 2019 ) . Significant progress was made by introducing Huffman encoding methods for non-uniform quantization which led to a reduction in network sizes by orders of magnitude and up to 4x reduction in overall prediction cost ( Han et al. , 2015 ) . Since then pruning and quantization have been widely adopted in computer vision and more details can be found in the recent survey by Liang et al . ( 2021 ) . In the NLP domain , Gordon et al . ( 2020 ) ; Zadeh et al . ( 2020 ) proposed pruning BERT during training , which resulted in 30 % -40 % reduction in model size with minimal effect on the accuracy of the final task , however , not much compute/time savings was observed as arbitrary sparsity might not be leveraged by modern hardware accelerators . Towards this , structured pruning is more beneficial , as it removes a series of weights that correspond to an entire component of the model ( Ganesh et al. , 2020 ) . In transformers , this would correspond to pruning out entire attention heads ( Kovaleva et al. , 2019 ; Raganato et al. , 2020 ) or encoder units ( Fan et al. , 2019 ) . Our proposed approach of two-stage inference is complementary to such techniques and can be combined with these to further reduce the inference cost . Adaptive computation . In line with our proposed approach , there have been works trying to adapt the amount of computation of neural model based on an input instance . Effort in this space started in the vision community for enabling real-time object detection by Rowley et al . ( 1998 ) and later formalized by Viola & Jones ( 2001 ) . The basic idea was to design a cascade of independent classifier and reject early on and cheaply . The idea has been generalized from a linear chain of cascaded classifiers to trees ( Xu et al. , 2014 ) . Instead of combining many independent classifiers , a similar idea to stop early has emerged in monolithic deep models . One approach to this problem is represented by Adaptive Computation Time ( ACT ) ( Graves , 2016 ; Chung et al. , 2016 ) . ACT is a mechanism for learning a scalar halting probability , called the “ ponder time ” , to dynamically modulate the number of computational steps needed for each input . An alternative approach is represented by Adaptive Early Exit Networks ( Bolukbasi et al. , 2017 ) , which gives the network the ability to exit prematurely - i.e. , not computing the whole hierarchy of layers - if no more computation is needed . A modern incarnation of this approach in NLP with transformers encoders appeared in Schwartz et al . ( 2020 ) ; Liu et al . ( 2020 ) ; Dabre et al . ( 2020 ) . This idea has been extended to generative tasks as well , where a number of decoder layers per time step are adapted in Elbayad et al . ( 2020 ) . As a further generalization , Bapna et al . ( 2020 ) introduced “ control symbols ” to determine which components are skipped in a transformer , i.e . not all previous components need to be executed . Similar ideas had already existed in the vision community , for example , Wang et al . ( 2017a ; 2018 ) introduced a method for dynamically skipping convolutional layers . All of these approaches are specialized to a task and rely on designing the whole pipeline from scratch which can be expensive if we want to achieve state-of-the-art ( SoTA ) performance . In contrast , we want to design efficient inference techniques achieving SoTA performance by only training cheap components , like the student model using a novel distillation procedure , while leveraging existing SoTA large models without re-training or modifying them . Moreover , our approach is a generic framework to leverage the large models independent of the underlying model architecture and problem domain . Our proposed approach ensures that large model is only invoked on instances that necessarily benefit from its large model capacity and a lite distilled model suffices to predict a large portion of test instances . | This paper studies efficient inference problem for large models. It proposes to train a small student model, and performs inference for easy data on the student model, and for hard data on the original large model. Experiments show the proposed method performs better than the simple baseline of standard distillation model. | SP:26369f7db26705f4f172a38ba17240f9a32e5c0d |
Adaptive Learning of Tensor Network Structures | 1 INTRODUCTION . Matrix factorization is ubiquitous in machine learning and data science and forms the backbone of many algorithms . Tensor decomposition techniques emerged as a powerful generalization of matrix factorization . They are particularly suited to handle high-dimensional multi-modal data and have been successfully applied in neuroimaging [ 44 ] , signal processing [ 3 , 33 ] , spatio-temporal analysis [ 1 , 31 ] and computer vision [ 20 ] . Common tensor learning tasks include tensor decomposition ( finding a low-rank approximation of a given tensor ) , tensor regression ( which extends linear regression to the multi-linear setting ) , and tensor completion ( inferring a tensor from a subset of observed entries ) . Akin to matrix factorization , tensor methods rely on factorizing a high-order tensor into small factors . However , in contrast with matrices , there are many different ways of decomposing a tensor , each one giving rise to a different notion of rank , including CP , Tucker , Tensor Train ( TT ) and Tensor Ring ( TR ) . For most tensor learning problems , there is no clear way of choosing which decomposition model to use , and the cost of model mis-specification can be high . It may even be the case that none of the commonly used models is suited for the task , and new decomposition models would achieve better tradeoffs between minimizing the number of parameters and minimizing a given loss function . We propose an adaptive tensor learning algorithm which is agnostic to decomposition models . Our approach relies on the tensor network formalism , which has shown great success in the many-body physics community [ 28 , 7 , 6 ] and has recently demonstrated its potential in machine learning for compressing models [ 24 , 39 , 8 , 23 , 14 , 41 ] , developing new insights into the expressiveness of deep neural networks [ 4 , 15 ] , and designing novel approaches to supervised [ 35 , 9 ] and unsupervised [ 34 , 11 , 22 ] learning . Tensor networks offer a unifying view of tensor decomposition models , allowing one to reason about tensor factorization in a general manner , without focusing on a particular model . In this work , we design a greedy algorithm to efficiently search the space of tensor network structures for common tensor problems , including decomposition , completion and model compression . We start by considering the novel tensor optimization problem of minimizing a loss over arbitrary tensor network structures under a constraint on the number of parameters . To the best of our knowledge , this is the first time that this problem is considered . The resulting problem is a bi-level optimization problem where the upper level is a discrete optimization over tensor network structures , and the lower level is a continuous optimization of a given loss function . We propose a greedy approach to optimize the upper-level problem , which is combined with continuous optimization techniques to optimize the lower-level problem . Starting from a rank one initialization , the greedy algorithm successively identifies the most promising edge of a tensor network for a rank increment , making it possible to adaptively identify from data the tensor network structure which is best suited for the task at hand . The greedy algorithm we propose is conceptually simple , and experiments on tensor decomposition , completion and model compression tasks showcase its effectiveness . Our algorithm significantly outperforms a recent evolutionary algorithm [ 19 ] for tensor network decomposition on an image compression task by discovering structures that require less parameters while simultaneously achieving lower recovery errors . The greedy algorithm also outperforms CP , Tucker , TT and TR algorithms on an image completion task and finds more efficient TN structures to compress fully connected layers in neural networks than the TT based method introduced in [ 24 ] . Related work Adaptive tensor learning algorithms have been previously proposed , but they only consider determining the rank ( s ) of a specific decomposition and are often tailored to a specific tensor learning task ( e.g. , decomposition or regression ) . In [ 1 ] , a greedy algorithm is proposed to adaptively find the ranks of a Tucker decomposition for a spatio-temporal forecasting task , and in [ 38 ] an adaptive Tucker based algorithm is proposed for background subtraction . In [ 42 ] , the authors present a Bayesian approach for automatically determining the rank of a CP decomposition . In [ 2 ] an adaptive algorithm for tensor decomposition in the hierarchical Tucker format is proposed . In [ 10 ] a stable rank-adaptive alternating least square algorithm is introduced for completion in the TT format . The problem we consider is considerably more general since we do not assume a fixed tensor network structure ( e.g . Tucker , TT , CP , etc. ) . Exploring other decomposition relying on the tensor network formalism has been sporadically explored . The work which is the most closely related to our contribution is [ 19 ] where evolutionary algorithms are used to approximate the best tensor network structure to exactly decompose a given target tensor . However , the method proposed in [ 19 ] only searches for TN structures with uniform ranks ( with the rank being a hyperparameter ) and is limited to the problem of tensor decomposition . In contrast , our method is the first to jointly explore the space of structures and ( non-uniform ) ranks to minimize an arbitrary loss function over the space of tensor parameters . Lastly , [ 12 ] proposes to explore the space of tensor network structures for compressing neural networks , a rounding algorithm for general tensor networks is proposed in [ 21 ] and the notions of rank induced by arbitrary tensor networks are studied in [ 40 ] . 2 PRELIMINARIES . In this section , we present notions of tensor algebra and tensor networks . We first introduce notations . For any integer k , [ k ] denotes the set of integers from 1 to k. We use lower case bold letters for vectors ( e.g . v 2 Rd1 ) , upper case bold letters for matrices ( e.g . M 2 Rd1⇥d2 ) and bold calligraphic letters for higher order tensors ( e.g . T 2 Rd1⇥d2⇥d3 ) . The ith row ( resp . column ) of a matrix M will be denoted by Mi , : ( resp . M : ,i ) . This notation is extended to slices of a tensor in the obvious way . Tensors and tensor networks We first recall basic definitions of tensor algebra ; more details can be found in [ 17 ] . A tensor T 2 Rd1⇥···⇥dp can simply be seen as a multidimensional array ( T i1 , ··· , ip : in 2 [ dn ] , n 2 [ p ] ) . The inner product of two tensors is defined by hS , T i =P i1 , ··· , ip Si1···ipT i1···ip and the Frobenius norm of a tensor is defined by kT k 2 F = hT , T i . The mode-n matrix product of a tensor T and a matrix X 2 Rm⇥dn is a tensor denoted by T ⇥n X . It is of size d1⇥ · · ·⇥dn 1⇥m⇥dn+1⇥ · · ·⇥dp and is obtained by contracting the nth mode of T with the second mode of X , e.g . for a 3rd order tensor T , we have ( T ⇥2X ) i1i2i3 = P j T i1ji3Xi2j . The nth mode matricization of T is denoted by T ( n ) 2 Rdn⇥ Q i 6=n di . Tensor network diagrams allow one to represent complex operations on tensors in a graphical and intuitive way . A tensor network ( TN ) is simply a graph where nodes represent tensors , and edges represent contractions between tensor modes , i.e . a summation over an index shared by two tensors . In a tensor network , the arity of a vertex ( i.e . the number of legs of a node ) corresponds to the order of the tensor ( see Figure 1 ) . Connecting two legs in a tensor network represents a contraction over the corresponding indices . Consider the following simple tensor network with two nodes : A x m n . The first node represents a matrix A 2 Rm⇥n and the second one a vector x 2 Rn . Since this tensor network has one dangling leg ( i.e . an edge which is not connected to any other node ) , it represents a first order tensor , i.e. , a vector . The edge between the second leg of A and the leg of x corresponds to a contraction between the second mode of A and the first mode of x . Hence , the resulting tensor network represents the classical matrix-vector product , which can be seen by calculating the ith component of this tensor network : A xi = P j Aijxj = ( Ax ) i . Other examples of tensor network representations of common operations on matrices and tensors can be found in Figure 2 . Lastly , it is worth mentioning that disconnected tensor networks correspond to tensor products , e.g. , u v = uv > is the outer product of u and v with components u vi j= uivj . Consequently , an edge of dimension ( or rank ) 1 in a TN is equivalent to having no edge between the two nodes , e.g. , if R = 1 we have A Bi R j = PR r=1 Ai , rBr , j = Ai,1B1 , j = A Bi j. Tensor decomposition and tensor rank We now briefly present the most common tensor decomposition models , omitting the CP decomposition which can not be described using the TN formalism unless hyper-edges are allowed ( which we do not consider in this work ) . For the sake of simplicity we consider a fourth order tensor T 2 Rd1⇥d2⇥d3⇥d4 , each decomposition can be straightforwardly extended to higher-order tensors . A Tucker decomposition [ 36 ] decomposes T as the product of a core tensor G 2 RR1⇥R2⇥R3⇥R4 with four factor matrices Ui 2 Rdi⇥Ri for i = 1 , · · · , 4 : T = G ⇥1 U1 ⇥2 U2 ⇥3 U3 ⇥4 U4 . The Tucker rank , or multilinear rank , of T is the smallest tuple ( R1 , R2 , R3 , R4 ) for which such a decomposition exists . The tensor ring ( TR ) decomposition [ 43 , 25 , 29 ] expresses each component of T as the trace of a product of slices of four core tensors G ( 1 ) 2 RR0⇥d1⇥R1 , G ( 2 ) 2 RR1⇥d2⇥R2 , G ( 3 ) 2 RR2⇥d3⇥R3 and G ( 4 ) 2 RR4⇥d4⇥R0 : T i1 , i2 , i3 , i4 = Tr ( G ( 1 ) : ,i1 , : G ( 2 ) : ,i2 , :G ( 3 ) : ,i3 , : G ( 4 ) : ,i4 , : ) . The tensor train ( TT ) decomposition [ 26 ] ( also known as matrix product states in the physics community ) is a particular case of the tensor ring decomposition where R0 must be equal to 1 ( R0 is thus omitted when referring to the rank of a TT decomposition ) . Similarly to Tucker , the TT and TR decompositions naturally give rise to an associated notion of rank : the TR rank ( resp . TT rank ) is the smallest tuple ( R0 , R1 , R2 , R3 ) ( resp . ( R1 , R2 , R3 ) ) such that a TR ( resp . TT ) decomposition exists . Tensor networks offer a unifying view of tensor decomposition models : Figure 3 shows the TN representation of common models . Each decomposition is naturally associated with the graph topology of the underlying TN . For example , the Tucker decomposition corresponds to star graphs , the TT decomposition corresponds to chain graphs , and the TR decomposition model corresponds to cyclic graphs . The relation between the rank of a decomposition and its number of parameters is different for each model . Letting p be the order of the tensor , d its largest dimension and R the rank of the decomposition ( assuming uniform ranks ) , the number of parameters is in O ( Rp + pdR ) for Tucker , and O pdR2 for TT and TR . One can see that the Tucker decomposition is not well suited for tensors of very high order since the size of the core tensor grows exponentially with p . | First, the idea of rank incremental method for Tensor network decomposition and determination of TN structures is not novel. Second, decomposition with weight transfer is obvious and widely used in the rank incremental method. For generalized tensor networks decomposition, the authors should consider the works. S. Handschuh, “Numerical Methods in Tensor Networks,” PhD thesis,Facualty of Mathematics and Informatics, University Leipzig, Germany,Leipzig, Germany, 2015. Mike Espig, Wolfgang Hackbusch, Stefan Handschuh, and Reinhold Schneider, Optimization Problems in Contracted Tensor Networks, 2012 | SP:ecb271a825f6d8cbc5c045436d6bc937a735e6a1 |
Adaptive Learning of Tensor Network Structures | 1 INTRODUCTION . Matrix factorization is ubiquitous in machine learning and data science and forms the backbone of many algorithms . Tensor decomposition techniques emerged as a powerful generalization of matrix factorization . They are particularly suited to handle high-dimensional multi-modal data and have been successfully applied in neuroimaging [ 44 ] , signal processing [ 3 , 33 ] , spatio-temporal analysis [ 1 , 31 ] and computer vision [ 20 ] . Common tensor learning tasks include tensor decomposition ( finding a low-rank approximation of a given tensor ) , tensor regression ( which extends linear regression to the multi-linear setting ) , and tensor completion ( inferring a tensor from a subset of observed entries ) . Akin to matrix factorization , tensor methods rely on factorizing a high-order tensor into small factors . However , in contrast with matrices , there are many different ways of decomposing a tensor , each one giving rise to a different notion of rank , including CP , Tucker , Tensor Train ( TT ) and Tensor Ring ( TR ) . For most tensor learning problems , there is no clear way of choosing which decomposition model to use , and the cost of model mis-specification can be high . It may even be the case that none of the commonly used models is suited for the task , and new decomposition models would achieve better tradeoffs between minimizing the number of parameters and minimizing a given loss function . We propose an adaptive tensor learning algorithm which is agnostic to decomposition models . Our approach relies on the tensor network formalism , which has shown great success in the many-body physics community [ 28 , 7 , 6 ] and has recently demonstrated its potential in machine learning for compressing models [ 24 , 39 , 8 , 23 , 14 , 41 ] , developing new insights into the expressiveness of deep neural networks [ 4 , 15 ] , and designing novel approaches to supervised [ 35 , 9 ] and unsupervised [ 34 , 11 , 22 ] learning . Tensor networks offer a unifying view of tensor decomposition models , allowing one to reason about tensor factorization in a general manner , without focusing on a particular model . In this work , we design a greedy algorithm to efficiently search the space of tensor network structures for common tensor problems , including decomposition , completion and model compression . We start by considering the novel tensor optimization problem of minimizing a loss over arbitrary tensor network structures under a constraint on the number of parameters . To the best of our knowledge , this is the first time that this problem is considered . The resulting problem is a bi-level optimization problem where the upper level is a discrete optimization over tensor network structures , and the lower level is a continuous optimization of a given loss function . We propose a greedy approach to optimize the upper-level problem , which is combined with continuous optimization techniques to optimize the lower-level problem . Starting from a rank one initialization , the greedy algorithm successively identifies the most promising edge of a tensor network for a rank increment , making it possible to adaptively identify from data the tensor network structure which is best suited for the task at hand . The greedy algorithm we propose is conceptually simple , and experiments on tensor decomposition , completion and model compression tasks showcase its effectiveness . Our algorithm significantly outperforms a recent evolutionary algorithm [ 19 ] for tensor network decomposition on an image compression task by discovering structures that require less parameters while simultaneously achieving lower recovery errors . The greedy algorithm also outperforms CP , Tucker , TT and TR algorithms on an image completion task and finds more efficient TN structures to compress fully connected layers in neural networks than the TT based method introduced in [ 24 ] . Related work Adaptive tensor learning algorithms have been previously proposed , but they only consider determining the rank ( s ) of a specific decomposition and are often tailored to a specific tensor learning task ( e.g. , decomposition or regression ) . In [ 1 ] , a greedy algorithm is proposed to adaptively find the ranks of a Tucker decomposition for a spatio-temporal forecasting task , and in [ 38 ] an adaptive Tucker based algorithm is proposed for background subtraction . In [ 42 ] , the authors present a Bayesian approach for automatically determining the rank of a CP decomposition . In [ 2 ] an adaptive algorithm for tensor decomposition in the hierarchical Tucker format is proposed . In [ 10 ] a stable rank-adaptive alternating least square algorithm is introduced for completion in the TT format . The problem we consider is considerably more general since we do not assume a fixed tensor network structure ( e.g . Tucker , TT , CP , etc. ) . Exploring other decomposition relying on the tensor network formalism has been sporadically explored . The work which is the most closely related to our contribution is [ 19 ] where evolutionary algorithms are used to approximate the best tensor network structure to exactly decompose a given target tensor . However , the method proposed in [ 19 ] only searches for TN structures with uniform ranks ( with the rank being a hyperparameter ) and is limited to the problem of tensor decomposition . In contrast , our method is the first to jointly explore the space of structures and ( non-uniform ) ranks to minimize an arbitrary loss function over the space of tensor parameters . Lastly , [ 12 ] proposes to explore the space of tensor network structures for compressing neural networks , a rounding algorithm for general tensor networks is proposed in [ 21 ] and the notions of rank induced by arbitrary tensor networks are studied in [ 40 ] . 2 PRELIMINARIES . In this section , we present notions of tensor algebra and tensor networks . We first introduce notations . For any integer k , [ k ] denotes the set of integers from 1 to k. We use lower case bold letters for vectors ( e.g . v 2 Rd1 ) , upper case bold letters for matrices ( e.g . M 2 Rd1⇥d2 ) and bold calligraphic letters for higher order tensors ( e.g . T 2 Rd1⇥d2⇥d3 ) . The ith row ( resp . column ) of a matrix M will be denoted by Mi , : ( resp . M : ,i ) . This notation is extended to slices of a tensor in the obvious way . Tensors and tensor networks We first recall basic definitions of tensor algebra ; more details can be found in [ 17 ] . A tensor T 2 Rd1⇥···⇥dp can simply be seen as a multidimensional array ( T i1 , ··· , ip : in 2 [ dn ] , n 2 [ p ] ) . The inner product of two tensors is defined by hS , T i =P i1 , ··· , ip Si1···ipT i1···ip and the Frobenius norm of a tensor is defined by kT k 2 F = hT , T i . The mode-n matrix product of a tensor T and a matrix X 2 Rm⇥dn is a tensor denoted by T ⇥n X . It is of size d1⇥ · · ·⇥dn 1⇥m⇥dn+1⇥ · · ·⇥dp and is obtained by contracting the nth mode of T with the second mode of X , e.g . for a 3rd order tensor T , we have ( T ⇥2X ) i1i2i3 = P j T i1ji3Xi2j . The nth mode matricization of T is denoted by T ( n ) 2 Rdn⇥ Q i 6=n di . Tensor network diagrams allow one to represent complex operations on tensors in a graphical and intuitive way . A tensor network ( TN ) is simply a graph where nodes represent tensors , and edges represent contractions between tensor modes , i.e . a summation over an index shared by two tensors . In a tensor network , the arity of a vertex ( i.e . the number of legs of a node ) corresponds to the order of the tensor ( see Figure 1 ) . Connecting two legs in a tensor network represents a contraction over the corresponding indices . Consider the following simple tensor network with two nodes : A x m n . The first node represents a matrix A 2 Rm⇥n and the second one a vector x 2 Rn . Since this tensor network has one dangling leg ( i.e . an edge which is not connected to any other node ) , it represents a first order tensor , i.e. , a vector . The edge between the second leg of A and the leg of x corresponds to a contraction between the second mode of A and the first mode of x . Hence , the resulting tensor network represents the classical matrix-vector product , which can be seen by calculating the ith component of this tensor network : A xi = P j Aijxj = ( Ax ) i . Other examples of tensor network representations of common operations on matrices and tensors can be found in Figure 2 . Lastly , it is worth mentioning that disconnected tensor networks correspond to tensor products , e.g. , u v = uv > is the outer product of u and v with components u vi j= uivj . Consequently , an edge of dimension ( or rank ) 1 in a TN is equivalent to having no edge between the two nodes , e.g. , if R = 1 we have A Bi R j = PR r=1 Ai , rBr , j = Ai,1B1 , j = A Bi j. Tensor decomposition and tensor rank We now briefly present the most common tensor decomposition models , omitting the CP decomposition which can not be described using the TN formalism unless hyper-edges are allowed ( which we do not consider in this work ) . For the sake of simplicity we consider a fourth order tensor T 2 Rd1⇥d2⇥d3⇥d4 , each decomposition can be straightforwardly extended to higher-order tensors . A Tucker decomposition [ 36 ] decomposes T as the product of a core tensor G 2 RR1⇥R2⇥R3⇥R4 with four factor matrices Ui 2 Rdi⇥Ri for i = 1 , · · · , 4 : T = G ⇥1 U1 ⇥2 U2 ⇥3 U3 ⇥4 U4 . The Tucker rank , or multilinear rank , of T is the smallest tuple ( R1 , R2 , R3 , R4 ) for which such a decomposition exists . The tensor ring ( TR ) decomposition [ 43 , 25 , 29 ] expresses each component of T as the trace of a product of slices of four core tensors G ( 1 ) 2 RR0⇥d1⇥R1 , G ( 2 ) 2 RR1⇥d2⇥R2 , G ( 3 ) 2 RR2⇥d3⇥R3 and G ( 4 ) 2 RR4⇥d4⇥R0 : T i1 , i2 , i3 , i4 = Tr ( G ( 1 ) : ,i1 , : G ( 2 ) : ,i2 , :G ( 3 ) : ,i3 , : G ( 4 ) : ,i4 , : ) . The tensor train ( TT ) decomposition [ 26 ] ( also known as matrix product states in the physics community ) is a particular case of the tensor ring decomposition where R0 must be equal to 1 ( R0 is thus omitted when referring to the rank of a TT decomposition ) . Similarly to Tucker , the TT and TR decompositions naturally give rise to an associated notion of rank : the TR rank ( resp . TT rank ) is the smallest tuple ( R0 , R1 , R2 , R3 ) ( resp . ( R1 , R2 , R3 ) ) such that a TR ( resp . TT ) decomposition exists . Tensor networks offer a unifying view of tensor decomposition models : Figure 3 shows the TN representation of common models . Each decomposition is naturally associated with the graph topology of the underlying TN . For example , the Tucker decomposition corresponds to star graphs , the TT decomposition corresponds to chain graphs , and the TR decomposition model corresponds to cyclic graphs . The relation between the rank of a decomposition and its number of parameters is different for each model . Letting p be the order of the tensor , d its largest dimension and R the rank of the decomposition ( assuming uniform ranks ) , the number of parameters is in O ( Rp + pdR ) for Tucker , and O pdR2 for TT and TR . One can see that the Tucker decomposition is not well suited for tensors of very high order since the size of the core tensor grows exponentially with p . | In this paper, a greedy algorithm that can find a structure of a certain class of tensor networks is proposed. The algorithm consists of bi-level optimization, where tensor network structure is optimized in the outer loop and tensor decomposition is computed to approximate a given tensor in the inner loop. The tradeoff between error and the number of parameters of the proposed algorithm is empirically compared with synthetic data, image compression, and neural network compression. | SP:ecb271a825f6d8cbc5c045436d6bc937a735e6a1 |
Learning Continuous Environment Fields via Implicit Functions | 1 INTRODUCTION . Scene understanding aims to analyze and interpret a given environment . The past few years have witnessed tremendous success in scene representation learning for semantic segmentation ( Long et al. , 2015 ; Li et al. , 2017 ) , 3D scene reconstruction ( Sitzmann et al. , 2020 ; 2019 ) , and depth estimation ( Godard et al. , 2019 ) . The learned representations can be used as inputs for training embodied tasks including visual navigation ( Sax et al. , 2018 ; Zhou et al. , 2019 ) and robotic manipulation ( Chen et al. , 2020 ; Yen-Chen et al. , 2020 ) . This overall process falls into a two-step paradigm , which first learns a static scene representation , and then trains an agent to interact with the scene . While this progress is exciting , we ask for exploring an alternative research direction : Can the scene representation itself be dynamically interactive ? That is , instead of training a Reinforcement Learning agent on top of the scene , we encode the dynamic functioning ( i.e. , the ability to control and guide the agent ’ s interactions ) in the scene representation in one-step training . Specifically , we study a representation that guides an embodied agent to navigate inside the scene . We propose a scene representation dubbed as the environment field that encodes the reaching distance – distance from any position to a given goal location along a feasible and plausible trajectory . Such an environment field needs to be continuous and densely covering the entire scene . With this continuous scene representation , given an agent in any locations in the scene , we can perform iterative optimization ( e.g. , gradient descent ) over the continuous field to move the agent to a goal . The optimization objective is to minimize the reaching distance , and the agent reaches a given goal when the reaching distance equals to zero . Compared to search-based algorithms ( Sethian , 1996 ; LaValle , 1998 ; Kavraki et al. , 1996 ) , the proposed environment field enjoys two key advantages : a ) Continuity . Search-based methods ( Sethian , 1996 ) assume a discrete searching space , while the proposed environment field is continuous and can easily generalize to continuous scenes such as a 3D indoor environment . b ) Efficiency . Instead of applying the time-consuming searching algorithm to every new environment or goal position , a single neural network is learned to efficiently produce different environment fields for different scenes or goal positions , with a forward pass . How to learn this continuous environment field ? Naively learning such a dense field in a supervised matter requires ground truth reaching distance annotation at all possible locations in the scene , which are infinitely many and thus impossible to collect . In this paper , we leverage neural implicit functions ( Park et al. , 2019 ; Xu et al. , 2019 ; Sitzmann et al. , 2020 ; Xu et al. , 2019 ; Mescheder et al. , 2019 ) that can learn a continuous field using discretely sampled training data . Specifically , we design an implicit neural network that takes the coordinates of a position in the scene as input and outputs its reaching distance to a given goal location . Even though this implicit neural network is trained using discretely sampled position and reaching distance pairs , yet it produces a dense environment field of a scene . During inference , the reaching distance between any position in the scene and the goal can be efficiently queried via a fast network forward pass and used to navigate an agent towards the goal . We showcase the application of the proposed environment field in both human trajectory modeling in 3D indoor environments as well as agent navigation in 2D mazes and observe comparable if not better results than state-of-the-art methods . Specially , when applying the environment field to human trajectory modeling , we additionally propose and learn an accessible region – plausible regions for humans to appear in the scene via a variational auto-encoder ( VAE ) . This accessible region can be implicitly encoded into the environment field so that it can guide humans to avoid locations that do not conform to common human behaviors ( e.g. , navigate a human to travel around rather than under a desk ) . The main contributions of this work are : • We propose the environment field – a novel scene representation that facilitates direct guid- ance of dynamic agent behaviors in a scene . • We learn dense environment fields via implicit functions using discretely sampled training pairs . • We apply the environment fields to human trajectory prediction in 3D indoor environments and agent navigation in 2D mazes , where both feasible and plausible trajectories can be produced efficiently and accurately . 2 RELATED WORK . Scene representations . Scene understanding aims at parsing and interpreting an environment . Prior approaches learn various scene representations comprising of semantic segmentation ( Long et al. , 2015 ; Li et al. , 2017 ) , depth ( Godard et al. , 2019 ) and meshes ( Sitzmann et al. , 2020 ) . Nevertheless , these representations only capture static scene attributes while the proposed environment field aims to encode the dynamic functioning of a scene . Path planning . Classical path planning algorithms including Breath First Searching ( BFS ) , Dijkstra ’ s algorithm ( Dijkstra , 1959 ) and the Fast Marching Method ( FMM ) ( Sethian , 1996 ; ValeroGomez et al. , 2015 ) require applying the searching algorithm to every new environment or goal position , and hence are not suitable for dynamically changing environments . On the contrary , our environment field generalizes to changing goals and environments during inference and is thus computationally efficient . Instead of solving path planning numerically , sampling-based methods such as Rapidly Exploring Random Tree ( RRT ) ( LaValle , 1998 ; LaValle et al. , 2001 ; Bry & Roy , 2011 ) or Probabilistic Roadmaps ( PRM ) ( Kavraki et al. , 1996 ; 1998 ) grow and search a tree by sampling feasible locations in the scene . However , the efficiency and performance of such methods depend on the sampling density and algorithm . In contrast , we learn a continuous environment field that predicts the next optimal move instantly for any location in the scene . The potential field algorithm manually computes and combines an attractive and repulsive field and is prone to local minimas , while our algorithm learns a single field in a data-driven way . The proposed environment field can also be considered as a value function used in learning-based path planning methods ( Tamar et al. , 2016 ; Campero et al. , 2020 ; Al-Shedivat et al. , 2018 ; Chaplot et al. , 2021 ) . The reaching distance at each location is essentially the reward the agent gets while trying to reach the goal . However , compared to other learning-based path planning algorithms ( Tamar et al. , 2016 ; Campero et al. , 2020 ; Al-Shedivat et al. , 2018 ) , the environment field enjoys two major benefits . First , it produces the environment field for all locations in the scene with a single network forward pass ( in discrete cases such as 2D mazes ) , instead of predicting optimal steps sequentially , which requires multiple network forward passes . Second , it utilizes implicit functions instead of convolution neural networks and is thus more flexible to generalize to continuous scenarios such as human navigation in 3D scenes . Implicit neural representations . Implicit neural representations have recently attracted much attention in computer vision due to their continuity , memory-efficiency , and capacity to capture complex object details . Numerous implicit neural representations have been proposed to reconstruct 3D objects ( Park et al. , 2019 ; Xu et al. , 2019 ; Michalkiewicz et al. , 2019 ; Tulsiani et al. , 2020 ; Mescheder et al. , 2019 ) , scenes ( Sitzmann et al. , 2019 ; Jiang et al. , 2020 ; Peng et al. , 2020 ; Mildenhall et al. , 2020 ) , humans ( Atzmon & Lipman , 2020 ; Saito et al. , 2019 ; 2020 ) or even audio and video signals ( Sitzmann et al. , 2020 ) . Instead of reconstruction , in this work , we use an implicit neural function to encode a continuous environment field and target at agent navigation . A more detailed overview of implicit neural networks can be found in Section 3.1 . Affordance prediction . Affordance prediction models the interactions between humans and objects or scenes ( Koppula & Saxena , 2014 ; Chuang et al. , 2018 ; Zhu et al. , 2014 ; Koppula et al. , 2013 ; Li et al. , 2019 ; Karunratanakul et al. , 2020 ) . One line of work describes static human-scene interactions by generating human poses ( Wang et al. , 2017 ; Li et al. , 2019 ) or human body meshes ( Zhang et al. , 2020b ; a ) given scene images or point clouds . Another line of work ( Cao et al. , 2020 ; Monszpart et al. , 2019 ) models dynamic human-scene interactions by predicting a sequence of future human poses given pose history . The proposed method falls into the second category , where we predict plausible human motion sequences containing different actions ( e.g. , walking and sitting down ) while avoiding collisions in 3D scenes . The proposed approach enjoys two major advantages compared to existing work ( Cao et al. , 2020 ; Monszpart et al. , 2019 ) : a ) Our work does not require any past human motion history as a reference . Once the environment field of a scene is encoded by an implicit function , an agent can be navigated from any position to the goal position . b ) Our work can generate much longer navigation paths than existing work thanks to the learned environment field that covers the entire scene . 3 ENVIRONMENT FIELD . We first introduce the environment field using agent navigation in 2D mazes as a toy example . A real-world application in human trajectory modeling is discussed in Section 4 . 3.1 OVERVIEW OF IMPLICIT NEURAL NETWORKS . Implicit neural networks have been widely used to represent a 3D object or scene as a signed distance function ( SDF ) . The input to an implicit neural network is the coordinates of a 3D point ( x ∈ R3 ) and the output is the signed distance ( s ∈ R ) from this point to the nearest object surface : s = SDF ( x ) , where s > 0 point is inside the object surface and s < 0 when the point is outside the object surface . A desirable property of an implicit neural network is that it learns a continuous surface of an object given discretely sampled training pairs X : = ( x , s ) , i.e. , it is able to predict the SDF value for points not in the training set X once trained . During inference , a continuous object surface can be explicitly recovered by extracting an arbitrarily number of points with zero SDF values , i.e. , points on the object surface ( Lorensen & Cline , 1987 ) . 3.2 ENVIRONMENT FIELD LEARNING VIA NEURAL IMPLICIT NETWORKS . In this work , we take advantage of the continuity property of implicit neural networks described above and learn a continuous environment field from discretely sampled location and reaching dis- tance pairs . Specifically , we represent the environment field as a mapping from location coordinates x ∈ R2 to its reaching distance u ( x ) ∈ R towards a given goal and learn an implicit neural network fθ ( see Fig . 3 ( a ) ) such that : û ( x ) = fθ ( x ) . ( 1 ) To collect a set of training pairs X : = { x , u ( x ) } , we resort to an analytical method , e.g. , fast marching method ( FMM ) ( Sethian , 1996 ) , that solves u ( x ) for each cell x in a discrete grid . We then train the implicit function fθ to regress the reaching distance u ( x ) computed by the FMM for each cell x ∈ X using the L1 loss function : L ( fθ ( x ) , u ( x ) ) = |fθ ( x ) − u ( x ) | . ( 2 ) Thanks to the continuity of implicit functions , the learned implicit neural network is able to predict the reaching distance even for points outside the training set X , enabling us to query the reaching distance for any location in the scene during inference . 3.3 TRAJECTORY SEARCH USING ENVIRONMENT FIELD Given the learned implicit function in Section 3.2 , we now describe how to search a trajectory from a starting position xs to the goal position xe . Since the learned implicit neural network is continuous , one intuitive solution for navigation is through a gradient descent method ( see Fig . 2 ( c ) ) . We first feed the current location xc of an agent into the learned implicit function . Then , by minimizing the output reaching distance , the agent can be nudged by the gradients ∆xc back-propagated from the implicit function to a new position xc−∆xc , where the reaching distance is smaller , i.e. , closer to the goal . Starting at xs , we repeat the above pro- cess and gradually decrease the reaching distance from the current position to the goal until the agent reaches the goal at xe . The gradient descent method computes the direction at each move based on the function values within an infinitesimal area surrounding the current location , and thus the agent can only take an infinitesimally small step at each move . However , in 2D maze , an agent usually takes a fixed , much larger step , e.g. , one grid cell at each move . Therefore , we constrain that an agent moves by one grid cell along one of 23 = 8 possible directions at each time , as shown in Fig . 2 ( a ) . We then query the learned implicit function for the reaching distance values at all possible positions that the agent can reach in one time step and move the agent to the position with the smallest reaching distance . We keep updating the agent ’ s position until it reaches the goal ( see Fig . 2 ( b ) ) . | The paper proposes modeling reaching distance between any start position and any goal (subject to obstacle avoidance) with a neural network. This is equivalent to parameterizing a traditional path-planning (goal-reaching) continuous value function with the network, which the authors also mention in the introduction section. Different variants of the network are considered, with conditioning on goal (aiming to generalize to different goals) and conditioning on a 2D scene layout (aiming to generalize across different scenes). The network is trained in a supervised manner on data obtained from a traditional search method (fast marching method [1]) that assumes discrete states. The usefulness of the trained value network for navigation and its generalization properties are then experimentally validated in 2D and 3D environments, including an interesting navigation example with two dynamically moving agents in the same scene. | SP:e0e860e28dac58b373db0b14d5c84f7258d2713a |
Learning Continuous Environment Fields via Implicit Functions | 1 INTRODUCTION . Scene understanding aims to analyze and interpret a given environment . The past few years have witnessed tremendous success in scene representation learning for semantic segmentation ( Long et al. , 2015 ; Li et al. , 2017 ) , 3D scene reconstruction ( Sitzmann et al. , 2020 ; 2019 ) , and depth estimation ( Godard et al. , 2019 ) . The learned representations can be used as inputs for training embodied tasks including visual navigation ( Sax et al. , 2018 ; Zhou et al. , 2019 ) and robotic manipulation ( Chen et al. , 2020 ; Yen-Chen et al. , 2020 ) . This overall process falls into a two-step paradigm , which first learns a static scene representation , and then trains an agent to interact with the scene . While this progress is exciting , we ask for exploring an alternative research direction : Can the scene representation itself be dynamically interactive ? That is , instead of training a Reinforcement Learning agent on top of the scene , we encode the dynamic functioning ( i.e. , the ability to control and guide the agent ’ s interactions ) in the scene representation in one-step training . Specifically , we study a representation that guides an embodied agent to navigate inside the scene . We propose a scene representation dubbed as the environment field that encodes the reaching distance – distance from any position to a given goal location along a feasible and plausible trajectory . Such an environment field needs to be continuous and densely covering the entire scene . With this continuous scene representation , given an agent in any locations in the scene , we can perform iterative optimization ( e.g. , gradient descent ) over the continuous field to move the agent to a goal . The optimization objective is to minimize the reaching distance , and the agent reaches a given goal when the reaching distance equals to zero . Compared to search-based algorithms ( Sethian , 1996 ; LaValle , 1998 ; Kavraki et al. , 1996 ) , the proposed environment field enjoys two key advantages : a ) Continuity . Search-based methods ( Sethian , 1996 ) assume a discrete searching space , while the proposed environment field is continuous and can easily generalize to continuous scenes such as a 3D indoor environment . b ) Efficiency . Instead of applying the time-consuming searching algorithm to every new environment or goal position , a single neural network is learned to efficiently produce different environment fields for different scenes or goal positions , with a forward pass . How to learn this continuous environment field ? Naively learning such a dense field in a supervised matter requires ground truth reaching distance annotation at all possible locations in the scene , which are infinitely many and thus impossible to collect . In this paper , we leverage neural implicit functions ( Park et al. , 2019 ; Xu et al. , 2019 ; Sitzmann et al. , 2020 ; Xu et al. , 2019 ; Mescheder et al. , 2019 ) that can learn a continuous field using discretely sampled training data . Specifically , we design an implicit neural network that takes the coordinates of a position in the scene as input and outputs its reaching distance to a given goal location . Even though this implicit neural network is trained using discretely sampled position and reaching distance pairs , yet it produces a dense environment field of a scene . During inference , the reaching distance between any position in the scene and the goal can be efficiently queried via a fast network forward pass and used to navigate an agent towards the goal . We showcase the application of the proposed environment field in both human trajectory modeling in 3D indoor environments as well as agent navigation in 2D mazes and observe comparable if not better results than state-of-the-art methods . Specially , when applying the environment field to human trajectory modeling , we additionally propose and learn an accessible region – plausible regions for humans to appear in the scene via a variational auto-encoder ( VAE ) . This accessible region can be implicitly encoded into the environment field so that it can guide humans to avoid locations that do not conform to common human behaviors ( e.g. , navigate a human to travel around rather than under a desk ) . The main contributions of this work are : • We propose the environment field – a novel scene representation that facilitates direct guid- ance of dynamic agent behaviors in a scene . • We learn dense environment fields via implicit functions using discretely sampled training pairs . • We apply the environment fields to human trajectory prediction in 3D indoor environments and agent navigation in 2D mazes , where both feasible and plausible trajectories can be produced efficiently and accurately . 2 RELATED WORK . Scene representations . Scene understanding aims at parsing and interpreting an environment . Prior approaches learn various scene representations comprising of semantic segmentation ( Long et al. , 2015 ; Li et al. , 2017 ) , depth ( Godard et al. , 2019 ) and meshes ( Sitzmann et al. , 2020 ) . Nevertheless , these representations only capture static scene attributes while the proposed environment field aims to encode the dynamic functioning of a scene . Path planning . Classical path planning algorithms including Breath First Searching ( BFS ) , Dijkstra ’ s algorithm ( Dijkstra , 1959 ) and the Fast Marching Method ( FMM ) ( Sethian , 1996 ; ValeroGomez et al. , 2015 ) require applying the searching algorithm to every new environment or goal position , and hence are not suitable for dynamically changing environments . On the contrary , our environment field generalizes to changing goals and environments during inference and is thus computationally efficient . Instead of solving path planning numerically , sampling-based methods such as Rapidly Exploring Random Tree ( RRT ) ( LaValle , 1998 ; LaValle et al. , 2001 ; Bry & Roy , 2011 ) or Probabilistic Roadmaps ( PRM ) ( Kavraki et al. , 1996 ; 1998 ) grow and search a tree by sampling feasible locations in the scene . However , the efficiency and performance of such methods depend on the sampling density and algorithm . In contrast , we learn a continuous environment field that predicts the next optimal move instantly for any location in the scene . The potential field algorithm manually computes and combines an attractive and repulsive field and is prone to local minimas , while our algorithm learns a single field in a data-driven way . The proposed environment field can also be considered as a value function used in learning-based path planning methods ( Tamar et al. , 2016 ; Campero et al. , 2020 ; Al-Shedivat et al. , 2018 ; Chaplot et al. , 2021 ) . The reaching distance at each location is essentially the reward the agent gets while trying to reach the goal . However , compared to other learning-based path planning algorithms ( Tamar et al. , 2016 ; Campero et al. , 2020 ; Al-Shedivat et al. , 2018 ) , the environment field enjoys two major benefits . First , it produces the environment field for all locations in the scene with a single network forward pass ( in discrete cases such as 2D mazes ) , instead of predicting optimal steps sequentially , which requires multiple network forward passes . Second , it utilizes implicit functions instead of convolution neural networks and is thus more flexible to generalize to continuous scenarios such as human navigation in 3D scenes . Implicit neural representations . Implicit neural representations have recently attracted much attention in computer vision due to their continuity , memory-efficiency , and capacity to capture complex object details . Numerous implicit neural representations have been proposed to reconstruct 3D objects ( Park et al. , 2019 ; Xu et al. , 2019 ; Michalkiewicz et al. , 2019 ; Tulsiani et al. , 2020 ; Mescheder et al. , 2019 ) , scenes ( Sitzmann et al. , 2019 ; Jiang et al. , 2020 ; Peng et al. , 2020 ; Mildenhall et al. , 2020 ) , humans ( Atzmon & Lipman , 2020 ; Saito et al. , 2019 ; 2020 ) or even audio and video signals ( Sitzmann et al. , 2020 ) . Instead of reconstruction , in this work , we use an implicit neural function to encode a continuous environment field and target at agent navigation . A more detailed overview of implicit neural networks can be found in Section 3.1 . Affordance prediction . Affordance prediction models the interactions between humans and objects or scenes ( Koppula & Saxena , 2014 ; Chuang et al. , 2018 ; Zhu et al. , 2014 ; Koppula et al. , 2013 ; Li et al. , 2019 ; Karunratanakul et al. , 2020 ) . One line of work describes static human-scene interactions by generating human poses ( Wang et al. , 2017 ; Li et al. , 2019 ) or human body meshes ( Zhang et al. , 2020b ; a ) given scene images or point clouds . Another line of work ( Cao et al. , 2020 ; Monszpart et al. , 2019 ) models dynamic human-scene interactions by predicting a sequence of future human poses given pose history . The proposed method falls into the second category , where we predict plausible human motion sequences containing different actions ( e.g. , walking and sitting down ) while avoiding collisions in 3D scenes . The proposed approach enjoys two major advantages compared to existing work ( Cao et al. , 2020 ; Monszpart et al. , 2019 ) : a ) Our work does not require any past human motion history as a reference . Once the environment field of a scene is encoded by an implicit function , an agent can be navigated from any position to the goal position . b ) Our work can generate much longer navigation paths than existing work thanks to the learned environment field that covers the entire scene . 3 ENVIRONMENT FIELD . We first introduce the environment field using agent navigation in 2D mazes as a toy example . A real-world application in human trajectory modeling is discussed in Section 4 . 3.1 OVERVIEW OF IMPLICIT NEURAL NETWORKS . Implicit neural networks have been widely used to represent a 3D object or scene as a signed distance function ( SDF ) . The input to an implicit neural network is the coordinates of a 3D point ( x ∈ R3 ) and the output is the signed distance ( s ∈ R ) from this point to the nearest object surface : s = SDF ( x ) , where s > 0 point is inside the object surface and s < 0 when the point is outside the object surface . A desirable property of an implicit neural network is that it learns a continuous surface of an object given discretely sampled training pairs X : = ( x , s ) , i.e. , it is able to predict the SDF value for points not in the training set X once trained . During inference , a continuous object surface can be explicitly recovered by extracting an arbitrarily number of points with zero SDF values , i.e. , points on the object surface ( Lorensen & Cline , 1987 ) . 3.2 ENVIRONMENT FIELD LEARNING VIA NEURAL IMPLICIT NETWORKS . In this work , we take advantage of the continuity property of implicit neural networks described above and learn a continuous environment field from discretely sampled location and reaching dis- tance pairs . Specifically , we represent the environment field as a mapping from location coordinates x ∈ R2 to its reaching distance u ( x ) ∈ R towards a given goal and learn an implicit neural network fθ ( see Fig . 3 ( a ) ) such that : û ( x ) = fθ ( x ) . ( 1 ) To collect a set of training pairs X : = { x , u ( x ) } , we resort to an analytical method , e.g. , fast marching method ( FMM ) ( Sethian , 1996 ) , that solves u ( x ) for each cell x in a discrete grid . We then train the implicit function fθ to regress the reaching distance u ( x ) computed by the FMM for each cell x ∈ X using the L1 loss function : L ( fθ ( x ) , u ( x ) ) = |fθ ( x ) − u ( x ) | . ( 2 ) Thanks to the continuity of implicit functions , the learned implicit neural network is able to predict the reaching distance even for points outside the training set X , enabling us to query the reaching distance for any location in the scene during inference . 3.3 TRAJECTORY SEARCH USING ENVIRONMENT FIELD Given the learned implicit function in Section 3.2 , we now describe how to search a trajectory from a starting position xs to the goal position xe . Since the learned implicit neural network is continuous , one intuitive solution for navigation is through a gradient descent method ( see Fig . 2 ( c ) ) . We first feed the current location xc of an agent into the learned implicit function . Then , by minimizing the output reaching distance , the agent can be nudged by the gradients ∆xc back-propagated from the implicit function to a new position xc−∆xc , where the reaching distance is smaller , i.e. , closer to the goal . Starting at xs , we repeat the above pro- cess and gradually decrease the reaching distance from the current position to the goal until the agent reaches the goal at xe . The gradient descent method computes the direction at each move based on the function values within an infinitesimal area surrounding the current location , and thus the agent can only take an infinitesimally small step at each move . However , in 2D maze , an agent usually takes a fixed , much larger step , e.g. , one grid cell at each move . Therefore , we constrain that an agent moves by one grid cell along one of 23 = 8 possible directions at each time , as shown in Fig . 2 ( a ) . We then query the learned implicit function for the reaching distance values at all possible positions that the agent can reach in one time step and move the agent to the position with the smallest reaching distance . We keep updating the agent ’ s position until it reaches the goal ( see Fig . 2 ( b ) ) . | This work introduces a novel scene representation for agent navigation in 2D and 3D environments. At the core of the method is an implicit neural representation of environment - implicit environment field (IEF) - which is a neural net that maps location coordinates to its reaching distance. Several conditional variants of IEFs are proposed to allow for generalization to novel environments and goal locations. Navigation can the be achieved by gradient descent on the reaching function or a discretized greedy algorithm. Experimental evaluation is conducted on 2D maze navigation and 3D human motion prediction, and indicate that the proposed representation performs favorably to the baselines. | SP:e0e860e28dac58b373db0b14d5c84f7258d2713a |
Exploring unfairness in Integrated Gradients based attribution methods | Numerous methods have attempted to explain and interpret predictions made by machine learning models in terms of their inputs . Known as “ attribution methods ” they notably include the Integrated Gradients method and its variants . These are based upon the theory of Shapley Values , a rigorous method of fair allocation according to mathematical axioms . Integrated Gradients has axioms derived from this heritage with the implication of a similar rigorous , intuitive notion of fairness . We explore the difference between Integrated Gradients and more direct expressions of Shapley Values in deep learning and find Integrated Gradients ’ guarantees of fairness weaker ; in certain conditions it can give wholly unrepresentative results . Integrated Gradients requires a choice of “ baseline ” , a hyperparameter that represents the ‘ zero attribution ’ case . Research has shown that baseline choice critically affects attribution quality , and increasingly effective baselines have been developed . Using purpose-designed scenarios we identify sources of inaccuracy both from specific baselines and inherent to the method itself , sensitive to input distribution and loss landscape . Failure modes are identified for baselines including Zero , Mean , Additive Gaussian Noise , and the state of the art Expected Gradients . We develop a new method , Integrated Certainty Gradients , that we show avoids the failures in these challenging scenarios . By augmenting the input space with “ certainty ” information , and training with random degradation of input features , the model learns to predict with varying amounts of incomplete information , supporting a zero-information case which becomes a natural baseline . We identify the axiomatic origin of unfairness in Integrated Gradients , which has been overlooked in past research . 1 INTRODUCTION . Attribution , the identification of the input features most salient to a model prediction , is an increasingly important requirement for neural networks . It is a core part of model interpretability , which is valuable as a research tool and design aid , but also increasingly as an output requirement in its own right for uses as diverse as medical imaging ( Singh et al. , 2020 ) to loan applications ( Bhatt et al. , 2020 ) . A “ right to explanation ” of machine decisions is even provided in the European Union ’ s General Data Protection Regulation ( Goodman & Flaxman , 2017 ) . Gradients of predictions with respect to model inputs can be calculated using backpropagation and have been used for feature attribution ( “ Vanilla Gradient ” ) ( Erhan et al. , 2009 ; Simonyan et al. , 2014 ; Yosinski et al. , 2015 ) . The gradients indicate which features are most sensitive to a perturbation , causing the largest change in prediction outcome . Empirically , this method often does highlight areas relevant to prediction , but it may also miss important areas due to the nonlinearity of the model and saturation of the gradients ( Sundararajan et al. , 2016 ) . The method of Integrated Gradients ( Sundararajan et al. , 2016 ; 2017 ) overcomes these issues by generating attributions based on the theory of Shapley values ( Sundararajan et al. , 2017 ) . The method integrates the gradients as the input varies linearly between a baseline and the final input of interest : Integrated Gradients ( F , x′ , x , i ) : = ( xi − x′i ) ︸ ︷︷ ︸ distance ∫ 1 α=0 ∂F ( ˙ x ) ∂ ˙ xi ∣∣∣∣ ˙ x = x′ + α ( x− x′ ) dα︸ ︷︷ ︸ mean gradient ( 1 ) where F ( · ) denotes the prediction of the model , x is the input vector of interest , x′ is the baseline input vector , and i indexes to the feature of interest . A numerical approximation is normally used to calculate the integral in practice . The baseline represents a missing or neutral input , a concept required by the Shapley values theory , but shared with several other attribution methods ( Covert et al. , 2020 ) . In the remainder of this paper , we first give an overview of baselines discussed in the literature ( Section 2 ) . Then we discuss the theoretical cause of a failure mode of IG ( attribution transfer ) using a zero baseline example ( Section 3 ) . In Section 4 we introduce a new method , Integrated Certainty Gradients . Finally we show in experiments that other baselines including the state of the art Expected Gradients do not prevent attribution transfer , while in the tested scenarios Integrated Certainty Gradients does , and discuss additional failure cases of specific baselines ( Section 5 ) . Note on notation It will be convenient to imply an equivalence between attribution methods which take a baseline , ϕ ( F , x′ , x , i ) , and those which do not ϕ ( F , x , i ) . A baseline free method can be adapted to take a baseline by ϕB ( F , x′ , x , i ) = ϕ ( F , x , i ) − ϕ ( F , x′ , i ) . 2 CHOICE OF BASELINE . Baseline choice has a major effect on attribution outcome . Effective choice of baselines in practice is a topic of ongoing research . A recent review of four state-of-the-art models for tabular data did not find a best performing choice ( Haug et al. , 2021 ) . As this paper noted , the concept of missingness within an arbitrary space is domain-specific . Therefore applying attribution techniques to a new domain requires this concept to be determined . Another review came to similar conclusions for image classification attribution ( Sturmfels et al. , 2020 ) . Baselines can be generalized from single inputs to distributions by taking the expected value of Integrated Gradients using each input in the distribution . In practice X ′ is often from an empirical ( discrete uniform ) distribution so the expectation becomes simply the mean over X ′ . A summary of common baselines used in Integrated Gradients and other attribution methods follows . For a more comprehensive review , one can refer to Haug et al . ( 2021 ) ; Sturmfels et al . ( 2020 ) . Visualizations of integration paths for various baselines are shown in Figure 1 . Constant value baselines include the uniform black/zero baseline proposed with the original method ( Sundararajan et al. , 2016 ) and choices that attempt to be unbiased with respect to the input distribution , including the component-wise mean of the input distribution , the middle of the input range , and uniform noise . If the input matches the baseline , the xi − x′i term in Equation 1 disappears , any such areas will not be attributed , even when they are essential to the model ’ s prediction ( “ baseline blindness ” ) ( Sturmfels et al. , 2020 ) . When the baseline is constant this undesirable behavior can not be avoided . This behavior can be seen clearly in attributions of MNIST images with a zero baseline , for example in Adebayo et al . ( 2020 ) . Distribution baselines avoid baseline blindness by combining multiple attributions . Uniform noise has been used in this way , although concerns have been identified about the risk of interaction between the baseline and high frequency features ( Sundararajan et al. , 2017 ; Sturmfels et al. , 2020 ) . The recently developed Expected Gradients method ( Erion et al. , 2020 ) uses the input ( typically training ) distribution as the baseline . It computes the attribution for a given input example efficiently by sampling baselines randomly from the training distribution , and interpolation weights from the the [ 0 , 1 ] range ( Monte Carlo integration ) , rather than using the many equally spaced interpolations of the more common Riemann Sum method . Dynamic baselines change based on the attribution input . The maximum distance baseline uses the farthest point in the input space from the input vector ( Sturmfels et al. , 2020 ) . This avoids baseline blindness but abandons the concept of neutrality . Sturmfels et al . ( 2020 ) cite Fong & Vedaldi ( 2017 ) as the inspiration for blurring as a possible method of feature ablation to produce a baseline . Gaussian noise may be added to the input vector during attribution and when averaged over several iterations , the resulting attributions were found to be more detailed and less noisy ( Smilkov et al. , 2017 ) . Adding noise to input vectors during training was also found to give a similar and cumulative effect . The combination of input vector with noise can be used by itself as a dynamic distribution baseline ( Sturmfels et al. , 2020 ) or as an augmentation technique in combination with another baseline . The justification of this method for use with attribution appears to be mainly empirical , and a question regarding the theoretical justification has been raised ( Sturmfels et al. , 2020 ) . 3 ATTRIBUTION FAIRNESS . Assessment of attribution methods is not currently straightforward because there is not yet a unified general procedure to do so . Rather , there are a number of tests for various indicative characteristics ( Hooker et al. , 2019 ; Adebayo et al. , 2018 ; Yang & Kim , 2019 ) . We focus our attention on fairness : whether the relative attributions of input components are reasonable . This is the central concern of Shapley Values , a celebrated method from game theory for allocating value , with a strongly justified mathematical foundation ( Shapley , 1952 ) , and the background to the Integrated Gradients methods ( Sundararajan et al. , 2017 ) . Assessing fairness is not trivial . As a reference we consider two other attribution methods defined using the original Shapley Values procedure : BShap ( Sundararajan & Najmi , 2020 ) and SHAP ( Lundberg & Lee , 2017 ) . Shapley Values is a procedure that , for a given set S , requires a value for every possible subset of elements : v : P ( S ) → R , where P is the power set of S , and gives back values for the elements themselves ( the “ Shapley values ” ) : φsv ( v , e ) . The Shapley values sum to the value of the complete set : v ( S ) = ∑ e∈S φsv ( v , e ) , and certain axioms , widely considered as naturally related to fairness , are maintained . As such it gives a way of sharing the value of the complete set fairly among the elements , based on the values that are achieved by each subset . Model inputs can not typically represent missing components , so to allocate attribution to the components of an input vector using Shapley Values , presence/absence of a component must be replaced by another binary property . In the case of BShap , ‘ present ’ and ‘ absent ’ components are represented with values taken from the equivalent components of the input vector x or a baseline x′ respectively . The value function v is simply the model ’ s prediction F . SHAP represents subsets using random vectors , and the value function v by the expectation of the model ’ s prediction E ◦ F . Each vector has a distribution f ( X|Xi=xi∀i ) where X is the distribution of possible inputs , x is the input being attributed , and i are the ‘ present ’ components of the vector . Further information about Shapley Values and these methods is given is Section A.1 of the supporting material . To summarize the relationships : φsv ( v , e ) v sets elements e S { } ϕBShap ( F , x ′ , x , i ) F vectors components i x x′ ϕSHAP ( F , x , i ) E ◦ F random vectors components i a = x a ∼ X | This paper explores the characteristics of the method, Integrated Gradients, as an attribution method, that has been proposed to explain black box models. “Baselines” in analyzing integrated gradients are discussed and the shortcomings of integrated gradients are further evaluated. The paper then proposes Integrated Certainty Gradients and shows its application on data. | SP:fd78538153f7e878193f7c975baf7e43baca1a70 |
Exploring unfairness in Integrated Gradients based attribution methods | Numerous methods have attempted to explain and interpret predictions made by machine learning models in terms of their inputs . Known as “ attribution methods ” they notably include the Integrated Gradients method and its variants . These are based upon the theory of Shapley Values , a rigorous method of fair allocation according to mathematical axioms . Integrated Gradients has axioms derived from this heritage with the implication of a similar rigorous , intuitive notion of fairness . We explore the difference between Integrated Gradients and more direct expressions of Shapley Values in deep learning and find Integrated Gradients ’ guarantees of fairness weaker ; in certain conditions it can give wholly unrepresentative results . Integrated Gradients requires a choice of “ baseline ” , a hyperparameter that represents the ‘ zero attribution ’ case . Research has shown that baseline choice critically affects attribution quality , and increasingly effective baselines have been developed . Using purpose-designed scenarios we identify sources of inaccuracy both from specific baselines and inherent to the method itself , sensitive to input distribution and loss landscape . Failure modes are identified for baselines including Zero , Mean , Additive Gaussian Noise , and the state of the art Expected Gradients . We develop a new method , Integrated Certainty Gradients , that we show avoids the failures in these challenging scenarios . By augmenting the input space with “ certainty ” information , and training with random degradation of input features , the model learns to predict with varying amounts of incomplete information , supporting a zero-information case which becomes a natural baseline . We identify the axiomatic origin of unfairness in Integrated Gradients , which has been overlooked in past research . 1 INTRODUCTION . Attribution , the identification of the input features most salient to a model prediction , is an increasingly important requirement for neural networks . It is a core part of model interpretability , which is valuable as a research tool and design aid , but also increasingly as an output requirement in its own right for uses as diverse as medical imaging ( Singh et al. , 2020 ) to loan applications ( Bhatt et al. , 2020 ) . A “ right to explanation ” of machine decisions is even provided in the European Union ’ s General Data Protection Regulation ( Goodman & Flaxman , 2017 ) . Gradients of predictions with respect to model inputs can be calculated using backpropagation and have been used for feature attribution ( “ Vanilla Gradient ” ) ( Erhan et al. , 2009 ; Simonyan et al. , 2014 ; Yosinski et al. , 2015 ) . The gradients indicate which features are most sensitive to a perturbation , causing the largest change in prediction outcome . Empirically , this method often does highlight areas relevant to prediction , but it may also miss important areas due to the nonlinearity of the model and saturation of the gradients ( Sundararajan et al. , 2016 ) . The method of Integrated Gradients ( Sundararajan et al. , 2016 ; 2017 ) overcomes these issues by generating attributions based on the theory of Shapley values ( Sundararajan et al. , 2017 ) . The method integrates the gradients as the input varies linearly between a baseline and the final input of interest : Integrated Gradients ( F , x′ , x , i ) : = ( xi − x′i ) ︸ ︷︷ ︸ distance ∫ 1 α=0 ∂F ( ˙ x ) ∂ ˙ xi ∣∣∣∣ ˙ x = x′ + α ( x− x′ ) dα︸ ︷︷ ︸ mean gradient ( 1 ) where F ( · ) denotes the prediction of the model , x is the input vector of interest , x′ is the baseline input vector , and i indexes to the feature of interest . A numerical approximation is normally used to calculate the integral in practice . The baseline represents a missing or neutral input , a concept required by the Shapley values theory , but shared with several other attribution methods ( Covert et al. , 2020 ) . In the remainder of this paper , we first give an overview of baselines discussed in the literature ( Section 2 ) . Then we discuss the theoretical cause of a failure mode of IG ( attribution transfer ) using a zero baseline example ( Section 3 ) . In Section 4 we introduce a new method , Integrated Certainty Gradients . Finally we show in experiments that other baselines including the state of the art Expected Gradients do not prevent attribution transfer , while in the tested scenarios Integrated Certainty Gradients does , and discuss additional failure cases of specific baselines ( Section 5 ) . Note on notation It will be convenient to imply an equivalence between attribution methods which take a baseline , ϕ ( F , x′ , x , i ) , and those which do not ϕ ( F , x , i ) . A baseline free method can be adapted to take a baseline by ϕB ( F , x′ , x , i ) = ϕ ( F , x , i ) − ϕ ( F , x′ , i ) . 2 CHOICE OF BASELINE . Baseline choice has a major effect on attribution outcome . Effective choice of baselines in practice is a topic of ongoing research . A recent review of four state-of-the-art models for tabular data did not find a best performing choice ( Haug et al. , 2021 ) . As this paper noted , the concept of missingness within an arbitrary space is domain-specific . Therefore applying attribution techniques to a new domain requires this concept to be determined . Another review came to similar conclusions for image classification attribution ( Sturmfels et al. , 2020 ) . Baselines can be generalized from single inputs to distributions by taking the expected value of Integrated Gradients using each input in the distribution . In practice X ′ is often from an empirical ( discrete uniform ) distribution so the expectation becomes simply the mean over X ′ . A summary of common baselines used in Integrated Gradients and other attribution methods follows . For a more comprehensive review , one can refer to Haug et al . ( 2021 ) ; Sturmfels et al . ( 2020 ) . Visualizations of integration paths for various baselines are shown in Figure 1 . Constant value baselines include the uniform black/zero baseline proposed with the original method ( Sundararajan et al. , 2016 ) and choices that attempt to be unbiased with respect to the input distribution , including the component-wise mean of the input distribution , the middle of the input range , and uniform noise . If the input matches the baseline , the xi − x′i term in Equation 1 disappears , any such areas will not be attributed , even when they are essential to the model ’ s prediction ( “ baseline blindness ” ) ( Sturmfels et al. , 2020 ) . When the baseline is constant this undesirable behavior can not be avoided . This behavior can be seen clearly in attributions of MNIST images with a zero baseline , for example in Adebayo et al . ( 2020 ) . Distribution baselines avoid baseline blindness by combining multiple attributions . Uniform noise has been used in this way , although concerns have been identified about the risk of interaction between the baseline and high frequency features ( Sundararajan et al. , 2017 ; Sturmfels et al. , 2020 ) . The recently developed Expected Gradients method ( Erion et al. , 2020 ) uses the input ( typically training ) distribution as the baseline . It computes the attribution for a given input example efficiently by sampling baselines randomly from the training distribution , and interpolation weights from the the [ 0 , 1 ] range ( Monte Carlo integration ) , rather than using the many equally spaced interpolations of the more common Riemann Sum method . Dynamic baselines change based on the attribution input . The maximum distance baseline uses the farthest point in the input space from the input vector ( Sturmfels et al. , 2020 ) . This avoids baseline blindness but abandons the concept of neutrality . Sturmfels et al . ( 2020 ) cite Fong & Vedaldi ( 2017 ) as the inspiration for blurring as a possible method of feature ablation to produce a baseline . Gaussian noise may be added to the input vector during attribution and when averaged over several iterations , the resulting attributions were found to be more detailed and less noisy ( Smilkov et al. , 2017 ) . Adding noise to input vectors during training was also found to give a similar and cumulative effect . The combination of input vector with noise can be used by itself as a dynamic distribution baseline ( Sturmfels et al. , 2020 ) or as an augmentation technique in combination with another baseline . The justification of this method for use with attribution appears to be mainly empirical , and a question regarding the theoretical justification has been raised ( Sturmfels et al. , 2020 ) . 3 ATTRIBUTION FAIRNESS . Assessment of attribution methods is not currently straightforward because there is not yet a unified general procedure to do so . Rather , there are a number of tests for various indicative characteristics ( Hooker et al. , 2019 ; Adebayo et al. , 2018 ; Yang & Kim , 2019 ) . We focus our attention on fairness : whether the relative attributions of input components are reasonable . This is the central concern of Shapley Values , a celebrated method from game theory for allocating value , with a strongly justified mathematical foundation ( Shapley , 1952 ) , and the background to the Integrated Gradients methods ( Sundararajan et al. , 2017 ) . Assessing fairness is not trivial . As a reference we consider two other attribution methods defined using the original Shapley Values procedure : BShap ( Sundararajan & Najmi , 2020 ) and SHAP ( Lundberg & Lee , 2017 ) . Shapley Values is a procedure that , for a given set S , requires a value for every possible subset of elements : v : P ( S ) → R , where P is the power set of S , and gives back values for the elements themselves ( the “ Shapley values ” ) : φsv ( v , e ) . The Shapley values sum to the value of the complete set : v ( S ) = ∑ e∈S φsv ( v , e ) , and certain axioms , widely considered as naturally related to fairness , are maintained . As such it gives a way of sharing the value of the complete set fairly among the elements , based on the values that are achieved by each subset . Model inputs can not typically represent missing components , so to allocate attribution to the components of an input vector using Shapley Values , presence/absence of a component must be replaced by another binary property . In the case of BShap , ‘ present ’ and ‘ absent ’ components are represented with values taken from the equivalent components of the input vector x or a baseline x′ respectively . The value function v is simply the model ’ s prediction F . SHAP represents subsets using random vectors , and the value function v by the expectation of the model ’ s prediction E ◦ F . Each vector has a distribution f ( X|Xi=xi∀i ) where X is the distribution of possible inputs , x is the input being attributed , and i are the ‘ present ’ components of the vector . Further information about Shapley Values and these methods is given is Section A.1 of the supporting material . To summarize the relationships : φsv ( v , e ) v sets elements e S { } ϕBShap ( F , x ′ , x , i ) F vectors components i x x′ ϕSHAP ( F , x , i ) E ◦ F random vectors components i a = x a ∼ X | In this paper, the authors analyze the fairness of Integrated Gradient-based attribution methods. They exploit SHAP and BShap, two approaches based on the theory of Shapley Values, as the reference of "fair" methods. Specifically, they present an "attribution transfer" phenomenon in which the Integrated Gradients are affected by some sharply fluctuated area across the integration path, thereby deviating from the ''fair'' attribution methods. To avoid the attribution transfer issue, they further propose Integrated Certainty Gradients method, where the integration path does not pass through the original fluctuated input space. Such an objective can be achieved by training the network with perturbed inputs and corresponding certainty maps. Finally, the gradients integral can be calculated by querying the trained network with fixed inputs and varying certainty. Various purpose-designed experiments are performed to demonstrate the advantages of ICG in avoiding attribution transfer. | SP:fd78538153f7e878193f7c975baf7e43baca1a70 |
Missingness Bias in Model Debugging | 1 INTRODUCTION . Model debugging aims to diagnose a model ’ s failures . For example , researchers can identify global biases of models via the extraction of human-aligned concepts ( Bau et al. , 2017 ; Wong et al. , 2021 ) , or understand the texture bias by analyzing the models performance on synthetic datasets ( Geirhos et al. , 2019 ; Leclerc et al. , 2021 ) . Other approaches aim to highlight local features to debug individual model predictions ( Simonyan et al. , 2013 ; Dhurandhar et al. , 2018 ; Ribeiro et al. , 2016a ; Goyal et al. , 2019 ) . A common theme in these methods is to compare the behavior of the model with and without certain individual features ( Ribeiro et al. , 2016a ; Goyal et al. , 2019 ; Fong & Vedaldi , 2017 ; Dabkowski & Gal , 2017 ; Zintgraf et al. , 2017 ; Dhurandhar et al. , 2018 ; Chang et al. , 2019 ) . For example , interpretability methods such as LIME ( Ribeiro et al. , 2016b ) and integrated gradients ( Sundararajan et al. , 2017 ) use the predictions when certain features are removed from the input to attribute different regions of the input to the decision of the model . Dhurandhar et al . ( 2018 ) find minimal regions in radiology images that are necessary for classifying a person as having autism . Fong & Vedaldi ( 2017 ) propose learning image masks that minimize a class score to achieve interpretable explanations . Similarly , in natural language processing , model designers often remove individual words to understand their importance to the output ( Mardaoui & Garreau , 2021 ; Li et al. , 2016 ) . The absence of features from an input , a concept sometimes referred to as missingness ( Sturmfels et al. , 2020 ) , is thus fundamental to many debugging tools . However , there is a problem : while we can easily remove words from sentences , removing objects from images is not as straightforward . Indeed , removing a feature from an image usually requires approximating missingness by replacing those pixel values with something else , e.g. , black color . However , these approximations tend to not be perfect ( Sturmfels et al. , 2020 ) . Our goal is thus to give a holistic understanding of missingness and , specifically , to answer the question : How do missingness approximations affect our ability to debug ML models ? OUR CONTRIBUTIONS . In this paper , we investigate how current missingness approximations , such as blacking out pixels , can result in what we call missingness bias . This bias turns out to hinder our ability to debug models . We then show how transformer-based architectures can enable a more natural implementation of missingness , allowing us to side-step this bias . More specifically , our contributions include : Pinpointing the missingness bias . We demonstrate at multiple granularities how simple approximations , such as blacking out pixels , can lead to missingness bias . This bias skews the overall output distribution toward unrelated classes , disrupts individual predictions , and hinders the model ’ s use of the remaining ( unmasked ) parts of the image . Studying the impact of missingness bias on model debugging . We show that missingness bias negatively impacts the performance of debugging tools . Using LIME—a common feature attribution method that relies on missingness—as a case study , we find that this bias causes the corresponding explanations to be inconsistent and indistinguishable from random explanations . Using vision transformers to implement a more natural form of missingness . The tokencentric nature of vision transformers ( ViT ) ( Dosovitskiy et al. , 2021 ) facilitates a more natural implementation of missingness : simply drop the corresponding tokens of the image subregion we want to remove . We show that this simple property substantially mitigates missingness bias and thus enables better model debugging . 2 MISSINGNESS . Removing features from the input is an intuitive way to understand how a system behaves ( Sturmfels et al. , 2020 ) . Indeed , by comparing the system ’ s output with and without specific features , we can infer what parts of the input led to a specific outcome ( Sundararajan et al. , 2017 ) —see Figure 1 . The absence of features from an input is sometimes referred to as missingness ( Sturmfels et al. , 2020 ) . The concept of missingness is commonly leveraged in machine learning , especially for tasks such as model debugging . For example , several methods for feature attribution quantify feature importance by studying how the model behaves when those features are removed ( Sturmfels et al. , 2020 ; Sundararajan et al. , 2017 ; Ancona et al. , 2017 ) . One commonly used method , LIME ( Ribeiro et al. , 2016a ) , iteratively turns image subregions on and off in order to highlight its important parts . Similarly , integrated gradients ( Sundararajan et al. , 2017 ) , a typical method for generating saliency maps , leverages a “ baseline image ” to represent the “ absence ” of features in the input . Missingness-based tools are also often used in domains such as natural language processing ( Mardaoui & Garreau , 2021 ; Li et al. , 2016 ) and radiology ( Dhurandhar et al. , 2018 ) . Challenges of approximating missingness in computer vision . While ignoring parts of an image is simple for humans , removing image features is far more challenging for computer vision models ( Sturmfels et al. , 2020 ) . After all , convolutional networks require a structurally contiguous image as an input . We thus can not leave a “ hole '' in the image where the model should ignore the input . Consequently , practitioners typically resort to approximating missingness by replacing these pixels with other , intended to be “ meaningless ” , pixels . Common missingness approximations include replacing the region of the image with black color , a random color , random noise , a blurred version of the region , and so forth ( Sturmfels et al. , 2020 ; Ancona et al. , 2017 ; Smilkov et al. , 2017 ; Fong & Vedaldi , 2017 ; Zeiler & Fergus , 2014 ; Sundararajan et al. , 2017 ) . However , there is no clear justification for why any of these choices is a good approximation of missingness . For example , blacked out pixels are an especially popular baseline , motivated by the implicit heuristic that near zero inputs are somehow neutral for a simple model ( Ancona et al. , 2017 ) . However , if only part of the input is masked or the model includes additive bias terms , the choice of black is still quite arbitrary . In ( Sturmfels et al. , 2020 ) , the authors found that saliency maps generated with integrated gradients are quite sensitive to the chosen baseline color , and thus can change significantly based on the ( arbitrary ) choice of missingness approximation . 2.1 MISSINGNESS BIAS . What impact do these various missingness approximations have on our models ? We find that current approximations can cause significant bias in the model ’ s predictions . This causes the model to make errors based on the “ missing ” regions rather than the remaining image features , rendering the masked image out-of-distribution . Figure 2 depicts an example of these problems . If we mask a small portion of the image , irrespective of which part of the image that is , convolutional networks ( CNNs ) output the wrong class . In fact , CNNs seem to be relying on the masking pattern to make the prediction , rather than the remaining ( unmasked ) portions of the image . This type of behavior can be especially problematic for model debugging techniques , such as LIME , that rely on removing image subregions to assign importance to input features . Further examples can be found in Appendix C.1 . There seems to be an inherent bias accompanying missingness approximations , which we refer to as the missingness bias . In Section 3 , we systematically study how missingness bias can affect model predictions at multiple granularities . Then in Section 4 , we find that missingness bias can cause undesirable effects when using LIME by causing its explanations to be inconsistent and indistinguishable from random explanations . 2.2 A MORE NATURAL FORM OF MISSINGNESS VIA VISION TRANSFORMERS . The challenges of missingness bias raises an important question : what constitutes a correct notion of missingness ? Since masking pixels creates biases in our predictions , we would ideally like to remove those regions from consideration entirely . Because convolutional networks slide filters across the image , they require spatially contiguous input images . We are thus limited to replacing pixels with some baseline value ( such as blacking out the pixels ) , which leads to missingness bias . Unlike CNNs , vision transformers ( ViTs ) ( Dosovitskiy et al. , 2021 ) operate on sets of image tokens , each of which correspond to a positionally encoded region of the image . ViTs thus enable a far more natural implementation of missingness : simply drop the tokens that correspond to the regions of the image we want to “ remove. ” Instead of replacing the masked region with other pixel values , we can modify a forward pass of the ViT to directly remove the region entirely . We will refer to this implementation of missingness as dropping tokens throughout the paper ( see Appendix B for further details ) . As we will see , using ViTs to drop image subregions will allow us to side-step missingness bias , and thus enable better model debugging . 3 THE IMPACTS OF MISSINGNESS BIAS . Section 2.1 featured several qualitative examples where missingness approximations affect the model ’ s predictions . Can we get a precise grasp on the impacts of such missingness bias ? In this section , we pinpoint how missingness bias can manifest at several levels of granularity . We further demonstrate how , by enabling a more natural implementation of missingness through dropping tokens , ViTs can avoid these biases . To systematically measure the impacts of missingness bias , we iteratively remove subregions from the input and analyze the types of mistakes that our models make 1 . Our assessment of missingness bias , from the overall class distribution to individual examples , is guided by the following questions : To what extent do missingness approximations skew the model ’ s overall class distribution ? . We find that missingness bias affects the model ’ s overall class distribution ( i.e the probability of predicting any one class ) . In Figure 3 , we measure the shift in the model ’ s output class distribution before and after image subregions are randomly removed . The overall entropy of output class distribution degrades severely . In contrast , this bias is eliminated when dropping tokens with the ViT . The ViT thus maintains a high class entropy corresponding to a roughly uniform class distribution . These findings hold regardless of what order we remove the image patches ( see Appendix C.2 ) . Does removing random or unimportant regions flip the model ’ s predictions ? We now take closer look at how missingness approximations can affect individual predictions . In Figure 4 , we plot the fraction of examples where removing a portion of the image flips the model ’ s prediction . We find that the ResNet rapidly flips its predictions even when the less relevant regions are removed first . This degradation is thus more likely due to missingness bias rather than the removal of individual 1See Appendix A for experimental details . We perform an extensive study across various missingness approximations , architectures , and subregion sizes . Here we present the findings on a single representative setting : removing 16 × 16 patches from an image through blacking out ( ResNet-50 ) and dropping tokens ( ViTS ) . We defer the remaining experiments , which lead to similar conclusions , to Appendix C. We further consider other datasets in Appendix E regions . In contrast , the ViT maintains its original predictions even when large parts of the image are removed . Do remaining unmasked regions produce reasonable predictions ? When removing regions of the image with missingness , we would hope that the model makes a “ best-effort ” prediction given the remaining image features . This assumption is critical for interpretability methods such as LIME ( Ribeiro et al. , 2016a ) , where crucial features are identified by iteratively masking out image subregions and tracking the model ’ s predictions . Are our models actually using the remaining uncovered features after missingness approximations are applied though ? To answer this question , we measure how semantically related the model ’ s predictions are after masking compared to its original prediction using a similarity metric on the WordNet Hierarchy ( Miller , 1995 ) as shown in Figure 6 . By the time we mask out 25 % of the image , the predictions of the ResNet largely become irrelevant to the input . ViTs on the other hand continue to predict classes that are related to the original prediction . This indicates that ViTs successfully leverage the remaining features in the image to provide a reasonable prediction . Can we remove missingness bias by augmenting with missingness approximations ? One way to remove missingness bias could be to apply missingness approximations during training . For example , in RemOve and Retrain ( ROAR ) , Hooker et al . ( 2018 ) suggest retraining multiple copies of the model by randomly blacking out pixels during training ( see Appendix F for an overview on ROAR ) . To check if this indeed helps side-step the missingness bias , we retrain our models by randomly removing 50 % of the patches during training , and again measure the fraction of examples where removing image patches flips the model ’ s prediction ( see Figure 5 ) . While there is a significant gap in behavior between the standard and retrained CNNs , the ViT behaves largely the same . This result indicates that , while retraining is important when analyzing CNNs , it is unnecessary for ViTs when dropping the removed tokens : we can instead perform missingness approximations directly on the original model while avoiding missingness bias for free . See Appendix F for more details . | The authors focus on the problem of model debugging (for image recognition). They identify that the proposed tools (that rely on CNNs and ResNets) might suffer from the ‘missingness’ issue, i.e., the absence of features due to masking objects of interest. The authors exhibit how the method of masking pixels/patches can lead to the missingness bias and this can happen even if the masked values are replaced with some other 'dummy' values. To mitigate that, they propose to use a recent transformer since it does not use convolutions, but linearized patches as inputs. Then, they demonstrate that the proposed method can simply 'skip' those patches that are masked and it does not result in a skewed result. | SP:ea3b33a6e4cb41f8a77e08f7e72bcf9ea56bec71 |
Missingness Bias in Model Debugging | 1 INTRODUCTION . Model debugging aims to diagnose a model ’ s failures . For example , researchers can identify global biases of models via the extraction of human-aligned concepts ( Bau et al. , 2017 ; Wong et al. , 2021 ) , or understand the texture bias by analyzing the models performance on synthetic datasets ( Geirhos et al. , 2019 ; Leclerc et al. , 2021 ) . Other approaches aim to highlight local features to debug individual model predictions ( Simonyan et al. , 2013 ; Dhurandhar et al. , 2018 ; Ribeiro et al. , 2016a ; Goyal et al. , 2019 ) . A common theme in these methods is to compare the behavior of the model with and without certain individual features ( Ribeiro et al. , 2016a ; Goyal et al. , 2019 ; Fong & Vedaldi , 2017 ; Dabkowski & Gal , 2017 ; Zintgraf et al. , 2017 ; Dhurandhar et al. , 2018 ; Chang et al. , 2019 ) . For example , interpretability methods such as LIME ( Ribeiro et al. , 2016b ) and integrated gradients ( Sundararajan et al. , 2017 ) use the predictions when certain features are removed from the input to attribute different regions of the input to the decision of the model . Dhurandhar et al . ( 2018 ) find minimal regions in radiology images that are necessary for classifying a person as having autism . Fong & Vedaldi ( 2017 ) propose learning image masks that minimize a class score to achieve interpretable explanations . Similarly , in natural language processing , model designers often remove individual words to understand their importance to the output ( Mardaoui & Garreau , 2021 ; Li et al. , 2016 ) . The absence of features from an input , a concept sometimes referred to as missingness ( Sturmfels et al. , 2020 ) , is thus fundamental to many debugging tools . However , there is a problem : while we can easily remove words from sentences , removing objects from images is not as straightforward . Indeed , removing a feature from an image usually requires approximating missingness by replacing those pixel values with something else , e.g. , black color . However , these approximations tend to not be perfect ( Sturmfels et al. , 2020 ) . Our goal is thus to give a holistic understanding of missingness and , specifically , to answer the question : How do missingness approximations affect our ability to debug ML models ? OUR CONTRIBUTIONS . In this paper , we investigate how current missingness approximations , such as blacking out pixels , can result in what we call missingness bias . This bias turns out to hinder our ability to debug models . We then show how transformer-based architectures can enable a more natural implementation of missingness , allowing us to side-step this bias . More specifically , our contributions include : Pinpointing the missingness bias . We demonstrate at multiple granularities how simple approximations , such as blacking out pixels , can lead to missingness bias . This bias skews the overall output distribution toward unrelated classes , disrupts individual predictions , and hinders the model ’ s use of the remaining ( unmasked ) parts of the image . Studying the impact of missingness bias on model debugging . We show that missingness bias negatively impacts the performance of debugging tools . Using LIME—a common feature attribution method that relies on missingness—as a case study , we find that this bias causes the corresponding explanations to be inconsistent and indistinguishable from random explanations . Using vision transformers to implement a more natural form of missingness . The tokencentric nature of vision transformers ( ViT ) ( Dosovitskiy et al. , 2021 ) facilitates a more natural implementation of missingness : simply drop the corresponding tokens of the image subregion we want to remove . We show that this simple property substantially mitigates missingness bias and thus enables better model debugging . 2 MISSINGNESS . Removing features from the input is an intuitive way to understand how a system behaves ( Sturmfels et al. , 2020 ) . Indeed , by comparing the system ’ s output with and without specific features , we can infer what parts of the input led to a specific outcome ( Sundararajan et al. , 2017 ) —see Figure 1 . The absence of features from an input is sometimes referred to as missingness ( Sturmfels et al. , 2020 ) . The concept of missingness is commonly leveraged in machine learning , especially for tasks such as model debugging . For example , several methods for feature attribution quantify feature importance by studying how the model behaves when those features are removed ( Sturmfels et al. , 2020 ; Sundararajan et al. , 2017 ; Ancona et al. , 2017 ) . One commonly used method , LIME ( Ribeiro et al. , 2016a ) , iteratively turns image subregions on and off in order to highlight its important parts . Similarly , integrated gradients ( Sundararajan et al. , 2017 ) , a typical method for generating saliency maps , leverages a “ baseline image ” to represent the “ absence ” of features in the input . Missingness-based tools are also often used in domains such as natural language processing ( Mardaoui & Garreau , 2021 ; Li et al. , 2016 ) and radiology ( Dhurandhar et al. , 2018 ) . Challenges of approximating missingness in computer vision . While ignoring parts of an image is simple for humans , removing image features is far more challenging for computer vision models ( Sturmfels et al. , 2020 ) . After all , convolutional networks require a structurally contiguous image as an input . We thus can not leave a “ hole '' in the image where the model should ignore the input . Consequently , practitioners typically resort to approximating missingness by replacing these pixels with other , intended to be “ meaningless ” , pixels . Common missingness approximations include replacing the region of the image with black color , a random color , random noise , a blurred version of the region , and so forth ( Sturmfels et al. , 2020 ; Ancona et al. , 2017 ; Smilkov et al. , 2017 ; Fong & Vedaldi , 2017 ; Zeiler & Fergus , 2014 ; Sundararajan et al. , 2017 ) . However , there is no clear justification for why any of these choices is a good approximation of missingness . For example , blacked out pixels are an especially popular baseline , motivated by the implicit heuristic that near zero inputs are somehow neutral for a simple model ( Ancona et al. , 2017 ) . However , if only part of the input is masked or the model includes additive bias terms , the choice of black is still quite arbitrary . In ( Sturmfels et al. , 2020 ) , the authors found that saliency maps generated with integrated gradients are quite sensitive to the chosen baseline color , and thus can change significantly based on the ( arbitrary ) choice of missingness approximation . 2.1 MISSINGNESS BIAS . What impact do these various missingness approximations have on our models ? We find that current approximations can cause significant bias in the model ’ s predictions . This causes the model to make errors based on the “ missing ” regions rather than the remaining image features , rendering the masked image out-of-distribution . Figure 2 depicts an example of these problems . If we mask a small portion of the image , irrespective of which part of the image that is , convolutional networks ( CNNs ) output the wrong class . In fact , CNNs seem to be relying on the masking pattern to make the prediction , rather than the remaining ( unmasked ) portions of the image . This type of behavior can be especially problematic for model debugging techniques , such as LIME , that rely on removing image subregions to assign importance to input features . Further examples can be found in Appendix C.1 . There seems to be an inherent bias accompanying missingness approximations , which we refer to as the missingness bias . In Section 3 , we systematically study how missingness bias can affect model predictions at multiple granularities . Then in Section 4 , we find that missingness bias can cause undesirable effects when using LIME by causing its explanations to be inconsistent and indistinguishable from random explanations . 2.2 A MORE NATURAL FORM OF MISSINGNESS VIA VISION TRANSFORMERS . The challenges of missingness bias raises an important question : what constitutes a correct notion of missingness ? Since masking pixels creates biases in our predictions , we would ideally like to remove those regions from consideration entirely . Because convolutional networks slide filters across the image , they require spatially contiguous input images . We are thus limited to replacing pixels with some baseline value ( such as blacking out the pixels ) , which leads to missingness bias . Unlike CNNs , vision transformers ( ViTs ) ( Dosovitskiy et al. , 2021 ) operate on sets of image tokens , each of which correspond to a positionally encoded region of the image . ViTs thus enable a far more natural implementation of missingness : simply drop the tokens that correspond to the regions of the image we want to “ remove. ” Instead of replacing the masked region with other pixel values , we can modify a forward pass of the ViT to directly remove the region entirely . We will refer to this implementation of missingness as dropping tokens throughout the paper ( see Appendix B for further details ) . As we will see , using ViTs to drop image subregions will allow us to side-step missingness bias , and thus enable better model debugging . 3 THE IMPACTS OF MISSINGNESS BIAS . Section 2.1 featured several qualitative examples where missingness approximations affect the model ’ s predictions . Can we get a precise grasp on the impacts of such missingness bias ? In this section , we pinpoint how missingness bias can manifest at several levels of granularity . We further demonstrate how , by enabling a more natural implementation of missingness through dropping tokens , ViTs can avoid these biases . To systematically measure the impacts of missingness bias , we iteratively remove subregions from the input and analyze the types of mistakes that our models make 1 . Our assessment of missingness bias , from the overall class distribution to individual examples , is guided by the following questions : To what extent do missingness approximations skew the model ’ s overall class distribution ? . We find that missingness bias affects the model ’ s overall class distribution ( i.e the probability of predicting any one class ) . In Figure 3 , we measure the shift in the model ’ s output class distribution before and after image subregions are randomly removed . The overall entropy of output class distribution degrades severely . In contrast , this bias is eliminated when dropping tokens with the ViT . The ViT thus maintains a high class entropy corresponding to a roughly uniform class distribution . These findings hold regardless of what order we remove the image patches ( see Appendix C.2 ) . Does removing random or unimportant regions flip the model ’ s predictions ? We now take closer look at how missingness approximations can affect individual predictions . In Figure 4 , we plot the fraction of examples where removing a portion of the image flips the model ’ s prediction . We find that the ResNet rapidly flips its predictions even when the less relevant regions are removed first . This degradation is thus more likely due to missingness bias rather than the removal of individual 1See Appendix A for experimental details . We perform an extensive study across various missingness approximations , architectures , and subregion sizes . Here we present the findings on a single representative setting : removing 16 × 16 patches from an image through blacking out ( ResNet-50 ) and dropping tokens ( ViTS ) . We defer the remaining experiments , which lead to similar conclusions , to Appendix C. We further consider other datasets in Appendix E regions . In contrast , the ViT maintains its original predictions even when large parts of the image are removed . Do remaining unmasked regions produce reasonable predictions ? When removing regions of the image with missingness , we would hope that the model makes a “ best-effort ” prediction given the remaining image features . This assumption is critical for interpretability methods such as LIME ( Ribeiro et al. , 2016a ) , where crucial features are identified by iteratively masking out image subregions and tracking the model ’ s predictions . Are our models actually using the remaining uncovered features after missingness approximations are applied though ? To answer this question , we measure how semantically related the model ’ s predictions are after masking compared to its original prediction using a similarity metric on the WordNet Hierarchy ( Miller , 1995 ) as shown in Figure 6 . By the time we mask out 25 % of the image , the predictions of the ResNet largely become irrelevant to the input . ViTs on the other hand continue to predict classes that are related to the original prediction . This indicates that ViTs successfully leverage the remaining features in the image to provide a reasonable prediction . Can we remove missingness bias by augmenting with missingness approximations ? One way to remove missingness bias could be to apply missingness approximations during training . For example , in RemOve and Retrain ( ROAR ) , Hooker et al . ( 2018 ) suggest retraining multiple copies of the model by randomly blacking out pixels during training ( see Appendix F for an overview on ROAR ) . To check if this indeed helps side-step the missingness bias , we retrain our models by randomly removing 50 % of the patches during training , and again measure the fraction of examples where removing image patches flips the model ’ s prediction ( see Figure 5 ) . While there is a significant gap in behavior between the standard and retrained CNNs , the ViT behaves largely the same . This result indicates that , while retraining is important when analyzing CNNs , it is unnecessary for ViTs when dropping the removed tokens : we can instead perform missingness approximations directly on the original model while avoiding missingness bias for free . See Appendix F for more details . | The paper discusses that it is common in Computer Vision debugging and explainability techniques to remove image regions to attribute different regions of the image to the decision of a classification model. Although such removal (of words) can be beneficial for Natural Language model debugging, it adds an additional bias in Computer Vision. This is because removing regions implies replacing the corresponding pixels with some baseline values e.g., black color, random intensities, average pixel values etc. The paper shows that irrespective of which part of the region is being masked (i.e., removing original image pixel values and replacing with baseline values), masking small portions of image can lead to CNNs predicting incorrectly and unreliably. The authors show that the CNN based classifiers seem to rely on the “masking pattern” to make the prediction, rather than the remaining (unmasked) portions of the image. In fact, even after removing some image regions randomly, the output distribution gets highly skewed towards a few classes e.g., crossword, jigsaw puzzle etc. Using LIME as a case study, it shows that missingness bias can lead to inconsistent and indistinguishable explanations. Moreover, this bias can be overcome if the model is trained with suitable augmentations that remove regions while training. The paper illustrates how using Visual Image Transformers is a better natural choice as these models allow actual removal of image regions rather than replacement with baseline values. Hence, these issues seen in CNNs due to missingness bias is not prevalent in ViTs. | SP:ea3b33a6e4cb41f8a77e08f7e72bcf9ea56bec71 |
Predicting Physics in Mesh-reduced Space with Temporal Attention | 1 INTRODUCTION . There has been an increasing interest in many scientific disciplines , from computational fluid dynamics [ 3 , 39 ] over graphics [ 42 , 40 ] to quantum mechanics [ 20 , 1 ] , to accelerate numerical simulation using learned models . In particular , methods based on Graph Neural Networks ( GNN ) have shown to be powerful and flexible . These methods can directly work with unstructured simulation meshes , simulate systems with complex domain boundaries , and adaptively allocate computation to the spatial regions where it is needed [ 7 , 38 , 34 , 51 ] . Most models for complex physics prediction tasks , in particular those on unstructured meshes , are next-step prediction models ; that is , they predict the next state u ( t+1 , x ) of a physical system from the current state u ( t , x ) . As next-step models suffer from error accumulation , mitigation strategies such as training noise [ 38 ] or augmented training data using a solver-in-the-loop [ 41 ] have to be used to keep rollouts stable . These remedies are not without drawbacks– training noise can be hard to tune , and ultimately place a bound on the achievable model accuracy . And worse , next-step models also tend to show drift , which is not as easily mitigated . Failure examples include failure to conserve volume or energy , shift in phase , or loss of shape information ( see e.g. , the failure case example in [ 38 ] ) . On the other hand , auto-regressive sequence models such as Recurrent neural networks ( RNNs ) , or more recently transformers , have been hugely successful in predicting sequences in NLP and image applications [ 35 , 30 ] . They can capture stochastic dynamics and work with partial observations [ 49 ] . Furthermore , their long attention span allows them to better preserve phase and conserved quantities [ 17 ] . However , as memory cost for full-sequence transformer models scales with both ∗Equal contribution . sequence length and spatial extents , it is hard to directly extend such models to predict physical systems defined on large unstructured meshes . This paper combines powerful GNNs and a transformer to model high-dimensional physical systems on meshes . The key idea is creating a locally coarsened yet more expressive graph , to limit memory consumption of the sequence model , and allow effective training . We first use a GNN to aggregate local information of solution fields of a dynamic system into node representations by performing several rounds of message passing , and then coarsen the output graph to a small set of pivotal nodes . The pivotal nodes ’ representations form a latent that encodes the system state in a low-dimensional space . We apply a transformer model on this latent , with attention over the whole sequence , and predict the latent for the next step . We then use a second GNN to recover the full-sized graph by up-sampling and message passing . This procedure of solving on a coarse scale , upsampling , and performing updates on a fine-scale is related to a V-cycle in multigrid methods [ 4 ] . We show that this approach can outperform the state-of-the-art MeshGraphNets [ 34 ] baseline on accuracy over a set of challenging fluid dynamics tasks . We obtain stable rollouts without the need to inject training noise , and unlike the baseline , do not observe strong error accumulation or drift in the phase of vortex shedding . 2 RELATED WORK . Developing and running simulations of complex , high-dimensional systems can be very timeintensive . Particular for computational fluid dynamics , there is considerable interest in using neural networks for accelerating simulations of aerodynamics [ 3 ] or turbulent flows [ 21 , 45 ] . Fast predictions and differentiable learned models can be useful for tasks from airfoil design [ 39 ] over weather prediction [ 36 ] to visualizations for graphics [ 42 , 40 ] . While many of these methods use convolutional networks on 2D grids , recently GNN-based learned simulators , in particular , have shown to be a very flexible approach , which can model a wide range of systems , from articulated dynamics [ 37 ] to dynamics of particle systems [ 23 , 38 ] . In particular , GNNs naturally enable simulating on meshes with irregular or adaptive resolution [ 34 , 7 ] . These methods are either steady-state or next-step prediction models . There are , however , strong benefits of training on the whole predicted sequence : next-step models tend to drift and accumulate error , while sequence models can use their long temporal range to detect drift and propagate gradients through time to prevent error accumulation . Models based on RNNs have been successfully applied to 1D time series and small n-body systems [ 6 , 53 ] or small 2D systems [ 49 ] . More recently , transformer models [ 43 ] , which have been hugely successful for NLP tasks [ 35 ] , are being applied to low-dimensional physics prediction tasks [ 17 ] . However , applying sequence models to predict high-dimensional systems remains a challenge due to their high memory overhead . Dimensionality reduction techniques , such as CNN autoencoders [ 33 , 32 , 26 , 22 , 29 , 16 , 11 , 27 ] , POD [ 44 , 48 , 5 , 31 , 18 , 8 , 47 , 10 ] , or Koopman operators [ 24 , 9 , 14 ] can be used to construct a lowdimensional latent space . The auto-regressive sequence model then operates on these linear ( POD modes ) or nonlinear ( CNNs ) latents . However , these methods can not directly handle unstructured data with moving or varying-size meshes , and many of them do not consider parameter variations . For example , POD can not operate on state vectors with different lengths ( e.g. , variable mesh sizes data in Fig.2 bottom ) . On the other hand , CNN auto-encoders can only be applied to rectangular domains and uniform grids ; and rasterization of complex simulation domains to uniform grids are known to be inefficient and are linked to many drawbacks as discussed in [ 12 ] . In contrast , our method reduces the input space locally by aggregating information on a coarsened graph . This plays to the strength of GNNs to learn local universal rules and is very closely related to multi-level methods [ 50 , 15 ] and graph coarsening [ 13 , 52 , 2 ] . 3 METHODOLOGY . 3.1 PROBLEM DEFINITION AND OVERVIEW . We are interested in predicting spatiotemporal dynamics of complex physical systems ( e.g. , fluid dynamics ) , usually governed by a set of nonlinear , coupled , parameterized partial differential equations ( PDEs ) as shown in its general form , ∂u ( x , t ) ∂t = F [ u ( x , t ) ; µ ] , x , t ∈ Ω× [ 0 , Te ] , ( 1 ) where u ( x , t ) ∈ Rd represents the state variables ( e.g. , velocity , pressure , or temperature ) and F is a partial differential operator parameterized by µ . Given initial and boundary conditions , unique spatiotemporal solutions of the system can be obtained . One popular method of solving these PDE systems is the finite volume method ( FVM ) [ 28 ] , which discretizes the simulation domain Ω into an unstructured mesh consisting of N cells ( Ci : i = 1 , . . . , N ) . At time t , the discrete state field Yt = { ui , t : i = 1 , . . . , N } can thus be defined by the state value ui , t at each cell center . Traditionally , solving this discretized system involves sophisticated numerical integration over time and space . This process is often computationally expensive , making it infeasible for realtime predictions or applications requiring multiple model queries , e.g. , optimization and control . Therefore , our goal is to learn a simulator , which , given the initial state Y0 and system parameters µ , can rapidly produce a rollout trajectory of states Y1 ... YT . As mentioned above , solving these systems with high spatial resolution by traditional numerical solvers can be quite expensive . In particular , propagating local updates over the fine grid , such as pressure updates in incompressible flow , can require many solver iterations . Commonly used technique to improve the efficiency include multigrid methods [ 46 ] , which perform local updates on both the fine grid , as well as one or multiple coarsened grids with fewer nodes , to accelerate the propagation of information . One building block of multigrid methods is the V-cycle , which consists of down-sampling the fine to a coarser grid , performing a solver update , up-sampling back on the fine grid , and performing an update on the fine grid . Noting that GNNs excel at local updates while the attention mechanism over temporal sequences allows long-term dependency ( see remark A.2 ) , we devise an algorithm inspired by the multigrid V-cycle . For each time step , we use a GNN to locally summarize neighborhood information on our fine simulation mesh into pivotal nodes , which form a coarse mesh ( section 3.2 ) . We use temporal attention over the entire sequence in this lower-dimensional space ( section 3.3 ) , upsample back onto the fine simulation , and perform local updates using a mesh recovery GNN ( section 3.2 ) . This combination allows us to efficiently make use of long-term temporal attention for stable , high-fidelity dynamics predictions . 3.2 GRAPH REPRESENTATION AND MESH REDUCTION . Graph Representation . We construct a graph G = ( V , E ) to represent a snapshot of a dynamic system at time step t. Here each node i ∈ V corresponds the mesh cell Ci , so the graph size is |V| = N . The set of edges E are derived from neighboring relations of cells : if two cells Ci and Cj are neighbors , then two directional edges ( i , j ) and ( j , i ) are both in E . We fix this graph for all time steps . At each step t , each node i ∈ V uses the local state vector ui , t as its attribute . Therefore , ( G , ( Y0 , . . . , YT ) ) forms a temporal graph sequence . The goal of the learning model is to predict ( Y1 , . . . , YT ) given G and Y0 . Mesh Reduction . After representing the system as a graph , we use a GNN to summarize and extract a low-dimensional representation zt from Yt for each step t. In this part of discussion , we omit the subscript t for notational simplicity . We refer to the encoder as Graph Mesh Reducer ( GMR ) since its role is coarsening the mesh graph . GMR first selects a small set S ⊆ V of pivotal graph nodes and locally encodes the information of the entire graph into representations at these nodes . By operating on rich , summarized node representations , the dynamics of the entire system is well-approximated even on this coarser graph . There are a few considerations for selection of pivotal nodes , for example , the spatial spread and the centrality of nodes in the selection . We generally use uniform sampling to select S from V . This effectively preserves the density of graph nodes over the simulation domain , i.e . pivotal nodes are more concentrated in important regions of the simulation domain . More details and visualizations on the node selection process can be found in section A.6 . GMR is implemented as a Encode-Process-Decode ( EPD ) GraphNet [ 38 ] . GMR first extracts node features and edge features from the system state using the node and edge Multi-Layer Perceptrons ( MLPs ) . v0i = mlpv ( Y [ i ] ) , e 0 ij = mlpe ( p ( i ) − p ( j ) ) . ( 2 ) Here Y [ i ] is the i-th row of Y , i.e . the state vector at each node , and p ( i ) is the spatial position of cell Ci . Then GMR uses L GraphNet processer blocks [ 37 ] to further refine node representations through message passing . In this process a node can receive and aggregate information from all neighboring nodes within graph distance L. Each processor updates the node and edge representations as e ` ij = mlp e ` ( e ` −1ij , v ` −1 i , v ` −1 j ) , v ` i = mlp v ` v ` −1i , ∑ j∈Ni e ` −1ij , ` = 1 , . . . , L. ( 3 ) Here v0i , e 0 ij are the outputs of Equation 2 , andNi denotes all neighbors of node i . The two functions mlpe ` ( · ) and mlpv ` ( · ) respectively concatenate their arguments as vectors and then apply MLPs . The calculation in equation 2 and equation 3 computes a new set of node representations V = ( vLi : i ∈ V ) for the graph G. Finally GMR applies an MLP to representations of the pivotal nodes in S only to “ summarize ” the entire graph onto a coarse graph : hi = mlpr ( v L i ) , i ∈ S ( 4 ) We concatenate these vectors into a single latent z = concat ( hi : i ∈ S ) as reduced vector representation of the entire graph . We collectively denote these three computation steps as z = GMR ( G , Y ) . The latents z can be computed independently for each time step t and will be used as the representation for the attention-based simulator . Mesh Recovery To recover the system state from the coarse vector representation z , we define a Graph Mesh Up-Sampling ( GMUS ) network . The key step of GMUS is to restore information on the full graph from representations of pivotal nodes . This procedure is the inverse of operation of GMR . We first set the representations at pivotal nodes by splitting z , that is , ri = hi , i ∈ S. We then compute representations of non-pivotal nodes by spatial interpolation [ 2 ] : for a non-pivotal node j , we choose a set N ′j of k nearest pivotal nodes in terms of spatial distance and compute the its representations rj by rj = ∑ i∈N ′j wijhi∑ i∈N ′j wij , wij = 1 d ( j , i ) 2 ( 5 ) Here d ( j , i ) is the spatial distance between cells Cj and Ci . Then every node i ∈ V has a representation ri , and all nodes ’ representations are collectively denoted asR = ( ri : i ∈ V ) . Similar to GMR , GMUS applies EPD GraphNet to the initial node representation R to restore Y on the full graph G. We denote the chain of operations so far as Ŷ = GMUS ( G , z ) . Details about information flows in GMR and GMUS can be found in section A.1 . We train GMR and GMUS as an auto-encoder over all time steps and sequences . For each time step t , we compute Ŷt = GMUS ( G , GMR ( G , Yt ) ) and minimize the reconstruction loss Lgraph = T∑ n=1 ‖Yt − Ŷt‖22 . ( 6 ) With these two modules we can encode system states ( Y1 , . . . , YT ) to latents ( z1 , . . . , zT ) as a lowdimensional representation of system dynamics . In the next section , we train a transformer model to predict the sequences of latents . | This work proposes a new algorithm combining graph-neural-network (GNN) and auto-regressive sequence models for physics prediction problems. The authors first use GNNs to compress the physical graphs, then use transformers to predict the next steps of the compressed representations, and finally use GNNs to recover the graph representations from the predicted representations. Through empirical studies, the authors show that this method outperform the previous SOTA model (MeshGraphNet) significantly, especially in the long-rollout prediction scenarios. The authors further analyze the models to understand the success and find that the ability of the transformer model to replay the earlier sequences seems to be the critical for the better performance especially in the scenarios with oscillations. | SP:95db394e10cd433a8283269953ca17e8b8f46879 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.