paper_name stringlengths 11 170 | text stringlengths 8.07k 307k | summary stringlengths 152 6.16k | paper_id stringlengths 43 43 |
|---|---|---|---|
TaCE: Time-aware Convolutional Embedding Learning for Temporal Knowledge Graph Completion | 1 INTRODUCTION . Knowledge graphs ( KGs ) , storing facts in tuples , are often faced with incompletion . To solve this problem , knowledge graph embedding ( KGE ) , mapping the entities and relations into a continuous vector space , has been developed to capture the semantic meanings for the task of KG reasoning ( KGR ) or KG completion ( KGC ) ( Bordes et al. , 2013 ; Trouillon et al. , 2016 ; Sun et al. , 2019 ) . Both KGR and KGC aim at inferring the missing facts for a given knowledge graph ( Chen et al. , 2020 ) . Traditional KGE or KGC approaches usually treat KGs to be static , which means that the nodes and edges of a KG would not evolve with the time ( Kazemi et al. , 2020 ; Ji et al. , 2021 ) . However , in reality , most facts or events are only valid at a specific point or over a certain period . For example , in “ Franklin D.Roosevelt was in office during 1933-1945 and died on April 12th , 1945 ” , it indicates two facts ( ‘ in office ’ and ‘ death ’ ) related to the target person following different time orders and spans . In that case , KGC should be implemented at the temporal scale , and KGE models are supposed to have temporal awareness . To better capture the knowledge evolution , recent temporal KG reasoning ( TKGR ) or temporal KG completion ( TKGC ) researches try to integrate the temporal information into the KGE procedure . Methods can be roughly divided into two categories : the structure-based methods and the sequencebased methods . Acting as an extension of static KGE modelling , the former type aims to project the entities and relations into a time-dependent vector space with the inherent KG structure preserved ( Jiang et al. , 2016 ; Dasgupta et al. , 2018 ; Xu et al. , 2020 ; Lacroix et al. , 2020 ) ; they behave to be time-efficient on account of linear or multi-linear transformations but face with the shallow representation problem . The sequence-based methods ( Jin et al. , 2020 ; Wu et al. , 2020 ; Li et al. , 2021 ) , splitting the entire KG into a sequence of graph snapshots along the time , rely on the sequence models such as the recurrent neural network ( RNN ) ( Jin et al. , 2020 ; Trivedi et al. , 2017 ; Seo et al. , 2018 ) , long and short-term memory ( LSTM ) ( Wu et al. , 2020 ) or gated recurrent unit ( GRU ) ( Li et al. , 2021 ) to inherently encode temporal features . Although the performances based on the sequence models are reasonably good , they are computationally expensive when running over a large-scale KG . Moreover , their prediction results would be undermined by temporal sparsity to some extent due to the reason that only a small fraction of nodes and edges are activated at each time ( Wu et al. , 2020 ) . In this paper , we are inclined to apply the structure-based method to manage TKGR or TKGC . Inspired by the successful applications of convolutional networks on static KGE ( Dettmers et al. , 2018 ; Jiang et al. , 2019 ; Balažević et al. , 2019a ) , we hereby build a novel time-aware convolutional embedding ( TaCE ) model to infer the missing facts for a temporal knowledge graph ( TKG ) . It highlights its advantage in generating the convolution filters constructed from timestamps and convolving the time information into the embeddings of entities and relations . Such a convolutional design enables the model to deeply , comprehensively and efficiently extract the temporal features and the static ones and achieves a better link prediction for the TKGC task . Results demonstrate that TaCE has the superiority in learning temporal information as well as its interactions with the entities and the relations . It balances the tradeoff between expressiveness and training speed . The key contributions of this article can be summarized as follows : • We creatively propose time-aware convolution method to integrate the time information into the embeddings of entities and relations for a better link prediction . • An extensive comparison has been conducted between TaCE and the state-of-the-art models to verify their performances on different public datasets . • Further analyses have been done to prove that our model , TaCE , is able to capture the semantic meanings for the timestamps and learn facts with proper time order and consistency . 2 RELATED WORK . Static KG representation learning To discover the unknown facts in KGs , substantial static KGE methods have been proposed in the last decade . These methods commonly convert entities and relations into continuous vector spaces , and employ a scoring function to measure the plausibility of each candidate for KGC . TransE ( Bordes et al. , 2013 ) , is one of the most widely-used transitional distance models , to embed entities and relations . Motivated by TransE , a series of similar models including TransH ( Wang et al. , 2014 ) , TransR ( Lin et al. , 2015 ) , and TransD ( Ji et al. , 2015 ) are developed to achieve better link predictions . RESCAL ( Nickel et al. , 2011 ) and its extensions ( DistMult ( Yang et al. , 2014 ) , ComplEx ( Trouillon et al. , 2016 ) , and TuckER ( Balažević et al. , 2019b ) ) represent typical semantic matching models using tensor/matric factorization . Apart from them , ConvE ( Dettmers et al. , 2018 ) , ConvR ( Jiang et al. , 2019 ) and HypER ( Balažević et al. , 2019a ) recently ignite the passions of using convolution networks for KGE ; they successfully prove their feature expressiveness better than those linear ones in link prediction . However , there is no study by far introducing convolution modelling into TKGC . Temporal KG representation learning As forementioned , representation learning for TKG can be roughly categorized into two classes : structure-based models and sequence-based models . The former represent the quadruples in TKG by building time-sensitive embedding models . TTransE ( Jiang et al. , 2016 ) and DE-SimplE ( Goel et al. , 2020 ) integrate timestamp information into the corresponding the embeddings of relations and entities to infer the missing knowledge . HyTE ( Dasgupta et al. , 2018 ) projects the entities and relations to the temporal hyperplanes . ChronoR ( Sadeghian et al. , 2021 ) and TeRo ( Xu et al. , 2020 ) , the most recent works , treat the timestamped relations as a temporal rotation from the head entity to the tail entity . Sequence-based models , including KnowEvolve ( Trivedi et al. , 2017 ) , GCRN ( Seo et al. , 2018 ) , RE-NET ( Jin et al. , 2020 ) and RE-GCN ( Li et al. , 2021 ) , attempt to use the sequential networks such as RNN , LSTM and GRU to learn timedependent facts . However , they are designed for the task of graph extrapolation and “ not compatible with TKGC settings ( Wu et al. , 2020 ) . TeMP ( Wu et al. , 2020 ) is one of the sequence-based models , designed for TKGC tasks using graph neural network ( GNN ) and LSTM to capture the intra-graph patterns and inter-graph relationships , respectively . Therefore , we group TeMP , as the representative for the sequence-based model , into our baselines . 3 PROBLEM FORMULATION . Before going to the details of our TaCE model , we formally define the key notations and TKGC task . Temporal Knowledge Graph ( TKG ) A TKG G is composed by a set of real-world facts G = { ( s , r , o , t ) | s , r ∈ E , r ∈ R , t ∈ T } , where , in each quadruple , s denotes the head entity , r is the relation , o is the tail entity , t is a discretized timestamp ; E , R and T stand for the all the entities , relations and timestamps belong to the TKG . Temporal Knowledge Graph Completion ( TKGC ) The task of TKGC or TKGR is to infer the missing component , ( ? , r , o , t ) , ( s , r , ? , t ) or ( s , ? , o , t ) , given that the other three elements of the quadruple are known . It is supposed that the missing part exists in E , R. In this article , our job focuses on predicting the missing head or tail entity , but we only take ( s , r , ? , t ) as the example for modelling expression in later section . 4 METHOD : TACE . 4.1 FRAMEWORK OF TACE . The model of TaCE is mainly composed of four components : the temporal convolution module aims to construct temporal convolution filters to go through the input entities and relations to obtain the time-aware representations for all the input ; the static convolution module , as the name suggests , is to facilitate the convolution across all the entities and relations again to learn the context information changed without the time ; the deep learning module , made up of several hidden layers , is responsible for comprehensively and deeply drawing the representations carried both from the temporal and static modules ; after that , the prediction layer delivers the probability for each tail entity candidate to suggest the most likely answer for the incomplete G. Figure 1 displays the architecture of TaCE . 4.2 TEMPORAL CONVOLUTION MODULE . In this module , the temporal information formed by the timestamp t ∈ T is fully integrated into the subject entity s ∈ E and the relation r ∈ R via the convolution filters adaptively constructed from the timestamp t. • Firstly , to integrate the time information into the entity s and the relation r , the temporal convolution filters are developed . They are constructed from the timestamp embedding et ∈ Rdt , where dt is the embedding size of the timestamps . Originally derived from the timestamp t , et is the input into a fully connected layer fc to get a vector vt with a proper length for further processing ; then et is further split into a set of 1D convolution filters Ft = { k ( 1 ) t , k ( 2 ) t , . . . , k ( c ) t } sharing the same size , where k ( l ) t ∈ Rw represents the lth convolution filter , w denotes the embedding size of the filters and c denotes the number of the filters . The procedure of constructing temporal convolution filters is illustrated in Figure 2 . • Secondly , before filtered by temporal convolutional filters Ft , the subject entity embedding es ∈ Rde and the relational embedding er ∈ Rdr are stacked up like an ‘ image ’ with multi channels , with de = dr arepresenting the embedding size of entities and relations respectively . Such a stacking operation enables both the entity information and relation information to feasibly act with Ft. After convolved by Ft , the corresponding temporal feature maps Mtemp = { m ( 1 ) t , m ( 2 ) t , . . . , m ( c ) t } , where m ( l ) t ∈ Rde−w+1 is the lth feature map convolved from the subject entity embedding es and the relational embedding er , and c is equal to the number of filters . The convolution with temporal convolution filters is illustrated in Figure 3. hs and hr denote the convolved es and er respectively in Figure 3 . • Finally , the matrix Mtemp feed into a fully connected layer ftemp to obtain the flatten knowledge feature of atemp ∈ Rde . The equation of the temporal block is formulated as follow : atemp = ftemp ( [ es ; er ] 3 ∗ vec −1 ( fc ( et ) ) ) ( 1 ) where , vec−1 is a splitting operator to reshape the embedding et of the timestamp t into a set of filters , ∗ represents the convolutional operations , and [ es ; er ] 3 represents the stacked tensor made up of the embedding es and the embedding er . | The authors propose a novel temporal knowledge graph embedding approach that is based on convolutional neural networks. To create a feature on which the link prediction is performed, the presented approach first creates both a static and a temporal feature (both in their own respective convolution modules) and fuses them together in a third deep learning module. The so generated general feature is then used to calculate scores for the missing element in a tuple (s,r,o,t). The experimental section provides a performance overview of the proposed TaCE approach on standard benchmark datasets for TKGC tasks (ICEWS{14|05-15} and GDELD). As seen in the evaluation, the proposed approach performs better or on-par with most recent SOTA approaches in the field. The result presentation is followed by a more detailed analysis of the learned temporal embeddings that appear to contain a good semantic representation of temporal order. An ablation study further shows the huge impact that the temporal embedding module has on the overall results. | SP:6e5ce8e8b86e1f16192d9a403a71bc05bcaf2265 |
Training-Free Robust Multimodal Learning via Sample-Wise Jacobian Regularization | 1 INTRODUCTION . Deep fusion models have recently drawn great attention of researchers in the context of multimodal learning ( Vielzeuf et al. , 2018 ; Baltrušaitis et al. , 2018 ; Pérez-Rúa et al. , 2019 ; Wang et al. , 2020 ; Xue et al. , 2021 ) as it provides an easy way to increase model accuracy and robustness . For instance , RGB cameras and LiDARs are usually deployed simultaneously on an autonomous vehicle , and the resulting RGB images and point clouds are referred to as two modalities , respectively . When RGB images are blurry at night , point clouds could provide complementary information and help to make decisions in vision tasks ( Kim & Ghosh , 2019 ) . Over the past few years , numerous multimodal fusion methods have been proposed at different levels : early- , middle- , and late-fusion ( Chen et al. , 2021 ) . In early-fusion , input feature vectors from different modalities are concatenated and fed into one single deep neural network ( DNN ) , while in middle-fusion , they go into DNNs independently and exchange information in feature space . Unlike the previous two cases , late-fusion is realized by merging distinct DNNs at their output layers via concatenation , element-wise summation , etc . These three levels of fusion possess different pros and cons . For instance , late-fusion , the primary concern of our paper , is ( i ) privacy-friendly and ( ii ) convenient to deploy . Specifically , assume that a hospital wants to have an AI agent to judge whether a patient has a certain disease or not ( Sun et al. , 2020 ) . It has to divide the complete training feature ( e.g. , medical records , X-ray images ) of every patient and deliver them to different AI companies , otherwise , the patients ’ identities will be exposed and their privacy are unprotected . This , in turn , directly rules out the possibility of applying early- or middle-fusion methods . On the other hand , the hospital could still exploit latefusion technique to generate the ultimate AI agent after several unimodal DNNs are trained by AI companies . Moreover , unlike early- or middle-fusion , many late-fusion methods could tolerate missing modality information ( i.e. , no need for paired data ) and thus are convenient to deploy . Although late-fusion is a mature topic in the literature , its performance under adversarial attacks ( Madry et al. , 2018 ; Tsipras et al. , 2019 ) and random corruptions ( Zheng et al. , 2016 ; Kim & Ghosh , 2019 ) is rather under-explored . In this paper , we address the problem of robust late-fusion by utilizing Jacobian regularization ( Varga et al. , 2017 ; Jakubovitz & Giryes , 2018 ; Hoffman et al. , 2019 ; Chan et al. , 2019 ) and conditional independence assumption ( Sun et al. , 2020 ) . The key is to minimize the Frobenius norm of a Jacobian matrix so that the multimodal prediction is stabilized ( see Figure 1 ) . Our main contributions are as follows : • To the best of our knowledge , we are the first to propose a training-free robust late-fusion method . The involving optimization problem is relaxed to a Sylvester equation ( Jameson , 1968 ) , and the solution is obtained with only a little computational overhead . • We provide a theoretical error bound of our proposed robust late-fusion method and an illustrative explanation about the function of the extra modality via the TwoMoon example . • Thorough numerical experiments demonstrate that our method outperforms other latefusion methods and is capable to handle both adversarial attacks and random corruptions . 2 PRELIMINARY . Network Robustness To verify the network robustness , two major kinds of perturbations are used , which in our paper we referred to as ( i ) adversarial attacks such as FGSM , PGD , or CW attack ( Goodfellow et al. , 2014 ; Madry et al. , 2018 ; Carlini & Wagner , 2017 ) and ( ii ) random corruptions such as Gaussian noise , missing entries or illumination change ( Zheng et al. , 2016 ; Kim & Ghosh , 2019 ) . Correspondingly , many methods have been proposed to offset the negative effects of such perturbations . Adversarial training based on projected gradient descent ( Madry et al. , 2018 ) is one strong mechanism to defend against adversarial attacks , and the recent Free-m method ( Shafahi et al. , 2019 ) is proposed as its fast variant . Besides adversarial training , several regularization techniques are also proven to have such capability , such as Mixup ( Zhang et al. , 2020 ) , Jacobian regularization ( Jakubovitz & Giryes , 2018 ) . Alternatively , with regard to random corruptions , Mixup and Jacobian regularization are also effective in this case ( Zhang et al. , 2018 ; Hoffman et al. , 2019 ) . Another powerful approach is stability training ( Zheng et al. , 2016 ) , where it introduces an additional KL divergence term into the conventional classification loss so that the trained DNNs are stabilized . Multimodal Learning DNNs trained by fusing data from different modalities have outperformed their unimodal counterparts in various applications , such as object detection ( Chen et al. , 2021 ; Kim & Ghosh , 2019 ) , semantic segmentation ( Chen et al. , 2020b ; Feng et al. , 2020 ) , audio recognition ( Gemmeke et al. , 2017 ; Chen et al. , 2020a ) . Based on where the information is exchanged between different modalities , multimodal fusion methods could be classified into three kinds : ( i ) early-fusion ( Wagner et al. , 2016 ; Chen et al. , 2021 ) , ( ii ) middle-fusion ( Kim & Ghosh , 2019 ; Wang et al. , 2020 ) , and ( iii ) late-fusion ( Chen et al. , 2021 ; Liu et al. , 2021 ) . For instance , if the information is fused at the end of DNNs ( e.g. , Figure 1 ) , such a method belongs to the late-fusion category . Although vast efforts have been put into exploiting multimodal fusion methods to improve DNNs ’ accuracy on specific learning tasks , few works have explored network robustness in the multimodal context . Specifically , Mees et al . ( 2016 ) , Valada et al . ( 2017 ) , and Kim et al . ( 2018 ) exploited gating networks to deal with random corruptions , adverse or changing environments . Afterwards , Kim & Ghosh ( 2019 ) proposed a surrogate minimization scheme and a latent ensemble layer to handle single-source corruptions . However , all the aforementioned methods belong to middle-fusion and only random corruptions are considered . On the other hand , we focus on another important scenario : late-fusion , and besides corruptions , we further take adversarial attacks into account . To the best of our knowledge , robust late-fusion is un-explored in the previous literature . 3 JACOBIAN REGULARIZATION IN TEST TIME . Consider a supervised K-class classification problem in the multimodal context . Suppose that features from two distinct modalities A ( e.g. , audio ) and B ( e.g. , video ) are provided in the form of DA = { ( xiA , yi ) } Ni=1 and DB = { ( xiB , yi ) } Ni=1 , where { xA , xB } represents input features and y represents the true label . We train two unimodal networks separately , each corresponding to one modality . Given a specific input feature xA , the first unimodal network calculate the class prediction pA ∈ RK by : pA = σ1 ( zA ) = σ1 ( WAhA + bA ) = σ1 ( WAfA ( xA ) + bA ) ( 1 ) where σ1 ( · ) represents the Softmax function , zA ∈ RK represents the raw logit , and hA = fA ( xA ) ∈ RH represents the feature being fed into the last layer 1 . Here WA ∈ RK×H and bA ∈ RK are the learnable weight and bias of the last linear layer , respectively . Similarly , the second unimodal network provides the class prediction pB = σ1 ( zB ) = σ1 ( WBhB + bB ) = σ1 ( WBfB ( xB ) + bB ) . Based on the conditional independence assumption ( Kong & Schoenebeck , 2018 ) , the basic statistical late-fusion method generates the final class prediction as ( Chen et al. , 2021 ) : p = σ2 ( pA pB freq ) = σ2 ( σ1 ( zA ) σ1 ( zB ) freq ) ( 2 ) where the division is performed in an element-wise manner , represents the element-wise product , and σ2 ( · ) represents a linear normalization enforcing the summation of elements equal to one . Here freq ∈ RK contains the occurring frequencies of each class , calculated from the training dataset . Our proposed approach builds upon ( 2 ) . Specifically , we consider adding twoK×K weight matrices { Wa , Wb } ahead of { zA , zB } , respectively , right before they get activated . Consequently , the final multimodal prediction is re-calibrated as : p′ = σ2 ( σ1 ( z ′ A ) σ1 ( z′B ) freq ) = σ2 ( σ1 ( WazA ) σ1 ( WbzB ) freq ) ( 3 ) Suppose that the data provided from modality A are perturbed at the input or feature level , while the data from modality B are clean . For matrix Wb , we could simply set it to an identity matrix , implying that we didn ’ t invoke the robust add-on for the second modality . To determine the value of Wa , we first calculate the derivative of p′ with respect to hA ( see Appendix A.1 ) : ∂p′ ∂hA = J′WaWA = [ p ′p′ , T − Diag ( p′ ) ] WaWA ( 4 ) Then we minimize the following regularized Jacobian loss with respect to Wa : min Wa L = min Wa ( 1− γ ) ||J′WaWA||2F + γ||Wa − I||2F ( 5 ) where 0 < γ < 1 is a tunable hyper-parameter . Minimizing the first term in the loss could make the change of p′ limited to some extent when hA is perturbed , while the second term in the loss guarantees numerical stability and the prediction in the perturbed case won ’ t get too far from that of the clean case . For a specific multimodal input { xA , xB } , once Wa is determined , so are p′ and J′ via ( 3 ) and ( 4 ) , respectively . Thus , ( 5 ) is well-determined and non-linear with respect to Wa . We propose a heuristic iterative method making the above optimization problem tractable in Algorithm 1 . Our key is to decouple J′ from Wa . Namely , in step 5 of Algorithm 1 , all terms are known except Wa , and thus the relaxed loss is convex . After writing out all terms of ∂L ( t ) /∂Wa , we observe that it is a Sylvester equation ( Jameson , 1968 ) . It has a unique solution and the run time is as large as inverting a K ×K matrix and hence affordable . See Appendix A.2 for details . Remarks First , in our implementation we find that one iteration could already yield a sufficiently accurate result , thus all our numerical results are reported with tmax = 1 ( i.e. , p′ = p ( 1 ) ) . Second , if we know data from modality B are also perturbed , we could solve Wb in a similar manner . Third , 1 ( 1 ) holds because the last layer is usually implemented as a fully connected ( FC ) layer with Softmax activation in classification tasks . Algorithm 1 Iteratively solving regularized Jacobian loss 1 : Given one specific input { xA , xB } . Initialize iteration index t = 0 . 2 : Perform one forward pass , yielding the initial class prediction p ( 0 ) . 3 : while t < tmax do 4 : Calculate J ( t ) = p ( t ) p ( t ) , T − Diag ( p ( t ) ) . 5 : Minimize L ( t ) = ( 1− γ ) ||J ( t ) WaWA||2F + γ||Wa − I||2F with respect to Wa . 6 : Calculate p ( t+1 ) based on Eq ( 3 ) with the optimal Wa . 7 : Update t = t+ 1 . 8 : end while 9 : Return p′ = p ( t ) . notice that our approach is invoked merely during inference ( i.e. , test time ) , but not the train time . Furthermore , we demonstrate our approach in the context of two modalities , while obviously , it could be equally applied to many modalities . Finally , with a moderate assumption , we can further prove that when the input is perturbed , the change of final prediction enhanced by our method is limited to a certain amount . This has been summarized in Theorem 1 ( see Appendix A.3 ) . Some immediate corollary include : ( i ) when ∼ N ( 0 , Σ ) , the bound is simplified toE [ ||p′ , noise−p′|| ] ≤ l ( γK2 ( 1−γ ) ) 1/2 Tr [ Σ ] , ( ii ) when the L2 norm of is constrained smaller than δ ( usually assumed in adversarial attacks ) , the bound is simplified to ||p′ , noise − p′|| ≤ l δ ( γK2 ( 1−γ ) ) 1/2 . Theorem 1 If fA is l-Lipschitz continuous and xA is perturbed by : xnoiseA = xA + , then the Euclidean norm of our final prediction ( i.e. , ||p′ , noise − p′|| ) at most changes l √ γK 2 ( 1−γ ) || || . | This paper propses a late-fusion algorithm for multimodal learning. This algorithm serves to improve the robustness against adversarial attacks and random corruptions. Assuming that which modality is perturbed, this paper propses to leverage Jacobian regularization and conditional independence assumption to fuse predictions from different modalities. Moreover, this paper also provides rigorous error bounds on it error and explain the necessity of extra modality. In summary, this paper's main contributions are as follows: - Propose a late-fusion algorithm based on Jacobian regularization and conditional independence; - Derive theoretical error bounds and demonstrate the biasing effect of the extra modality; - Conduct comprehensive evaluation on adversarial attacks and random corruptions and outperform baseline late-fusion algorithms. | SP:d1baaf126845af9e0fa9028dd77f7891418a45f7 |
Training-Free Robust Multimodal Learning via Sample-Wise Jacobian Regularization | 1 INTRODUCTION . Deep fusion models have recently drawn great attention of researchers in the context of multimodal learning ( Vielzeuf et al. , 2018 ; Baltrušaitis et al. , 2018 ; Pérez-Rúa et al. , 2019 ; Wang et al. , 2020 ; Xue et al. , 2021 ) as it provides an easy way to increase model accuracy and robustness . For instance , RGB cameras and LiDARs are usually deployed simultaneously on an autonomous vehicle , and the resulting RGB images and point clouds are referred to as two modalities , respectively . When RGB images are blurry at night , point clouds could provide complementary information and help to make decisions in vision tasks ( Kim & Ghosh , 2019 ) . Over the past few years , numerous multimodal fusion methods have been proposed at different levels : early- , middle- , and late-fusion ( Chen et al. , 2021 ) . In early-fusion , input feature vectors from different modalities are concatenated and fed into one single deep neural network ( DNN ) , while in middle-fusion , they go into DNNs independently and exchange information in feature space . Unlike the previous two cases , late-fusion is realized by merging distinct DNNs at their output layers via concatenation , element-wise summation , etc . These three levels of fusion possess different pros and cons . For instance , late-fusion , the primary concern of our paper , is ( i ) privacy-friendly and ( ii ) convenient to deploy . Specifically , assume that a hospital wants to have an AI agent to judge whether a patient has a certain disease or not ( Sun et al. , 2020 ) . It has to divide the complete training feature ( e.g. , medical records , X-ray images ) of every patient and deliver them to different AI companies , otherwise , the patients ’ identities will be exposed and their privacy are unprotected . This , in turn , directly rules out the possibility of applying early- or middle-fusion methods . On the other hand , the hospital could still exploit latefusion technique to generate the ultimate AI agent after several unimodal DNNs are trained by AI companies . Moreover , unlike early- or middle-fusion , many late-fusion methods could tolerate missing modality information ( i.e. , no need for paired data ) and thus are convenient to deploy . Although late-fusion is a mature topic in the literature , its performance under adversarial attacks ( Madry et al. , 2018 ; Tsipras et al. , 2019 ) and random corruptions ( Zheng et al. , 2016 ; Kim & Ghosh , 2019 ) is rather under-explored . In this paper , we address the problem of robust late-fusion by utilizing Jacobian regularization ( Varga et al. , 2017 ; Jakubovitz & Giryes , 2018 ; Hoffman et al. , 2019 ; Chan et al. , 2019 ) and conditional independence assumption ( Sun et al. , 2020 ) . The key is to minimize the Frobenius norm of a Jacobian matrix so that the multimodal prediction is stabilized ( see Figure 1 ) . Our main contributions are as follows : • To the best of our knowledge , we are the first to propose a training-free robust late-fusion method . The involving optimization problem is relaxed to a Sylvester equation ( Jameson , 1968 ) , and the solution is obtained with only a little computational overhead . • We provide a theoretical error bound of our proposed robust late-fusion method and an illustrative explanation about the function of the extra modality via the TwoMoon example . • Thorough numerical experiments demonstrate that our method outperforms other latefusion methods and is capable to handle both adversarial attacks and random corruptions . 2 PRELIMINARY . Network Robustness To verify the network robustness , two major kinds of perturbations are used , which in our paper we referred to as ( i ) adversarial attacks such as FGSM , PGD , or CW attack ( Goodfellow et al. , 2014 ; Madry et al. , 2018 ; Carlini & Wagner , 2017 ) and ( ii ) random corruptions such as Gaussian noise , missing entries or illumination change ( Zheng et al. , 2016 ; Kim & Ghosh , 2019 ) . Correspondingly , many methods have been proposed to offset the negative effects of such perturbations . Adversarial training based on projected gradient descent ( Madry et al. , 2018 ) is one strong mechanism to defend against adversarial attacks , and the recent Free-m method ( Shafahi et al. , 2019 ) is proposed as its fast variant . Besides adversarial training , several regularization techniques are also proven to have such capability , such as Mixup ( Zhang et al. , 2020 ) , Jacobian regularization ( Jakubovitz & Giryes , 2018 ) . Alternatively , with regard to random corruptions , Mixup and Jacobian regularization are also effective in this case ( Zhang et al. , 2018 ; Hoffman et al. , 2019 ) . Another powerful approach is stability training ( Zheng et al. , 2016 ) , where it introduces an additional KL divergence term into the conventional classification loss so that the trained DNNs are stabilized . Multimodal Learning DNNs trained by fusing data from different modalities have outperformed their unimodal counterparts in various applications , such as object detection ( Chen et al. , 2021 ; Kim & Ghosh , 2019 ) , semantic segmentation ( Chen et al. , 2020b ; Feng et al. , 2020 ) , audio recognition ( Gemmeke et al. , 2017 ; Chen et al. , 2020a ) . Based on where the information is exchanged between different modalities , multimodal fusion methods could be classified into three kinds : ( i ) early-fusion ( Wagner et al. , 2016 ; Chen et al. , 2021 ) , ( ii ) middle-fusion ( Kim & Ghosh , 2019 ; Wang et al. , 2020 ) , and ( iii ) late-fusion ( Chen et al. , 2021 ; Liu et al. , 2021 ) . For instance , if the information is fused at the end of DNNs ( e.g. , Figure 1 ) , such a method belongs to the late-fusion category . Although vast efforts have been put into exploiting multimodal fusion methods to improve DNNs ’ accuracy on specific learning tasks , few works have explored network robustness in the multimodal context . Specifically , Mees et al . ( 2016 ) , Valada et al . ( 2017 ) , and Kim et al . ( 2018 ) exploited gating networks to deal with random corruptions , adverse or changing environments . Afterwards , Kim & Ghosh ( 2019 ) proposed a surrogate minimization scheme and a latent ensemble layer to handle single-source corruptions . However , all the aforementioned methods belong to middle-fusion and only random corruptions are considered . On the other hand , we focus on another important scenario : late-fusion , and besides corruptions , we further take adversarial attacks into account . To the best of our knowledge , robust late-fusion is un-explored in the previous literature . 3 JACOBIAN REGULARIZATION IN TEST TIME . Consider a supervised K-class classification problem in the multimodal context . Suppose that features from two distinct modalities A ( e.g. , audio ) and B ( e.g. , video ) are provided in the form of DA = { ( xiA , yi ) } Ni=1 and DB = { ( xiB , yi ) } Ni=1 , where { xA , xB } represents input features and y represents the true label . We train two unimodal networks separately , each corresponding to one modality . Given a specific input feature xA , the first unimodal network calculate the class prediction pA ∈ RK by : pA = σ1 ( zA ) = σ1 ( WAhA + bA ) = σ1 ( WAfA ( xA ) + bA ) ( 1 ) where σ1 ( · ) represents the Softmax function , zA ∈ RK represents the raw logit , and hA = fA ( xA ) ∈ RH represents the feature being fed into the last layer 1 . Here WA ∈ RK×H and bA ∈ RK are the learnable weight and bias of the last linear layer , respectively . Similarly , the second unimodal network provides the class prediction pB = σ1 ( zB ) = σ1 ( WBhB + bB ) = σ1 ( WBfB ( xB ) + bB ) . Based on the conditional independence assumption ( Kong & Schoenebeck , 2018 ) , the basic statistical late-fusion method generates the final class prediction as ( Chen et al. , 2021 ) : p = σ2 ( pA pB freq ) = σ2 ( σ1 ( zA ) σ1 ( zB ) freq ) ( 2 ) where the division is performed in an element-wise manner , represents the element-wise product , and σ2 ( · ) represents a linear normalization enforcing the summation of elements equal to one . Here freq ∈ RK contains the occurring frequencies of each class , calculated from the training dataset . Our proposed approach builds upon ( 2 ) . Specifically , we consider adding twoK×K weight matrices { Wa , Wb } ahead of { zA , zB } , respectively , right before they get activated . Consequently , the final multimodal prediction is re-calibrated as : p′ = σ2 ( σ1 ( z ′ A ) σ1 ( z′B ) freq ) = σ2 ( σ1 ( WazA ) σ1 ( WbzB ) freq ) ( 3 ) Suppose that the data provided from modality A are perturbed at the input or feature level , while the data from modality B are clean . For matrix Wb , we could simply set it to an identity matrix , implying that we didn ’ t invoke the robust add-on for the second modality . To determine the value of Wa , we first calculate the derivative of p′ with respect to hA ( see Appendix A.1 ) : ∂p′ ∂hA = J′WaWA = [ p ′p′ , T − Diag ( p′ ) ] WaWA ( 4 ) Then we minimize the following regularized Jacobian loss with respect to Wa : min Wa L = min Wa ( 1− γ ) ||J′WaWA||2F + γ||Wa − I||2F ( 5 ) where 0 < γ < 1 is a tunable hyper-parameter . Minimizing the first term in the loss could make the change of p′ limited to some extent when hA is perturbed , while the second term in the loss guarantees numerical stability and the prediction in the perturbed case won ’ t get too far from that of the clean case . For a specific multimodal input { xA , xB } , once Wa is determined , so are p′ and J′ via ( 3 ) and ( 4 ) , respectively . Thus , ( 5 ) is well-determined and non-linear with respect to Wa . We propose a heuristic iterative method making the above optimization problem tractable in Algorithm 1 . Our key is to decouple J′ from Wa . Namely , in step 5 of Algorithm 1 , all terms are known except Wa , and thus the relaxed loss is convex . After writing out all terms of ∂L ( t ) /∂Wa , we observe that it is a Sylvester equation ( Jameson , 1968 ) . It has a unique solution and the run time is as large as inverting a K ×K matrix and hence affordable . See Appendix A.2 for details . Remarks First , in our implementation we find that one iteration could already yield a sufficiently accurate result , thus all our numerical results are reported with tmax = 1 ( i.e. , p′ = p ( 1 ) ) . Second , if we know data from modality B are also perturbed , we could solve Wb in a similar manner . Third , 1 ( 1 ) holds because the last layer is usually implemented as a fully connected ( FC ) layer with Softmax activation in classification tasks . Algorithm 1 Iteratively solving regularized Jacobian loss 1 : Given one specific input { xA , xB } . Initialize iteration index t = 0 . 2 : Perform one forward pass , yielding the initial class prediction p ( 0 ) . 3 : while t < tmax do 4 : Calculate J ( t ) = p ( t ) p ( t ) , T − Diag ( p ( t ) ) . 5 : Minimize L ( t ) = ( 1− γ ) ||J ( t ) WaWA||2F + γ||Wa − I||2F with respect to Wa . 6 : Calculate p ( t+1 ) based on Eq ( 3 ) with the optimal Wa . 7 : Update t = t+ 1 . 8 : end while 9 : Return p′ = p ( t ) . notice that our approach is invoked merely during inference ( i.e. , test time ) , but not the train time . Furthermore , we demonstrate our approach in the context of two modalities , while obviously , it could be equally applied to many modalities . Finally , with a moderate assumption , we can further prove that when the input is perturbed , the change of final prediction enhanced by our method is limited to a certain amount . This has been summarized in Theorem 1 ( see Appendix A.3 ) . Some immediate corollary include : ( i ) when ∼ N ( 0 , Σ ) , the bound is simplified toE [ ||p′ , noise−p′|| ] ≤ l ( γK2 ( 1−γ ) ) 1/2 Tr [ Σ ] , ( ii ) when the L2 norm of is constrained smaller than δ ( usually assumed in adversarial attacks ) , the bound is simplified to ||p′ , noise − p′|| ≤ l δ ( γK2 ( 1−γ ) ) 1/2 . Theorem 1 If fA is l-Lipschitz continuous and xA is perturbed by : xnoiseA = xA + , then the Euclidean norm of our final prediction ( i.e. , ||p′ , noise − p′|| ) at most changes l √ γK 2 ( 1−γ ) || || . | The paper proposed a training-free robust multimodal learning late-fusion methods via sample-wise Jacobian regularization. The key idea of the work is to minimize the Frobenius norm of a Jacobian matrix, so that the multimodal prediction is stabilized. The paper demonstrate the good efficacy on both adversarial attacks and random corruptions setting on multimoda datasets such as AV-MNIST/VGGSound/RAVDESS. | SP:d1baaf126845af9e0fa9028dd77f7891418a45f7 |
Training-Free Robust Multimodal Learning via Sample-Wise Jacobian Regularization | 1 INTRODUCTION . Deep fusion models have recently drawn great attention of researchers in the context of multimodal learning ( Vielzeuf et al. , 2018 ; Baltrušaitis et al. , 2018 ; Pérez-Rúa et al. , 2019 ; Wang et al. , 2020 ; Xue et al. , 2021 ) as it provides an easy way to increase model accuracy and robustness . For instance , RGB cameras and LiDARs are usually deployed simultaneously on an autonomous vehicle , and the resulting RGB images and point clouds are referred to as two modalities , respectively . When RGB images are blurry at night , point clouds could provide complementary information and help to make decisions in vision tasks ( Kim & Ghosh , 2019 ) . Over the past few years , numerous multimodal fusion methods have been proposed at different levels : early- , middle- , and late-fusion ( Chen et al. , 2021 ) . In early-fusion , input feature vectors from different modalities are concatenated and fed into one single deep neural network ( DNN ) , while in middle-fusion , they go into DNNs independently and exchange information in feature space . Unlike the previous two cases , late-fusion is realized by merging distinct DNNs at their output layers via concatenation , element-wise summation , etc . These three levels of fusion possess different pros and cons . For instance , late-fusion , the primary concern of our paper , is ( i ) privacy-friendly and ( ii ) convenient to deploy . Specifically , assume that a hospital wants to have an AI agent to judge whether a patient has a certain disease or not ( Sun et al. , 2020 ) . It has to divide the complete training feature ( e.g. , medical records , X-ray images ) of every patient and deliver them to different AI companies , otherwise , the patients ’ identities will be exposed and their privacy are unprotected . This , in turn , directly rules out the possibility of applying early- or middle-fusion methods . On the other hand , the hospital could still exploit latefusion technique to generate the ultimate AI agent after several unimodal DNNs are trained by AI companies . Moreover , unlike early- or middle-fusion , many late-fusion methods could tolerate missing modality information ( i.e. , no need for paired data ) and thus are convenient to deploy . Although late-fusion is a mature topic in the literature , its performance under adversarial attacks ( Madry et al. , 2018 ; Tsipras et al. , 2019 ) and random corruptions ( Zheng et al. , 2016 ; Kim & Ghosh , 2019 ) is rather under-explored . In this paper , we address the problem of robust late-fusion by utilizing Jacobian regularization ( Varga et al. , 2017 ; Jakubovitz & Giryes , 2018 ; Hoffman et al. , 2019 ; Chan et al. , 2019 ) and conditional independence assumption ( Sun et al. , 2020 ) . The key is to minimize the Frobenius norm of a Jacobian matrix so that the multimodal prediction is stabilized ( see Figure 1 ) . Our main contributions are as follows : • To the best of our knowledge , we are the first to propose a training-free robust late-fusion method . The involving optimization problem is relaxed to a Sylvester equation ( Jameson , 1968 ) , and the solution is obtained with only a little computational overhead . • We provide a theoretical error bound of our proposed robust late-fusion method and an illustrative explanation about the function of the extra modality via the TwoMoon example . • Thorough numerical experiments demonstrate that our method outperforms other latefusion methods and is capable to handle both adversarial attacks and random corruptions . 2 PRELIMINARY . Network Robustness To verify the network robustness , two major kinds of perturbations are used , which in our paper we referred to as ( i ) adversarial attacks such as FGSM , PGD , or CW attack ( Goodfellow et al. , 2014 ; Madry et al. , 2018 ; Carlini & Wagner , 2017 ) and ( ii ) random corruptions such as Gaussian noise , missing entries or illumination change ( Zheng et al. , 2016 ; Kim & Ghosh , 2019 ) . Correspondingly , many methods have been proposed to offset the negative effects of such perturbations . Adversarial training based on projected gradient descent ( Madry et al. , 2018 ) is one strong mechanism to defend against adversarial attacks , and the recent Free-m method ( Shafahi et al. , 2019 ) is proposed as its fast variant . Besides adversarial training , several regularization techniques are also proven to have such capability , such as Mixup ( Zhang et al. , 2020 ) , Jacobian regularization ( Jakubovitz & Giryes , 2018 ) . Alternatively , with regard to random corruptions , Mixup and Jacobian regularization are also effective in this case ( Zhang et al. , 2018 ; Hoffman et al. , 2019 ) . Another powerful approach is stability training ( Zheng et al. , 2016 ) , where it introduces an additional KL divergence term into the conventional classification loss so that the trained DNNs are stabilized . Multimodal Learning DNNs trained by fusing data from different modalities have outperformed their unimodal counterparts in various applications , such as object detection ( Chen et al. , 2021 ; Kim & Ghosh , 2019 ) , semantic segmentation ( Chen et al. , 2020b ; Feng et al. , 2020 ) , audio recognition ( Gemmeke et al. , 2017 ; Chen et al. , 2020a ) . Based on where the information is exchanged between different modalities , multimodal fusion methods could be classified into three kinds : ( i ) early-fusion ( Wagner et al. , 2016 ; Chen et al. , 2021 ) , ( ii ) middle-fusion ( Kim & Ghosh , 2019 ; Wang et al. , 2020 ) , and ( iii ) late-fusion ( Chen et al. , 2021 ; Liu et al. , 2021 ) . For instance , if the information is fused at the end of DNNs ( e.g. , Figure 1 ) , such a method belongs to the late-fusion category . Although vast efforts have been put into exploiting multimodal fusion methods to improve DNNs ’ accuracy on specific learning tasks , few works have explored network robustness in the multimodal context . Specifically , Mees et al . ( 2016 ) , Valada et al . ( 2017 ) , and Kim et al . ( 2018 ) exploited gating networks to deal with random corruptions , adverse or changing environments . Afterwards , Kim & Ghosh ( 2019 ) proposed a surrogate minimization scheme and a latent ensemble layer to handle single-source corruptions . However , all the aforementioned methods belong to middle-fusion and only random corruptions are considered . On the other hand , we focus on another important scenario : late-fusion , and besides corruptions , we further take adversarial attacks into account . To the best of our knowledge , robust late-fusion is un-explored in the previous literature . 3 JACOBIAN REGULARIZATION IN TEST TIME . Consider a supervised K-class classification problem in the multimodal context . Suppose that features from two distinct modalities A ( e.g. , audio ) and B ( e.g. , video ) are provided in the form of DA = { ( xiA , yi ) } Ni=1 and DB = { ( xiB , yi ) } Ni=1 , where { xA , xB } represents input features and y represents the true label . We train two unimodal networks separately , each corresponding to one modality . Given a specific input feature xA , the first unimodal network calculate the class prediction pA ∈ RK by : pA = σ1 ( zA ) = σ1 ( WAhA + bA ) = σ1 ( WAfA ( xA ) + bA ) ( 1 ) where σ1 ( · ) represents the Softmax function , zA ∈ RK represents the raw logit , and hA = fA ( xA ) ∈ RH represents the feature being fed into the last layer 1 . Here WA ∈ RK×H and bA ∈ RK are the learnable weight and bias of the last linear layer , respectively . Similarly , the second unimodal network provides the class prediction pB = σ1 ( zB ) = σ1 ( WBhB + bB ) = σ1 ( WBfB ( xB ) + bB ) . Based on the conditional independence assumption ( Kong & Schoenebeck , 2018 ) , the basic statistical late-fusion method generates the final class prediction as ( Chen et al. , 2021 ) : p = σ2 ( pA pB freq ) = σ2 ( σ1 ( zA ) σ1 ( zB ) freq ) ( 2 ) where the division is performed in an element-wise manner , represents the element-wise product , and σ2 ( · ) represents a linear normalization enforcing the summation of elements equal to one . Here freq ∈ RK contains the occurring frequencies of each class , calculated from the training dataset . Our proposed approach builds upon ( 2 ) . Specifically , we consider adding twoK×K weight matrices { Wa , Wb } ahead of { zA , zB } , respectively , right before they get activated . Consequently , the final multimodal prediction is re-calibrated as : p′ = σ2 ( σ1 ( z ′ A ) σ1 ( z′B ) freq ) = σ2 ( σ1 ( WazA ) σ1 ( WbzB ) freq ) ( 3 ) Suppose that the data provided from modality A are perturbed at the input or feature level , while the data from modality B are clean . For matrix Wb , we could simply set it to an identity matrix , implying that we didn ’ t invoke the robust add-on for the second modality . To determine the value of Wa , we first calculate the derivative of p′ with respect to hA ( see Appendix A.1 ) : ∂p′ ∂hA = J′WaWA = [ p ′p′ , T − Diag ( p′ ) ] WaWA ( 4 ) Then we minimize the following regularized Jacobian loss with respect to Wa : min Wa L = min Wa ( 1− γ ) ||J′WaWA||2F + γ||Wa − I||2F ( 5 ) where 0 < γ < 1 is a tunable hyper-parameter . Minimizing the first term in the loss could make the change of p′ limited to some extent when hA is perturbed , while the second term in the loss guarantees numerical stability and the prediction in the perturbed case won ’ t get too far from that of the clean case . For a specific multimodal input { xA , xB } , once Wa is determined , so are p′ and J′ via ( 3 ) and ( 4 ) , respectively . Thus , ( 5 ) is well-determined and non-linear with respect to Wa . We propose a heuristic iterative method making the above optimization problem tractable in Algorithm 1 . Our key is to decouple J′ from Wa . Namely , in step 5 of Algorithm 1 , all terms are known except Wa , and thus the relaxed loss is convex . After writing out all terms of ∂L ( t ) /∂Wa , we observe that it is a Sylvester equation ( Jameson , 1968 ) . It has a unique solution and the run time is as large as inverting a K ×K matrix and hence affordable . See Appendix A.2 for details . Remarks First , in our implementation we find that one iteration could already yield a sufficiently accurate result , thus all our numerical results are reported with tmax = 1 ( i.e. , p′ = p ( 1 ) ) . Second , if we know data from modality B are also perturbed , we could solve Wb in a similar manner . Third , 1 ( 1 ) holds because the last layer is usually implemented as a fully connected ( FC ) layer with Softmax activation in classification tasks . Algorithm 1 Iteratively solving regularized Jacobian loss 1 : Given one specific input { xA , xB } . Initialize iteration index t = 0 . 2 : Perform one forward pass , yielding the initial class prediction p ( 0 ) . 3 : while t < tmax do 4 : Calculate J ( t ) = p ( t ) p ( t ) , T − Diag ( p ( t ) ) . 5 : Minimize L ( t ) = ( 1− γ ) ||J ( t ) WaWA||2F + γ||Wa − I||2F with respect to Wa . 6 : Calculate p ( t+1 ) based on Eq ( 3 ) with the optimal Wa . 7 : Update t = t+ 1 . 8 : end while 9 : Return p′ = p ( t ) . notice that our approach is invoked merely during inference ( i.e. , test time ) , but not the train time . Furthermore , we demonstrate our approach in the context of two modalities , while obviously , it could be equally applied to many modalities . Finally , with a moderate assumption , we can further prove that when the input is perturbed , the change of final prediction enhanced by our method is limited to a certain amount . This has been summarized in Theorem 1 ( see Appendix A.3 ) . Some immediate corollary include : ( i ) when ∼ N ( 0 , Σ ) , the bound is simplified toE [ ||p′ , noise−p′|| ] ≤ l ( γK2 ( 1−γ ) ) 1/2 Tr [ Σ ] , ( ii ) when the L2 norm of is constrained smaller than δ ( usually assumed in adversarial attacks ) , the bound is simplified to ||p′ , noise − p′|| ≤ l δ ( γK2 ( 1−γ ) ) 1/2 . Theorem 1 If fA is l-Lipschitz continuous and xA is perturbed by : xnoiseA = xA + , then the Euclidean norm of our final prediction ( i.e. , ||p′ , noise − p′|| ) at most changes l √ γK 2 ( 1−γ ) || || . | In this paper, the authors proposed a training-free late-fusion method for robust multimodal learning. They specifically considering its performance under adversarial attacks and random corruptions which usually confuse the model by introducing noise to the input data. To promote the multimodal prediction robust to attacks, they propose to minimize the Frobenius norm of Jacobian matrix so that the prediction becomes stable to the perturbation of inputs. They also provide a theoretical error bound of their method. The experimental results outperfom other late-fusion methods. | SP:d1baaf126845af9e0fa9028dd77f7891418a45f7 |
Density Estimation for Conservative Q-Learning | 1 INTRODUCTION . Transposing the recent successes of Reinforcement Learning ( RL ) such as recommendation systems ( Rojanavasu et al. , 2005 ; Zheng et al. , 2018 ) , video games ( Mnih et al. , 2013 ) , go ( Silver et al. , 2017 ) to real-world systems is not possible without facing many challenges ( Dulac-Arnold et al. , 2021 ) . One of those challenges is that in many real-world applications , direct access to the system can be limited , and sometimes even forbidden . This can be due to various reasons , an important one being that a learning controller may incorrectly assess the implications of its actions and damage the system . Batch , or offline , Reinforcement Learning ( Lange et al. , 2012 ; Levine et al. , 2020 ) provides a framework to address those RL problems when no interaction with the system is allowed . In place , the learner is given a dataset collected under a ( possibly unknown ) behavioural policy and has to derive the most efficient policy out of this dataset . One of the main problematic encountered within this setting is the value-function over-estimation problem ( Fujimoto et al. , 2019 ; Levine et al. , 2020 ; Kumar et al. , 2019a ; Wu et al. , 2019 ) . Indeed , when the dataset only covers a small subset of the state-action space , the agent typically wrongly extrapolates the value functions related to pairs far from the dataset , denoted as Out-Of-Distribution ( OOD ) . This error is then used as a target in the learning process , leading to highly increasing estimates which may lead to a disastrous learned policy . This problem has been extensively studied in the traditional online Reinforcement Learning setting ( Sutton & Barto , 1998 ) . However in this case , this issue is quite naturally alleviated since when a value function becomes over-optimistic , it will drive the agent to visit the related state-action pair . Therefore , the agent will have the chance to directly check the consequences of such pairs and its estimation can be corrected . Some modifications , mostly relying on reducing these errors with Ensemble Learning ( van Hasselt , 2010 ; van Hasselt et al. , 2016 ; Anschel et al. , 2017 ; Lee et al. , 2021b ) , can also be used to enhance learning . In Batch RL , since no inspection can be done to investigate the accuracy of the estimates , those methods can not be used and hence classical deep Off-Policy methods dramatically fail in this setting ( Fujimoto et al. , 2019 ; Levine et al. , 2020 ) . Additional parts must be introduced to build robust and efficient agents . An important family of state-of-the art algorithms addressing this problem focus on constraining the learned policy to stay close to the dataset either by minimizing its distance to the behavioral policy ( Siegel et al. , 2020a ; Wu et al. , 2019 ; Kumar et al. , 2019b ) or by penalizing unseen state-action pairs ( Luo et al. , 2019 ; Kumar et al. , 2020 ; Yu et al. , 2021 ) . Especially , Kumar et al . ( 2020 ) propose to optimize a lower bound on the value functions and use this lower bound as a proxy in the policy optimization process . This lower bound should be tight when state-action pairs are contained in the dataset and loosened otherwise . Following this purpose , they proposed Conservative Q-Learning ( CQL ) that introduces a penalization to under-estimate value functions associated to OOD actions . On top of driving the agent to stay close to the dataset transitions , this method gives a chance to standard Off-Policy learning as estimates will have a reasonable scale during learning . Nevertheless , given the lack of information regarding the behavioural policy , their regularization remains abrupt and might be problematic in practice . First , the resulting lower bound is loosened with the recommended distributions . Second , their approach does not consider actions ’ neighbourhoods and could therefore over-penalize interesting action space ’ s regions . In this paper , we tackle these problems by introducing a novel penalization based on an estimation of the dataset ’ s probability density function instead of the behavioural policy . Besides being easier to learn that the behavioural policy , this density is able to provide information on which regions are near the dataset and thus safe to learn from , and which are the ones far from it and prone to over-estimation errors . On top of instigating those relevant information , we show that this new regularization leads to a more appropriate lower bound on the value function . We show how to integrate this penalization in a CQL-like algorithm and derive a novel algorithm called Density Conservative Q-Learning ( D-CQL ) . We finally investigate empirically the relevance of our approach . 2 PRELIMINARIES AND MOTIVATIONS . 2.1 NOTATIONS AND POLICY ITERATION . The agent-environment framework is modeled as a Markov Decision Process ( MDP ) ( S , A , r , P , γ ) defined by a state space S , an action space A , a transition kernel P : S × A → ∆ ( S ) , a reward function r : S × A → [ Rmin , Rmax ] and a discount factor γ ∈ ] 0 , 1 [ . A policy π : S → ∆ ( A ) is a decision rule mapping a state over a distribution of actions . The value of a policy is measured through the value function V π ( s ) = EP [ ∑ t=0 γ tr ( st , at ) | s0 = s , at ∼ π ( ·|st ) ] and its associated Q-value function Qπ ( s , a ) = EP [ ∑ t=0 γ tr ( st , at ) | s0 = s , a0 = a , at ∼ π ( ·|st ) ∀t ≥ 1 ] . The goal is to find the policy maximizing these value functions . Let r , Q be matrices associated to all state-action pairs and Pπ be the transition matrix induced by the policy π : Pπ ( s , s′ ) = Ea∼π ( ·|s ) P ( s′|s , a ) . Value functions can be learned by iterating the Bellman operator defined for the Q-function as BπQ = r + γPπQ where PπQ ( s , a ) = Es′∼P ( ·|s , a ) , a′∼π ( ·|s ) [ Q ( s′ , a′ ) ] . This operator is a γ-contraction ( Puterman , 1994 ) , hence having a unique fixed point Qπ . Many classic recent algorithms rely on the Policy Iteration scheme ( Lillicrap et al. , 2016 ; Fujimoto et al. , 2018 ; Haarnoja et al. , 2018 ) , where the agent alternates between Policy Evaluation ( PE ) with the computation of Qπ and Policy Improvement ( PI ) by maximizing the learned Q-values Qk+1 ← arg min Q Bπ k Qk −Q , ( policy evaluation ) πk+1 ← arg max π Ea∼π [ Qk+1 ( · , a ) ] . ( policy improvement ) This iterative process converges towards the optimal policy ( Sutton & Barto , 1998 ; Santos & Rust , 2004 ) . Since no knowledge is assumed on the environment , these steps are commonly solved using samples from a dataset D = { ( si , ai , ri ) Ni=1 } . The expectation under P ( ·|s , a ) is now estimated using sample and leads to the empirical Bellman operator B̂ . We slightly abuse notations and consider D is also a distribution on S ×A× S. The procedure is now under the dataset expectation Qk+1 ← arg min Q Es , a , s′∼D [ ( B̂π k Qk ( s , a ) −Q ( s , a ) ) 2 ] , ( approximate policy evaluation ) πk+1 ← arg max π Es∼D , a∼π [ Qk+1 ( s , a ) ] . ( approximate policy improvement ) The Q-values and the policy π are commonly estimated using Neural Networks that are trained with gradient optimization methods . In the approximate policy evaluation step , an important aspect is the expectation of actions from π ( ·|s′ ) in the bootstrapped target . This is where OOD actions may appear and become a decisive topic : extrapolation errors emerge , are then back-propagated to eventually lead to highly over-optimistic estimates . In the Online setting , the dataset is constantly updated with samples gathered with the learned policy , coping with this problem . Note there are no OOD states in the Bellman update as the empirical operator only depends on a seen state s′ . They might appear on model-based algorithms ( Yu et al. , 2021 ) but are for now out of the scope of model-free algorithms . An interesting future direction would be to consider them as well . In this work , we focus on the Batch setting where the agent can not interact with the environment . The agent dataset is now fixed and has been gathered with an unknown behavioural policy πβ . No knowledge is assumed on πβ as the dataset can come from different sources : optimal control , human or a mixture of them ( Fu et al. , 2020 ; Gülçehre et al. , 2020 ) . Actions that belong to the dataset distribution given the state s are denoted as In-Distribution ( ID ) and the ones far from it are Out-Of-Distribution ( OOD ) . A major challenge is to find a good trade-off between staying close to the dataset to avoid extrapolation errors and taking some liberty to overcome the suboptimality of the behaviour policy . 2.2 CONSERVATIVE Q-LEARNING . This approach addresses the Q-values over-estimation problem exacerbated in Batch RL . As a reminder , the Policy Evaluation step relies on a bootstrapped target that back-propagates any extrapolation error during learning . This error may be of high importance when the consequences of a given state-action pair are unknown , and could lead to highly optimistic estimates . This problem is intensified in Batch RL . First , the dataset often describes a small subset of the state-action space S ×A thus OOD actions are very likely to appear . Second , the agent never gets the chance the visit the state-action pairs related to high Q-values and can not correct its possibly wrong estimations . At this step , Kumar et al . ( 2020 ) propose to penalize the actions not described by the dataset while keeping intact actions from the dataset with proper information . This greatly stabilizes learning : the agent does not have to deal with drastically high estimates and therefore gives the agent a chance to learn accurate Q-values thanks to the empirical Bellman operator . It also implicitly drives the agent to favor state-action pairs described in the dataset . This penalization translates into minimizing the Q-values on an arbitrary distribution µ ( e.g . uniform ) and maximizing them on πβ formally expressed as follows Q̂k+1 ← arg min Q αEs∼D [ ( Ea∼µ ( ·|s ) [ Q ( s , a ) ] − Ea∼πβ ( ·|s ) [ Q ( s , a ) ] ) ] +Es , a , s′∼D [ ( B̂πkQ̂k ( s , a ) −Q ( s , a ) ) 2 ] . ( 1 ) Assuming the absence of sampling errors and suppµ ⊂ suppπβ , this update provides a lowerbound on the expected Q-values on the distribution µ : Ea∼µ [ QCQL ( s , a ) ] ≤ Ea∼µ [ Qπ ( s , a ) ] for all s ∈ S with α > 0 . When µ is the current policy π , the lower bound is in the value function , that is V CQL ( s ) ≤ V π ( s ) . This property may be highly desirable on applications where the agent must check if the current value function is above a certain threshold such as Constrained Policy Optimization ( Achiam et al. , 2017 ) and Conservative Exploration ( Garcelon et al. , 2020 ) . However , for the common setting where µ is a uniform distribution over the action space , the lower bound is loosened . While a certain control in the Q-values is kept , both the value and point-wise inequalities are lost . Another point of attention is the maximization term relying on the knowledge of the behavioral policy . In the general setting , it is out of reach as the dataset may be gathered in various ways . Kumar et al . ( 2020 ) propose to use the empirical dataset distribution π̂β ( a|s ) = ∑ s′ , a′∈D 1 [ s′=s , a′=a ] ∑ s′∈D 1 [ s′=s ] , that may become a Dirac over the dataset actions especially when the action space A is continuous . Not only does this breaks the assumption suppµ ⊂ supp π̂β ( as in practice suppπβ 6⊂ supp π̂β ) , it also might be problematic on the penalization itself : the distance between the selected actions and the dataset is no longer considered . In other words , actions that are not appearing in the dataset will be equally penalized no matter their closeness with the dataset D. Thus , the regularization pushes the agent to reproduce the behavioural policy , not enhance it . | This paper proposed a conservative Q learning approach based on density and uncertainty estimation, D-CQL. It argues it is a more effective regularization than previous conservative Q learning approaches. The performance of the proposed method is compared with other batch RL methods in several classical benchmarks. | SP:af9afdbb60478070450f3c028792aa38b3bdbc2d |
Density Estimation for Conservative Q-Learning | 1 INTRODUCTION . Transposing the recent successes of Reinforcement Learning ( RL ) such as recommendation systems ( Rojanavasu et al. , 2005 ; Zheng et al. , 2018 ) , video games ( Mnih et al. , 2013 ) , go ( Silver et al. , 2017 ) to real-world systems is not possible without facing many challenges ( Dulac-Arnold et al. , 2021 ) . One of those challenges is that in many real-world applications , direct access to the system can be limited , and sometimes even forbidden . This can be due to various reasons , an important one being that a learning controller may incorrectly assess the implications of its actions and damage the system . Batch , or offline , Reinforcement Learning ( Lange et al. , 2012 ; Levine et al. , 2020 ) provides a framework to address those RL problems when no interaction with the system is allowed . In place , the learner is given a dataset collected under a ( possibly unknown ) behavioural policy and has to derive the most efficient policy out of this dataset . One of the main problematic encountered within this setting is the value-function over-estimation problem ( Fujimoto et al. , 2019 ; Levine et al. , 2020 ; Kumar et al. , 2019a ; Wu et al. , 2019 ) . Indeed , when the dataset only covers a small subset of the state-action space , the agent typically wrongly extrapolates the value functions related to pairs far from the dataset , denoted as Out-Of-Distribution ( OOD ) . This error is then used as a target in the learning process , leading to highly increasing estimates which may lead to a disastrous learned policy . This problem has been extensively studied in the traditional online Reinforcement Learning setting ( Sutton & Barto , 1998 ) . However in this case , this issue is quite naturally alleviated since when a value function becomes over-optimistic , it will drive the agent to visit the related state-action pair . Therefore , the agent will have the chance to directly check the consequences of such pairs and its estimation can be corrected . Some modifications , mostly relying on reducing these errors with Ensemble Learning ( van Hasselt , 2010 ; van Hasselt et al. , 2016 ; Anschel et al. , 2017 ; Lee et al. , 2021b ) , can also be used to enhance learning . In Batch RL , since no inspection can be done to investigate the accuracy of the estimates , those methods can not be used and hence classical deep Off-Policy methods dramatically fail in this setting ( Fujimoto et al. , 2019 ; Levine et al. , 2020 ) . Additional parts must be introduced to build robust and efficient agents . An important family of state-of-the art algorithms addressing this problem focus on constraining the learned policy to stay close to the dataset either by minimizing its distance to the behavioral policy ( Siegel et al. , 2020a ; Wu et al. , 2019 ; Kumar et al. , 2019b ) or by penalizing unseen state-action pairs ( Luo et al. , 2019 ; Kumar et al. , 2020 ; Yu et al. , 2021 ) . Especially , Kumar et al . ( 2020 ) propose to optimize a lower bound on the value functions and use this lower bound as a proxy in the policy optimization process . This lower bound should be tight when state-action pairs are contained in the dataset and loosened otherwise . Following this purpose , they proposed Conservative Q-Learning ( CQL ) that introduces a penalization to under-estimate value functions associated to OOD actions . On top of driving the agent to stay close to the dataset transitions , this method gives a chance to standard Off-Policy learning as estimates will have a reasonable scale during learning . Nevertheless , given the lack of information regarding the behavioural policy , their regularization remains abrupt and might be problematic in practice . First , the resulting lower bound is loosened with the recommended distributions . Second , their approach does not consider actions ’ neighbourhoods and could therefore over-penalize interesting action space ’ s regions . In this paper , we tackle these problems by introducing a novel penalization based on an estimation of the dataset ’ s probability density function instead of the behavioural policy . Besides being easier to learn that the behavioural policy , this density is able to provide information on which regions are near the dataset and thus safe to learn from , and which are the ones far from it and prone to over-estimation errors . On top of instigating those relevant information , we show that this new regularization leads to a more appropriate lower bound on the value function . We show how to integrate this penalization in a CQL-like algorithm and derive a novel algorithm called Density Conservative Q-Learning ( D-CQL ) . We finally investigate empirically the relevance of our approach . 2 PRELIMINARIES AND MOTIVATIONS . 2.1 NOTATIONS AND POLICY ITERATION . The agent-environment framework is modeled as a Markov Decision Process ( MDP ) ( S , A , r , P , γ ) defined by a state space S , an action space A , a transition kernel P : S × A → ∆ ( S ) , a reward function r : S × A → [ Rmin , Rmax ] and a discount factor γ ∈ ] 0 , 1 [ . A policy π : S → ∆ ( A ) is a decision rule mapping a state over a distribution of actions . The value of a policy is measured through the value function V π ( s ) = EP [ ∑ t=0 γ tr ( st , at ) | s0 = s , at ∼ π ( ·|st ) ] and its associated Q-value function Qπ ( s , a ) = EP [ ∑ t=0 γ tr ( st , at ) | s0 = s , a0 = a , at ∼ π ( ·|st ) ∀t ≥ 1 ] . The goal is to find the policy maximizing these value functions . Let r , Q be matrices associated to all state-action pairs and Pπ be the transition matrix induced by the policy π : Pπ ( s , s′ ) = Ea∼π ( ·|s ) P ( s′|s , a ) . Value functions can be learned by iterating the Bellman operator defined for the Q-function as BπQ = r + γPπQ where PπQ ( s , a ) = Es′∼P ( ·|s , a ) , a′∼π ( ·|s ) [ Q ( s′ , a′ ) ] . This operator is a γ-contraction ( Puterman , 1994 ) , hence having a unique fixed point Qπ . Many classic recent algorithms rely on the Policy Iteration scheme ( Lillicrap et al. , 2016 ; Fujimoto et al. , 2018 ; Haarnoja et al. , 2018 ) , where the agent alternates between Policy Evaluation ( PE ) with the computation of Qπ and Policy Improvement ( PI ) by maximizing the learned Q-values Qk+1 ← arg min Q Bπ k Qk −Q , ( policy evaluation ) πk+1 ← arg max π Ea∼π [ Qk+1 ( · , a ) ] . ( policy improvement ) This iterative process converges towards the optimal policy ( Sutton & Barto , 1998 ; Santos & Rust , 2004 ) . Since no knowledge is assumed on the environment , these steps are commonly solved using samples from a dataset D = { ( si , ai , ri ) Ni=1 } . The expectation under P ( ·|s , a ) is now estimated using sample and leads to the empirical Bellman operator B̂ . We slightly abuse notations and consider D is also a distribution on S ×A× S. The procedure is now under the dataset expectation Qk+1 ← arg min Q Es , a , s′∼D [ ( B̂π k Qk ( s , a ) −Q ( s , a ) ) 2 ] , ( approximate policy evaluation ) πk+1 ← arg max π Es∼D , a∼π [ Qk+1 ( s , a ) ] . ( approximate policy improvement ) The Q-values and the policy π are commonly estimated using Neural Networks that are trained with gradient optimization methods . In the approximate policy evaluation step , an important aspect is the expectation of actions from π ( ·|s′ ) in the bootstrapped target . This is where OOD actions may appear and become a decisive topic : extrapolation errors emerge , are then back-propagated to eventually lead to highly over-optimistic estimates . In the Online setting , the dataset is constantly updated with samples gathered with the learned policy , coping with this problem . Note there are no OOD states in the Bellman update as the empirical operator only depends on a seen state s′ . They might appear on model-based algorithms ( Yu et al. , 2021 ) but are for now out of the scope of model-free algorithms . An interesting future direction would be to consider them as well . In this work , we focus on the Batch setting where the agent can not interact with the environment . The agent dataset is now fixed and has been gathered with an unknown behavioural policy πβ . No knowledge is assumed on πβ as the dataset can come from different sources : optimal control , human or a mixture of them ( Fu et al. , 2020 ; Gülçehre et al. , 2020 ) . Actions that belong to the dataset distribution given the state s are denoted as In-Distribution ( ID ) and the ones far from it are Out-Of-Distribution ( OOD ) . A major challenge is to find a good trade-off between staying close to the dataset to avoid extrapolation errors and taking some liberty to overcome the suboptimality of the behaviour policy . 2.2 CONSERVATIVE Q-LEARNING . This approach addresses the Q-values over-estimation problem exacerbated in Batch RL . As a reminder , the Policy Evaluation step relies on a bootstrapped target that back-propagates any extrapolation error during learning . This error may be of high importance when the consequences of a given state-action pair are unknown , and could lead to highly optimistic estimates . This problem is intensified in Batch RL . First , the dataset often describes a small subset of the state-action space S ×A thus OOD actions are very likely to appear . Second , the agent never gets the chance the visit the state-action pairs related to high Q-values and can not correct its possibly wrong estimations . At this step , Kumar et al . ( 2020 ) propose to penalize the actions not described by the dataset while keeping intact actions from the dataset with proper information . This greatly stabilizes learning : the agent does not have to deal with drastically high estimates and therefore gives the agent a chance to learn accurate Q-values thanks to the empirical Bellman operator . It also implicitly drives the agent to favor state-action pairs described in the dataset . This penalization translates into minimizing the Q-values on an arbitrary distribution µ ( e.g . uniform ) and maximizing them on πβ formally expressed as follows Q̂k+1 ← arg min Q αEs∼D [ ( Ea∼µ ( ·|s ) [ Q ( s , a ) ] − Ea∼πβ ( ·|s ) [ Q ( s , a ) ] ) ] +Es , a , s′∼D [ ( B̂πkQ̂k ( s , a ) −Q ( s , a ) ) 2 ] . ( 1 ) Assuming the absence of sampling errors and suppµ ⊂ suppπβ , this update provides a lowerbound on the expected Q-values on the distribution µ : Ea∼µ [ QCQL ( s , a ) ] ≤ Ea∼µ [ Qπ ( s , a ) ] for all s ∈ S with α > 0 . When µ is the current policy π , the lower bound is in the value function , that is V CQL ( s ) ≤ V π ( s ) . This property may be highly desirable on applications where the agent must check if the current value function is above a certain threshold such as Constrained Policy Optimization ( Achiam et al. , 2017 ) and Conservative Exploration ( Garcelon et al. , 2020 ) . However , for the common setting where µ is a uniform distribution over the action space , the lower bound is loosened . While a certain control in the Q-values is kept , both the value and point-wise inequalities are lost . Another point of attention is the maximization term relying on the knowledge of the behavioral policy . In the general setting , it is out of reach as the dataset may be gathered in various ways . Kumar et al . ( 2020 ) propose to use the empirical dataset distribution π̂β ( a|s ) = ∑ s′ , a′∈D 1 [ s′=s , a′=a ] ∑ s′∈D 1 [ s′=s ] , that may become a Dirac over the dataset actions especially when the action space A is continuous . Not only does this breaks the assumption suppµ ⊂ supp π̂β ( as in practice suppπβ 6⊂ supp π̂β ) , it also might be problematic on the penalization itself : the distance between the selected actions and the dataset is no longer considered . In other words , actions that are not appearing in the dataset will be equally penalized no matter their closeness with the dataset D. Thus , the regularization pushes the agent to reproduce the behavioural policy , not enhance it . | The paper aims to improve CQL by providing a better compromise between learning a good policy and staying close to the behavior policy. The authors introduce a weighting scheme into the CQL algorithm, which assigns small weights to those state-action pairs close to the dataset and large weight to the OOD actions. The effect is the gap between the underestimated values of those in-distribution state-action pairs and their true values are closer (i.e., the lower bound is tighter). The calculation of the weighting scheme requires a density estimation, and the authors propose to use normalizing flow to learn the density function. Then, the authors connect their weighted updating rule and the one by penalizing the KL divergence between learned policy and behavior policy. Experiments are presented to show the effect of their version of the CQL method. | SP:af9afdbb60478070450f3c028792aa38b3bdbc2d |
Density Estimation for Conservative Q-Learning | 1 INTRODUCTION . Transposing the recent successes of Reinforcement Learning ( RL ) such as recommendation systems ( Rojanavasu et al. , 2005 ; Zheng et al. , 2018 ) , video games ( Mnih et al. , 2013 ) , go ( Silver et al. , 2017 ) to real-world systems is not possible without facing many challenges ( Dulac-Arnold et al. , 2021 ) . One of those challenges is that in many real-world applications , direct access to the system can be limited , and sometimes even forbidden . This can be due to various reasons , an important one being that a learning controller may incorrectly assess the implications of its actions and damage the system . Batch , or offline , Reinforcement Learning ( Lange et al. , 2012 ; Levine et al. , 2020 ) provides a framework to address those RL problems when no interaction with the system is allowed . In place , the learner is given a dataset collected under a ( possibly unknown ) behavioural policy and has to derive the most efficient policy out of this dataset . One of the main problematic encountered within this setting is the value-function over-estimation problem ( Fujimoto et al. , 2019 ; Levine et al. , 2020 ; Kumar et al. , 2019a ; Wu et al. , 2019 ) . Indeed , when the dataset only covers a small subset of the state-action space , the agent typically wrongly extrapolates the value functions related to pairs far from the dataset , denoted as Out-Of-Distribution ( OOD ) . This error is then used as a target in the learning process , leading to highly increasing estimates which may lead to a disastrous learned policy . This problem has been extensively studied in the traditional online Reinforcement Learning setting ( Sutton & Barto , 1998 ) . However in this case , this issue is quite naturally alleviated since when a value function becomes over-optimistic , it will drive the agent to visit the related state-action pair . Therefore , the agent will have the chance to directly check the consequences of such pairs and its estimation can be corrected . Some modifications , mostly relying on reducing these errors with Ensemble Learning ( van Hasselt , 2010 ; van Hasselt et al. , 2016 ; Anschel et al. , 2017 ; Lee et al. , 2021b ) , can also be used to enhance learning . In Batch RL , since no inspection can be done to investigate the accuracy of the estimates , those methods can not be used and hence classical deep Off-Policy methods dramatically fail in this setting ( Fujimoto et al. , 2019 ; Levine et al. , 2020 ) . Additional parts must be introduced to build robust and efficient agents . An important family of state-of-the art algorithms addressing this problem focus on constraining the learned policy to stay close to the dataset either by minimizing its distance to the behavioral policy ( Siegel et al. , 2020a ; Wu et al. , 2019 ; Kumar et al. , 2019b ) or by penalizing unseen state-action pairs ( Luo et al. , 2019 ; Kumar et al. , 2020 ; Yu et al. , 2021 ) . Especially , Kumar et al . ( 2020 ) propose to optimize a lower bound on the value functions and use this lower bound as a proxy in the policy optimization process . This lower bound should be tight when state-action pairs are contained in the dataset and loosened otherwise . Following this purpose , they proposed Conservative Q-Learning ( CQL ) that introduces a penalization to under-estimate value functions associated to OOD actions . On top of driving the agent to stay close to the dataset transitions , this method gives a chance to standard Off-Policy learning as estimates will have a reasonable scale during learning . Nevertheless , given the lack of information regarding the behavioural policy , their regularization remains abrupt and might be problematic in practice . First , the resulting lower bound is loosened with the recommended distributions . Second , their approach does not consider actions ’ neighbourhoods and could therefore over-penalize interesting action space ’ s regions . In this paper , we tackle these problems by introducing a novel penalization based on an estimation of the dataset ’ s probability density function instead of the behavioural policy . Besides being easier to learn that the behavioural policy , this density is able to provide information on which regions are near the dataset and thus safe to learn from , and which are the ones far from it and prone to over-estimation errors . On top of instigating those relevant information , we show that this new regularization leads to a more appropriate lower bound on the value function . We show how to integrate this penalization in a CQL-like algorithm and derive a novel algorithm called Density Conservative Q-Learning ( D-CQL ) . We finally investigate empirically the relevance of our approach . 2 PRELIMINARIES AND MOTIVATIONS . 2.1 NOTATIONS AND POLICY ITERATION . The agent-environment framework is modeled as a Markov Decision Process ( MDP ) ( S , A , r , P , γ ) defined by a state space S , an action space A , a transition kernel P : S × A → ∆ ( S ) , a reward function r : S × A → [ Rmin , Rmax ] and a discount factor γ ∈ ] 0 , 1 [ . A policy π : S → ∆ ( A ) is a decision rule mapping a state over a distribution of actions . The value of a policy is measured through the value function V π ( s ) = EP [ ∑ t=0 γ tr ( st , at ) | s0 = s , at ∼ π ( ·|st ) ] and its associated Q-value function Qπ ( s , a ) = EP [ ∑ t=0 γ tr ( st , at ) | s0 = s , a0 = a , at ∼ π ( ·|st ) ∀t ≥ 1 ] . The goal is to find the policy maximizing these value functions . Let r , Q be matrices associated to all state-action pairs and Pπ be the transition matrix induced by the policy π : Pπ ( s , s′ ) = Ea∼π ( ·|s ) P ( s′|s , a ) . Value functions can be learned by iterating the Bellman operator defined for the Q-function as BπQ = r + γPπQ where PπQ ( s , a ) = Es′∼P ( ·|s , a ) , a′∼π ( ·|s ) [ Q ( s′ , a′ ) ] . This operator is a γ-contraction ( Puterman , 1994 ) , hence having a unique fixed point Qπ . Many classic recent algorithms rely on the Policy Iteration scheme ( Lillicrap et al. , 2016 ; Fujimoto et al. , 2018 ; Haarnoja et al. , 2018 ) , where the agent alternates between Policy Evaluation ( PE ) with the computation of Qπ and Policy Improvement ( PI ) by maximizing the learned Q-values Qk+1 ← arg min Q Bπ k Qk −Q , ( policy evaluation ) πk+1 ← arg max π Ea∼π [ Qk+1 ( · , a ) ] . ( policy improvement ) This iterative process converges towards the optimal policy ( Sutton & Barto , 1998 ; Santos & Rust , 2004 ) . Since no knowledge is assumed on the environment , these steps are commonly solved using samples from a dataset D = { ( si , ai , ri ) Ni=1 } . The expectation under P ( ·|s , a ) is now estimated using sample and leads to the empirical Bellman operator B̂ . We slightly abuse notations and consider D is also a distribution on S ×A× S. The procedure is now under the dataset expectation Qk+1 ← arg min Q Es , a , s′∼D [ ( B̂π k Qk ( s , a ) −Q ( s , a ) ) 2 ] , ( approximate policy evaluation ) πk+1 ← arg max π Es∼D , a∼π [ Qk+1 ( s , a ) ] . ( approximate policy improvement ) The Q-values and the policy π are commonly estimated using Neural Networks that are trained with gradient optimization methods . In the approximate policy evaluation step , an important aspect is the expectation of actions from π ( ·|s′ ) in the bootstrapped target . This is where OOD actions may appear and become a decisive topic : extrapolation errors emerge , are then back-propagated to eventually lead to highly over-optimistic estimates . In the Online setting , the dataset is constantly updated with samples gathered with the learned policy , coping with this problem . Note there are no OOD states in the Bellman update as the empirical operator only depends on a seen state s′ . They might appear on model-based algorithms ( Yu et al. , 2021 ) but are for now out of the scope of model-free algorithms . An interesting future direction would be to consider them as well . In this work , we focus on the Batch setting where the agent can not interact with the environment . The agent dataset is now fixed and has been gathered with an unknown behavioural policy πβ . No knowledge is assumed on πβ as the dataset can come from different sources : optimal control , human or a mixture of them ( Fu et al. , 2020 ; Gülçehre et al. , 2020 ) . Actions that belong to the dataset distribution given the state s are denoted as In-Distribution ( ID ) and the ones far from it are Out-Of-Distribution ( OOD ) . A major challenge is to find a good trade-off between staying close to the dataset to avoid extrapolation errors and taking some liberty to overcome the suboptimality of the behaviour policy . 2.2 CONSERVATIVE Q-LEARNING . This approach addresses the Q-values over-estimation problem exacerbated in Batch RL . As a reminder , the Policy Evaluation step relies on a bootstrapped target that back-propagates any extrapolation error during learning . This error may be of high importance when the consequences of a given state-action pair are unknown , and could lead to highly optimistic estimates . This problem is intensified in Batch RL . First , the dataset often describes a small subset of the state-action space S ×A thus OOD actions are very likely to appear . Second , the agent never gets the chance the visit the state-action pairs related to high Q-values and can not correct its possibly wrong estimations . At this step , Kumar et al . ( 2020 ) propose to penalize the actions not described by the dataset while keeping intact actions from the dataset with proper information . This greatly stabilizes learning : the agent does not have to deal with drastically high estimates and therefore gives the agent a chance to learn accurate Q-values thanks to the empirical Bellman operator . It also implicitly drives the agent to favor state-action pairs described in the dataset . This penalization translates into minimizing the Q-values on an arbitrary distribution µ ( e.g . uniform ) and maximizing them on πβ formally expressed as follows Q̂k+1 ← arg min Q αEs∼D [ ( Ea∼µ ( ·|s ) [ Q ( s , a ) ] − Ea∼πβ ( ·|s ) [ Q ( s , a ) ] ) ] +Es , a , s′∼D [ ( B̂πkQ̂k ( s , a ) −Q ( s , a ) ) 2 ] . ( 1 ) Assuming the absence of sampling errors and suppµ ⊂ suppπβ , this update provides a lowerbound on the expected Q-values on the distribution µ : Ea∼µ [ QCQL ( s , a ) ] ≤ Ea∼µ [ Qπ ( s , a ) ] for all s ∈ S with α > 0 . When µ is the current policy π , the lower bound is in the value function , that is V CQL ( s ) ≤ V π ( s ) . This property may be highly desirable on applications where the agent must check if the current value function is above a certain threshold such as Constrained Policy Optimization ( Achiam et al. , 2017 ) and Conservative Exploration ( Garcelon et al. , 2020 ) . However , for the common setting where µ is a uniform distribution over the action space , the lower bound is loosened . While a certain control in the Q-values is kept , both the value and point-wise inequalities are lost . Another point of attention is the maximization term relying on the knowledge of the behavioral policy . In the general setting , it is out of reach as the dataset may be gathered in various ways . Kumar et al . ( 2020 ) propose to use the empirical dataset distribution π̂β ( a|s ) = ∑ s′ , a′∈D 1 [ s′=s , a′=a ] ∑ s′∈D 1 [ s′=s ] , that may become a Dirac over the dataset actions especially when the action space A is continuous . Not only does this breaks the assumption suppµ ⊂ supp π̂β ( as in practice suppπβ 6⊂ supp π̂β ) , it also might be problematic on the penalization itself : the distance between the selected actions and the dataset is no longer considered . In other words , actions that are not appearing in the dataset will be equally penalized no matter their closeness with the dataset D. Thus , the regularization pushes the agent to reproduce the behavioural policy , not enhance it . | This paper focuses on the trade-off between extrapolation error and over-penalization for batch reinforcement learning. Unlike the CQL to penalize uniformly any actions that do not belong to the dataset, this paper proposes to relax the strong penalization imposed on the out-of-distribution actions. Specifically, the proposed D-CQL considers the uncertainty on OOD actions, and only supresses the Q-values of actions which belong to OOD data with large probability. Thus the D-CQL is considered to have a better exploration when the dataset includes some suboptimal behaviors. | SP:af9afdbb60478070450f3c028792aa38b3bdbc2d |
Multilevel physics informed neural networks (MPINNs) | 1 INTRODUCTION . The approximation of the solution of partial differential equations ( PDEs ) by artificial neural networks ( ANNs ) dates back to the 90s ( Lagaris et al. , 1998 ) , but it is only in these last years that this topic fully emerged and gave rise to an active field of research . ANNs have been used for many different purposes in this field : for the numerical solution of either direct problems ( Di Muro & Ferrari , 2008 ; Raissi et al. , 2019 ; Rudd , 2013 ; Mishra , 2018 ; Sirignano & Spiliopoulos , 2018 ; Luo & Yang , 2020 ) or of inverse problems ( Raissi & Karniadakis , 2018 ; Raissi et al. , 2017b ) , to reconstruct the equation from given data ( Long et al. , 2018 ; Rudy et al. , 2017 ; Schaeffer , 2017 ) , to learn dynamics from incomplete information and physical priors ( Ayed et al. , 2019 ; De Bézenac et al. , 2019 ) . ODE solvers have even been used for supervised learning problems ( Chen et al. , 2018 ) . Also the interpretation of successful ANNs like ResNET as ODE discretization schemes is an important direction ( Ruthotto & Haber , 2019 ; Lu et al. , 2018 ) , as well as the study of the issues of stability and robustness for different schemes ( Haber et al. , 2019 ; Chang et al. , 2018 ) . In this field , the most famous network architecture is the one of PINNs ( physics informed neural networks ) , introduced for the first time in Raissi et al . ( 2019 ; 2017a ; b ) . Since their introduction , the PINNs architecture has encountered a growing interest and the good performance observed in practice have been later supported by theoretical results . In Mishra & Molinaro ( 2020b ; a ) the authors propose rigorous estimates on the generalization error of PINNs approximating the solution of the direct and inverse problems for PDEs data assimilation problems in terms of the training error and number of training samples , while convergence results for the sequence of approximations to the solution of linear second-order elliptic and parabolic PDEs when the number of data grows are proposed in Shin et al . ( 2020 ) . Despite their good performance , the training of such networks may still represent a challenge in case of difficult problems , such as highly nonlinear problems . In this case really large networks may be needed to correctly represent the sought solution , leading to the need of solving a large-scale optimization problem , for which standard training methods may show a slow convergence , and it may be difficult to properly tune the learning rate . When dealing with linear PDEs , multigrid ( MG ) methods are by far the most effective methods for the solution of large scale problems ( Hackbusch , 1985 ; Briggs et al. , 2000 ; Trottenberg et al. , 2000 ) . The improved performance of MG methods derives from the fact that alternating relaxations among fine and coarse grids allows us to more efficiently reduce all the components of the error , smooth and oscillatory ones . The same behaviour can be observed in multilevel optimization for nonlinear problems ( Gratton et al. , 2008 ; Groß & Krause , 2009 ; Kočvara & Mohammed , 2016 ; Lewis & Nash , 2005 ; 2013 ; Nash , 2000 ; 2014 ; Wen & Goldfarb , 2009 ; Calandra et al. , 2021 ) , which still exploits representations of the problem at different scales . If in MG methods the residual of the nonlinear equation is transferred from a grid to the other , in such schemes the variables of the optimization problems are the object of the transfer operators . It is evident that the application of such techniques to neural network training is not straightforward , as the transfer operators usually used in MG and multilevel optimization ( standard interpolation and restriction operators ) requires the quantities that need to be transferred to possess an underlying geometrical structure in order to be effective . In the case of a training problem , the variables subject to optimization are the weights and biases of the network , which do not possess any geometrical structure . To derive a multilevel method for the training problem , it is necessary to design multilevel transfer operators differently and it is not evident how to do that . Previous contributions have been made in this direction in Calandra et al . ( 2020 ) . The authors propose a strategy to transfer the weights that is inspired to algebraic multigrid ( Ruge & Stüben , 1987 ; Brandt , 2000 ) , which however requires the knowledge of the Hessian matrix of the loss function , which is impractical for large scale problems . Moreover the proposed approach is designed for one layer neural networks , which limits the range of applications of the approach . In this work we avoid this problem by following a completely different path : diverging from classical multilevel optimization methods and remaining closer to MG methods , we propose a multilevel PINN approach ( MPINN ) , based on writing the solution of the PDE as a sum of two terms , a fine and a coarse one . Each term is a PINN depending on a different number of parameters and trained on a different training set , which are optimized independently the one from the other , as each PINN has its own weights and training points that are not transferred from a network to the other one . As in classical MG , the method proceeds by alternating relaxations on the two levels , which in this case are epochs of training of each PINN . As it is common in the multilevel literature , the approach is presented in the two-levels framework , but by a recursive scheme it can be naturally extended to the multilevel case . In such case , the solution of the PDE will be written as the sum of a finite number of increasingly coarser networks . Interestingly , this approach allows us to reproduce the acceleration typically observed in classical MG methods , in the context of the training of PINNs . Related work The idea of exploiting multiple scales in learning is not new . We mention for instance Haber et al . ( 2018 ) ; Ke et al . ( 2017 ) that propose multiscale methods for convolutional neural networks , which connect low-resolution and high-resolution data , leading to new training strategies that gradually increase the depths of the CNN while re-using parameters for initializations . A similar idea is employed in Cai & Xu ( 2019 ) , but in the context of partial differential equations . Multi-scale deep neural networks are introduced , based on specific techniques to convert the learning or approximation of high frequency data to that of a low frequency ones . Still in this context , Fan et al . ( 2019 ) introduce neural networks with a novel multiscale structure inspired by hierarchical matrices , which are used to approximate discrete nonlinear maps obtained from discretized nonlinear partial differential equations , such as those arising from nonlinear Schrödinger equations . In Chung et al . ( 2017 ) the authors propose multiscale recurrent networks , that can capture the latent hierarchical structure in temporal sequences by encoding the dependencies with different timescales . With respect to these methods , our is closer in spirit to classical multigrid and enables at the same time a multilevel structure in the space of the network ’ s parameters and in that of the samples . An approach similar in spirit to ours , which is derived from another classical technique used for the solution of PDEs ( domain decomposition rather than multigrid ) is extended physics informed neural networks ( XPINNs ) ( Jagtap & Karniadakis , 2020 ; Hu et al. , 2021 ) . This approach has been theoretically and empirically proved to improve standard PINNs by using multiple sub-networks with different complexities for each subdomain . This is very related to our work : instead of decomposing the domain space , MPINNs are decomposing the solution components for fine and coarse parts . Structure of the manuscript The manuscript is organised as follows . In Section 2 we briefly review the standard PINNs architecture and in Section 3 the standard multigrid method . Section 4 represents the main contribution of this work , where we introduce the multilevel PINNs . In Section 5 , we show numerical evidence of the advantage of the MPINNs over classical PINNs . Conclusions and perspectives are presented in Section 6 . 2 PHYSICS INFORMED NEURAL NETWORKS . PINNs ( Raissi et al. , 2019 ) are neural networks that are trained to approximate the solution u ( z ) of a partial differential equation . To do that , a loss function is defined that is composed of two terms , a term taking into account the physical information and a data-fidelity term . Consider for instance a stationary PDE written as : D ( z , u ( z ) ) = f ( z ) , z ∈ Ω , B ( z , u ( z ) ) = fB ( z ) , z ∈ ∂Ω , where Ω ⊆ Rd , d ≥ 1 , is a connected subset , ∂Ω is the boundary of Ω , D is a differential operator , B is an operator defining the boundary conditions , and f , fB : Rd → R are given functions . For this problem the loss function reads as : L ( p ) = RMSEres ( p ) +RMSEdata ( p ) ( 1a ) RMSEres ( p ) = λr Nr ‖D ( z , ûN ( p ; zr ) ) − f ( zr ) ‖2 , ( 1b ) RMSEdata ( p ) = λm Nm ‖ûN ( p ; zm ) − u ( zm ) ‖2 , ( 1c ) where zr is a vector of Nr sample points in Ω in which the residual of the PDE is evaluated and zm is a vector of Nm sample points in Ω ∪ ∂Ω in which the values of the solution are known ; λr , λm are weights to balance the two components and ûN ( p ; z ) is the sought approximation , which during training is a function of p , the set of N weights and biases . Notice that training a PINN does not require the discretization of the operatorD , asD ( ûN ( p ; z ) ) can be directly computed . After training we get the desired approximation ûN ( p∗ ; z ) to u ( z ) , which depends on the number of parametres used to parametrize the network , N , which is a hyperparameter fixed before the training . 3 CLASSICAL MULTIGRID METHODS . In this section we briefly review the basic idea behind classical multigrid ( MG ) methods ( Hackbusch , 1985 ) . Consider a linear system arising from the discretization of a PDE : Au = f. Assume to have at disposal some approximation v to the exact solution . There are two important measures of v as an approximation to u . One is the error , which is given simply by e = u− v , and is however just as inaccessible as the exact solution itself . However , a computable measure of how well v approximates u is the residual , given by r = f − Av . The residual is simply the amount by which the approximation v fails to satisfy the original problem Au = f . Assuming that the solution of the linear system is unique , we have r = 0 if and only if e = 0 ( however , it may not be true that when r is small in norm , e is also small in norm ) . Using the definitions of r and e , we can derive the so-called residual equation , an extremely important relationship between the error and the residual : Ae = r. Given the approximation v , it is easy to compute the residual . To improve the approximation v , we might solve the residual equation for e and compute a new approximation using the definition of the error u = v + e. Usually a relaxation scheme is used to solve the linear systems . Many relaxation schemes possess the so called smoothing property , meaning that they are efficient in eliminating the oscillatory modes of the error , while they tend to leave the smooth ones . This is a limiting property of such methods , which is corrected by multigrid methods thanks to this key observation : passing from a fine grid Ωh to a coarse grid ΩH , a mode becomes more oscillatory . The relaxation method will thus efficiently remove the oscillatory components of the error if used on a coarse grid . Mutigrid methods obtain good speed ups by alternating relaxations among fine and coarse grids . The main scheme of MG is the following . Assume to have discretized the problem with two different resolutions , obtaining two subproblems : a fine one Ahuh = fh and a coarse one AHuH = fH , and assume to have at disposal two linear operators R ( restriction ) and P ( prolongation ) to transfer information from a grid to the other one . A V-cycle of MG on two levels follows this scheme : • Relax ν1 times on Ahuh = fh to obtain an approximation vh • Compute the residual rh = fh −Avh . • Project the residual on the coarse level rH = Rrh • Relax ν2 times on the residual equation AHeH = rH to obtain eH • Correct the fine level approximation vh = vh + eh , where eh = PeH . This procedure is the basis of what is called the correction scheme . Having relaxed on the fine grid until convergence deteriorates , we relax on the residual equation on a coarser grid to obtain an approximation to the error itself . We then return to the fine grid to correct the approximation first obtained there . Multiple V-cycles can be performed and the procedure can be extended in a recursive way to more than two levels . It is well-known that MG outperform Gauss Siedel method and already two-grid algorithm can result in tremendous reduction in the iteration count ( Mazumder , 2016 ) . | This paper proposes multilevel physics informed neural networks (MPINNs). When compared to standard PINNs, MPINN uses additional networks for different levels with fine and coarse terms in the view of two-levels. By reclusive definition, this can be generalized to any multi-levels. The method is motivated via classical multigrid method, and is empirically studied with 3 simple ODEs/PDEs. | SP:84574b6e98bdea89ccb8511b0555c4f5b2de844b |
Multilevel physics informed neural networks (MPINNs) | 1 INTRODUCTION . The approximation of the solution of partial differential equations ( PDEs ) by artificial neural networks ( ANNs ) dates back to the 90s ( Lagaris et al. , 1998 ) , but it is only in these last years that this topic fully emerged and gave rise to an active field of research . ANNs have been used for many different purposes in this field : for the numerical solution of either direct problems ( Di Muro & Ferrari , 2008 ; Raissi et al. , 2019 ; Rudd , 2013 ; Mishra , 2018 ; Sirignano & Spiliopoulos , 2018 ; Luo & Yang , 2020 ) or of inverse problems ( Raissi & Karniadakis , 2018 ; Raissi et al. , 2017b ) , to reconstruct the equation from given data ( Long et al. , 2018 ; Rudy et al. , 2017 ; Schaeffer , 2017 ) , to learn dynamics from incomplete information and physical priors ( Ayed et al. , 2019 ; De Bézenac et al. , 2019 ) . ODE solvers have even been used for supervised learning problems ( Chen et al. , 2018 ) . Also the interpretation of successful ANNs like ResNET as ODE discretization schemes is an important direction ( Ruthotto & Haber , 2019 ; Lu et al. , 2018 ) , as well as the study of the issues of stability and robustness for different schemes ( Haber et al. , 2019 ; Chang et al. , 2018 ) . In this field , the most famous network architecture is the one of PINNs ( physics informed neural networks ) , introduced for the first time in Raissi et al . ( 2019 ; 2017a ; b ) . Since their introduction , the PINNs architecture has encountered a growing interest and the good performance observed in practice have been later supported by theoretical results . In Mishra & Molinaro ( 2020b ; a ) the authors propose rigorous estimates on the generalization error of PINNs approximating the solution of the direct and inverse problems for PDEs data assimilation problems in terms of the training error and number of training samples , while convergence results for the sequence of approximations to the solution of linear second-order elliptic and parabolic PDEs when the number of data grows are proposed in Shin et al . ( 2020 ) . Despite their good performance , the training of such networks may still represent a challenge in case of difficult problems , such as highly nonlinear problems . In this case really large networks may be needed to correctly represent the sought solution , leading to the need of solving a large-scale optimization problem , for which standard training methods may show a slow convergence , and it may be difficult to properly tune the learning rate . When dealing with linear PDEs , multigrid ( MG ) methods are by far the most effective methods for the solution of large scale problems ( Hackbusch , 1985 ; Briggs et al. , 2000 ; Trottenberg et al. , 2000 ) . The improved performance of MG methods derives from the fact that alternating relaxations among fine and coarse grids allows us to more efficiently reduce all the components of the error , smooth and oscillatory ones . The same behaviour can be observed in multilevel optimization for nonlinear problems ( Gratton et al. , 2008 ; Groß & Krause , 2009 ; Kočvara & Mohammed , 2016 ; Lewis & Nash , 2005 ; 2013 ; Nash , 2000 ; 2014 ; Wen & Goldfarb , 2009 ; Calandra et al. , 2021 ) , which still exploits representations of the problem at different scales . If in MG methods the residual of the nonlinear equation is transferred from a grid to the other , in such schemes the variables of the optimization problems are the object of the transfer operators . It is evident that the application of such techniques to neural network training is not straightforward , as the transfer operators usually used in MG and multilevel optimization ( standard interpolation and restriction operators ) requires the quantities that need to be transferred to possess an underlying geometrical structure in order to be effective . In the case of a training problem , the variables subject to optimization are the weights and biases of the network , which do not possess any geometrical structure . To derive a multilevel method for the training problem , it is necessary to design multilevel transfer operators differently and it is not evident how to do that . Previous contributions have been made in this direction in Calandra et al . ( 2020 ) . The authors propose a strategy to transfer the weights that is inspired to algebraic multigrid ( Ruge & Stüben , 1987 ; Brandt , 2000 ) , which however requires the knowledge of the Hessian matrix of the loss function , which is impractical for large scale problems . Moreover the proposed approach is designed for one layer neural networks , which limits the range of applications of the approach . In this work we avoid this problem by following a completely different path : diverging from classical multilevel optimization methods and remaining closer to MG methods , we propose a multilevel PINN approach ( MPINN ) , based on writing the solution of the PDE as a sum of two terms , a fine and a coarse one . Each term is a PINN depending on a different number of parameters and trained on a different training set , which are optimized independently the one from the other , as each PINN has its own weights and training points that are not transferred from a network to the other one . As in classical MG , the method proceeds by alternating relaxations on the two levels , which in this case are epochs of training of each PINN . As it is common in the multilevel literature , the approach is presented in the two-levels framework , but by a recursive scheme it can be naturally extended to the multilevel case . In such case , the solution of the PDE will be written as the sum of a finite number of increasingly coarser networks . Interestingly , this approach allows us to reproduce the acceleration typically observed in classical MG methods , in the context of the training of PINNs . Related work The idea of exploiting multiple scales in learning is not new . We mention for instance Haber et al . ( 2018 ) ; Ke et al . ( 2017 ) that propose multiscale methods for convolutional neural networks , which connect low-resolution and high-resolution data , leading to new training strategies that gradually increase the depths of the CNN while re-using parameters for initializations . A similar idea is employed in Cai & Xu ( 2019 ) , but in the context of partial differential equations . Multi-scale deep neural networks are introduced , based on specific techniques to convert the learning or approximation of high frequency data to that of a low frequency ones . Still in this context , Fan et al . ( 2019 ) introduce neural networks with a novel multiscale structure inspired by hierarchical matrices , which are used to approximate discrete nonlinear maps obtained from discretized nonlinear partial differential equations , such as those arising from nonlinear Schrödinger equations . In Chung et al . ( 2017 ) the authors propose multiscale recurrent networks , that can capture the latent hierarchical structure in temporal sequences by encoding the dependencies with different timescales . With respect to these methods , our is closer in spirit to classical multigrid and enables at the same time a multilevel structure in the space of the network ’ s parameters and in that of the samples . An approach similar in spirit to ours , which is derived from another classical technique used for the solution of PDEs ( domain decomposition rather than multigrid ) is extended physics informed neural networks ( XPINNs ) ( Jagtap & Karniadakis , 2020 ; Hu et al. , 2021 ) . This approach has been theoretically and empirically proved to improve standard PINNs by using multiple sub-networks with different complexities for each subdomain . This is very related to our work : instead of decomposing the domain space , MPINNs are decomposing the solution components for fine and coarse parts . Structure of the manuscript The manuscript is organised as follows . In Section 2 we briefly review the standard PINNs architecture and in Section 3 the standard multigrid method . Section 4 represents the main contribution of this work , where we introduce the multilevel PINNs . In Section 5 , we show numerical evidence of the advantage of the MPINNs over classical PINNs . Conclusions and perspectives are presented in Section 6 . 2 PHYSICS INFORMED NEURAL NETWORKS . PINNs ( Raissi et al. , 2019 ) are neural networks that are trained to approximate the solution u ( z ) of a partial differential equation . To do that , a loss function is defined that is composed of two terms , a term taking into account the physical information and a data-fidelity term . Consider for instance a stationary PDE written as : D ( z , u ( z ) ) = f ( z ) , z ∈ Ω , B ( z , u ( z ) ) = fB ( z ) , z ∈ ∂Ω , where Ω ⊆ Rd , d ≥ 1 , is a connected subset , ∂Ω is the boundary of Ω , D is a differential operator , B is an operator defining the boundary conditions , and f , fB : Rd → R are given functions . For this problem the loss function reads as : L ( p ) = RMSEres ( p ) +RMSEdata ( p ) ( 1a ) RMSEres ( p ) = λr Nr ‖D ( z , ûN ( p ; zr ) ) − f ( zr ) ‖2 , ( 1b ) RMSEdata ( p ) = λm Nm ‖ûN ( p ; zm ) − u ( zm ) ‖2 , ( 1c ) where zr is a vector of Nr sample points in Ω in which the residual of the PDE is evaluated and zm is a vector of Nm sample points in Ω ∪ ∂Ω in which the values of the solution are known ; λr , λm are weights to balance the two components and ûN ( p ; z ) is the sought approximation , which during training is a function of p , the set of N weights and biases . Notice that training a PINN does not require the discretization of the operatorD , asD ( ûN ( p ; z ) ) can be directly computed . After training we get the desired approximation ûN ( p∗ ; z ) to u ( z ) , which depends on the number of parametres used to parametrize the network , N , which is a hyperparameter fixed before the training . 3 CLASSICAL MULTIGRID METHODS . In this section we briefly review the basic idea behind classical multigrid ( MG ) methods ( Hackbusch , 1985 ) . Consider a linear system arising from the discretization of a PDE : Au = f. Assume to have at disposal some approximation v to the exact solution . There are two important measures of v as an approximation to u . One is the error , which is given simply by e = u− v , and is however just as inaccessible as the exact solution itself . However , a computable measure of how well v approximates u is the residual , given by r = f − Av . The residual is simply the amount by which the approximation v fails to satisfy the original problem Au = f . Assuming that the solution of the linear system is unique , we have r = 0 if and only if e = 0 ( however , it may not be true that when r is small in norm , e is also small in norm ) . Using the definitions of r and e , we can derive the so-called residual equation , an extremely important relationship between the error and the residual : Ae = r. Given the approximation v , it is easy to compute the residual . To improve the approximation v , we might solve the residual equation for e and compute a new approximation using the definition of the error u = v + e. Usually a relaxation scheme is used to solve the linear systems . Many relaxation schemes possess the so called smoothing property , meaning that they are efficient in eliminating the oscillatory modes of the error , while they tend to leave the smooth ones . This is a limiting property of such methods , which is corrected by multigrid methods thanks to this key observation : passing from a fine grid Ωh to a coarse grid ΩH , a mode becomes more oscillatory . The relaxation method will thus efficiently remove the oscillatory components of the error if used on a coarse grid . Mutigrid methods obtain good speed ups by alternating relaxations among fine and coarse grids . The main scheme of MG is the following . Assume to have discretized the problem with two different resolutions , obtaining two subproblems : a fine one Ahuh = fh and a coarse one AHuH = fH , and assume to have at disposal two linear operators R ( restriction ) and P ( prolongation ) to transfer information from a grid to the other one . A V-cycle of MG on two levels follows this scheme : • Relax ν1 times on Ahuh = fh to obtain an approximation vh • Compute the residual rh = fh −Avh . • Project the residual on the coarse level rH = Rrh • Relax ν2 times on the residual equation AHeH = rH to obtain eH • Correct the fine level approximation vh = vh + eh , where eh = PeH . This procedure is the basis of what is called the correction scheme . Having relaxed on the fine grid until convergence deteriorates , we relax on the residual equation on a coarser grid to obtain an approximation to the error itself . We then return to the fine grid to correct the approximation first obtained there . Multiple V-cycles can be performed and the procedure can be extended in a recursive way to more than two levels . It is well-known that MG outperform Gauss Siedel method and already two-grid algorithm can result in tremendous reduction in the iteration count ( Mazumder , 2016 ) . | The authors adopt ideas from multigrid methods in solving PDEs to Physics Informed Neural Networks (PINNs). After giving a standard introduction to PINNs and Multigrid methods, they describe their approach. They decompose the PDE solution as a sum of a coarse and a fine term, and train independent PINNs to learn each term. The coarse PINN is chosen to have smaller capacity than the fine PINN, and is also (potentially) trained on fewer datapoints on the domain. Training proceeds by alternating training between the two PINNs: $\nu_1$ epochs on the fine PINN, followed by $\nu_2$ epochs on the coarse PINN, and repeat. The authors test their method on a linear non-homogeneous 1-D elliptic equation (trained with Adam or BFGS), a 2-D nonlinear equation, and 1-D Burger's equation. They compare a standard PINN vs a larger PINN vs their method (MPINN). | SP:84574b6e98bdea89ccb8511b0555c4f5b2de844b |
Multilevel physics informed neural networks (MPINNs) | 1 INTRODUCTION . The approximation of the solution of partial differential equations ( PDEs ) by artificial neural networks ( ANNs ) dates back to the 90s ( Lagaris et al. , 1998 ) , but it is only in these last years that this topic fully emerged and gave rise to an active field of research . ANNs have been used for many different purposes in this field : for the numerical solution of either direct problems ( Di Muro & Ferrari , 2008 ; Raissi et al. , 2019 ; Rudd , 2013 ; Mishra , 2018 ; Sirignano & Spiliopoulos , 2018 ; Luo & Yang , 2020 ) or of inverse problems ( Raissi & Karniadakis , 2018 ; Raissi et al. , 2017b ) , to reconstruct the equation from given data ( Long et al. , 2018 ; Rudy et al. , 2017 ; Schaeffer , 2017 ) , to learn dynamics from incomplete information and physical priors ( Ayed et al. , 2019 ; De Bézenac et al. , 2019 ) . ODE solvers have even been used for supervised learning problems ( Chen et al. , 2018 ) . Also the interpretation of successful ANNs like ResNET as ODE discretization schemes is an important direction ( Ruthotto & Haber , 2019 ; Lu et al. , 2018 ) , as well as the study of the issues of stability and robustness for different schemes ( Haber et al. , 2019 ; Chang et al. , 2018 ) . In this field , the most famous network architecture is the one of PINNs ( physics informed neural networks ) , introduced for the first time in Raissi et al . ( 2019 ; 2017a ; b ) . Since their introduction , the PINNs architecture has encountered a growing interest and the good performance observed in practice have been later supported by theoretical results . In Mishra & Molinaro ( 2020b ; a ) the authors propose rigorous estimates on the generalization error of PINNs approximating the solution of the direct and inverse problems for PDEs data assimilation problems in terms of the training error and number of training samples , while convergence results for the sequence of approximations to the solution of linear second-order elliptic and parabolic PDEs when the number of data grows are proposed in Shin et al . ( 2020 ) . Despite their good performance , the training of such networks may still represent a challenge in case of difficult problems , such as highly nonlinear problems . In this case really large networks may be needed to correctly represent the sought solution , leading to the need of solving a large-scale optimization problem , for which standard training methods may show a slow convergence , and it may be difficult to properly tune the learning rate . When dealing with linear PDEs , multigrid ( MG ) methods are by far the most effective methods for the solution of large scale problems ( Hackbusch , 1985 ; Briggs et al. , 2000 ; Trottenberg et al. , 2000 ) . The improved performance of MG methods derives from the fact that alternating relaxations among fine and coarse grids allows us to more efficiently reduce all the components of the error , smooth and oscillatory ones . The same behaviour can be observed in multilevel optimization for nonlinear problems ( Gratton et al. , 2008 ; Groß & Krause , 2009 ; Kočvara & Mohammed , 2016 ; Lewis & Nash , 2005 ; 2013 ; Nash , 2000 ; 2014 ; Wen & Goldfarb , 2009 ; Calandra et al. , 2021 ) , which still exploits representations of the problem at different scales . If in MG methods the residual of the nonlinear equation is transferred from a grid to the other , in such schemes the variables of the optimization problems are the object of the transfer operators . It is evident that the application of such techniques to neural network training is not straightforward , as the transfer operators usually used in MG and multilevel optimization ( standard interpolation and restriction operators ) requires the quantities that need to be transferred to possess an underlying geometrical structure in order to be effective . In the case of a training problem , the variables subject to optimization are the weights and biases of the network , which do not possess any geometrical structure . To derive a multilevel method for the training problem , it is necessary to design multilevel transfer operators differently and it is not evident how to do that . Previous contributions have been made in this direction in Calandra et al . ( 2020 ) . The authors propose a strategy to transfer the weights that is inspired to algebraic multigrid ( Ruge & Stüben , 1987 ; Brandt , 2000 ) , which however requires the knowledge of the Hessian matrix of the loss function , which is impractical for large scale problems . Moreover the proposed approach is designed for one layer neural networks , which limits the range of applications of the approach . In this work we avoid this problem by following a completely different path : diverging from classical multilevel optimization methods and remaining closer to MG methods , we propose a multilevel PINN approach ( MPINN ) , based on writing the solution of the PDE as a sum of two terms , a fine and a coarse one . Each term is a PINN depending on a different number of parameters and trained on a different training set , which are optimized independently the one from the other , as each PINN has its own weights and training points that are not transferred from a network to the other one . As in classical MG , the method proceeds by alternating relaxations on the two levels , which in this case are epochs of training of each PINN . As it is common in the multilevel literature , the approach is presented in the two-levels framework , but by a recursive scheme it can be naturally extended to the multilevel case . In such case , the solution of the PDE will be written as the sum of a finite number of increasingly coarser networks . Interestingly , this approach allows us to reproduce the acceleration typically observed in classical MG methods , in the context of the training of PINNs . Related work The idea of exploiting multiple scales in learning is not new . We mention for instance Haber et al . ( 2018 ) ; Ke et al . ( 2017 ) that propose multiscale methods for convolutional neural networks , which connect low-resolution and high-resolution data , leading to new training strategies that gradually increase the depths of the CNN while re-using parameters for initializations . A similar idea is employed in Cai & Xu ( 2019 ) , but in the context of partial differential equations . Multi-scale deep neural networks are introduced , based on specific techniques to convert the learning or approximation of high frequency data to that of a low frequency ones . Still in this context , Fan et al . ( 2019 ) introduce neural networks with a novel multiscale structure inspired by hierarchical matrices , which are used to approximate discrete nonlinear maps obtained from discretized nonlinear partial differential equations , such as those arising from nonlinear Schrödinger equations . In Chung et al . ( 2017 ) the authors propose multiscale recurrent networks , that can capture the latent hierarchical structure in temporal sequences by encoding the dependencies with different timescales . With respect to these methods , our is closer in spirit to classical multigrid and enables at the same time a multilevel structure in the space of the network ’ s parameters and in that of the samples . An approach similar in spirit to ours , which is derived from another classical technique used for the solution of PDEs ( domain decomposition rather than multigrid ) is extended physics informed neural networks ( XPINNs ) ( Jagtap & Karniadakis , 2020 ; Hu et al. , 2021 ) . This approach has been theoretically and empirically proved to improve standard PINNs by using multiple sub-networks with different complexities for each subdomain . This is very related to our work : instead of decomposing the domain space , MPINNs are decomposing the solution components for fine and coarse parts . Structure of the manuscript The manuscript is organised as follows . In Section 2 we briefly review the standard PINNs architecture and in Section 3 the standard multigrid method . Section 4 represents the main contribution of this work , where we introduce the multilevel PINNs . In Section 5 , we show numerical evidence of the advantage of the MPINNs over classical PINNs . Conclusions and perspectives are presented in Section 6 . 2 PHYSICS INFORMED NEURAL NETWORKS . PINNs ( Raissi et al. , 2019 ) are neural networks that are trained to approximate the solution u ( z ) of a partial differential equation . To do that , a loss function is defined that is composed of two terms , a term taking into account the physical information and a data-fidelity term . Consider for instance a stationary PDE written as : D ( z , u ( z ) ) = f ( z ) , z ∈ Ω , B ( z , u ( z ) ) = fB ( z ) , z ∈ ∂Ω , where Ω ⊆ Rd , d ≥ 1 , is a connected subset , ∂Ω is the boundary of Ω , D is a differential operator , B is an operator defining the boundary conditions , and f , fB : Rd → R are given functions . For this problem the loss function reads as : L ( p ) = RMSEres ( p ) +RMSEdata ( p ) ( 1a ) RMSEres ( p ) = λr Nr ‖D ( z , ûN ( p ; zr ) ) − f ( zr ) ‖2 , ( 1b ) RMSEdata ( p ) = λm Nm ‖ûN ( p ; zm ) − u ( zm ) ‖2 , ( 1c ) where zr is a vector of Nr sample points in Ω in which the residual of the PDE is evaluated and zm is a vector of Nm sample points in Ω ∪ ∂Ω in which the values of the solution are known ; λr , λm are weights to balance the two components and ûN ( p ; z ) is the sought approximation , which during training is a function of p , the set of N weights and biases . Notice that training a PINN does not require the discretization of the operatorD , asD ( ûN ( p ; z ) ) can be directly computed . After training we get the desired approximation ûN ( p∗ ; z ) to u ( z ) , which depends on the number of parametres used to parametrize the network , N , which is a hyperparameter fixed before the training . 3 CLASSICAL MULTIGRID METHODS . In this section we briefly review the basic idea behind classical multigrid ( MG ) methods ( Hackbusch , 1985 ) . Consider a linear system arising from the discretization of a PDE : Au = f. Assume to have at disposal some approximation v to the exact solution . There are two important measures of v as an approximation to u . One is the error , which is given simply by e = u− v , and is however just as inaccessible as the exact solution itself . However , a computable measure of how well v approximates u is the residual , given by r = f − Av . The residual is simply the amount by which the approximation v fails to satisfy the original problem Au = f . Assuming that the solution of the linear system is unique , we have r = 0 if and only if e = 0 ( however , it may not be true that when r is small in norm , e is also small in norm ) . Using the definitions of r and e , we can derive the so-called residual equation , an extremely important relationship between the error and the residual : Ae = r. Given the approximation v , it is easy to compute the residual . To improve the approximation v , we might solve the residual equation for e and compute a new approximation using the definition of the error u = v + e. Usually a relaxation scheme is used to solve the linear systems . Many relaxation schemes possess the so called smoothing property , meaning that they are efficient in eliminating the oscillatory modes of the error , while they tend to leave the smooth ones . This is a limiting property of such methods , which is corrected by multigrid methods thanks to this key observation : passing from a fine grid Ωh to a coarse grid ΩH , a mode becomes more oscillatory . The relaxation method will thus efficiently remove the oscillatory components of the error if used on a coarse grid . Mutigrid methods obtain good speed ups by alternating relaxations among fine and coarse grids . The main scheme of MG is the following . Assume to have discretized the problem with two different resolutions , obtaining two subproblems : a fine one Ahuh = fh and a coarse one AHuH = fH , and assume to have at disposal two linear operators R ( restriction ) and P ( prolongation ) to transfer information from a grid to the other one . A V-cycle of MG on two levels follows this scheme : • Relax ν1 times on Ahuh = fh to obtain an approximation vh • Compute the residual rh = fh −Avh . • Project the residual on the coarse level rH = Rrh • Relax ν2 times on the residual equation AHeH = rH to obtain eH • Correct the fine level approximation vh = vh + eh , where eh = PeH . This procedure is the basis of what is called the correction scheme . Having relaxed on the fine grid until convergence deteriorates , we relax on the residual equation on a coarser grid to obtain an approximation to the error itself . We then return to the fine grid to correct the approximation first obtained there . Multiple V-cycles can be performed and the procedure can be extended in a recursive way to more than two levels . It is well-known that MG outperform Gauss Siedel method and already two-grid algorithm can result in tremendous reduction in the iteration count ( Mazumder , 2016 ) . | This paper proposes a new physics informed neural network (PINN) that is motivated by multigrid methods. The idea of the proposed multilevel PINN is to write the solution for a given problem as sum of two terms, where the first term models fine-scale structures and the second term models coarse-scale structures. This approach yields models that converge faster and reduce the approximation error as compared to standard PINNs. The performance is demonstrated on both 1D and 2D problems. | SP:84574b6e98bdea89ccb8511b0555c4f5b2de844b |
Stochastic Training is Not Necessary for Generalization | 1 INTRODUCTION . Stochastic gradient descent ( SGD ) is the backbone of optimization for neural networks , going back at least as far as LeCun et al . ( 1998a ) , and SGD is the de-facto tool for optimizing the parameters of modern neural networks ( Krizhevsky et al. , 2012 ; He et al. , 2015a ; Brown et al. , 2020 ) . A central reason for the success of stochastic gradient descent is its efficiency in the face of large datasets – a noisy estimate of the loss function gradient is generally sufficient to improve the parameters of a neural network and can be computed much faster than a full gradient over the entire training set . At the same time , folk wisdom dictates that small-batch SGD is not only faster but also has a unique bias towards good loss function minima that can not be replicated with full batch gradient descent . Some even believe that stochastic sampling is the fundamental force behind the success of neural networks . These popular beliefs are linked to various properties of SGD , such as its gradient noise , fast escape from saddle points , and its uncanny ability to avoid sub-optimal local minima ( Hendrik , 2017 ; LeCun , 2018 ) . These properties are also attributed in varying degrees to all mini-batched first-order optimizers , such as Adam ( Kingma & Ba , 2015 ) and others ( Schmidt et al. , 2020 ) . But why does stochastic mini-batching really aid generalization ? In this work , we set out to isolate mechanisms which underlie the benefits of SGD and use these mechanisms to replicate the empirical benefits of SGD without stochasticity . In this way , we provide a counterexample to the hypothesis that stochastic mini-batching , which leads to noisy estimates of the gradient of the loss function , is fundamental for the strong generalization success of over-parameterized neural networks . We show that a standard ResNet-18 can be trained with batch size 50K ( the entire training dataset ) and still achieve 95.67 % ( ±0.08 ) validation accuracy on CIFAR-10 , which is comparable to the same network trained with a strong SGD baseline , provided data augmentation is used for both methods . We then extend these findings to train without ( random ) data augmentations , for an entirely nonstochastic full-batch training routine with exact computation of the full loss gradient , while still achieving over 95 % accuracy . Because existing training routines are heavily optimized for smallbatch SGD , the success of our experiments requires us to eschew standard training parameters in favor of more training steps , aggressive gradient clipping , and explicit regularization terms . The existence of this example raises questions about the role of stochastic mini-batching , and by extension gradient noise , in generalization . In particular , it shows that the practical effects of such gradient noise can be captured by explicit , non-stochastic , regularization . This shows that deep learning succeeds even in the absence of mini-batched training . A number of authors have studied relatively large batch training , often finding trade-offs between batch size and model performance ( Yamazaki et al. , 2019 ; Mikami et al. , 2019 ; You et al. , 2020 ) . However , the goal of these studies has been first and foremost to accelerate training speed ( Goyal et al. , 2018 ; Jia et al. , 2018 ) , with maintaining accuracy as a secondary goal . In this study , we seek to achieve high performance on full-batch training at all costs . Our focus is not on fast runtimes or ultra-efficient parallelism , but rather on the implications of our experiments for deep learning theory . In fact , the extremely high cost of each full-batch update makes GD far less efficient than a conventional SGD training loop . We begin our discussion by reviewing the literature on SGD and describing various studies that have sought to explain various successes of deep learning through the lens of stochastic sampling . Then , we explain the hyper-parameters needed to achieve strong results in the full-batch setting and present benchmark results using a range of settings , both with and without data augmentation . 2 PERSPECTIVES ON GENERALIZATION VIA SGD . The widespread success of SGD in practical neural network implementations has inspired theorists to investigate the gradient noise created by stochastic sampling as a potential source of observed generalization phenomena in neural networks . This section will cover some of the recent literature concerning hypothesized effects of stochastic mini-batch gradient descent ( SGD ) . We explicitly focus on generalization effects of SGD in this work . Other possible sources of generalization for neural networks have been proposed that do not lean on stochastic sampling , for example generalization results that only require overparametrization ( Neyshabur et al. , 2018 ; Advani et al. , 2020 ) , large width ( Golubeva et al. , 2021 ) , and well-behaved initialization schemes ( Wu et al. , 2017 ; Mehta et al. , 2020 ) . We will not discuss these here . Furthermore , because we wish to isolate the effect of stochastic sampling in our experiments , we fix an architecture and network hyperparameters in our studies , acknowledging that they were likely chosen because of their synergy with SGD . Notation : We denote the optimization objective for training a neural network by L ( x , θ ) , where θ represents network parameters , and x is a single data sample . Over a dataset X of N data points , { xi } Ni=1 , the neural network training problem is the minimization of L ( θ ) = 1 N ∑ x∈X L ( x , θ ) . ( 1 ) This objective can be optimized via first-order optimization , of which the simplest form is descent in the direction of the negative gradient with respect to parameters θ on a batch B of data points and with step size τk : θk+1 = θk − τk 1 |B| ∑ x∈B ∇L ( x , θk ) . ( 2 ) Now , full-batch gradient descent corresponds to descent on the full dataset B = X , stochastic gradient descent corresponds to sampling a single random data point B = { x } ∼ X ( with or without replacement ) , and mini-batch stochastic gradient descent corresponds to sampling S data points B = { xj } Sj=1 , xj ∼ X at once . When sampling without replacement , the set is commonly reset after all elements are depleted . Although stochastic gradient descent has been used intermittently in applications of pattern recognition as far back as the 90 ’ s , its advantages were debated as late as Wilson & Martinez ( 2003 ) , who in support of SGD discuss its efficiency benefits ( which would become much more prominent in the following years due to increasing dataset sizes ) , in addition to earlier ideas that stochastic training can escape from local minima , and its relationship to Brownian motion and “ quasi-annealing ” , both of which are also discussed in practical guides such as LeCun et al . ( 1998b ) . SGD and critical points While early results from an optimization perspective were concerned with showing the effectiveness and convergence properties of SGD ( Bottou , 2010 ) , later ideas focused on the generalization benefits of stochastic training via navigating the optimization landscape , finding global minima , and avoiding bad local minima and saddlepoints . Ge et al . ( 2015 ) show that stochastic descent is advantageous compared to full-batch gradient descent ( GD ) in its ability to escape saddle points . Although the same conditions actually also allow vanilla gradient descent to avoid saddle-points ( Lee et al. , 2016 ) , full-batch descent is slowed down significantly by the existence of saddle points compared to stochastically perturbed variants ( Du et al. , 2017 ) . Random perturbations also appear necessary to facilitate escape from saddle points in Jin et al . ( 2019 ) . It is also noted by some authors that higher-order optimization , which can alleviate these issues , does perform better in the large-batch regimes ( Martens & Grosse , 2020 ; Yadav , 2020 ; Anil et al. , 2021 ) . Related works further study a critical mini-batch size ( Ma et al. , 2018 ; Jain et al. , 2018 ) after which SGD behaves similarly to full-batch gradient descent ( GD ) and converges slowly . It is unclear though whether the analysis of sub-optimal critical points can explain the benefits of SGD , given that modern neural networks can generally be trained to reach global minima even with deterministic algorithms ( for wide enough networks ( Du et al. , 2019 ) ) . It has been postulated that “ good ” minima that generalize well share geometric properties that make it likely for SGD to find them ( Huang et al. , 2020 ) . Flatness and Noise Shapes One such geometric property of a global minimizer is its flatness ( Hochreiter & Schmidhuber , 1997 ) . Empirically , Keskar et al . ( 2016 ) discuss the advantages of small-batch stochastic gradient descent and propose that finding flat basins is a benefit of smallbatch SGD : Large-batch training converges to models with both lower generalization and sharper minimizers . Although flatness is difficult to measure ( Dinh et al. , 2017 ) , flatness based measures appear to be the most promising tool for predicting generalization in Jiang et al . ( 2019 ) . The analysis of such stochastic effects is often facilitated by considering the stochastic differential equation that arises for small enough step sizes τ from Eq . ( 2 ) under the assumption that the gradient noise is effectively a Gaussian random variable : dθt = −∇L ( θt ) dt+ √ τΣt dWt , ( 3 ) where Σt represents the covariance of gradient noise at time t , and Wt is a Brownian motion modeling it . The magnitude of Σt is inversely proportional to mini-batch size ( Jastrzębski et al. , 2018 ) , and it is also connected to the flatness of minima reached by SGD in Dai & Zhu ( 2018 ) and Jastrzębski et al . ( 2018 ) if Σt is isotropic . Analysis therein as well as in Le ( 2018 ) provides evidence that the step size should increase linearly with the batch size to keep the magnitude of noise fixed . However , the anisotropy of Σt is strong enough to generate behavior that qualitatively differs from Brownian motion around critical points ( Chaudhari & Soatto , 2018 ; Simsekli et al. , 2019 ) and isotropic diffusion is insufficient to explain generalization benefits in Saxe et al . ( 2019 ) . The shape of Σt is thus further discussed in Zhu et al . ( 2019 ) where anisotropic noise induced by SGD is found to be beneficial to reach flat minima in contrast to isotropic noise , Zhou et al . ( 2020 ) where it is contrasted with noise induced by Adam ( Kingma & Ba , 2015 ) , and HaoChen et al . ( 2020 ) who discuss that such parameter-dependent noise , also induced by label noise , biases SGD towards well-generalizing minima . Empirical studies in Wen et al . ( 2020 ) ; Wu et al . ( 2020 ) and Li et al . ( 2021 ) show that large-batch training can be improved by adding the right kind of anisotropic noise . Notably , in all of these works , the noise introduced by SGD is in the end both unbiased and ( mostly ) Gaussian , and its disappearance in full-batch gradient descent should remove its beneficial effects . However , Eq . ( 3 ) only approximates SGD to first-order , while for non-vanishing step sizes τ , Li et al . ( 2017 ) find that a second-order approximation , dθt = −∇ ( L ( θt ) + τ 4 ||∇L ( θ ) ||2 ) dt+ √ τΣt dWt , ( 4 ) does include an implicit bias proportional to the step size . Later studies such as Li et al . ( 2020 ) discuss the importance of large initial learning rates , which are also not well modeled by first-order SDE analysis but have a noticeable impact on generalization . An explicit , non-stochastic bias ? Several of these theoretical investigations into the nature of generalization via SGD rely on earlier intuitions that this generalization effect would not be capturable by explicit regularization Arora et al . ( 2019a ) , who write that “ standard regularizers may not be rich enough to fully encompass the implicit regularization brought forth by gradient-based optimization ” and further rule out norm-based regularizers rigorously . Similar statements have already been shown for the generalization effects of overparametrization in Arora et al . ( 2018 ) who show that no regularizer exists that could replicate the effects of overparametrization in deep linear networks . Yet , Barrett & Dherin ( 2020 ) ; Smith et al . ( 2020b ) find that the implicit regularization induced by GD and SGD can be analyzed via backward-error analysis and a scalar regularizer can be derived . The implicit generalization of mini-batched gradient descent with batches B ∈ B can be ( up to third-order terms and sampling without replacement ) described explicitly by the modified loss function L ( θ ) + τ 4|B| ∑ B∈B ∣∣∣∣∣ ∣∣∣∣∣ 1|B|∑ x∈B ∇L ( x , θ ) ∣∣∣∣∣ ∣∣∣∣∣ 2 , ( 5 ) which simplifies for gradient descent to L ( θ ) + τ 4 ||∇L ( θ ) ||2 , ( 6 ) as found in Barrett & Dherin ( 2020 ) . Training with this regularizer can induce the generalization benefits of larger learning rates , even if optimized with small learning rates , and induce benefits in generalization behavior for small batch sizes when training moderately larger batch sizes . However , Smith et al . ( 2020b ) “ expect this phenomenon to break down for very large batch sizes ” . Related are discussions in Roberts ( 2018 ) and Poggio & Cooper ( 2020 ) , who show a setting in which SGD can be shown to converge to a critical point where ∇L ( xi , θ ) = 0 holds separately for each data point x , a condition which implies that the regularizer of Eq . ( 5 ) is zero . Large-batch training in practice In response to Keskar et al . ( 2016 ) , Hoffer et al . ( 2017 ) show that the adverse effects of ( moderately ) large batch training can be mitigated by improved hyperparameters – tuning learning rates , optimization steps , and batch normalization behavior . A resulting line of work suggests hyperparameter improvements that successively allow larger batch sizes , ( You et al. , 2017 ) with reduced trade-offs in generalization . Yet , parity in generalization between small and large batch training has proven elusive in many applications , even after extensive hyperparameter studies in De et al . ( 2017 ) ; Golmant et al . ( 2018 ) ; Masters & Luschi ( 2018 ) and Smith et al . ( 2020a ) . Golmant et al . ( 2018 ) go on to discuss that this is not only a problem of generalization in their experiments but also one of optimization during training , as they find that the number of iterations it takes to even reach low training loss increases significantly after the critical batch size is surpassed . Conversely , Shallue et al . ( 2019 ) find that training in a large-batch regime is often still possible , but this is dependent on finding an appropriate learning rate that is not predicted by simple scaling rules , and it also depends on choosing appropriate hyperparameters and momentum that may differ from their small-batch counterparts . This reduction of possible learning rates that converge reliably is also discussed in Masters & Luschi ( 2018 ) , but a significant gap in generalization is observed in Smith et al . ( 2020a ) even after grid-searching for an optimal learning rate . Empirical studies continue to optimize hyperparameters for large-batch training with reasonable sacrifices in generalization performance , including learning rate scaling and warmup ( Goyal et al. , 2018 ; You et al. , 2019a ) , adaptive optimizers ( You et al. , 2017 ; 2019b ) , omitting weight regularization on scales and biases ( Jia et al. , 2018 ) , adaptive momentum ( Mikami et al. , 2019 ) , second-order optimization ( Osawa et al. , 2019 ) , and label smoothing Yamazaki et al . ( 2019 ) . Yet , You et al . ( 2020 ) find that full-batch gradient descent can not be tuned to reach the performance of SGD , even when optimizing for long periods , indicating a fundamental “ limit of batch size ” . The difficulty of achieving good generalization with large batches has been linked to instability of training . As discussed in Cohen et al . ( 2020 ) ; Gilmer et al . ( 2021 ) , training with GD progressively increases the sharpness of the objective function until training destabilizes in a sudden loss spike . Surprisingly however , the algorithm does not diverge , but quickly recovers and continues to decrease non-monotonically , while sharpness remains close to a stability threshold . This phenomenon of non-monotone , but effective training close to a stability threshold is also found in Lewkowycz et al . ( 2020 ) . | This paper shows that it is possible to train CIFAR 10 models with full batches, and still obtain get test accuracy. While training with SGD leads to accuracy 95+ percent, training with baseline full batch degrades accuracy in a range of 30-77 percent. However, introducing a number of regularization discussed in section 3 can close the validation accuracy gap between SGD and FB. This paper spends about half the time discussing theory heuristics for SGD regularization, and half the time discussion regularization heuristics which are compatible with full batch optimization. As an empirical paper, there are a number of regularization techniques discussed in section 3: baseline sgd, stabilizing training, finite difference regularization of the Hessian of the loss equation (7), learning rate schedules, gradient clipping, gradient penalty, data augmentation. However, CIFAR-10 is no longer a challenging dataset. From the paper: "A number of authors have studied relatively large batch training, often finding trade-offs between batch size and model performance (Yamazaki et al., 2019; Mikami et al., 2019; You et al., 2020). However, the goal of these studies has been first and foremost to accelerate training speed (Goyal et al., 2018; Jia et al., 2018), with maintaining accuracy as a secondary goal. In this study, we seek to achieve high performance on full-batch training at all costs. Our focus is not on fast runtimes or ultra-efficient parallelism, but rather on the implications of our experiments for deep learning theory." | SP:c9b9c210d7599ae8babc6dbce35f298add1b6684 |
Stochastic Training is Not Necessary for Generalization | 1 INTRODUCTION . Stochastic gradient descent ( SGD ) is the backbone of optimization for neural networks , going back at least as far as LeCun et al . ( 1998a ) , and SGD is the de-facto tool for optimizing the parameters of modern neural networks ( Krizhevsky et al. , 2012 ; He et al. , 2015a ; Brown et al. , 2020 ) . A central reason for the success of stochastic gradient descent is its efficiency in the face of large datasets – a noisy estimate of the loss function gradient is generally sufficient to improve the parameters of a neural network and can be computed much faster than a full gradient over the entire training set . At the same time , folk wisdom dictates that small-batch SGD is not only faster but also has a unique bias towards good loss function minima that can not be replicated with full batch gradient descent . Some even believe that stochastic sampling is the fundamental force behind the success of neural networks . These popular beliefs are linked to various properties of SGD , such as its gradient noise , fast escape from saddle points , and its uncanny ability to avoid sub-optimal local minima ( Hendrik , 2017 ; LeCun , 2018 ) . These properties are also attributed in varying degrees to all mini-batched first-order optimizers , such as Adam ( Kingma & Ba , 2015 ) and others ( Schmidt et al. , 2020 ) . But why does stochastic mini-batching really aid generalization ? In this work , we set out to isolate mechanisms which underlie the benefits of SGD and use these mechanisms to replicate the empirical benefits of SGD without stochasticity . In this way , we provide a counterexample to the hypothesis that stochastic mini-batching , which leads to noisy estimates of the gradient of the loss function , is fundamental for the strong generalization success of over-parameterized neural networks . We show that a standard ResNet-18 can be trained with batch size 50K ( the entire training dataset ) and still achieve 95.67 % ( ±0.08 ) validation accuracy on CIFAR-10 , which is comparable to the same network trained with a strong SGD baseline , provided data augmentation is used for both methods . We then extend these findings to train without ( random ) data augmentations , for an entirely nonstochastic full-batch training routine with exact computation of the full loss gradient , while still achieving over 95 % accuracy . Because existing training routines are heavily optimized for smallbatch SGD , the success of our experiments requires us to eschew standard training parameters in favor of more training steps , aggressive gradient clipping , and explicit regularization terms . The existence of this example raises questions about the role of stochastic mini-batching , and by extension gradient noise , in generalization . In particular , it shows that the practical effects of such gradient noise can be captured by explicit , non-stochastic , regularization . This shows that deep learning succeeds even in the absence of mini-batched training . A number of authors have studied relatively large batch training , often finding trade-offs between batch size and model performance ( Yamazaki et al. , 2019 ; Mikami et al. , 2019 ; You et al. , 2020 ) . However , the goal of these studies has been first and foremost to accelerate training speed ( Goyal et al. , 2018 ; Jia et al. , 2018 ) , with maintaining accuracy as a secondary goal . In this study , we seek to achieve high performance on full-batch training at all costs . Our focus is not on fast runtimes or ultra-efficient parallelism , but rather on the implications of our experiments for deep learning theory . In fact , the extremely high cost of each full-batch update makes GD far less efficient than a conventional SGD training loop . We begin our discussion by reviewing the literature on SGD and describing various studies that have sought to explain various successes of deep learning through the lens of stochastic sampling . Then , we explain the hyper-parameters needed to achieve strong results in the full-batch setting and present benchmark results using a range of settings , both with and without data augmentation . 2 PERSPECTIVES ON GENERALIZATION VIA SGD . The widespread success of SGD in practical neural network implementations has inspired theorists to investigate the gradient noise created by stochastic sampling as a potential source of observed generalization phenomena in neural networks . This section will cover some of the recent literature concerning hypothesized effects of stochastic mini-batch gradient descent ( SGD ) . We explicitly focus on generalization effects of SGD in this work . Other possible sources of generalization for neural networks have been proposed that do not lean on stochastic sampling , for example generalization results that only require overparametrization ( Neyshabur et al. , 2018 ; Advani et al. , 2020 ) , large width ( Golubeva et al. , 2021 ) , and well-behaved initialization schemes ( Wu et al. , 2017 ; Mehta et al. , 2020 ) . We will not discuss these here . Furthermore , because we wish to isolate the effect of stochastic sampling in our experiments , we fix an architecture and network hyperparameters in our studies , acknowledging that they were likely chosen because of their synergy with SGD . Notation : We denote the optimization objective for training a neural network by L ( x , θ ) , where θ represents network parameters , and x is a single data sample . Over a dataset X of N data points , { xi } Ni=1 , the neural network training problem is the minimization of L ( θ ) = 1 N ∑ x∈X L ( x , θ ) . ( 1 ) This objective can be optimized via first-order optimization , of which the simplest form is descent in the direction of the negative gradient with respect to parameters θ on a batch B of data points and with step size τk : θk+1 = θk − τk 1 |B| ∑ x∈B ∇L ( x , θk ) . ( 2 ) Now , full-batch gradient descent corresponds to descent on the full dataset B = X , stochastic gradient descent corresponds to sampling a single random data point B = { x } ∼ X ( with or without replacement ) , and mini-batch stochastic gradient descent corresponds to sampling S data points B = { xj } Sj=1 , xj ∼ X at once . When sampling without replacement , the set is commonly reset after all elements are depleted . Although stochastic gradient descent has been used intermittently in applications of pattern recognition as far back as the 90 ’ s , its advantages were debated as late as Wilson & Martinez ( 2003 ) , who in support of SGD discuss its efficiency benefits ( which would become much more prominent in the following years due to increasing dataset sizes ) , in addition to earlier ideas that stochastic training can escape from local minima , and its relationship to Brownian motion and “ quasi-annealing ” , both of which are also discussed in practical guides such as LeCun et al . ( 1998b ) . SGD and critical points While early results from an optimization perspective were concerned with showing the effectiveness and convergence properties of SGD ( Bottou , 2010 ) , later ideas focused on the generalization benefits of stochastic training via navigating the optimization landscape , finding global minima , and avoiding bad local minima and saddlepoints . Ge et al . ( 2015 ) show that stochastic descent is advantageous compared to full-batch gradient descent ( GD ) in its ability to escape saddle points . Although the same conditions actually also allow vanilla gradient descent to avoid saddle-points ( Lee et al. , 2016 ) , full-batch descent is slowed down significantly by the existence of saddle points compared to stochastically perturbed variants ( Du et al. , 2017 ) . Random perturbations also appear necessary to facilitate escape from saddle points in Jin et al . ( 2019 ) . It is also noted by some authors that higher-order optimization , which can alleviate these issues , does perform better in the large-batch regimes ( Martens & Grosse , 2020 ; Yadav , 2020 ; Anil et al. , 2021 ) . Related works further study a critical mini-batch size ( Ma et al. , 2018 ; Jain et al. , 2018 ) after which SGD behaves similarly to full-batch gradient descent ( GD ) and converges slowly . It is unclear though whether the analysis of sub-optimal critical points can explain the benefits of SGD , given that modern neural networks can generally be trained to reach global minima even with deterministic algorithms ( for wide enough networks ( Du et al. , 2019 ) ) . It has been postulated that “ good ” minima that generalize well share geometric properties that make it likely for SGD to find them ( Huang et al. , 2020 ) . Flatness and Noise Shapes One such geometric property of a global minimizer is its flatness ( Hochreiter & Schmidhuber , 1997 ) . Empirically , Keskar et al . ( 2016 ) discuss the advantages of small-batch stochastic gradient descent and propose that finding flat basins is a benefit of smallbatch SGD : Large-batch training converges to models with both lower generalization and sharper minimizers . Although flatness is difficult to measure ( Dinh et al. , 2017 ) , flatness based measures appear to be the most promising tool for predicting generalization in Jiang et al . ( 2019 ) . The analysis of such stochastic effects is often facilitated by considering the stochastic differential equation that arises for small enough step sizes τ from Eq . ( 2 ) under the assumption that the gradient noise is effectively a Gaussian random variable : dθt = −∇L ( θt ) dt+ √ τΣt dWt , ( 3 ) where Σt represents the covariance of gradient noise at time t , and Wt is a Brownian motion modeling it . The magnitude of Σt is inversely proportional to mini-batch size ( Jastrzębski et al. , 2018 ) , and it is also connected to the flatness of minima reached by SGD in Dai & Zhu ( 2018 ) and Jastrzębski et al . ( 2018 ) if Σt is isotropic . Analysis therein as well as in Le ( 2018 ) provides evidence that the step size should increase linearly with the batch size to keep the magnitude of noise fixed . However , the anisotropy of Σt is strong enough to generate behavior that qualitatively differs from Brownian motion around critical points ( Chaudhari & Soatto , 2018 ; Simsekli et al. , 2019 ) and isotropic diffusion is insufficient to explain generalization benefits in Saxe et al . ( 2019 ) . The shape of Σt is thus further discussed in Zhu et al . ( 2019 ) where anisotropic noise induced by SGD is found to be beneficial to reach flat minima in contrast to isotropic noise , Zhou et al . ( 2020 ) where it is contrasted with noise induced by Adam ( Kingma & Ba , 2015 ) , and HaoChen et al . ( 2020 ) who discuss that such parameter-dependent noise , also induced by label noise , biases SGD towards well-generalizing minima . Empirical studies in Wen et al . ( 2020 ) ; Wu et al . ( 2020 ) and Li et al . ( 2021 ) show that large-batch training can be improved by adding the right kind of anisotropic noise . Notably , in all of these works , the noise introduced by SGD is in the end both unbiased and ( mostly ) Gaussian , and its disappearance in full-batch gradient descent should remove its beneficial effects . However , Eq . ( 3 ) only approximates SGD to first-order , while for non-vanishing step sizes τ , Li et al . ( 2017 ) find that a second-order approximation , dθt = −∇ ( L ( θt ) + τ 4 ||∇L ( θ ) ||2 ) dt+ √ τΣt dWt , ( 4 ) does include an implicit bias proportional to the step size . Later studies such as Li et al . ( 2020 ) discuss the importance of large initial learning rates , which are also not well modeled by first-order SDE analysis but have a noticeable impact on generalization . An explicit , non-stochastic bias ? Several of these theoretical investigations into the nature of generalization via SGD rely on earlier intuitions that this generalization effect would not be capturable by explicit regularization Arora et al . ( 2019a ) , who write that “ standard regularizers may not be rich enough to fully encompass the implicit regularization brought forth by gradient-based optimization ” and further rule out norm-based regularizers rigorously . Similar statements have already been shown for the generalization effects of overparametrization in Arora et al . ( 2018 ) who show that no regularizer exists that could replicate the effects of overparametrization in deep linear networks . Yet , Barrett & Dherin ( 2020 ) ; Smith et al . ( 2020b ) find that the implicit regularization induced by GD and SGD can be analyzed via backward-error analysis and a scalar regularizer can be derived . The implicit generalization of mini-batched gradient descent with batches B ∈ B can be ( up to third-order terms and sampling without replacement ) described explicitly by the modified loss function L ( θ ) + τ 4|B| ∑ B∈B ∣∣∣∣∣ ∣∣∣∣∣ 1|B|∑ x∈B ∇L ( x , θ ) ∣∣∣∣∣ ∣∣∣∣∣ 2 , ( 5 ) which simplifies for gradient descent to L ( θ ) + τ 4 ||∇L ( θ ) ||2 , ( 6 ) as found in Barrett & Dherin ( 2020 ) . Training with this regularizer can induce the generalization benefits of larger learning rates , even if optimized with small learning rates , and induce benefits in generalization behavior for small batch sizes when training moderately larger batch sizes . However , Smith et al . ( 2020b ) “ expect this phenomenon to break down for very large batch sizes ” . Related are discussions in Roberts ( 2018 ) and Poggio & Cooper ( 2020 ) , who show a setting in which SGD can be shown to converge to a critical point where ∇L ( xi , θ ) = 0 holds separately for each data point x , a condition which implies that the regularizer of Eq . ( 5 ) is zero . Large-batch training in practice In response to Keskar et al . ( 2016 ) , Hoffer et al . ( 2017 ) show that the adverse effects of ( moderately ) large batch training can be mitigated by improved hyperparameters – tuning learning rates , optimization steps , and batch normalization behavior . A resulting line of work suggests hyperparameter improvements that successively allow larger batch sizes , ( You et al. , 2017 ) with reduced trade-offs in generalization . Yet , parity in generalization between small and large batch training has proven elusive in many applications , even after extensive hyperparameter studies in De et al . ( 2017 ) ; Golmant et al . ( 2018 ) ; Masters & Luschi ( 2018 ) and Smith et al . ( 2020a ) . Golmant et al . ( 2018 ) go on to discuss that this is not only a problem of generalization in their experiments but also one of optimization during training , as they find that the number of iterations it takes to even reach low training loss increases significantly after the critical batch size is surpassed . Conversely , Shallue et al . ( 2019 ) find that training in a large-batch regime is often still possible , but this is dependent on finding an appropriate learning rate that is not predicted by simple scaling rules , and it also depends on choosing appropriate hyperparameters and momentum that may differ from their small-batch counterparts . This reduction of possible learning rates that converge reliably is also discussed in Masters & Luschi ( 2018 ) , but a significant gap in generalization is observed in Smith et al . ( 2020a ) even after grid-searching for an optimal learning rate . Empirical studies continue to optimize hyperparameters for large-batch training with reasonable sacrifices in generalization performance , including learning rate scaling and warmup ( Goyal et al. , 2018 ; You et al. , 2019a ) , adaptive optimizers ( You et al. , 2017 ; 2019b ) , omitting weight regularization on scales and biases ( Jia et al. , 2018 ) , adaptive momentum ( Mikami et al. , 2019 ) , second-order optimization ( Osawa et al. , 2019 ) , and label smoothing Yamazaki et al . ( 2019 ) . Yet , You et al . ( 2020 ) find that full-batch gradient descent can not be tuned to reach the performance of SGD , even when optimizing for long periods , indicating a fundamental “ limit of batch size ” . The difficulty of achieving good generalization with large batches has been linked to instability of training . As discussed in Cohen et al . ( 2020 ) ; Gilmer et al . ( 2021 ) , training with GD progressively increases the sharpness of the objective function until training destabilizes in a sudden loss spike . Surprisingly however , the algorithm does not diverge , but quickly recovers and continues to decrease non-monotonically , while sharpness remains close to a stability threshold . This phenomenon of non-monotone , but effective training close to a stability threshold is also found in Lewkowycz et al . ( 2020 ) . | The paper discusses large batch training at its limit -- full-batch cifar10 training when no stochasticity is introduced. This setting allows authors to examine and discuss the common conception about the generalization benefits of SGD. The authors show that replacing implicit bias of SGD with explicit regularization can eliminate the generalization gap. | SP:c9b9c210d7599ae8babc6dbce35f298add1b6684 |
Stochastic Training is Not Necessary for Generalization | 1 INTRODUCTION . Stochastic gradient descent ( SGD ) is the backbone of optimization for neural networks , going back at least as far as LeCun et al . ( 1998a ) , and SGD is the de-facto tool for optimizing the parameters of modern neural networks ( Krizhevsky et al. , 2012 ; He et al. , 2015a ; Brown et al. , 2020 ) . A central reason for the success of stochastic gradient descent is its efficiency in the face of large datasets – a noisy estimate of the loss function gradient is generally sufficient to improve the parameters of a neural network and can be computed much faster than a full gradient over the entire training set . At the same time , folk wisdom dictates that small-batch SGD is not only faster but also has a unique bias towards good loss function minima that can not be replicated with full batch gradient descent . Some even believe that stochastic sampling is the fundamental force behind the success of neural networks . These popular beliefs are linked to various properties of SGD , such as its gradient noise , fast escape from saddle points , and its uncanny ability to avoid sub-optimal local minima ( Hendrik , 2017 ; LeCun , 2018 ) . These properties are also attributed in varying degrees to all mini-batched first-order optimizers , such as Adam ( Kingma & Ba , 2015 ) and others ( Schmidt et al. , 2020 ) . But why does stochastic mini-batching really aid generalization ? In this work , we set out to isolate mechanisms which underlie the benefits of SGD and use these mechanisms to replicate the empirical benefits of SGD without stochasticity . In this way , we provide a counterexample to the hypothesis that stochastic mini-batching , which leads to noisy estimates of the gradient of the loss function , is fundamental for the strong generalization success of over-parameterized neural networks . We show that a standard ResNet-18 can be trained with batch size 50K ( the entire training dataset ) and still achieve 95.67 % ( ±0.08 ) validation accuracy on CIFAR-10 , which is comparable to the same network trained with a strong SGD baseline , provided data augmentation is used for both methods . We then extend these findings to train without ( random ) data augmentations , for an entirely nonstochastic full-batch training routine with exact computation of the full loss gradient , while still achieving over 95 % accuracy . Because existing training routines are heavily optimized for smallbatch SGD , the success of our experiments requires us to eschew standard training parameters in favor of more training steps , aggressive gradient clipping , and explicit regularization terms . The existence of this example raises questions about the role of stochastic mini-batching , and by extension gradient noise , in generalization . In particular , it shows that the practical effects of such gradient noise can be captured by explicit , non-stochastic , regularization . This shows that deep learning succeeds even in the absence of mini-batched training . A number of authors have studied relatively large batch training , often finding trade-offs between batch size and model performance ( Yamazaki et al. , 2019 ; Mikami et al. , 2019 ; You et al. , 2020 ) . However , the goal of these studies has been first and foremost to accelerate training speed ( Goyal et al. , 2018 ; Jia et al. , 2018 ) , with maintaining accuracy as a secondary goal . In this study , we seek to achieve high performance on full-batch training at all costs . Our focus is not on fast runtimes or ultra-efficient parallelism , but rather on the implications of our experiments for deep learning theory . In fact , the extremely high cost of each full-batch update makes GD far less efficient than a conventional SGD training loop . We begin our discussion by reviewing the literature on SGD and describing various studies that have sought to explain various successes of deep learning through the lens of stochastic sampling . Then , we explain the hyper-parameters needed to achieve strong results in the full-batch setting and present benchmark results using a range of settings , both with and without data augmentation . 2 PERSPECTIVES ON GENERALIZATION VIA SGD . The widespread success of SGD in practical neural network implementations has inspired theorists to investigate the gradient noise created by stochastic sampling as a potential source of observed generalization phenomena in neural networks . This section will cover some of the recent literature concerning hypothesized effects of stochastic mini-batch gradient descent ( SGD ) . We explicitly focus on generalization effects of SGD in this work . Other possible sources of generalization for neural networks have been proposed that do not lean on stochastic sampling , for example generalization results that only require overparametrization ( Neyshabur et al. , 2018 ; Advani et al. , 2020 ) , large width ( Golubeva et al. , 2021 ) , and well-behaved initialization schemes ( Wu et al. , 2017 ; Mehta et al. , 2020 ) . We will not discuss these here . Furthermore , because we wish to isolate the effect of stochastic sampling in our experiments , we fix an architecture and network hyperparameters in our studies , acknowledging that they were likely chosen because of their synergy with SGD . Notation : We denote the optimization objective for training a neural network by L ( x , θ ) , where θ represents network parameters , and x is a single data sample . Over a dataset X of N data points , { xi } Ni=1 , the neural network training problem is the minimization of L ( θ ) = 1 N ∑ x∈X L ( x , θ ) . ( 1 ) This objective can be optimized via first-order optimization , of which the simplest form is descent in the direction of the negative gradient with respect to parameters θ on a batch B of data points and with step size τk : θk+1 = θk − τk 1 |B| ∑ x∈B ∇L ( x , θk ) . ( 2 ) Now , full-batch gradient descent corresponds to descent on the full dataset B = X , stochastic gradient descent corresponds to sampling a single random data point B = { x } ∼ X ( with or without replacement ) , and mini-batch stochastic gradient descent corresponds to sampling S data points B = { xj } Sj=1 , xj ∼ X at once . When sampling without replacement , the set is commonly reset after all elements are depleted . Although stochastic gradient descent has been used intermittently in applications of pattern recognition as far back as the 90 ’ s , its advantages were debated as late as Wilson & Martinez ( 2003 ) , who in support of SGD discuss its efficiency benefits ( which would become much more prominent in the following years due to increasing dataset sizes ) , in addition to earlier ideas that stochastic training can escape from local minima , and its relationship to Brownian motion and “ quasi-annealing ” , both of which are also discussed in practical guides such as LeCun et al . ( 1998b ) . SGD and critical points While early results from an optimization perspective were concerned with showing the effectiveness and convergence properties of SGD ( Bottou , 2010 ) , later ideas focused on the generalization benefits of stochastic training via navigating the optimization landscape , finding global minima , and avoiding bad local minima and saddlepoints . Ge et al . ( 2015 ) show that stochastic descent is advantageous compared to full-batch gradient descent ( GD ) in its ability to escape saddle points . Although the same conditions actually also allow vanilla gradient descent to avoid saddle-points ( Lee et al. , 2016 ) , full-batch descent is slowed down significantly by the existence of saddle points compared to stochastically perturbed variants ( Du et al. , 2017 ) . Random perturbations also appear necessary to facilitate escape from saddle points in Jin et al . ( 2019 ) . It is also noted by some authors that higher-order optimization , which can alleviate these issues , does perform better in the large-batch regimes ( Martens & Grosse , 2020 ; Yadav , 2020 ; Anil et al. , 2021 ) . Related works further study a critical mini-batch size ( Ma et al. , 2018 ; Jain et al. , 2018 ) after which SGD behaves similarly to full-batch gradient descent ( GD ) and converges slowly . It is unclear though whether the analysis of sub-optimal critical points can explain the benefits of SGD , given that modern neural networks can generally be trained to reach global minima even with deterministic algorithms ( for wide enough networks ( Du et al. , 2019 ) ) . It has been postulated that “ good ” minima that generalize well share geometric properties that make it likely for SGD to find them ( Huang et al. , 2020 ) . Flatness and Noise Shapes One such geometric property of a global minimizer is its flatness ( Hochreiter & Schmidhuber , 1997 ) . Empirically , Keskar et al . ( 2016 ) discuss the advantages of small-batch stochastic gradient descent and propose that finding flat basins is a benefit of smallbatch SGD : Large-batch training converges to models with both lower generalization and sharper minimizers . Although flatness is difficult to measure ( Dinh et al. , 2017 ) , flatness based measures appear to be the most promising tool for predicting generalization in Jiang et al . ( 2019 ) . The analysis of such stochastic effects is often facilitated by considering the stochastic differential equation that arises for small enough step sizes τ from Eq . ( 2 ) under the assumption that the gradient noise is effectively a Gaussian random variable : dθt = −∇L ( θt ) dt+ √ τΣt dWt , ( 3 ) where Σt represents the covariance of gradient noise at time t , and Wt is a Brownian motion modeling it . The magnitude of Σt is inversely proportional to mini-batch size ( Jastrzębski et al. , 2018 ) , and it is also connected to the flatness of minima reached by SGD in Dai & Zhu ( 2018 ) and Jastrzębski et al . ( 2018 ) if Σt is isotropic . Analysis therein as well as in Le ( 2018 ) provides evidence that the step size should increase linearly with the batch size to keep the magnitude of noise fixed . However , the anisotropy of Σt is strong enough to generate behavior that qualitatively differs from Brownian motion around critical points ( Chaudhari & Soatto , 2018 ; Simsekli et al. , 2019 ) and isotropic diffusion is insufficient to explain generalization benefits in Saxe et al . ( 2019 ) . The shape of Σt is thus further discussed in Zhu et al . ( 2019 ) where anisotropic noise induced by SGD is found to be beneficial to reach flat minima in contrast to isotropic noise , Zhou et al . ( 2020 ) where it is contrasted with noise induced by Adam ( Kingma & Ba , 2015 ) , and HaoChen et al . ( 2020 ) who discuss that such parameter-dependent noise , also induced by label noise , biases SGD towards well-generalizing minima . Empirical studies in Wen et al . ( 2020 ) ; Wu et al . ( 2020 ) and Li et al . ( 2021 ) show that large-batch training can be improved by adding the right kind of anisotropic noise . Notably , in all of these works , the noise introduced by SGD is in the end both unbiased and ( mostly ) Gaussian , and its disappearance in full-batch gradient descent should remove its beneficial effects . However , Eq . ( 3 ) only approximates SGD to first-order , while for non-vanishing step sizes τ , Li et al . ( 2017 ) find that a second-order approximation , dθt = −∇ ( L ( θt ) + τ 4 ||∇L ( θ ) ||2 ) dt+ √ τΣt dWt , ( 4 ) does include an implicit bias proportional to the step size . Later studies such as Li et al . ( 2020 ) discuss the importance of large initial learning rates , which are also not well modeled by first-order SDE analysis but have a noticeable impact on generalization . An explicit , non-stochastic bias ? Several of these theoretical investigations into the nature of generalization via SGD rely on earlier intuitions that this generalization effect would not be capturable by explicit regularization Arora et al . ( 2019a ) , who write that “ standard regularizers may not be rich enough to fully encompass the implicit regularization brought forth by gradient-based optimization ” and further rule out norm-based regularizers rigorously . Similar statements have already been shown for the generalization effects of overparametrization in Arora et al . ( 2018 ) who show that no regularizer exists that could replicate the effects of overparametrization in deep linear networks . Yet , Barrett & Dherin ( 2020 ) ; Smith et al . ( 2020b ) find that the implicit regularization induced by GD and SGD can be analyzed via backward-error analysis and a scalar regularizer can be derived . The implicit generalization of mini-batched gradient descent with batches B ∈ B can be ( up to third-order terms and sampling without replacement ) described explicitly by the modified loss function L ( θ ) + τ 4|B| ∑ B∈B ∣∣∣∣∣ ∣∣∣∣∣ 1|B|∑ x∈B ∇L ( x , θ ) ∣∣∣∣∣ ∣∣∣∣∣ 2 , ( 5 ) which simplifies for gradient descent to L ( θ ) + τ 4 ||∇L ( θ ) ||2 , ( 6 ) as found in Barrett & Dherin ( 2020 ) . Training with this regularizer can induce the generalization benefits of larger learning rates , even if optimized with small learning rates , and induce benefits in generalization behavior for small batch sizes when training moderately larger batch sizes . However , Smith et al . ( 2020b ) “ expect this phenomenon to break down for very large batch sizes ” . Related are discussions in Roberts ( 2018 ) and Poggio & Cooper ( 2020 ) , who show a setting in which SGD can be shown to converge to a critical point where ∇L ( xi , θ ) = 0 holds separately for each data point x , a condition which implies that the regularizer of Eq . ( 5 ) is zero . Large-batch training in practice In response to Keskar et al . ( 2016 ) , Hoffer et al . ( 2017 ) show that the adverse effects of ( moderately ) large batch training can be mitigated by improved hyperparameters – tuning learning rates , optimization steps , and batch normalization behavior . A resulting line of work suggests hyperparameter improvements that successively allow larger batch sizes , ( You et al. , 2017 ) with reduced trade-offs in generalization . Yet , parity in generalization between small and large batch training has proven elusive in many applications , even after extensive hyperparameter studies in De et al . ( 2017 ) ; Golmant et al . ( 2018 ) ; Masters & Luschi ( 2018 ) and Smith et al . ( 2020a ) . Golmant et al . ( 2018 ) go on to discuss that this is not only a problem of generalization in their experiments but also one of optimization during training , as they find that the number of iterations it takes to even reach low training loss increases significantly after the critical batch size is surpassed . Conversely , Shallue et al . ( 2019 ) find that training in a large-batch regime is often still possible , but this is dependent on finding an appropriate learning rate that is not predicted by simple scaling rules , and it also depends on choosing appropriate hyperparameters and momentum that may differ from their small-batch counterparts . This reduction of possible learning rates that converge reliably is also discussed in Masters & Luschi ( 2018 ) , but a significant gap in generalization is observed in Smith et al . ( 2020a ) even after grid-searching for an optimal learning rate . Empirical studies continue to optimize hyperparameters for large-batch training with reasonable sacrifices in generalization performance , including learning rate scaling and warmup ( Goyal et al. , 2018 ; You et al. , 2019a ) , adaptive optimizers ( You et al. , 2017 ; 2019b ) , omitting weight regularization on scales and biases ( Jia et al. , 2018 ) , adaptive momentum ( Mikami et al. , 2019 ) , second-order optimization ( Osawa et al. , 2019 ) , and label smoothing Yamazaki et al . ( 2019 ) . Yet , You et al . ( 2020 ) find that full-batch gradient descent can not be tuned to reach the performance of SGD , even when optimizing for long periods , indicating a fundamental “ limit of batch size ” . The difficulty of achieving good generalization with large batches has been linked to instability of training . As discussed in Cohen et al . ( 2020 ) ; Gilmer et al . ( 2021 ) , training with GD progressively increases the sharpness of the objective function until training destabilizes in a sudden loss spike . Surprisingly however , the algorithm does not diverge , but quickly recovers and continues to decrease non-monotonically , while sharpness remains close to a stability threshold . This phenomenon of non-monotone , but effective training close to a stability threshold is also found in Lewkowycz et al . ( 2020 ) . | The paper examines the role of SGD noise in the generalization performance of neural networks. In particular, the paper examines if the generalization performance of SGD-trained models can be replicated with explicitly regularized models trained with full-batch gradient descent. The authors show that this is indeed possible for a number of different architectures (ResNet, DenseNet, VGG) trained on CIFAR-10 dataset. Based on these observations, the authors conclude that any theory that relies exclusively on stochasticity of training to explain generalization in neural networks is unlikely to capture the true phenomena responsible for the success of deep learning. | SP:c9b9c210d7599ae8babc6dbce35f298add1b6684 |
Compositional Attention: Disentangling Search and Retrieval | 1 INTRODUCTION . Attention mechanisms have become integral parts of machine learning models across a variety of domains . The modern notion of soft-attention was first introduced in Bahdanau et al . ( 2015 ) for machine translation to allow recurrent networks to perform well over long sequences . Since then , attention has taken center stage in several models that forego recurrent networks altogether ( i.e . Transformers ( Vaswani et al. , 2017 ) ) , and has been leveraged in a wide variety of applications , like natural language ( Bahdanau et al. , 2015 ; Vaswani et al. , 2017 ; Devlin et al. , 2018 ) , computer vision ( Dosovitskiy et al. , 2020 ) and physical reasoning ( Ding et al. , 2020 ; Locatello et al. , 2020 ) . At the core of this success is a simple idea : enable task-driven flexible connections between elements of a sequence to extract and merge information . This process is implemented by attention ( or alignment ) functions which , in their simplest form , take a reference or query entity and “ pick ” ( i.e . attend to ) the most relevant input entities in a set of other entities . Modern attention systems refine this key principle in two meaningful ways . First , they utilize key-value attention , where the attention function takes “ queries ” from the reference entity , matches them to “ keys ” attached to input entities , and returns “ values ” representing a transformation of the selected entities . Second , they allow multiple attention mechanisms to run in parallel , often called attention heads , allowing the model to attend to multiple entities jointly , leading to increased expressivity . Despite these advances , Transformer-like architectures still struggle on certain tasks ( Fan et al. , 2020 ; Nogueira et al. , 2021 ) , including context-sensitive associations and out-of-distribution ( OoD ) generalization ( Lake & Baroni , 2018b ; Liska et al. , 2018 ) . They are still far from human-level performance on physical reasoning and object-centric tasks ( Webb et al. , 2020 ) . In an object-oriented world where entities have several attributes , current multi-head attention mechanisms learn rigid search-retrieval associations which lead to various limitations , as illustrated in Figure 1 and Section 2.3 . †Correspondence authors sarthmit @ gmail.com and g.lajoie @ umontreal.ca 1Open-sourced implementation is available at https : //github.com/sarthmit/Compositional-Attention Addressing these shortcomings , there are several recent attention-enabled systems developed to allow better decomposition and re-composition of knowledge ( Goyal et al. , 2019 ; 2021a ; b ) , some of which we discuss in Appendix A . However , most of these efforts hinge on purpose-built architectural components that remain niche and often are difficult to implement at scale . To complement these efforts and build on the proven efficacy of Transformers , our goal is to develop minimal modifications to key-value attention to enable flexible decomposition of computations found in attention heads , and eliminate some parameter redundancy . Crucially , we aim for a mechanism that is easily implemented and plug-and-play for existing Transformers ( and all the models based on them ) . We propose Compositional Attention , where the search and retrieval operations can be flexibly composed : the key-query search mechanism is no longer bound to a fixed value retrieval matrix , instead it is dynamically selected from a shared pool of value matrices accessible by several compositional attention heads . This results in increased flexibility and improved performance . Contributions Summary . ( a ) We formally describe the shortcomings of rigid search-and-retrieval coupling in standard multi-head attention and empirically analyze them through experiments on an illustrative synthetic task ( Section 2.3 and 4.1 ) . ( b ) We present Compositional Attention to disentangle search and retrieval , and validate its advantages with a number of experiments ( Section 3 and 4 ) . ( c ) Through a series of analyses , we demonstrate how our proposed attention mechanism decomposes relational task structure as expected , and facilitates OoD generalization ( Section 4 ) . ( d ) We discuss the computational complexity of our proposed method , which can be scaled in either of the components ( search and/or retrieval ) independently , and is an easy drop-in replacement for multi-head attention in standard Transformer-like architectures ( Section 5 ) . 2 LIMITATIONS OF MULTI-HEAD ATTENTION . In this section , we first introduce the standard notation for multi-head attention ( Vaswani et al. , 2017 ) in terms of search and retrieval mechanisms . We then highlight how the rigidity of the search-retrieval leads to limitations and redundancies in the parametrization of neural networks . 2.1 MULTI-HEAD ATTENTION BASICS . Key-Value Attention : Given a set of queries and key-value pairs , key-value attention computes a scaled cosine similarity metric between each query and the set of keys . This similarity score determines the contribution of each value in the output for the corresponding query . More formally , given a set of input elements arranged in a matrix X ∈ RN×d , we first obtain queries Q , keys K and values V using linear transformations on X with learnable projection matrices Wq ∈ Rd×dk , Wk ∈ Rd×dk and Wv ∈ Rd×dv respectively . This is given by Q = XWq K = XWk V = XWv . ( 1 ) For each query , a similarity score is computed with each key using a scaled cosine similarity ( called scaled dot-product ) to give the attention weights which are used to soft-combine the values as Attention ( Q , K , V ) = Softmax ( QKT√ dk , axis = ‘ keys ’ ) V ( 2 ) where 1√ dk is the scaling factor . Multi-Head Attention : A multi-head attention mechanism combines multiple ( say , h ) independent key-value attention mechanisms in parallel to provide the model the ability to jointly attend to different positions and hence increase representational capacity . The outputs resulting from these multiple heads are concatenated together and then linearly projected back to the input dimension using a learnable matrix W o ∈ Rhdv×d : Multi-Head = Concat ( head1 , head2 . . . headh ) W o ( 3 ) where headi = Attention ( Qi , Ki , Vi ) . 2.2 SEARCH AND RETRIEVAL COMPONENTS . Here , we take the multi-head attention defined in Section 2.1 and decompose it into its two fundamental components - Search and Retrieval . Search : A search is parameterized by the query and key matrices , that is , Wq and Wk respectively . These parameters define a notion of compatibility metric between pairs of element xj and xk ∈ X : Search ( Q , K ) = Softmax ( QKT√ dk , axis = ‘ keys ’ ) ( 4 ) where Q = XWq and K = XWk . The above computation gives the compatibility between an element xj with other elements xk ’ s under the compatibility metric defined by the Search parameters . Retrieval : A retrieval is parameterized by a value matrix Wv describing the kind of features in the input elements in X that are relevant and need to be accessed for the downstream task : Retrieval ( Search ( Q , K ) , V ) = Search ( Q , K ) V ( 5 ) where V = XWv . Note that each Retrieval defines the kind of attributes to access from input x′ks and can take any Search result as its input . Multi-head Attention as a rigid pairing of Searches and Retrievals : Given the above definitions , one can see how standard multi-head attention amounts to a rigid pairing of Searches and Retrievals , such that an end-to-end function of fixed attribute pairs are learned at optimization . Indeed , h heads are composed of h different searche-retrieval pairs – the ith retrieval is performed only on the ith search . Multi-head attention thus amounts to a special case of Equation 4 and 5 headi = Retrieval ( Search ( Qi , Ki ) , Vi ) ( Note : Same subscript i ) ( 6 ) Viewing multi-head attention through these fixed search-retrieval pairings foreshadows a possible generalization of searches and retrievals which we propose below . Before doing so , however , we first highlight specific shortcomings of standard multi-head attention . 2.3 SHORTCOMINGS OF RIGID ASSOCIATIONS . As described in Section 2.2 , multi-head attention considers a fixed pairing between searches and retrievals . While it has been widely successful across a variety of domains , we hypothesize that this rigid mapping is not always ideal and can sometimes lead to reduced capacity and learning of redundant parameters , missing an opportunity for better systematic generalization . We note that the search associated with each head defines a feature ( defined by query-key matrices Wq and Wk ) based on which compatibility between objects is evaluated . Further , each head ’ s retrieval allows the model to access a particular feature ( defined by value matrix Wv ) from the searched objects . Following this , we showcase two types of redundancies that can arise in multi-head attention : ( a ) Search Redundancy which leads to learning of redundant query-key matrices and ( b ) Retrieval Redundancy which leads to learning of redundant value matrices . We highlight these two redundancies jointly using a simple example illustrated in Figure 1 , where three objects with attributes : shape , color and location , are the subject of different questions . In ( a ) the model has to learn to search according to color and correspondingly retrieve shape information while in ( b ) it has to search according to shape and retrieve location . On this task , standard multi-head attention ( middle row ) should learn two heads , one each for ( a ) and ( b ) . To answer the question in ( c ) , the model has to search according to color and retrieve location . While searching according to color exists in ( a ) learned by Head 1 and retrieving location exists in ( b ) learned by Head 2 , there is no way to combine them . Thus , another head is needed to obtain the search of Head 1 and retrieval of Head 2 . This leads to parameter redundancy and a missed opportunity to factorize knowledge more efficiently , since these pieces of learned knowledge individually exist in Head 1 and Head 2 already . The scenario in Figure 1 may look highly idealized because multi-head attention might not limit searches/retrievals on single features and is capable of doing more nuanced soft-combinations . While this may be the case for this simple example , what it highlights is the danger of rigid learned associations that limits re-composition of learned pieces of knowledge , leads to redundant parameters and potentially limits OoD generalization , irrespective of what the model learns . We discuss this in more detail in Appendix B.1 , and empirically explore these principles in a purpose built diagnosis task we call Contextual Retrieval Task , in Section 4.1 . Finally , we reiterate that multi-head attention with h heads can only represent up to h unique ( Search – Retrieval ) pairings . In what follows , we propose to alleviate this fundamental limitation by allowing for S × R such pairings , with S the number of search types and R the number of retrieval types . 3 COMPOSITIONAL ATTENTION - DISENTANGLING SEARCH AND RETRIEVAL . We propose a novel attention mechanism that relaxes static search-retrieval pairing in favour of a more flexible and dynamic mapping . To do this , we let go of the concept of “ head ” altogether and instead propose independent and recombinable Searches and Retrievals , as defined in Section 2.2 . The central innovation lies in the way these two components are combined : with query-key attention on retrievals . Similar to heads , we start by defining S parallel search mechanisms . That is , we have S different query-key parameterizations Wqi and Wki respectively . The output of each search is as defined in Equation 4 . In essence , for each search i , we get Qi = XWqi and Ki = XWki ( 7 ) Searchi = Softmax ( QiK T i√ dk , axis = ‘ keys ’ ) ( 8 ) Next , we define R different retrieval mechanisms , which correspond to the R different Wvj matrices . These matrices are used to obtain different attributes from the input . Formally , this is summarized as Vj = XWvj ( 9 ) where Vj highlights accessing of different attributes . Then , corresponding to each search , all possible retrievals are done . This is similar to Equation 5 and is defined as Retrievalij = Searchi Vj ( 10 ) for all i , j . This step gives us all the hypothetical retrievals for each search and out of this , one retrieval per search needs to be instantiated . This instantiation is done through a secondary attention mechanism computed using retrieval queries Qi and retrieval keys Kij , that are obtained as Qi = XW qi Kij = Retrievalij W k ( 11 ) where the parameter W qi ∈ Rd×dr is a different matrix for each search indexed by i and , together with W k , is tasked with driving the pairing between search and retrieval . We broadcast the matrix Qi from RN×dr to RN×1×dr and define Ki ∈ RN×R×dr by Ki = Concat ( Ki1 , Ki2 , . . . , KiR ) . ( 12 ) Thus , through these retrieval queries and keys , the required instantiation per search is done as CAtti = Softmax ( QiKi T √ dr , axis = ‘ retrieval ’ ) ︸ ︷︷ ︸ Value Scores Retrievalij ( 13 ) where the transpose is over the last two axes . Hence , for each search i , the softmax gives attention weights over all possible retrievals and the winning retrieval is instantiated through this soft attention mechanism . Finally , similar to multi-head attention , the outputs of these parallel searches are combined by concatenating them and passing them through a linear network : CompositionalAttention = Concat ( CAtt1 , CAtt2 , . . . , CAttS ) W o ( 14 ) where W o ∈ RSdv×d . Note that in this mechanism , the choice of retrieval for each search is not fixed , and instead is dynamically modulated by Qi and Ki respectively . We refer the readers to Figure 2 for a visual depiction of the computation graph . Compositional Attention allows the model to have ( a ) Different number of searches and retrievals , i.e . S andR respectively , ( b ) Dynamic selection of shared retrievals for each search and ( c ) Representation capacity of S × R ( Search – Retrieval ) pairings . Thus , we highlight that Compositional Attention disentangles search and retrieval and solves the redundancies of multi-head attention ( Section 2.3 ) . | The proposed mechanism disentangles the search and retrieval from the transformers architecture, where the retriever is no longer tied to a specific retriever that is in the same head - instead, there are multiple searches available, and multiple retrievers. Conditioned on the input, each search is "tied" to a (soft) single retriever. Then all results from all searches are concatenated. | SP:197f4621a7c56f36f071154f5ddd8e4e018a212a |
Compositional Attention: Disentangling Search and Retrieval | 1 INTRODUCTION . Attention mechanisms have become integral parts of machine learning models across a variety of domains . The modern notion of soft-attention was first introduced in Bahdanau et al . ( 2015 ) for machine translation to allow recurrent networks to perform well over long sequences . Since then , attention has taken center stage in several models that forego recurrent networks altogether ( i.e . Transformers ( Vaswani et al. , 2017 ) ) , and has been leveraged in a wide variety of applications , like natural language ( Bahdanau et al. , 2015 ; Vaswani et al. , 2017 ; Devlin et al. , 2018 ) , computer vision ( Dosovitskiy et al. , 2020 ) and physical reasoning ( Ding et al. , 2020 ; Locatello et al. , 2020 ) . At the core of this success is a simple idea : enable task-driven flexible connections between elements of a sequence to extract and merge information . This process is implemented by attention ( or alignment ) functions which , in their simplest form , take a reference or query entity and “ pick ” ( i.e . attend to ) the most relevant input entities in a set of other entities . Modern attention systems refine this key principle in two meaningful ways . First , they utilize key-value attention , where the attention function takes “ queries ” from the reference entity , matches them to “ keys ” attached to input entities , and returns “ values ” representing a transformation of the selected entities . Second , they allow multiple attention mechanisms to run in parallel , often called attention heads , allowing the model to attend to multiple entities jointly , leading to increased expressivity . Despite these advances , Transformer-like architectures still struggle on certain tasks ( Fan et al. , 2020 ; Nogueira et al. , 2021 ) , including context-sensitive associations and out-of-distribution ( OoD ) generalization ( Lake & Baroni , 2018b ; Liska et al. , 2018 ) . They are still far from human-level performance on physical reasoning and object-centric tasks ( Webb et al. , 2020 ) . In an object-oriented world where entities have several attributes , current multi-head attention mechanisms learn rigid search-retrieval associations which lead to various limitations , as illustrated in Figure 1 and Section 2.3 . †Correspondence authors sarthmit @ gmail.com and g.lajoie @ umontreal.ca 1Open-sourced implementation is available at https : //github.com/sarthmit/Compositional-Attention Addressing these shortcomings , there are several recent attention-enabled systems developed to allow better decomposition and re-composition of knowledge ( Goyal et al. , 2019 ; 2021a ; b ) , some of which we discuss in Appendix A . However , most of these efforts hinge on purpose-built architectural components that remain niche and often are difficult to implement at scale . To complement these efforts and build on the proven efficacy of Transformers , our goal is to develop minimal modifications to key-value attention to enable flexible decomposition of computations found in attention heads , and eliminate some parameter redundancy . Crucially , we aim for a mechanism that is easily implemented and plug-and-play for existing Transformers ( and all the models based on them ) . We propose Compositional Attention , where the search and retrieval operations can be flexibly composed : the key-query search mechanism is no longer bound to a fixed value retrieval matrix , instead it is dynamically selected from a shared pool of value matrices accessible by several compositional attention heads . This results in increased flexibility and improved performance . Contributions Summary . ( a ) We formally describe the shortcomings of rigid search-and-retrieval coupling in standard multi-head attention and empirically analyze them through experiments on an illustrative synthetic task ( Section 2.3 and 4.1 ) . ( b ) We present Compositional Attention to disentangle search and retrieval , and validate its advantages with a number of experiments ( Section 3 and 4 ) . ( c ) Through a series of analyses , we demonstrate how our proposed attention mechanism decomposes relational task structure as expected , and facilitates OoD generalization ( Section 4 ) . ( d ) We discuss the computational complexity of our proposed method , which can be scaled in either of the components ( search and/or retrieval ) independently , and is an easy drop-in replacement for multi-head attention in standard Transformer-like architectures ( Section 5 ) . 2 LIMITATIONS OF MULTI-HEAD ATTENTION . In this section , we first introduce the standard notation for multi-head attention ( Vaswani et al. , 2017 ) in terms of search and retrieval mechanisms . We then highlight how the rigidity of the search-retrieval leads to limitations and redundancies in the parametrization of neural networks . 2.1 MULTI-HEAD ATTENTION BASICS . Key-Value Attention : Given a set of queries and key-value pairs , key-value attention computes a scaled cosine similarity metric between each query and the set of keys . This similarity score determines the contribution of each value in the output for the corresponding query . More formally , given a set of input elements arranged in a matrix X ∈ RN×d , we first obtain queries Q , keys K and values V using linear transformations on X with learnable projection matrices Wq ∈ Rd×dk , Wk ∈ Rd×dk and Wv ∈ Rd×dv respectively . This is given by Q = XWq K = XWk V = XWv . ( 1 ) For each query , a similarity score is computed with each key using a scaled cosine similarity ( called scaled dot-product ) to give the attention weights which are used to soft-combine the values as Attention ( Q , K , V ) = Softmax ( QKT√ dk , axis = ‘ keys ’ ) V ( 2 ) where 1√ dk is the scaling factor . Multi-Head Attention : A multi-head attention mechanism combines multiple ( say , h ) independent key-value attention mechanisms in parallel to provide the model the ability to jointly attend to different positions and hence increase representational capacity . The outputs resulting from these multiple heads are concatenated together and then linearly projected back to the input dimension using a learnable matrix W o ∈ Rhdv×d : Multi-Head = Concat ( head1 , head2 . . . headh ) W o ( 3 ) where headi = Attention ( Qi , Ki , Vi ) . 2.2 SEARCH AND RETRIEVAL COMPONENTS . Here , we take the multi-head attention defined in Section 2.1 and decompose it into its two fundamental components - Search and Retrieval . Search : A search is parameterized by the query and key matrices , that is , Wq and Wk respectively . These parameters define a notion of compatibility metric between pairs of element xj and xk ∈ X : Search ( Q , K ) = Softmax ( QKT√ dk , axis = ‘ keys ’ ) ( 4 ) where Q = XWq and K = XWk . The above computation gives the compatibility between an element xj with other elements xk ’ s under the compatibility metric defined by the Search parameters . Retrieval : A retrieval is parameterized by a value matrix Wv describing the kind of features in the input elements in X that are relevant and need to be accessed for the downstream task : Retrieval ( Search ( Q , K ) , V ) = Search ( Q , K ) V ( 5 ) where V = XWv . Note that each Retrieval defines the kind of attributes to access from input x′ks and can take any Search result as its input . Multi-head Attention as a rigid pairing of Searches and Retrievals : Given the above definitions , one can see how standard multi-head attention amounts to a rigid pairing of Searches and Retrievals , such that an end-to-end function of fixed attribute pairs are learned at optimization . Indeed , h heads are composed of h different searche-retrieval pairs – the ith retrieval is performed only on the ith search . Multi-head attention thus amounts to a special case of Equation 4 and 5 headi = Retrieval ( Search ( Qi , Ki ) , Vi ) ( Note : Same subscript i ) ( 6 ) Viewing multi-head attention through these fixed search-retrieval pairings foreshadows a possible generalization of searches and retrievals which we propose below . Before doing so , however , we first highlight specific shortcomings of standard multi-head attention . 2.3 SHORTCOMINGS OF RIGID ASSOCIATIONS . As described in Section 2.2 , multi-head attention considers a fixed pairing between searches and retrievals . While it has been widely successful across a variety of domains , we hypothesize that this rigid mapping is not always ideal and can sometimes lead to reduced capacity and learning of redundant parameters , missing an opportunity for better systematic generalization . We note that the search associated with each head defines a feature ( defined by query-key matrices Wq and Wk ) based on which compatibility between objects is evaluated . Further , each head ’ s retrieval allows the model to access a particular feature ( defined by value matrix Wv ) from the searched objects . Following this , we showcase two types of redundancies that can arise in multi-head attention : ( a ) Search Redundancy which leads to learning of redundant query-key matrices and ( b ) Retrieval Redundancy which leads to learning of redundant value matrices . We highlight these two redundancies jointly using a simple example illustrated in Figure 1 , where three objects with attributes : shape , color and location , are the subject of different questions . In ( a ) the model has to learn to search according to color and correspondingly retrieve shape information while in ( b ) it has to search according to shape and retrieve location . On this task , standard multi-head attention ( middle row ) should learn two heads , one each for ( a ) and ( b ) . To answer the question in ( c ) , the model has to search according to color and retrieve location . While searching according to color exists in ( a ) learned by Head 1 and retrieving location exists in ( b ) learned by Head 2 , there is no way to combine them . Thus , another head is needed to obtain the search of Head 1 and retrieval of Head 2 . This leads to parameter redundancy and a missed opportunity to factorize knowledge more efficiently , since these pieces of learned knowledge individually exist in Head 1 and Head 2 already . The scenario in Figure 1 may look highly idealized because multi-head attention might not limit searches/retrievals on single features and is capable of doing more nuanced soft-combinations . While this may be the case for this simple example , what it highlights is the danger of rigid learned associations that limits re-composition of learned pieces of knowledge , leads to redundant parameters and potentially limits OoD generalization , irrespective of what the model learns . We discuss this in more detail in Appendix B.1 , and empirically explore these principles in a purpose built diagnosis task we call Contextual Retrieval Task , in Section 4.1 . Finally , we reiterate that multi-head attention with h heads can only represent up to h unique ( Search – Retrieval ) pairings . In what follows , we propose to alleviate this fundamental limitation by allowing for S × R such pairings , with S the number of search types and R the number of retrieval types . 3 COMPOSITIONAL ATTENTION - DISENTANGLING SEARCH AND RETRIEVAL . We propose a novel attention mechanism that relaxes static search-retrieval pairing in favour of a more flexible and dynamic mapping . To do this , we let go of the concept of “ head ” altogether and instead propose independent and recombinable Searches and Retrievals , as defined in Section 2.2 . The central innovation lies in the way these two components are combined : with query-key attention on retrievals . Similar to heads , we start by defining S parallel search mechanisms . That is , we have S different query-key parameterizations Wqi and Wki respectively . The output of each search is as defined in Equation 4 . In essence , for each search i , we get Qi = XWqi and Ki = XWki ( 7 ) Searchi = Softmax ( QiK T i√ dk , axis = ‘ keys ’ ) ( 8 ) Next , we define R different retrieval mechanisms , which correspond to the R different Wvj matrices . These matrices are used to obtain different attributes from the input . Formally , this is summarized as Vj = XWvj ( 9 ) where Vj highlights accessing of different attributes . Then , corresponding to each search , all possible retrievals are done . This is similar to Equation 5 and is defined as Retrievalij = Searchi Vj ( 10 ) for all i , j . This step gives us all the hypothetical retrievals for each search and out of this , one retrieval per search needs to be instantiated . This instantiation is done through a secondary attention mechanism computed using retrieval queries Qi and retrieval keys Kij , that are obtained as Qi = XW qi Kij = Retrievalij W k ( 11 ) where the parameter W qi ∈ Rd×dr is a different matrix for each search indexed by i and , together with W k , is tasked with driving the pairing between search and retrieval . We broadcast the matrix Qi from RN×dr to RN×1×dr and define Ki ∈ RN×R×dr by Ki = Concat ( Ki1 , Ki2 , . . . , KiR ) . ( 12 ) Thus , through these retrieval queries and keys , the required instantiation per search is done as CAtti = Softmax ( QiKi T √ dr , axis = ‘ retrieval ’ ) ︸ ︷︷ ︸ Value Scores Retrievalij ( 13 ) where the transpose is over the last two axes . Hence , for each search i , the softmax gives attention weights over all possible retrievals and the winning retrieval is instantiated through this soft attention mechanism . Finally , similar to multi-head attention , the outputs of these parallel searches are combined by concatenating them and passing them through a linear network : CompositionalAttention = Concat ( CAtt1 , CAtt2 , . . . , CAttS ) W o ( 14 ) where W o ∈ RSdv×d . Note that in this mechanism , the choice of retrieval for each search is not fixed , and instead is dynamically modulated by Qi and Ki respectively . We refer the readers to Figure 2 for a visual depiction of the computation graph . Compositional Attention allows the model to have ( a ) Different number of searches and retrievals , i.e . S andR respectively , ( b ) Dynamic selection of shared retrievals for each search and ( c ) Representation capacity of S × R ( Search – Retrieval ) pairings . Thus , we highlight that Compositional Attention disentangles search and retrieval and solves the redundancies of multi-head attention ( Section 2.3 ) . | This paper proposes a Compositional Attention to replace the standard multi-head attention. It argues that traditional multi-head attention has a rigid mapping between each query-key pair and the associated value. This leads to redundant parameters and less generalizability. | SP:197f4621a7c56f36f071154f5ddd8e4e018a212a |
Compositional Attention: Disentangling Search and Retrieval | 1 INTRODUCTION . Attention mechanisms have become integral parts of machine learning models across a variety of domains . The modern notion of soft-attention was first introduced in Bahdanau et al . ( 2015 ) for machine translation to allow recurrent networks to perform well over long sequences . Since then , attention has taken center stage in several models that forego recurrent networks altogether ( i.e . Transformers ( Vaswani et al. , 2017 ) ) , and has been leveraged in a wide variety of applications , like natural language ( Bahdanau et al. , 2015 ; Vaswani et al. , 2017 ; Devlin et al. , 2018 ) , computer vision ( Dosovitskiy et al. , 2020 ) and physical reasoning ( Ding et al. , 2020 ; Locatello et al. , 2020 ) . At the core of this success is a simple idea : enable task-driven flexible connections between elements of a sequence to extract and merge information . This process is implemented by attention ( or alignment ) functions which , in their simplest form , take a reference or query entity and “ pick ” ( i.e . attend to ) the most relevant input entities in a set of other entities . Modern attention systems refine this key principle in two meaningful ways . First , they utilize key-value attention , where the attention function takes “ queries ” from the reference entity , matches them to “ keys ” attached to input entities , and returns “ values ” representing a transformation of the selected entities . Second , they allow multiple attention mechanisms to run in parallel , often called attention heads , allowing the model to attend to multiple entities jointly , leading to increased expressivity . Despite these advances , Transformer-like architectures still struggle on certain tasks ( Fan et al. , 2020 ; Nogueira et al. , 2021 ) , including context-sensitive associations and out-of-distribution ( OoD ) generalization ( Lake & Baroni , 2018b ; Liska et al. , 2018 ) . They are still far from human-level performance on physical reasoning and object-centric tasks ( Webb et al. , 2020 ) . In an object-oriented world where entities have several attributes , current multi-head attention mechanisms learn rigid search-retrieval associations which lead to various limitations , as illustrated in Figure 1 and Section 2.3 . †Correspondence authors sarthmit @ gmail.com and g.lajoie @ umontreal.ca 1Open-sourced implementation is available at https : //github.com/sarthmit/Compositional-Attention Addressing these shortcomings , there are several recent attention-enabled systems developed to allow better decomposition and re-composition of knowledge ( Goyal et al. , 2019 ; 2021a ; b ) , some of which we discuss in Appendix A . However , most of these efforts hinge on purpose-built architectural components that remain niche and often are difficult to implement at scale . To complement these efforts and build on the proven efficacy of Transformers , our goal is to develop minimal modifications to key-value attention to enable flexible decomposition of computations found in attention heads , and eliminate some parameter redundancy . Crucially , we aim for a mechanism that is easily implemented and plug-and-play for existing Transformers ( and all the models based on them ) . We propose Compositional Attention , where the search and retrieval operations can be flexibly composed : the key-query search mechanism is no longer bound to a fixed value retrieval matrix , instead it is dynamically selected from a shared pool of value matrices accessible by several compositional attention heads . This results in increased flexibility and improved performance . Contributions Summary . ( a ) We formally describe the shortcomings of rigid search-and-retrieval coupling in standard multi-head attention and empirically analyze them through experiments on an illustrative synthetic task ( Section 2.3 and 4.1 ) . ( b ) We present Compositional Attention to disentangle search and retrieval , and validate its advantages with a number of experiments ( Section 3 and 4 ) . ( c ) Through a series of analyses , we demonstrate how our proposed attention mechanism decomposes relational task structure as expected , and facilitates OoD generalization ( Section 4 ) . ( d ) We discuss the computational complexity of our proposed method , which can be scaled in either of the components ( search and/or retrieval ) independently , and is an easy drop-in replacement for multi-head attention in standard Transformer-like architectures ( Section 5 ) . 2 LIMITATIONS OF MULTI-HEAD ATTENTION . In this section , we first introduce the standard notation for multi-head attention ( Vaswani et al. , 2017 ) in terms of search and retrieval mechanisms . We then highlight how the rigidity of the search-retrieval leads to limitations and redundancies in the parametrization of neural networks . 2.1 MULTI-HEAD ATTENTION BASICS . Key-Value Attention : Given a set of queries and key-value pairs , key-value attention computes a scaled cosine similarity metric between each query and the set of keys . This similarity score determines the contribution of each value in the output for the corresponding query . More formally , given a set of input elements arranged in a matrix X ∈ RN×d , we first obtain queries Q , keys K and values V using linear transformations on X with learnable projection matrices Wq ∈ Rd×dk , Wk ∈ Rd×dk and Wv ∈ Rd×dv respectively . This is given by Q = XWq K = XWk V = XWv . ( 1 ) For each query , a similarity score is computed with each key using a scaled cosine similarity ( called scaled dot-product ) to give the attention weights which are used to soft-combine the values as Attention ( Q , K , V ) = Softmax ( QKT√ dk , axis = ‘ keys ’ ) V ( 2 ) where 1√ dk is the scaling factor . Multi-Head Attention : A multi-head attention mechanism combines multiple ( say , h ) independent key-value attention mechanisms in parallel to provide the model the ability to jointly attend to different positions and hence increase representational capacity . The outputs resulting from these multiple heads are concatenated together and then linearly projected back to the input dimension using a learnable matrix W o ∈ Rhdv×d : Multi-Head = Concat ( head1 , head2 . . . headh ) W o ( 3 ) where headi = Attention ( Qi , Ki , Vi ) . 2.2 SEARCH AND RETRIEVAL COMPONENTS . Here , we take the multi-head attention defined in Section 2.1 and decompose it into its two fundamental components - Search and Retrieval . Search : A search is parameterized by the query and key matrices , that is , Wq and Wk respectively . These parameters define a notion of compatibility metric between pairs of element xj and xk ∈ X : Search ( Q , K ) = Softmax ( QKT√ dk , axis = ‘ keys ’ ) ( 4 ) where Q = XWq and K = XWk . The above computation gives the compatibility between an element xj with other elements xk ’ s under the compatibility metric defined by the Search parameters . Retrieval : A retrieval is parameterized by a value matrix Wv describing the kind of features in the input elements in X that are relevant and need to be accessed for the downstream task : Retrieval ( Search ( Q , K ) , V ) = Search ( Q , K ) V ( 5 ) where V = XWv . Note that each Retrieval defines the kind of attributes to access from input x′ks and can take any Search result as its input . Multi-head Attention as a rigid pairing of Searches and Retrievals : Given the above definitions , one can see how standard multi-head attention amounts to a rigid pairing of Searches and Retrievals , such that an end-to-end function of fixed attribute pairs are learned at optimization . Indeed , h heads are composed of h different searche-retrieval pairs – the ith retrieval is performed only on the ith search . Multi-head attention thus amounts to a special case of Equation 4 and 5 headi = Retrieval ( Search ( Qi , Ki ) , Vi ) ( Note : Same subscript i ) ( 6 ) Viewing multi-head attention through these fixed search-retrieval pairings foreshadows a possible generalization of searches and retrievals which we propose below . Before doing so , however , we first highlight specific shortcomings of standard multi-head attention . 2.3 SHORTCOMINGS OF RIGID ASSOCIATIONS . As described in Section 2.2 , multi-head attention considers a fixed pairing between searches and retrievals . While it has been widely successful across a variety of domains , we hypothesize that this rigid mapping is not always ideal and can sometimes lead to reduced capacity and learning of redundant parameters , missing an opportunity for better systematic generalization . We note that the search associated with each head defines a feature ( defined by query-key matrices Wq and Wk ) based on which compatibility between objects is evaluated . Further , each head ’ s retrieval allows the model to access a particular feature ( defined by value matrix Wv ) from the searched objects . Following this , we showcase two types of redundancies that can arise in multi-head attention : ( a ) Search Redundancy which leads to learning of redundant query-key matrices and ( b ) Retrieval Redundancy which leads to learning of redundant value matrices . We highlight these two redundancies jointly using a simple example illustrated in Figure 1 , where three objects with attributes : shape , color and location , are the subject of different questions . In ( a ) the model has to learn to search according to color and correspondingly retrieve shape information while in ( b ) it has to search according to shape and retrieve location . On this task , standard multi-head attention ( middle row ) should learn two heads , one each for ( a ) and ( b ) . To answer the question in ( c ) , the model has to search according to color and retrieve location . While searching according to color exists in ( a ) learned by Head 1 and retrieving location exists in ( b ) learned by Head 2 , there is no way to combine them . Thus , another head is needed to obtain the search of Head 1 and retrieval of Head 2 . This leads to parameter redundancy and a missed opportunity to factorize knowledge more efficiently , since these pieces of learned knowledge individually exist in Head 1 and Head 2 already . The scenario in Figure 1 may look highly idealized because multi-head attention might not limit searches/retrievals on single features and is capable of doing more nuanced soft-combinations . While this may be the case for this simple example , what it highlights is the danger of rigid learned associations that limits re-composition of learned pieces of knowledge , leads to redundant parameters and potentially limits OoD generalization , irrespective of what the model learns . We discuss this in more detail in Appendix B.1 , and empirically explore these principles in a purpose built diagnosis task we call Contextual Retrieval Task , in Section 4.1 . Finally , we reiterate that multi-head attention with h heads can only represent up to h unique ( Search – Retrieval ) pairings . In what follows , we propose to alleviate this fundamental limitation by allowing for S × R such pairings , with S the number of search types and R the number of retrieval types . 3 COMPOSITIONAL ATTENTION - DISENTANGLING SEARCH AND RETRIEVAL . We propose a novel attention mechanism that relaxes static search-retrieval pairing in favour of a more flexible and dynamic mapping . To do this , we let go of the concept of “ head ” altogether and instead propose independent and recombinable Searches and Retrievals , as defined in Section 2.2 . The central innovation lies in the way these two components are combined : with query-key attention on retrievals . Similar to heads , we start by defining S parallel search mechanisms . That is , we have S different query-key parameterizations Wqi and Wki respectively . The output of each search is as defined in Equation 4 . In essence , for each search i , we get Qi = XWqi and Ki = XWki ( 7 ) Searchi = Softmax ( QiK T i√ dk , axis = ‘ keys ’ ) ( 8 ) Next , we define R different retrieval mechanisms , which correspond to the R different Wvj matrices . These matrices are used to obtain different attributes from the input . Formally , this is summarized as Vj = XWvj ( 9 ) where Vj highlights accessing of different attributes . Then , corresponding to each search , all possible retrievals are done . This is similar to Equation 5 and is defined as Retrievalij = Searchi Vj ( 10 ) for all i , j . This step gives us all the hypothetical retrievals for each search and out of this , one retrieval per search needs to be instantiated . This instantiation is done through a secondary attention mechanism computed using retrieval queries Qi and retrieval keys Kij , that are obtained as Qi = XW qi Kij = Retrievalij W k ( 11 ) where the parameter W qi ∈ Rd×dr is a different matrix for each search indexed by i and , together with W k , is tasked with driving the pairing between search and retrieval . We broadcast the matrix Qi from RN×dr to RN×1×dr and define Ki ∈ RN×R×dr by Ki = Concat ( Ki1 , Ki2 , . . . , KiR ) . ( 12 ) Thus , through these retrieval queries and keys , the required instantiation per search is done as CAtti = Softmax ( QiKi T √ dr , axis = ‘ retrieval ’ ) ︸ ︷︷ ︸ Value Scores Retrievalij ( 13 ) where the transpose is over the last two axes . Hence , for each search i , the softmax gives attention weights over all possible retrievals and the winning retrieval is instantiated through this soft attention mechanism . Finally , similar to multi-head attention , the outputs of these parallel searches are combined by concatenating them and passing them through a linear network : CompositionalAttention = Concat ( CAtt1 , CAtt2 , . . . , CAttS ) W o ( 14 ) where W o ∈ RSdv×d . Note that in this mechanism , the choice of retrieval for each search is not fixed , and instead is dynamically modulated by Qi and Ki respectively . We refer the readers to Figure 2 for a visual depiction of the computation graph . Compositional Attention allows the model to have ( a ) Different number of searches and retrievals , i.e . S andR respectively , ( b ) Dynamic selection of shared retrievals for each search and ( c ) Representation capacity of S × R ( Search – Retrieval ) pairings . Thus , we highlight that Compositional Attention disentangles search and retrieval and solves the redundancies of multi-head attention ( Section 2.3 ) . | The paper studies the multi-head attention mechanism in Transformer. The paper first analysis the potential drawback of the rigid mapping between search and retrieval in standard attention heads, and then proposes compositional attention that disentangles search and retrieval and composes them in a dynamic and context-dependent manner. To evaluate the proposed method, the author conduct experiments on the standard Transformer model and Vision Transformer. Overall, the paper is clearly written and the problem studied in this paper is interesting and well-motivated. The proposed compositional attention mechanism is rational. The experiment conducted in this paper is somewhat thorough. | SP:197f4621a7c56f36f071154f5ddd8e4e018a212a |
Communicating via Markov Decision Processes | 1 INTRODUCTION . This work introduces a novel problem setting called Markov coding games ( MCGs ) . MCGs are two-player decentralized Markov decision processes ( Oliehoek et al. , 2016 ) that proceed in four steps . In the first step , one agent ( called the sender ) receives a special private observation ( called the message ) , which it is tasked with communicating . In the second step , the sender plays out an episode of a Markov decision process ( MDP ) . In the third , the other agent ( called the receiver ) receives the sender ’ s MDP trajectory as its observation . In the fourth , the receiver estimates the message from the received trajectory . The shared payoff to the sender and receiver is a weighted sum of the cumulative reward yielded by the MDP and an indicator specifying whether or not the receiver correctly decoded the message . Among the reasons that MCGs are of interest is the fact that they generalize other important settings . The first of these is referential games . In a referential game , a sender attempts to communicate a message to a receiver using cheap talk actions—i.e. , communicatory actions that do not have externalities on the transition or reward functions . Referential games have been a subject of academic interest dating back at least as far as Lewis ’ s seminal work Convention ( Lewis , 1969 ) . Since then , various flavors of referential games have been studied in game theory ( Skyrms , 2010 ) , artificial life ( Steels , 2013 ) , evolutionary linguistics ( Smith , 2002 ) , cognitive science ( Spike et al. , 2017 ) , and machine learning ( Lazaridou et al. , 2018 ) . MCGs can be viewed as a generalization of referential games to a setting where we drop the often unrealistic assumption that the sender ’ s actions do not incur costs . A second problem setting generalized by MCGs is source coding ( MacKay , 2002 ) . In source coding ( also known as data compression ) the objective is to construct an injective mapping from a space of messages to the set of sequences of symbols ( for some finite set of symbols ) such that the expected output length is minimized . Source coding has a myriad of real world applications involving the compression of images , video , audio , and genetic data . MCGs can be viewed as a generalization of the source coding problem to a setting where the cost of an encoding may involve complex considerations , rather than simply being equal to the sequence length . Yet another reason to be interested in MCGs is that they isolate an important subproblem of decentralized control . In particular , achieving good performance in an MCG requires the sender ’ s actions to simultaneously perform control in an MDP and communicate information ( i.e. , to communicate implicitly ) . This presents a challenge due to the fact that approximate dynamic programming , the foundation for preeminent approaches to constructing control policies ( Sutton & Barto , 2018 ) , is ill suited to constructing communication protocols because their values depend on counterfactuals . In other words , the information conveyed by an action depends on the policy at other contemporaneous states , violating the locality assumption of approximate dynamic programming approaches . To address MCGs , we propose a theoretically grounded algorithm called greedy minimum entropy coupling ( GME ) . GME leverages a union of maximum entropy reinforcement learning ( MaxEnt RL ) ( Ziebart et al. , 2008 ) and minimum entropy coupling ( MEC ) ( Kovačević et al. , 2015 ) . The key insight is that maximizing the returns of the MDP can be disentangled from learning a good communication protocol by realizing that the entropy of a policy corresponds ( in an informal sense ) to its capacity to communicate . GME leverages this insight in two steps . In the first step , GME constructs a MaxEnt policy for the MDP , balancing between maximizing expected return and maximizing cumulative conditional entropy . In the second step , which occurs at each decision point , GME uses MEC to pair messages with actions in such a way that the sender selects actions with the same probabilities as the MaxEnt RL policy ( thereby guaranteeing the same expected return from the MDP ) and the receiver ’ s uncertainty about the message is greedily reduced as much as possible . To demonstrate the efficacy of GME , we present experiments for MCGs based on a gridworld , Cartpole , and Pong ( Bellemare et al. , 2013 ) , which we call CodeGrid , CodeCart , and CodePong , respectively . For CodeGrid , we show that with a message space in the 10s or 100s , GME significantly is able to outperform a relevant baseline . For CodeCart and CodePong , we use a message space of binary images and a uniform distribution over messages , meaning that a randomly guessing receiver has an astronomically small probability of guessing correctly . Remarkably , we show that GME is able to achieve an optimal expected return in Cartpole and Pong while simultaneously losslessly communicating images to the receiver , demonstrating that GME has the capacity to be scaled to extremely large message spaces and complex control tasks . Moreover , we find that the performance of GME decays gracefully as the amount of actuator noise in the environment increases . 2 RELATED WORK . The works that are most closely related to this one can be taxonomized as coming from literature on referential games , source coding , multi-agent reinforcement learning , and diverse skill learning . Referential Games Among work on referential games , Foerster et al . ( 2016 ) ’ s work is perhaps most similar in that it is concerned with directly optimizing the performance of a communication protocol . They propose DIAL , an algorithm that optimizes the sender ’ s protocol by performing gradient ascent through the parameters of the receiver . Foerster et al . show that DIAL outperforms methods based on independent Q-learning on a variety of communication tasks . However , DIAL-based approaches are not directly applicable to MCGs , as they would require differentiating through trajectories . Coding Another body of related work concerns extensions of the source coding problem . Length limited coding ( Larmore & Hirschberg , 1990 ) considers a problem setting in which the objective is to minimize the expected sequence length ( as before ) , subject to a maximum length constraint . Coding with unequal symbol costs ( Golin et al. , 2002 ; Iwata et al. , 1997 ) considers the problem in which the goal is to minimize the expected cumulative symbol cost of the sequence to which the message is mapped . The cost of a symbol may differ from the cost of other symbols arbitrarily , making it a strictly more general problem setting than standard source coding ( which can also be thought of as minimizing cumulative symbol cost with equally costly symbols ) . Both length limited coding and coding with unequal costs are subsumed by Markov coding games . And while existing algorithms for both standard source coding and the extensions above are well-established and widely commercialized , they are unable to address the more general MCG setting . MCGs are also related to finite state Markov channel settings ( Wang & Moayeri , 1995 ) . In such settings , the fidelity of the channel by which the sender communicates to a receiver is controlled by a Markov process , which , in contrast to our work , transitions independently of the sender ’ s decisions . Another related setting is intersymbol interference , where the sender ’ s previously selected symbols ( i.e. , actions ) may cause interference with subsequently selected symbols , making them less likely to be faithfully transmitted to the receiver ( Lathi , 1998 ) . MCGs differ from both Markov channel and intersymbol interference settings in that the Markov system controls the cost paid by the sender , rather than interfering with the quality of the channel . MCGs are more resemblant of a setting in which the channel is reliable , but subject to natural variation in costs , such as based on weather or third party usage , as well as variation based on the sender ’ s own usage . Multi-Agent Reinforcement Learning A third related area comes from MARL literature . Strouse et al . ( 2018 ) investigate directly embedding a reward for taking actions with high mutual information into policy gradient objectives . They find that this approach can improve expected return in cooperative settings with asymmetric information . The baseline for our CodeGrid experiments loosely resembles Strouse et al. ’ s algorithm . More recently , Bhatt & Buro ( 2021 ) investigate an alternative approach whereby the sender ’ s behavioral policy deterministically selects the action that maximizes the receiver ’ s posterior probability of the correct message , when computed using the target policy . They show that this modification empirically yields significantly improved convergence properties as compared to other variations of independent reinforcement learning . However , this approach is not directly applicable to settings in which a single action must be used for both communication and control . Diverse Skill Learning A fourth area of related research is that of diverse skill learning ( Eysenbach et al. , 2019 ) . Eysenbach et al . ( 2019 ) propose an unsupervised learning method for discovering diverse , identifiable skills . Their objective , called DIAYN , seeks to learn diverse , discriminable skills . This paradigm resembles our work in the sense that skills can be interpreted as messages and discriminability can be interpreted as maximizing the mutual information between the skill and the state . The baseline used in our CodeGrid experiments can also be viewed as an adaptation of an idealized version of DIAYN to the MCG setting . 3 BACKGROUND AND NOTATION . We will require the following background and notation material to introduce Markov coding games and greedy minimum entropy coupling . Markov Decision Processes To represent our task formalism , we use finite Markov decision processes ( MDPs ) . We notate MDPs using tuples 〈S , A , R , T 〉 where S is the set of states , A is the set of actions , R : S × A → R is the reward function , and T : S × A → ∆ ( S ) is the transition function . An agent ’ s interactions with an MDP are dictated by a policy π : S → ∆ ( A ) mapping states to distributions over actions . We focus on episodic MDPs , meaning that after a finite number of transitions have occurred , the MDP will terminate . The history of states and actions is notated using h = ( s0 , a0 , . . . , st ) . We use the notation R ( h ) = ∑j R ( sj , aj ) to denote the amount of reward accumulated over the course of a history . When a history is terminal , we use z to notate it , rather than h. The objective of an MDP is to determine a policy arg maxπEπR ( Z ) yielding a large cumulative reward in expectation . Entropy To help us quantify the idea of uncertainty , we introduce entropy . Symbolically , the entropy of a random variable X is H ( X ) = −E logP ( X ) . Because the logarithm function is concave , the entropy of X is maximized when the mass of PX is spread as evenly as possible and minimized when the mass of PX is concentrated at a single point . In the context of decision-making , entropy can be used to describe the uncertainty regarding which action will be taken by an agent . When a policy spans multiple decision-points , the uncertainty regarding the agent ’ s actions given that the state is known is naturally described by conditional entropy . Conditional entropy is the entropy of a random variable , conditioned upon the fact that the realization of another random variable is known . More formally , conditional entropy is defined by H ( X | Y ) = H ( X , Y ) −H ( Y ) where the joint entropyH ( X , Y ) = −E logP ( X , Y ) is defined as the entropy of ( X , Y ) considered as a random vector . In some contexts , it is desirable for a decision-maker ’ s policy to be highly stochastic . In such cases , an attractive alternative to the expected cumulative reward objective is the maximum entropy RL objective Ziebart et al . ( 2008 ) maxπ Eπ [ ∑ tR ( St , At ) + αH ( At | St ) ] , which trades off between maximizing expected return and pursuing trajectories along which its actions have large cumulative conditional entropy , using the temperature hyperparameter α . Mutual Information A closely related concept to entropy is mutual information . Mutual information describes the strength of the dependence between two random variables . The greater the mutual information between two random variables , the more the outcome of one affects the conditional distribution of the other . Symbolically , mutual information is defined by I ( X ; Y ) = H ( Y ) −H ( Y | X ) = H ( X ) −H ( X | Y ) . From this definition , we see explicitly that the mutual information of two random variables can be interpreted as the amount of uncertainty about one that is eliminated by observing the realization of the other . Mutual information is important for communication because we may only be able to share the realization of an auxiliary random variable , rather than that of the random variable of interest . In such cases , maximizing the amount of communicated information amounts to maximizing the mutual information between the auxiliary random variable and the random variable of interest . The Data Processing Inequality The independence relationships among random variables play an important role in determining their mutual information . If random variables X and Z are conditionally independent given Y ( that is , X ⊥ Z | Y ) , the data processing inequality states that I ( X ; Y ) ≥ I ( X ; Z ) . Less formally , the data processing inequality states that if Z does not provide additional information about X given Y , then the dependence between X and Z can not be stronger than the dependence between X and Y . Minimum Entropy Coupling In some cases , we may wish to maximize the mutual information between two random variables subject to fixed marginals . That is , we are tasked with determining a joint distribution PX , Y that maximizes the mutual information I ( X ; Y ) between X and Y subject to the constraints that PX , Y marginalizes to PX and PY , where PX and PY are given as input . Invoking the relationship between mutual information and joint entropy I ( X ; Y ) = H ( X ) + H ( Y ) − H ( X , Y ) , we see that this problem is equivalent to that of minimizing the joint entropy of X and Y . As a result , this problem is often referred to as the minimum entropy coupling problem . A visual example is shown in Figure 1 . While minimum entropy coupling is NP-hard Kovačević et al . ( 2015 ) , Cicalese et al . ( 2019 ) recently showed that there exists a polynomial time algorithm that is suboptimal by no more than one bit . | The paper suggests a combination of MaxEnt RL with Minimum Entropy Coupling to construct a communication method via (on the fly) modulation of a stochastic policy execution. The core idea being that communication does not require a separate channel beyond the capability of the receiver to observe the sender's (otherwise goal-driven) behaviour. The paper is supported by several experiments, including a study of external interferences with the established behaviour-based communication channel in the form of action execution uncertainty. | SP:360e8cb571b1aac6463bb0d3db3e9afa0ef77ec6 |
Communicating via Markov Decision Processes | 1 INTRODUCTION . This work introduces a novel problem setting called Markov coding games ( MCGs ) . MCGs are two-player decentralized Markov decision processes ( Oliehoek et al. , 2016 ) that proceed in four steps . In the first step , one agent ( called the sender ) receives a special private observation ( called the message ) , which it is tasked with communicating . In the second step , the sender plays out an episode of a Markov decision process ( MDP ) . In the third , the other agent ( called the receiver ) receives the sender ’ s MDP trajectory as its observation . In the fourth , the receiver estimates the message from the received trajectory . The shared payoff to the sender and receiver is a weighted sum of the cumulative reward yielded by the MDP and an indicator specifying whether or not the receiver correctly decoded the message . Among the reasons that MCGs are of interest is the fact that they generalize other important settings . The first of these is referential games . In a referential game , a sender attempts to communicate a message to a receiver using cheap talk actions—i.e. , communicatory actions that do not have externalities on the transition or reward functions . Referential games have been a subject of academic interest dating back at least as far as Lewis ’ s seminal work Convention ( Lewis , 1969 ) . Since then , various flavors of referential games have been studied in game theory ( Skyrms , 2010 ) , artificial life ( Steels , 2013 ) , evolutionary linguistics ( Smith , 2002 ) , cognitive science ( Spike et al. , 2017 ) , and machine learning ( Lazaridou et al. , 2018 ) . MCGs can be viewed as a generalization of referential games to a setting where we drop the often unrealistic assumption that the sender ’ s actions do not incur costs . A second problem setting generalized by MCGs is source coding ( MacKay , 2002 ) . In source coding ( also known as data compression ) the objective is to construct an injective mapping from a space of messages to the set of sequences of symbols ( for some finite set of symbols ) such that the expected output length is minimized . Source coding has a myriad of real world applications involving the compression of images , video , audio , and genetic data . MCGs can be viewed as a generalization of the source coding problem to a setting where the cost of an encoding may involve complex considerations , rather than simply being equal to the sequence length . Yet another reason to be interested in MCGs is that they isolate an important subproblem of decentralized control . In particular , achieving good performance in an MCG requires the sender ’ s actions to simultaneously perform control in an MDP and communicate information ( i.e. , to communicate implicitly ) . This presents a challenge due to the fact that approximate dynamic programming , the foundation for preeminent approaches to constructing control policies ( Sutton & Barto , 2018 ) , is ill suited to constructing communication protocols because their values depend on counterfactuals . In other words , the information conveyed by an action depends on the policy at other contemporaneous states , violating the locality assumption of approximate dynamic programming approaches . To address MCGs , we propose a theoretically grounded algorithm called greedy minimum entropy coupling ( GME ) . GME leverages a union of maximum entropy reinforcement learning ( MaxEnt RL ) ( Ziebart et al. , 2008 ) and minimum entropy coupling ( MEC ) ( Kovačević et al. , 2015 ) . The key insight is that maximizing the returns of the MDP can be disentangled from learning a good communication protocol by realizing that the entropy of a policy corresponds ( in an informal sense ) to its capacity to communicate . GME leverages this insight in two steps . In the first step , GME constructs a MaxEnt policy for the MDP , balancing between maximizing expected return and maximizing cumulative conditional entropy . In the second step , which occurs at each decision point , GME uses MEC to pair messages with actions in such a way that the sender selects actions with the same probabilities as the MaxEnt RL policy ( thereby guaranteeing the same expected return from the MDP ) and the receiver ’ s uncertainty about the message is greedily reduced as much as possible . To demonstrate the efficacy of GME , we present experiments for MCGs based on a gridworld , Cartpole , and Pong ( Bellemare et al. , 2013 ) , which we call CodeGrid , CodeCart , and CodePong , respectively . For CodeGrid , we show that with a message space in the 10s or 100s , GME significantly is able to outperform a relevant baseline . For CodeCart and CodePong , we use a message space of binary images and a uniform distribution over messages , meaning that a randomly guessing receiver has an astronomically small probability of guessing correctly . Remarkably , we show that GME is able to achieve an optimal expected return in Cartpole and Pong while simultaneously losslessly communicating images to the receiver , demonstrating that GME has the capacity to be scaled to extremely large message spaces and complex control tasks . Moreover , we find that the performance of GME decays gracefully as the amount of actuator noise in the environment increases . 2 RELATED WORK . The works that are most closely related to this one can be taxonomized as coming from literature on referential games , source coding , multi-agent reinforcement learning , and diverse skill learning . Referential Games Among work on referential games , Foerster et al . ( 2016 ) ’ s work is perhaps most similar in that it is concerned with directly optimizing the performance of a communication protocol . They propose DIAL , an algorithm that optimizes the sender ’ s protocol by performing gradient ascent through the parameters of the receiver . Foerster et al . show that DIAL outperforms methods based on independent Q-learning on a variety of communication tasks . However , DIAL-based approaches are not directly applicable to MCGs , as they would require differentiating through trajectories . Coding Another body of related work concerns extensions of the source coding problem . Length limited coding ( Larmore & Hirschberg , 1990 ) considers a problem setting in which the objective is to minimize the expected sequence length ( as before ) , subject to a maximum length constraint . Coding with unequal symbol costs ( Golin et al. , 2002 ; Iwata et al. , 1997 ) considers the problem in which the goal is to minimize the expected cumulative symbol cost of the sequence to which the message is mapped . The cost of a symbol may differ from the cost of other symbols arbitrarily , making it a strictly more general problem setting than standard source coding ( which can also be thought of as minimizing cumulative symbol cost with equally costly symbols ) . Both length limited coding and coding with unequal costs are subsumed by Markov coding games . And while existing algorithms for both standard source coding and the extensions above are well-established and widely commercialized , they are unable to address the more general MCG setting . MCGs are also related to finite state Markov channel settings ( Wang & Moayeri , 1995 ) . In such settings , the fidelity of the channel by which the sender communicates to a receiver is controlled by a Markov process , which , in contrast to our work , transitions independently of the sender ’ s decisions . Another related setting is intersymbol interference , where the sender ’ s previously selected symbols ( i.e. , actions ) may cause interference with subsequently selected symbols , making them less likely to be faithfully transmitted to the receiver ( Lathi , 1998 ) . MCGs differ from both Markov channel and intersymbol interference settings in that the Markov system controls the cost paid by the sender , rather than interfering with the quality of the channel . MCGs are more resemblant of a setting in which the channel is reliable , but subject to natural variation in costs , such as based on weather or third party usage , as well as variation based on the sender ’ s own usage . Multi-Agent Reinforcement Learning A third related area comes from MARL literature . Strouse et al . ( 2018 ) investigate directly embedding a reward for taking actions with high mutual information into policy gradient objectives . They find that this approach can improve expected return in cooperative settings with asymmetric information . The baseline for our CodeGrid experiments loosely resembles Strouse et al. ’ s algorithm . More recently , Bhatt & Buro ( 2021 ) investigate an alternative approach whereby the sender ’ s behavioral policy deterministically selects the action that maximizes the receiver ’ s posterior probability of the correct message , when computed using the target policy . They show that this modification empirically yields significantly improved convergence properties as compared to other variations of independent reinforcement learning . However , this approach is not directly applicable to settings in which a single action must be used for both communication and control . Diverse Skill Learning A fourth area of related research is that of diverse skill learning ( Eysenbach et al. , 2019 ) . Eysenbach et al . ( 2019 ) propose an unsupervised learning method for discovering diverse , identifiable skills . Their objective , called DIAYN , seeks to learn diverse , discriminable skills . This paradigm resembles our work in the sense that skills can be interpreted as messages and discriminability can be interpreted as maximizing the mutual information between the skill and the state . The baseline used in our CodeGrid experiments can also be viewed as an adaptation of an idealized version of DIAYN to the MCG setting . 3 BACKGROUND AND NOTATION . We will require the following background and notation material to introduce Markov coding games and greedy minimum entropy coupling . Markov Decision Processes To represent our task formalism , we use finite Markov decision processes ( MDPs ) . We notate MDPs using tuples 〈S , A , R , T 〉 where S is the set of states , A is the set of actions , R : S × A → R is the reward function , and T : S × A → ∆ ( S ) is the transition function . An agent ’ s interactions with an MDP are dictated by a policy π : S → ∆ ( A ) mapping states to distributions over actions . We focus on episodic MDPs , meaning that after a finite number of transitions have occurred , the MDP will terminate . The history of states and actions is notated using h = ( s0 , a0 , . . . , st ) . We use the notation R ( h ) = ∑j R ( sj , aj ) to denote the amount of reward accumulated over the course of a history . When a history is terminal , we use z to notate it , rather than h. The objective of an MDP is to determine a policy arg maxπEπR ( Z ) yielding a large cumulative reward in expectation . Entropy To help us quantify the idea of uncertainty , we introduce entropy . Symbolically , the entropy of a random variable X is H ( X ) = −E logP ( X ) . Because the logarithm function is concave , the entropy of X is maximized when the mass of PX is spread as evenly as possible and minimized when the mass of PX is concentrated at a single point . In the context of decision-making , entropy can be used to describe the uncertainty regarding which action will be taken by an agent . When a policy spans multiple decision-points , the uncertainty regarding the agent ’ s actions given that the state is known is naturally described by conditional entropy . Conditional entropy is the entropy of a random variable , conditioned upon the fact that the realization of another random variable is known . More formally , conditional entropy is defined by H ( X | Y ) = H ( X , Y ) −H ( Y ) where the joint entropyH ( X , Y ) = −E logP ( X , Y ) is defined as the entropy of ( X , Y ) considered as a random vector . In some contexts , it is desirable for a decision-maker ’ s policy to be highly stochastic . In such cases , an attractive alternative to the expected cumulative reward objective is the maximum entropy RL objective Ziebart et al . ( 2008 ) maxπ Eπ [ ∑ tR ( St , At ) + αH ( At | St ) ] , which trades off between maximizing expected return and pursuing trajectories along which its actions have large cumulative conditional entropy , using the temperature hyperparameter α . Mutual Information A closely related concept to entropy is mutual information . Mutual information describes the strength of the dependence between two random variables . The greater the mutual information between two random variables , the more the outcome of one affects the conditional distribution of the other . Symbolically , mutual information is defined by I ( X ; Y ) = H ( Y ) −H ( Y | X ) = H ( X ) −H ( X | Y ) . From this definition , we see explicitly that the mutual information of two random variables can be interpreted as the amount of uncertainty about one that is eliminated by observing the realization of the other . Mutual information is important for communication because we may only be able to share the realization of an auxiliary random variable , rather than that of the random variable of interest . In such cases , maximizing the amount of communicated information amounts to maximizing the mutual information between the auxiliary random variable and the random variable of interest . The Data Processing Inequality The independence relationships among random variables play an important role in determining their mutual information . If random variables X and Z are conditionally independent given Y ( that is , X ⊥ Z | Y ) , the data processing inequality states that I ( X ; Y ) ≥ I ( X ; Z ) . Less formally , the data processing inequality states that if Z does not provide additional information about X given Y , then the dependence between X and Z can not be stronger than the dependence between X and Y . Minimum Entropy Coupling In some cases , we may wish to maximize the mutual information between two random variables subject to fixed marginals . That is , we are tasked with determining a joint distribution PX , Y that maximizes the mutual information I ( X ; Y ) between X and Y subject to the constraints that PX , Y marginalizes to PX and PY , where PX and PY are given as input . Invoking the relationship between mutual information and joint entropy I ( X ; Y ) = H ( X ) + H ( Y ) − H ( X , Y ) , we see that this problem is equivalent to that of minimizing the joint entropy of X and Y . As a result , this problem is often referred to as the minimum entropy coupling problem . A visual example is shown in Figure 1 . While minimum entropy coupling is NP-hard Kovačević et al . ( 2015 ) , Cicalese et al . ( 2019 ) recently showed that there exists a polynomial time algorithm that is suboptimal by no more than one bit . | The paper introduces a problem setting, namely Markov Coding Game (MCG): sender receives a state (message) and takes an action to communicate the state to the receiver, receiver observes the taken action, then takes an action to decode the observed state of sender. This game is related to the referential games, source coding as well as decentralized control. To solve the MCG problem, the author designs the greedy minimum entropy coupling algorithm (GME), that aims to maximize the returns of the MDP and learn a good communication protocol simultaneously by combining existing techniques, MaxEnt RL and MEC. The algorithm is test empricially on Gridworld, Cartpole, and Pong. | SP:360e8cb571b1aac6463bb0d3db3e9afa0ef77ec6 |
Communicating via Markov Decision Processes | 1 INTRODUCTION . This work introduces a novel problem setting called Markov coding games ( MCGs ) . MCGs are two-player decentralized Markov decision processes ( Oliehoek et al. , 2016 ) that proceed in four steps . In the first step , one agent ( called the sender ) receives a special private observation ( called the message ) , which it is tasked with communicating . In the second step , the sender plays out an episode of a Markov decision process ( MDP ) . In the third , the other agent ( called the receiver ) receives the sender ’ s MDP trajectory as its observation . In the fourth , the receiver estimates the message from the received trajectory . The shared payoff to the sender and receiver is a weighted sum of the cumulative reward yielded by the MDP and an indicator specifying whether or not the receiver correctly decoded the message . Among the reasons that MCGs are of interest is the fact that they generalize other important settings . The first of these is referential games . In a referential game , a sender attempts to communicate a message to a receiver using cheap talk actions—i.e. , communicatory actions that do not have externalities on the transition or reward functions . Referential games have been a subject of academic interest dating back at least as far as Lewis ’ s seminal work Convention ( Lewis , 1969 ) . Since then , various flavors of referential games have been studied in game theory ( Skyrms , 2010 ) , artificial life ( Steels , 2013 ) , evolutionary linguistics ( Smith , 2002 ) , cognitive science ( Spike et al. , 2017 ) , and machine learning ( Lazaridou et al. , 2018 ) . MCGs can be viewed as a generalization of referential games to a setting where we drop the often unrealistic assumption that the sender ’ s actions do not incur costs . A second problem setting generalized by MCGs is source coding ( MacKay , 2002 ) . In source coding ( also known as data compression ) the objective is to construct an injective mapping from a space of messages to the set of sequences of symbols ( for some finite set of symbols ) such that the expected output length is minimized . Source coding has a myriad of real world applications involving the compression of images , video , audio , and genetic data . MCGs can be viewed as a generalization of the source coding problem to a setting where the cost of an encoding may involve complex considerations , rather than simply being equal to the sequence length . Yet another reason to be interested in MCGs is that they isolate an important subproblem of decentralized control . In particular , achieving good performance in an MCG requires the sender ’ s actions to simultaneously perform control in an MDP and communicate information ( i.e. , to communicate implicitly ) . This presents a challenge due to the fact that approximate dynamic programming , the foundation for preeminent approaches to constructing control policies ( Sutton & Barto , 2018 ) , is ill suited to constructing communication protocols because their values depend on counterfactuals . In other words , the information conveyed by an action depends on the policy at other contemporaneous states , violating the locality assumption of approximate dynamic programming approaches . To address MCGs , we propose a theoretically grounded algorithm called greedy minimum entropy coupling ( GME ) . GME leverages a union of maximum entropy reinforcement learning ( MaxEnt RL ) ( Ziebart et al. , 2008 ) and minimum entropy coupling ( MEC ) ( Kovačević et al. , 2015 ) . The key insight is that maximizing the returns of the MDP can be disentangled from learning a good communication protocol by realizing that the entropy of a policy corresponds ( in an informal sense ) to its capacity to communicate . GME leverages this insight in two steps . In the first step , GME constructs a MaxEnt policy for the MDP , balancing between maximizing expected return and maximizing cumulative conditional entropy . In the second step , which occurs at each decision point , GME uses MEC to pair messages with actions in such a way that the sender selects actions with the same probabilities as the MaxEnt RL policy ( thereby guaranteeing the same expected return from the MDP ) and the receiver ’ s uncertainty about the message is greedily reduced as much as possible . To demonstrate the efficacy of GME , we present experiments for MCGs based on a gridworld , Cartpole , and Pong ( Bellemare et al. , 2013 ) , which we call CodeGrid , CodeCart , and CodePong , respectively . For CodeGrid , we show that with a message space in the 10s or 100s , GME significantly is able to outperform a relevant baseline . For CodeCart and CodePong , we use a message space of binary images and a uniform distribution over messages , meaning that a randomly guessing receiver has an astronomically small probability of guessing correctly . Remarkably , we show that GME is able to achieve an optimal expected return in Cartpole and Pong while simultaneously losslessly communicating images to the receiver , demonstrating that GME has the capacity to be scaled to extremely large message spaces and complex control tasks . Moreover , we find that the performance of GME decays gracefully as the amount of actuator noise in the environment increases . 2 RELATED WORK . The works that are most closely related to this one can be taxonomized as coming from literature on referential games , source coding , multi-agent reinforcement learning , and diverse skill learning . Referential Games Among work on referential games , Foerster et al . ( 2016 ) ’ s work is perhaps most similar in that it is concerned with directly optimizing the performance of a communication protocol . They propose DIAL , an algorithm that optimizes the sender ’ s protocol by performing gradient ascent through the parameters of the receiver . Foerster et al . show that DIAL outperforms methods based on independent Q-learning on a variety of communication tasks . However , DIAL-based approaches are not directly applicable to MCGs , as they would require differentiating through trajectories . Coding Another body of related work concerns extensions of the source coding problem . Length limited coding ( Larmore & Hirschberg , 1990 ) considers a problem setting in which the objective is to minimize the expected sequence length ( as before ) , subject to a maximum length constraint . Coding with unequal symbol costs ( Golin et al. , 2002 ; Iwata et al. , 1997 ) considers the problem in which the goal is to minimize the expected cumulative symbol cost of the sequence to which the message is mapped . The cost of a symbol may differ from the cost of other symbols arbitrarily , making it a strictly more general problem setting than standard source coding ( which can also be thought of as minimizing cumulative symbol cost with equally costly symbols ) . Both length limited coding and coding with unequal costs are subsumed by Markov coding games . And while existing algorithms for both standard source coding and the extensions above are well-established and widely commercialized , they are unable to address the more general MCG setting . MCGs are also related to finite state Markov channel settings ( Wang & Moayeri , 1995 ) . In such settings , the fidelity of the channel by which the sender communicates to a receiver is controlled by a Markov process , which , in contrast to our work , transitions independently of the sender ’ s decisions . Another related setting is intersymbol interference , where the sender ’ s previously selected symbols ( i.e. , actions ) may cause interference with subsequently selected symbols , making them less likely to be faithfully transmitted to the receiver ( Lathi , 1998 ) . MCGs differ from both Markov channel and intersymbol interference settings in that the Markov system controls the cost paid by the sender , rather than interfering with the quality of the channel . MCGs are more resemblant of a setting in which the channel is reliable , but subject to natural variation in costs , such as based on weather or third party usage , as well as variation based on the sender ’ s own usage . Multi-Agent Reinforcement Learning A third related area comes from MARL literature . Strouse et al . ( 2018 ) investigate directly embedding a reward for taking actions with high mutual information into policy gradient objectives . They find that this approach can improve expected return in cooperative settings with asymmetric information . The baseline for our CodeGrid experiments loosely resembles Strouse et al. ’ s algorithm . More recently , Bhatt & Buro ( 2021 ) investigate an alternative approach whereby the sender ’ s behavioral policy deterministically selects the action that maximizes the receiver ’ s posterior probability of the correct message , when computed using the target policy . They show that this modification empirically yields significantly improved convergence properties as compared to other variations of independent reinforcement learning . However , this approach is not directly applicable to settings in which a single action must be used for both communication and control . Diverse Skill Learning A fourth area of related research is that of diverse skill learning ( Eysenbach et al. , 2019 ) . Eysenbach et al . ( 2019 ) propose an unsupervised learning method for discovering diverse , identifiable skills . Their objective , called DIAYN , seeks to learn diverse , discriminable skills . This paradigm resembles our work in the sense that skills can be interpreted as messages and discriminability can be interpreted as maximizing the mutual information between the skill and the state . The baseline used in our CodeGrid experiments can also be viewed as an adaptation of an idealized version of DIAYN to the MCG setting . 3 BACKGROUND AND NOTATION . We will require the following background and notation material to introduce Markov coding games and greedy minimum entropy coupling . Markov Decision Processes To represent our task formalism , we use finite Markov decision processes ( MDPs ) . We notate MDPs using tuples 〈S , A , R , T 〉 where S is the set of states , A is the set of actions , R : S × A → R is the reward function , and T : S × A → ∆ ( S ) is the transition function . An agent ’ s interactions with an MDP are dictated by a policy π : S → ∆ ( A ) mapping states to distributions over actions . We focus on episodic MDPs , meaning that after a finite number of transitions have occurred , the MDP will terminate . The history of states and actions is notated using h = ( s0 , a0 , . . . , st ) . We use the notation R ( h ) = ∑j R ( sj , aj ) to denote the amount of reward accumulated over the course of a history . When a history is terminal , we use z to notate it , rather than h. The objective of an MDP is to determine a policy arg maxπEπR ( Z ) yielding a large cumulative reward in expectation . Entropy To help us quantify the idea of uncertainty , we introduce entropy . Symbolically , the entropy of a random variable X is H ( X ) = −E logP ( X ) . Because the logarithm function is concave , the entropy of X is maximized when the mass of PX is spread as evenly as possible and minimized when the mass of PX is concentrated at a single point . In the context of decision-making , entropy can be used to describe the uncertainty regarding which action will be taken by an agent . When a policy spans multiple decision-points , the uncertainty regarding the agent ’ s actions given that the state is known is naturally described by conditional entropy . Conditional entropy is the entropy of a random variable , conditioned upon the fact that the realization of another random variable is known . More formally , conditional entropy is defined by H ( X | Y ) = H ( X , Y ) −H ( Y ) where the joint entropyH ( X , Y ) = −E logP ( X , Y ) is defined as the entropy of ( X , Y ) considered as a random vector . In some contexts , it is desirable for a decision-maker ’ s policy to be highly stochastic . In such cases , an attractive alternative to the expected cumulative reward objective is the maximum entropy RL objective Ziebart et al . ( 2008 ) maxπ Eπ [ ∑ tR ( St , At ) + αH ( At | St ) ] , which trades off between maximizing expected return and pursuing trajectories along which its actions have large cumulative conditional entropy , using the temperature hyperparameter α . Mutual Information A closely related concept to entropy is mutual information . Mutual information describes the strength of the dependence between two random variables . The greater the mutual information between two random variables , the more the outcome of one affects the conditional distribution of the other . Symbolically , mutual information is defined by I ( X ; Y ) = H ( Y ) −H ( Y | X ) = H ( X ) −H ( X | Y ) . From this definition , we see explicitly that the mutual information of two random variables can be interpreted as the amount of uncertainty about one that is eliminated by observing the realization of the other . Mutual information is important for communication because we may only be able to share the realization of an auxiliary random variable , rather than that of the random variable of interest . In such cases , maximizing the amount of communicated information amounts to maximizing the mutual information between the auxiliary random variable and the random variable of interest . The Data Processing Inequality The independence relationships among random variables play an important role in determining their mutual information . If random variables X and Z are conditionally independent given Y ( that is , X ⊥ Z | Y ) , the data processing inequality states that I ( X ; Y ) ≥ I ( X ; Z ) . Less formally , the data processing inequality states that if Z does not provide additional information about X given Y , then the dependence between X and Z can not be stronger than the dependence between X and Y . Minimum Entropy Coupling In some cases , we may wish to maximize the mutual information between two random variables subject to fixed marginals . That is , we are tasked with determining a joint distribution PX , Y that maximizes the mutual information I ( X ; Y ) between X and Y subject to the constraints that PX , Y marginalizes to PX and PY , where PX and PY are given as input . Invoking the relationship between mutual information and joint entropy I ( X ; Y ) = H ( X ) + H ( Y ) − H ( X , Y ) , we see that this problem is equivalent to that of minimizing the joint entropy of X and Y . As a result , this problem is often referred to as the minimum entropy coupling problem . A visual example is shown in Figure 1 . While minimum entropy coupling is NP-hard Kovačević et al . ( 2015 ) , Cicalese et al . ( 2019 ) recently showed that there exists a polynomial time algorithm that is suboptimal by no more than one bit . | The article introduce a new theoretical game called Markov Coding Game (MCG). A Markov Coding game is a special case of Decentralized POMDP (Oliehoek et al. 2016). It seems to be a two-players cooperative game with a sender agent and a receiver agent. Given a message unknown to the receiver, the sender agent must play on a fixed MDP in a way that facilitates the decoding of this message by the receiver. A dedicated algorithm called GME for greedy minimum entropy coupling is proposed to solve this problem. According to the authors, this game is supposed to generalize several referential games and channel coding games. Some experiments are provided where bitmap images are transmitted through actions on gridword and pong environments. | SP:360e8cb571b1aac6463bb0d3db3e9afa0ef77ec6 |
An Information Fusion Approach to Learning with Instance-Dependent Label Noise | 1 INTRODUCTION . Data labeling annotated from human efforts , such as crowdsourcing ( Yan et al. , 2014 ; Chen et al. , 2017 ) and online queries ( Divvala et al. , 2014 ) , may be heavily noisy in practice . To make it worse , the label noise stemmed from the human annotations is often instance-dependent . For example , the images closing to the decision boundary are usually prone to be mislabeled ( Zhang et al. , 2021 ; Zhu et al. , 2021b ) . On the other hand , the remarkable success of deep neural networks ( DNNs ) on supervised learning tasks heavily relies on the expressive power and a large number of data with accurate labels . Unfortunately , deep neural networks memorizes noisy labels leading to poor generalization ( Zhang et al. , 2017 ) . It is challenging to learn with practical instance-dependent label noise ( IDN ) due to the hidden and complicated label noise properties ( Zhu et al. , 2021a ; Liu , 2021 ) . The methods of dealing with noisy labels falls in two lines , including heuristically identifying noisy samples or statistical label noise modeling . The training of deep neural network often learns the clean labels first ( Arpit et al. , 2017 ) and memorizes the noisy labels gradually , which is recognized as the memorization effect . Based on the general memorization effects , the heuristical methods are all designed via following the anomaly detection strategy : identifying the noisy sample based on different behaviors ( e.g. , loss values ) between clean and noisy samples during training . The typical methods contain sample selection ( Yu et al. , 2019 ; Han et al. , 2018b ) , reweight samples ( Cheng et al. , 2021 ; Jiang et al. , 2018 ; Ren et al. , 2018 ) , label correction ( Ma et al. , 2018 ; Tanaka et al. , 2018 ) , and regularization ( Han et al. , 2018a ) . Although these algorithms empirically work well , without modeling the label noise explicitly , the reliability can not be guaranteed . Another line of works relies on noise transition matrix ( NTM ) to model the label noise statistically ( Xia et al. , 2019 ; 2020 ; Patrini et al. , 2017 ) . Namely , the NTM quantifies the probabilities that clean labels flip into noisy labels . Although the NTM-based methods possess theoretical guarantee , under IDN , the NTM estimation for each instance is pretty challenging . To ease the estimation , some unrealistic assumptions have to be posed the on NTM , including instance-independent transition matrix ( Liu & Guo , 2020 ; Wei & Liu , 2021 ; Li et al. , 2021 ) , symmetric transition matrix ( Menon et al. , 2018 ) , upper bounded noise rate ( Cheng et al. , 2020 ) , and part-dependent label noise ( Xia et al. , 2020 ) . However , under the complex IDN , the empirical noise distribution is highly different with underlying noise distribution . For example , in Figure 1 , the underlying and empirical noisy distribution for long-tail instance is different since the empirical noisy label is either the same or different with clean label . Additionally , observed noisy label provide inductive bias toward label corruption . In other word , the genuine problem causing from IDN is the empirical , instead of underlying , clean and noisy distribution mismatch problem . To mitigate empirical distribution mismatch problem , we propose the posterior transition matrix ( PTM ) , posteriorly modeling label noise given the observed noisy labels . We adopt PTM to provably bridge the gap between clean and noisy underlying data distribution , and anchor points ( i.e. , data points that belong to a specific class almost surely ) empirical distribution simultaneously . We also provide an easy-to-compute PTM estimation under specific condition of low label noise . To extend the applicability to a wide range of label noise , motivated by Kalman filtering ( Kalman , 1960 ) , we proposed the information fusion ( IF ) method linearly combining the estimated noise and PTM , which achieves lower transition matrix estimation error . We empirically show that proposed method IF can achieve higher accuracy and more stable training . The main contributions of this work are summarized below . • We propose a new concept , named PTM , achieving consistent classifier for underlying distribution and anchor point empirical distribution mismatch simultaneously . • We propose the simple PTM estimation method based on observed noisy label under low label noise . To extend the applicability , we propose IF method , linearly combining the estimated NTM and PTM , to achieve lower estimation error with theoretical and experimental justification . • We experimentally demonstrate the superiority of proposed IF method achieving higher accuracy and more stable training under synthetic and real-world label noise . 2 PRELIMINARIES . Throughout this paper , we adopt uppercase letters to denote random variables , and lowercase letters to denote particular realization of the random variables . We target the c-class classification problem with instance-dependent ( label ) noise ( IDN ) . Let P ( X , Y ) be the underlying clean distribution of the random variables ( X , Y ) , where X and Y represent the instance and clean label . However , in real-world scenario , the clean label is corrupted and thus only noisy label , denoted as Ỹ , is observed . Given a set of N training instances denoted by D̃ : = { ( xn , ỹn ) } Nn=1 , where xn is the instance vector of the n-th sample , ỹn ∈ [ c ] : = { 1 , · · · , c } is the corresponding observed but noisy label , our goal is to predict the clean label yn for any given instance xn . Data distribution We assume that the unobserved clean samples ( xn , yn ) and available noisy samples ( xn , ỹn ) are drawn from unknown underlying clean distribution P ( X , Y ) and underlying noisy distribution P ( X , Ỹ ) , respectively . For the noisy samples data D̃ , we may approximate underlying noisy distribution by the empirical noisy distribution , i.e. , P̂D̃ ( X , Ỹ ) = 1 N ∑N n=1 δ ( X = xn , Ỹ = ỹn ) , where δ ( X = xn , Ỹ = ỹn ) is a Dirac mass centered at ( xn , ỹn ) . Since the clean data sample is unobserved , we define posterior empirical clean distribution P̂ ( X , Y |D̃ ) as the inference posterior empirical clean distribution from noisy samples data D̃ . Based on Bayes ’ s rule , the posterior empirical clean distribution is given by P̂ ( X , Y |D̃ ) = 1N ∑N n=1 ∑c yn=1 δ ( X = xn , Y = ỹn ) P ( Y = yn|Ỹ = ỹn , X = xn ) . Noise transition matrix T ( x ) To describe the corruption process of the label , the NTM T ( x ) ∈ Rc×c is defined as Ti , j ( x ) = P ( Ỹ = j|Y = i , X = x ) , which represents the transition probability of the instance x labeling from clean i-th class to noisy j-th class . The underlying noisy label Ỹ probability given the instance x satisfies : P ( Ỹ = j|X = x ) = c∑ i=1 P ( Ỹ = j|Y = i , X = x ) P ( Y = i|X = x ) = c∑ i=1 Tij ( x ) P ( Y = i|X = x ) . The NTM T ( x ) hence bridges the gap between the underlying clean labels probability P ( Y|X = x ) = [ P ( Y = 1|X = x ) , · · · , P ( Y = c|X = x ) ] > and underlying noisy labels probability P ( Ỹ|X = x ) = [ P ( Ỹ = 1|X = x ) , · · · , P ( Ỹ = c|X = x ) ] > given instance x , i.e. , P ( Ỹ|X = x ) = T ( x ) > P ( Y|X = x ) . Loss Correction method Let function f ( · ) represents a neural network and f ( x ) denotes the c-dimensional output probability for instance x , where the ith index of the output yf , i ( x ) represents the predicted probability for class i . The common approach is to minimize the cross-entropy ( CE ) loss l ( f ( x ) , y ) : = − log ( yf , y ( x ) ) to force the output yf , y ( x ) approximate 1 . However , the label noise may mislead deep learning model . The existing NTM based methods first estimate NTM T ( x ) and then adopt it to correct the loss function . For example , in the forward correction procedure ( Patrini et al. , 2017 ) , the estimated NTM is adopted to corrupt the output predicted probability f ( x ) , i.e. , the corrupted predicted probability is f̃ ( x ) = T ( x ) > f ( x ) , and then compares it with the noisy label ỹ . Suppose T ( x ) is non-singular and the loss function is proper and composite , the forward loss correction can achieve consistent classifier , i.e. , the optimal classifier for the corrected loss with respect to the underlying noisy distribution is the same as that for the CE loss with respect to the underlying clean distribution : arg min f E ( X , Ỹ ) ∼P ( X , Ỹ ) [ l ( Ỹ , T ( X ) > f ( X ) ) ] = arg min f E ( X , Y ) ∼P ( X , Y ) [ l ( Y , f ( X ) ) ] . ( 1 ) 3 LEARNING WITH INFORMATION FUSION . Even though the existing loss correction methods could achieve consistent classifier theoretically , their performances are still undesirable in practice . Since the deep learning model is often trained on the empirical distribution with limited samples , the NTM can not correctly bridge the empirical clean distribution and empirical noisy distribution , i.e. , P̂ ( Ỹ = j|X = x ) 6= ∑c i=1 Tij ( x ) P̂D̃ ( Y = i|X = x ) . In other words , the NTM-based method may not work well in practice since due to the empirical clean and noisy distribution mismatch problem in IDN . Aiming to utilize the observed noisy label , we propose a concept , named posterior transition matrix ( PTM ) , to describe the transition probability given the observed noisy labels ( formally defined in Section 3.1 ) . The motivation for PTM stems from a simple thought experiment as shown in Figure 1 , which shows that PTM can model the empirical label noise better than NTM . Figure 2 illustrates the overview framework of IF , including NTM and PTM estimations ( Section 3.2 ) , information fusion via linear combination ( Section 3.3 ) , and posterior loss function ( Section 3.1 ) . 3.1 THE LOSS CORRECTION METHOD . The main goal is to train a c-class neural network classifier f ( x , ω ) to predict the clean label probability P ( Y |X ) . Since only the noisy labels are observed , there is a gap between the clean and noisy label , describing via NTM ( Goldberger & Ben-Reuven , 2017 ) . Motivated by the observed noisy labels ( posterior information ) , we define the PTM W ( x ) to describe the posterior clean label probability given noisy label , where Wi , j ( x ) = P ( Y = i|Ỹ = j , X = x ) . We provide the relationship between the PTM W ( x ) and NTM T ( x ) via Bayes ’ rulei.e. , Wi , j ( x ) = P ( Y = i , Ỹ = j|X = x ) P ( Ỹ = j|X = x ) = P ( Y = i|X = x ) Tij ( x ) ∑c i=1 P ( Y = i|X = x ) Tij ( x ) . ( 2 ) Notice that only the summation of any column is 1 for PTM W ( x ) , while the summation of any rows are 1 for NTM T ( x ) . Subsequently , we provide posterior reweight loss correction method via NTM . Definition 1 ( Posterior reweight loss ) Assume the model prediction is f ( x ) for noisy sample ( x , ỹ ) and W ( x ) is the NTM associated with the noisy sample . The posterior reweight loss is defined as lp−rew ( ỹ , f ( x ) ) = c∑ i=1 Wi , ỹ ( x ) l ( i , f ( x ) ) , ( 3 ) We next analyze the property of the posterior reweight loss and provide the theoretical justification . Specifically , we analyze the expected risk RP ( X , Ỹ ) ( f ) = E ( x , ỹ ) ∼P ( X , Ỹ ) [ lp−rew ( ỹ , f ( x ) ) ] and empirical risk R̂D̂ ( f ) = 1 N ∑N n=1 lp−rew ( ỹn , f ( xn ) ) under noisy samples dataset . Theorem 3.1 ( Statistically Consistent Classifier ) The posterior reweight loss can achieve unbiased classifier for underlying distribution and empirical distribution . ( i ) For underlying distribution , the expected risk satisfies arg min f E ( x , ỹ ) ∼P ( X , Ỹ ) [ lp−rew ( ỹ , f ( x ) ) ] = arg min f E ( x , y ) ∼P ( X , Y ) [ l ( y , f ( x ) ) ] , ( 4 ) ( ii ) For the anchor points samples ( xap , ỹap ) with underlying clean probability P ( Y = yap|X = xap ) , the empirical risk satisfies lp−rew ( ỹap , f ( xap ) ) = l ( yap , f ( xap ) ) . For the empirical distribution , the empirical risk satisfies arg min f E ( x , ỹ ) ∼P̂D̃ ( X , Ỹ ) [ lp−rew ( ỹn , f ( xn ) ) ] = arg min f E ( x , y ) ∼P̂ ( X , Y |D̃ ) [ l ( yn , f ( xn ) ) ] . ( 5 ) We also show that the PTM can be adopted in the forward manner . The definition of posterior reweight loss is given as follows , Definition 2 ( Posterior forward loss ) Assume the model prediction is f ( x ) for noisy sample ( x , ỹ ) and W ( x ) is the NTM associated with the noisy sample . The posterior forward loss is defined as lp−fw ( ỹ , f ( x ) ) = l ( ỹ , c∑ i=1 Wi , ỹ ( x ) fi ( x ) ) , ( 6 ) We next analyze the property of the posterior forward loss and provide the theoretical justification . Lemma 3.2 The posterior forward loss is not larger than posterior reweighted loss lp−rew ( ỹ , f ( x ) ) ≥ lp−fw ( ỹ , f ( x ) ) . Theorem 3.3 ( Statistically Consistent Classifier ) Suppose the loss function l ( y , f ) is convex with respect to f ( the convex condition is commonly satisfies , e.g. , cross entropy loss ) , and the minimum expected risk RP ( X , Y ) ( f ) can achieve 0 , then the posterior forward loss can achieve unbiased classifier for underlying distribution , arg min f E ( x , ỹ ) ∼P ( X , Ỹ ) [ lp−fw ( ỹ , f ( x ) ) ] = arg min f E ( x , y ) ∼P ( X , Y ) [ l ( y , f ( x ) ) ] . ( 7 ) Compare the posterior forward loss with forward loss , it is seen that both of them correct the output of the neural network with statistically consistent risk guarantee , while the difference falls in the different transition matrix in the loss correction . In addition , the statistically consistent risk for forward loss and posterior forward loss both require the accurate transition matrix estimation . However , the label/PTM estimation is pretty challenging since the label noise is instance-dependent in real world . Such observation motivates us to combine the NTM T ( x ) and PTM W ( x ) to correct the loss . Motivated by Kalman filtering ( Kalman , 1960 ) , a famous estimation method combining the prior knowledge and measurement information , we propose an information approach to tackle instance-dependent label noise via loss correction . Specifically , we firstly claim that there are prior knowledge information and measurement information on the label noise , where prior knowledge information and measurement information represent the estimated NTM and PTM . | This paper provides new insight on estimating noise-transition matrix in the setting of instance-dependent label noise. Specifically, the authors observe that the traditional noise-transition matrix cannot well bridge the gap between underlying distribution and empirical distribution. Inspired by this observation, the authors propose to estimate the posterior noise-transition matrix. Further, authors use information fusion (IF) to linearly combine noise-transition matrix and posterior noise-transition matrix to obtain more accurate transition matrix estimation with theoretical guarantees. Experiments are conducted on CIFAR-10, SVHN, F-MNIST, and real-world dataset Clothing-1M. | SP:9ce68d0a88c8938280342fe7ef56e6b7e488b3fb |
An Information Fusion Approach to Learning with Instance-Dependent Label Noise | 1 INTRODUCTION . Data labeling annotated from human efforts , such as crowdsourcing ( Yan et al. , 2014 ; Chen et al. , 2017 ) and online queries ( Divvala et al. , 2014 ) , may be heavily noisy in practice . To make it worse , the label noise stemmed from the human annotations is often instance-dependent . For example , the images closing to the decision boundary are usually prone to be mislabeled ( Zhang et al. , 2021 ; Zhu et al. , 2021b ) . On the other hand , the remarkable success of deep neural networks ( DNNs ) on supervised learning tasks heavily relies on the expressive power and a large number of data with accurate labels . Unfortunately , deep neural networks memorizes noisy labels leading to poor generalization ( Zhang et al. , 2017 ) . It is challenging to learn with practical instance-dependent label noise ( IDN ) due to the hidden and complicated label noise properties ( Zhu et al. , 2021a ; Liu , 2021 ) . The methods of dealing with noisy labels falls in two lines , including heuristically identifying noisy samples or statistical label noise modeling . The training of deep neural network often learns the clean labels first ( Arpit et al. , 2017 ) and memorizes the noisy labels gradually , which is recognized as the memorization effect . Based on the general memorization effects , the heuristical methods are all designed via following the anomaly detection strategy : identifying the noisy sample based on different behaviors ( e.g. , loss values ) between clean and noisy samples during training . The typical methods contain sample selection ( Yu et al. , 2019 ; Han et al. , 2018b ) , reweight samples ( Cheng et al. , 2021 ; Jiang et al. , 2018 ; Ren et al. , 2018 ) , label correction ( Ma et al. , 2018 ; Tanaka et al. , 2018 ) , and regularization ( Han et al. , 2018a ) . Although these algorithms empirically work well , without modeling the label noise explicitly , the reliability can not be guaranteed . Another line of works relies on noise transition matrix ( NTM ) to model the label noise statistically ( Xia et al. , 2019 ; 2020 ; Patrini et al. , 2017 ) . Namely , the NTM quantifies the probabilities that clean labels flip into noisy labels . Although the NTM-based methods possess theoretical guarantee , under IDN , the NTM estimation for each instance is pretty challenging . To ease the estimation , some unrealistic assumptions have to be posed the on NTM , including instance-independent transition matrix ( Liu & Guo , 2020 ; Wei & Liu , 2021 ; Li et al. , 2021 ) , symmetric transition matrix ( Menon et al. , 2018 ) , upper bounded noise rate ( Cheng et al. , 2020 ) , and part-dependent label noise ( Xia et al. , 2020 ) . However , under the complex IDN , the empirical noise distribution is highly different with underlying noise distribution . For example , in Figure 1 , the underlying and empirical noisy distribution for long-tail instance is different since the empirical noisy label is either the same or different with clean label . Additionally , observed noisy label provide inductive bias toward label corruption . In other word , the genuine problem causing from IDN is the empirical , instead of underlying , clean and noisy distribution mismatch problem . To mitigate empirical distribution mismatch problem , we propose the posterior transition matrix ( PTM ) , posteriorly modeling label noise given the observed noisy labels . We adopt PTM to provably bridge the gap between clean and noisy underlying data distribution , and anchor points ( i.e. , data points that belong to a specific class almost surely ) empirical distribution simultaneously . We also provide an easy-to-compute PTM estimation under specific condition of low label noise . To extend the applicability to a wide range of label noise , motivated by Kalman filtering ( Kalman , 1960 ) , we proposed the information fusion ( IF ) method linearly combining the estimated noise and PTM , which achieves lower transition matrix estimation error . We empirically show that proposed method IF can achieve higher accuracy and more stable training . The main contributions of this work are summarized below . • We propose a new concept , named PTM , achieving consistent classifier for underlying distribution and anchor point empirical distribution mismatch simultaneously . • We propose the simple PTM estimation method based on observed noisy label under low label noise . To extend the applicability , we propose IF method , linearly combining the estimated NTM and PTM , to achieve lower estimation error with theoretical and experimental justification . • We experimentally demonstrate the superiority of proposed IF method achieving higher accuracy and more stable training under synthetic and real-world label noise . 2 PRELIMINARIES . Throughout this paper , we adopt uppercase letters to denote random variables , and lowercase letters to denote particular realization of the random variables . We target the c-class classification problem with instance-dependent ( label ) noise ( IDN ) . Let P ( X , Y ) be the underlying clean distribution of the random variables ( X , Y ) , where X and Y represent the instance and clean label . However , in real-world scenario , the clean label is corrupted and thus only noisy label , denoted as Ỹ , is observed . Given a set of N training instances denoted by D̃ : = { ( xn , ỹn ) } Nn=1 , where xn is the instance vector of the n-th sample , ỹn ∈ [ c ] : = { 1 , · · · , c } is the corresponding observed but noisy label , our goal is to predict the clean label yn for any given instance xn . Data distribution We assume that the unobserved clean samples ( xn , yn ) and available noisy samples ( xn , ỹn ) are drawn from unknown underlying clean distribution P ( X , Y ) and underlying noisy distribution P ( X , Ỹ ) , respectively . For the noisy samples data D̃ , we may approximate underlying noisy distribution by the empirical noisy distribution , i.e. , P̂D̃ ( X , Ỹ ) = 1 N ∑N n=1 δ ( X = xn , Ỹ = ỹn ) , where δ ( X = xn , Ỹ = ỹn ) is a Dirac mass centered at ( xn , ỹn ) . Since the clean data sample is unobserved , we define posterior empirical clean distribution P̂ ( X , Y |D̃ ) as the inference posterior empirical clean distribution from noisy samples data D̃ . Based on Bayes ’ s rule , the posterior empirical clean distribution is given by P̂ ( X , Y |D̃ ) = 1N ∑N n=1 ∑c yn=1 δ ( X = xn , Y = ỹn ) P ( Y = yn|Ỹ = ỹn , X = xn ) . Noise transition matrix T ( x ) To describe the corruption process of the label , the NTM T ( x ) ∈ Rc×c is defined as Ti , j ( x ) = P ( Ỹ = j|Y = i , X = x ) , which represents the transition probability of the instance x labeling from clean i-th class to noisy j-th class . The underlying noisy label Ỹ probability given the instance x satisfies : P ( Ỹ = j|X = x ) = c∑ i=1 P ( Ỹ = j|Y = i , X = x ) P ( Y = i|X = x ) = c∑ i=1 Tij ( x ) P ( Y = i|X = x ) . The NTM T ( x ) hence bridges the gap between the underlying clean labels probability P ( Y|X = x ) = [ P ( Y = 1|X = x ) , · · · , P ( Y = c|X = x ) ] > and underlying noisy labels probability P ( Ỹ|X = x ) = [ P ( Ỹ = 1|X = x ) , · · · , P ( Ỹ = c|X = x ) ] > given instance x , i.e. , P ( Ỹ|X = x ) = T ( x ) > P ( Y|X = x ) . Loss Correction method Let function f ( · ) represents a neural network and f ( x ) denotes the c-dimensional output probability for instance x , where the ith index of the output yf , i ( x ) represents the predicted probability for class i . The common approach is to minimize the cross-entropy ( CE ) loss l ( f ( x ) , y ) : = − log ( yf , y ( x ) ) to force the output yf , y ( x ) approximate 1 . However , the label noise may mislead deep learning model . The existing NTM based methods first estimate NTM T ( x ) and then adopt it to correct the loss function . For example , in the forward correction procedure ( Patrini et al. , 2017 ) , the estimated NTM is adopted to corrupt the output predicted probability f ( x ) , i.e. , the corrupted predicted probability is f̃ ( x ) = T ( x ) > f ( x ) , and then compares it with the noisy label ỹ . Suppose T ( x ) is non-singular and the loss function is proper and composite , the forward loss correction can achieve consistent classifier , i.e. , the optimal classifier for the corrected loss with respect to the underlying noisy distribution is the same as that for the CE loss with respect to the underlying clean distribution : arg min f E ( X , Ỹ ) ∼P ( X , Ỹ ) [ l ( Ỹ , T ( X ) > f ( X ) ) ] = arg min f E ( X , Y ) ∼P ( X , Y ) [ l ( Y , f ( X ) ) ] . ( 1 ) 3 LEARNING WITH INFORMATION FUSION . Even though the existing loss correction methods could achieve consistent classifier theoretically , their performances are still undesirable in practice . Since the deep learning model is often trained on the empirical distribution with limited samples , the NTM can not correctly bridge the empirical clean distribution and empirical noisy distribution , i.e. , P̂ ( Ỹ = j|X = x ) 6= ∑c i=1 Tij ( x ) P̂D̃ ( Y = i|X = x ) . In other words , the NTM-based method may not work well in practice since due to the empirical clean and noisy distribution mismatch problem in IDN . Aiming to utilize the observed noisy label , we propose a concept , named posterior transition matrix ( PTM ) , to describe the transition probability given the observed noisy labels ( formally defined in Section 3.1 ) . The motivation for PTM stems from a simple thought experiment as shown in Figure 1 , which shows that PTM can model the empirical label noise better than NTM . Figure 2 illustrates the overview framework of IF , including NTM and PTM estimations ( Section 3.2 ) , information fusion via linear combination ( Section 3.3 ) , and posterior loss function ( Section 3.1 ) . 3.1 THE LOSS CORRECTION METHOD . The main goal is to train a c-class neural network classifier f ( x , ω ) to predict the clean label probability P ( Y |X ) . Since only the noisy labels are observed , there is a gap between the clean and noisy label , describing via NTM ( Goldberger & Ben-Reuven , 2017 ) . Motivated by the observed noisy labels ( posterior information ) , we define the PTM W ( x ) to describe the posterior clean label probability given noisy label , where Wi , j ( x ) = P ( Y = i|Ỹ = j , X = x ) . We provide the relationship between the PTM W ( x ) and NTM T ( x ) via Bayes ’ rulei.e. , Wi , j ( x ) = P ( Y = i , Ỹ = j|X = x ) P ( Ỹ = j|X = x ) = P ( Y = i|X = x ) Tij ( x ) ∑c i=1 P ( Y = i|X = x ) Tij ( x ) . ( 2 ) Notice that only the summation of any column is 1 for PTM W ( x ) , while the summation of any rows are 1 for NTM T ( x ) . Subsequently , we provide posterior reweight loss correction method via NTM . Definition 1 ( Posterior reweight loss ) Assume the model prediction is f ( x ) for noisy sample ( x , ỹ ) and W ( x ) is the NTM associated with the noisy sample . The posterior reweight loss is defined as lp−rew ( ỹ , f ( x ) ) = c∑ i=1 Wi , ỹ ( x ) l ( i , f ( x ) ) , ( 3 ) We next analyze the property of the posterior reweight loss and provide the theoretical justification . Specifically , we analyze the expected risk RP ( X , Ỹ ) ( f ) = E ( x , ỹ ) ∼P ( X , Ỹ ) [ lp−rew ( ỹ , f ( x ) ) ] and empirical risk R̂D̂ ( f ) = 1 N ∑N n=1 lp−rew ( ỹn , f ( xn ) ) under noisy samples dataset . Theorem 3.1 ( Statistically Consistent Classifier ) The posterior reweight loss can achieve unbiased classifier for underlying distribution and empirical distribution . ( i ) For underlying distribution , the expected risk satisfies arg min f E ( x , ỹ ) ∼P ( X , Ỹ ) [ lp−rew ( ỹ , f ( x ) ) ] = arg min f E ( x , y ) ∼P ( X , Y ) [ l ( y , f ( x ) ) ] , ( 4 ) ( ii ) For the anchor points samples ( xap , ỹap ) with underlying clean probability P ( Y = yap|X = xap ) , the empirical risk satisfies lp−rew ( ỹap , f ( xap ) ) = l ( yap , f ( xap ) ) . For the empirical distribution , the empirical risk satisfies arg min f E ( x , ỹ ) ∼P̂D̃ ( X , Ỹ ) [ lp−rew ( ỹn , f ( xn ) ) ] = arg min f E ( x , y ) ∼P̂ ( X , Y |D̃ ) [ l ( yn , f ( xn ) ) ] . ( 5 ) We also show that the PTM can be adopted in the forward manner . The definition of posterior reweight loss is given as follows , Definition 2 ( Posterior forward loss ) Assume the model prediction is f ( x ) for noisy sample ( x , ỹ ) and W ( x ) is the NTM associated with the noisy sample . The posterior forward loss is defined as lp−fw ( ỹ , f ( x ) ) = l ( ỹ , c∑ i=1 Wi , ỹ ( x ) fi ( x ) ) , ( 6 ) We next analyze the property of the posterior forward loss and provide the theoretical justification . Lemma 3.2 The posterior forward loss is not larger than posterior reweighted loss lp−rew ( ỹ , f ( x ) ) ≥ lp−fw ( ỹ , f ( x ) ) . Theorem 3.3 ( Statistically Consistent Classifier ) Suppose the loss function l ( y , f ) is convex with respect to f ( the convex condition is commonly satisfies , e.g. , cross entropy loss ) , and the minimum expected risk RP ( X , Y ) ( f ) can achieve 0 , then the posterior forward loss can achieve unbiased classifier for underlying distribution , arg min f E ( x , ỹ ) ∼P ( X , Ỹ ) [ lp−fw ( ỹ , f ( x ) ) ] = arg min f E ( x , y ) ∼P ( X , Y ) [ l ( y , f ( x ) ) ] . ( 7 ) Compare the posterior forward loss with forward loss , it is seen that both of them correct the output of the neural network with statistically consistent risk guarantee , while the difference falls in the different transition matrix in the loss correction . In addition , the statistically consistent risk for forward loss and posterior forward loss both require the accurate transition matrix estimation . However , the label/PTM estimation is pretty challenging since the label noise is instance-dependent in real world . Such observation motivates us to combine the NTM T ( x ) and PTM W ( x ) to correct the loss . Motivated by Kalman filtering ( Kalman , 1960 ) , a famous estimation method combining the prior knowledge and measurement information , we propose an information approach to tackle instance-dependent label noise via loss correction . Specifically , we firstly claim that there are prior knowledge information and measurement information on the label noise , where prior knowledge information and measurement information represent the estimated NTM and PTM . | This paper proposes a new information fusion approach to deal with the instance-dependent label noise (IDN). Specifically, the authors claim that the essential problem caused by IDN is empirical, instead of underlying, data distribution mismatch during training, which I think is new and interesting. Therefore, the authors fuse posterior transition matrix (PTM) and noise transition matrix (NTM) and design an unbiased risk estimator. | SP:9ce68d0a88c8938280342fe7ef56e6b7e488b3fb |
An Information Fusion Approach to Learning with Instance-Dependent Label Noise | 1 INTRODUCTION . Data labeling annotated from human efforts , such as crowdsourcing ( Yan et al. , 2014 ; Chen et al. , 2017 ) and online queries ( Divvala et al. , 2014 ) , may be heavily noisy in practice . To make it worse , the label noise stemmed from the human annotations is often instance-dependent . For example , the images closing to the decision boundary are usually prone to be mislabeled ( Zhang et al. , 2021 ; Zhu et al. , 2021b ) . On the other hand , the remarkable success of deep neural networks ( DNNs ) on supervised learning tasks heavily relies on the expressive power and a large number of data with accurate labels . Unfortunately , deep neural networks memorizes noisy labels leading to poor generalization ( Zhang et al. , 2017 ) . It is challenging to learn with practical instance-dependent label noise ( IDN ) due to the hidden and complicated label noise properties ( Zhu et al. , 2021a ; Liu , 2021 ) . The methods of dealing with noisy labels falls in two lines , including heuristically identifying noisy samples or statistical label noise modeling . The training of deep neural network often learns the clean labels first ( Arpit et al. , 2017 ) and memorizes the noisy labels gradually , which is recognized as the memorization effect . Based on the general memorization effects , the heuristical methods are all designed via following the anomaly detection strategy : identifying the noisy sample based on different behaviors ( e.g. , loss values ) between clean and noisy samples during training . The typical methods contain sample selection ( Yu et al. , 2019 ; Han et al. , 2018b ) , reweight samples ( Cheng et al. , 2021 ; Jiang et al. , 2018 ; Ren et al. , 2018 ) , label correction ( Ma et al. , 2018 ; Tanaka et al. , 2018 ) , and regularization ( Han et al. , 2018a ) . Although these algorithms empirically work well , without modeling the label noise explicitly , the reliability can not be guaranteed . Another line of works relies on noise transition matrix ( NTM ) to model the label noise statistically ( Xia et al. , 2019 ; 2020 ; Patrini et al. , 2017 ) . Namely , the NTM quantifies the probabilities that clean labels flip into noisy labels . Although the NTM-based methods possess theoretical guarantee , under IDN , the NTM estimation for each instance is pretty challenging . To ease the estimation , some unrealistic assumptions have to be posed the on NTM , including instance-independent transition matrix ( Liu & Guo , 2020 ; Wei & Liu , 2021 ; Li et al. , 2021 ) , symmetric transition matrix ( Menon et al. , 2018 ) , upper bounded noise rate ( Cheng et al. , 2020 ) , and part-dependent label noise ( Xia et al. , 2020 ) . However , under the complex IDN , the empirical noise distribution is highly different with underlying noise distribution . For example , in Figure 1 , the underlying and empirical noisy distribution for long-tail instance is different since the empirical noisy label is either the same or different with clean label . Additionally , observed noisy label provide inductive bias toward label corruption . In other word , the genuine problem causing from IDN is the empirical , instead of underlying , clean and noisy distribution mismatch problem . To mitigate empirical distribution mismatch problem , we propose the posterior transition matrix ( PTM ) , posteriorly modeling label noise given the observed noisy labels . We adopt PTM to provably bridge the gap between clean and noisy underlying data distribution , and anchor points ( i.e. , data points that belong to a specific class almost surely ) empirical distribution simultaneously . We also provide an easy-to-compute PTM estimation under specific condition of low label noise . To extend the applicability to a wide range of label noise , motivated by Kalman filtering ( Kalman , 1960 ) , we proposed the information fusion ( IF ) method linearly combining the estimated noise and PTM , which achieves lower transition matrix estimation error . We empirically show that proposed method IF can achieve higher accuracy and more stable training . The main contributions of this work are summarized below . • We propose a new concept , named PTM , achieving consistent classifier for underlying distribution and anchor point empirical distribution mismatch simultaneously . • We propose the simple PTM estimation method based on observed noisy label under low label noise . To extend the applicability , we propose IF method , linearly combining the estimated NTM and PTM , to achieve lower estimation error with theoretical and experimental justification . • We experimentally demonstrate the superiority of proposed IF method achieving higher accuracy and more stable training under synthetic and real-world label noise . 2 PRELIMINARIES . Throughout this paper , we adopt uppercase letters to denote random variables , and lowercase letters to denote particular realization of the random variables . We target the c-class classification problem with instance-dependent ( label ) noise ( IDN ) . Let P ( X , Y ) be the underlying clean distribution of the random variables ( X , Y ) , where X and Y represent the instance and clean label . However , in real-world scenario , the clean label is corrupted and thus only noisy label , denoted as Ỹ , is observed . Given a set of N training instances denoted by D̃ : = { ( xn , ỹn ) } Nn=1 , where xn is the instance vector of the n-th sample , ỹn ∈ [ c ] : = { 1 , · · · , c } is the corresponding observed but noisy label , our goal is to predict the clean label yn for any given instance xn . Data distribution We assume that the unobserved clean samples ( xn , yn ) and available noisy samples ( xn , ỹn ) are drawn from unknown underlying clean distribution P ( X , Y ) and underlying noisy distribution P ( X , Ỹ ) , respectively . For the noisy samples data D̃ , we may approximate underlying noisy distribution by the empirical noisy distribution , i.e. , P̂D̃ ( X , Ỹ ) = 1 N ∑N n=1 δ ( X = xn , Ỹ = ỹn ) , where δ ( X = xn , Ỹ = ỹn ) is a Dirac mass centered at ( xn , ỹn ) . Since the clean data sample is unobserved , we define posterior empirical clean distribution P̂ ( X , Y |D̃ ) as the inference posterior empirical clean distribution from noisy samples data D̃ . Based on Bayes ’ s rule , the posterior empirical clean distribution is given by P̂ ( X , Y |D̃ ) = 1N ∑N n=1 ∑c yn=1 δ ( X = xn , Y = ỹn ) P ( Y = yn|Ỹ = ỹn , X = xn ) . Noise transition matrix T ( x ) To describe the corruption process of the label , the NTM T ( x ) ∈ Rc×c is defined as Ti , j ( x ) = P ( Ỹ = j|Y = i , X = x ) , which represents the transition probability of the instance x labeling from clean i-th class to noisy j-th class . The underlying noisy label Ỹ probability given the instance x satisfies : P ( Ỹ = j|X = x ) = c∑ i=1 P ( Ỹ = j|Y = i , X = x ) P ( Y = i|X = x ) = c∑ i=1 Tij ( x ) P ( Y = i|X = x ) . The NTM T ( x ) hence bridges the gap between the underlying clean labels probability P ( Y|X = x ) = [ P ( Y = 1|X = x ) , · · · , P ( Y = c|X = x ) ] > and underlying noisy labels probability P ( Ỹ|X = x ) = [ P ( Ỹ = 1|X = x ) , · · · , P ( Ỹ = c|X = x ) ] > given instance x , i.e. , P ( Ỹ|X = x ) = T ( x ) > P ( Y|X = x ) . Loss Correction method Let function f ( · ) represents a neural network and f ( x ) denotes the c-dimensional output probability for instance x , where the ith index of the output yf , i ( x ) represents the predicted probability for class i . The common approach is to minimize the cross-entropy ( CE ) loss l ( f ( x ) , y ) : = − log ( yf , y ( x ) ) to force the output yf , y ( x ) approximate 1 . However , the label noise may mislead deep learning model . The existing NTM based methods first estimate NTM T ( x ) and then adopt it to correct the loss function . For example , in the forward correction procedure ( Patrini et al. , 2017 ) , the estimated NTM is adopted to corrupt the output predicted probability f ( x ) , i.e. , the corrupted predicted probability is f̃ ( x ) = T ( x ) > f ( x ) , and then compares it with the noisy label ỹ . Suppose T ( x ) is non-singular and the loss function is proper and composite , the forward loss correction can achieve consistent classifier , i.e. , the optimal classifier for the corrected loss with respect to the underlying noisy distribution is the same as that for the CE loss with respect to the underlying clean distribution : arg min f E ( X , Ỹ ) ∼P ( X , Ỹ ) [ l ( Ỹ , T ( X ) > f ( X ) ) ] = arg min f E ( X , Y ) ∼P ( X , Y ) [ l ( Y , f ( X ) ) ] . ( 1 ) 3 LEARNING WITH INFORMATION FUSION . Even though the existing loss correction methods could achieve consistent classifier theoretically , their performances are still undesirable in practice . Since the deep learning model is often trained on the empirical distribution with limited samples , the NTM can not correctly bridge the empirical clean distribution and empirical noisy distribution , i.e. , P̂ ( Ỹ = j|X = x ) 6= ∑c i=1 Tij ( x ) P̂D̃ ( Y = i|X = x ) . In other words , the NTM-based method may not work well in practice since due to the empirical clean and noisy distribution mismatch problem in IDN . Aiming to utilize the observed noisy label , we propose a concept , named posterior transition matrix ( PTM ) , to describe the transition probability given the observed noisy labels ( formally defined in Section 3.1 ) . The motivation for PTM stems from a simple thought experiment as shown in Figure 1 , which shows that PTM can model the empirical label noise better than NTM . Figure 2 illustrates the overview framework of IF , including NTM and PTM estimations ( Section 3.2 ) , information fusion via linear combination ( Section 3.3 ) , and posterior loss function ( Section 3.1 ) . 3.1 THE LOSS CORRECTION METHOD . The main goal is to train a c-class neural network classifier f ( x , ω ) to predict the clean label probability P ( Y |X ) . Since only the noisy labels are observed , there is a gap between the clean and noisy label , describing via NTM ( Goldberger & Ben-Reuven , 2017 ) . Motivated by the observed noisy labels ( posterior information ) , we define the PTM W ( x ) to describe the posterior clean label probability given noisy label , where Wi , j ( x ) = P ( Y = i|Ỹ = j , X = x ) . We provide the relationship between the PTM W ( x ) and NTM T ( x ) via Bayes ’ rulei.e. , Wi , j ( x ) = P ( Y = i , Ỹ = j|X = x ) P ( Ỹ = j|X = x ) = P ( Y = i|X = x ) Tij ( x ) ∑c i=1 P ( Y = i|X = x ) Tij ( x ) . ( 2 ) Notice that only the summation of any column is 1 for PTM W ( x ) , while the summation of any rows are 1 for NTM T ( x ) . Subsequently , we provide posterior reweight loss correction method via NTM . Definition 1 ( Posterior reweight loss ) Assume the model prediction is f ( x ) for noisy sample ( x , ỹ ) and W ( x ) is the NTM associated with the noisy sample . The posterior reweight loss is defined as lp−rew ( ỹ , f ( x ) ) = c∑ i=1 Wi , ỹ ( x ) l ( i , f ( x ) ) , ( 3 ) We next analyze the property of the posterior reweight loss and provide the theoretical justification . Specifically , we analyze the expected risk RP ( X , Ỹ ) ( f ) = E ( x , ỹ ) ∼P ( X , Ỹ ) [ lp−rew ( ỹ , f ( x ) ) ] and empirical risk R̂D̂ ( f ) = 1 N ∑N n=1 lp−rew ( ỹn , f ( xn ) ) under noisy samples dataset . Theorem 3.1 ( Statistically Consistent Classifier ) The posterior reweight loss can achieve unbiased classifier for underlying distribution and empirical distribution . ( i ) For underlying distribution , the expected risk satisfies arg min f E ( x , ỹ ) ∼P ( X , Ỹ ) [ lp−rew ( ỹ , f ( x ) ) ] = arg min f E ( x , y ) ∼P ( X , Y ) [ l ( y , f ( x ) ) ] , ( 4 ) ( ii ) For the anchor points samples ( xap , ỹap ) with underlying clean probability P ( Y = yap|X = xap ) , the empirical risk satisfies lp−rew ( ỹap , f ( xap ) ) = l ( yap , f ( xap ) ) . For the empirical distribution , the empirical risk satisfies arg min f E ( x , ỹ ) ∼P̂D̃ ( X , Ỹ ) [ lp−rew ( ỹn , f ( xn ) ) ] = arg min f E ( x , y ) ∼P̂ ( X , Y |D̃ ) [ l ( yn , f ( xn ) ) ] . ( 5 ) We also show that the PTM can be adopted in the forward manner . The definition of posterior reweight loss is given as follows , Definition 2 ( Posterior forward loss ) Assume the model prediction is f ( x ) for noisy sample ( x , ỹ ) and W ( x ) is the NTM associated with the noisy sample . The posterior forward loss is defined as lp−fw ( ỹ , f ( x ) ) = l ( ỹ , c∑ i=1 Wi , ỹ ( x ) fi ( x ) ) , ( 6 ) We next analyze the property of the posterior forward loss and provide the theoretical justification . Lemma 3.2 The posterior forward loss is not larger than posterior reweighted loss lp−rew ( ỹ , f ( x ) ) ≥ lp−fw ( ỹ , f ( x ) ) . Theorem 3.3 ( Statistically Consistent Classifier ) Suppose the loss function l ( y , f ) is convex with respect to f ( the convex condition is commonly satisfies , e.g. , cross entropy loss ) , and the minimum expected risk RP ( X , Y ) ( f ) can achieve 0 , then the posterior forward loss can achieve unbiased classifier for underlying distribution , arg min f E ( x , ỹ ) ∼P ( X , Ỹ ) [ lp−fw ( ỹ , f ( x ) ) ] = arg min f E ( x , y ) ∼P ( X , Y ) [ l ( y , f ( x ) ) ] . ( 7 ) Compare the posterior forward loss with forward loss , it is seen that both of them correct the output of the neural network with statistically consistent risk guarantee , while the difference falls in the different transition matrix in the loss correction . In addition , the statistically consistent risk for forward loss and posterior forward loss both require the accurate transition matrix estimation . However , the label/PTM estimation is pretty challenging since the label noise is instance-dependent in real world . Such observation motivates us to combine the NTM T ( x ) and PTM W ( x ) to correct the loss . Motivated by Kalman filtering ( Kalman , 1960 ) , a famous estimation method combining the prior knowledge and measurement information , we propose an information approach to tackle instance-dependent label noise via loss correction . Specifically , we firstly claim that there are prior knowledge information and measurement information on the label noise , where prior knowledge information and measurement information represent the estimated NTM and PTM . | This paper proposes to estimate an input-dependent noise transition matrix (PTM). The authors make a strong assumption that the neural network output approximates the underlying clean probability and estimate the PTM by extracting the output of each training sample using the network. To enforce the network to have better probabilities, PTM estimation is applied iteratively and warm-up is used during the training. The experiments are conducted in CIFAR-10 with different noise ratio, as well as a real world dataset, i.e. Clothing-1M. | SP:9ce68d0a88c8938280342fe7ef56e6b7e488b3fb |
On Improving Adversarial Transferability of Vision Transformers | 1 INTRODUCTION . Transformers compose a family of neural network architectures based on the self-attention mechanism , originally applied in natural language processing tasks achieving state-of-the-art performance ( Vaswani et al. , 2017 ; Devlin et al. , 2018 ; Brown et al. , 2020 ) . The transformer design has been subsequently adopted for vision tasks ( Dosovitskiy et al. , 2020 ) , giving rise to a number of successful vision transformer ( ViT ) models ( Touvron et al. , 2020 ; Yuan et al. , 2021 ; Khan et al. , 2021 ) . Due to the lack of explicit inductive biases in their design , ViTs are inherently different from convolutional neural networks ( CNNs ) that encode biases e.g. , spatial connectivity and translation equivariance . ViTs process an image as a sequence of patches which are refined through a series of self-attention mechanisms ( transformer blocks ) , allowing the network to learn relationships between any individual parts of the input image . Such processing allows wide receptive fields which can model global context as opposed to the limited receptive fields of CNNs . These significant differences between ViTs and CNNs give rise to a range of intriguing characteristics unique to ViTs ( Caron et al. , 2021 ; Tuli et al. , 2021 ; Mao et al. , 2021 ; Paul & Chen , 2021 ; Naseer et al. , 2021b ) . Adversarial attacks pose a major hindrance to the successful deployment of deep neural networks in real-world applications . Recent success of ViTs means that adversarial properties of ViT models also become an important research topic . A few recent works explore adversarial robustness of ViTs ( Shao et al. , 2021 ; Mahmood et al. , 2021 ; Bhojanapalli et al. , 2021 ) in different attack settings . Surprisingly , these works show that large ViT models exhibit lower transferability in black-box attack setting , despite their higher parameter capacity , stronger performance on clean images , and better generalization ( Shao et al. , 2021 ; Mahmood et al. , 2021 ) . This finding seems to indicate that as ViT performance improves , its adversarial feature space gets weaker . In this work , we investigate whether the weak transferability of adversarial patterns from high-performing ViT models , as reported in recent works ( Shao et al. , 2021 ; Mahmood et al. , 2021 ; Bhojanapalli et al. , 2021 ) , is a result of weak features or a weak attack . To this end , we introduce a highly transferable attack approach that augments the current adversarial attacks and increase their transferability from ViTs to the unknown models . Our proposed transferable attack leverages two key concepts , multiple discriminative pathways and token refinement , which exploit unique characteristics of ViT models . Our approach is motivated by the modular nature of ViTs ( Touvron et al. , 2020 ; Yuan et al. , 2021 ; Mao et al. , 2021 ) : they process a sequence of input image patches repeatedly using multiple multi-headed self-attention layers ( transformer blocks ) ( Vaswani et al. , 2017 ) . We refer to the representation of patches at each transformer block as patch tokens . An additional randomly initialized vector ( class token1 ) is also appended to the set of patch tokens along the network depth to distill discriminative information across patches . The collective set of tokens is passed through the multiple transformer blocks followed by passing of the class token through a linear classifier ( head ) which is used to make the final prediction . The class token interacts with the patch tokens within each block and is trained gradually across the blocks until it is finally utilized by the linear classifier head to obtain class-specific logit values . The class token can be viewed as extracting information useful for the final prediction from the set of patch tokens at each block . Given the role of the class token in ViT models , we observe that class tokens can be extracted from the output of each block and each such token can be used to obtain a class-specific logit output using the final classifier of a pretrained model . This leads us to the proposed self-ensemble of models within a single transformer ( Fig . 1 ) . We show that attacking such a self-ensemble ( Sec . 3 ) containing multiple discriminative pathways significantly improves adversarial transferability from ViT models , and in particular from the large ViTs . Going one step further , we study if the class information extracted from different intermediate ViT blocks ( of the self-ensemble ) can be enhanced to improve adversarial transferability . To this end , we introduce a novel token refinement module directed at enhancing these multiple discriminative pathways . The token refinement module strives to refine the information contained in the output of each transformer block ( within a single ViT model ) and aligns the class tokens produced by the intermediate blocks with the final classifier in order to maximize the discriminative power of intermediate blocks . Our token refinement exploits the structural information stored in the patch tokens and fuses it with the class token to maximize the discriminative performance of each block . Both the refined tokens and self-ensemble ideas are combined to design an adversarial attack that is shown to significantly boost the transferability of adversarial examples , thereby bringing out the true generalization of ViTs ’ adversarial space . Through our extensive experimentation , we empirically demonstrate favorable transfer rates across different model families ( convolutional and transformer ) as well as different vision tasks ( classification , detection and segmentation ) . 1Average of patch tokens can serve as a class token in our approach for ViT designs that do not use an explicit class token such as Swin transformer ( Liu et al. , 2021 ) or MLP-Mixer ( Tolstikhin et al. , 2021 ) 2 BACKGROUND AND RELATED WORK . Adversarial Attack Modeling : Adversarial attack methods can be broadly categorized into two categories , white-box attacks and black-box attacks . While the white-box attack setting provides the attacker full access to the parameters of the target model , the black-box setting prevents the attacker from accessing the target model and is therefore a harder setting to study adversarial transferability . White-box Attack : Fast Gradient Sign Method ( FGSM ) ( Goodfellow et al. , 2014 ) and Projected Gradient Descent ( PGD ) ( Madry et al. , 2018 ) are two initially proposed white-box attack methods . FGSM corrupts the clean image sample by taking a single step within a small distance ( perturbation budget ) along the objective function ’ s gradient direction . PGD corrupts the clean sample for multiple steps with a smaller step size , projecting the generated adversarial example onto the -sphere around the clean sample after each step . Other state-of-the-art white-box attack methods include Jacobian-based saliency map attack ( Papernot et al. , 2016 ) , Sparse attack ( Modas et al. , 2019 ) , Onepixel attack ( Su et al. , 2019 ) , Carlini and Wagner optimization ( Carlini & Wagner , 2017 ) , Elastic-net ( Chen et al. , 2018 ) , Diversified sampling ( Tashiro et al. , 2020 ) , and more recently Auto-attack ( Croce & Hein , 2020b ) . We apply white-box attacks on surrogate models to find perturbations that are then transferred to black-box target models . Black-box Attack and Transferability : Black-box attacks generally involve attacking a source model to craft adversarial signals which are then applied on the target models . While gradient estimation methods that estimate the gradients of the target model using black-box optimization methods such as Finite Differences ( FD ) ( Chen et al. , 2017 ; Bhagoji et al. , 2018 ) or Natural Evolution Strategies ( NES ) ( Ilyas et al. , 2018 ; Jiang et al. , 2019 ) exist , these methods are dependent on multiple queries to the target model which is not practical in most real-world scenarios . In the case of adversarial signal generation using source models , it is possible to directly adopt white-box methods . In our work , we adopt FGSM and PGD in such a manner . Methods like ( Dong et al. , 2018 ) incorporate a momentum term into the gradient to boost the transferability of existing white-box attacks , building attacks named MIM . In similar spirit , different directions are explored in literature to boost transferability of adversarial examples ; a ) Enhanced Momentum : Lin et al . ( Lin et al. , 2019 ) and Wang et al . ( Wang & He , 2021 ) improve momentum by using Nesterov momentum and variance tuning respectively during attack iterations , b ) Augmentations : Xie et al . ( Xie et al. , 2019 ) showed that applying differentiable stochastic transformations can bring diversity to the gradients and improve transferability of the existing attacks , c ) Exploiting Features : Multiple suggestions are proposed in the literature to leverage the feature space for adversarial attack as well . For example , Zhou et al . ( Zhou et al. , 2018 ) incorporate the feature distortion loss during optimization . Similarly , ( Inkawhich et al. , 2020b ; a ; Huang et al. , 2019 ) also exploit intermediate layers to enhance transferability . However , combining the intermediate feature response with final classification loss is non-trivial as it might require optimization to find the best performing layers ( Inkawhich et al. , 2020b ; a ) , and d ) Generative Approach : Orthogonal to iterative attacks , generative methods ( Poursaeed et al. , 2018 ; Naseer et al. , 2019 ; 2021a ) train an autoencoder against the white-box model . In particular , Naseer et al . show that transferability of an adversarial generator can be increased with relativistic cross-entropy ( Naseer et al. , 2019 ) and augmentations ( Naseer et al. , 2021a ) . Ours is the first work to address limited transferability of ViT models . The Role of Network Architecture : Recent works exploit architectural characteristics of networks to improve the transferability of attacks . While Wu et al . ( 2020 ) exploit skip connections of models like ResNets and DenseNets to improve black-box attacks , Guo et al . ( 2020 ) build on similar ideas focused on the linearity of models . Our work similarly focuses on unique architectural characteristics of ViT models to generate more transferable adversarial perturbations with the existing white-box attacks . Robustness of ViTs : Adversarial attacks on ViT models are relatively unexplored . Shao et al . ( 2021 ) and Bhojanapalli et al . ( 2021 ) investigate adversarial attacks and robustness of ViT models studying various white-box and black-box attack techniques . The transferability of perturbations from ViT models is thoroughly explored in ( Mahmood et al. , 2021 ) and they conclude that ViT models do not transfer well to CNNs , whereas we propose a methodology to solve this shortcoming . Moreover , Mahmood et al . ( 2021 ) explores the idea of an ensemble of CNN and ViT models to improve the transferability of attacks . Our proposed ensemble approach explores a different direction by converting a single ViT model into a collection of models ( self-ensemble ) to improve attack Figure 2 : Adversarial examples for ViTs have only moderate transferability . In fact transferabililty ( % ) of MIM ( Dong et al. , 2018 ) perturbations to target models goes down as the source model size increases such as from DeiT-T ( Touvron et al. , 2020 ) ( 5M parameters ) to DeiT-B ( Touvron et al. , 2020 ) ( 86M parameters ) . However , the performance of the attack improves significantly when applied on our proposed ensemble of classifiers found within a ViT ( MIME & MIMRE ) . transferability . In essence , our proposed method can be integrated with existing attack approaches to take full advantage of the ViTs ’ learned features and generate transferable adversaries . | The paper looks at Vision Transforms (ViTs) models and transferability of adversarial examples, which is previously known to be challenging between ViTs to CNNs and vice versa. The paper leverages the discriminative information stored in the lower layers' tokens and proposes two methods that modify and fine-tune the ViTs in order to extract the adversarial samples. The paper conducts extensive experiments to show the effectiveness in adversarial transferability across different models, including CNN's and ViT's variants, and tasks. | SP:760dd963a4ca8548b1d721b0c9f79282a044101d |
On Improving Adversarial Transferability of Vision Transformers | 1 INTRODUCTION . Transformers compose a family of neural network architectures based on the self-attention mechanism , originally applied in natural language processing tasks achieving state-of-the-art performance ( Vaswani et al. , 2017 ; Devlin et al. , 2018 ; Brown et al. , 2020 ) . The transformer design has been subsequently adopted for vision tasks ( Dosovitskiy et al. , 2020 ) , giving rise to a number of successful vision transformer ( ViT ) models ( Touvron et al. , 2020 ; Yuan et al. , 2021 ; Khan et al. , 2021 ) . Due to the lack of explicit inductive biases in their design , ViTs are inherently different from convolutional neural networks ( CNNs ) that encode biases e.g. , spatial connectivity and translation equivariance . ViTs process an image as a sequence of patches which are refined through a series of self-attention mechanisms ( transformer blocks ) , allowing the network to learn relationships between any individual parts of the input image . Such processing allows wide receptive fields which can model global context as opposed to the limited receptive fields of CNNs . These significant differences between ViTs and CNNs give rise to a range of intriguing characteristics unique to ViTs ( Caron et al. , 2021 ; Tuli et al. , 2021 ; Mao et al. , 2021 ; Paul & Chen , 2021 ; Naseer et al. , 2021b ) . Adversarial attacks pose a major hindrance to the successful deployment of deep neural networks in real-world applications . Recent success of ViTs means that adversarial properties of ViT models also become an important research topic . A few recent works explore adversarial robustness of ViTs ( Shao et al. , 2021 ; Mahmood et al. , 2021 ; Bhojanapalli et al. , 2021 ) in different attack settings . Surprisingly , these works show that large ViT models exhibit lower transferability in black-box attack setting , despite their higher parameter capacity , stronger performance on clean images , and better generalization ( Shao et al. , 2021 ; Mahmood et al. , 2021 ) . This finding seems to indicate that as ViT performance improves , its adversarial feature space gets weaker . In this work , we investigate whether the weak transferability of adversarial patterns from high-performing ViT models , as reported in recent works ( Shao et al. , 2021 ; Mahmood et al. , 2021 ; Bhojanapalli et al. , 2021 ) , is a result of weak features or a weak attack . To this end , we introduce a highly transferable attack approach that augments the current adversarial attacks and increase their transferability from ViTs to the unknown models . Our proposed transferable attack leverages two key concepts , multiple discriminative pathways and token refinement , which exploit unique characteristics of ViT models . Our approach is motivated by the modular nature of ViTs ( Touvron et al. , 2020 ; Yuan et al. , 2021 ; Mao et al. , 2021 ) : they process a sequence of input image patches repeatedly using multiple multi-headed self-attention layers ( transformer blocks ) ( Vaswani et al. , 2017 ) . We refer to the representation of patches at each transformer block as patch tokens . An additional randomly initialized vector ( class token1 ) is also appended to the set of patch tokens along the network depth to distill discriminative information across patches . The collective set of tokens is passed through the multiple transformer blocks followed by passing of the class token through a linear classifier ( head ) which is used to make the final prediction . The class token interacts with the patch tokens within each block and is trained gradually across the blocks until it is finally utilized by the linear classifier head to obtain class-specific logit values . The class token can be viewed as extracting information useful for the final prediction from the set of patch tokens at each block . Given the role of the class token in ViT models , we observe that class tokens can be extracted from the output of each block and each such token can be used to obtain a class-specific logit output using the final classifier of a pretrained model . This leads us to the proposed self-ensemble of models within a single transformer ( Fig . 1 ) . We show that attacking such a self-ensemble ( Sec . 3 ) containing multiple discriminative pathways significantly improves adversarial transferability from ViT models , and in particular from the large ViTs . Going one step further , we study if the class information extracted from different intermediate ViT blocks ( of the self-ensemble ) can be enhanced to improve adversarial transferability . To this end , we introduce a novel token refinement module directed at enhancing these multiple discriminative pathways . The token refinement module strives to refine the information contained in the output of each transformer block ( within a single ViT model ) and aligns the class tokens produced by the intermediate blocks with the final classifier in order to maximize the discriminative power of intermediate blocks . Our token refinement exploits the structural information stored in the patch tokens and fuses it with the class token to maximize the discriminative performance of each block . Both the refined tokens and self-ensemble ideas are combined to design an adversarial attack that is shown to significantly boost the transferability of adversarial examples , thereby bringing out the true generalization of ViTs ’ adversarial space . Through our extensive experimentation , we empirically demonstrate favorable transfer rates across different model families ( convolutional and transformer ) as well as different vision tasks ( classification , detection and segmentation ) . 1Average of patch tokens can serve as a class token in our approach for ViT designs that do not use an explicit class token such as Swin transformer ( Liu et al. , 2021 ) or MLP-Mixer ( Tolstikhin et al. , 2021 ) 2 BACKGROUND AND RELATED WORK . Adversarial Attack Modeling : Adversarial attack methods can be broadly categorized into two categories , white-box attacks and black-box attacks . While the white-box attack setting provides the attacker full access to the parameters of the target model , the black-box setting prevents the attacker from accessing the target model and is therefore a harder setting to study adversarial transferability . White-box Attack : Fast Gradient Sign Method ( FGSM ) ( Goodfellow et al. , 2014 ) and Projected Gradient Descent ( PGD ) ( Madry et al. , 2018 ) are two initially proposed white-box attack methods . FGSM corrupts the clean image sample by taking a single step within a small distance ( perturbation budget ) along the objective function ’ s gradient direction . PGD corrupts the clean sample for multiple steps with a smaller step size , projecting the generated adversarial example onto the -sphere around the clean sample after each step . Other state-of-the-art white-box attack methods include Jacobian-based saliency map attack ( Papernot et al. , 2016 ) , Sparse attack ( Modas et al. , 2019 ) , Onepixel attack ( Su et al. , 2019 ) , Carlini and Wagner optimization ( Carlini & Wagner , 2017 ) , Elastic-net ( Chen et al. , 2018 ) , Diversified sampling ( Tashiro et al. , 2020 ) , and more recently Auto-attack ( Croce & Hein , 2020b ) . We apply white-box attacks on surrogate models to find perturbations that are then transferred to black-box target models . Black-box Attack and Transferability : Black-box attacks generally involve attacking a source model to craft adversarial signals which are then applied on the target models . While gradient estimation methods that estimate the gradients of the target model using black-box optimization methods such as Finite Differences ( FD ) ( Chen et al. , 2017 ; Bhagoji et al. , 2018 ) or Natural Evolution Strategies ( NES ) ( Ilyas et al. , 2018 ; Jiang et al. , 2019 ) exist , these methods are dependent on multiple queries to the target model which is not practical in most real-world scenarios . In the case of adversarial signal generation using source models , it is possible to directly adopt white-box methods . In our work , we adopt FGSM and PGD in such a manner . Methods like ( Dong et al. , 2018 ) incorporate a momentum term into the gradient to boost the transferability of existing white-box attacks , building attacks named MIM . In similar spirit , different directions are explored in literature to boost transferability of adversarial examples ; a ) Enhanced Momentum : Lin et al . ( Lin et al. , 2019 ) and Wang et al . ( Wang & He , 2021 ) improve momentum by using Nesterov momentum and variance tuning respectively during attack iterations , b ) Augmentations : Xie et al . ( Xie et al. , 2019 ) showed that applying differentiable stochastic transformations can bring diversity to the gradients and improve transferability of the existing attacks , c ) Exploiting Features : Multiple suggestions are proposed in the literature to leverage the feature space for adversarial attack as well . For example , Zhou et al . ( Zhou et al. , 2018 ) incorporate the feature distortion loss during optimization . Similarly , ( Inkawhich et al. , 2020b ; a ; Huang et al. , 2019 ) also exploit intermediate layers to enhance transferability . However , combining the intermediate feature response with final classification loss is non-trivial as it might require optimization to find the best performing layers ( Inkawhich et al. , 2020b ; a ) , and d ) Generative Approach : Orthogonal to iterative attacks , generative methods ( Poursaeed et al. , 2018 ; Naseer et al. , 2019 ; 2021a ) train an autoencoder against the white-box model . In particular , Naseer et al . show that transferability of an adversarial generator can be increased with relativistic cross-entropy ( Naseer et al. , 2019 ) and augmentations ( Naseer et al. , 2021a ) . Ours is the first work to address limited transferability of ViT models . The Role of Network Architecture : Recent works exploit architectural characteristics of networks to improve the transferability of attacks . While Wu et al . ( 2020 ) exploit skip connections of models like ResNets and DenseNets to improve black-box attacks , Guo et al . ( 2020 ) build on similar ideas focused on the linearity of models . Our work similarly focuses on unique architectural characteristics of ViT models to generate more transferable adversarial perturbations with the existing white-box attacks . Robustness of ViTs : Adversarial attacks on ViT models are relatively unexplored . Shao et al . ( 2021 ) and Bhojanapalli et al . ( 2021 ) investigate adversarial attacks and robustness of ViT models studying various white-box and black-box attack techniques . The transferability of perturbations from ViT models is thoroughly explored in ( Mahmood et al. , 2021 ) and they conclude that ViT models do not transfer well to CNNs , whereas we propose a methodology to solve this shortcoming . Moreover , Mahmood et al . ( 2021 ) explores the idea of an ensemble of CNN and ViT models to improve the transferability of attacks . Our proposed ensemble approach explores a different direction by converting a single ViT model into a collection of models ( self-ensemble ) to improve attack Figure 2 : Adversarial examples for ViTs have only moderate transferability . In fact transferabililty ( % ) of MIM ( Dong et al. , 2018 ) perturbations to target models goes down as the source model size increases such as from DeiT-T ( Touvron et al. , 2020 ) ( 5M parameters ) to DeiT-B ( Touvron et al. , 2020 ) ( 86M parameters ) . However , the performance of the attack improves significantly when applied on our proposed ensemble of classifiers found within a ViT ( MIME & MIMRE ) . transferability . In essence , our proposed method can be integrated with existing attack approaches to take full advantage of the ViTs ’ learned features and generate transferable adversaries . | In this paper, authors improve adversarial transferability of ViT by Self-Ensemble and Token Refinement method. 'Self-Ensemble' implies it treats each transformer block of ViT as the 'last block' and apply a shared classifier to it. So that the trivial discriminative path can be attacked. 'Token Refinement' tries to improve the classification ablity of shallow blocks by using extra non-shared module on each block's output tokens. This paper successfully improved the adversarial ability of ViT attacks. Sufficient experimental results and detailed description ensure its reproducibility. | SP:760dd963a4ca8548b1d721b0c9f79282a044101d |
On Improving Adversarial Transferability of Vision Transformers | 1 INTRODUCTION . Transformers compose a family of neural network architectures based on the self-attention mechanism , originally applied in natural language processing tasks achieving state-of-the-art performance ( Vaswani et al. , 2017 ; Devlin et al. , 2018 ; Brown et al. , 2020 ) . The transformer design has been subsequently adopted for vision tasks ( Dosovitskiy et al. , 2020 ) , giving rise to a number of successful vision transformer ( ViT ) models ( Touvron et al. , 2020 ; Yuan et al. , 2021 ; Khan et al. , 2021 ) . Due to the lack of explicit inductive biases in their design , ViTs are inherently different from convolutional neural networks ( CNNs ) that encode biases e.g. , spatial connectivity and translation equivariance . ViTs process an image as a sequence of patches which are refined through a series of self-attention mechanisms ( transformer blocks ) , allowing the network to learn relationships between any individual parts of the input image . Such processing allows wide receptive fields which can model global context as opposed to the limited receptive fields of CNNs . These significant differences between ViTs and CNNs give rise to a range of intriguing characteristics unique to ViTs ( Caron et al. , 2021 ; Tuli et al. , 2021 ; Mao et al. , 2021 ; Paul & Chen , 2021 ; Naseer et al. , 2021b ) . Adversarial attacks pose a major hindrance to the successful deployment of deep neural networks in real-world applications . Recent success of ViTs means that adversarial properties of ViT models also become an important research topic . A few recent works explore adversarial robustness of ViTs ( Shao et al. , 2021 ; Mahmood et al. , 2021 ; Bhojanapalli et al. , 2021 ) in different attack settings . Surprisingly , these works show that large ViT models exhibit lower transferability in black-box attack setting , despite their higher parameter capacity , stronger performance on clean images , and better generalization ( Shao et al. , 2021 ; Mahmood et al. , 2021 ) . This finding seems to indicate that as ViT performance improves , its adversarial feature space gets weaker . In this work , we investigate whether the weak transferability of adversarial patterns from high-performing ViT models , as reported in recent works ( Shao et al. , 2021 ; Mahmood et al. , 2021 ; Bhojanapalli et al. , 2021 ) , is a result of weak features or a weak attack . To this end , we introduce a highly transferable attack approach that augments the current adversarial attacks and increase their transferability from ViTs to the unknown models . Our proposed transferable attack leverages two key concepts , multiple discriminative pathways and token refinement , which exploit unique characteristics of ViT models . Our approach is motivated by the modular nature of ViTs ( Touvron et al. , 2020 ; Yuan et al. , 2021 ; Mao et al. , 2021 ) : they process a sequence of input image patches repeatedly using multiple multi-headed self-attention layers ( transformer blocks ) ( Vaswani et al. , 2017 ) . We refer to the representation of patches at each transformer block as patch tokens . An additional randomly initialized vector ( class token1 ) is also appended to the set of patch tokens along the network depth to distill discriminative information across patches . The collective set of tokens is passed through the multiple transformer blocks followed by passing of the class token through a linear classifier ( head ) which is used to make the final prediction . The class token interacts with the patch tokens within each block and is trained gradually across the blocks until it is finally utilized by the linear classifier head to obtain class-specific logit values . The class token can be viewed as extracting information useful for the final prediction from the set of patch tokens at each block . Given the role of the class token in ViT models , we observe that class tokens can be extracted from the output of each block and each such token can be used to obtain a class-specific logit output using the final classifier of a pretrained model . This leads us to the proposed self-ensemble of models within a single transformer ( Fig . 1 ) . We show that attacking such a self-ensemble ( Sec . 3 ) containing multiple discriminative pathways significantly improves adversarial transferability from ViT models , and in particular from the large ViTs . Going one step further , we study if the class information extracted from different intermediate ViT blocks ( of the self-ensemble ) can be enhanced to improve adversarial transferability . To this end , we introduce a novel token refinement module directed at enhancing these multiple discriminative pathways . The token refinement module strives to refine the information contained in the output of each transformer block ( within a single ViT model ) and aligns the class tokens produced by the intermediate blocks with the final classifier in order to maximize the discriminative power of intermediate blocks . Our token refinement exploits the structural information stored in the patch tokens and fuses it with the class token to maximize the discriminative performance of each block . Both the refined tokens and self-ensemble ideas are combined to design an adversarial attack that is shown to significantly boost the transferability of adversarial examples , thereby bringing out the true generalization of ViTs ’ adversarial space . Through our extensive experimentation , we empirically demonstrate favorable transfer rates across different model families ( convolutional and transformer ) as well as different vision tasks ( classification , detection and segmentation ) . 1Average of patch tokens can serve as a class token in our approach for ViT designs that do not use an explicit class token such as Swin transformer ( Liu et al. , 2021 ) or MLP-Mixer ( Tolstikhin et al. , 2021 ) 2 BACKGROUND AND RELATED WORK . Adversarial Attack Modeling : Adversarial attack methods can be broadly categorized into two categories , white-box attacks and black-box attacks . While the white-box attack setting provides the attacker full access to the parameters of the target model , the black-box setting prevents the attacker from accessing the target model and is therefore a harder setting to study adversarial transferability . White-box Attack : Fast Gradient Sign Method ( FGSM ) ( Goodfellow et al. , 2014 ) and Projected Gradient Descent ( PGD ) ( Madry et al. , 2018 ) are two initially proposed white-box attack methods . FGSM corrupts the clean image sample by taking a single step within a small distance ( perturbation budget ) along the objective function ’ s gradient direction . PGD corrupts the clean sample for multiple steps with a smaller step size , projecting the generated adversarial example onto the -sphere around the clean sample after each step . Other state-of-the-art white-box attack methods include Jacobian-based saliency map attack ( Papernot et al. , 2016 ) , Sparse attack ( Modas et al. , 2019 ) , Onepixel attack ( Su et al. , 2019 ) , Carlini and Wagner optimization ( Carlini & Wagner , 2017 ) , Elastic-net ( Chen et al. , 2018 ) , Diversified sampling ( Tashiro et al. , 2020 ) , and more recently Auto-attack ( Croce & Hein , 2020b ) . We apply white-box attacks on surrogate models to find perturbations that are then transferred to black-box target models . Black-box Attack and Transferability : Black-box attacks generally involve attacking a source model to craft adversarial signals which are then applied on the target models . While gradient estimation methods that estimate the gradients of the target model using black-box optimization methods such as Finite Differences ( FD ) ( Chen et al. , 2017 ; Bhagoji et al. , 2018 ) or Natural Evolution Strategies ( NES ) ( Ilyas et al. , 2018 ; Jiang et al. , 2019 ) exist , these methods are dependent on multiple queries to the target model which is not practical in most real-world scenarios . In the case of adversarial signal generation using source models , it is possible to directly adopt white-box methods . In our work , we adopt FGSM and PGD in such a manner . Methods like ( Dong et al. , 2018 ) incorporate a momentum term into the gradient to boost the transferability of existing white-box attacks , building attacks named MIM . In similar spirit , different directions are explored in literature to boost transferability of adversarial examples ; a ) Enhanced Momentum : Lin et al . ( Lin et al. , 2019 ) and Wang et al . ( Wang & He , 2021 ) improve momentum by using Nesterov momentum and variance tuning respectively during attack iterations , b ) Augmentations : Xie et al . ( Xie et al. , 2019 ) showed that applying differentiable stochastic transformations can bring diversity to the gradients and improve transferability of the existing attacks , c ) Exploiting Features : Multiple suggestions are proposed in the literature to leverage the feature space for adversarial attack as well . For example , Zhou et al . ( Zhou et al. , 2018 ) incorporate the feature distortion loss during optimization . Similarly , ( Inkawhich et al. , 2020b ; a ; Huang et al. , 2019 ) also exploit intermediate layers to enhance transferability . However , combining the intermediate feature response with final classification loss is non-trivial as it might require optimization to find the best performing layers ( Inkawhich et al. , 2020b ; a ) , and d ) Generative Approach : Orthogonal to iterative attacks , generative methods ( Poursaeed et al. , 2018 ; Naseer et al. , 2019 ; 2021a ) train an autoencoder against the white-box model . In particular , Naseer et al . show that transferability of an adversarial generator can be increased with relativistic cross-entropy ( Naseer et al. , 2019 ) and augmentations ( Naseer et al. , 2021a ) . Ours is the first work to address limited transferability of ViT models . The Role of Network Architecture : Recent works exploit architectural characteristics of networks to improve the transferability of attacks . While Wu et al . ( 2020 ) exploit skip connections of models like ResNets and DenseNets to improve black-box attacks , Guo et al . ( 2020 ) build on similar ideas focused on the linearity of models . Our work similarly focuses on unique architectural characteristics of ViT models to generate more transferable adversarial perturbations with the existing white-box attacks . Robustness of ViTs : Adversarial attacks on ViT models are relatively unexplored . Shao et al . ( 2021 ) and Bhojanapalli et al . ( 2021 ) investigate adversarial attacks and robustness of ViT models studying various white-box and black-box attack techniques . The transferability of perturbations from ViT models is thoroughly explored in ( Mahmood et al. , 2021 ) and they conclude that ViT models do not transfer well to CNNs , whereas we propose a methodology to solve this shortcoming . Moreover , Mahmood et al . ( 2021 ) explores the idea of an ensemble of CNN and ViT models to improve the transferability of attacks . Our proposed ensemble approach explores a different direction by converting a single ViT model into a collection of models ( self-ensemble ) to improve attack Figure 2 : Adversarial examples for ViTs have only moderate transferability . In fact transferabililty ( % ) of MIM ( Dong et al. , 2018 ) perturbations to target models goes down as the source model size increases such as from DeiT-T ( Touvron et al. , 2020 ) ( 5M parameters ) to DeiT-B ( Touvron et al. , 2020 ) ( 86M parameters ) . However , the performance of the attack improves significantly when applied on our proposed ensemble of classifiers found within a ViT ( MIME & MIMRE ) . transferability . In essence , our proposed method can be integrated with existing attack approaches to take full advantage of the ViTs ’ learned features and generate transferable adversaries . | This paper enhances transferability of vision transformers (ViT) by introducing two strategies specific to the architecture of ViT models, i.e. Self-Ensemble and Token refinement. Specifically, Self-Ensemble finds multiple discriminative pathways by dissecting a single ViT model into an ensemble of networks, leading to an explicit utilization of class-specific information at each ViT block. In addition, the proposed Token Refinement can potentially enhance the discriminative capacity at each block of ViT. The high-level motivation of this paper is that the adversarial patterns found via conventional adversarial attacks show very low black-box transferability for ViT models. The authors claim that this phenomenon is due to the sub-optimal attack procedures that do not leverage the true representation potential of the ViTs. Thus, this paper introduces a highly transferable attack approach that augments the current adversarial attacks and increases their transferability from ViTs to the unknown models. The paper conduct experiments on a range of standard attack methods to establish the performance boost obtained through the proposed transferablility approach by using the Source (white-box) models, Target (black-box) models. The experiments conducted on ImageNet/COCO dataset, and PASCAL demonstrate that the proposed method can outperform the baselines on some of the experimental settings. The paper also provides a detailed analysis of the model and experimental results. | SP:760dd963a4ca8548b1d721b0c9f79282a044101d |
Filling the G_ap_s: Multivariate Time Series Imputation by Graph Neural Networks | 1 INTRODUCTION . Imputation of missing values is a prominent problem in multivariate time-series analysis ( TSA ) from both theoretical and practical perspectives ( Little & Rubin , 2019 ) . In fact , in a world of complex interconnected systems such as those characterizing sensor networks or the Internet of Things , faulty sensors and network failures are widespread phenomena that cause disruptions in the data acquisition process . Luckily , failures of these types are often sparse and localized at the single sensor level , i.e. , they do not compromise the entire sensor network at once . In other terms , it is often the case that , at a certain time step , missing data appear only at some of the channels of the resulting multivariate time series . In this context , spatio-temporal imputation methods ( Yi et al. , 2016 ; Yoon et al. , 2018b ) aim at reconstructing the missing parts of the signals by possibly exploiting both temporal and spatial dependencies . In particular , effective spatio-temporal approaches would reconstruct missing values by taking into account past and future values , and the concurrent measurements of spatially close neighboring sensors too . Here , spatial similarity does not necessarily mean physical ( e.g. , geographic ) proximity , but rather indicates that considered sensors are related w.r.t . a generic ( quantifiable ) functional dependency ( e.g. , Pearson correlation or Granger causality – Granger , 1969 ) and/or that are close in a certain latent space . Relational information , then , can be interpreted as a set of constraints – linking the different time series – that allows replacing the malfunctioning sensors with virtual ones . Among different imputation methods , approaches based on deep learning ( LeCun et al. , 2015 ; Schmidhuber , 2015 ; Goodfellow et al. , 2016 ) have become increasingly popular ( Yoon et al. , 2018a ; Cao et al. , 2018 ; Liu et al. , 2019 ) . However , these methods often completely disregard available relational information or rely on rather simplistic modifications of standard neural architectures tailored ∗Equal contribution . Correspondence to andrea.cini @ usi.ch . for sequence processing ( Hochreiter & Schmidhuber , 1997 ; Chung et al. , 2014 ; Bai et al. , 2018 ; Vaswani et al. , 2017 ) . We argue that stronger , structural , inductive biases are needed to advance the state of the art in time series imputation and allow to build effective inference engines in the context of large and complex sensor networks as those found in real-world applications . In this work , we model input multivariate time series as sequences of graphs where edges represent relationships among different channels . We propose graph neural networks ( GNNs ) ( Scarselli et al. , 2008 ; Bronstein et al. , 2017 ; Battaglia et al. , 2018 ) as the building block of a novel , bidirectional , recurrent neural network for multivariate time series imputation ( MTSI ) . Our method , named Graph Recurrent Imputation Network ( GRIN ) , has at its core a recurrent neural network cell where gates are implemented by message-passing neural networks ( MPNNs ; Gilmer et al. , 2017 ) . Two of these networks process the input multivariate time series in both forward and backward time directions at each node , while hidden states are processed by a message-passing imputation layer which is constrained to learn how to perform imputation by looking at neighboring nodes . In fact , by considering each edge as a soft functional dependency that constraints the value observed at corresponding nodes , we argue that operating in the context of graphs introduces a positive inductive bias for MTSI . Our contributions are manifold : 1 ) we introduce a methodological framework to exploit graph neural networks in the context of MTSI , 2 ) we propose a novel , practical and effective implementation of a GNN-based architecture for MTSI , and 3 ) we achieve state-of-the-art results on several and varied MTSI benchmarks . Our method does not rely on any assumption on the distribution of the missing values ( e.g. , presence and duration of transient dynamics and/or length of missing sequences ) other than stationarity of the underlying process . The rest of the paper is organized as follows . In Section 2 we discuss the related works . Then , in Section 3 , we formally introduce the problem settings and the task of MTSI . We present our approach to MTSI in Section 4 , by describing the novel framework to implement imputation architectures based on GNNs . We proceed with an empirical evaluation of the presented method against state-of-the-art baselines in Section 5 and , finally , we draw our conclusions in Section 6 . 2 RELATED WORKS . Time series imputation There exists a large literature addressing missing value imputation in time series . Besides the simple and standard interpolation methods based on polynomial curve fitting , popular approaches aim at filling up missing values by taking advantage of standard forecasting methods and similarities among time series . For example , several approaches rely on k-nearest neighbors ( Troyanskaya et al. , 2001 ; Beretta & Santaniello , 2016 ) , the expectation-maximization algorithm ( Ghahramani & Jordan , 1994 ; Nelwamondo et al. , 2007 ) or linear predictors and statespace models ( Durbin & Koopman , 2012 ; Kihoro et al. , 2013 ) . Low-rank approximation methods , such as matrix factorization ( Cichocki & Phan , 2009 ) , are also popular alternatives which can also account for spatial ( Cai et al. , 2010 ; Rao et al. , 2015 ) and temporal ( Yu et al. , 2016 ; Mei et al. , 2017 ) information . Among linear methods , STMVL ( Yi et al. , 2016 ) combines temporal and spatial interpolation to fill missing values in geographically tagged time series . More recently , several deep learning approaches have been proposed for MTSI . Among the others , deep autoregressive methods based on recurrent neural networks ( RNNs ) found widespread success ( Lipton et al. , 2016 ; Che et al. , 2018 ; Luo et al. , 2018 ; Yoon et al. , 2018b ; Cao et al. , 2018 ) . GRU-D ( Che et al. , 2018 ) learns how to process sequences with missing data by controlling the decay of the hidden states of a gated RNN . Cao et al . ( 2018 ) propose BRITS , a bidirectional GRU-D-like RNN for multivariate time series imputation that takes into account correlation among different channels to perform spatial imputation . Other successful strategies in the literature have been proposed that exploit the adversarial training framework to generate realistic reconstructed sequences ( Yoon et al. , 2018a ; Fedus et al. , 2018 ; Luo et al. , 2018 ; 2019 ) . Notably , GAIN ( Yoon et al. , 2018a ) uses GANs ( Goodfellow et al. , 2014 ) to learn models that perform imputation in the i.i.d . settings . Luo et al . ( 2018 ; 2019 ) aim , instead , at learning models that generate realistic synthetic sequences and exploit them to fill missing values . Miao et al . ( 2021 ) use an approach similar to GAIN , but condition the generator on the predicted label for the target incomplete time series . Concurrently to our work , Kuppannagari et al . ( 2021 ) developed a graph-based spatio-temporal denoising autoencoder for spatio-temporal data coming from smart grids with known topology . Liu et al . ( 2019 ) , instead , uses adversarial learning to train a multiscale model that imputes highly sparse time series in a hierarchical fashion . However , we argue that none of the above-cited methods can take full advantage of relational information and nonlinear spatio-temporal dependencies . Most importantly , the above methods do not fully exploit the flexibility and expressiveness enabled by operating in the context of graph processing . Graph neural networks for TSA Graph neural networks have been exploited in TSA mostly in spatio-temporal forecasting methods . The idea behind most of the methods present in the literature is to modify standard neural network architectures for sequential data by relying on operators that work in the graph domain . For example , Seo et al . ( 2018 ) propose a GRU cell where gates are implemented by spectral GNNs ( Defferrard et al. , 2016 ) ; Li et al . ( 2018 ) propose an analogous architecture replacing spectral GNNs with a diffusion-convolutional network ( Atwood & Towsley , 2016 ) . Note that these models are different w.r.t . approaches that use recurrent networks to propagate information graph-wise ( Scarselli et al. , 2008 ; Li et al. , 2016 ) . Yu et al . ( 2017 ) and Wu et al . ( 2019 ; 2020b ) propose , instead , spatio-temporal convolutional neural networks that alternate convolutions on temporal and spatial dimensions . Similar approaches have also been studied in the context of attention-based models ( Vaswani et al. , 2017 ) with spatio-temporal Transformer-like architectures ( Zhang et al. , 2018 ; Cai et al. , 2020 ) . Another particularly interesting line of research is related to the problem of learning the graph structure underlying an input multivariate time series ( Kipf et al. , 2018 ; Wu et al. , 2020b ; Shang et al. , 2020 ) . While previously mentioned approaches focus on multivariate time series prediction , other methods aim at predicting changes in graph topology ( Zambon et al. , 2019 ; Paassen et al. , 2020 ) . Conversely , methods such as Temporal Graph Networks ( Rossi et al. , 2020 ) are tailored to learn node embeddings in dynamical graphs . Finally , recent works have proposed GNNs for imputing missing features in the context of i.i.d . data . Among the others , Spinelli et al . ( 2020 ) propose an adversarial framework to train GNNs on the data reconstruction task , while You et al . ( 2020 ) propose a bipartite graph representation for feature imputation . Lately , GNNs have also been exploited for spatial interpolation ( Appleby et al. , 2020 ; Wu et al. , 2020a ) – sometimes referred to as kriging ( Stein , 1999 ) . To the best of our knowledge , no previous GNN-based method targeted missing value imputation for generic multivariate time series . 3 PRELIMINARIES . Sequences of graphs We consider sequences of weighted directed graphs , where we observe a graph Gt withNt nodes at each time step t. A graph is a couple Gt = 〈Xt , Wt〉 , where Xt ∈ RNt×d is the node-attribute matrix whose i-th row contains the d-dimensional node-attribute vector xit ∈ Rd associated with the i-th node ; entry wi , jt of the adjacency matrix Wt ∈ RNt×Nt denotes the scalar weight of the edge ( if any ) connecting the i-th and j-th node . Fig . 1 exemplifies this modelling framework . We assume nodes to be identified , i.e. , to have a unique ID that enables time-wise consistent processing . This problem setting can be easily extended to more general classes of graphs with attributed edges and global attributes . In this work , we mainly focus on problems where the topology of the graph is fixed and does not change over time , i.e. , at each time step Wt = W and Nt = N . Any generic multivariate time series fits the above framework by letting each channel of the sequence ( i.e. , each sensor ) correspond to a node and using the available relation information to build an adjacency matrix . If no relational information is available , one could use the identity matrix , but this would defeat the purpose of the formulation . A more proper choice of Wt can be made using any standard similarity score ( e.g. , Pearson correlation ) or a ( thresholded ) kernel . A more advanced approach instead could aim at learning an adjacency directly from data by using , for instance , spatial attention scores or resorting to graph learning techniques , e.g. , Kipf et al . ( 2018 ) . From now on , we assume that input multivariate time series have homogeneous channels , i.e. , sensors are of the same type . Note that this assumption does not imply a loss in generality : it is always possible to standardize node features by adding sensor type attributes and additional dimensions to accommodate the different types of sensor readings . Alternatively , one might directly model the problem by exploiting heterogeneous graphs ( Schlichtkrull et al. , 2018 ) . Multivariate time series imputation To model the presence of missing values , we consider , at each step , a binary mask Mt ∈ { 0 , 1 } Nt×d where each row mit indicates which of the corresponding node attributes of xit are available in Xt . It follows that , m i , j t = 0 implies x i , j t to be missing ; conversely , if mi , jt = 1 , then x i , j t stores the actual sensor reading . We denote by X̃t the unknown ground truth node-attribute matrix , i.e. , the complete node-attribute matrix without any missing data . We assume stationarity of missing data distribution and , in experiments , we mostly focus on the missing at random ( MAR ) scenario ( Rubin , 1976 ) . We neither make assumptions on the number of concurrent sensor failures , nor on the length of missing data blocks , i.e. , multiple failures extended over time are accounted for . Clearly , one should expect imputation performance to scale with the number of concurrent faults and the time length of missing data bursts . The objective of MTSI is to impute missing values in a sequence of input data . More formally , given a graph sequence G [ t , t+T ] of length T , we can define the missing data reconstruction error as L ( X̂ [ t , t+T ] , X̃ [ t , t+T ] , M [ t , t+T ] ) = ∑t+T h=t ∑Nt i=1 〈mih , ` ( x̂ih , x̃ i h ) 〉 〈mih , mih〉 , ( 1 ) where x̂ih is the reconstructed x̃ i h ; M [ t , t+T ] and m i h are respectively the logical binary complement of M [ t , t+T ] and mih , ` ( · , · ) is an element-wise error function ( e.g. , absolute or squared error ) and 〈 · , · 〉 indicates the standard dot product . Note that , in practice , it is impossible to have access to X̃ [ t , t+T ] and , as a consequence , it is necessary to define a surrogate optimization objective by , for example , using a forecasting loss or generating synthetic missing values . In the context of trainable , parametric , imputation methods , we consider two different operational settings . In the first one , named in-sample imputation , the model is trained to reconstruct missing values in a given fixed input sequence X [ t , t+T ] , i.e. , the model is trained on all the available data except those that are missing and those that have been removed from the sequence to emulate additional failures for evaluation . Differently , in the second one ( referred to as out-of-sample imputation ) , the model is trained and evaluated on disjoint sequences . Note that in both cases the model does not have access to the ground-truth data used for the final evaluation . The first operational setting simulates the case where a practitioner fits the model directly on the sequence to fill up its gaps . The second , instead , simulates the case where one wishes to use a model fitted on a set of historical data to impute missing values in an unseen target sequence . | This paper proposes to leverage GNN that takes available relational information for multivariate time series imputation. Each feature dimension of the time series is regarded as a node in GNN and the message-passing is used to implement the update function of bidirectional RNN. On three benchmarks, this new method achieves better performance than the previous STOA method BRITS. | SP:9fbe98a5f978154cf25c168e02e66e4d11e616a2 |
Filling the G_ap_s: Multivariate Time Series Imputation by Graph Neural Networks | 1 INTRODUCTION . Imputation of missing values is a prominent problem in multivariate time-series analysis ( TSA ) from both theoretical and practical perspectives ( Little & Rubin , 2019 ) . In fact , in a world of complex interconnected systems such as those characterizing sensor networks or the Internet of Things , faulty sensors and network failures are widespread phenomena that cause disruptions in the data acquisition process . Luckily , failures of these types are often sparse and localized at the single sensor level , i.e. , they do not compromise the entire sensor network at once . In other terms , it is often the case that , at a certain time step , missing data appear only at some of the channels of the resulting multivariate time series . In this context , spatio-temporal imputation methods ( Yi et al. , 2016 ; Yoon et al. , 2018b ) aim at reconstructing the missing parts of the signals by possibly exploiting both temporal and spatial dependencies . In particular , effective spatio-temporal approaches would reconstruct missing values by taking into account past and future values , and the concurrent measurements of spatially close neighboring sensors too . Here , spatial similarity does not necessarily mean physical ( e.g. , geographic ) proximity , but rather indicates that considered sensors are related w.r.t . a generic ( quantifiable ) functional dependency ( e.g. , Pearson correlation or Granger causality – Granger , 1969 ) and/or that are close in a certain latent space . Relational information , then , can be interpreted as a set of constraints – linking the different time series – that allows replacing the malfunctioning sensors with virtual ones . Among different imputation methods , approaches based on deep learning ( LeCun et al. , 2015 ; Schmidhuber , 2015 ; Goodfellow et al. , 2016 ) have become increasingly popular ( Yoon et al. , 2018a ; Cao et al. , 2018 ; Liu et al. , 2019 ) . However , these methods often completely disregard available relational information or rely on rather simplistic modifications of standard neural architectures tailored ∗Equal contribution . Correspondence to andrea.cini @ usi.ch . for sequence processing ( Hochreiter & Schmidhuber , 1997 ; Chung et al. , 2014 ; Bai et al. , 2018 ; Vaswani et al. , 2017 ) . We argue that stronger , structural , inductive biases are needed to advance the state of the art in time series imputation and allow to build effective inference engines in the context of large and complex sensor networks as those found in real-world applications . In this work , we model input multivariate time series as sequences of graphs where edges represent relationships among different channels . We propose graph neural networks ( GNNs ) ( Scarselli et al. , 2008 ; Bronstein et al. , 2017 ; Battaglia et al. , 2018 ) as the building block of a novel , bidirectional , recurrent neural network for multivariate time series imputation ( MTSI ) . Our method , named Graph Recurrent Imputation Network ( GRIN ) , has at its core a recurrent neural network cell where gates are implemented by message-passing neural networks ( MPNNs ; Gilmer et al. , 2017 ) . Two of these networks process the input multivariate time series in both forward and backward time directions at each node , while hidden states are processed by a message-passing imputation layer which is constrained to learn how to perform imputation by looking at neighboring nodes . In fact , by considering each edge as a soft functional dependency that constraints the value observed at corresponding nodes , we argue that operating in the context of graphs introduces a positive inductive bias for MTSI . Our contributions are manifold : 1 ) we introduce a methodological framework to exploit graph neural networks in the context of MTSI , 2 ) we propose a novel , practical and effective implementation of a GNN-based architecture for MTSI , and 3 ) we achieve state-of-the-art results on several and varied MTSI benchmarks . Our method does not rely on any assumption on the distribution of the missing values ( e.g. , presence and duration of transient dynamics and/or length of missing sequences ) other than stationarity of the underlying process . The rest of the paper is organized as follows . In Section 2 we discuss the related works . Then , in Section 3 , we formally introduce the problem settings and the task of MTSI . We present our approach to MTSI in Section 4 , by describing the novel framework to implement imputation architectures based on GNNs . We proceed with an empirical evaluation of the presented method against state-of-the-art baselines in Section 5 and , finally , we draw our conclusions in Section 6 . 2 RELATED WORKS . Time series imputation There exists a large literature addressing missing value imputation in time series . Besides the simple and standard interpolation methods based on polynomial curve fitting , popular approaches aim at filling up missing values by taking advantage of standard forecasting methods and similarities among time series . For example , several approaches rely on k-nearest neighbors ( Troyanskaya et al. , 2001 ; Beretta & Santaniello , 2016 ) , the expectation-maximization algorithm ( Ghahramani & Jordan , 1994 ; Nelwamondo et al. , 2007 ) or linear predictors and statespace models ( Durbin & Koopman , 2012 ; Kihoro et al. , 2013 ) . Low-rank approximation methods , such as matrix factorization ( Cichocki & Phan , 2009 ) , are also popular alternatives which can also account for spatial ( Cai et al. , 2010 ; Rao et al. , 2015 ) and temporal ( Yu et al. , 2016 ; Mei et al. , 2017 ) information . Among linear methods , STMVL ( Yi et al. , 2016 ) combines temporal and spatial interpolation to fill missing values in geographically tagged time series . More recently , several deep learning approaches have been proposed for MTSI . Among the others , deep autoregressive methods based on recurrent neural networks ( RNNs ) found widespread success ( Lipton et al. , 2016 ; Che et al. , 2018 ; Luo et al. , 2018 ; Yoon et al. , 2018b ; Cao et al. , 2018 ) . GRU-D ( Che et al. , 2018 ) learns how to process sequences with missing data by controlling the decay of the hidden states of a gated RNN . Cao et al . ( 2018 ) propose BRITS , a bidirectional GRU-D-like RNN for multivariate time series imputation that takes into account correlation among different channels to perform spatial imputation . Other successful strategies in the literature have been proposed that exploit the adversarial training framework to generate realistic reconstructed sequences ( Yoon et al. , 2018a ; Fedus et al. , 2018 ; Luo et al. , 2018 ; 2019 ) . Notably , GAIN ( Yoon et al. , 2018a ) uses GANs ( Goodfellow et al. , 2014 ) to learn models that perform imputation in the i.i.d . settings . Luo et al . ( 2018 ; 2019 ) aim , instead , at learning models that generate realistic synthetic sequences and exploit them to fill missing values . Miao et al . ( 2021 ) use an approach similar to GAIN , but condition the generator on the predicted label for the target incomplete time series . Concurrently to our work , Kuppannagari et al . ( 2021 ) developed a graph-based spatio-temporal denoising autoencoder for spatio-temporal data coming from smart grids with known topology . Liu et al . ( 2019 ) , instead , uses adversarial learning to train a multiscale model that imputes highly sparse time series in a hierarchical fashion . However , we argue that none of the above-cited methods can take full advantage of relational information and nonlinear spatio-temporal dependencies . Most importantly , the above methods do not fully exploit the flexibility and expressiveness enabled by operating in the context of graph processing . Graph neural networks for TSA Graph neural networks have been exploited in TSA mostly in spatio-temporal forecasting methods . The idea behind most of the methods present in the literature is to modify standard neural network architectures for sequential data by relying on operators that work in the graph domain . For example , Seo et al . ( 2018 ) propose a GRU cell where gates are implemented by spectral GNNs ( Defferrard et al. , 2016 ) ; Li et al . ( 2018 ) propose an analogous architecture replacing spectral GNNs with a diffusion-convolutional network ( Atwood & Towsley , 2016 ) . Note that these models are different w.r.t . approaches that use recurrent networks to propagate information graph-wise ( Scarselli et al. , 2008 ; Li et al. , 2016 ) . Yu et al . ( 2017 ) and Wu et al . ( 2019 ; 2020b ) propose , instead , spatio-temporal convolutional neural networks that alternate convolutions on temporal and spatial dimensions . Similar approaches have also been studied in the context of attention-based models ( Vaswani et al. , 2017 ) with spatio-temporal Transformer-like architectures ( Zhang et al. , 2018 ; Cai et al. , 2020 ) . Another particularly interesting line of research is related to the problem of learning the graph structure underlying an input multivariate time series ( Kipf et al. , 2018 ; Wu et al. , 2020b ; Shang et al. , 2020 ) . While previously mentioned approaches focus on multivariate time series prediction , other methods aim at predicting changes in graph topology ( Zambon et al. , 2019 ; Paassen et al. , 2020 ) . Conversely , methods such as Temporal Graph Networks ( Rossi et al. , 2020 ) are tailored to learn node embeddings in dynamical graphs . Finally , recent works have proposed GNNs for imputing missing features in the context of i.i.d . data . Among the others , Spinelli et al . ( 2020 ) propose an adversarial framework to train GNNs on the data reconstruction task , while You et al . ( 2020 ) propose a bipartite graph representation for feature imputation . Lately , GNNs have also been exploited for spatial interpolation ( Appleby et al. , 2020 ; Wu et al. , 2020a ) – sometimes referred to as kriging ( Stein , 1999 ) . To the best of our knowledge , no previous GNN-based method targeted missing value imputation for generic multivariate time series . 3 PRELIMINARIES . Sequences of graphs We consider sequences of weighted directed graphs , where we observe a graph Gt withNt nodes at each time step t. A graph is a couple Gt = 〈Xt , Wt〉 , where Xt ∈ RNt×d is the node-attribute matrix whose i-th row contains the d-dimensional node-attribute vector xit ∈ Rd associated with the i-th node ; entry wi , jt of the adjacency matrix Wt ∈ RNt×Nt denotes the scalar weight of the edge ( if any ) connecting the i-th and j-th node . Fig . 1 exemplifies this modelling framework . We assume nodes to be identified , i.e. , to have a unique ID that enables time-wise consistent processing . This problem setting can be easily extended to more general classes of graphs with attributed edges and global attributes . In this work , we mainly focus on problems where the topology of the graph is fixed and does not change over time , i.e. , at each time step Wt = W and Nt = N . Any generic multivariate time series fits the above framework by letting each channel of the sequence ( i.e. , each sensor ) correspond to a node and using the available relation information to build an adjacency matrix . If no relational information is available , one could use the identity matrix , but this would defeat the purpose of the formulation . A more proper choice of Wt can be made using any standard similarity score ( e.g. , Pearson correlation ) or a ( thresholded ) kernel . A more advanced approach instead could aim at learning an adjacency directly from data by using , for instance , spatial attention scores or resorting to graph learning techniques , e.g. , Kipf et al . ( 2018 ) . From now on , we assume that input multivariate time series have homogeneous channels , i.e. , sensors are of the same type . Note that this assumption does not imply a loss in generality : it is always possible to standardize node features by adding sensor type attributes and additional dimensions to accommodate the different types of sensor readings . Alternatively , one might directly model the problem by exploiting heterogeneous graphs ( Schlichtkrull et al. , 2018 ) . Multivariate time series imputation To model the presence of missing values , we consider , at each step , a binary mask Mt ∈ { 0 , 1 } Nt×d where each row mit indicates which of the corresponding node attributes of xit are available in Xt . It follows that , m i , j t = 0 implies x i , j t to be missing ; conversely , if mi , jt = 1 , then x i , j t stores the actual sensor reading . We denote by X̃t the unknown ground truth node-attribute matrix , i.e. , the complete node-attribute matrix without any missing data . We assume stationarity of missing data distribution and , in experiments , we mostly focus on the missing at random ( MAR ) scenario ( Rubin , 1976 ) . We neither make assumptions on the number of concurrent sensor failures , nor on the length of missing data blocks , i.e. , multiple failures extended over time are accounted for . Clearly , one should expect imputation performance to scale with the number of concurrent faults and the time length of missing data bursts . The objective of MTSI is to impute missing values in a sequence of input data . More formally , given a graph sequence G [ t , t+T ] of length T , we can define the missing data reconstruction error as L ( X̂ [ t , t+T ] , X̃ [ t , t+T ] , M [ t , t+T ] ) = ∑t+T h=t ∑Nt i=1 〈mih , ` ( x̂ih , x̃ i h ) 〉 〈mih , mih〉 , ( 1 ) where x̂ih is the reconstructed x̃ i h ; M [ t , t+T ] and m i h are respectively the logical binary complement of M [ t , t+T ] and mih , ` ( · , · ) is an element-wise error function ( e.g. , absolute or squared error ) and 〈 · , · 〉 indicates the standard dot product . Note that , in practice , it is impossible to have access to X̃ [ t , t+T ] and , as a consequence , it is necessary to define a surrogate optimization objective by , for example , using a forecasting loss or generating synthetic missing values . In the context of trainable , parametric , imputation methods , we consider two different operational settings . In the first one , named in-sample imputation , the model is trained to reconstruct missing values in a given fixed input sequence X [ t , t+T ] , i.e. , the model is trained on all the available data except those that are missing and those that have been removed from the sequence to emulate additional failures for evaluation . Differently , in the second one ( referred to as out-of-sample imputation ) , the model is trained and evaluated on disjoint sequences . Note that in both cases the model does not have access to the ground-truth data used for the final evaluation . The first operational setting simulates the case where a practitioner fits the model directly on the sequence to fill up its gaps . The second , instead , simulates the case where one wishes to use a model fitted on a set of historical data to impute missing values in an unseen target sequence . | A novel recurrant graph neural network, for spatio-temporal encoding, coupled with a message passing neural network, for spatial decoding, is proposed for imputing missing values in a multivariate time series; The architecture uses temporal and spatial properties of the data. It seems that the approach of gated recurrent neural networks (and related architectures using gated recurrent units, GRUs) is extended to include the graph topology through neighbourhood message passing. Experiments show impressive results on three benchmark datasets, and comparison with simple and state-of-the-art baselines. A short ablation study excludes the spatial decoder and omits the bi-directional architecture to empricially show that they have a significant impact on the imputation performance. Another short experiment tests the ability of this architecture to replace entire missing sensors, using an air pollution dataset with multiple sensors, results are convincing. | SP:9fbe98a5f978154cf25c168e02e66e4d11e616a2 |
Filling the G_ap_s: Multivariate Time Series Imputation by Graph Neural Networks | 1 INTRODUCTION . Imputation of missing values is a prominent problem in multivariate time-series analysis ( TSA ) from both theoretical and practical perspectives ( Little & Rubin , 2019 ) . In fact , in a world of complex interconnected systems such as those characterizing sensor networks or the Internet of Things , faulty sensors and network failures are widespread phenomena that cause disruptions in the data acquisition process . Luckily , failures of these types are often sparse and localized at the single sensor level , i.e. , they do not compromise the entire sensor network at once . In other terms , it is often the case that , at a certain time step , missing data appear only at some of the channels of the resulting multivariate time series . In this context , spatio-temporal imputation methods ( Yi et al. , 2016 ; Yoon et al. , 2018b ) aim at reconstructing the missing parts of the signals by possibly exploiting both temporal and spatial dependencies . In particular , effective spatio-temporal approaches would reconstruct missing values by taking into account past and future values , and the concurrent measurements of spatially close neighboring sensors too . Here , spatial similarity does not necessarily mean physical ( e.g. , geographic ) proximity , but rather indicates that considered sensors are related w.r.t . a generic ( quantifiable ) functional dependency ( e.g. , Pearson correlation or Granger causality – Granger , 1969 ) and/or that are close in a certain latent space . Relational information , then , can be interpreted as a set of constraints – linking the different time series – that allows replacing the malfunctioning sensors with virtual ones . Among different imputation methods , approaches based on deep learning ( LeCun et al. , 2015 ; Schmidhuber , 2015 ; Goodfellow et al. , 2016 ) have become increasingly popular ( Yoon et al. , 2018a ; Cao et al. , 2018 ; Liu et al. , 2019 ) . However , these methods often completely disregard available relational information or rely on rather simplistic modifications of standard neural architectures tailored ∗Equal contribution . Correspondence to andrea.cini @ usi.ch . for sequence processing ( Hochreiter & Schmidhuber , 1997 ; Chung et al. , 2014 ; Bai et al. , 2018 ; Vaswani et al. , 2017 ) . We argue that stronger , structural , inductive biases are needed to advance the state of the art in time series imputation and allow to build effective inference engines in the context of large and complex sensor networks as those found in real-world applications . In this work , we model input multivariate time series as sequences of graphs where edges represent relationships among different channels . We propose graph neural networks ( GNNs ) ( Scarselli et al. , 2008 ; Bronstein et al. , 2017 ; Battaglia et al. , 2018 ) as the building block of a novel , bidirectional , recurrent neural network for multivariate time series imputation ( MTSI ) . Our method , named Graph Recurrent Imputation Network ( GRIN ) , has at its core a recurrent neural network cell where gates are implemented by message-passing neural networks ( MPNNs ; Gilmer et al. , 2017 ) . Two of these networks process the input multivariate time series in both forward and backward time directions at each node , while hidden states are processed by a message-passing imputation layer which is constrained to learn how to perform imputation by looking at neighboring nodes . In fact , by considering each edge as a soft functional dependency that constraints the value observed at corresponding nodes , we argue that operating in the context of graphs introduces a positive inductive bias for MTSI . Our contributions are manifold : 1 ) we introduce a methodological framework to exploit graph neural networks in the context of MTSI , 2 ) we propose a novel , practical and effective implementation of a GNN-based architecture for MTSI , and 3 ) we achieve state-of-the-art results on several and varied MTSI benchmarks . Our method does not rely on any assumption on the distribution of the missing values ( e.g. , presence and duration of transient dynamics and/or length of missing sequences ) other than stationarity of the underlying process . The rest of the paper is organized as follows . In Section 2 we discuss the related works . Then , in Section 3 , we formally introduce the problem settings and the task of MTSI . We present our approach to MTSI in Section 4 , by describing the novel framework to implement imputation architectures based on GNNs . We proceed with an empirical evaluation of the presented method against state-of-the-art baselines in Section 5 and , finally , we draw our conclusions in Section 6 . 2 RELATED WORKS . Time series imputation There exists a large literature addressing missing value imputation in time series . Besides the simple and standard interpolation methods based on polynomial curve fitting , popular approaches aim at filling up missing values by taking advantage of standard forecasting methods and similarities among time series . For example , several approaches rely on k-nearest neighbors ( Troyanskaya et al. , 2001 ; Beretta & Santaniello , 2016 ) , the expectation-maximization algorithm ( Ghahramani & Jordan , 1994 ; Nelwamondo et al. , 2007 ) or linear predictors and statespace models ( Durbin & Koopman , 2012 ; Kihoro et al. , 2013 ) . Low-rank approximation methods , such as matrix factorization ( Cichocki & Phan , 2009 ) , are also popular alternatives which can also account for spatial ( Cai et al. , 2010 ; Rao et al. , 2015 ) and temporal ( Yu et al. , 2016 ; Mei et al. , 2017 ) information . Among linear methods , STMVL ( Yi et al. , 2016 ) combines temporal and spatial interpolation to fill missing values in geographically tagged time series . More recently , several deep learning approaches have been proposed for MTSI . Among the others , deep autoregressive methods based on recurrent neural networks ( RNNs ) found widespread success ( Lipton et al. , 2016 ; Che et al. , 2018 ; Luo et al. , 2018 ; Yoon et al. , 2018b ; Cao et al. , 2018 ) . GRU-D ( Che et al. , 2018 ) learns how to process sequences with missing data by controlling the decay of the hidden states of a gated RNN . Cao et al . ( 2018 ) propose BRITS , a bidirectional GRU-D-like RNN for multivariate time series imputation that takes into account correlation among different channels to perform spatial imputation . Other successful strategies in the literature have been proposed that exploit the adversarial training framework to generate realistic reconstructed sequences ( Yoon et al. , 2018a ; Fedus et al. , 2018 ; Luo et al. , 2018 ; 2019 ) . Notably , GAIN ( Yoon et al. , 2018a ) uses GANs ( Goodfellow et al. , 2014 ) to learn models that perform imputation in the i.i.d . settings . Luo et al . ( 2018 ; 2019 ) aim , instead , at learning models that generate realistic synthetic sequences and exploit them to fill missing values . Miao et al . ( 2021 ) use an approach similar to GAIN , but condition the generator on the predicted label for the target incomplete time series . Concurrently to our work , Kuppannagari et al . ( 2021 ) developed a graph-based spatio-temporal denoising autoencoder for spatio-temporal data coming from smart grids with known topology . Liu et al . ( 2019 ) , instead , uses adversarial learning to train a multiscale model that imputes highly sparse time series in a hierarchical fashion . However , we argue that none of the above-cited methods can take full advantage of relational information and nonlinear spatio-temporal dependencies . Most importantly , the above methods do not fully exploit the flexibility and expressiveness enabled by operating in the context of graph processing . Graph neural networks for TSA Graph neural networks have been exploited in TSA mostly in spatio-temporal forecasting methods . The idea behind most of the methods present in the literature is to modify standard neural network architectures for sequential data by relying on operators that work in the graph domain . For example , Seo et al . ( 2018 ) propose a GRU cell where gates are implemented by spectral GNNs ( Defferrard et al. , 2016 ) ; Li et al . ( 2018 ) propose an analogous architecture replacing spectral GNNs with a diffusion-convolutional network ( Atwood & Towsley , 2016 ) . Note that these models are different w.r.t . approaches that use recurrent networks to propagate information graph-wise ( Scarselli et al. , 2008 ; Li et al. , 2016 ) . Yu et al . ( 2017 ) and Wu et al . ( 2019 ; 2020b ) propose , instead , spatio-temporal convolutional neural networks that alternate convolutions on temporal and spatial dimensions . Similar approaches have also been studied in the context of attention-based models ( Vaswani et al. , 2017 ) with spatio-temporal Transformer-like architectures ( Zhang et al. , 2018 ; Cai et al. , 2020 ) . Another particularly interesting line of research is related to the problem of learning the graph structure underlying an input multivariate time series ( Kipf et al. , 2018 ; Wu et al. , 2020b ; Shang et al. , 2020 ) . While previously mentioned approaches focus on multivariate time series prediction , other methods aim at predicting changes in graph topology ( Zambon et al. , 2019 ; Paassen et al. , 2020 ) . Conversely , methods such as Temporal Graph Networks ( Rossi et al. , 2020 ) are tailored to learn node embeddings in dynamical graphs . Finally , recent works have proposed GNNs for imputing missing features in the context of i.i.d . data . Among the others , Spinelli et al . ( 2020 ) propose an adversarial framework to train GNNs on the data reconstruction task , while You et al . ( 2020 ) propose a bipartite graph representation for feature imputation . Lately , GNNs have also been exploited for spatial interpolation ( Appleby et al. , 2020 ; Wu et al. , 2020a ) – sometimes referred to as kriging ( Stein , 1999 ) . To the best of our knowledge , no previous GNN-based method targeted missing value imputation for generic multivariate time series . 3 PRELIMINARIES . Sequences of graphs We consider sequences of weighted directed graphs , where we observe a graph Gt withNt nodes at each time step t. A graph is a couple Gt = 〈Xt , Wt〉 , where Xt ∈ RNt×d is the node-attribute matrix whose i-th row contains the d-dimensional node-attribute vector xit ∈ Rd associated with the i-th node ; entry wi , jt of the adjacency matrix Wt ∈ RNt×Nt denotes the scalar weight of the edge ( if any ) connecting the i-th and j-th node . Fig . 1 exemplifies this modelling framework . We assume nodes to be identified , i.e. , to have a unique ID that enables time-wise consistent processing . This problem setting can be easily extended to more general classes of graphs with attributed edges and global attributes . In this work , we mainly focus on problems where the topology of the graph is fixed and does not change over time , i.e. , at each time step Wt = W and Nt = N . Any generic multivariate time series fits the above framework by letting each channel of the sequence ( i.e. , each sensor ) correspond to a node and using the available relation information to build an adjacency matrix . If no relational information is available , one could use the identity matrix , but this would defeat the purpose of the formulation . A more proper choice of Wt can be made using any standard similarity score ( e.g. , Pearson correlation ) or a ( thresholded ) kernel . A more advanced approach instead could aim at learning an adjacency directly from data by using , for instance , spatial attention scores or resorting to graph learning techniques , e.g. , Kipf et al . ( 2018 ) . From now on , we assume that input multivariate time series have homogeneous channels , i.e. , sensors are of the same type . Note that this assumption does not imply a loss in generality : it is always possible to standardize node features by adding sensor type attributes and additional dimensions to accommodate the different types of sensor readings . Alternatively , one might directly model the problem by exploiting heterogeneous graphs ( Schlichtkrull et al. , 2018 ) . Multivariate time series imputation To model the presence of missing values , we consider , at each step , a binary mask Mt ∈ { 0 , 1 } Nt×d where each row mit indicates which of the corresponding node attributes of xit are available in Xt . It follows that , m i , j t = 0 implies x i , j t to be missing ; conversely , if mi , jt = 1 , then x i , j t stores the actual sensor reading . We denote by X̃t the unknown ground truth node-attribute matrix , i.e. , the complete node-attribute matrix without any missing data . We assume stationarity of missing data distribution and , in experiments , we mostly focus on the missing at random ( MAR ) scenario ( Rubin , 1976 ) . We neither make assumptions on the number of concurrent sensor failures , nor on the length of missing data blocks , i.e. , multiple failures extended over time are accounted for . Clearly , one should expect imputation performance to scale with the number of concurrent faults and the time length of missing data bursts . The objective of MTSI is to impute missing values in a sequence of input data . More formally , given a graph sequence G [ t , t+T ] of length T , we can define the missing data reconstruction error as L ( X̂ [ t , t+T ] , X̃ [ t , t+T ] , M [ t , t+T ] ) = ∑t+T h=t ∑Nt i=1 〈mih , ` ( x̂ih , x̃ i h ) 〉 〈mih , mih〉 , ( 1 ) where x̂ih is the reconstructed x̃ i h ; M [ t , t+T ] and m i h are respectively the logical binary complement of M [ t , t+T ] and mih , ` ( · , · ) is an element-wise error function ( e.g. , absolute or squared error ) and 〈 · , · 〉 indicates the standard dot product . Note that , in practice , it is impossible to have access to X̃ [ t , t+T ] and , as a consequence , it is necessary to define a surrogate optimization objective by , for example , using a forecasting loss or generating synthetic missing values . In the context of trainable , parametric , imputation methods , we consider two different operational settings . In the first one , named in-sample imputation , the model is trained to reconstruct missing values in a given fixed input sequence X [ t , t+T ] , i.e. , the model is trained on all the available data except those that are missing and those that have been removed from the sequence to emulate additional failures for evaluation . Differently , in the second one ( referred to as out-of-sample imputation ) , the model is trained and evaluated on disjoint sequences . Note that in both cases the model does not have access to the ground-truth data used for the final evaluation . The first operational setting simulates the case where a practitioner fits the model directly on the sequence to fill up its gaps . The second , instead , simulates the case where one wishes to use a model fitted on a set of historical data to impute missing values in an unseen target sequence . | In this paper, the authors propose a GNN based imputation method for Time Series. They argue that past works for time series imputation only take time into account, and not the spacial relationships between time series. The model (called GRIN) works by encoding the data via a GNN, and performing 2 rounds of imputation. The GNN itself acts as gates in a GRU that accounts for the sequential information. This is repeated for a "forward" and "backward" pass, and a final MLP infers the missing value. Experiments on multiple datasets show that the proposed method outperforms baselines. | SP:9fbe98a5f978154cf25c168e02e66e4d11e616a2 |
AlphaZero-based Proof Cost Network to Aid Game Solving | 1 INTRODUCTION . There are two main goals in the pursuit of strong game-playing agents . The first is to push the boundaries of artificial intelligence since games can be seen as simplified models of the real world . The second involves finding game-theoretic values , or outcomes given optimal play , for various games ( van den Herik et al. , 2002 ) . These two closely related yet separate goals are commonly referred to as playing and solving1 games , respectively . For playing , researchers have found success in building super-human level game-playing agents for many games , including Go ( Silver et al. , 2017 ; 2016 ) , Chess , Shogi ( Silver et al. , 2018 ) , and Atari games ( Schrittwieser et al. , 2020 ; Mnih et al. , 2015 ) . Achievements for solving include checkers ( Schaeffer et al. , 2007 ) , Hex up to board sizes of 9x9 ( Pawlewicz & Hayward , 2013 ; Henderson et al. , 2009 ) , Go for board sizes up to 5x6 ( van der Werf & Winands , 2009 ) , 15x15 Gomoku ( Allis , 1994 ) , among others . Previously , researchers used hand-crafted heuristics with game-specific knowledge , combined with search methods such as Monte Carlo tree search ( MCTS ) ( Winands et al. , 2008 ) , proof number search ( PNS ) ( Allis et al. , 1994 ) , depth-first proof number search ( DFPN ) ( Nagai , 2002 ; 1999 ) , and threat-space search ( Allis et al. , 1993 ) , to solve problems by massively pruning away unnecessary branches ( Schaeffer et al. , 2007 ; van der Werf et al. , 2003 ; Allis et al. , 1996 ; Allis , 1994 ) . With the great success of AlphaGo and AlphaZero , there have been attempts to combine neural networks with previous solvers to further improve game solving . For example , Gao et al . ( 2017 ) incorporated an AlphaGo-like neural network into a state-of-the-art Hex solver to solve 8x8 Hex openings more quickly , which demonstrated that neural networks can have a positive impact when combined with previous techniques and heuristics . Meanwhile , McAleer et al . ( 2018 ) also trained an AlphaZero- ∗These authors contributed equally . 1A solution to a game is an exhaustive strategy that guarantees the game-theoretic value against all opposing actions from the game ’ s initial position ( Allis , 1994 ) . like agent to solve the Rubik ’ s Cube . In addition , game solving techniques were also shown to be viable for non-game applications ( Kishimoto et al. , 2019 ; Segler et al. , 2018 ) . However , a limitation of using these techniques is that the networks trained with the objective of strong play may not be well-suited for obtaining game-theoretic values . Since the goal of a strong player is to play moves that maximize win rates ( or the highest confidence for winning ) , as a heuristic it often does not choose moves that result in the fewest nodes in the search tree when solving . As an example , Agostinelli et al . ( 2019 ) pointed out that AlphaZero-like systems tend to solve problems with longer solutions . For games with a singular end state , e.g . Rubik ’ s cube and n-puzzles , they proposed an approach that trains a cost-to-go value function that approximates the cost of finding the shortest-path solution , which can be viewed as a kind of prioritized-sweeping ( Moore & Atkeson , 1993 ) algorithm , starting from the end state ( goal ) . However , singular end states are often only exploitable for puzzles . Indeed , in two-player zero-sum games such as Go , Hex , Gomoku , Connect6 , and many others , the game may end in too many configurations to enumerate practically . This paper presents a novel approach to solving these problems , while still tending to choose moves that lead to the fastest solutions . In our approach , we propose a new heuristic , referred to as the proof cost . We give two concrete examples of how proof cost can be designed . The first acts as a “ shortest path ” heuristic to a proof , while the second predicts solution tree sizes . Then , we use AlphaZero training to approximate this heuristic . The resulting network is referred to as the Proof Cost Network ( PCN ) , which can be used as a heuristic with any AND/OR tree search algorithm to improve solving efficiency . Experiments were conducted on 15x15 Gomoku and 9x9 Killall-Go problems . The results show that PCN outperforms AlphaZero when used as a heuristic with MCTS-based and Focused DFPN ( Gao et al. , 2017 ; Henderson et al. , 2009 ) solvers , which are both commonly used to solve games . 2 BACKGROUND . 2.1 THE GAME-THEORETIC VALUE AND PROOF TREES . For a one or two-player game , the game-theoretic value of a game state is the best outcome that can be obtained by all players if they play optimally . In this paper , we focus on two-player games , and simplify the outcome to only include win/loss ; draws are considered losses for both players2 . A game state is said to be solved when the game-theoretic value for the state is obtained , and proved/disproved if the player to play for the state has a winning/losing outcome . In a proof , the winning player needs to ensure a winning response to all possible actions by the losing player . A proof tree ( Pijls & de Bruin , 2001 ; Stockman , 1979 ) is an AND-OR search tree representing a strategy of answering actions such that ( a ) all terminal nodes are wins , ( b ) the winning player ( the OR-player ) contains at least one winning action , ( c ) all losing player ( the AND-player ) actions are enumerated , and the OR-player needs to have winning responses to each AND-player action . A disproof tree is the dual case of the above ( with win/loss and AND/OR reversed ) ; a solution tree is a general term used to describe both proofs and disproofs . 2.2 MONTE CARLO TREE SEARCH . Monte Carlo tree search ( MCTS ) ( Coulom , 2006 ; Kocsis & Szepesvári , 2006 ) is a heuristic best-first search algorithm that iteratively repeats the following four phases : selection , expansion , evaluation , and backpropagation . In the selection phase , starting from the root node , the algorithm chooses a child node according to a specified selection criterion until a leaf node is reached . Given a state s during selection , AlphaZero selects an action a∗ by the PUCT equation ( Silver et al. , 2018 ; Rosin , 2011 ) : a∗ = arg max a { Q ( s , a ) + cPUCT × P ( s , a ) × √∑ bN ( s , b ) 1 +N ( s , a ) } , ( 1 ) where Q ( s , a ) = W ( s , a ) /N ( s , a ) is the estimated mean win rate , N ( s , a ) is the number of times a is selected at s , W ( s , a ) is the number of wins , cPUCT is a weight for exploration , and P ( s , a ) is a 2We can solve the same problem twice , once for each player ; if both outcomes are losses , then we know the outcome is a draw . prior knowledge heuristic . The above selected leaf then expands all children which are added to the tree . The leaf node is then evaluated . In AlphaZero , a two-head network is trained such that it outputs a policy p ( s , a ) , and a value v ( s ) . The policy is a distribution that estimates how likely each child of s will be visited during selection ; p ( s , a ) can then be used as P ( s , a ) in eq . 1 . The scalar v ( s ) is an estimate for the game-theoretic value of s. During backpropagation we move back up the selection sequence andQ ( si , ai ) is updated for all ancestors si . While originally designed for playing , MCTS can also be used to solve games with AND-OR Boolean backpropagation . MCTS has been used to solve games and problems for Lines of Action ( Winands et al. , 2010 ; 2008 ) , Connect4 , Seki in the game of Go ( Cazenave & Saffidine , 2010 ) , and Connect6 ( Wei et al. , 2015 ) . 2.3 PROOF NUMBER SEARCH . Proof number search ( PNS ) ( Allis et al. , 1994 ) is a best-first search algorithm that was designed specifically for solving games . Each node is associated with two numbers : the proof number ( PN ) and the disproof number ( DN ) , which are heuristics that represent the minimum required number of leaf nodes that need to be expanded to prove and disprove the node respectively . PNS largely follows the same four phases as in MCTS . What is called the most-proving node ( MPN ) is selected during the selection phase . Specifically , the child with the lowest PN at each OR node , or the lowest DN at each AND node is selected ; the resulting leaf node is then the MPN that needs to be evaluated . Following the definition of the PN/DN , PNS therefore builds the solution tree by expanding and evaluating the least number of nodes . There are many PNS variants , one of which is the so-called depth-first proof number search ( DFPN ) ( Nagai , 2002 ; 1999 ) , which addresses the large memory requirements for large searches . PNS was originally designed such that all newly expanded nodes initialize PN/DN values to 1/1 . To improve the heuristic , domain knowledge can be used to initialize PN/DN values differently , which speeds up the search for a solution ( Winands & Schadd , 2010 ; Wu et al. , 2010 ; Saito et al. , 2006 ; Kishimoto & Müller , 2005 ; Allis , 1994 ) . In addition , Henderson ( 2010 ) proposed Focused DFPN ( FDFPN ) , which uses heuristics to direct the search toward promising solutions with a technique that is often referred to as progressive widening . Specifically , progressive widening involves prioritizing search on only a portion of all possible moves . The branching factor b at an internal search node is dynamically adjusted by b = bbase + dµ × |blivechildren|e , where bbase is set to 1 , blivechildren is the number of all yet unsolved children of the node , and µ is a weighting constant . With an accurate heuristic , FDFPN can solve problems while searching fewer nodes than unmodified DFPN . Further , Gao et al . ( 2017 ) proposed FDFPN-CNN by incorporating the policy and value outputs from an AlphaGo-based agent as heuristics to solve 8x8 Hex . Namely , the policy was used for move ordering and the value was used to control the branching factor by b = bbase+df ( s ) ×|blivechildren|e and f ( s ) = min { µ , 1 + v ( s ) } . 2.4 THE ALPHAZERO ALGORITHM . AlphaZero ( Silver et al. , 2018 ) is a general reinforcement learning algorithm that can achieve superhuman level playing strength for games without requiring any expert domain knowledge . The training routine consists of two phases : self-play and optimization . In a nutshell , a two-headed neural network that outputs a policy distribution p and a value scalar v is periodically optimized with data that is collected via self-play . Self-play games are generated by running a set number of MCTS simulations with the most recently optimized neural network . In the optimization phase , random positions are sampled from the latest self-play games , where the network is optimized by the following loss function : L = ( z − v ) 2 − πT log p+ c‖θ‖2 , ( 2 ) where z is the ground truth outcome of the game for that position , π is the MCTS search distribution , c is an L2 regularization weight , and θ represents the network parameters . | This paper uses a modified AlphaZero MCTS training loop to generate proof tree size heuristics, for use in MCTS or proof number search (PNS). The authors demonstrate that both heuristics outperform no heuristic and a existing heuristic method based off of standard search policy and value functions. The ideas and results are a nice step forward in a search domain that is is not always well-addressed by classical value-maximising search. | SP:85c10959bfd71d0dc0f8c61fb3c88047ea703aa0 |
AlphaZero-based Proof Cost Network to Aid Game Solving | 1 INTRODUCTION . There are two main goals in the pursuit of strong game-playing agents . The first is to push the boundaries of artificial intelligence since games can be seen as simplified models of the real world . The second involves finding game-theoretic values , or outcomes given optimal play , for various games ( van den Herik et al. , 2002 ) . These two closely related yet separate goals are commonly referred to as playing and solving1 games , respectively . For playing , researchers have found success in building super-human level game-playing agents for many games , including Go ( Silver et al. , 2017 ; 2016 ) , Chess , Shogi ( Silver et al. , 2018 ) , and Atari games ( Schrittwieser et al. , 2020 ; Mnih et al. , 2015 ) . Achievements for solving include checkers ( Schaeffer et al. , 2007 ) , Hex up to board sizes of 9x9 ( Pawlewicz & Hayward , 2013 ; Henderson et al. , 2009 ) , Go for board sizes up to 5x6 ( van der Werf & Winands , 2009 ) , 15x15 Gomoku ( Allis , 1994 ) , among others . Previously , researchers used hand-crafted heuristics with game-specific knowledge , combined with search methods such as Monte Carlo tree search ( MCTS ) ( Winands et al. , 2008 ) , proof number search ( PNS ) ( Allis et al. , 1994 ) , depth-first proof number search ( DFPN ) ( Nagai , 2002 ; 1999 ) , and threat-space search ( Allis et al. , 1993 ) , to solve problems by massively pruning away unnecessary branches ( Schaeffer et al. , 2007 ; van der Werf et al. , 2003 ; Allis et al. , 1996 ; Allis , 1994 ) . With the great success of AlphaGo and AlphaZero , there have been attempts to combine neural networks with previous solvers to further improve game solving . For example , Gao et al . ( 2017 ) incorporated an AlphaGo-like neural network into a state-of-the-art Hex solver to solve 8x8 Hex openings more quickly , which demonstrated that neural networks can have a positive impact when combined with previous techniques and heuristics . Meanwhile , McAleer et al . ( 2018 ) also trained an AlphaZero- ∗These authors contributed equally . 1A solution to a game is an exhaustive strategy that guarantees the game-theoretic value against all opposing actions from the game ’ s initial position ( Allis , 1994 ) . like agent to solve the Rubik ’ s Cube . In addition , game solving techniques were also shown to be viable for non-game applications ( Kishimoto et al. , 2019 ; Segler et al. , 2018 ) . However , a limitation of using these techniques is that the networks trained with the objective of strong play may not be well-suited for obtaining game-theoretic values . Since the goal of a strong player is to play moves that maximize win rates ( or the highest confidence for winning ) , as a heuristic it often does not choose moves that result in the fewest nodes in the search tree when solving . As an example , Agostinelli et al . ( 2019 ) pointed out that AlphaZero-like systems tend to solve problems with longer solutions . For games with a singular end state , e.g . Rubik ’ s cube and n-puzzles , they proposed an approach that trains a cost-to-go value function that approximates the cost of finding the shortest-path solution , which can be viewed as a kind of prioritized-sweeping ( Moore & Atkeson , 1993 ) algorithm , starting from the end state ( goal ) . However , singular end states are often only exploitable for puzzles . Indeed , in two-player zero-sum games such as Go , Hex , Gomoku , Connect6 , and many others , the game may end in too many configurations to enumerate practically . This paper presents a novel approach to solving these problems , while still tending to choose moves that lead to the fastest solutions . In our approach , we propose a new heuristic , referred to as the proof cost . We give two concrete examples of how proof cost can be designed . The first acts as a “ shortest path ” heuristic to a proof , while the second predicts solution tree sizes . Then , we use AlphaZero training to approximate this heuristic . The resulting network is referred to as the Proof Cost Network ( PCN ) , which can be used as a heuristic with any AND/OR tree search algorithm to improve solving efficiency . Experiments were conducted on 15x15 Gomoku and 9x9 Killall-Go problems . The results show that PCN outperforms AlphaZero when used as a heuristic with MCTS-based and Focused DFPN ( Gao et al. , 2017 ; Henderson et al. , 2009 ) solvers , which are both commonly used to solve games . 2 BACKGROUND . 2.1 THE GAME-THEORETIC VALUE AND PROOF TREES . For a one or two-player game , the game-theoretic value of a game state is the best outcome that can be obtained by all players if they play optimally . In this paper , we focus on two-player games , and simplify the outcome to only include win/loss ; draws are considered losses for both players2 . A game state is said to be solved when the game-theoretic value for the state is obtained , and proved/disproved if the player to play for the state has a winning/losing outcome . In a proof , the winning player needs to ensure a winning response to all possible actions by the losing player . A proof tree ( Pijls & de Bruin , 2001 ; Stockman , 1979 ) is an AND-OR search tree representing a strategy of answering actions such that ( a ) all terminal nodes are wins , ( b ) the winning player ( the OR-player ) contains at least one winning action , ( c ) all losing player ( the AND-player ) actions are enumerated , and the OR-player needs to have winning responses to each AND-player action . A disproof tree is the dual case of the above ( with win/loss and AND/OR reversed ) ; a solution tree is a general term used to describe both proofs and disproofs . 2.2 MONTE CARLO TREE SEARCH . Monte Carlo tree search ( MCTS ) ( Coulom , 2006 ; Kocsis & Szepesvári , 2006 ) is a heuristic best-first search algorithm that iteratively repeats the following four phases : selection , expansion , evaluation , and backpropagation . In the selection phase , starting from the root node , the algorithm chooses a child node according to a specified selection criterion until a leaf node is reached . Given a state s during selection , AlphaZero selects an action a∗ by the PUCT equation ( Silver et al. , 2018 ; Rosin , 2011 ) : a∗ = arg max a { Q ( s , a ) + cPUCT × P ( s , a ) × √∑ bN ( s , b ) 1 +N ( s , a ) } , ( 1 ) where Q ( s , a ) = W ( s , a ) /N ( s , a ) is the estimated mean win rate , N ( s , a ) is the number of times a is selected at s , W ( s , a ) is the number of wins , cPUCT is a weight for exploration , and P ( s , a ) is a 2We can solve the same problem twice , once for each player ; if both outcomes are losses , then we know the outcome is a draw . prior knowledge heuristic . The above selected leaf then expands all children which are added to the tree . The leaf node is then evaluated . In AlphaZero , a two-head network is trained such that it outputs a policy p ( s , a ) , and a value v ( s ) . The policy is a distribution that estimates how likely each child of s will be visited during selection ; p ( s , a ) can then be used as P ( s , a ) in eq . 1 . The scalar v ( s ) is an estimate for the game-theoretic value of s. During backpropagation we move back up the selection sequence andQ ( si , ai ) is updated for all ancestors si . While originally designed for playing , MCTS can also be used to solve games with AND-OR Boolean backpropagation . MCTS has been used to solve games and problems for Lines of Action ( Winands et al. , 2010 ; 2008 ) , Connect4 , Seki in the game of Go ( Cazenave & Saffidine , 2010 ) , and Connect6 ( Wei et al. , 2015 ) . 2.3 PROOF NUMBER SEARCH . Proof number search ( PNS ) ( Allis et al. , 1994 ) is a best-first search algorithm that was designed specifically for solving games . Each node is associated with two numbers : the proof number ( PN ) and the disproof number ( DN ) , which are heuristics that represent the minimum required number of leaf nodes that need to be expanded to prove and disprove the node respectively . PNS largely follows the same four phases as in MCTS . What is called the most-proving node ( MPN ) is selected during the selection phase . Specifically , the child with the lowest PN at each OR node , or the lowest DN at each AND node is selected ; the resulting leaf node is then the MPN that needs to be evaluated . Following the definition of the PN/DN , PNS therefore builds the solution tree by expanding and evaluating the least number of nodes . There are many PNS variants , one of which is the so-called depth-first proof number search ( DFPN ) ( Nagai , 2002 ; 1999 ) , which addresses the large memory requirements for large searches . PNS was originally designed such that all newly expanded nodes initialize PN/DN values to 1/1 . To improve the heuristic , domain knowledge can be used to initialize PN/DN values differently , which speeds up the search for a solution ( Winands & Schadd , 2010 ; Wu et al. , 2010 ; Saito et al. , 2006 ; Kishimoto & Müller , 2005 ; Allis , 1994 ) . In addition , Henderson ( 2010 ) proposed Focused DFPN ( FDFPN ) , which uses heuristics to direct the search toward promising solutions with a technique that is often referred to as progressive widening . Specifically , progressive widening involves prioritizing search on only a portion of all possible moves . The branching factor b at an internal search node is dynamically adjusted by b = bbase + dµ × |blivechildren|e , where bbase is set to 1 , blivechildren is the number of all yet unsolved children of the node , and µ is a weighting constant . With an accurate heuristic , FDFPN can solve problems while searching fewer nodes than unmodified DFPN . Further , Gao et al . ( 2017 ) proposed FDFPN-CNN by incorporating the policy and value outputs from an AlphaGo-based agent as heuristics to solve 8x8 Hex . Namely , the policy was used for move ordering and the value was used to control the branching factor by b = bbase+df ( s ) ×|blivechildren|e and f ( s ) = min { µ , 1 + v ( s ) } . 2.4 THE ALPHAZERO ALGORITHM . AlphaZero ( Silver et al. , 2018 ) is a general reinforcement learning algorithm that can achieve superhuman level playing strength for games without requiring any expert domain knowledge . The training routine consists of two phases : self-play and optimization . In a nutshell , a two-headed neural network that outputs a policy distribution p and a value scalar v is periodically optimized with data that is collected via self-play . Self-play games are generated by running a set number of MCTS simulations with the most recently optimized neural network . In the optimization phase , random positions are sampled from the latest self-play games , where the network is optimized by the following loss function : L = ( z − v ) 2 − πT log p+ c‖θ‖2 , ( 2 ) where z is the ground truth outcome of the game for that position , π is the MCTS search distribution , c is an L2 regularization weight , and θ represents the network parameters . | This paper focus on solving a game, i.e. deciding the win/lose outcome for each game state. In order to finish the task in limited time, it is necessary to expand as little leaf nodes as possible when searching on the game state tree. The number of such leaf nodes is defined as proof cost and the paper proposes to set it as the new learning target based on the AlphaZero learning framework. Experiments are conduct to verify the ability of the model by solving $15 \times 15$ Gomoku and $9 \times 9$ Killall-Go games in limited time. | SP:85c10959bfd71d0dc0f8c61fb3c88047ea703aa0 |
AlphaZero-based Proof Cost Network to Aid Game Solving | 1 INTRODUCTION . There are two main goals in the pursuit of strong game-playing agents . The first is to push the boundaries of artificial intelligence since games can be seen as simplified models of the real world . The second involves finding game-theoretic values , or outcomes given optimal play , for various games ( van den Herik et al. , 2002 ) . These two closely related yet separate goals are commonly referred to as playing and solving1 games , respectively . For playing , researchers have found success in building super-human level game-playing agents for many games , including Go ( Silver et al. , 2017 ; 2016 ) , Chess , Shogi ( Silver et al. , 2018 ) , and Atari games ( Schrittwieser et al. , 2020 ; Mnih et al. , 2015 ) . Achievements for solving include checkers ( Schaeffer et al. , 2007 ) , Hex up to board sizes of 9x9 ( Pawlewicz & Hayward , 2013 ; Henderson et al. , 2009 ) , Go for board sizes up to 5x6 ( van der Werf & Winands , 2009 ) , 15x15 Gomoku ( Allis , 1994 ) , among others . Previously , researchers used hand-crafted heuristics with game-specific knowledge , combined with search methods such as Monte Carlo tree search ( MCTS ) ( Winands et al. , 2008 ) , proof number search ( PNS ) ( Allis et al. , 1994 ) , depth-first proof number search ( DFPN ) ( Nagai , 2002 ; 1999 ) , and threat-space search ( Allis et al. , 1993 ) , to solve problems by massively pruning away unnecessary branches ( Schaeffer et al. , 2007 ; van der Werf et al. , 2003 ; Allis et al. , 1996 ; Allis , 1994 ) . With the great success of AlphaGo and AlphaZero , there have been attempts to combine neural networks with previous solvers to further improve game solving . For example , Gao et al . ( 2017 ) incorporated an AlphaGo-like neural network into a state-of-the-art Hex solver to solve 8x8 Hex openings more quickly , which demonstrated that neural networks can have a positive impact when combined with previous techniques and heuristics . Meanwhile , McAleer et al . ( 2018 ) also trained an AlphaZero- ∗These authors contributed equally . 1A solution to a game is an exhaustive strategy that guarantees the game-theoretic value against all opposing actions from the game ’ s initial position ( Allis , 1994 ) . like agent to solve the Rubik ’ s Cube . In addition , game solving techniques were also shown to be viable for non-game applications ( Kishimoto et al. , 2019 ; Segler et al. , 2018 ) . However , a limitation of using these techniques is that the networks trained with the objective of strong play may not be well-suited for obtaining game-theoretic values . Since the goal of a strong player is to play moves that maximize win rates ( or the highest confidence for winning ) , as a heuristic it often does not choose moves that result in the fewest nodes in the search tree when solving . As an example , Agostinelli et al . ( 2019 ) pointed out that AlphaZero-like systems tend to solve problems with longer solutions . For games with a singular end state , e.g . Rubik ’ s cube and n-puzzles , they proposed an approach that trains a cost-to-go value function that approximates the cost of finding the shortest-path solution , which can be viewed as a kind of prioritized-sweeping ( Moore & Atkeson , 1993 ) algorithm , starting from the end state ( goal ) . However , singular end states are often only exploitable for puzzles . Indeed , in two-player zero-sum games such as Go , Hex , Gomoku , Connect6 , and many others , the game may end in too many configurations to enumerate practically . This paper presents a novel approach to solving these problems , while still tending to choose moves that lead to the fastest solutions . In our approach , we propose a new heuristic , referred to as the proof cost . We give two concrete examples of how proof cost can be designed . The first acts as a “ shortest path ” heuristic to a proof , while the second predicts solution tree sizes . Then , we use AlphaZero training to approximate this heuristic . The resulting network is referred to as the Proof Cost Network ( PCN ) , which can be used as a heuristic with any AND/OR tree search algorithm to improve solving efficiency . Experiments were conducted on 15x15 Gomoku and 9x9 Killall-Go problems . The results show that PCN outperforms AlphaZero when used as a heuristic with MCTS-based and Focused DFPN ( Gao et al. , 2017 ; Henderson et al. , 2009 ) solvers , which are both commonly used to solve games . 2 BACKGROUND . 2.1 THE GAME-THEORETIC VALUE AND PROOF TREES . For a one or two-player game , the game-theoretic value of a game state is the best outcome that can be obtained by all players if they play optimally . In this paper , we focus on two-player games , and simplify the outcome to only include win/loss ; draws are considered losses for both players2 . A game state is said to be solved when the game-theoretic value for the state is obtained , and proved/disproved if the player to play for the state has a winning/losing outcome . In a proof , the winning player needs to ensure a winning response to all possible actions by the losing player . A proof tree ( Pijls & de Bruin , 2001 ; Stockman , 1979 ) is an AND-OR search tree representing a strategy of answering actions such that ( a ) all terminal nodes are wins , ( b ) the winning player ( the OR-player ) contains at least one winning action , ( c ) all losing player ( the AND-player ) actions are enumerated , and the OR-player needs to have winning responses to each AND-player action . A disproof tree is the dual case of the above ( with win/loss and AND/OR reversed ) ; a solution tree is a general term used to describe both proofs and disproofs . 2.2 MONTE CARLO TREE SEARCH . Monte Carlo tree search ( MCTS ) ( Coulom , 2006 ; Kocsis & Szepesvári , 2006 ) is a heuristic best-first search algorithm that iteratively repeats the following four phases : selection , expansion , evaluation , and backpropagation . In the selection phase , starting from the root node , the algorithm chooses a child node according to a specified selection criterion until a leaf node is reached . Given a state s during selection , AlphaZero selects an action a∗ by the PUCT equation ( Silver et al. , 2018 ; Rosin , 2011 ) : a∗ = arg max a { Q ( s , a ) + cPUCT × P ( s , a ) × √∑ bN ( s , b ) 1 +N ( s , a ) } , ( 1 ) where Q ( s , a ) = W ( s , a ) /N ( s , a ) is the estimated mean win rate , N ( s , a ) is the number of times a is selected at s , W ( s , a ) is the number of wins , cPUCT is a weight for exploration , and P ( s , a ) is a 2We can solve the same problem twice , once for each player ; if both outcomes are losses , then we know the outcome is a draw . prior knowledge heuristic . The above selected leaf then expands all children which are added to the tree . The leaf node is then evaluated . In AlphaZero , a two-head network is trained such that it outputs a policy p ( s , a ) , and a value v ( s ) . The policy is a distribution that estimates how likely each child of s will be visited during selection ; p ( s , a ) can then be used as P ( s , a ) in eq . 1 . The scalar v ( s ) is an estimate for the game-theoretic value of s. During backpropagation we move back up the selection sequence andQ ( si , ai ) is updated for all ancestors si . While originally designed for playing , MCTS can also be used to solve games with AND-OR Boolean backpropagation . MCTS has been used to solve games and problems for Lines of Action ( Winands et al. , 2010 ; 2008 ) , Connect4 , Seki in the game of Go ( Cazenave & Saffidine , 2010 ) , and Connect6 ( Wei et al. , 2015 ) . 2.3 PROOF NUMBER SEARCH . Proof number search ( PNS ) ( Allis et al. , 1994 ) is a best-first search algorithm that was designed specifically for solving games . Each node is associated with two numbers : the proof number ( PN ) and the disproof number ( DN ) , which are heuristics that represent the minimum required number of leaf nodes that need to be expanded to prove and disprove the node respectively . PNS largely follows the same four phases as in MCTS . What is called the most-proving node ( MPN ) is selected during the selection phase . Specifically , the child with the lowest PN at each OR node , or the lowest DN at each AND node is selected ; the resulting leaf node is then the MPN that needs to be evaluated . Following the definition of the PN/DN , PNS therefore builds the solution tree by expanding and evaluating the least number of nodes . There are many PNS variants , one of which is the so-called depth-first proof number search ( DFPN ) ( Nagai , 2002 ; 1999 ) , which addresses the large memory requirements for large searches . PNS was originally designed such that all newly expanded nodes initialize PN/DN values to 1/1 . To improve the heuristic , domain knowledge can be used to initialize PN/DN values differently , which speeds up the search for a solution ( Winands & Schadd , 2010 ; Wu et al. , 2010 ; Saito et al. , 2006 ; Kishimoto & Müller , 2005 ; Allis , 1994 ) . In addition , Henderson ( 2010 ) proposed Focused DFPN ( FDFPN ) , which uses heuristics to direct the search toward promising solutions with a technique that is often referred to as progressive widening . Specifically , progressive widening involves prioritizing search on only a portion of all possible moves . The branching factor b at an internal search node is dynamically adjusted by b = bbase + dµ × |blivechildren|e , where bbase is set to 1 , blivechildren is the number of all yet unsolved children of the node , and µ is a weighting constant . With an accurate heuristic , FDFPN can solve problems while searching fewer nodes than unmodified DFPN . Further , Gao et al . ( 2017 ) proposed FDFPN-CNN by incorporating the policy and value outputs from an AlphaGo-based agent as heuristics to solve 8x8 Hex . Namely , the policy was used for move ordering and the value was used to control the branching factor by b = bbase+df ( s ) ×|blivechildren|e and f ( s ) = min { µ , 1 + v ( s ) } . 2.4 THE ALPHAZERO ALGORITHM . AlphaZero ( Silver et al. , 2018 ) is a general reinforcement learning algorithm that can achieve superhuman level playing strength for games without requiring any expert domain knowledge . The training routine consists of two phases : self-play and optimization . In a nutshell , a two-headed neural network that outputs a policy distribution p and a value scalar v is periodically optimized with data that is collected via self-play . Self-play games are generated by running a set number of MCTS simulations with the most recently optimized neural network . In the optimization phase , random positions are sampled from the latest self-play games , where the network is optimized by the following loss function : L = ( z − v ) 2 − πT log p+ c‖θ‖2 , ( 2 ) where z is the ground truth outcome of the game for that position , π is the MCTS search distribution , c is an L2 regularization weight , and θ represents the network parameters . | As we know that, from AlphaGo to AlphaZero, less and less expert knowledge is used. In this paper, however, the authors make AlphaZero becomes faster by modifying the training target of the AlphaZero algorithm, such that it prioritizes solving the game quickly, rather than winning, and training knowledge-based networks. Experimental evaluation is provided on 15x15 Gomoku and 9x9 Killall-Go problems. | SP:85c10959bfd71d0dc0f8c61fb3c88047ea703aa0 |
Graph-Guided Network for Irregularly Sampled Multivariate Time Series | 1 INTRODUCTION . Multivariate time series are prevalent in a variety of domains including healthcare , space science , cybersecurity , biology , and finance ( Ravuri et al. , 2021 ; Sousa et al. , 2020 ; Sezer et al. , 2020 ; Fawaz et al. , 2019 ; Abanda et al. , 2019 ; Tang et al. , 2018 ) . Practical issues often exist in collecting sensor measurements that lead to various types of irregularities caused by missing observations , such as cost saving , sensor failures , external forces in physical scenarios , medical interventions , to name a few ( Choi et al. , 2020 ) . While temporal machine learning models usually assume fully observable and fixed-size input data , irregularly sampled time series raise considerable challenges . For example , the observations of multiple sensors are not well-aligned ; the time intervals among adjacent observations are different across sensors ; and different samples have different numbers of observations for different subsets of sensors recorded at different time points . Prior methods for dealing with irregularly sampled time series involve filling in missing values , using interpolation , kernel methods , and probabilistic approaches ( Schafer & Graham , 2002 ) . The missingness of observations carry informative power ( Little & Rubin , 2014 ) and thus imputation of missing data is not always beneficial ( Agniel et al. , 2018 ) . While modern techniques involve recurrent neural network architectures ( e.g. , RNN , LSTM , GRU ) ( Hochreiter & Schmidhuber , 1997 ; Cho et al. , 2014 ) and transformers ( Vaswani et al. , 2017 ) , they are restricted to regular sampling or assume aligned measurements across modalities . For misaligned measurements , existing methods tend to rely on a two-stage process of imputation to get a regularly-sampled version of a dataset , and then performing a downstream task such as classification . This decoupled approach might not fully exploit informative missingness patterns that could be essential for the downstream task thus achieving suboptimal performance ( Wells et al. , 2013 ; Li & Marlin , 2016 ) . Thus , several approaches circumvent imputation and directly model irregularly sampled time series data ( Che et al. , 2018 ; Horn et al. , 2020 ; Shukla & Marlin , 2021 ; 2018 ) . However , few explicitly consider relational structure to address the characteristics of irregularly sampled multivariate time series and none leverages graph neural networks . Present work . To address the characteristics of irregularly sampled time series data , we propose to model temporal dynamics of sensor dependencies and how those relationships evolve over time . Previous studies ( Wu et al. , 2021 ; Li et al. , 2020a ; Zhang et al. , 2019 ) have noted that the inter-sensor correlations bring rich information in modeling time series . Our intuitive assumption is that the observed sensors can indicate how the unobserved sensors currently behave , which can further improve the representation learning of irregular multivariate time series . We develop RAINDROP1 , a graph-guided network that leverages relational structure to embed and classify irregularly sampled multivariate time series . RAINDROP takes samples as input , each sample containing multiple sensors and each sensor consisting of irregularly recorded observations ( e.g. , in clinical data , an individual patient ’ s state of health , recorded at irregular time intervals with different subsets of sensors observed at different times ) . RAINDROP model is inspired by the idea of raindrops falling into a pool at sequential but non-uniform time intervals and thereby creating ripple effects that propagate across the pool . Mathematically , in RAINDROP , observations ( i.e. , raindrops ) hit a sensor graph ( i.e. , pool ) asynchronously and at irregular time intervals , and each observation is processed by passing messages to neighboring sensors ( i.e. , causes a ripple effect in the pool ) taking into account the learned sensor dependencies ( Figure 1 ) . As such , RAINDROP can handle misaligned observations , varying time gaps , arbitrary numbers of observations , and produce embeddings via a novel hierarchical attention . RAINDROP is the first to explicitly model sensor dependencies in learning representations of irregularly sampled time series . We represent dependencies with a separate sensor graph for every sample , wherein nodes indicate sensors and edges denote relationships between them . In addition to capturing distinct sensor dependencies within each sample , RAINDROP i ) takes advantage of similarities between different samples via sharing of parameters in the calculation of attention weights , and ii ) considers importance of successive observations via temporal attention . RAINDROP adaptively estimates missing observations based on recorded information and the learned graph structure . We compare RAINDROP to five state-of-the-art methods across three datasets and four experimental settings , including a setup where a subset of sensors in the test set have malfunctioned ( i.e. , have no readouts at all ) . Experiments show that RAINDROP outperforms baselines on all datasets with an average AUROC improvement of 3.5 % in absolute points on classification tasks . Further , RAINDROP achieves a considerable margin ( 9.3 % absolute points in accuracy on activity recognition ) when a subset of sensors malfunction . 2 RELATED WORK . Learning with irregularly sampled multivariate time series . Irregular time series indicate that the time intervals between adjacent observations are varying ( Zerveas et al. , 2021 ; Tipirneni & Reddy , 2021 ; Chen et al. , 2020 ) . In the multivariate case , irregularity means that observations are misaligned across different sensors . Further , because of a multitude of sampling frequencies and varying time intervals , the number of observations can vary considerably across samples ( Fang & Wang , 2020 ; Kidger et al. , 2020 ) . Predominant downstream tasks for time series are classification ( i.e. , predicting a label for a given sample , e.g. , Tan et al . ( 2020 ) ; Ma et al . ( 2020 ) ) and forecasting ( i.e. , anticipating future observations based on historical observations , e.g. , Wu et al . ( 2020a ) ) . The above mentioned data characteristics create considerable challenges for machine learning models that expect wellaligned and fixed-size input ( Shukla & Marlin , 2020 ) . An intuitive way to deal with irregular time series is to impute missing values and process them as a regular time series dataset ( Mikalsen et al. , 2021 ; Li & Marlin , 2020 ; Shan & Oliva , 2021 ) . However , imputation methods can distort underlying 1Code and datasets are available at https : //anonymous.4open.science/r/Raindrop . distributions and introduce unwanted bias in the dataset . To this end , recent methods directly learn from irregularly sampled time series . For example , Che et al . ( 2018 ) propose a decay mechanism based on gated recurrent units ( GRU-D ) , incorporating binary masking indicators and time intervals to capture long-term temporal dependencies . SeFT ( Horn et al. , 2020 ) re-formulates irregularly sampled time series into a set of observations and learn representations through set functions that are insensitive to alignment . Chen et al . ( 2018 ) model continuous-time hidden dynamics by latent ordinary differential equations ( Latent-ODE ) , combined with an RNN for temporal representations . mTAND ( Shukla & Marlin , 2021 ) leverages multi-time attention mechanism to learn temporal similarity from non-uniformly collected measurements and produces continuous-time embeddings . IP-Net ( Shukla & Marlin , 2018 ) and DGM2 ( Wu et al. , 2021 ) adopt similar imputation paradigms to interpolate the irregular time series against a set of reference points using a kernel-based method . The learned inter-sensor relations are static without considering sample-specific and time-specific characteristics . In contrast with these methods , RAINDROP leverages dynamic graphs to address the characteristics of irregular time series and improve the quality of learned representations . Learning with graphs and neural message passing . There has been a surge of interest in applying neural networks to graphs , leading to the development of graph embeddings ( Zhou et al. , 2020 ; Li et al. , 2021 ) , graph neural networks ( Wu et al. , 2020b ) , and message passing neural networks ( Gilmer et al. , 2017 ) . Our approach is mainly related to methods that perform message passing along edges to update node representations through neural transformations ( Riba et al. , 2018 ; Nikolentzos et al. , 2020 ; Galkin et al. , 2020 ; Fey et al. , 2020 ; Lin et al. , 2018 ; Zhang et al. , 2020 ) . However , in contrast to message passing used to make predictions on graphs , we are interested in leveraging it to meet the challenges of irregularly sampled time series . In particular , we consider message passing where nodes are sensors , describing a particular sample ( e.g. , patient , Figure 1 ) , and we design a message-passing network with learnable adjacency matrices . The key difference with the predominant use of message passing is that RAINDROP uses it to estimate edges ( dependencies ) between sensors rather than applying it on a fixed , apriori-given graph . To the best of our knowledge , no prior work utilized sensor dependencies for learning representations of irregularly sampled multivariate time series . Finally , while prior work used message passing for regular time series ( Wang et al. , 2020 ; Wu et al. , 2020c ; Kalinicheva et al. , 2020 ) , no modeling of irregularly sampled time series has been attempted . 3 RAINDROP Let D = { ( Si , yi ) | i = 1 , . . . , N } denote an irregular time series dataset with N labeled samples ( Figure 2 ) . Every sample Si is an irregular multivariate time series with a corresponding label yi ∈ { 1 , . . . , C } , indicating which of the C classes Si is associated with . Each sample contains M non-uniformly measured sensors that are denoted as u , v , etc . RAINDROP can also work on samples with a subset of sensors ( see Sec . 4.1 ) . Each sensor is given by a sequence of observations ordered by time . For sensor u in sample Si , we denote a single observation as a tuple ( t , xti , u ) , meaning that sensor u was recorded with value xti , u ∈ R at timestamp t ∈ R+ . We omit sample index i and sensor index u in timestamp t. Sensor observations are irregularly recorded , meaning that time intervals between successive observations can vary across sensors . For sensor u in sample Si , we use Ti , u to denote the set of timestamps that u , or at least one of u ’ s L-hop neighbors ( L is the number of layers in RAINDROP ’ s message passing ) is recorded . We use || and T to denote concatenation and transpose , respectively . We omit layer index l ∈ { 1 , . . . , L } for simplicity when text is clear . Problem ( Representation learning for irregularly sampled multivariate time series ) . A datasetD of irregularly sampled multivariate time series is given , where each sample Si has multiple sensors and each sensor has a variable number of observations . RAINDROP learns a function f : Si → zi that maps Si to a fixed-length representation zi suitable for downstream task of interest , such as classification . Using learned zi , RAINDROP can predict label ŷi ∈ { 1 , . . . , C } for Si . RAINDROP learns informative embeddings for irregularly samples time series . The learned embeddings capture temporal patterns of irregular observations and explicitly consider varying dependencies between sensors . While we focus on time-series classification in this work , the proposed method can be easily extended to broader applications such as regression , clustering and generation tasks . | This paper introduces a GNN based method for classifying irregular multivariate time series (MTS). The proposed method explicitly models the dependency between sensors, and propagates impacts of intermittent time series observations from sensors to related sensors for learning MTS embeddings. It jointly learns embeddings and dependency graphs through several attentive mechanisms. The paper provides a good perspective of applying GNN methods on MTS related tasks. | SP:bfb24ffc03ba5cdfc96e685682b12a8cfc6bad50 |
Graph-Guided Network for Irregularly Sampled Multivariate Time Series | 1 INTRODUCTION . Multivariate time series are prevalent in a variety of domains including healthcare , space science , cybersecurity , biology , and finance ( Ravuri et al. , 2021 ; Sousa et al. , 2020 ; Sezer et al. , 2020 ; Fawaz et al. , 2019 ; Abanda et al. , 2019 ; Tang et al. , 2018 ) . Practical issues often exist in collecting sensor measurements that lead to various types of irregularities caused by missing observations , such as cost saving , sensor failures , external forces in physical scenarios , medical interventions , to name a few ( Choi et al. , 2020 ) . While temporal machine learning models usually assume fully observable and fixed-size input data , irregularly sampled time series raise considerable challenges . For example , the observations of multiple sensors are not well-aligned ; the time intervals among adjacent observations are different across sensors ; and different samples have different numbers of observations for different subsets of sensors recorded at different time points . Prior methods for dealing with irregularly sampled time series involve filling in missing values , using interpolation , kernel methods , and probabilistic approaches ( Schafer & Graham , 2002 ) . The missingness of observations carry informative power ( Little & Rubin , 2014 ) and thus imputation of missing data is not always beneficial ( Agniel et al. , 2018 ) . While modern techniques involve recurrent neural network architectures ( e.g. , RNN , LSTM , GRU ) ( Hochreiter & Schmidhuber , 1997 ; Cho et al. , 2014 ) and transformers ( Vaswani et al. , 2017 ) , they are restricted to regular sampling or assume aligned measurements across modalities . For misaligned measurements , existing methods tend to rely on a two-stage process of imputation to get a regularly-sampled version of a dataset , and then performing a downstream task such as classification . This decoupled approach might not fully exploit informative missingness patterns that could be essential for the downstream task thus achieving suboptimal performance ( Wells et al. , 2013 ; Li & Marlin , 2016 ) . Thus , several approaches circumvent imputation and directly model irregularly sampled time series data ( Che et al. , 2018 ; Horn et al. , 2020 ; Shukla & Marlin , 2021 ; 2018 ) . However , few explicitly consider relational structure to address the characteristics of irregularly sampled multivariate time series and none leverages graph neural networks . Present work . To address the characteristics of irregularly sampled time series data , we propose to model temporal dynamics of sensor dependencies and how those relationships evolve over time . Previous studies ( Wu et al. , 2021 ; Li et al. , 2020a ; Zhang et al. , 2019 ) have noted that the inter-sensor correlations bring rich information in modeling time series . Our intuitive assumption is that the observed sensors can indicate how the unobserved sensors currently behave , which can further improve the representation learning of irregular multivariate time series . We develop RAINDROP1 , a graph-guided network that leverages relational structure to embed and classify irregularly sampled multivariate time series . RAINDROP takes samples as input , each sample containing multiple sensors and each sensor consisting of irregularly recorded observations ( e.g. , in clinical data , an individual patient ’ s state of health , recorded at irregular time intervals with different subsets of sensors observed at different times ) . RAINDROP model is inspired by the idea of raindrops falling into a pool at sequential but non-uniform time intervals and thereby creating ripple effects that propagate across the pool . Mathematically , in RAINDROP , observations ( i.e. , raindrops ) hit a sensor graph ( i.e. , pool ) asynchronously and at irregular time intervals , and each observation is processed by passing messages to neighboring sensors ( i.e. , causes a ripple effect in the pool ) taking into account the learned sensor dependencies ( Figure 1 ) . As such , RAINDROP can handle misaligned observations , varying time gaps , arbitrary numbers of observations , and produce embeddings via a novel hierarchical attention . RAINDROP is the first to explicitly model sensor dependencies in learning representations of irregularly sampled time series . We represent dependencies with a separate sensor graph for every sample , wherein nodes indicate sensors and edges denote relationships between them . In addition to capturing distinct sensor dependencies within each sample , RAINDROP i ) takes advantage of similarities between different samples via sharing of parameters in the calculation of attention weights , and ii ) considers importance of successive observations via temporal attention . RAINDROP adaptively estimates missing observations based on recorded information and the learned graph structure . We compare RAINDROP to five state-of-the-art methods across three datasets and four experimental settings , including a setup where a subset of sensors in the test set have malfunctioned ( i.e. , have no readouts at all ) . Experiments show that RAINDROP outperforms baselines on all datasets with an average AUROC improvement of 3.5 % in absolute points on classification tasks . Further , RAINDROP achieves a considerable margin ( 9.3 % absolute points in accuracy on activity recognition ) when a subset of sensors malfunction . 2 RELATED WORK . Learning with irregularly sampled multivariate time series . Irregular time series indicate that the time intervals between adjacent observations are varying ( Zerveas et al. , 2021 ; Tipirneni & Reddy , 2021 ; Chen et al. , 2020 ) . In the multivariate case , irregularity means that observations are misaligned across different sensors . Further , because of a multitude of sampling frequencies and varying time intervals , the number of observations can vary considerably across samples ( Fang & Wang , 2020 ; Kidger et al. , 2020 ) . Predominant downstream tasks for time series are classification ( i.e. , predicting a label for a given sample , e.g. , Tan et al . ( 2020 ) ; Ma et al . ( 2020 ) ) and forecasting ( i.e. , anticipating future observations based on historical observations , e.g. , Wu et al . ( 2020a ) ) . The above mentioned data characteristics create considerable challenges for machine learning models that expect wellaligned and fixed-size input ( Shukla & Marlin , 2020 ) . An intuitive way to deal with irregular time series is to impute missing values and process them as a regular time series dataset ( Mikalsen et al. , 2021 ; Li & Marlin , 2020 ; Shan & Oliva , 2021 ) . However , imputation methods can distort underlying 1Code and datasets are available at https : //anonymous.4open.science/r/Raindrop . distributions and introduce unwanted bias in the dataset . To this end , recent methods directly learn from irregularly sampled time series . For example , Che et al . ( 2018 ) propose a decay mechanism based on gated recurrent units ( GRU-D ) , incorporating binary masking indicators and time intervals to capture long-term temporal dependencies . SeFT ( Horn et al. , 2020 ) re-formulates irregularly sampled time series into a set of observations and learn representations through set functions that are insensitive to alignment . Chen et al . ( 2018 ) model continuous-time hidden dynamics by latent ordinary differential equations ( Latent-ODE ) , combined with an RNN for temporal representations . mTAND ( Shukla & Marlin , 2021 ) leverages multi-time attention mechanism to learn temporal similarity from non-uniformly collected measurements and produces continuous-time embeddings . IP-Net ( Shukla & Marlin , 2018 ) and DGM2 ( Wu et al. , 2021 ) adopt similar imputation paradigms to interpolate the irregular time series against a set of reference points using a kernel-based method . The learned inter-sensor relations are static without considering sample-specific and time-specific characteristics . In contrast with these methods , RAINDROP leverages dynamic graphs to address the characteristics of irregular time series and improve the quality of learned representations . Learning with graphs and neural message passing . There has been a surge of interest in applying neural networks to graphs , leading to the development of graph embeddings ( Zhou et al. , 2020 ; Li et al. , 2021 ) , graph neural networks ( Wu et al. , 2020b ) , and message passing neural networks ( Gilmer et al. , 2017 ) . Our approach is mainly related to methods that perform message passing along edges to update node representations through neural transformations ( Riba et al. , 2018 ; Nikolentzos et al. , 2020 ; Galkin et al. , 2020 ; Fey et al. , 2020 ; Lin et al. , 2018 ; Zhang et al. , 2020 ) . However , in contrast to message passing used to make predictions on graphs , we are interested in leveraging it to meet the challenges of irregularly sampled time series . In particular , we consider message passing where nodes are sensors , describing a particular sample ( e.g. , patient , Figure 1 ) , and we design a message-passing network with learnable adjacency matrices . The key difference with the predominant use of message passing is that RAINDROP uses it to estimate edges ( dependencies ) between sensors rather than applying it on a fixed , apriori-given graph . To the best of our knowledge , no prior work utilized sensor dependencies for learning representations of irregularly sampled multivariate time series . Finally , while prior work used message passing for regular time series ( Wang et al. , 2020 ; Wu et al. , 2020c ; Kalinicheva et al. , 2020 ) , no modeling of irregularly sampled time series has been attempted . 3 RAINDROP Let D = { ( Si , yi ) | i = 1 , . . . , N } denote an irregular time series dataset with N labeled samples ( Figure 2 ) . Every sample Si is an irregular multivariate time series with a corresponding label yi ∈ { 1 , . . . , C } , indicating which of the C classes Si is associated with . Each sample contains M non-uniformly measured sensors that are denoted as u , v , etc . RAINDROP can also work on samples with a subset of sensors ( see Sec . 4.1 ) . Each sensor is given by a sequence of observations ordered by time . For sensor u in sample Si , we denote a single observation as a tuple ( t , xti , u ) , meaning that sensor u was recorded with value xti , u ∈ R at timestamp t ∈ R+ . We omit sample index i and sensor index u in timestamp t. Sensor observations are irregularly recorded , meaning that time intervals between successive observations can vary across sensors . For sensor u in sample Si , we use Ti , u to denote the set of timestamps that u , or at least one of u ’ s L-hop neighbors ( L is the number of layers in RAINDROP ’ s message passing ) is recorded . We use || and T to denote concatenation and transpose , respectively . We omit layer index l ∈ { 1 , . . . , L } for simplicity when text is clear . Problem ( Representation learning for irregularly sampled multivariate time series ) . A datasetD of irregularly sampled multivariate time series is given , where each sample Si has multiple sensors and each sensor has a variable number of observations . RAINDROP learns a function f : Si → zi that maps Si to a fixed-length representation zi suitable for downstream task of interest , such as classification . Using learned zi , RAINDROP can predict label ŷi ∈ { 1 , . . . , C } for Si . RAINDROP learns informative embeddings for irregularly samples time series . The learned embeddings capture temporal patterns of irregular observations and explicitly consider varying dependencies between sensors . While we focus on time-series classification in this work , the proposed method can be easily extended to broader applications such as regression , clustering and generation tasks . | This manuscript describes a method that models multiple time series data (sensors) across different individuals (samples). A graph is used to model the dependency between the sensors, such that the data of one sensor could be used to infer another, which is the key point of this ms. How one sensor affects another is modelled as a message passing problem on the graph. At each time point, an observation embedding is generated, either from a sensor or its neighbours in the graph. Observation embeddings of a sensor is then aggregated into a fixed-length sensor embedding, using temporal attention. These sensor embeddings are concatenated into a sample embedding for an individual for downstream analysis such as classification. | SP:bfb24ffc03ba5cdfc96e685682b12a8cfc6bad50 |
Graph-Guided Network for Irregularly Sampled Multivariate Time Series | 1 INTRODUCTION . Multivariate time series are prevalent in a variety of domains including healthcare , space science , cybersecurity , biology , and finance ( Ravuri et al. , 2021 ; Sousa et al. , 2020 ; Sezer et al. , 2020 ; Fawaz et al. , 2019 ; Abanda et al. , 2019 ; Tang et al. , 2018 ) . Practical issues often exist in collecting sensor measurements that lead to various types of irregularities caused by missing observations , such as cost saving , sensor failures , external forces in physical scenarios , medical interventions , to name a few ( Choi et al. , 2020 ) . While temporal machine learning models usually assume fully observable and fixed-size input data , irregularly sampled time series raise considerable challenges . For example , the observations of multiple sensors are not well-aligned ; the time intervals among adjacent observations are different across sensors ; and different samples have different numbers of observations for different subsets of sensors recorded at different time points . Prior methods for dealing with irregularly sampled time series involve filling in missing values , using interpolation , kernel methods , and probabilistic approaches ( Schafer & Graham , 2002 ) . The missingness of observations carry informative power ( Little & Rubin , 2014 ) and thus imputation of missing data is not always beneficial ( Agniel et al. , 2018 ) . While modern techniques involve recurrent neural network architectures ( e.g. , RNN , LSTM , GRU ) ( Hochreiter & Schmidhuber , 1997 ; Cho et al. , 2014 ) and transformers ( Vaswani et al. , 2017 ) , they are restricted to regular sampling or assume aligned measurements across modalities . For misaligned measurements , existing methods tend to rely on a two-stage process of imputation to get a regularly-sampled version of a dataset , and then performing a downstream task such as classification . This decoupled approach might not fully exploit informative missingness patterns that could be essential for the downstream task thus achieving suboptimal performance ( Wells et al. , 2013 ; Li & Marlin , 2016 ) . Thus , several approaches circumvent imputation and directly model irregularly sampled time series data ( Che et al. , 2018 ; Horn et al. , 2020 ; Shukla & Marlin , 2021 ; 2018 ) . However , few explicitly consider relational structure to address the characteristics of irregularly sampled multivariate time series and none leverages graph neural networks . Present work . To address the characteristics of irregularly sampled time series data , we propose to model temporal dynamics of sensor dependencies and how those relationships evolve over time . Previous studies ( Wu et al. , 2021 ; Li et al. , 2020a ; Zhang et al. , 2019 ) have noted that the inter-sensor correlations bring rich information in modeling time series . Our intuitive assumption is that the observed sensors can indicate how the unobserved sensors currently behave , which can further improve the representation learning of irregular multivariate time series . We develop RAINDROP1 , a graph-guided network that leverages relational structure to embed and classify irregularly sampled multivariate time series . RAINDROP takes samples as input , each sample containing multiple sensors and each sensor consisting of irregularly recorded observations ( e.g. , in clinical data , an individual patient ’ s state of health , recorded at irregular time intervals with different subsets of sensors observed at different times ) . RAINDROP model is inspired by the idea of raindrops falling into a pool at sequential but non-uniform time intervals and thereby creating ripple effects that propagate across the pool . Mathematically , in RAINDROP , observations ( i.e. , raindrops ) hit a sensor graph ( i.e. , pool ) asynchronously and at irregular time intervals , and each observation is processed by passing messages to neighboring sensors ( i.e. , causes a ripple effect in the pool ) taking into account the learned sensor dependencies ( Figure 1 ) . As such , RAINDROP can handle misaligned observations , varying time gaps , arbitrary numbers of observations , and produce embeddings via a novel hierarchical attention . RAINDROP is the first to explicitly model sensor dependencies in learning representations of irregularly sampled time series . We represent dependencies with a separate sensor graph for every sample , wherein nodes indicate sensors and edges denote relationships between them . In addition to capturing distinct sensor dependencies within each sample , RAINDROP i ) takes advantage of similarities between different samples via sharing of parameters in the calculation of attention weights , and ii ) considers importance of successive observations via temporal attention . RAINDROP adaptively estimates missing observations based on recorded information and the learned graph structure . We compare RAINDROP to five state-of-the-art methods across three datasets and four experimental settings , including a setup where a subset of sensors in the test set have malfunctioned ( i.e. , have no readouts at all ) . Experiments show that RAINDROP outperforms baselines on all datasets with an average AUROC improvement of 3.5 % in absolute points on classification tasks . Further , RAINDROP achieves a considerable margin ( 9.3 % absolute points in accuracy on activity recognition ) when a subset of sensors malfunction . 2 RELATED WORK . Learning with irregularly sampled multivariate time series . Irregular time series indicate that the time intervals between adjacent observations are varying ( Zerveas et al. , 2021 ; Tipirneni & Reddy , 2021 ; Chen et al. , 2020 ) . In the multivariate case , irregularity means that observations are misaligned across different sensors . Further , because of a multitude of sampling frequencies and varying time intervals , the number of observations can vary considerably across samples ( Fang & Wang , 2020 ; Kidger et al. , 2020 ) . Predominant downstream tasks for time series are classification ( i.e. , predicting a label for a given sample , e.g. , Tan et al . ( 2020 ) ; Ma et al . ( 2020 ) ) and forecasting ( i.e. , anticipating future observations based on historical observations , e.g. , Wu et al . ( 2020a ) ) . The above mentioned data characteristics create considerable challenges for machine learning models that expect wellaligned and fixed-size input ( Shukla & Marlin , 2020 ) . An intuitive way to deal with irregular time series is to impute missing values and process them as a regular time series dataset ( Mikalsen et al. , 2021 ; Li & Marlin , 2020 ; Shan & Oliva , 2021 ) . However , imputation methods can distort underlying 1Code and datasets are available at https : //anonymous.4open.science/r/Raindrop . distributions and introduce unwanted bias in the dataset . To this end , recent methods directly learn from irregularly sampled time series . For example , Che et al . ( 2018 ) propose a decay mechanism based on gated recurrent units ( GRU-D ) , incorporating binary masking indicators and time intervals to capture long-term temporal dependencies . SeFT ( Horn et al. , 2020 ) re-formulates irregularly sampled time series into a set of observations and learn representations through set functions that are insensitive to alignment . Chen et al . ( 2018 ) model continuous-time hidden dynamics by latent ordinary differential equations ( Latent-ODE ) , combined with an RNN for temporal representations . mTAND ( Shukla & Marlin , 2021 ) leverages multi-time attention mechanism to learn temporal similarity from non-uniformly collected measurements and produces continuous-time embeddings . IP-Net ( Shukla & Marlin , 2018 ) and DGM2 ( Wu et al. , 2021 ) adopt similar imputation paradigms to interpolate the irregular time series against a set of reference points using a kernel-based method . The learned inter-sensor relations are static without considering sample-specific and time-specific characteristics . In contrast with these methods , RAINDROP leverages dynamic graphs to address the characteristics of irregular time series and improve the quality of learned representations . Learning with graphs and neural message passing . There has been a surge of interest in applying neural networks to graphs , leading to the development of graph embeddings ( Zhou et al. , 2020 ; Li et al. , 2021 ) , graph neural networks ( Wu et al. , 2020b ) , and message passing neural networks ( Gilmer et al. , 2017 ) . Our approach is mainly related to methods that perform message passing along edges to update node representations through neural transformations ( Riba et al. , 2018 ; Nikolentzos et al. , 2020 ; Galkin et al. , 2020 ; Fey et al. , 2020 ; Lin et al. , 2018 ; Zhang et al. , 2020 ) . However , in contrast to message passing used to make predictions on graphs , we are interested in leveraging it to meet the challenges of irregularly sampled time series . In particular , we consider message passing where nodes are sensors , describing a particular sample ( e.g. , patient , Figure 1 ) , and we design a message-passing network with learnable adjacency matrices . The key difference with the predominant use of message passing is that RAINDROP uses it to estimate edges ( dependencies ) between sensors rather than applying it on a fixed , apriori-given graph . To the best of our knowledge , no prior work utilized sensor dependencies for learning representations of irregularly sampled multivariate time series . Finally , while prior work used message passing for regular time series ( Wang et al. , 2020 ; Wu et al. , 2020c ; Kalinicheva et al. , 2020 ) , no modeling of irregularly sampled time series has been attempted . 3 RAINDROP Let D = { ( Si , yi ) | i = 1 , . . . , N } denote an irregular time series dataset with N labeled samples ( Figure 2 ) . Every sample Si is an irregular multivariate time series with a corresponding label yi ∈ { 1 , . . . , C } , indicating which of the C classes Si is associated with . Each sample contains M non-uniformly measured sensors that are denoted as u , v , etc . RAINDROP can also work on samples with a subset of sensors ( see Sec . 4.1 ) . Each sensor is given by a sequence of observations ordered by time . For sensor u in sample Si , we denote a single observation as a tuple ( t , xti , u ) , meaning that sensor u was recorded with value xti , u ∈ R at timestamp t ∈ R+ . We omit sample index i and sensor index u in timestamp t. Sensor observations are irregularly recorded , meaning that time intervals between successive observations can vary across sensors . For sensor u in sample Si , we use Ti , u to denote the set of timestamps that u , or at least one of u ’ s L-hop neighbors ( L is the number of layers in RAINDROP ’ s message passing ) is recorded . We use || and T to denote concatenation and transpose , respectively . We omit layer index l ∈ { 1 , . . . , L } for simplicity when text is clear . Problem ( Representation learning for irregularly sampled multivariate time series ) . A datasetD of irregularly sampled multivariate time series is given , where each sample Si has multiple sensors and each sensor has a variable number of observations . RAINDROP learns a function f : Si → zi that maps Si to a fixed-length representation zi suitable for downstream task of interest , such as classification . Using learned zi , RAINDROP can predict label ŷi ∈ { 1 , . . . , C } for Si . RAINDROP learns informative embeddings for irregularly samples time series . The learned embeddings capture temporal patterns of irregular observations and explicitly consider varying dependencies between sensors . While we focus on time-series classification in this work , the proposed method can be easily extended to broader applications such as regression , clustering and generation tasks . | The core idea of the paper is transforming multivariate time series data into a vector z and using z for classification. The transformation has two steps. Firstly, each time record of each sensor is mapped into a space of 20 dimensions. The first 4 dimensions are used for feature extraction, and the last 16 dimensions are used for positional encoding. Secondly, self-attention is used to transform the embedding into a vector z and use it for classification. | SP:bfb24ffc03ba5cdfc96e685682b12a8cfc6bad50 |
ParaDiS: Parallelly Distributable Slimmable Neural Networks | 1 INTRODUCTION . Neural networks are more and more frequently run on end user devices such as mobile phones or Internet of Things ( IoT ) devices instead of the cloud . This is due to clear advantages in terms of better processing latency and privacy preservation . However , those devices have often very limited ( runtime and memory ) resources . While manually designing lightweight networks ( Howard et al. , 2017 ; Zhang et al. , 2018 ) or using model compression schemes ( Cheng et al. , 2018 ) ( e.g. , pruning ( LeCun et al. , 1990 ) or knowledge distillation ( Hinton et al. , 2015 ; Xie et al. , 2020 ) ) allow satisfying particular constraints , these approaches are not well suited when those resources vary across devices and over time . Indeed , a particular model is handcrafted or compressed for given resource constraints , and once those constraints change , a new model needs to be created . To this end , a new family of approaches that are able to instantly trade off between the accuracy and efficiency was introduced . We call these approaches ( or models ) flexible ( Ozerov & Duong , 2021 ) , and they include among others early-exit models ( Huang et al. , 2018 ) , slimmable neural networks ( Yu et al. , 2019 ; Yu & Huang , 2019 ) , Once-for-All ( OFA ) networks ( Cai et al. , 2019 ; Sahni et al. , 2021 ) , and neural mixture models ( Ruiz & Verbeek , 2020 ) . An alternative path to gain in efficiency under constrained resources setting , consists in distributing the neural network inference over several devices ( if available ) ( Teerapittayanon et al. , 2017 ) . The simplest way is to distribute a neural network sequentially , e.g. , in case of two devices by executing early layers on the first device and the remaining layers on the second one , while transmitting the intermediate features between the two devices over a network ( see Fig . 1 ( B ) ) . Depending on the transmission network bandwidth , the features might undergo a lossless or a more or less severe lossy compression ( Choi et al. , 2018 ) . Neural network ( A ) ( see Fig . 1 ) might be either distributed as it is or , in case the features are distorted by compression , after a fine-tuning or retraining ( Choi et al. , 2018 ) . Though sequential distribution might overcome issues of limited memory and com- puting power , it does not decrease the processing latency and might only increase it because of the additional communication delay . This might be overcome via a parallel distribution ( Hadidi et al. , 2019 ) , as illustrated on Fig . 1 ( C ) . However , to maintain the functionality of the original neural network all convolutional and fully connected layers need to communicate , which requires a considerable communication burden and increases processing latency . To overcome this the model may be distributed parallelly without intermediate communication ( Bhardwaj et al. , 2019 ; Asif et al. , 2019 ) , as on Fig . 1 ( D ) , where the only communication needed is to transmit the data to each device and the final result from each device for a fusion . In this work we chose to focus on this parallel distribution without communication and call it simply parallel distribution hereafter , since it leads to a much smaller processing latency , as compared to sequential distribution ; does not suffer from high communication burden of communicating parallel distribution , and is also easy to deploy . The price to be paid for these advantages consists in a potentially decreasing performance and a need of retraining due to the loss of connections between the intermediate layers . The question we are trying to answer in this work is : Can we have one neural network that may instantly and near-optimally 1 be parallelly distributed over several devices , regardless of the number of devices and their capacities ? In this paper we introduce a new framework called parallelly distributable slimmable neural networks or ParaDiS in short that allows such functionality . As its name suggests , ParaDiS is inspired by slimmable neural networks framework ( Yu et al. , 2019 ) , where the full model variants ( or so-called switches ) consist of the model sub-networks of different widths , and all variants are trained jointly while sharing the parameters . For example , the switch denoted as 0.25× is a sub-network with each layer composed of the first 25 % of the channels of the full network . Similarly , in ParaDiS framework we consider several variants or switches . However , ParaDiS switches include configurations distributable on several devices as illustrated on Figure 2 . As such , we represent each configuration or switch as a list of widths . For example , [ 0.5 , 0.5 ] × denotes a configuration consisting of two parallel networks extracted from the first and the second halves of channels of the full network , respectively . All ParaDiS model switches are trained jointly , while strongly sharing most of their parameters . Once a set of available devices is known , a suitable configuration may be selected and instantly deployed . Moreover , if a copy of the full model is available on each device , the configuration may be changed instantly without re-loading a new model with a new configuration . For example , if one device has got more computational resources for some reason ( e.g. , some other process has finished ) configuration [ 0.5 , 0.25 , 0.25 ] × may be instantly changed to [ 0.5 , 0.5 ] × by simply changing the sub-models executed on each device . Finally , similar to slimmable framework , ParaDiS framework is applicable for most modern convolutional neural network ( CNN ) architectures and for different tasks ( e.g. , classification , detection , identification , image restoration and super-resolution ) . 1The term “ near-optimally ” means here that each distributed configuration makes profit of all available resources and that it performs on par with a similar configuration trained specifically for this setup . It has been noticed in ( Yu et al. , 2019 ) that slimmable network switches may share all the parameters except the global statistics of batch normalization ( BN ) blocks . Individual BN statistics are adopted instead , which does not lead to any serious drawback . Indeed , individual BN statistics may be computed within a simple calibration phase after the model is trained ( Yu & Huang , 2019 ) , and they represent a very tiny overhead in terms of the total number of parameters . Since ParaDiS is an extension of the slimmable framework , we adopt in this work the same strategy of individual BN statistics . As for training , while it is inspired by the training procedure for universally slimmable ( US ) networks ( Yu & Huang , 2019 ) , where all switches are trained jointly , the full model is trained from the data and all other switches are distilled via knowledge distillation ( KD ) ( Hinton et al. , 2015 ) from the full model . We introduce two important differences . First , instead of distilling the knowledge from the full model ( switch [ 1.0 ] × ) we distill it from a wider model ( e.g. , switch [ 1.2 ] × ) called simply wide model hereafter . Second , we change the KD procedure by distilling the feature activation maps before the final fully connected layer in addition to the output predicted by the wide model . We have shown that these new ingredients are important for training ParaDiS . We investigate the proposed ParaDiS framework on ImageNet classification task using MobileNet v1 ( Howard et al. , 2017 ) and ResNet-50 ( He et al. , 2016 ) as underlying architectures and on image super-resolution task using WDSR architecture ( Yu et al. , 2020a ) . We compare ParaDiS models with the corresponding parallelly distributed configurations trained individually and with the US models ( Yu & Huang , 2019 ) that are not distributable . First , we find that ParaDiS model performs as good as and in many cases better than the individually trained distributed configurations . Second , we observe that distributable ParaDiS switches perform almost as good as non-distributable US model switches of the same overall complexity . Third , we show that , once distributed overs several devices , ParaDiS outperforms greatly the US models . Finally , we conduct an exhaustive ablation study to show the importance of knowledge distillation , using a wide model and distilling activations . 2 RELATED WORK . Compressed and flexible models . Model compression schemes ( Cheng et al. , 2018 ) ( e.g. , pruning ( LeCun et al. , 1990 ) or knowledge distillation ( Hinton et al. , 2015 ) ) allow satisfying particular memory and processing constraints , though they do only allow producing a fixed model for every particular setting . To go further , a new family of so-called flexible approaches allowing to instantly trade off between the accuracy and efficiency was introduced . These approaches include among others early-exit models ( Huang et al. , 2018 ) , slimmable neural networks ( Yu et al. , 2019 ; Yu & Huang , 2019 ) , Once-for-All ( OFA ) networks ( Cai et al. , 2019 ; Sahni et al. , 2021 ) , and neural mixture models ( Ruiz & Verbeek , 2020 ) . Moreover , flexible models like OFA networks have been shown to be useful for efficient neural architecture search ( Yu et al. , 2020b ) and for developing dynamic inference approaches ( Li et al. , 2021 ) . However , unlike our approach , all these approaches are within one device non-distributed settings . Sequentially distributed models . In Neurosurgeon ( Kang et al. , 2017 ) , the authors propose a dynamic partitioning scheme of an existing deep neural network between a client ( end-user device , for example ) and a distant server ( edge or cloud ) ( see also Fig . 1 ( B ) ) . The neural network can only be split between layers to form a head and a tail and the optimal partition is obtained by estimating the execution time of each part on the different devices . The main drawback of this approach is the added communication time occurring between the different partitions . To this end other optimization strategies have been developed and intermediate feature compression schemes have been proposed ( Matsubara et al. , 2021 ) . However , as we have discussed above , distributing a model sequentially does not allow making use of a plurality of devices to reduce processing latency . Parallelly distributed models . In contrast to sequential distribution , distributing model parallelly with no communication ( see Fig . 1 ( D ) ) allows reducing processing latency without increasing communication burden at the same time . Several recently proposed approaches ( Bhardwaj et al. , 2019 ; Asif et al. , 2019 ) suggest creating such efficient parallel models via knowledge transfer from a bigger single pre-trained model . Wang et al . ( 2020 ) revisit model ensembles that are parallellizable as well , and show that they are almost as efficient as individual non-distributable models of the same complexity . However , in contrast to our proposal , none of those models are sharing parameters . | The authors propose ParaDis, a parallel and distributed version of universally slimmable networks. They use the fundamentals from this work, plus a few additions, to train models that can be switched between different parallel factors with only minor accuracy degradation. They evaluate using ResNet and MobileNet on ImageNet against models trained solely for a given configuration to show that their technique matches and sometimes exceeds this baseline accuracy. They finish the paper with an ablation study that examines the impact of their additions to the training procedure. | SP:92f1e3afe8df10e98320af925309b239a00f42ff |
ParaDiS: Parallelly Distributable Slimmable Neural Networks | 1 INTRODUCTION . Neural networks are more and more frequently run on end user devices such as mobile phones or Internet of Things ( IoT ) devices instead of the cloud . This is due to clear advantages in terms of better processing latency and privacy preservation . However , those devices have often very limited ( runtime and memory ) resources . While manually designing lightweight networks ( Howard et al. , 2017 ; Zhang et al. , 2018 ) or using model compression schemes ( Cheng et al. , 2018 ) ( e.g. , pruning ( LeCun et al. , 1990 ) or knowledge distillation ( Hinton et al. , 2015 ; Xie et al. , 2020 ) ) allow satisfying particular constraints , these approaches are not well suited when those resources vary across devices and over time . Indeed , a particular model is handcrafted or compressed for given resource constraints , and once those constraints change , a new model needs to be created . To this end , a new family of approaches that are able to instantly trade off between the accuracy and efficiency was introduced . We call these approaches ( or models ) flexible ( Ozerov & Duong , 2021 ) , and they include among others early-exit models ( Huang et al. , 2018 ) , slimmable neural networks ( Yu et al. , 2019 ; Yu & Huang , 2019 ) , Once-for-All ( OFA ) networks ( Cai et al. , 2019 ; Sahni et al. , 2021 ) , and neural mixture models ( Ruiz & Verbeek , 2020 ) . An alternative path to gain in efficiency under constrained resources setting , consists in distributing the neural network inference over several devices ( if available ) ( Teerapittayanon et al. , 2017 ) . The simplest way is to distribute a neural network sequentially , e.g. , in case of two devices by executing early layers on the first device and the remaining layers on the second one , while transmitting the intermediate features between the two devices over a network ( see Fig . 1 ( B ) ) . Depending on the transmission network bandwidth , the features might undergo a lossless or a more or less severe lossy compression ( Choi et al. , 2018 ) . Neural network ( A ) ( see Fig . 1 ) might be either distributed as it is or , in case the features are distorted by compression , after a fine-tuning or retraining ( Choi et al. , 2018 ) . Though sequential distribution might overcome issues of limited memory and com- puting power , it does not decrease the processing latency and might only increase it because of the additional communication delay . This might be overcome via a parallel distribution ( Hadidi et al. , 2019 ) , as illustrated on Fig . 1 ( C ) . However , to maintain the functionality of the original neural network all convolutional and fully connected layers need to communicate , which requires a considerable communication burden and increases processing latency . To overcome this the model may be distributed parallelly without intermediate communication ( Bhardwaj et al. , 2019 ; Asif et al. , 2019 ) , as on Fig . 1 ( D ) , where the only communication needed is to transmit the data to each device and the final result from each device for a fusion . In this work we chose to focus on this parallel distribution without communication and call it simply parallel distribution hereafter , since it leads to a much smaller processing latency , as compared to sequential distribution ; does not suffer from high communication burden of communicating parallel distribution , and is also easy to deploy . The price to be paid for these advantages consists in a potentially decreasing performance and a need of retraining due to the loss of connections between the intermediate layers . The question we are trying to answer in this work is : Can we have one neural network that may instantly and near-optimally 1 be parallelly distributed over several devices , regardless of the number of devices and their capacities ? In this paper we introduce a new framework called parallelly distributable slimmable neural networks or ParaDiS in short that allows such functionality . As its name suggests , ParaDiS is inspired by slimmable neural networks framework ( Yu et al. , 2019 ) , where the full model variants ( or so-called switches ) consist of the model sub-networks of different widths , and all variants are trained jointly while sharing the parameters . For example , the switch denoted as 0.25× is a sub-network with each layer composed of the first 25 % of the channels of the full network . Similarly , in ParaDiS framework we consider several variants or switches . However , ParaDiS switches include configurations distributable on several devices as illustrated on Figure 2 . As such , we represent each configuration or switch as a list of widths . For example , [ 0.5 , 0.5 ] × denotes a configuration consisting of two parallel networks extracted from the first and the second halves of channels of the full network , respectively . All ParaDiS model switches are trained jointly , while strongly sharing most of their parameters . Once a set of available devices is known , a suitable configuration may be selected and instantly deployed . Moreover , if a copy of the full model is available on each device , the configuration may be changed instantly without re-loading a new model with a new configuration . For example , if one device has got more computational resources for some reason ( e.g. , some other process has finished ) configuration [ 0.5 , 0.25 , 0.25 ] × may be instantly changed to [ 0.5 , 0.5 ] × by simply changing the sub-models executed on each device . Finally , similar to slimmable framework , ParaDiS framework is applicable for most modern convolutional neural network ( CNN ) architectures and for different tasks ( e.g. , classification , detection , identification , image restoration and super-resolution ) . 1The term “ near-optimally ” means here that each distributed configuration makes profit of all available resources and that it performs on par with a similar configuration trained specifically for this setup . It has been noticed in ( Yu et al. , 2019 ) that slimmable network switches may share all the parameters except the global statistics of batch normalization ( BN ) blocks . Individual BN statistics are adopted instead , which does not lead to any serious drawback . Indeed , individual BN statistics may be computed within a simple calibration phase after the model is trained ( Yu & Huang , 2019 ) , and they represent a very tiny overhead in terms of the total number of parameters . Since ParaDiS is an extension of the slimmable framework , we adopt in this work the same strategy of individual BN statistics . As for training , while it is inspired by the training procedure for universally slimmable ( US ) networks ( Yu & Huang , 2019 ) , where all switches are trained jointly , the full model is trained from the data and all other switches are distilled via knowledge distillation ( KD ) ( Hinton et al. , 2015 ) from the full model . We introduce two important differences . First , instead of distilling the knowledge from the full model ( switch [ 1.0 ] × ) we distill it from a wider model ( e.g. , switch [ 1.2 ] × ) called simply wide model hereafter . Second , we change the KD procedure by distilling the feature activation maps before the final fully connected layer in addition to the output predicted by the wide model . We have shown that these new ingredients are important for training ParaDiS . We investigate the proposed ParaDiS framework on ImageNet classification task using MobileNet v1 ( Howard et al. , 2017 ) and ResNet-50 ( He et al. , 2016 ) as underlying architectures and on image super-resolution task using WDSR architecture ( Yu et al. , 2020a ) . We compare ParaDiS models with the corresponding parallelly distributed configurations trained individually and with the US models ( Yu & Huang , 2019 ) that are not distributable . First , we find that ParaDiS model performs as good as and in many cases better than the individually trained distributed configurations . Second , we observe that distributable ParaDiS switches perform almost as good as non-distributable US model switches of the same overall complexity . Third , we show that , once distributed overs several devices , ParaDiS outperforms greatly the US models . Finally , we conduct an exhaustive ablation study to show the importance of knowledge distillation , using a wide model and distilling activations . 2 RELATED WORK . Compressed and flexible models . Model compression schemes ( Cheng et al. , 2018 ) ( e.g. , pruning ( LeCun et al. , 1990 ) or knowledge distillation ( Hinton et al. , 2015 ) ) allow satisfying particular memory and processing constraints , though they do only allow producing a fixed model for every particular setting . To go further , a new family of so-called flexible approaches allowing to instantly trade off between the accuracy and efficiency was introduced . These approaches include among others early-exit models ( Huang et al. , 2018 ) , slimmable neural networks ( Yu et al. , 2019 ; Yu & Huang , 2019 ) , Once-for-All ( OFA ) networks ( Cai et al. , 2019 ; Sahni et al. , 2021 ) , and neural mixture models ( Ruiz & Verbeek , 2020 ) . Moreover , flexible models like OFA networks have been shown to be useful for efficient neural architecture search ( Yu et al. , 2020b ) and for developing dynamic inference approaches ( Li et al. , 2021 ) . However , unlike our approach , all these approaches are within one device non-distributed settings . Sequentially distributed models . In Neurosurgeon ( Kang et al. , 2017 ) , the authors propose a dynamic partitioning scheme of an existing deep neural network between a client ( end-user device , for example ) and a distant server ( edge or cloud ) ( see also Fig . 1 ( B ) ) . The neural network can only be split between layers to form a head and a tail and the optimal partition is obtained by estimating the execution time of each part on the different devices . The main drawback of this approach is the added communication time occurring between the different partitions . To this end other optimization strategies have been developed and intermediate feature compression schemes have been proposed ( Matsubara et al. , 2021 ) . However , as we have discussed above , distributing a model sequentially does not allow making use of a plurality of devices to reduce processing latency . Parallelly distributed models . In contrast to sequential distribution , distributing model parallelly with no communication ( see Fig . 1 ( D ) ) allows reducing processing latency without increasing communication burden at the same time . Several recently proposed approaches ( Bhardwaj et al. , 2019 ; Asif et al. , 2019 ) suggest creating such efficient parallel models via knowledge transfer from a bigger single pre-trained model . Wang et al . ( 2020 ) revisit model ensembles that are parallellizable as well , and show that they are almost as efficient as individual non-distributable models of the same complexity . However , in contrast to our proposal , none of those models are sharing parameters . | The paper proposed an algorithm that distill from a larger teacher to a set of parallely distributable student models each of which only compute a fraction of channels in the network. The combined output of the student models can be used to compute the final class prediction. In this way, student models can be deployed in a set of mobile or edge devices. | SP:92f1e3afe8df10e98320af925309b239a00f42ff |
ParaDiS: Parallelly Distributable Slimmable Neural Networks | 1 INTRODUCTION . Neural networks are more and more frequently run on end user devices such as mobile phones or Internet of Things ( IoT ) devices instead of the cloud . This is due to clear advantages in terms of better processing latency and privacy preservation . However , those devices have often very limited ( runtime and memory ) resources . While manually designing lightweight networks ( Howard et al. , 2017 ; Zhang et al. , 2018 ) or using model compression schemes ( Cheng et al. , 2018 ) ( e.g. , pruning ( LeCun et al. , 1990 ) or knowledge distillation ( Hinton et al. , 2015 ; Xie et al. , 2020 ) ) allow satisfying particular constraints , these approaches are not well suited when those resources vary across devices and over time . Indeed , a particular model is handcrafted or compressed for given resource constraints , and once those constraints change , a new model needs to be created . To this end , a new family of approaches that are able to instantly trade off between the accuracy and efficiency was introduced . We call these approaches ( or models ) flexible ( Ozerov & Duong , 2021 ) , and they include among others early-exit models ( Huang et al. , 2018 ) , slimmable neural networks ( Yu et al. , 2019 ; Yu & Huang , 2019 ) , Once-for-All ( OFA ) networks ( Cai et al. , 2019 ; Sahni et al. , 2021 ) , and neural mixture models ( Ruiz & Verbeek , 2020 ) . An alternative path to gain in efficiency under constrained resources setting , consists in distributing the neural network inference over several devices ( if available ) ( Teerapittayanon et al. , 2017 ) . The simplest way is to distribute a neural network sequentially , e.g. , in case of two devices by executing early layers on the first device and the remaining layers on the second one , while transmitting the intermediate features between the two devices over a network ( see Fig . 1 ( B ) ) . Depending on the transmission network bandwidth , the features might undergo a lossless or a more or less severe lossy compression ( Choi et al. , 2018 ) . Neural network ( A ) ( see Fig . 1 ) might be either distributed as it is or , in case the features are distorted by compression , after a fine-tuning or retraining ( Choi et al. , 2018 ) . Though sequential distribution might overcome issues of limited memory and com- puting power , it does not decrease the processing latency and might only increase it because of the additional communication delay . This might be overcome via a parallel distribution ( Hadidi et al. , 2019 ) , as illustrated on Fig . 1 ( C ) . However , to maintain the functionality of the original neural network all convolutional and fully connected layers need to communicate , which requires a considerable communication burden and increases processing latency . To overcome this the model may be distributed parallelly without intermediate communication ( Bhardwaj et al. , 2019 ; Asif et al. , 2019 ) , as on Fig . 1 ( D ) , where the only communication needed is to transmit the data to each device and the final result from each device for a fusion . In this work we chose to focus on this parallel distribution without communication and call it simply parallel distribution hereafter , since it leads to a much smaller processing latency , as compared to sequential distribution ; does not suffer from high communication burden of communicating parallel distribution , and is also easy to deploy . The price to be paid for these advantages consists in a potentially decreasing performance and a need of retraining due to the loss of connections between the intermediate layers . The question we are trying to answer in this work is : Can we have one neural network that may instantly and near-optimally 1 be parallelly distributed over several devices , regardless of the number of devices and their capacities ? In this paper we introduce a new framework called parallelly distributable slimmable neural networks or ParaDiS in short that allows such functionality . As its name suggests , ParaDiS is inspired by slimmable neural networks framework ( Yu et al. , 2019 ) , where the full model variants ( or so-called switches ) consist of the model sub-networks of different widths , and all variants are trained jointly while sharing the parameters . For example , the switch denoted as 0.25× is a sub-network with each layer composed of the first 25 % of the channels of the full network . Similarly , in ParaDiS framework we consider several variants or switches . However , ParaDiS switches include configurations distributable on several devices as illustrated on Figure 2 . As such , we represent each configuration or switch as a list of widths . For example , [ 0.5 , 0.5 ] × denotes a configuration consisting of two parallel networks extracted from the first and the second halves of channels of the full network , respectively . All ParaDiS model switches are trained jointly , while strongly sharing most of their parameters . Once a set of available devices is known , a suitable configuration may be selected and instantly deployed . Moreover , if a copy of the full model is available on each device , the configuration may be changed instantly without re-loading a new model with a new configuration . For example , if one device has got more computational resources for some reason ( e.g. , some other process has finished ) configuration [ 0.5 , 0.25 , 0.25 ] × may be instantly changed to [ 0.5 , 0.5 ] × by simply changing the sub-models executed on each device . Finally , similar to slimmable framework , ParaDiS framework is applicable for most modern convolutional neural network ( CNN ) architectures and for different tasks ( e.g. , classification , detection , identification , image restoration and super-resolution ) . 1The term “ near-optimally ” means here that each distributed configuration makes profit of all available resources and that it performs on par with a similar configuration trained specifically for this setup . It has been noticed in ( Yu et al. , 2019 ) that slimmable network switches may share all the parameters except the global statistics of batch normalization ( BN ) blocks . Individual BN statistics are adopted instead , which does not lead to any serious drawback . Indeed , individual BN statistics may be computed within a simple calibration phase after the model is trained ( Yu & Huang , 2019 ) , and they represent a very tiny overhead in terms of the total number of parameters . Since ParaDiS is an extension of the slimmable framework , we adopt in this work the same strategy of individual BN statistics . As for training , while it is inspired by the training procedure for universally slimmable ( US ) networks ( Yu & Huang , 2019 ) , where all switches are trained jointly , the full model is trained from the data and all other switches are distilled via knowledge distillation ( KD ) ( Hinton et al. , 2015 ) from the full model . We introduce two important differences . First , instead of distilling the knowledge from the full model ( switch [ 1.0 ] × ) we distill it from a wider model ( e.g. , switch [ 1.2 ] × ) called simply wide model hereafter . Second , we change the KD procedure by distilling the feature activation maps before the final fully connected layer in addition to the output predicted by the wide model . We have shown that these new ingredients are important for training ParaDiS . We investigate the proposed ParaDiS framework on ImageNet classification task using MobileNet v1 ( Howard et al. , 2017 ) and ResNet-50 ( He et al. , 2016 ) as underlying architectures and on image super-resolution task using WDSR architecture ( Yu et al. , 2020a ) . We compare ParaDiS models with the corresponding parallelly distributed configurations trained individually and with the US models ( Yu & Huang , 2019 ) that are not distributable . First , we find that ParaDiS model performs as good as and in many cases better than the individually trained distributed configurations . Second , we observe that distributable ParaDiS switches perform almost as good as non-distributable US model switches of the same overall complexity . Third , we show that , once distributed overs several devices , ParaDiS outperforms greatly the US models . Finally , we conduct an exhaustive ablation study to show the importance of knowledge distillation , using a wide model and distilling activations . 2 RELATED WORK . Compressed and flexible models . Model compression schemes ( Cheng et al. , 2018 ) ( e.g. , pruning ( LeCun et al. , 1990 ) or knowledge distillation ( Hinton et al. , 2015 ) ) allow satisfying particular memory and processing constraints , though they do only allow producing a fixed model for every particular setting . To go further , a new family of so-called flexible approaches allowing to instantly trade off between the accuracy and efficiency was introduced . These approaches include among others early-exit models ( Huang et al. , 2018 ) , slimmable neural networks ( Yu et al. , 2019 ; Yu & Huang , 2019 ) , Once-for-All ( OFA ) networks ( Cai et al. , 2019 ; Sahni et al. , 2021 ) , and neural mixture models ( Ruiz & Verbeek , 2020 ) . Moreover , flexible models like OFA networks have been shown to be useful for efficient neural architecture search ( Yu et al. , 2020b ) and for developing dynamic inference approaches ( Li et al. , 2021 ) . However , unlike our approach , all these approaches are within one device non-distributed settings . Sequentially distributed models . In Neurosurgeon ( Kang et al. , 2017 ) , the authors propose a dynamic partitioning scheme of an existing deep neural network between a client ( end-user device , for example ) and a distant server ( edge or cloud ) ( see also Fig . 1 ( B ) ) . The neural network can only be split between layers to form a head and a tail and the optimal partition is obtained by estimating the execution time of each part on the different devices . The main drawback of this approach is the added communication time occurring between the different partitions . To this end other optimization strategies have been developed and intermediate feature compression schemes have been proposed ( Matsubara et al. , 2021 ) . However , as we have discussed above , distributing a model sequentially does not allow making use of a plurality of devices to reduce processing latency . Parallelly distributed models . In contrast to sequential distribution , distributing model parallelly with no communication ( see Fig . 1 ( D ) ) allows reducing processing latency without increasing communication burden at the same time . Several recently proposed approaches ( Bhardwaj et al. , 2019 ; Asif et al. , 2019 ) suggest creating such efficient parallel models via knowledge transfer from a bigger single pre-trained model . Wang et al . ( 2020 ) revisit model ensembles that are parallellizable as well , and show that they are almost as efficient as individual non-distributable models of the same complexity . However , in contrast to our proposal , none of those models are sharing parameters . | The paper proposes ParaDiS, a slimmable network that can be executed across multiple devices, and be transferred across different devices without re-training. To train ParaDis, the authors propose to distill from a wider network, and combine activation knowledge distillation to improve the performance. While the idea of parallel execution is promising, there is little detailed discussion on that point. | SP:92f1e3afe8df10e98320af925309b239a00f42ff |
A Study of Aggregation of Long Time-series Input for LSTM Neural Networks | 1 INTRODUCTION . Predicting the future has always been a task humans found hard to accomplish . In the last decade , many systems have surrounded themselves with multi-variate tracing , recording many variables throughout time . Natural systems such as weather and rivers , financial systems such as the stock market and Bitcoin and global epidemics , all are recorded . This rise of big data allowed machine learning algorithms to predict the future with great accuracy . The mentioned systems can be described using a single variable over time , namely univariate time series , or several variables altogether as a multivariate time series . In both cases , one variable is marked as the important one whom we ’ d like to predict . However , typically , machine learning models are not capable of handling long time series . As the input intake to the model ( more samples ) grows wider , the model is required to adjust more internal weights to learn the dependencies in the data . So while additional data appears to be always an advantage , it affects learning speed but also learning accuracy . To overcome the trade-off between the will to accommodate as much data as possible and the engineering limitation of the learning process it is common to aggregate the data at the model input . Namely , a long data sequence is used , but the input to the model is kept small by partitioning the data to equal size intervals and using the average of the samples in each interval ( Li et al. , 2017 ; Yu et al. , 2017 ; Petersen et al. , 2019 ; Zheng et al. , 2020 ; Farhi et al. , 2021 ) . This enables to preserve the model size modest while still looking far to the past . We observe here that this standard way of aggregation can not be optimal since obviously the data closer to the present ( “ newer ” ) is more important than older data , but it is still aggregated similarly . Thus , we suggest an aggregation method that increases the aggregated interval length exponentially as we look farther back in time . Additionally , we question the use of averaging as the best aggregation function . In this paper , we study our Exponential partitioning and show using seven publicly available datasets that indeed it performs much better than the uniform partitioning that is commonly practiced – an improvement of 6.4-27 % in the RMSE of the prediction . Interestingly , the best results were usually achieved for slow Exponential grows where the exponent base is in the range [ 1.05 , 1.1 ] . We also study other aggregation methods for the intervals ( sample partitions ) and found a more complex picture . Median was the best aggregation function for most of the datasets , however average was still the best for others , and in one case Maximum was the best aggregation function . We also tested a combination of two functions but could only achieve minor improvements . The source-code for our Exponential partitioning is available at http : //www.github.com/TBD . 2 MOTIVATION . To motivate our approach , consider the simplest case of estimating the future value of a number series using a linear estimator , which is based only on two values of the series . To model this , suppose the series is generated by some function and we can sample the function in the interval [ xs , xe ] and want to predict the value at xp > xe . Similarly to the practice in long time series entry to LSTM , instead of selecting the series ( function ) value at two points in the interval , we can calculate the average of sub-intervals . Equation 1 and Equation 2 show the calculated two points , as a function of k , a value within the interval ( not necessarily the middle of it ) . Equation 3 is the linear estimator and Equation 4 calculates the difference between the actual value and the predicted value using a linear estimator . Figure 1 show the calculated differences for the Sine ( sin ( 15 ·X ) ) and Log ( log2X ) functions with the linear interpolation that were done with the interval [ 1 , 7 ] where k varies in the interval ( 1 , 7 ) and the predicted value is at 8 . The graphs clearly show that the optimal partition is not in the middle of the interval and selecting a partition close to the end of the interval is optimal . Similar results were obtained with a second order Lagrange polynomial interpolation . x1 ( k ) = k + xs 2 x2 ( k ) = xe + k 2 ( 1 ) y1 ( k ) = ∫ k xs f ( x ) dx k − xs y2 ( k ) = ∫ xe k f ( x ) dx xe − k ( 2 ) P ( x , k ) = x · y2 ( k ) − y1 ( k ) x2 ( k ) − x1 ( k ) ( 3 ) Diff ( k ) = F ( xp ) − P ( xp , k ) ( 4 ) 3 RELATED WORK . Different architectures implemented an ensemble model that tries to focus both on short term data and long term , for better accuracy . Krstanovic & Paulheim ( 2018 ) constructed an ensemble of LSTM models , each sub-model selected a different window size and other various parameters . Zhao et al . ( 2020 ) also created a cluster of LSTMs that are constructed to separately forecast with different time lag . NNCT weight integration strategy is introduced to determine the weight coefficients of the ensemble model . A more general method was proposed by Choi & Lee ( 2018 ) where an ensemble of LSTM models with varying sequence length ( accordingly to different datasets ) , this allows the model to be capable of handling the dynamic different real-world time series . These methods , although trying to combine between different intervals of time , indirectly try to solve the problem , and do not create a single model that predicts accurately . Changes to the sliding window algorithm were suggested by Laguna et al . ( 2011 ) who proposed a dynamic sliding window , where the size varies and changes according to the last selected window , and after is processed by Dynamic Bayesian Network . It must be noted that this type of pre-processing does not fit LSTM models since the input data shape is not static . Other sliding window methods , mostly for optimization purposes were suggested by Traub et al . ( 2019 ) ; Tangwongsan et al . ( 2017 ) . Similar mechanisms from the field of image vision have been imported into time-series analysis as an attempt to handle temporal data with many features ( such as images ) ( Donahue et al. , 2015 ) . A single model , composed of CNN and LSTM , is used to handle a time-series input , where each instance in time contains many features . In this type of model , time series data is pre-processed by CNN to extract a fixed meaningful vector of the input . We note that unlike this type of model which deals with short window size and many features , this paper deals with long window size . 4 METHODS . In this section we describe how the input is processed for the LSTM model . Data is supplied as a list of time records , where for each time record multiple variables may be available . The data is fed in multiple cycles , where in each cycle only data from a specific time window is used . 4.1 LSTM INPUT . The LSTM architecture accepts its data as a series of timestamps , each can be associated with many features . The following process is employed to allow a time series to be given as input to LSTM . For a single input , we select a window in time and consider the data in this window to predict value of our predicted variable in a constant distance in the future , also called Prediction Horizon ( PH ) . For example , an 8-hour window can be used to predict value that is a 4 hours ahead of the end of that window ( Figure 2 ) . We also note that the figure show a usage of one feature only , when many features could be used in parallel . A relevant window size may contain hundreds of samples , and is too large for an LSTM . To lower the input size , many papers suggest aggregating the windows into larger time interval , each is represented by the average value of all samples in the interval . For example , if the window size is 3 hours and the interval size is 1 hour , a single input to the LSTM is 3 vectors each is an average of 1 hour . The next input to the LSTM is generated by sliding the window by a certain time period , termed a step ( Figure 2 ) . The prediction result can be either a regression , namely an attempt to predict the value , or it can be a classification problem such as predicting that a value will rise above a certain threshold . 4.2 WINDOW PARTITIONING . We suggest to model aggregation as a partition of an interval ( time window ) , as defined in Equation 5 , where x0 and xn are the boundaries of the window , xn−x0 is the window size , and [ xi , xi+1 ] is a sub-interval of the partition . x0 < x1 < x2 < ... < xn ( 5 ) Since each subinterval in time holds a countable number of samples , we will also use the term bin for a subinterval , and use the term bin size for the number of samples in the sub-interval . We will refer to the partition by the sequence of bin sizes ; for example , if the window holds 12 samples , { 3,4,5 } is a partition into three subintervals and the number of samples in the three subintervals is 3 , 4 , and 5 . The common practice ( Farhi et al. , 2021 ; Li et al. , 2017 ; Yu et al. , 2017 ; Petersen et al. , 2019 ; Zheng et al. , 2020 ) is to use a uniform partitioning , namely xi+1 − xi = xj+1 − xj , ∀i , j . We suggest here to use a non-uniform partitioning . 4.3 EXPONENTIAL PARTITIONING . As was explained in 2 , we observe that the data with higher importance is the closer to the present . Thus , we suggest the Exponential partitioning where the bin size grows as we use data deeper in the past . Formally Equation 6 defines the bin sizes of an exponential partitioning . This is done until the penultimate bin , where the last bin holds the reminder of the window . Figure 3 , shows an example of partitioning process , where the window size is 6 records and a list of bins is { 1 , 2 , 3 } . Table 1 shows some of the partitioning we used in the paper and their exponential parameters when applicable . Partition number 0 is the common uniform partition ( uniform baseline ) and partition number 1 is the case where the last n samples are taken as singletons and there is no aggregation at all ( simple baseline ) – both are used as baselines on our experiments . Partition number 2 takes the n − 1 last samples as singletons and aggregates the rest in one bin . This partition is important to understand whether the rest of the history is meaningful where compared to no aggregation ( partition number 1 ) We show in Section 5.2 the impact of aggregating the window size ’ s reminder is significant . Partition number 3 is a linear partitioning ( bin sizes grow linearly ) , and it is closely resemble an Exponential partitioning with b = 1 and ε = 0.45 xi+1 − xi = bb ( 1 + ε ) ic ( 6 ) | This paper looks at how to aggregate time-series inputs to LSTM models, and recommends to use non-uniform aggregation, with small recent bins and larger older bins. Furthermore, instead of simple averaging of time-samples within the bin, it also found value by using non-linear aggregations like median, max and min. The observations are mostly experimental using a collection of 7 time-series datasets. | SP:62b048f231f10484a99a1a999d72b5307104ae7c |
A Study of Aggregation of Long Time-series Input for LSTM Neural Networks | 1 INTRODUCTION . Predicting the future has always been a task humans found hard to accomplish . In the last decade , many systems have surrounded themselves with multi-variate tracing , recording many variables throughout time . Natural systems such as weather and rivers , financial systems such as the stock market and Bitcoin and global epidemics , all are recorded . This rise of big data allowed machine learning algorithms to predict the future with great accuracy . The mentioned systems can be described using a single variable over time , namely univariate time series , or several variables altogether as a multivariate time series . In both cases , one variable is marked as the important one whom we ’ d like to predict . However , typically , machine learning models are not capable of handling long time series . As the input intake to the model ( more samples ) grows wider , the model is required to adjust more internal weights to learn the dependencies in the data . So while additional data appears to be always an advantage , it affects learning speed but also learning accuracy . To overcome the trade-off between the will to accommodate as much data as possible and the engineering limitation of the learning process it is common to aggregate the data at the model input . Namely , a long data sequence is used , but the input to the model is kept small by partitioning the data to equal size intervals and using the average of the samples in each interval ( Li et al. , 2017 ; Yu et al. , 2017 ; Petersen et al. , 2019 ; Zheng et al. , 2020 ; Farhi et al. , 2021 ) . This enables to preserve the model size modest while still looking far to the past . We observe here that this standard way of aggregation can not be optimal since obviously the data closer to the present ( “ newer ” ) is more important than older data , but it is still aggregated similarly . Thus , we suggest an aggregation method that increases the aggregated interval length exponentially as we look farther back in time . Additionally , we question the use of averaging as the best aggregation function . In this paper , we study our Exponential partitioning and show using seven publicly available datasets that indeed it performs much better than the uniform partitioning that is commonly practiced – an improvement of 6.4-27 % in the RMSE of the prediction . Interestingly , the best results were usually achieved for slow Exponential grows where the exponent base is in the range [ 1.05 , 1.1 ] . We also study other aggregation methods for the intervals ( sample partitions ) and found a more complex picture . Median was the best aggregation function for most of the datasets , however average was still the best for others , and in one case Maximum was the best aggregation function . We also tested a combination of two functions but could only achieve minor improvements . The source-code for our Exponential partitioning is available at http : //www.github.com/TBD . 2 MOTIVATION . To motivate our approach , consider the simplest case of estimating the future value of a number series using a linear estimator , which is based only on two values of the series . To model this , suppose the series is generated by some function and we can sample the function in the interval [ xs , xe ] and want to predict the value at xp > xe . Similarly to the practice in long time series entry to LSTM , instead of selecting the series ( function ) value at two points in the interval , we can calculate the average of sub-intervals . Equation 1 and Equation 2 show the calculated two points , as a function of k , a value within the interval ( not necessarily the middle of it ) . Equation 3 is the linear estimator and Equation 4 calculates the difference between the actual value and the predicted value using a linear estimator . Figure 1 show the calculated differences for the Sine ( sin ( 15 ·X ) ) and Log ( log2X ) functions with the linear interpolation that were done with the interval [ 1 , 7 ] where k varies in the interval ( 1 , 7 ) and the predicted value is at 8 . The graphs clearly show that the optimal partition is not in the middle of the interval and selecting a partition close to the end of the interval is optimal . Similar results were obtained with a second order Lagrange polynomial interpolation . x1 ( k ) = k + xs 2 x2 ( k ) = xe + k 2 ( 1 ) y1 ( k ) = ∫ k xs f ( x ) dx k − xs y2 ( k ) = ∫ xe k f ( x ) dx xe − k ( 2 ) P ( x , k ) = x · y2 ( k ) − y1 ( k ) x2 ( k ) − x1 ( k ) ( 3 ) Diff ( k ) = F ( xp ) − P ( xp , k ) ( 4 ) 3 RELATED WORK . Different architectures implemented an ensemble model that tries to focus both on short term data and long term , for better accuracy . Krstanovic & Paulheim ( 2018 ) constructed an ensemble of LSTM models , each sub-model selected a different window size and other various parameters . Zhao et al . ( 2020 ) also created a cluster of LSTMs that are constructed to separately forecast with different time lag . NNCT weight integration strategy is introduced to determine the weight coefficients of the ensemble model . A more general method was proposed by Choi & Lee ( 2018 ) where an ensemble of LSTM models with varying sequence length ( accordingly to different datasets ) , this allows the model to be capable of handling the dynamic different real-world time series . These methods , although trying to combine between different intervals of time , indirectly try to solve the problem , and do not create a single model that predicts accurately . Changes to the sliding window algorithm were suggested by Laguna et al . ( 2011 ) who proposed a dynamic sliding window , where the size varies and changes according to the last selected window , and after is processed by Dynamic Bayesian Network . It must be noted that this type of pre-processing does not fit LSTM models since the input data shape is not static . Other sliding window methods , mostly for optimization purposes were suggested by Traub et al . ( 2019 ) ; Tangwongsan et al . ( 2017 ) . Similar mechanisms from the field of image vision have been imported into time-series analysis as an attempt to handle temporal data with many features ( such as images ) ( Donahue et al. , 2015 ) . A single model , composed of CNN and LSTM , is used to handle a time-series input , where each instance in time contains many features . In this type of model , time series data is pre-processed by CNN to extract a fixed meaningful vector of the input . We note that unlike this type of model which deals with short window size and many features , this paper deals with long window size . 4 METHODS . In this section we describe how the input is processed for the LSTM model . Data is supplied as a list of time records , where for each time record multiple variables may be available . The data is fed in multiple cycles , where in each cycle only data from a specific time window is used . 4.1 LSTM INPUT . The LSTM architecture accepts its data as a series of timestamps , each can be associated with many features . The following process is employed to allow a time series to be given as input to LSTM . For a single input , we select a window in time and consider the data in this window to predict value of our predicted variable in a constant distance in the future , also called Prediction Horizon ( PH ) . For example , an 8-hour window can be used to predict value that is a 4 hours ahead of the end of that window ( Figure 2 ) . We also note that the figure show a usage of one feature only , when many features could be used in parallel . A relevant window size may contain hundreds of samples , and is too large for an LSTM . To lower the input size , many papers suggest aggregating the windows into larger time interval , each is represented by the average value of all samples in the interval . For example , if the window size is 3 hours and the interval size is 1 hour , a single input to the LSTM is 3 vectors each is an average of 1 hour . The next input to the LSTM is generated by sliding the window by a certain time period , termed a step ( Figure 2 ) . The prediction result can be either a regression , namely an attempt to predict the value , or it can be a classification problem such as predicting that a value will rise above a certain threshold . 4.2 WINDOW PARTITIONING . We suggest to model aggregation as a partition of an interval ( time window ) , as defined in Equation 5 , where x0 and xn are the boundaries of the window , xn−x0 is the window size , and [ xi , xi+1 ] is a sub-interval of the partition . x0 < x1 < x2 < ... < xn ( 5 ) Since each subinterval in time holds a countable number of samples , we will also use the term bin for a subinterval , and use the term bin size for the number of samples in the sub-interval . We will refer to the partition by the sequence of bin sizes ; for example , if the window holds 12 samples , { 3,4,5 } is a partition into three subintervals and the number of samples in the three subintervals is 3 , 4 , and 5 . The common practice ( Farhi et al. , 2021 ; Li et al. , 2017 ; Yu et al. , 2017 ; Petersen et al. , 2019 ; Zheng et al. , 2020 ) is to use a uniform partitioning , namely xi+1 − xi = xj+1 − xj , ∀i , j . We suggest here to use a non-uniform partitioning . 4.3 EXPONENTIAL PARTITIONING . As was explained in 2 , we observe that the data with higher importance is the closer to the present . Thus , we suggest the Exponential partitioning where the bin size grows as we use data deeper in the past . Formally Equation 6 defines the bin sizes of an exponential partitioning . This is done until the penultimate bin , where the last bin holds the reminder of the window . Figure 3 , shows an example of partitioning process , where the window size is 6 records and a list of bins is { 1 , 2 , 3 } . Table 1 shows some of the partitioning we used in the paper and their exponential parameters when applicable . Partition number 0 is the common uniform partition ( uniform baseline ) and partition number 1 is the case where the last n samples are taken as singletons and there is no aggregation at all ( simple baseline ) – both are used as baselines on our experiments . Partition number 2 takes the n − 1 last samples as singletons and aggregates the rest in one bin . This partition is important to understand whether the rest of the history is meaningful where compared to no aggregation ( partition number 1 ) We show in Section 5.2 the impact of aggregating the window size ’ s reminder is significant . Partition number 3 is a linear partitioning ( bin sizes grow linearly ) , and it is closely resemble an Exponential partitioning with b = 1 and ε = 0.45 xi+1 − xi = bb ( 1 + ε ) ic ( 6 ) | The paper studies different windowing schemes and pooling schemes for feeding data into an LSTM encoder for time-series forecasting. The windowing schemes considered are different uniform divisions of the history and exponential window sizes where data further back in the past is aggregated over larger windows. The latter enables the network to get fine grained information from more recent data while also attending to larger history length. The paper also compares different aggregation or pooling functions like max, min, mean and median. Overall there seems to be some value in exponential windowing and median aggregation scheme based on the experiments on 7 datasets, where the task is to predict the values of only one univariate time-series. | SP:62b048f231f10484a99a1a999d72b5307104ae7c |
A Study of Aggregation of Long Time-series Input for LSTM Neural Networks | 1 INTRODUCTION . Predicting the future has always been a task humans found hard to accomplish . In the last decade , many systems have surrounded themselves with multi-variate tracing , recording many variables throughout time . Natural systems such as weather and rivers , financial systems such as the stock market and Bitcoin and global epidemics , all are recorded . This rise of big data allowed machine learning algorithms to predict the future with great accuracy . The mentioned systems can be described using a single variable over time , namely univariate time series , or several variables altogether as a multivariate time series . In both cases , one variable is marked as the important one whom we ’ d like to predict . However , typically , machine learning models are not capable of handling long time series . As the input intake to the model ( more samples ) grows wider , the model is required to adjust more internal weights to learn the dependencies in the data . So while additional data appears to be always an advantage , it affects learning speed but also learning accuracy . To overcome the trade-off between the will to accommodate as much data as possible and the engineering limitation of the learning process it is common to aggregate the data at the model input . Namely , a long data sequence is used , but the input to the model is kept small by partitioning the data to equal size intervals and using the average of the samples in each interval ( Li et al. , 2017 ; Yu et al. , 2017 ; Petersen et al. , 2019 ; Zheng et al. , 2020 ; Farhi et al. , 2021 ) . This enables to preserve the model size modest while still looking far to the past . We observe here that this standard way of aggregation can not be optimal since obviously the data closer to the present ( “ newer ” ) is more important than older data , but it is still aggregated similarly . Thus , we suggest an aggregation method that increases the aggregated interval length exponentially as we look farther back in time . Additionally , we question the use of averaging as the best aggregation function . In this paper , we study our Exponential partitioning and show using seven publicly available datasets that indeed it performs much better than the uniform partitioning that is commonly practiced – an improvement of 6.4-27 % in the RMSE of the prediction . Interestingly , the best results were usually achieved for slow Exponential grows where the exponent base is in the range [ 1.05 , 1.1 ] . We also study other aggregation methods for the intervals ( sample partitions ) and found a more complex picture . Median was the best aggregation function for most of the datasets , however average was still the best for others , and in one case Maximum was the best aggregation function . We also tested a combination of two functions but could only achieve minor improvements . The source-code for our Exponential partitioning is available at http : //www.github.com/TBD . 2 MOTIVATION . To motivate our approach , consider the simplest case of estimating the future value of a number series using a linear estimator , which is based only on two values of the series . To model this , suppose the series is generated by some function and we can sample the function in the interval [ xs , xe ] and want to predict the value at xp > xe . Similarly to the practice in long time series entry to LSTM , instead of selecting the series ( function ) value at two points in the interval , we can calculate the average of sub-intervals . Equation 1 and Equation 2 show the calculated two points , as a function of k , a value within the interval ( not necessarily the middle of it ) . Equation 3 is the linear estimator and Equation 4 calculates the difference between the actual value and the predicted value using a linear estimator . Figure 1 show the calculated differences for the Sine ( sin ( 15 ·X ) ) and Log ( log2X ) functions with the linear interpolation that were done with the interval [ 1 , 7 ] where k varies in the interval ( 1 , 7 ) and the predicted value is at 8 . The graphs clearly show that the optimal partition is not in the middle of the interval and selecting a partition close to the end of the interval is optimal . Similar results were obtained with a second order Lagrange polynomial interpolation . x1 ( k ) = k + xs 2 x2 ( k ) = xe + k 2 ( 1 ) y1 ( k ) = ∫ k xs f ( x ) dx k − xs y2 ( k ) = ∫ xe k f ( x ) dx xe − k ( 2 ) P ( x , k ) = x · y2 ( k ) − y1 ( k ) x2 ( k ) − x1 ( k ) ( 3 ) Diff ( k ) = F ( xp ) − P ( xp , k ) ( 4 ) 3 RELATED WORK . Different architectures implemented an ensemble model that tries to focus both on short term data and long term , for better accuracy . Krstanovic & Paulheim ( 2018 ) constructed an ensemble of LSTM models , each sub-model selected a different window size and other various parameters . Zhao et al . ( 2020 ) also created a cluster of LSTMs that are constructed to separately forecast with different time lag . NNCT weight integration strategy is introduced to determine the weight coefficients of the ensemble model . A more general method was proposed by Choi & Lee ( 2018 ) where an ensemble of LSTM models with varying sequence length ( accordingly to different datasets ) , this allows the model to be capable of handling the dynamic different real-world time series . These methods , although trying to combine between different intervals of time , indirectly try to solve the problem , and do not create a single model that predicts accurately . Changes to the sliding window algorithm were suggested by Laguna et al . ( 2011 ) who proposed a dynamic sliding window , where the size varies and changes according to the last selected window , and after is processed by Dynamic Bayesian Network . It must be noted that this type of pre-processing does not fit LSTM models since the input data shape is not static . Other sliding window methods , mostly for optimization purposes were suggested by Traub et al . ( 2019 ) ; Tangwongsan et al . ( 2017 ) . Similar mechanisms from the field of image vision have been imported into time-series analysis as an attempt to handle temporal data with many features ( such as images ) ( Donahue et al. , 2015 ) . A single model , composed of CNN and LSTM , is used to handle a time-series input , where each instance in time contains many features . In this type of model , time series data is pre-processed by CNN to extract a fixed meaningful vector of the input . We note that unlike this type of model which deals with short window size and many features , this paper deals with long window size . 4 METHODS . In this section we describe how the input is processed for the LSTM model . Data is supplied as a list of time records , where for each time record multiple variables may be available . The data is fed in multiple cycles , where in each cycle only data from a specific time window is used . 4.1 LSTM INPUT . The LSTM architecture accepts its data as a series of timestamps , each can be associated with many features . The following process is employed to allow a time series to be given as input to LSTM . For a single input , we select a window in time and consider the data in this window to predict value of our predicted variable in a constant distance in the future , also called Prediction Horizon ( PH ) . For example , an 8-hour window can be used to predict value that is a 4 hours ahead of the end of that window ( Figure 2 ) . We also note that the figure show a usage of one feature only , when many features could be used in parallel . A relevant window size may contain hundreds of samples , and is too large for an LSTM . To lower the input size , many papers suggest aggregating the windows into larger time interval , each is represented by the average value of all samples in the interval . For example , if the window size is 3 hours and the interval size is 1 hour , a single input to the LSTM is 3 vectors each is an average of 1 hour . The next input to the LSTM is generated by sliding the window by a certain time period , termed a step ( Figure 2 ) . The prediction result can be either a regression , namely an attempt to predict the value , or it can be a classification problem such as predicting that a value will rise above a certain threshold . 4.2 WINDOW PARTITIONING . We suggest to model aggregation as a partition of an interval ( time window ) , as defined in Equation 5 , where x0 and xn are the boundaries of the window , xn−x0 is the window size , and [ xi , xi+1 ] is a sub-interval of the partition . x0 < x1 < x2 < ... < xn ( 5 ) Since each subinterval in time holds a countable number of samples , we will also use the term bin for a subinterval , and use the term bin size for the number of samples in the sub-interval . We will refer to the partition by the sequence of bin sizes ; for example , if the window holds 12 samples , { 3,4,5 } is a partition into three subintervals and the number of samples in the three subintervals is 3 , 4 , and 5 . The common practice ( Farhi et al. , 2021 ; Li et al. , 2017 ; Yu et al. , 2017 ; Petersen et al. , 2019 ; Zheng et al. , 2020 ) is to use a uniform partitioning , namely xi+1 − xi = xj+1 − xj , ∀i , j . We suggest here to use a non-uniform partitioning . 4.3 EXPONENTIAL PARTITIONING . As was explained in 2 , we observe that the data with higher importance is the closer to the present . Thus , we suggest the Exponential partitioning where the bin size grows as we use data deeper in the past . Formally Equation 6 defines the bin sizes of an exponential partitioning . This is done until the penultimate bin , where the last bin holds the reminder of the window . Figure 3 , shows an example of partitioning process , where the window size is 6 records and a list of bins is { 1 , 2 , 3 } . Table 1 shows some of the partitioning we used in the paper and their exponential parameters when applicable . Partition number 0 is the common uniform partition ( uniform baseline ) and partition number 1 is the case where the last n samples are taken as singletons and there is no aggregation at all ( simple baseline ) – both are used as baselines on our experiments . Partition number 2 takes the n − 1 last samples as singletons and aggregates the rest in one bin . This partition is important to understand whether the rest of the history is meaningful where compared to no aggregation ( partition number 1 ) We show in Section 5.2 the impact of aggregating the window size ’ s reminder is significant . Partition number 3 is a linear partitioning ( bin sizes grow linearly ) , and it is closely resemble an Exponential partitioning with b = 1 and ε = 0.45 xi+1 − xi = bb ( 1 + ε ) ic ( 6 ) | The authors consider the problem of learning from long time series where the model (e.g. LSTM) cannot accept the full time series directly (due to memory/time constraints) and instead must accept some aggregated short form of the time series. The standard method for this is aggregation over equal-sized bins. In this paper, the authors introduce an exponential partitioning, whereby the time series is split into bins but the bin sizes increase as we move further from the current time. The rationale is that the time segments closer to the current time contain more value for future predictions and thus would benefit from aggregation over shorter time scales. The authors test the approach for a few different aggregation functions (mean/median/min/max) and show good improvement of the proposed method compared with the simple baseline. | SP:62b048f231f10484a99a1a999d72b5307104ae7c |
The Uncanny Similarity of Recurrence and Depth | 1 INTRODUCTION . It is well-known that adding depth to neural architectures can often enhance performance on hard problems ( He et al. , 2016 ; Huang et al. , 2017 ) . State-of-the-art models contain hundreds of distinct layers ( Tan & Le , 2019 ; Brock et al. , 2021 ) . However , it is not obvious that recurrent networks can experience performance boosts by conducting additional iterations , since this does not add any parameters . On the other hand , increasing the number of iterations allows the network to engage in additional processing . In this work , we refer to the number of sequential layers ( possible not distinct ) as effective depth . While it might seem that the addition of new parameters is a key factor in the behavior of deep architectures , we show that recurrent networks can exhibit improved behavior , closely mirroring that of deep feed-forward models , simply by adding recurrence iterations ( to increase the effective depth ) and no new parameters at all . In addition to the success of very deep networks , a number of works propose plausible concrete benefits of deep models . In the generalization literature , the sharp-flat hypothesis submits that networks with more parameters , often those which are very wide or deep , are biased towards flat minima of the loss landscape which are thought to coincide with better generalization ( Keskar et al. , 2016 ; Huang et al. , 2020 ; Foret et al. , 2020 ) . Feed-forward networks are also widely believed to have layer specialization . That is , the layers in a feed-forward network are thought to have distinct convolutional filters that build on top of one another to sequentially extract hierarchical features ( Olah et al. , 2017 ; Geirhos et al. , 2018 ) . For example , the filters in shallow layers of image classifiers may be finely tuned to detect edges and textures while later filters may be precisely tailored for detecting semantic structures such as noses and eyes ( Yosinski et al. , 2015 ) . In contrast , the filters in early and deep iterations of recurrent networks have the very same parameters . Despite their lack of layer-wise specialization and despite the fact that increasing the number of recurrences does not increase the parameter count , we find that recurrent networks can emulate both the generalization performance and the hierarchical structure of deep feed-forward networks , and the relationship between depth and performance is similar regardless of whether recurrence or distinct layers are used . Our contributions can be summarized as follows : • We show that image classification accuracy changes with depth in remarkably similar ways for both recurrent and feed-forward networks . • We introduce datasets of mazes , a sequential reasoning task , on which we show the same boosts in performance by adding depth to recurrent and to feed-forward models . • With optimization based feature visualizations , we show that recurrent and feed-forward networks extract the very same types of features at different depths . 1.1 RELATED WORKS . Recurrent networks are typically used to handle sequential inputs of arbitrary length , for example in text classification , stock price prediction , and protein structure prediction ( Lai et al. , 2015 ; Borovkova & Tsiamas , 2019 ; Goldblum et al. , 2020 ; Baldi & Pollastri , 2003 ) . We instead study the use of recurrent layers in place of sequential layers in convolutional networks and on non-sequential inputs , such as images . Prior work on recurrent layers , or equivalently depth-wise weight sharing , also includes studies on image segmentation and classification as well as sequence-based tasks . For example , Pinheiro & Collobert ( 2014 ) develop fast and parameter-efficient methods for segmentation using recurrent convolutional layers . Alom et al . ( 2018 ) use similar techniques for medical imaging . Also , recurrent layers have been used to improve performance on image classification benchmarks ( Liang & Hu , 2015 ) . Recent work developing transformer models for image classification shows that weight sharing can reduce the size of otherwise large models without incurring a large performance decrease ( Jaegle et al. , 2021 ) . Additionally , the architectures we study are related to weight tying . Eigen et al . ( 2013 ) explore very similar dynamics in CNNs , but they do not address MLPs or ResNets , and Boulch ( 2017 ) study weight sharing only in ResNets . More importantly , neither of those works have analysis beyond accuracy metrics , whereas we delve into what exactly is happening at various depths with feature visiualization , linear separability probes , and feature space similarity metrics . Bai et al . ( 2018 ) propose similar weight tying for sequences , and they further extend this work to include equilibrium models , where infinite depth networks are found with root-finding techniques ( Bai et al. , 2018 ; 2019 ) . Equilibrium models and neural ODEs make use of the fact that hidden states in a recurrent network can converge to a fixed point , training models with differential equation solvers or root finding algorithms ( Chen et al. , 2018 ; Bai et al. , 2019 ) . Prior work towards understanding the relationship between residual and highway networks and recurrent architectures reveals phenomena related to our study . Greff et al . ( 2016 ) present a view of highway networks wherein they iteratively refine representations . The recurrent structures we study could easily be thought of in the same way , however they are not addressed in that work . Also , Jastrzebski et al . ( 2017 ) primarily focus on deepening the understanding of iterative refinement in ResNets . While our results may strengthen the argument that ResNets are naturally doing something iterative , this is tangential to our broader claims that for several families of models depth can be achieved with distinct layers or with recurrent ones . Similarly , Liao & Poggio ( 2016 ) show that deep RNNs can be rephrased as ResNets with weight sharing and even include a study on batch normalization in recurrent layers . Our work builds on theirs to further elucidate the similarity of depth and recurrence , specifically , we carry out quantitative and qualitative comparisons between the deep features , as well as performance , of recurrent and analogous feed-forward architectures as their depth scales . We analyze a variety of additional models , including multi-layer perceptrons and convolutional architectures which do not include residual connections . Our work expands the scope of the aforementioned studies in several key ways . First , we do not focus on model compression , but we instead analyze the relationship between recurrent networks and models whose layers contain distinct parameters . Second , we use a standard neural network training process , and we study a variety of architectures . Finally , we conduct our experiments on image data , as well as a reasoning task , rather than sequences , so that our recurrent models can be viewed as standard fully-connected or residual networks but with additional weight-sharing constraints . For each family of architectures and each dataset we study , we observe various trends as depth , or equivalently the number of recurrence iterations , is increased that are consistent from recurrent to feed-forward models . These relationships are often not simple , for example classification accuracy does not vary monotonically with depth . However , the trends are consistent whether depth is added via distinct layers or with iterations . We are the first to our knowledge to make qualitative and quantitative observations that recurrence mimics depth . 2 RECURRENT ARCHITECTURES . Widely used architectures , such as ResNet and DenseNet , scale up depth in order to boost performance on benchmark image classification tasks ( He et al. , 2016 ; Huang et al. , 2017 ) . We show that this trend also holds true in networks where recurrence replaces depth . Typically , models are made deeper by adding layers with new parameters , but recurrent networks can be made deeper by recurring through modules more times without adding any parameters . To discuss this further , it is useful to define effective depth . Let a layer of a neural network be denoted by ` . Then , a p-layer feed-forward network can be defined by a function f that maps an input x to a label y where f ( x ) = ` p ◦ ` p−1 ◦ · · · ◦ ` 2 ◦ ` 1 ( x ) . In this general formulation , each member of the set { ` i } pi=1 can be a different function , including compositions of linear and nonlinear functions . The recurrent networks in this study are of the following form . f ( x ) = ` p ◦ · · · ◦ ` k+1 ◦mr ◦mr ◦ · · · ◦ ` k ◦ · · · ◦ ` 1 ( x ) ( 1 ) We let mr ( x ) = ` ( m ) q ◦ · · · ◦ ` ( m ) 1 ( x ) and call it a q-layer recurrent module , which is applied successively between the first and last layers . The effective depth of a network ( feed-forward or recurrent ) is the number of layers , not necessarily unique , composed with one another to form f . Thus , the network in Equation equation 1 has an effective depth of p+ nq , where n is the number of iterations of the recurrent module . A more concrete example is a feed-forward network with seven layers , which has the same effective depth as a recurrent model with two layers before the recurrent module , two layers after the recurrent module , and a single-layer recurrent module that runs for three iterations . See Figure 1 for a graphical representation the effective depth measurement . We train and test models of varying effective depths on ImageNet , CIFAR-10 , EMNIST , and SVHN to study the relationship between depth and recurrence ( Russakovsky et al. , 2015 ; Krizhevsky , 2009 ; Cohen et al. , 2017 ; Netzer et al. , 2011 ) . For every architecture style and every dataset , we see that depth can be emulated by recurrence . The details of the particular recurrent and feed-forward models we use in these experiments are outlined below . For specific training hyperparameters for every experiment , see Appendix A.2.1 The specific architectures we study in the context of image classification include families of multilayer perceptrons ( MLPs ) , ConvNets , and residual networks . Each recurrent model contains an initial set of layers , which project into feature space , followed by a module whose inputs and outputs have the same shape . As a result of the latter property , this module can be iteratively applied in a recurrent fashion an arbitrary number of times . The feed-forward analogues of these recurrent models instead stack several unique instances of the internal module on top of each other . In other words , our recurrent models can be considered the same as their feed-forward counterparts but with depth-wise weight sharing between each instance of the internal module . 2.1 MULTI-LAYER PERCEPTRONS . The MLPs we study are defined by the width of their internal modules which is specified per dataset in Appendix A.1 . We examine feed-forward and recurrent MLPs with effective depths from 3 to 10 . The recurrent models have non-recurrent layers at the beginning and end , and they have one layer in between that can be recurred . For example , if a recurrent MLP has effective depth five , then the model is trained and tested with three iterations of this single recurrent layer . A feed-forward MLP of depth five will have the exact same architecture , but instead with three distinct fully-connected layers between the first and last layers . All MLPs we use have ReLU activation functions between full-connected layers . 1Code for reproducing the experiments in this paper is available in the code repository at < suppressed for anonymity > . | In this work, the authors compare and contrast models wherein layer depth is replaced with equivalent number of recurrent time steps. In particular, they explore feed-forward, CNN and residual deep network wherein the intermediate layers are replaced by an equivalent recurrent block. For each architecture, the authors compare accuracy of the stacked and recurrent variants for image classification on 4 datasets- CIFAR-10, EMNIST, SVHN and ImageNet and a novel Maze task wherein the network has to assign binary labels to each image pixel (0= not a valid point in path, 1=valid point in path to solve the maze). Overall, the authors observe that across all models and tasks, the recurrent and stacked networks achieve similar performance. They also verify this with batch normalization and dilated CNNs in some tasks. Next, they investigate the number of positive activations at each recurrent step to find that filters are active/recycled across recurrent depth. They also analyze the linear classification accuracy at different depths of the stacked and recurrent CIFAR-10 feedforward model, finding comparable accuracy at each depth. Finally, they visualize filter activations at different depths for both CIFAR-10 & ImageNet, finding comparable feature maps in both architectures. | SP:7a05edd037046ce4dd9963198d71d18592346d13 |
The Uncanny Similarity of Recurrence and Depth | 1 INTRODUCTION . It is well-known that adding depth to neural architectures can often enhance performance on hard problems ( He et al. , 2016 ; Huang et al. , 2017 ) . State-of-the-art models contain hundreds of distinct layers ( Tan & Le , 2019 ; Brock et al. , 2021 ) . However , it is not obvious that recurrent networks can experience performance boosts by conducting additional iterations , since this does not add any parameters . On the other hand , increasing the number of iterations allows the network to engage in additional processing . In this work , we refer to the number of sequential layers ( possible not distinct ) as effective depth . While it might seem that the addition of new parameters is a key factor in the behavior of deep architectures , we show that recurrent networks can exhibit improved behavior , closely mirroring that of deep feed-forward models , simply by adding recurrence iterations ( to increase the effective depth ) and no new parameters at all . In addition to the success of very deep networks , a number of works propose plausible concrete benefits of deep models . In the generalization literature , the sharp-flat hypothesis submits that networks with more parameters , often those which are very wide or deep , are biased towards flat minima of the loss landscape which are thought to coincide with better generalization ( Keskar et al. , 2016 ; Huang et al. , 2020 ; Foret et al. , 2020 ) . Feed-forward networks are also widely believed to have layer specialization . That is , the layers in a feed-forward network are thought to have distinct convolutional filters that build on top of one another to sequentially extract hierarchical features ( Olah et al. , 2017 ; Geirhos et al. , 2018 ) . For example , the filters in shallow layers of image classifiers may be finely tuned to detect edges and textures while later filters may be precisely tailored for detecting semantic structures such as noses and eyes ( Yosinski et al. , 2015 ) . In contrast , the filters in early and deep iterations of recurrent networks have the very same parameters . Despite their lack of layer-wise specialization and despite the fact that increasing the number of recurrences does not increase the parameter count , we find that recurrent networks can emulate both the generalization performance and the hierarchical structure of deep feed-forward networks , and the relationship between depth and performance is similar regardless of whether recurrence or distinct layers are used . Our contributions can be summarized as follows : • We show that image classification accuracy changes with depth in remarkably similar ways for both recurrent and feed-forward networks . • We introduce datasets of mazes , a sequential reasoning task , on which we show the same boosts in performance by adding depth to recurrent and to feed-forward models . • With optimization based feature visualizations , we show that recurrent and feed-forward networks extract the very same types of features at different depths . 1.1 RELATED WORKS . Recurrent networks are typically used to handle sequential inputs of arbitrary length , for example in text classification , stock price prediction , and protein structure prediction ( Lai et al. , 2015 ; Borovkova & Tsiamas , 2019 ; Goldblum et al. , 2020 ; Baldi & Pollastri , 2003 ) . We instead study the use of recurrent layers in place of sequential layers in convolutional networks and on non-sequential inputs , such as images . Prior work on recurrent layers , or equivalently depth-wise weight sharing , also includes studies on image segmentation and classification as well as sequence-based tasks . For example , Pinheiro & Collobert ( 2014 ) develop fast and parameter-efficient methods for segmentation using recurrent convolutional layers . Alom et al . ( 2018 ) use similar techniques for medical imaging . Also , recurrent layers have been used to improve performance on image classification benchmarks ( Liang & Hu , 2015 ) . Recent work developing transformer models for image classification shows that weight sharing can reduce the size of otherwise large models without incurring a large performance decrease ( Jaegle et al. , 2021 ) . Additionally , the architectures we study are related to weight tying . Eigen et al . ( 2013 ) explore very similar dynamics in CNNs , but they do not address MLPs or ResNets , and Boulch ( 2017 ) study weight sharing only in ResNets . More importantly , neither of those works have analysis beyond accuracy metrics , whereas we delve into what exactly is happening at various depths with feature visiualization , linear separability probes , and feature space similarity metrics . Bai et al . ( 2018 ) propose similar weight tying for sequences , and they further extend this work to include equilibrium models , where infinite depth networks are found with root-finding techniques ( Bai et al. , 2018 ; 2019 ) . Equilibrium models and neural ODEs make use of the fact that hidden states in a recurrent network can converge to a fixed point , training models with differential equation solvers or root finding algorithms ( Chen et al. , 2018 ; Bai et al. , 2019 ) . Prior work towards understanding the relationship between residual and highway networks and recurrent architectures reveals phenomena related to our study . Greff et al . ( 2016 ) present a view of highway networks wherein they iteratively refine representations . The recurrent structures we study could easily be thought of in the same way , however they are not addressed in that work . Also , Jastrzebski et al . ( 2017 ) primarily focus on deepening the understanding of iterative refinement in ResNets . While our results may strengthen the argument that ResNets are naturally doing something iterative , this is tangential to our broader claims that for several families of models depth can be achieved with distinct layers or with recurrent ones . Similarly , Liao & Poggio ( 2016 ) show that deep RNNs can be rephrased as ResNets with weight sharing and even include a study on batch normalization in recurrent layers . Our work builds on theirs to further elucidate the similarity of depth and recurrence , specifically , we carry out quantitative and qualitative comparisons between the deep features , as well as performance , of recurrent and analogous feed-forward architectures as their depth scales . We analyze a variety of additional models , including multi-layer perceptrons and convolutional architectures which do not include residual connections . Our work expands the scope of the aforementioned studies in several key ways . First , we do not focus on model compression , but we instead analyze the relationship between recurrent networks and models whose layers contain distinct parameters . Second , we use a standard neural network training process , and we study a variety of architectures . Finally , we conduct our experiments on image data , as well as a reasoning task , rather than sequences , so that our recurrent models can be viewed as standard fully-connected or residual networks but with additional weight-sharing constraints . For each family of architectures and each dataset we study , we observe various trends as depth , or equivalently the number of recurrence iterations , is increased that are consistent from recurrent to feed-forward models . These relationships are often not simple , for example classification accuracy does not vary monotonically with depth . However , the trends are consistent whether depth is added via distinct layers or with iterations . We are the first to our knowledge to make qualitative and quantitative observations that recurrence mimics depth . 2 RECURRENT ARCHITECTURES . Widely used architectures , such as ResNet and DenseNet , scale up depth in order to boost performance on benchmark image classification tasks ( He et al. , 2016 ; Huang et al. , 2017 ) . We show that this trend also holds true in networks where recurrence replaces depth . Typically , models are made deeper by adding layers with new parameters , but recurrent networks can be made deeper by recurring through modules more times without adding any parameters . To discuss this further , it is useful to define effective depth . Let a layer of a neural network be denoted by ` . Then , a p-layer feed-forward network can be defined by a function f that maps an input x to a label y where f ( x ) = ` p ◦ ` p−1 ◦ · · · ◦ ` 2 ◦ ` 1 ( x ) . In this general formulation , each member of the set { ` i } pi=1 can be a different function , including compositions of linear and nonlinear functions . The recurrent networks in this study are of the following form . f ( x ) = ` p ◦ · · · ◦ ` k+1 ◦mr ◦mr ◦ · · · ◦ ` k ◦ · · · ◦ ` 1 ( x ) ( 1 ) We let mr ( x ) = ` ( m ) q ◦ · · · ◦ ` ( m ) 1 ( x ) and call it a q-layer recurrent module , which is applied successively between the first and last layers . The effective depth of a network ( feed-forward or recurrent ) is the number of layers , not necessarily unique , composed with one another to form f . Thus , the network in Equation equation 1 has an effective depth of p+ nq , where n is the number of iterations of the recurrent module . A more concrete example is a feed-forward network with seven layers , which has the same effective depth as a recurrent model with two layers before the recurrent module , two layers after the recurrent module , and a single-layer recurrent module that runs for three iterations . See Figure 1 for a graphical representation the effective depth measurement . We train and test models of varying effective depths on ImageNet , CIFAR-10 , EMNIST , and SVHN to study the relationship between depth and recurrence ( Russakovsky et al. , 2015 ; Krizhevsky , 2009 ; Cohen et al. , 2017 ; Netzer et al. , 2011 ) . For every architecture style and every dataset , we see that depth can be emulated by recurrence . The details of the particular recurrent and feed-forward models we use in these experiments are outlined below . For specific training hyperparameters for every experiment , see Appendix A.2.1 The specific architectures we study in the context of image classification include families of multilayer perceptrons ( MLPs ) , ConvNets , and residual networks . Each recurrent model contains an initial set of layers , which project into feature space , followed by a module whose inputs and outputs have the same shape . As a result of the latter property , this module can be iteratively applied in a recurrent fashion an arbitrary number of times . The feed-forward analogues of these recurrent models instead stack several unique instances of the internal module on top of each other . In other words , our recurrent models can be considered the same as their feed-forward counterparts but with depth-wise weight sharing between each instance of the internal module . 2.1 MULTI-LAYER PERCEPTRONS . The MLPs we study are defined by the width of their internal modules which is specified per dataset in Appendix A.1 . We examine feed-forward and recurrent MLPs with effective depths from 3 to 10 . The recurrent models have non-recurrent layers at the beginning and end , and they have one layer in between that can be recurred . For example , if a recurrent MLP has effective depth five , then the model is trained and tested with three iterations of this single recurrent layer . A feed-forward MLP of depth five will have the exact same architecture , but instead with three distinct fully-connected layers between the first and last layers . All MLPs we use have ReLU activation functions between full-connected layers . 1Code for reproducing the experiments in this paper is available in the code repository at < suppressed for anonymity > . | This work examines what constitutes depth for deep networks by examining inference for networks with and without distinct parameters at each layer. Sharing weights across layers defines networks that are recurrent in depth, and still compose the same number of nonlinearities, but reduce the number of parameters. Recurrent architectures of this kind challenge a common intuition about hierarchy in deep representations and so deserve analysis. The experiments in this work carry out controlled comparisons between pairs of networks with shared/unshared parameters, and measure: (1) task accuracy, (2) depth vs. receptive field, (3) activation statistics across layers, (4) discriminability of features across layers, and (5) visualization of filter responses. The tasks studied are image classification, with standard datasets like ImageNet and CIFAR-10, and a custom task concerning images of 2D mazes. The architectures control for differences between the feedforward/unshared and recurrent/shared models, but exclude standard architectures as references. The networks in these experiments are relatively less deep (at 19 or fewer layers), and differ from standard networks (like a ResNet-50) in their lack of pooling and fixed channel dimensions. As suggested by the title, the results for a given depth are indeed quite similar with or without recurrence, at least in most cases for the networks and tasks studied. In this scope, the work convincingly shows that distinct parameters are not necessary, but that does not necessarily generalize to more standard deep networks for vision, nor to other modalities of data, nor to other prediction tasks. | SP:7a05edd037046ce4dd9963198d71d18592346d13 |
The Uncanny Similarity of Recurrence and Depth | 1 INTRODUCTION . It is well-known that adding depth to neural architectures can often enhance performance on hard problems ( He et al. , 2016 ; Huang et al. , 2017 ) . State-of-the-art models contain hundreds of distinct layers ( Tan & Le , 2019 ; Brock et al. , 2021 ) . However , it is not obvious that recurrent networks can experience performance boosts by conducting additional iterations , since this does not add any parameters . On the other hand , increasing the number of iterations allows the network to engage in additional processing . In this work , we refer to the number of sequential layers ( possible not distinct ) as effective depth . While it might seem that the addition of new parameters is a key factor in the behavior of deep architectures , we show that recurrent networks can exhibit improved behavior , closely mirroring that of deep feed-forward models , simply by adding recurrence iterations ( to increase the effective depth ) and no new parameters at all . In addition to the success of very deep networks , a number of works propose plausible concrete benefits of deep models . In the generalization literature , the sharp-flat hypothesis submits that networks with more parameters , often those which are very wide or deep , are biased towards flat minima of the loss landscape which are thought to coincide with better generalization ( Keskar et al. , 2016 ; Huang et al. , 2020 ; Foret et al. , 2020 ) . Feed-forward networks are also widely believed to have layer specialization . That is , the layers in a feed-forward network are thought to have distinct convolutional filters that build on top of one another to sequentially extract hierarchical features ( Olah et al. , 2017 ; Geirhos et al. , 2018 ) . For example , the filters in shallow layers of image classifiers may be finely tuned to detect edges and textures while later filters may be precisely tailored for detecting semantic structures such as noses and eyes ( Yosinski et al. , 2015 ) . In contrast , the filters in early and deep iterations of recurrent networks have the very same parameters . Despite their lack of layer-wise specialization and despite the fact that increasing the number of recurrences does not increase the parameter count , we find that recurrent networks can emulate both the generalization performance and the hierarchical structure of deep feed-forward networks , and the relationship between depth and performance is similar regardless of whether recurrence or distinct layers are used . Our contributions can be summarized as follows : • We show that image classification accuracy changes with depth in remarkably similar ways for both recurrent and feed-forward networks . • We introduce datasets of mazes , a sequential reasoning task , on which we show the same boosts in performance by adding depth to recurrent and to feed-forward models . • With optimization based feature visualizations , we show that recurrent and feed-forward networks extract the very same types of features at different depths . 1.1 RELATED WORKS . Recurrent networks are typically used to handle sequential inputs of arbitrary length , for example in text classification , stock price prediction , and protein structure prediction ( Lai et al. , 2015 ; Borovkova & Tsiamas , 2019 ; Goldblum et al. , 2020 ; Baldi & Pollastri , 2003 ) . We instead study the use of recurrent layers in place of sequential layers in convolutional networks and on non-sequential inputs , such as images . Prior work on recurrent layers , or equivalently depth-wise weight sharing , also includes studies on image segmentation and classification as well as sequence-based tasks . For example , Pinheiro & Collobert ( 2014 ) develop fast and parameter-efficient methods for segmentation using recurrent convolutional layers . Alom et al . ( 2018 ) use similar techniques for medical imaging . Also , recurrent layers have been used to improve performance on image classification benchmarks ( Liang & Hu , 2015 ) . Recent work developing transformer models for image classification shows that weight sharing can reduce the size of otherwise large models without incurring a large performance decrease ( Jaegle et al. , 2021 ) . Additionally , the architectures we study are related to weight tying . Eigen et al . ( 2013 ) explore very similar dynamics in CNNs , but they do not address MLPs or ResNets , and Boulch ( 2017 ) study weight sharing only in ResNets . More importantly , neither of those works have analysis beyond accuracy metrics , whereas we delve into what exactly is happening at various depths with feature visiualization , linear separability probes , and feature space similarity metrics . Bai et al . ( 2018 ) propose similar weight tying for sequences , and they further extend this work to include equilibrium models , where infinite depth networks are found with root-finding techniques ( Bai et al. , 2018 ; 2019 ) . Equilibrium models and neural ODEs make use of the fact that hidden states in a recurrent network can converge to a fixed point , training models with differential equation solvers or root finding algorithms ( Chen et al. , 2018 ; Bai et al. , 2019 ) . Prior work towards understanding the relationship between residual and highway networks and recurrent architectures reveals phenomena related to our study . Greff et al . ( 2016 ) present a view of highway networks wherein they iteratively refine representations . The recurrent structures we study could easily be thought of in the same way , however they are not addressed in that work . Also , Jastrzebski et al . ( 2017 ) primarily focus on deepening the understanding of iterative refinement in ResNets . While our results may strengthen the argument that ResNets are naturally doing something iterative , this is tangential to our broader claims that for several families of models depth can be achieved with distinct layers or with recurrent ones . Similarly , Liao & Poggio ( 2016 ) show that deep RNNs can be rephrased as ResNets with weight sharing and even include a study on batch normalization in recurrent layers . Our work builds on theirs to further elucidate the similarity of depth and recurrence , specifically , we carry out quantitative and qualitative comparisons between the deep features , as well as performance , of recurrent and analogous feed-forward architectures as their depth scales . We analyze a variety of additional models , including multi-layer perceptrons and convolutional architectures which do not include residual connections . Our work expands the scope of the aforementioned studies in several key ways . First , we do not focus on model compression , but we instead analyze the relationship between recurrent networks and models whose layers contain distinct parameters . Second , we use a standard neural network training process , and we study a variety of architectures . Finally , we conduct our experiments on image data , as well as a reasoning task , rather than sequences , so that our recurrent models can be viewed as standard fully-connected or residual networks but with additional weight-sharing constraints . For each family of architectures and each dataset we study , we observe various trends as depth , or equivalently the number of recurrence iterations , is increased that are consistent from recurrent to feed-forward models . These relationships are often not simple , for example classification accuracy does not vary monotonically with depth . However , the trends are consistent whether depth is added via distinct layers or with iterations . We are the first to our knowledge to make qualitative and quantitative observations that recurrence mimics depth . 2 RECURRENT ARCHITECTURES . Widely used architectures , such as ResNet and DenseNet , scale up depth in order to boost performance on benchmark image classification tasks ( He et al. , 2016 ; Huang et al. , 2017 ) . We show that this trend also holds true in networks where recurrence replaces depth . Typically , models are made deeper by adding layers with new parameters , but recurrent networks can be made deeper by recurring through modules more times without adding any parameters . To discuss this further , it is useful to define effective depth . Let a layer of a neural network be denoted by ` . Then , a p-layer feed-forward network can be defined by a function f that maps an input x to a label y where f ( x ) = ` p ◦ ` p−1 ◦ · · · ◦ ` 2 ◦ ` 1 ( x ) . In this general formulation , each member of the set { ` i } pi=1 can be a different function , including compositions of linear and nonlinear functions . The recurrent networks in this study are of the following form . f ( x ) = ` p ◦ · · · ◦ ` k+1 ◦mr ◦mr ◦ · · · ◦ ` k ◦ · · · ◦ ` 1 ( x ) ( 1 ) We let mr ( x ) = ` ( m ) q ◦ · · · ◦ ` ( m ) 1 ( x ) and call it a q-layer recurrent module , which is applied successively between the first and last layers . The effective depth of a network ( feed-forward or recurrent ) is the number of layers , not necessarily unique , composed with one another to form f . Thus , the network in Equation equation 1 has an effective depth of p+ nq , where n is the number of iterations of the recurrent module . A more concrete example is a feed-forward network with seven layers , which has the same effective depth as a recurrent model with two layers before the recurrent module , two layers after the recurrent module , and a single-layer recurrent module that runs for three iterations . See Figure 1 for a graphical representation the effective depth measurement . We train and test models of varying effective depths on ImageNet , CIFAR-10 , EMNIST , and SVHN to study the relationship between depth and recurrence ( Russakovsky et al. , 2015 ; Krizhevsky , 2009 ; Cohen et al. , 2017 ; Netzer et al. , 2011 ) . For every architecture style and every dataset , we see that depth can be emulated by recurrence . The details of the particular recurrent and feed-forward models we use in these experiments are outlined below . For specific training hyperparameters for every experiment , see Appendix A.2.1 The specific architectures we study in the context of image classification include families of multilayer perceptrons ( MLPs ) , ConvNets , and residual networks . Each recurrent model contains an initial set of layers , which project into feature space , followed by a module whose inputs and outputs have the same shape . As a result of the latter property , this module can be iteratively applied in a recurrent fashion an arbitrary number of times . The feed-forward analogues of these recurrent models instead stack several unique instances of the internal module on top of each other . In other words , our recurrent models can be considered the same as their feed-forward counterparts but with depth-wise weight sharing between each instance of the internal module . 2.1 MULTI-LAYER PERCEPTRONS . The MLPs we study are defined by the width of their internal modules which is specified per dataset in Appendix A.1 . We examine feed-forward and recurrent MLPs with effective depths from 3 to 10 . The recurrent models have non-recurrent layers at the beginning and end , and they have one layer in between that can be recurred . For example , if a recurrent MLP has effective depth five , then the model is trained and tested with three iterations of this single recurrent layer . A feed-forward MLP of depth five will have the exact same architecture , but instead with three distinct fully-connected layers between the first and last layers . All MLPs we use have ReLU activation functions between full-connected layers . 1Code for reproducing the experiments in this paper is available in the code repository at < suppressed for anonymity > . | The paper shows that sharing the weights between inner layers of image classification networks has minimal effect on their performance: they achieve similar accuracy with significantly fewer parameters. This questions the commonly accepted view that later layers of CNNs function as more and more specialised filters. It also suggests that instead of the number of weights, the amount of computation might be the main reason behind the good performance of the deep models. Interestingly the authors use feature visualisation to show that although the weights are shared, the network still learns hierarchical features. | SP:7a05edd037046ce4dd9963198d71d18592346d13 |
Enforcing fairness in private federated learning via the modified method of differential multipliers | 1 INTRODUCTION . Machine learning requires data to build models . This data is often private and resides on users ’ devices . Federated learning ( FL ) ( McMahan et al. , 2017 ) is a strategy where multiple users ( or other entities ) collaborate in training a model under the coordination of a central server or service provider . In FL , devices share only data statistics ( e.g . gradients of the model computed from their data ) with the server , and therefore the users ’ data never leaves their devices . However , these statistics can still leak information about the users ( see Shokri et al . ( 2017 ) ; Fredrikson et al . ( 2015 ) for practical attacks recovering the users ’ identity and reconstructing the users ’ face images ) . To protect against this leakage , differential privacy ( DP ) can be provided . Differential privacy offers a mathematical guarantee on the maximal amount of information any attacker can obtain about a user after observing the released model . In practice , often ( Bhowmick et al. , 2018 ; McMahan et al. , 2018a ; b ; Truex et al. , 2019 ; Granqvist et al. , 2020 ) this guarantee is achieved by adding a certain amount of noise to the individuals ’ statistics . In this paper , federated learning with differential privacy will be referred to as private federated learning ( PFL ) . The models trained with PFL are often neural networks , since they work well in many use cases , and turn out to be resistant to the noise added for DP . These models have been successfully trained with PFL for tasks like next word prediction or speaker verification ( McMahan et al. , 2017 ; Granqvist et al. , 2020 ) . However , they are prone to perpetuating societal biases existing in the data ( Caliskan et al. , 2017 ) or to discriminate against certain groups even when the data is balanced ( Buolamwini & Gebru , 2018 ) . Moreover , when the training is differentially private , degradation in the performance of these models disproportionately impacts under-represented groups ( Bagdasaryan et al. , 2019 ) . More specifically , the accuracy of the model on minority groups is deteriorated to a larger extent than the accuracy for the majority groups . In the realm of FL , there has been some research studying how to achieve that the performance of the model is similar among devices ( Hu et al. , 2020 ; Huang et al. , 2020 ; Li et al. , 2019 ; 2021 ) . However , this notion of fairness falls short in terms of protecting users from under-represented groups falling foul of disproportionate treatment . For example , Castelnovo et al . ( 2021 , Section 3.6 ) show that a model that performs well on the majority of the users will have a good score on individual fairness metrics , even if all the users suffering from bad performance belong to the same group . Conversely , there is little work proposing solutions to enforce group fairness , i.e . that the performance is similar among users from different groups . Current work in this area is either limited to reducing demographic parity in logistic regression ( Du et al. , 2021 ) or to minimizing the largest loss across the different groups with a minimax optimization ( Mohri et al. , 2019 ) . Concurrently to this paper , Cui et al . ( 2021 ) proposed an approach to enforce group fairness in FL for general models and metrics . However , this approach does not consider DP . Moreover , most prior work does not consider the adverse effects that DP has on the models trained with private federated learning , or is restricted to logistic regression models ( Abay et al. , 2020 ) . On the other hand , work studying the trade-offs between privacy and group fairness proposes solutions that are either limited to simple models such as linear logistic regression ( Ding et al. , 2020 ) , require an oracle ( Cummings et al. , 2019 ) , scale poorly for large hypothesis classes ( Jagielski et al. , 2019 ) , or only offer privacy protection for the variable determining the group ( Tran et al. , 2021 ; Rodrı́guez-Gálvez et al. , 2021 ) . Furthermore , the aforementioned work only considers the central learning paradigm , and the techniques are not directly adaptable to FL . For all the above reasons , in this paper , we propose an algorithm to train neural networks with PFL while enforcing group fairness . We pose the problem as an optimization problem with fairness constraints and extend the modified method of differential multipliers ( MMDM ) ( Platt & Barr , 1987 ) to solve such a problem with FL and DP . Hence , the resulting algorithm ( i ) is applicable to any model that can be learned using stochastic gradient descent ( SGD ) or any of its variants , ( ii ) can be tailored to enforce the majority of the group fairness metrics , ( iii ) can consider any number of attributes determining the groups , and ( iv ) can consider both classification and regression tasks . The paper is structured as follows : in Section 2 , we review the background on differential privacy , private federated learning , the MMDM algorithm , and group fairness ; in Section 3 , we present our approach for fair private federated learning ; in Section 4 , we describe our experimental results ; and in Section 5 , we conclude with a summary and interpretation of our findings . 2 BACKGROUND . In this section , we review several aspects on the theory of private federated learning , the MMDM algorithm , and group fairness that are necessary to develop and understand the proposed algorithm . 2.1 FEDERATED LEARNING . The federated learning setting focuses on learning a model that minimizes the expected value of a loss function ` using a dataset d = ( z1 , z2 , . . . , zn ) ∈ D of n samples distributed across K users . This paper will consider models parametrized by a fixed number of parameters w ∈ Rp and differentiable loss functions ` , which includes neural networks . Since the distribution of the data samples Z is unknown and each user k is the only owner of their private dataset dk , the goal of FL is to find the parametersw ? that minimize the loss function across the samples of the users . That is , defining L ( dk , w ) : = ∑ z∈dk ` ( z , w ) , to solve w ? = argmin w∈Rp 1 n ∑K k=1 L ( dk , w ) . ( 1 ) This way , the parameters w can be learned with an approximation of SGD . McMahan et al . ( 2017 ) suggest that the central server iteratively samples m users ; they compute and send back to the server an approximation of the model ’ s gradient ∇wL ( dk , w ) ; and finally the server updates the parameters as dictated by gradient descentw ← w − 1n ∑ k η∇wL ( dk , w ) , where η is the learning rate . If the users send back the exact gradient the algorithm is known as FederatedSGD . A generalisation of this , FederatedAveraging , involves users running several local epochs of mini-batch SGD and sending up the difference . However , the method in this paper considers an optimization with fairness constraints , requiring the communication of extra information in each iteration , and therefore will extend FederatedSGD . 2.2 PRIVATE FEDERATED LEARNING . Private federated learning combines federated learning with differential privacy . Differential privacy ( Dwork et al. , 2006 ; 2014 ) provides a mathematical guarantee by restricting the amount of information that a randomized function m of a dataset d leaks about any individual . More precisely , it ensures that the probability that the output of the function m on the dataset d belongs to any set of outcomes O is close to the probability that the output of the function m applied to a neighbouring dataset d′ ( i.e . equal to d but where all samples from any individual are removed or replaced ) belongs to said set of outcomes . Formally , a randomized function m is ( , δ ) -differentially private if P [ m ( d ) ∈ O ] ≤ e P [ m ( d′ ) ∈ O ] + δ , ( 2 ) where and δ are parameters that determine the strength of the guarantee . Two useful properties of DP are that that it composes ( i.e . the combination of DP functions is DP ) and that post-processing does not undo its privacy guarantees ( Dwork et al. , 2014 ) . These properties ensure that the modifications that we will make to FederatedSGD will keep the algorithm differentially private . Typically , the functions of interest are not differentially private . For this reason , they are privatized with “ privacy mechanisms ” , which apply a random transformation to the output of the function on the dataset . A standard mechanism is the Gaussian mechanism , which adds Gaussian noise to the function ’ s output , calibrating the noise variance with the privacy parameters ( , δ ) and the maximum individual ’ s contribution to the function ’ s output measured by the ` 2 norm . In the context of FederatedSGD , the functions to privatize are the gradient estimates sent to the server . The individual ’ s contribution is the gradient computed on their data . This gradient is “ normclipped ” ( Abadi et al. , 2016 ) , i.e . it is scaled down so its ` 2 norm is at most a predetermined value C. Then , Gaussian noise is added to the sum of contributions , which is sent to the server . Applying the privacy mechanism to a sum of contributions is a form of central DP . An alternative is local DP ( Dwork et al. , 2014 ) , where the privacy mechanism is applied to the statistics before leaving the device . However , models trained with local DP often suffer from low utility ( Granqvist et al. , 2020 ) , and are thus not considered in this paper . Central DP can involve trust in the server that updates the model , or a trusted third party separated from the model , which is how DP was originally formulated . This paper instead assumes the noisy sum is computed through secure multiparty computation ( Goryczka & Xiong , 2015 ) , such as secure aggregation ( Bonawitz et al. , 2017 ) . This is a cryptographic method that ensures the server only sees the sum of contributions . A crucial limitation of secure aggregation is that it can only compute sums , so the novel method introduced in Section 3 is restricted to working only on sums of individuals ’ statistics . 2.3 THE MODIFIED METHOD OF DIFFERENTIAL MULTIPLIERS . Ultimately , our objective is to find a parametric model that minimizes a differentiable loss function and respects some fairness constraints . Thus , this subsection reviews a constrained differential optimization algorithm , the modified method of differential multipliers ( MMDM ) ( Platt & Barr , 1987 ) . This algorithm tries to find a solution to the following constrained optimization problem : w ? = argmin w∈Rp φ ( w ) s.t . g ( w ) = 0 , ( P1 ) where φ : Rp → R is the function to minimize , g ( w ) = ( g1 ( w ) , g2 ( w ) , . . . , gr ( w ) ) is the concatenation of r constraint functions , and { w ∈ Rp : g ( w ) = 0 } is the solution subspace . The algorithm consists of solving the following set of differential equations resulting from the Lagrangian of ( P1 ) with an additional quadratic penalty cg ( w ) 2 using gradient descent/ascent . This results in an algorithm that applies these updates iteratively : { λ← λ+ γg ( w ) w ← w − η ( ∇wφ ( w ) + λT∇wg ( w ) + cg ( w ) T∇wg ( w ) ) , ( 3 ) where λ ∈ Rr is a Lagrange ( or dual ) multiplier , c ∈ R+ is a damping parameter , η is the learning rate of the model parameters , and γ is the learning rate of the Lagrange multiplier . Intuitively , these updates gradually fulfill ( P1 ) . Updating the parameters ∇wφ ( w ) and ∇wg ( w ) respectively enforce function minimization and constraint ’ s satisfaction . Then , the multiplier λ and the multiplicative factor cg ( w ) control how strongly the constraints ’ violations are penalized . A desirable property of MMDM is that for small enough learning rates η , γ and large enough damping parameter c , there is a region comprising the vicinity of each constrained minimum such that if the parameters ’ initialization is in that region and the parameters remain bounded , then the algorithm converges to a constrained minimum ( Platt & Barr , 1987 ) . Intuitively , the term cg ( w ) ∇wg ( w ) enforces a quadratic shape on the optimization search space to the neighbourhood of the solution subspace , and this local behavior is stronger the larger the damping parameter c. Thus , the algorithm converges to a minimum if the parameters ’ initialization is in this locally quadratic region . | This paper considers the problem that differential privacy disproportionally degrades the performance of minority groups in the federated learning context. To mitigate this problem, the paper introduces a novel method for enforcing group fairness constraints via the modified method of differential multipliers. The paper then shows how to generalize this method to the differentially private federated learning setting. Finally, the paper empirically evaluates the method on two real-world datasets, demonstrating that it achieves high accuracy while significantly reducing various group fairness metrics. | SP:20fe7eeb611596d023223e2ad79cde940bd4f8fb |
Enforcing fairness in private federated learning via the modified method of differential multipliers | 1 INTRODUCTION . Machine learning requires data to build models . This data is often private and resides on users ’ devices . Federated learning ( FL ) ( McMahan et al. , 2017 ) is a strategy where multiple users ( or other entities ) collaborate in training a model under the coordination of a central server or service provider . In FL , devices share only data statistics ( e.g . gradients of the model computed from their data ) with the server , and therefore the users ’ data never leaves their devices . However , these statistics can still leak information about the users ( see Shokri et al . ( 2017 ) ; Fredrikson et al . ( 2015 ) for practical attacks recovering the users ’ identity and reconstructing the users ’ face images ) . To protect against this leakage , differential privacy ( DP ) can be provided . Differential privacy offers a mathematical guarantee on the maximal amount of information any attacker can obtain about a user after observing the released model . In practice , often ( Bhowmick et al. , 2018 ; McMahan et al. , 2018a ; b ; Truex et al. , 2019 ; Granqvist et al. , 2020 ) this guarantee is achieved by adding a certain amount of noise to the individuals ’ statistics . In this paper , federated learning with differential privacy will be referred to as private federated learning ( PFL ) . The models trained with PFL are often neural networks , since they work well in many use cases , and turn out to be resistant to the noise added for DP . These models have been successfully trained with PFL for tasks like next word prediction or speaker verification ( McMahan et al. , 2017 ; Granqvist et al. , 2020 ) . However , they are prone to perpetuating societal biases existing in the data ( Caliskan et al. , 2017 ) or to discriminate against certain groups even when the data is balanced ( Buolamwini & Gebru , 2018 ) . Moreover , when the training is differentially private , degradation in the performance of these models disproportionately impacts under-represented groups ( Bagdasaryan et al. , 2019 ) . More specifically , the accuracy of the model on minority groups is deteriorated to a larger extent than the accuracy for the majority groups . In the realm of FL , there has been some research studying how to achieve that the performance of the model is similar among devices ( Hu et al. , 2020 ; Huang et al. , 2020 ; Li et al. , 2019 ; 2021 ) . However , this notion of fairness falls short in terms of protecting users from under-represented groups falling foul of disproportionate treatment . For example , Castelnovo et al . ( 2021 , Section 3.6 ) show that a model that performs well on the majority of the users will have a good score on individual fairness metrics , even if all the users suffering from bad performance belong to the same group . Conversely , there is little work proposing solutions to enforce group fairness , i.e . that the performance is similar among users from different groups . Current work in this area is either limited to reducing demographic parity in logistic regression ( Du et al. , 2021 ) or to minimizing the largest loss across the different groups with a minimax optimization ( Mohri et al. , 2019 ) . Concurrently to this paper , Cui et al . ( 2021 ) proposed an approach to enforce group fairness in FL for general models and metrics . However , this approach does not consider DP . Moreover , most prior work does not consider the adverse effects that DP has on the models trained with private federated learning , or is restricted to logistic regression models ( Abay et al. , 2020 ) . On the other hand , work studying the trade-offs between privacy and group fairness proposes solutions that are either limited to simple models such as linear logistic regression ( Ding et al. , 2020 ) , require an oracle ( Cummings et al. , 2019 ) , scale poorly for large hypothesis classes ( Jagielski et al. , 2019 ) , or only offer privacy protection for the variable determining the group ( Tran et al. , 2021 ; Rodrı́guez-Gálvez et al. , 2021 ) . Furthermore , the aforementioned work only considers the central learning paradigm , and the techniques are not directly adaptable to FL . For all the above reasons , in this paper , we propose an algorithm to train neural networks with PFL while enforcing group fairness . We pose the problem as an optimization problem with fairness constraints and extend the modified method of differential multipliers ( MMDM ) ( Platt & Barr , 1987 ) to solve such a problem with FL and DP . Hence , the resulting algorithm ( i ) is applicable to any model that can be learned using stochastic gradient descent ( SGD ) or any of its variants , ( ii ) can be tailored to enforce the majority of the group fairness metrics , ( iii ) can consider any number of attributes determining the groups , and ( iv ) can consider both classification and regression tasks . The paper is structured as follows : in Section 2 , we review the background on differential privacy , private federated learning , the MMDM algorithm , and group fairness ; in Section 3 , we present our approach for fair private federated learning ; in Section 4 , we describe our experimental results ; and in Section 5 , we conclude with a summary and interpretation of our findings . 2 BACKGROUND . In this section , we review several aspects on the theory of private federated learning , the MMDM algorithm , and group fairness that are necessary to develop and understand the proposed algorithm . 2.1 FEDERATED LEARNING . The federated learning setting focuses on learning a model that minimizes the expected value of a loss function ` using a dataset d = ( z1 , z2 , . . . , zn ) ∈ D of n samples distributed across K users . This paper will consider models parametrized by a fixed number of parameters w ∈ Rp and differentiable loss functions ` , which includes neural networks . Since the distribution of the data samples Z is unknown and each user k is the only owner of their private dataset dk , the goal of FL is to find the parametersw ? that minimize the loss function across the samples of the users . That is , defining L ( dk , w ) : = ∑ z∈dk ` ( z , w ) , to solve w ? = argmin w∈Rp 1 n ∑K k=1 L ( dk , w ) . ( 1 ) This way , the parameters w can be learned with an approximation of SGD . McMahan et al . ( 2017 ) suggest that the central server iteratively samples m users ; they compute and send back to the server an approximation of the model ’ s gradient ∇wL ( dk , w ) ; and finally the server updates the parameters as dictated by gradient descentw ← w − 1n ∑ k η∇wL ( dk , w ) , where η is the learning rate . If the users send back the exact gradient the algorithm is known as FederatedSGD . A generalisation of this , FederatedAveraging , involves users running several local epochs of mini-batch SGD and sending up the difference . However , the method in this paper considers an optimization with fairness constraints , requiring the communication of extra information in each iteration , and therefore will extend FederatedSGD . 2.2 PRIVATE FEDERATED LEARNING . Private federated learning combines federated learning with differential privacy . Differential privacy ( Dwork et al. , 2006 ; 2014 ) provides a mathematical guarantee by restricting the amount of information that a randomized function m of a dataset d leaks about any individual . More precisely , it ensures that the probability that the output of the function m on the dataset d belongs to any set of outcomes O is close to the probability that the output of the function m applied to a neighbouring dataset d′ ( i.e . equal to d but where all samples from any individual are removed or replaced ) belongs to said set of outcomes . Formally , a randomized function m is ( , δ ) -differentially private if P [ m ( d ) ∈ O ] ≤ e P [ m ( d′ ) ∈ O ] + δ , ( 2 ) where and δ are parameters that determine the strength of the guarantee . Two useful properties of DP are that that it composes ( i.e . the combination of DP functions is DP ) and that post-processing does not undo its privacy guarantees ( Dwork et al. , 2014 ) . These properties ensure that the modifications that we will make to FederatedSGD will keep the algorithm differentially private . Typically , the functions of interest are not differentially private . For this reason , they are privatized with “ privacy mechanisms ” , which apply a random transformation to the output of the function on the dataset . A standard mechanism is the Gaussian mechanism , which adds Gaussian noise to the function ’ s output , calibrating the noise variance with the privacy parameters ( , δ ) and the maximum individual ’ s contribution to the function ’ s output measured by the ` 2 norm . In the context of FederatedSGD , the functions to privatize are the gradient estimates sent to the server . The individual ’ s contribution is the gradient computed on their data . This gradient is “ normclipped ” ( Abadi et al. , 2016 ) , i.e . it is scaled down so its ` 2 norm is at most a predetermined value C. Then , Gaussian noise is added to the sum of contributions , which is sent to the server . Applying the privacy mechanism to a sum of contributions is a form of central DP . An alternative is local DP ( Dwork et al. , 2014 ) , where the privacy mechanism is applied to the statistics before leaving the device . However , models trained with local DP often suffer from low utility ( Granqvist et al. , 2020 ) , and are thus not considered in this paper . Central DP can involve trust in the server that updates the model , or a trusted third party separated from the model , which is how DP was originally formulated . This paper instead assumes the noisy sum is computed through secure multiparty computation ( Goryczka & Xiong , 2015 ) , such as secure aggregation ( Bonawitz et al. , 2017 ) . This is a cryptographic method that ensures the server only sees the sum of contributions . A crucial limitation of secure aggregation is that it can only compute sums , so the novel method introduced in Section 3 is restricted to working only on sums of individuals ’ statistics . 2.3 THE MODIFIED METHOD OF DIFFERENTIAL MULTIPLIERS . Ultimately , our objective is to find a parametric model that minimizes a differentiable loss function and respects some fairness constraints . Thus , this subsection reviews a constrained differential optimization algorithm , the modified method of differential multipliers ( MMDM ) ( Platt & Barr , 1987 ) . This algorithm tries to find a solution to the following constrained optimization problem : w ? = argmin w∈Rp φ ( w ) s.t . g ( w ) = 0 , ( P1 ) where φ : Rp → R is the function to minimize , g ( w ) = ( g1 ( w ) , g2 ( w ) , . . . , gr ( w ) ) is the concatenation of r constraint functions , and { w ∈ Rp : g ( w ) = 0 } is the solution subspace . The algorithm consists of solving the following set of differential equations resulting from the Lagrangian of ( P1 ) with an additional quadratic penalty cg ( w ) 2 using gradient descent/ascent . This results in an algorithm that applies these updates iteratively : { λ← λ+ γg ( w ) w ← w − η ( ∇wφ ( w ) + λT∇wg ( w ) + cg ( w ) T∇wg ( w ) ) , ( 3 ) where λ ∈ Rr is a Lagrange ( or dual ) multiplier , c ∈ R+ is a damping parameter , η is the learning rate of the model parameters , and γ is the learning rate of the Lagrange multiplier . Intuitively , these updates gradually fulfill ( P1 ) . Updating the parameters ∇wφ ( w ) and ∇wg ( w ) respectively enforce function minimization and constraint ’ s satisfaction . Then , the multiplier λ and the multiplicative factor cg ( w ) control how strongly the constraints ’ violations are penalized . A desirable property of MMDM is that for small enough learning rates η , γ and large enough damping parameter c , there is a region comprising the vicinity of each constrained minimum such that if the parameters ’ initialization is in that region and the parameters remain bounded , then the algorithm converges to a constrained minimum ( Platt & Barr , 1987 ) . Intuitively , the term cg ( w ) ∇wg ( w ) enforces a quadratic shape on the optimization search space to the neighbourhood of the solution subspace , and this local behavior is stronger the larger the damping parameter c. Thus , the algorithm converges to a minimum if the parameters ’ initialization is in this locally quadratic region . | This paper studies the problem of training neural networks with differential privacy and fairness guarantees. The authors proposed an algorithm using a modified method of differential multipliers. In terms of group fairness, the authors focus on false negative rate parity and accuracy parity notions. They compare their proposed algorithm with federatedSGD and its variants with clipping and adding noise. | SP:20fe7eeb611596d023223e2ad79cde940bd4f8fb |
Enforcing fairness in private federated learning via the modified method of differential multipliers | 1 INTRODUCTION . Machine learning requires data to build models . This data is often private and resides on users ’ devices . Federated learning ( FL ) ( McMahan et al. , 2017 ) is a strategy where multiple users ( or other entities ) collaborate in training a model under the coordination of a central server or service provider . In FL , devices share only data statistics ( e.g . gradients of the model computed from their data ) with the server , and therefore the users ’ data never leaves their devices . However , these statistics can still leak information about the users ( see Shokri et al . ( 2017 ) ; Fredrikson et al . ( 2015 ) for practical attacks recovering the users ’ identity and reconstructing the users ’ face images ) . To protect against this leakage , differential privacy ( DP ) can be provided . Differential privacy offers a mathematical guarantee on the maximal amount of information any attacker can obtain about a user after observing the released model . In practice , often ( Bhowmick et al. , 2018 ; McMahan et al. , 2018a ; b ; Truex et al. , 2019 ; Granqvist et al. , 2020 ) this guarantee is achieved by adding a certain amount of noise to the individuals ’ statistics . In this paper , federated learning with differential privacy will be referred to as private federated learning ( PFL ) . The models trained with PFL are often neural networks , since they work well in many use cases , and turn out to be resistant to the noise added for DP . These models have been successfully trained with PFL for tasks like next word prediction or speaker verification ( McMahan et al. , 2017 ; Granqvist et al. , 2020 ) . However , they are prone to perpetuating societal biases existing in the data ( Caliskan et al. , 2017 ) or to discriminate against certain groups even when the data is balanced ( Buolamwini & Gebru , 2018 ) . Moreover , when the training is differentially private , degradation in the performance of these models disproportionately impacts under-represented groups ( Bagdasaryan et al. , 2019 ) . More specifically , the accuracy of the model on minority groups is deteriorated to a larger extent than the accuracy for the majority groups . In the realm of FL , there has been some research studying how to achieve that the performance of the model is similar among devices ( Hu et al. , 2020 ; Huang et al. , 2020 ; Li et al. , 2019 ; 2021 ) . However , this notion of fairness falls short in terms of protecting users from under-represented groups falling foul of disproportionate treatment . For example , Castelnovo et al . ( 2021 , Section 3.6 ) show that a model that performs well on the majority of the users will have a good score on individual fairness metrics , even if all the users suffering from bad performance belong to the same group . Conversely , there is little work proposing solutions to enforce group fairness , i.e . that the performance is similar among users from different groups . Current work in this area is either limited to reducing demographic parity in logistic regression ( Du et al. , 2021 ) or to minimizing the largest loss across the different groups with a minimax optimization ( Mohri et al. , 2019 ) . Concurrently to this paper , Cui et al . ( 2021 ) proposed an approach to enforce group fairness in FL for general models and metrics . However , this approach does not consider DP . Moreover , most prior work does not consider the adverse effects that DP has on the models trained with private federated learning , or is restricted to logistic regression models ( Abay et al. , 2020 ) . On the other hand , work studying the trade-offs between privacy and group fairness proposes solutions that are either limited to simple models such as linear logistic regression ( Ding et al. , 2020 ) , require an oracle ( Cummings et al. , 2019 ) , scale poorly for large hypothesis classes ( Jagielski et al. , 2019 ) , or only offer privacy protection for the variable determining the group ( Tran et al. , 2021 ; Rodrı́guez-Gálvez et al. , 2021 ) . Furthermore , the aforementioned work only considers the central learning paradigm , and the techniques are not directly adaptable to FL . For all the above reasons , in this paper , we propose an algorithm to train neural networks with PFL while enforcing group fairness . We pose the problem as an optimization problem with fairness constraints and extend the modified method of differential multipliers ( MMDM ) ( Platt & Barr , 1987 ) to solve such a problem with FL and DP . Hence , the resulting algorithm ( i ) is applicable to any model that can be learned using stochastic gradient descent ( SGD ) or any of its variants , ( ii ) can be tailored to enforce the majority of the group fairness metrics , ( iii ) can consider any number of attributes determining the groups , and ( iv ) can consider both classification and regression tasks . The paper is structured as follows : in Section 2 , we review the background on differential privacy , private federated learning , the MMDM algorithm , and group fairness ; in Section 3 , we present our approach for fair private federated learning ; in Section 4 , we describe our experimental results ; and in Section 5 , we conclude with a summary and interpretation of our findings . 2 BACKGROUND . In this section , we review several aspects on the theory of private federated learning , the MMDM algorithm , and group fairness that are necessary to develop and understand the proposed algorithm . 2.1 FEDERATED LEARNING . The federated learning setting focuses on learning a model that minimizes the expected value of a loss function ` using a dataset d = ( z1 , z2 , . . . , zn ) ∈ D of n samples distributed across K users . This paper will consider models parametrized by a fixed number of parameters w ∈ Rp and differentiable loss functions ` , which includes neural networks . Since the distribution of the data samples Z is unknown and each user k is the only owner of their private dataset dk , the goal of FL is to find the parametersw ? that minimize the loss function across the samples of the users . That is , defining L ( dk , w ) : = ∑ z∈dk ` ( z , w ) , to solve w ? = argmin w∈Rp 1 n ∑K k=1 L ( dk , w ) . ( 1 ) This way , the parameters w can be learned with an approximation of SGD . McMahan et al . ( 2017 ) suggest that the central server iteratively samples m users ; they compute and send back to the server an approximation of the model ’ s gradient ∇wL ( dk , w ) ; and finally the server updates the parameters as dictated by gradient descentw ← w − 1n ∑ k η∇wL ( dk , w ) , where η is the learning rate . If the users send back the exact gradient the algorithm is known as FederatedSGD . A generalisation of this , FederatedAveraging , involves users running several local epochs of mini-batch SGD and sending up the difference . However , the method in this paper considers an optimization with fairness constraints , requiring the communication of extra information in each iteration , and therefore will extend FederatedSGD . 2.2 PRIVATE FEDERATED LEARNING . Private federated learning combines federated learning with differential privacy . Differential privacy ( Dwork et al. , 2006 ; 2014 ) provides a mathematical guarantee by restricting the amount of information that a randomized function m of a dataset d leaks about any individual . More precisely , it ensures that the probability that the output of the function m on the dataset d belongs to any set of outcomes O is close to the probability that the output of the function m applied to a neighbouring dataset d′ ( i.e . equal to d but where all samples from any individual are removed or replaced ) belongs to said set of outcomes . Formally , a randomized function m is ( , δ ) -differentially private if P [ m ( d ) ∈ O ] ≤ e P [ m ( d′ ) ∈ O ] + δ , ( 2 ) where and δ are parameters that determine the strength of the guarantee . Two useful properties of DP are that that it composes ( i.e . the combination of DP functions is DP ) and that post-processing does not undo its privacy guarantees ( Dwork et al. , 2014 ) . These properties ensure that the modifications that we will make to FederatedSGD will keep the algorithm differentially private . Typically , the functions of interest are not differentially private . For this reason , they are privatized with “ privacy mechanisms ” , which apply a random transformation to the output of the function on the dataset . A standard mechanism is the Gaussian mechanism , which adds Gaussian noise to the function ’ s output , calibrating the noise variance with the privacy parameters ( , δ ) and the maximum individual ’ s contribution to the function ’ s output measured by the ` 2 norm . In the context of FederatedSGD , the functions to privatize are the gradient estimates sent to the server . The individual ’ s contribution is the gradient computed on their data . This gradient is “ normclipped ” ( Abadi et al. , 2016 ) , i.e . it is scaled down so its ` 2 norm is at most a predetermined value C. Then , Gaussian noise is added to the sum of contributions , which is sent to the server . Applying the privacy mechanism to a sum of contributions is a form of central DP . An alternative is local DP ( Dwork et al. , 2014 ) , where the privacy mechanism is applied to the statistics before leaving the device . However , models trained with local DP often suffer from low utility ( Granqvist et al. , 2020 ) , and are thus not considered in this paper . Central DP can involve trust in the server that updates the model , or a trusted third party separated from the model , which is how DP was originally formulated . This paper instead assumes the noisy sum is computed through secure multiparty computation ( Goryczka & Xiong , 2015 ) , such as secure aggregation ( Bonawitz et al. , 2017 ) . This is a cryptographic method that ensures the server only sees the sum of contributions . A crucial limitation of secure aggregation is that it can only compute sums , so the novel method introduced in Section 3 is restricted to working only on sums of individuals ’ statistics . 2.3 THE MODIFIED METHOD OF DIFFERENTIAL MULTIPLIERS . Ultimately , our objective is to find a parametric model that minimizes a differentiable loss function and respects some fairness constraints . Thus , this subsection reviews a constrained differential optimization algorithm , the modified method of differential multipliers ( MMDM ) ( Platt & Barr , 1987 ) . This algorithm tries to find a solution to the following constrained optimization problem : w ? = argmin w∈Rp φ ( w ) s.t . g ( w ) = 0 , ( P1 ) where φ : Rp → R is the function to minimize , g ( w ) = ( g1 ( w ) , g2 ( w ) , . . . , gr ( w ) ) is the concatenation of r constraint functions , and { w ∈ Rp : g ( w ) = 0 } is the solution subspace . The algorithm consists of solving the following set of differential equations resulting from the Lagrangian of ( P1 ) with an additional quadratic penalty cg ( w ) 2 using gradient descent/ascent . This results in an algorithm that applies these updates iteratively : { λ← λ+ γg ( w ) w ← w − η ( ∇wφ ( w ) + λT∇wg ( w ) + cg ( w ) T∇wg ( w ) ) , ( 3 ) where λ ∈ Rr is a Lagrange ( or dual ) multiplier , c ∈ R+ is a damping parameter , η is the learning rate of the model parameters , and γ is the learning rate of the Lagrange multiplier . Intuitively , these updates gradually fulfill ( P1 ) . Updating the parameters ∇wφ ( w ) and ∇wg ( w ) respectively enforce function minimization and constraint ’ s satisfaction . Then , the multiplier λ and the multiplicative factor cg ( w ) control how strongly the constraints ’ violations are penalized . A desirable property of MMDM is that for small enough learning rates η , γ and large enough damping parameter c , there is a region comprising the vicinity of each constrained minimum such that if the parameters ’ initialization is in that region and the parameters remain bounded , then the algorithm converges to a constrained minimum ( Platt & Barr , 1987 ) . Intuitively , the term cg ( w ) ∇wg ( w ) enforces a quadratic shape on the optimization search space to the neighbourhood of the solution subspace , and this local behavior is stronger the larger the damping parameter c. Thus , the algorithm converges to a minimum if the parameters ’ initialization is in this locally quadratic region . | The fact that DP (and in particular DP-SGD) makes models unfair (e.g. disparate impact on accuracy for minor groups) is well known (Bagdasaryan et al., 2019), however it is possible to have a satisfying trade-off between these ethical measures (Jagielski et al., 2019; Cummings et al., 2019). I think this seems like an elegant solutions for forcing fairness in DP gradient optimisation trained models.The solution uses classical constrained optimisation (the modified method of differential multipliers) and directly uses an empirical estimate of the group fairness to form the differentiable constraint function. | SP:20fe7eeb611596d023223e2ad79cde940bd4f8fb |
NODE-GAM: Neural Generalized Additive Model for Interpretable Deep Learning | Deployment of machine learning models in real high-risk settings ( e.g . healthcare ) often depends not only on model ’ s accuracy but also on its fairness , robustness and interpretability . Generalized Additive Models ( GAMs ) are a class of interpretable models with a long history of use in these high-risk domains , but they lack desirable features of deep learning such as differentiability and scalability . In this work , we propose a neural GAM ( NODE-GAM ) and neural GA2M ( NODE-GA2M ) that scale well and perform better than other GAMs on large datasets , while remaining interpretable compared to other ensemble and deep learning models . We demonstrate that our models find interesting patterns in the data . Lastly , we show that we improve model accuracy via self-supervised pre-training , an improvement that is not possible for non-differentiable GAMs . 1 INTRODUCTION . As machine learning models become increasingly adopted in everyday life , we begin to require models to not just be accurate , but also satisfy other constraints such as fairness , bias discovery , and robustness under distribution shifts for high-stakes decisions ( e.g. , in healthcare , finance and criminal justice ) . These needs call for an easier ability to inspect and understand a model ’ s predictions . Generalized Additive Models ( GAMs ) ( Hastie & Tibshirani , 1990 ) have a long history of being used to detect and understand tabular data patterns in a variety of fields including medicine ( Hastie & Tibshirani , 1995 ; Izadi , 2020 ) , business ( Sapra , 2013 ) and ecology ( Pedersen et al. , 2019 ) . Recently proposed tree-based GAMs and GA2Ms models ( Lou et al. , 2013 ) further improve on original GAMs ( Spline ) having higher accuracy and better ability to discover data patterns ( Caruana et al. , 2015 ) . These models are increasingly used to detect dataset bias ( Chang et al. , 2021 ) or audit black-box models ( Tan et al. , 2018a ; b ) . As a powerful class of models , they still lack some desirable features of deep learning that made these models popular and effective , such as differentiability and scalability . In this work , we propose a deep learning version of GAM and GA2M that enjoy the benefits of both worlds . Our models are comparable to other deep learning approaches in performance on tabular data while remaining interpretable . Compared to other GAMs , our models can be optimized using GPUs and mini-batch training allowing for higher accuracy and more effective scaling on larger datasets . We also show that our models improve performance when labeled data is limited by self-supervised pretraining and finetuning , where other non-differentiable GAMs can not be applied . Several works have focused on building interpretable deep learning models that are effective for tabular data . TabNet ( Arik & Pfister , 2020 ) achieves state-of-the-art performance on tabular data while also providing feature importance per example by its attention mechanism . Although attention seems to be correlated with input importance ( Xu et al. , 2015 ) , in the worst case they might not correlate well ( Wiegreffe & Pinter , 2019 ) . Yoon et al . ( 2020 ) proposes to use self-supervised learning on tabular data and achieves state-of-the-art performance but does not address interpretability . NIT ( Tsang et al. , 2018 ) focuses on building a neural network that produces at most K-order interactions and thus include GAM and GA2M . However , NIT requires a two-stage iterative training process that requires longer computations . And their performance is slightly lower to DNNs while ours are overall on par with it . They also do not perform purification that makes GA2M graphs unique when showing them . The most relevant approaches to our work are NODE ( Popov et al. , 2019 ) and NAM ( Agarwal et al. , 2020 ) . Popov et al . ( 2019 ) developed NODE that mimics an ensemble of decision trees but permits differentiability and achieves state-of-the-art performance on tabular data . Unfortunately , NODE suffers from a lack of interpretability similarly to other ensemble and deep learning models . On the other hand , Neural Additive Model ( NAM ) whose deep learning architecture is a GAM , similar to our proposal , thus assuring interpretability . However , NAM can not model the pairwise interactions and thus do not allow GA2M . Also , because NAM builds a small feedforward net per feature , in high-dimensional datasets NAM may require large memory and computation . Finally , NAM requires training of 10s to 100s of models and ensemble them which incurs large computations and memory , while ours only trains once ; our model is also better than NAM without the ensemble ( Supp . A ) . To make our deep GAM scalable and effective , we modify NODE architecture ( Popov et al. , 2019 ) to be a GAM and GA2M , since NODE achieves state-of-the-art performance on tabular data , and its tree-like nature allows GAM to learn quick , non-linear jumps that better match patterns seen in real data ( Chang et al. , 2021 ) . We thus call our models NODE-GAM and NODE-GA2M respectively . One of our key contributions is that we design several novel gating mechanisms that gradually reduce higher-order feature interactions learned in the representation . This also enables our NODE-GAM and NODE-GA2M to automatically perform feature selection via back-propagation for both marginal and pairwise features . This is a substantial improvement on tree-based GA2M that requires an additional algorithm to select which set of pairwise feature interactions to learn ( Lou et al. , 2013 ) . Overall , our contributions can be summarized as follows : • Novel architectures for neural GAM and GA2M thus creating interpretable deep learning models . • Compared to state-of-the-art GAM methods , our NODE-GAM and NODE-GA2M achieve similar performance on medium-sized datasets while outperforming other GAMs on larger datasets . • We demonstrate that NODE-GAM and NODE-GA2M discover interesting data patterns . • Lastly , we show that NODE-GAM benefits from self-supervised learning that improves performance when labeled data is limited , and performs better than other GAMs . We foresee our novel deep learning formulation of the GAMs to be very useful in high-risk domains , such as healthcare , where GAMs have already proved to be useful but stopped short from being applied to new large data collections due to scalability or accuracy issues , as well as settings where access to labeled data is limited . Our novel approach also benefits the deep learning community by adding high accuracy interpretable models to the deep learning repertoire . 2 BACKGROUND . GAM and GA2M : GAMs and GA2Ms are interpretable by design because of their functional forms . Given an input x ∈ RD , a label y , a link function g ( e.g . g is log p1−p in binary classification ) , main effects fj for each feature j , and feature interactions fjj′ , GAM and GA2M are expressed as : GAM : g ( y ) = f0 + D∑ j=1 fj ( xj ) , GA2M : g ( y ) = f0 + D∑ j=1 fj ( xj ) + D∑ j=1 ∑ j′ > j fjj′ ( xj , xj′ ) . Unlike full complexity models ( e.g . DNNs ) that have y = f ( x1 , ... , xj ) , GAMs and GA2M are interpretable because the impact of each feature fj and each feature interaction fjj′ can be visualized as a graph ( i.e . for fj , x-axis shows xj and y-axis shows fj ( xj ) ) . Humans can easily simulate how they work by reading fjs and fjj′ off different features from the graph and adding them together . GAM baselines : We compare with Explainable Boosting Machine ( EBM ) ( Nori et al. , 2019 ) that implements tree-based GAM and GA2M . We also compare with splines proposed in the 80s ( Hastie & Tibshirani , 1990 ) using Cubic splines in pygam package ( Servén & Brummitt , 2018 ) . Neural Oblivious Decision Trees ( NODEs ) : We describe NODEs for completeness and refer the readers to Popov et al . ( 2019 ) for more details . NODE consists of L layers where each layer has m differentiable oblivious decision trees ( ODT ) of equal depth C. Below we describe a single ODT . Differentiable Oblivious Decision Trees : An ODT works like a traditional decision tree except for all nodes in the same depth share the same input features and thresholds , which allows parallel computation and makes it suitable for deep learning . Specifically , an ODT of depth C compares C chosen input feature to C thresholds , and returns one of the 2C possible responses . Mathmatically , for feature functions F c which choose what features to split , splitting thresholds bc , and a response vector R ∈ R2C , the tree output h ( x ) is defined as : h ( x ) = R · ( [ I ( F 1 ( x ) ≤ b1 ) I ( F 1 ( x ) > b1 ) ] ⊗ [ I ( F 2 ( x ) ≤ b2 ) I ( F 2 ( x ) > b2 ) ] ⊗ · · · ⊗ [ I ( FC ( x ) ≤ bC ) I ( FC ( x ) > bC ) ] ) ( 1 ) Here I is the indicator function , ⊗ is the outer product , and · is the inner product . Both feature functions F c and I prevent differentiability . To make them differentiable , Popov et al . ( 2019 ) replace F c ( x ) as a weighted sum of features : F c ( x ) = D∑ j=1 xjentmaxα ( F c ) j = x · entmaxα ( F c ) . ( 2 ) Here F c ∈ RD are the logits for which features to choose , and entmaxα ( Peters et al. , 2019 ) is the entmax transformation which works like a sparse version of softmax such that the sum of the output equals to 1 . They also replace the I with entmoid which works like a sparse sigmoid that has output values between 0 and 1 . Since all operations are differentiable ( entmax , entmoid , outer and inner products ) , the ODT is differentiable . Stacking trees into deep layers : Popov et al . ( 2019 ) follow the design similar to DenseNet where all tree outputs h ( x ) from previous layers ( each layer consists of total I trees ) become the inputs to the next layer . For input features x , the inputs xl to each layer l becomes : x1 = x , xl = [ x , h1 ( x1 ) , ... , h ( l−1 ) ( x ( l−1 ) ) ] for l > 1 . ( 3 ) And the final output of the model ŷ ( x ) is the average of all tree outputs h1 , ... , hL of all L layers : ŷ ( x ) = 1 LI L∑ l=1 I∑ i=1 hli ( x l ) ( 4 ) 3 OUR MODEL DESIGN . GAM design : See Supp . B for a complete pseudo code . To make NODE a GAM , we make three key changes to avoid any feature interactions in the architecture ( Fig . 1 ) . First , instead of letting F c ( x ) be a weighted sum of features ( Eq . 2 ) , we make it only pick 1 feature . We introduce a temperature annealing parameter T that linearly decreases from 1 to 0 for the first S learning steps to make entmaxα ( F c/T ) gradually become one-hot : F c ( x ) = x · entmaxα ( F c/T ) , T S steps−−−−→ 0 . ( 5 ) Second , within each tree , we make the logits F c the same across depth C i.e . F 1 = · · · = FC = F to avoid any feature interaction within a tree . Third , we avoid the DenseNet connection between two trees that focus on different features j , j′ , since they create feature interactions between features j and j′ if two trees connect . Thus we introduce a gate that only allows connections between trees that take the same features . Let Gi = entmaxα ( Fi/T ) of the tree i . For tree i in layer l and another tree î in layer l̂ for l̂ < l , the gating weight gl̂ii and the feature function Fli for tree i become : gl̂ii = Gî ·Gi , Fli ( x ) = x ·Gi + l−1∑ l̂=1 I∑ î=1 hl̂̂i ( x ) gl̂ii . ( 6 ) Since G becomes gradually one-hot by Eq . 5 , after S steps gîi would only become 1 when Gî = Gi and 0 otherwise . This enforces no feature interaction between tree connections . Attention-based GAMs ( AB-GAMs ) : To make the above GAM more expressive , we add an attention weight al̂ii in the feature function Fli ( x ) to decide which previous tree to focus on : Fli ( x ) = D∑ j=1 xjGij + l−1∑ l̂=1 I∑ î=1 hl̂̂i ( x ) gl̂iial̂ii where l−1∑ l̂=1 I∑ î=1 gl̂iial̂ii = 1 . ( 7 ) To achieve this , we introduce attention logits Ali for each tree i that after entmax it produces al̂ii : al̂ii = gl̂iientmaxα ( log ( gi ) +Ali ) î . ( 8 ) This forces the attention of a tree i that ∑ î al̂ii = 1 for all î that gl̂ii = 1 and al̂ii = 0 when gl̂ii = 0 . The attention logits A requires a large matrix size [ I , ( l−1 ) I ] for each layer l > 1 which explodes the memory . We instead make A as the inner product of two smaller matrices such that A = BC where B is of size [ I , E ] and C is of size [ E , ( l − 1 ) I ] , where E is a hyperparameter for the embedding dimension of the attention . Last Linear layer : Lastly , instead of averaging the outputs of all trees as the output of the model ( Eq . 4 ) , we add the last linear layer to be a weighted sum of all outputs : ŷ ( x ) = L∑ l=1 I∑ i=1 hli ( xl ) wli . ( 9 ) Note that in self-supervised learning , wli has multiple output heads to predict multiple tasks . Regularization : We also include other changes that improves performance . First , we add Dropout ( rate p1 ) on the outputs of trees hli ( xl ) , and Dropout ( rate p2 ) on the final weights wli . Also , to increase diversity of trees , each tree can only model on a random subset of features ( η ) , an idea similar to Random Forest . We also add an ` 2 penalization ( λ ) on hli ( xl ) . In binary classification task where labels y are imbalanced between class 0 and 1 , we set a constant as log p ( y ) 1−p ( y ) that is added to the final output of the model such that after sigmoid it becomes the p ( y ) if the output of the model is 0 . We find it ’ s crucial for ` 2 penalization to work since ` 2 induces the model to output 0 . NODE-GA2Ms — extending NODE-GAMs to two-way interactions : To allow two-way interactions , for each tree we introduce two logits F 1 and F 2 instead of just one , and let F c = F ( c−1 ) mod 2+1 for c > 2 ; this allows at most 2 features to interact within each tree ( Fig . 7 ) . Besides temperature annealing ( Eq . 5 ) , we make the gating weights gîi = 1 only if the combination of F 1 , F 2 is the same between tree î and i ( i.e . both trees î and i focus on the same 2 features ) . We set gîi as : gîi = min ( ( G 1 i ·G1î ) × ( G 2 i ·G2î ) + ( G 1 i ·G2î ) × ( G 2 i ·G1î ) , 1 ) . ( 10 ) We cap the value at 1 to avoid uneven amplifications as gîi = 2 when G 1 i = G 2 i = G 1 î = G2 î . Data Preprocessing and Hyperparameters : We follow Popov et al . ( 2019 ) to do target encoding for categorical features , and do quantile transform for all features to Gaussian distribution ( we find Gaussian works better than Uniform ) . We use random search to search the architecture space for NODE , NODE-GAM and NODE-GA2M . We use QHAdam ( Ma & Yarats , 2018 ) and average the most recent 5 checkpoints ( Izmailov et al. , 2018 ) . In addition , we adopt learning rate warmup ( Goyal et al. , 2017 ) , and do early stopping and learning rate decay on the plateau . More details in Supp . F. Extracting shape graphs from GAMs : We follow Chang et al . ( 2021 ) to implement a function that extracts main effects fj from any GAM model including NODE-GAM , Spline and EBM . The main idea is to take the difference between the model ’ s outputs of two examples ( x1 , x2 ) that have the same values except for feature j . Since the intercept and other main effects are canceled out when taking the difference , the difference f ( x2 ) − f ( x1 ) is equal to fj ( x2j ) − fj ( x1j ) . If we query all the unique values of xj , we get all values of fj relative to fj ( x1j ) . Then we center the graph of fj by setting the average of fj ( xj ) across the dataset as 0 and add the average to the intercept term f0 . Extracting shape graphs from GA2Ms : Designing a black box function to extract from any GA2M is non-trivial , as each changed feature xj would change not just main effect term fj but also every interactions ∀j′fjj′ that involve feature j . Instead , since we know which features each tree takes , we can aggregate the output of trees into corresponding main fj and interaction terms fjj′ . Note that GA2M can have many representations that result in the same function . For example , for a prediction value v associated with x2 , we can move v to the main effect f2 ( x2 ) = v , or the interaction effect f23 ( x2 , · ) = v that involves x2 . To solve this ambiguity , we adopt `` purification '' ( Lengerich et al. , 2020 ) that pushes interaction effects into main effects if possible . See Supp . C for details . | Generalized Additive Models (GAMs) are a class of interpretable models with a long history of use in these high-risk domains, but they lack desirable features of deep learning such as differentiability and scalability. The authors propose a neural GAM (NODE-GAM) and neural GA2M (NODE-GA2M) that scale well and perform better than other GAMs on large datasets, while remaining interpretable. Popov et al. (2019) developed NODE that mimics an ensemble of decision trees, but suffers from lack of interpretability similarly to other ensemble and deep learning models. Agarwal et al. (2020) developed a Neural Additive Model (NAM) whose deep learning architecture is a GAM, but does not scale well. The authors combine the above mentioned 2 approaches via a 3 step process: 1. Instead of letting the ODT feature function be a weighted sum of features, they make it pick only one feature. 2. Within each tree, they make a logit layer the same across all depths to remove interactions between features. 3. Finally, they avoid the DenseNet connection between two trees that focus on different features. The authors then output performance on 6 popular binary classification datasets (Churn, Support2, MIMIC2, MIMIC3, Income, and Credit) and 2 regression datasets (Wine and Bikeshare). Looking at the experiments, their NODE GA^2M version seems to perform similar to the compared state of the art. The authors additionally perform an ablation experiment by testing their method's semi supervised learning capabilities, show that it is able to learn on mask data and be fine tuned on a limited labeled dataset. Finally, the conclusion has arguments to support the interpretability of GAMs and to defend their model's interpretability | SP:0407c8a67836d9fd9514b7c6fe438dba9061be9b |
NODE-GAM: Neural Generalized Additive Model for Interpretable Deep Learning | Deployment of machine learning models in real high-risk settings ( e.g . healthcare ) often depends not only on model ’ s accuracy but also on its fairness , robustness and interpretability . Generalized Additive Models ( GAMs ) are a class of interpretable models with a long history of use in these high-risk domains , but they lack desirable features of deep learning such as differentiability and scalability . In this work , we propose a neural GAM ( NODE-GAM ) and neural GA2M ( NODE-GA2M ) that scale well and perform better than other GAMs on large datasets , while remaining interpretable compared to other ensemble and deep learning models . We demonstrate that our models find interesting patterns in the data . Lastly , we show that we improve model accuracy via self-supervised pre-training , an improvement that is not possible for non-differentiable GAMs . 1 INTRODUCTION . As machine learning models become increasingly adopted in everyday life , we begin to require models to not just be accurate , but also satisfy other constraints such as fairness , bias discovery , and robustness under distribution shifts for high-stakes decisions ( e.g. , in healthcare , finance and criminal justice ) . These needs call for an easier ability to inspect and understand a model ’ s predictions . Generalized Additive Models ( GAMs ) ( Hastie & Tibshirani , 1990 ) have a long history of being used to detect and understand tabular data patterns in a variety of fields including medicine ( Hastie & Tibshirani , 1995 ; Izadi , 2020 ) , business ( Sapra , 2013 ) and ecology ( Pedersen et al. , 2019 ) . Recently proposed tree-based GAMs and GA2Ms models ( Lou et al. , 2013 ) further improve on original GAMs ( Spline ) having higher accuracy and better ability to discover data patterns ( Caruana et al. , 2015 ) . These models are increasingly used to detect dataset bias ( Chang et al. , 2021 ) or audit black-box models ( Tan et al. , 2018a ; b ) . As a powerful class of models , they still lack some desirable features of deep learning that made these models popular and effective , such as differentiability and scalability . In this work , we propose a deep learning version of GAM and GA2M that enjoy the benefits of both worlds . Our models are comparable to other deep learning approaches in performance on tabular data while remaining interpretable . Compared to other GAMs , our models can be optimized using GPUs and mini-batch training allowing for higher accuracy and more effective scaling on larger datasets . We also show that our models improve performance when labeled data is limited by self-supervised pretraining and finetuning , where other non-differentiable GAMs can not be applied . Several works have focused on building interpretable deep learning models that are effective for tabular data . TabNet ( Arik & Pfister , 2020 ) achieves state-of-the-art performance on tabular data while also providing feature importance per example by its attention mechanism . Although attention seems to be correlated with input importance ( Xu et al. , 2015 ) , in the worst case they might not correlate well ( Wiegreffe & Pinter , 2019 ) . Yoon et al . ( 2020 ) proposes to use self-supervised learning on tabular data and achieves state-of-the-art performance but does not address interpretability . NIT ( Tsang et al. , 2018 ) focuses on building a neural network that produces at most K-order interactions and thus include GAM and GA2M . However , NIT requires a two-stage iterative training process that requires longer computations . And their performance is slightly lower to DNNs while ours are overall on par with it . They also do not perform purification that makes GA2M graphs unique when showing them . The most relevant approaches to our work are NODE ( Popov et al. , 2019 ) and NAM ( Agarwal et al. , 2020 ) . Popov et al . ( 2019 ) developed NODE that mimics an ensemble of decision trees but permits differentiability and achieves state-of-the-art performance on tabular data . Unfortunately , NODE suffers from a lack of interpretability similarly to other ensemble and deep learning models . On the other hand , Neural Additive Model ( NAM ) whose deep learning architecture is a GAM , similar to our proposal , thus assuring interpretability . However , NAM can not model the pairwise interactions and thus do not allow GA2M . Also , because NAM builds a small feedforward net per feature , in high-dimensional datasets NAM may require large memory and computation . Finally , NAM requires training of 10s to 100s of models and ensemble them which incurs large computations and memory , while ours only trains once ; our model is also better than NAM without the ensemble ( Supp . A ) . To make our deep GAM scalable and effective , we modify NODE architecture ( Popov et al. , 2019 ) to be a GAM and GA2M , since NODE achieves state-of-the-art performance on tabular data , and its tree-like nature allows GAM to learn quick , non-linear jumps that better match patterns seen in real data ( Chang et al. , 2021 ) . We thus call our models NODE-GAM and NODE-GA2M respectively . One of our key contributions is that we design several novel gating mechanisms that gradually reduce higher-order feature interactions learned in the representation . This also enables our NODE-GAM and NODE-GA2M to automatically perform feature selection via back-propagation for both marginal and pairwise features . This is a substantial improvement on tree-based GA2M that requires an additional algorithm to select which set of pairwise feature interactions to learn ( Lou et al. , 2013 ) . Overall , our contributions can be summarized as follows : • Novel architectures for neural GAM and GA2M thus creating interpretable deep learning models . • Compared to state-of-the-art GAM methods , our NODE-GAM and NODE-GA2M achieve similar performance on medium-sized datasets while outperforming other GAMs on larger datasets . • We demonstrate that NODE-GAM and NODE-GA2M discover interesting data patterns . • Lastly , we show that NODE-GAM benefits from self-supervised learning that improves performance when labeled data is limited , and performs better than other GAMs . We foresee our novel deep learning formulation of the GAMs to be very useful in high-risk domains , such as healthcare , where GAMs have already proved to be useful but stopped short from being applied to new large data collections due to scalability or accuracy issues , as well as settings where access to labeled data is limited . Our novel approach also benefits the deep learning community by adding high accuracy interpretable models to the deep learning repertoire . 2 BACKGROUND . GAM and GA2M : GAMs and GA2Ms are interpretable by design because of their functional forms . Given an input x ∈ RD , a label y , a link function g ( e.g . g is log p1−p in binary classification ) , main effects fj for each feature j , and feature interactions fjj′ , GAM and GA2M are expressed as : GAM : g ( y ) = f0 + D∑ j=1 fj ( xj ) , GA2M : g ( y ) = f0 + D∑ j=1 fj ( xj ) + D∑ j=1 ∑ j′ > j fjj′ ( xj , xj′ ) . Unlike full complexity models ( e.g . DNNs ) that have y = f ( x1 , ... , xj ) , GAMs and GA2M are interpretable because the impact of each feature fj and each feature interaction fjj′ can be visualized as a graph ( i.e . for fj , x-axis shows xj and y-axis shows fj ( xj ) ) . Humans can easily simulate how they work by reading fjs and fjj′ off different features from the graph and adding them together . GAM baselines : We compare with Explainable Boosting Machine ( EBM ) ( Nori et al. , 2019 ) that implements tree-based GAM and GA2M . We also compare with splines proposed in the 80s ( Hastie & Tibshirani , 1990 ) using Cubic splines in pygam package ( Servén & Brummitt , 2018 ) . Neural Oblivious Decision Trees ( NODEs ) : We describe NODEs for completeness and refer the readers to Popov et al . ( 2019 ) for more details . NODE consists of L layers where each layer has m differentiable oblivious decision trees ( ODT ) of equal depth C. Below we describe a single ODT . Differentiable Oblivious Decision Trees : An ODT works like a traditional decision tree except for all nodes in the same depth share the same input features and thresholds , which allows parallel computation and makes it suitable for deep learning . Specifically , an ODT of depth C compares C chosen input feature to C thresholds , and returns one of the 2C possible responses . Mathmatically , for feature functions F c which choose what features to split , splitting thresholds bc , and a response vector R ∈ R2C , the tree output h ( x ) is defined as : h ( x ) = R · ( [ I ( F 1 ( x ) ≤ b1 ) I ( F 1 ( x ) > b1 ) ] ⊗ [ I ( F 2 ( x ) ≤ b2 ) I ( F 2 ( x ) > b2 ) ] ⊗ · · · ⊗ [ I ( FC ( x ) ≤ bC ) I ( FC ( x ) > bC ) ] ) ( 1 ) Here I is the indicator function , ⊗ is the outer product , and · is the inner product . Both feature functions F c and I prevent differentiability . To make them differentiable , Popov et al . ( 2019 ) replace F c ( x ) as a weighted sum of features : F c ( x ) = D∑ j=1 xjentmaxα ( F c ) j = x · entmaxα ( F c ) . ( 2 ) Here F c ∈ RD are the logits for which features to choose , and entmaxα ( Peters et al. , 2019 ) is the entmax transformation which works like a sparse version of softmax such that the sum of the output equals to 1 . They also replace the I with entmoid which works like a sparse sigmoid that has output values between 0 and 1 . Since all operations are differentiable ( entmax , entmoid , outer and inner products ) , the ODT is differentiable . Stacking trees into deep layers : Popov et al . ( 2019 ) follow the design similar to DenseNet where all tree outputs h ( x ) from previous layers ( each layer consists of total I trees ) become the inputs to the next layer . For input features x , the inputs xl to each layer l becomes : x1 = x , xl = [ x , h1 ( x1 ) , ... , h ( l−1 ) ( x ( l−1 ) ) ] for l > 1 . ( 3 ) And the final output of the model ŷ ( x ) is the average of all tree outputs h1 , ... , hL of all L layers : ŷ ( x ) = 1 LI L∑ l=1 I∑ i=1 hli ( x l ) ( 4 ) 3 OUR MODEL DESIGN . GAM design : See Supp . B for a complete pseudo code . To make NODE a GAM , we make three key changes to avoid any feature interactions in the architecture ( Fig . 1 ) . First , instead of letting F c ( x ) be a weighted sum of features ( Eq . 2 ) , we make it only pick 1 feature . We introduce a temperature annealing parameter T that linearly decreases from 1 to 0 for the first S learning steps to make entmaxα ( F c/T ) gradually become one-hot : F c ( x ) = x · entmaxα ( F c/T ) , T S steps−−−−→ 0 . ( 5 ) Second , within each tree , we make the logits F c the same across depth C i.e . F 1 = · · · = FC = F to avoid any feature interaction within a tree . Third , we avoid the DenseNet connection between two trees that focus on different features j , j′ , since they create feature interactions between features j and j′ if two trees connect . Thus we introduce a gate that only allows connections between trees that take the same features . Let Gi = entmaxα ( Fi/T ) of the tree i . For tree i in layer l and another tree î in layer l̂ for l̂ < l , the gating weight gl̂ii and the feature function Fli for tree i become : gl̂ii = Gî ·Gi , Fli ( x ) = x ·Gi + l−1∑ l̂=1 I∑ î=1 hl̂̂i ( x ) gl̂ii . ( 6 ) Since G becomes gradually one-hot by Eq . 5 , after S steps gîi would only become 1 when Gî = Gi and 0 otherwise . This enforces no feature interaction between tree connections . Attention-based GAMs ( AB-GAMs ) : To make the above GAM more expressive , we add an attention weight al̂ii in the feature function Fli ( x ) to decide which previous tree to focus on : Fli ( x ) = D∑ j=1 xjGij + l−1∑ l̂=1 I∑ î=1 hl̂̂i ( x ) gl̂iial̂ii where l−1∑ l̂=1 I∑ î=1 gl̂iial̂ii = 1 . ( 7 ) To achieve this , we introduce attention logits Ali for each tree i that after entmax it produces al̂ii : al̂ii = gl̂iientmaxα ( log ( gi ) +Ali ) î . ( 8 ) This forces the attention of a tree i that ∑ î al̂ii = 1 for all î that gl̂ii = 1 and al̂ii = 0 when gl̂ii = 0 . The attention logits A requires a large matrix size [ I , ( l−1 ) I ] for each layer l > 1 which explodes the memory . We instead make A as the inner product of two smaller matrices such that A = BC where B is of size [ I , E ] and C is of size [ E , ( l − 1 ) I ] , where E is a hyperparameter for the embedding dimension of the attention . Last Linear layer : Lastly , instead of averaging the outputs of all trees as the output of the model ( Eq . 4 ) , we add the last linear layer to be a weighted sum of all outputs : ŷ ( x ) = L∑ l=1 I∑ i=1 hli ( xl ) wli . ( 9 ) Note that in self-supervised learning , wli has multiple output heads to predict multiple tasks . Regularization : We also include other changes that improves performance . First , we add Dropout ( rate p1 ) on the outputs of trees hli ( xl ) , and Dropout ( rate p2 ) on the final weights wli . Also , to increase diversity of trees , each tree can only model on a random subset of features ( η ) , an idea similar to Random Forest . We also add an ` 2 penalization ( λ ) on hli ( xl ) . In binary classification task where labels y are imbalanced between class 0 and 1 , we set a constant as log p ( y ) 1−p ( y ) that is added to the final output of the model such that after sigmoid it becomes the p ( y ) if the output of the model is 0 . We find it ’ s crucial for ` 2 penalization to work since ` 2 induces the model to output 0 . NODE-GA2Ms — extending NODE-GAMs to two-way interactions : To allow two-way interactions , for each tree we introduce two logits F 1 and F 2 instead of just one , and let F c = F ( c−1 ) mod 2+1 for c > 2 ; this allows at most 2 features to interact within each tree ( Fig . 7 ) . Besides temperature annealing ( Eq . 5 ) , we make the gating weights gîi = 1 only if the combination of F 1 , F 2 is the same between tree î and i ( i.e . both trees î and i focus on the same 2 features ) . We set gîi as : gîi = min ( ( G 1 i ·G1î ) × ( G 2 i ·G2î ) + ( G 1 i ·G2î ) × ( G 2 i ·G1î ) , 1 ) . ( 10 ) We cap the value at 1 to avoid uneven amplifications as gîi = 2 when G 1 i = G 2 i = G 1 î = G2 î . Data Preprocessing and Hyperparameters : We follow Popov et al . ( 2019 ) to do target encoding for categorical features , and do quantile transform for all features to Gaussian distribution ( we find Gaussian works better than Uniform ) . We use random search to search the architecture space for NODE , NODE-GAM and NODE-GA2M . We use QHAdam ( Ma & Yarats , 2018 ) and average the most recent 5 checkpoints ( Izmailov et al. , 2018 ) . In addition , we adopt learning rate warmup ( Goyal et al. , 2017 ) , and do early stopping and learning rate decay on the plateau . More details in Supp . F. Extracting shape graphs from GAMs : We follow Chang et al . ( 2021 ) to implement a function that extracts main effects fj from any GAM model including NODE-GAM , Spline and EBM . The main idea is to take the difference between the model ’ s outputs of two examples ( x1 , x2 ) that have the same values except for feature j . Since the intercept and other main effects are canceled out when taking the difference , the difference f ( x2 ) − f ( x1 ) is equal to fj ( x2j ) − fj ( x1j ) . If we query all the unique values of xj , we get all values of fj relative to fj ( x1j ) . Then we center the graph of fj by setting the average of fj ( xj ) across the dataset as 0 and add the average to the intercept term f0 . Extracting shape graphs from GA2Ms : Designing a black box function to extract from any GA2M is non-trivial , as each changed feature xj would change not just main effect term fj but also every interactions ∀j′fjj′ that involve feature j . Instead , since we know which features each tree takes , we can aggregate the output of trees into corresponding main fj and interaction terms fjj′ . Note that GA2M can have many representations that result in the same function . For example , for a prediction value v associated with x2 , we can move v to the main effect f2 ( x2 ) = v , or the interaction effect f23 ( x2 , · ) = v that involves x2 . To solve this ambiguity , we adopt `` purification '' ( Lengerich et al. , 2020 ) that pushes interaction effects into main effects if possible . See Supp . C for details . | - The authors develop the NODE-GAM and NODE-GA$^2$M architectures by modifying the previously-developed NODE architecture with constraints and a gating mechanism to ensure that, both within each tree and across layers, the model is only allowed to learn feature interactions of order 1 (for NODE-GAM) or 2 for (NODE-GA$^2$M). - They show that their proposed NODE-GAM and NODE-GA$^2$M architectures perform comparably to the baselines of Explainable Boosting Machines, tree-based GAM/GA$^2$M and the traditional spline-based GAMs on medium-sized datasets while outperforming them on larger datasets. They also show that NODE-GAM can benefit from self-supervised learning by pretraining a model to reconstruct the original input from a masked input. - They apply NODE-GAM and NODE-GA$^2$M to real-world datasets and showcase the patterns uncovered. | SP:0407c8a67836d9fd9514b7c6fe438dba9061be9b |
NODE-GAM: Neural Generalized Additive Model for Interpretable Deep Learning | Deployment of machine learning models in real high-risk settings ( e.g . healthcare ) often depends not only on model ’ s accuracy but also on its fairness , robustness and interpretability . Generalized Additive Models ( GAMs ) are a class of interpretable models with a long history of use in these high-risk domains , but they lack desirable features of deep learning such as differentiability and scalability . In this work , we propose a neural GAM ( NODE-GAM ) and neural GA2M ( NODE-GA2M ) that scale well and perform better than other GAMs on large datasets , while remaining interpretable compared to other ensemble and deep learning models . We demonstrate that our models find interesting patterns in the data . Lastly , we show that we improve model accuracy via self-supervised pre-training , an improvement that is not possible for non-differentiable GAMs . 1 INTRODUCTION . As machine learning models become increasingly adopted in everyday life , we begin to require models to not just be accurate , but also satisfy other constraints such as fairness , bias discovery , and robustness under distribution shifts for high-stakes decisions ( e.g. , in healthcare , finance and criminal justice ) . These needs call for an easier ability to inspect and understand a model ’ s predictions . Generalized Additive Models ( GAMs ) ( Hastie & Tibshirani , 1990 ) have a long history of being used to detect and understand tabular data patterns in a variety of fields including medicine ( Hastie & Tibshirani , 1995 ; Izadi , 2020 ) , business ( Sapra , 2013 ) and ecology ( Pedersen et al. , 2019 ) . Recently proposed tree-based GAMs and GA2Ms models ( Lou et al. , 2013 ) further improve on original GAMs ( Spline ) having higher accuracy and better ability to discover data patterns ( Caruana et al. , 2015 ) . These models are increasingly used to detect dataset bias ( Chang et al. , 2021 ) or audit black-box models ( Tan et al. , 2018a ; b ) . As a powerful class of models , they still lack some desirable features of deep learning that made these models popular and effective , such as differentiability and scalability . In this work , we propose a deep learning version of GAM and GA2M that enjoy the benefits of both worlds . Our models are comparable to other deep learning approaches in performance on tabular data while remaining interpretable . Compared to other GAMs , our models can be optimized using GPUs and mini-batch training allowing for higher accuracy and more effective scaling on larger datasets . We also show that our models improve performance when labeled data is limited by self-supervised pretraining and finetuning , where other non-differentiable GAMs can not be applied . Several works have focused on building interpretable deep learning models that are effective for tabular data . TabNet ( Arik & Pfister , 2020 ) achieves state-of-the-art performance on tabular data while also providing feature importance per example by its attention mechanism . Although attention seems to be correlated with input importance ( Xu et al. , 2015 ) , in the worst case they might not correlate well ( Wiegreffe & Pinter , 2019 ) . Yoon et al . ( 2020 ) proposes to use self-supervised learning on tabular data and achieves state-of-the-art performance but does not address interpretability . NIT ( Tsang et al. , 2018 ) focuses on building a neural network that produces at most K-order interactions and thus include GAM and GA2M . However , NIT requires a two-stage iterative training process that requires longer computations . And their performance is slightly lower to DNNs while ours are overall on par with it . They also do not perform purification that makes GA2M graphs unique when showing them . The most relevant approaches to our work are NODE ( Popov et al. , 2019 ) and NAM ( Agarwal et al. , 2020 ) . Popov et al . ( 2019 ) developed NODE that mimics an ensemble of decision trees but permits differentiability and achieves state-of-the-art performance on tabular data . Unfortunately , NODE suffers from a lack of interpretability similarly to other ensemble and deep learning models . On the other hand , Neural Additive Model ( NAM ) whose deep learning architecture is a GAM , similar to our proposal , thus assuring interpretability . However , NAM can not model the pairwise interactions and thus do not allow GA2M . Also , because NAM builds a small feedforward net per feature , in high-dimensional datasets NAM may require large memory and computation . Finally , NAM requires training of 10s to 100s of models and ensemble them which incurs large computations and memory , while ours only trains once ; our model is also better than NAM without the ensemble ( Supp . A ) . To make our deep GAM scalable and effective , we modify NODE architecture ( Popov et al. , 2019 ) to be a GAM and GA2M , since NODE achieves state-of-the-art performance on tabular data , and its tree-like nature allows GAM to learn quick , non-linear jumps that better match patterns seen in real data ( Chang et al. , 2021 ) . We thus call our models NODE-GAM and NODE-GA2M respectively . One of our key contributions is that we design several novel gating mechanisms that gradually reduce higher-order feature interactions learned in the representation . This also enables our NODE-GAM and NODE-GA2M to automatically perform feature selection via back-propagation for both marginal and pairwise features . This is a substantial improvement on tree-based GA2M that requires an additional algorithm to select which set of pairwise feature interactions to learn ( Lou et al. , 2013 ) . Overall , our contributions can be summarized as follows : • Novel architectures for neural GAM and GA2M thus creating interpretable deep learning models . • Compared to state-of-the-art GAM methods , our NODE-GAM and NODE-GA2M achieve similar performance on medium-sized datasets while outperforming other GAMs on larger datasets . • We demonstrate that NODE-GAM and NODE-GA2M discover interesting data patterns . • Lastly , we show that NODE-GAM benefits from self-supervised learning that improves performance when labeled data is limited , and performs better than other GAMs . We foresee our novel deep learning formulation of the GAMs to be very useful in high-risk domains , such as healthcare , where GAMs have already proved to be useful but stopped short from being applied to new large data collections due to scalability or accuracy issues , as well as settings where access to labeled data is limited . Our novel approach also benefits the deep learning community by adding high accuracy interpretable models to the deep learning repertoire . 2 BACKGROUND . GAM and GA2M : GAMs and GA2Ms are interpretable by design because of their functional forms . Given an input x ∈ RD , a label y , a link function g ( e.g . g is log p1−p in binary classification ) , main effects fj for each feature j , and feature interactions fjj′ , GAM and GA2M are expressed as : GAM : g ( y ) = f0 + D∑ j=1 fj ( xj ) , GA2M : g ( y ) = f0 + D∑ j=1 fj ( xj ) + D∑ j=1 ∑ j′ > j fjj′ ( xj , xj′ ) . Unlike full complexity models ( e.g . DNNs ) that have y = f ( x1 , ... , xj ) , GAMs and GA2M are interpretable because the impact of each feature fj and each feature interaction fjj′ can be visualized as a graph ( i.e . for fj , x-axis shows xj and y-axis shows fj ( xj ) ) . Humans can easily simulate how they work by reading fjs and fjj′ off different features from the graph and adding them together . GAM baselines : We compare with Explainable Boosting Machine ( EBM ) ( Nori et al. , 2019 ) that implements tree-based GAM and GA2M . We also compare with splines proposed in the 80s ( Hastie & Tibshirani , 1990 ) using Cubic splines in pygam package ( Servén & Brummitt , 2018 ) . Neural Oblivious Decision Trees ( NODEs ) : We describe NODEs for completeness and refer the readers to Popov et al . ( 2019 ) for more details . NODE consists of L layers where each layer has m differentiable oblivious decision trees ( ODT ) of equal depth C. Below we describe a single ODT . Differentiable Oblivious Decision Trees : An ODT works like a traditional decision tree except for all nodes in the same depth share the same input features and thresholds , which allows parallel computation and makes it suitable for deep learning . Specifically , an ODT of depth C compares C chosen input feature to C thresholds , and returns one of the 2C possible responses . Mathmatically , for feature functions F c which choose what features to split , splitting thresholds bc , and a response vector R ∈ R2C , the tree output h ( x ) is defined as : h ( x ) = R · ( [ I ( F 1 ( x ) ≤ b1 ) I ( F 1 ( x ) > b1 ) ] ⊗ [ I ( F 2 ( x ) ≤ b2 ) I ( F 2 ( x ) > b2 ) ] ⊗ · · · ⊗ [ I ( FC ( x ) ≤ bC ) I ( FC ( x ) > bC ) ] ) ( 1 ) Here I is the indicator function , ⊗ is the outer product , and · is the inner product . Both feature functions F c and I prevent differentiability . To make them differentiable , Popov et al . ( 2019 ) replace F c ( x ) as a weighted sum of features : F c ( x ) = D∑ j=1 xjentmaxα ( F c ) j = x · entmaxα ( F c ) . ( 2 ) Here F c ∈ RD are the logits for which features to choose , and entmaxα ( Peters et al. , 2019 ) is the entmax transformation which works like a sparse version of softmax such that the sum of the output equals to 1 . They also replace the I with entmoid which works like a sparse sigmoid that has output values between 0 and 1 . Since all operations are differentiable ( entmax , entmoid , outer and inner products ) , the ODT is differentiable . Stacking trees into deep layers : Popov et al . ( 2019 ) follow the design similar to DenseNet where all tree outputs h ( x ) from previous layers ( each layer consists of total I trees ) become the inputs to the next layer . For input features x , the inputs xl to each layer l becomes : x1 = x , xl = [ x , h1 ( x1 ) , ... , h ( l−1 ) ( x ( l−1 ) ) ] for l > 1 . ( 3 ) And the final output of the model ŷ ( x ) is the average of all tree outputs h1 , ... , hL of all L layers : ŷ ( x ) = 1 LI L∑ l=1 I∑ i=1 hli ( x l ) ( 4 ) 3 OUR MODEL DESIGN . GAM design : See Supp . B for a complete pseudo code . To make NODE a GAM , we make three key changes to avoid any feature interactions in the architecture ( Fig . 1 ) . First , instead of letting F c ( x ) be a weighted sum of features ( Eq . 2 ) , we make it only pick 1 feature . We introduce a temperature annealing parameter T that linearly decreases from 1 to 0 for the first S learning steps to make entmaxα ( F c/T ) gradually become one-hot : F c ( x ) = x · entmaxα ( F c/T ) , T S steps−−−−→ 0 . ( 5 ) Second , within each tree , we make the logits F c the same across depth C i.e . F 1 = · · · = FC = F to avoid any feature interaction within a tree . Third , we avoid the DenseNet connection between two trees that focus on different features j , j′ , since they create feature interactions between features j and j′ if two trees connect . Thus we introduce a gate that only allows connections between trees that take the same features . Let Gi = entmaxα ( Fi/T ) of the tree i . For tree i in layer l and another tree î in layer l̂ for l̂ < l , the gating weight gl̂ii and the feature function Fli for tree i become : gl̂ii = Gî ·Gi , Fli ( x ) = x ·Gi + l−1∑ l̂=1 I∑ î=1 hl̂̂i ( x ) gl̂ii . ( 6 ) Since G becomes gradually one-hot by Eq . 5 , after S steps gîi would only become 1 when Gî = Gi and 0 otherwise . This enforces no feature interaction between tree connections . Attention-based GAMs ( AB-GAMs ) : To make the above GAM more expressive , we add an attention weight al̂ii in the feature function Fli ( x ) to decide which previous tree to focus on : Fli ( x ) = D∑ j=1 xjGij + l−1∑ l̂=1 I∑ î=1 hl̂̂i ( x ) gl̂iial̂ii where l−1∑ l̂=1 I∑ î=1 gl̂iial̂ii = 1 . ( 7 ) To achieve this , we introduce attention logits Ali for each tree i that after entmax it produces al̂ii : al̂ii = gl̂iientmaxα ( log ( gi ) +Ali ) î . ( 8 ) This forces the attention of a tree i that ∑ î al̂ii = 1 for all î that gl̂ii = 1 and al̂ii = 0 when gl̂ii = 0 . The attention logits A requires a large matrix size [ I , ( l−1 ) I ] for each layer l > 1 which explodes the memory . We instead make A as the inner product of two smaller matrices such that A = BC where B is of size [ I , E ] and C is of size [ E , ( l − 1 ) I ] , where E is a hyperparameter for the embedding dimension of the attention . Last Linear layer : Lastly , instead of averaging the outputs of all trees as the output of the model ( Eq . 4 ) , we add the last linear layer to be a weighted sum of all outputs : ŷ ( x ) = L∑ l=1 I∑ i=1 hli ( xl ) wli . ( 9 ) Note that in self-supervised learning , wli has multiple output heads to predict multiple tasks . Regularization : We also include other changes that improves performance . First , we add Dropout ( rate p1 ) on the outputs of trees hli ( xl ) , and Dropout ( rate p2 ) on the final weights wli . Also , to increase diversity of trees , each tree can only model on a random subset of features ( η ) , an idea similar to Random Forest . We also add an ` 2 penalization ( λ ) on hli ( xl ) . In binary classification task where labels y are imbalanced between class 0 and 1 , we set a constant as log p ( y ) 1−p ( y ) that is added to the final output of the model such that after sigmoid it becomes the p ( y ) if the output of the model is 0 . We find it ’ s crucial for ` 2 penalization to work since ` 2 induces the model to output 0 . NODE-GA2Ms — extending NODE-GAMs to two-way interactions : To allow two-way interactions , for each tree we introduce two logits F 1 and F 2 instead of just one , and let F c = F ( c−1 ) mod 2+1 for c > 2 ; this allows at most 2 features to interact within each tree ( Fig . 7 ) . Besides temperature annealing ( Eq . 5 ) , we make the gating weights gîi = 1 only if the combination of F 1 , F 2 is the same between tree î and i ( i.e . both trees î and i focus on the same 2 features ) . We set gîi as : gîi = min ( ( G 1 i ·G1î ) × ( G 2 i ·G2î ) + ( G 1 i ·G2î ) × ( G 2 i ·G1î ) , 1 ) . ( 10 ) We cap the value at 1 to avoid uneven amplifications as gîi = 2 when G 1 i = G 2 i = G 1 î = G2 î . Data Preprocessing and Hyperparameters : We follow Popov et al . ( 2019 ) to do target encoding for categorical features , and do quantile transform for all features to Gaussian distribution ( we find Gaussian works better than Uniform ) . We use random search to search the architecture space for NODE , NODE-GAM and NODE-GA2M . We use QHAdam ( Ma & Yarats , 2018 ) and average the most recent 5 checkpoints ( Izmailov et al. , 2018 ) . In addition , we adopt learning rate warmup ( Goyal et al. , 2017 ) , and do early stopping and learning rate decay on the plateau . More details in Supp . F. Extracting shape graphs from GAMs : We follow Chang et al . ( 2021 ) to implement a function that extracts main effects fj from any GAM model including NODE-GAM , Spline and EBM . The main idea is to take the difference between the model ’ s outputs of two examples ( x1 , x2 ) that have the same values except for feature j . Since the intercept and other main effects are canceled out when taking the difference , the difference f ( x2 ) − f ( x1 ) is equal to fj ( x2j ) − fj ( x1j ) . If we query all the unique values of xj , we get all values of fj relative to fj ( x1j ) . Then we center the graph of fj by setting the average of fj ( xj ) across the dataset as 0 and add the average to the intercept term f0 . Extracting shape graphs from GA2Ms : Designing a black box function to extract from any GA2M is non-trivial , as each changed feature xj would change not just main effect term fj but also every interactions ∀j′fjj′ that involve feature j . Instead , since we know which features each tree takes , we can aggregate the output of trees into corresponding main fj and interaction terms fjj′ . Note that GA2M can have many representations that result in the same function . For example , for a prediction value v associated with x2 , we can move v to the main effect f2 ( x2 ) = v , or the interaction effect f23 ( x2 , · ) = v that involves x2 . To solve this ambiguity , we adopt `` purification '' ( Lengerich et al. , 2020 ) that pushes interaction effects into main effects if possible . See Supp . C for details . | The authors proposed novel architectures for neural GAM and GA2M, which preserves the interpretability of GAM and leveraging the deep learning architectures for performance gains. The new method was assessed on 14 different dataset which covers a wide variety of prediction tasks. The performance of methods (NODE-GAM and NODE-GA2M) were comparable with the other GAM methods. Compared to other similar methods, the proposed method has a better scale ability, and better performance on larger datasets. | SP:0407c8a67836d9fd9514b7c6fe438dba9061be9b |
Non-Denoising Forward-Time Diffusions | 1 INTRODUCTION . Denoising diffusion probabilistic modeling ( DDPM ) ( Sohl-Dickstein et al. , 2015 ; Ho et al. , 2020 ; Song et al. , 2021 ) is a recent generative modeling paradigm exhibiting strong empirical performance . Consider a dataset of N samples D = { x ( n ) } Nn=1 with empirical distribution PD . The unifying key steps underlying DDPM approaches are : ( i ) the definition of a stochastic process with initial distribution PD , whose forward-time ( noising ) dynamics progressively transform PD toward a simple data-independent distribution PZ ; ( ii ) the derivation of the backward-time ( denoising / sampling ) dynamics transforming PZ toward PD ; ( iii ) the approximation of the backward-time transitions by means of a neural network . Following the training step ( iii ) , a sample whose distribution approximates PD is drawn by ( iv ) simulating from the approximated backward-time transitions starting with a sample from PZ . Both discrete-time ( Ho et al. , 2020 ) and continuous-time ( Song et al. , 2021 ) formulations of DDPM have been pursued . This work focuses on the latter case , to which we refer as diffusion time-reversal transport ( DTRT ) . As in DTRT , dynamics are specified through diffusion processes , i.e . solutions to stochastic differential equations ( SDE ) with associated drift f ( · ) and diffusion g ( · ) coefficients . A number of approximations are involved in the aforementioned steps . Firstly , as the dynamics are defined on a finite time interval , a dependency from PD is retained through the noising process . Hence , starting with a sample from the data-independent distribution PZ in ( iv ) introduces an approximation . Secondly , while the backward-time dynamics of ( ii ) are directly available for diffusions , they are approximated by means of a neural network in ( iii ) . Thirdly , sampling in ( iv ) is achieved through a discretization on a time-grid , which introduces a discretization error . De Bortoli et al . ( 2021 , Theorem 1 ) links these approximations to the total variation distance between the distribution of the generated samples from ( iv ) and PD . In our first methodological contribution we develop a procedure for constructing diffusion processes targeting PD without relying on time-reversal arguments . The proposed transport ( coupling ) between PZ and PD is achieved by : ( 1 ) specifying a diffusion process X on [ 0 , τ ] starting from a generic x0 ; ( 2 ) conditioning X on hitting a generic xτ at time τ , thus obtaining a diffusion bridge ; ( 3 ) taking a bivariate mixture Π0 , τ of diffusion bridges over ( x0 , xτ ) with marginals Π0 = PZ and Πτ = PD , obtaining a mixture process M ; ( 4 ) matching the marginal distribution of M over [ 0 , τ ] with a diffusion process , resulting in a diffusion with initial distribution PZ and terminal distribution PD . The realized diffusion bridge mixture transport ( DBMT ) between PZ and PD is exact by construction . We thus sidestep the approximation common to all DDPM approaches due to the dependency from PD retained through the noising process . Moreover , the DBMT can be realized for almost arbitrary PZ , f ( · ) and g ( · ) . This increased flexibility is a departure from the DTRT where f ( · ) and g ( · ) need to be chosen to obtain convergence toward a simple distribution PZ . Similarly to the DTRT , achieving the DBMT requires the computation of a drift adjustment term which depends onD . For a SDE class of interest , we develop a unified and interpretable representation of DTRT and DBMT drift adjustments as simple transformations of conditional expectations over D. This novel result provides insights on the target mapping that we aim to approximate and on the quality of approximation achieved by the trained score models of Song et al . ( 2021 ) . Having defined for the DBMT a Fisher divergence objective similarly to Song et al . ( 2021 ) , we leverage on this unified representation to define two additional training objectives featuring appealing properties . In our last methodological contribution we extend the class of SDEs that can be realistically employed in computer vision applications . Specifically , computational considerations have so far restricted the transitions of the stochastic processes employed in DDPM to be fully factorials . We view images at a given resolution as taking values over a 2D lattice which discretizes the continuous coordinate system [ 0 , 1 ] 2 representing heights and widths . Diffusion processes are viewed as spatio-temporal processes with spatial support [ 0 , 1 ] 2 . Doing so , it is possible to leverage on scalable simulation and inference techniques from spatial statistics and consider more realistic diffusion transitions . This paper is structured as follows . In Section 2 we review the DTRT of Song et al . ( 2021 ) and in Section 3 we introduce the DBMT . In order to implement the DTRT and the DBMT it is necessary to specify the underlying SDE , i.e . the coefficients f ( · ) and g ( · ) . We study a class of interest in Section 4 . The unified view of drift adjustments is introduced in Section 5 . Section 6 develops the training objectives and Section 7 reviews the obtained results and finalizes the DBMT construction . In Section 8 we establish the connection with spatio-temporal processes . We conclude in Section 9 . Appendices A to D contain the theoretical framework , assumptions , proofs , and additional material . Notation and conventions : we use uppercase notation for probability distributions ( measures , laws ) and lowercase notation for densities ; each probability distribution , and corresponding density , is uniquely identified by its associated letter not by its arguments ( which are muted ) ; for example P ( dx ) is a distribution , p ( x ) is its corresponding density ; random elements are always uppercase ( an exception is made for times , always lowercase for typographical reasons ) ; if P is the distribution of a stochastic process , we use subscript notation to refer to its finite dimensional distributions ( densities with p ) , conditional or not , for some collection of times ; for example pt′|t denotes a transition density , which is understood to be a function of four arguments pt′|t ( y|x ) = f ( t , t′ , x , y ) ; δx is the delta distribution at x and ⊗ is used for product distributions ; we refer directly to a given SDE instead of referring to the diffusion process satisfying such SDE when no ambiguity arises ; we use [ a ] i and [ A ] i , j for vector and matrix indexing , A > for matrix transposition . 2 DIFFUSION TIME-REVERSAL TRANSPORT . The starting point of Song et al . ( 2021 ) is a diffusion process Y satisfying a generic D-dimensional time-inhomogenous SDE with initial distribution Y0 ∼ PD dYr = f ( Yr , r ) dr + g ( Yr , r ) dWr , ( 1 ) over noising time r ∈ [ 0 , τ ] . Thorough this paper we denote with Q the law of the diffusion solving ( 1 ) and with q the corresponding densities . Thus , let qr′|r ( y|x ) , 0 ≤ r < r′ ≤ τ , be the transition density of ( 1 ) , and let qr ( y ) , 0 < r ≤ τ , be the marginal density of ( 1 ) . As Y0 ∼ PD , we have qr ( y ) = 1 N N∑ n=1 qr|0 ( y|x ( n ) ) . ( 2 ) The dynamics of ( 1 ) over the reversed , i.e . sampling , time t = τ − r , t ∈ [ 0 , τ ] , are given by ( Anderson , 1982 ; Haussmann & Pardoux , 1986 ; Millet et al. , 1989 ) dXt = [ −f ( Xt , r ) +∇ ·G ( Xt , r ) +G ( Xt , r ) ∇Xt ln qr ( Xt ) ] dt+ g ( Xt , r ) dWt , ( 3 ) where r = τ − t is the remaining sampling time , G ( x , r ) = g ( x , r ) g ( x , r ) > and the D-dimensional vector ∇ ·G ( x , r ) is defined by [ ∇ ·G ( x , r ) ] i = ∑D j=1∇xj [ G ( x , r ) ] i , j . That is the processes Xt and Yr = Yτ−t have the same distribution . Approximating the terminal distribution Qτ of ( 1 ) , i.e . the initial distribution of ( 3 ) , with PZ , X0 is sampled from PZ and ( 3 ) is discretized and integrated over t to produce a sample Xτ approximately distributed as PD . The computation of the multiplicative drift adjustment ∇y ln qr ( y ) entering ( 3 ) , i.e . the score of the marginal density ( 2 ) , requires in principle O ( N ) operations . Let sφ ( y , r ) be a neural network for which we would like sφ ( y , r ) ≈ ∇y ln qr ( y ) . It remains to find a suitable training objective for which unbiased gradients with respect to φ can be obtained at O ( 1 ) cost with respect to the dataset size N . As qr ( y ) has a mixture representation , the identity of Vincent ( 2011 ) for Fisher divergences provides us with the desired objective for a fixed r ∈ ( 0 , τ ] LFD , DTRT ( φ , r ) = E Yr∼Qr [ ∥∥∇Yr ln qr ( Yr ) − sφ ( Yr , r ) ∥∥2 ] = E ( Y0 , Yr ) ∼Q0 , r [ ∥∥∇Yr ln qr|0 ( Yr|Y0 ) − sφ ( Yr , r ) ∥∥2 ] . ( 4 ) The key point is that an unbiased , O ( 1 ) with respect to N , mini-batch Monte Carlo ( MC ) estimator for the expectation ( 4 ) can be trivially obtained by sampling a batch Y0 ∼ PD , Yr ∼ Qr|0 ( dyr|Y0 ) , and evaluating the average loss over the batch . In order to achieve a global approximation over the whole time interval ( 0 , τ ] , Song et al . ( 2021 ) proposes uniform sampling of time r LFD , DTRT ( φ ) = E r∼U ( 0 , τ ] , ( Y0 , Yr ) ∼Q0 , r [ Rr ∥∥∇Yr ln qr|0 ( Yr|Y0 ) − sφ ( Yr , r ) ∥∥2 ] , ( 5 ) where Rr = E [ ‖∇Yr ln qr|0 ( Yr|Y0 ) ‖2 ] −1 is a regularization term . A MC estimator for ( 5 ) is constructed by augmenting the MC estimator for ( 4 ) with the additional sampling step r ∼ U ( 0 , τ ] . 3 DIFFUSION BRIDGE MIXTURE TRANSPORT . Our starting point is a generic D-dimensional time-inhomogenous SDE which , in contrast to Song et al . ( 2021 ) , is directly defined on the sampling time t ∈ [ 0 , τ ] dXt = f ( Xt , t ) dt+ g ( Xt , t ) dWt . ( 6 ) We reserve P · |0 ( · |x0 ) to denote the law of the diffusion solving ( 6 ) for a given starting value x0 and p · |0 ( · |x0 ) to denote the corresponding densities . | The paper studies the Brownian bridge formulation for diffusion-based generative models, derives theory for it, and shows connections to earlier works. Some spatial developments are also discussed. This is a theoretical paper that only has rudimentary experiments. The overall idea of Brownian Bridge diffusion is interesting, but the idea’s merits are not shown. The paper suffers from high technical complexity making it difficult to digest. | SP:2d8dcc4b9162de930d5f4376dbe9928d8f08dc4b |
Non-Denoising Forward-Time Diffusions | 1 INTRODUCTION . Denoising diffusion probabilistic modeling ( DDPM ) ( Sohl-Dickstein et al. , 2015 ; Ho et al. , 2020 ; Song et al. , 2021 ) is a recent generative modeling paradigm exhibiting strong empirical performance . Consider a dataset of N samples D = { x ( n ) } Nn=1 with empirical distribution PD . The unifying key steps underlying DDPM approaches are : ( i ) the definition of a stochastic process with initial distribution PD , whose forward-time ( noising ) dynamics progressively transform PD toward a simple data-independent distribution PZ ; ( ii ) the derivation of the backward-time ( denoising / sampling ) dynamics transforming PZ toward PD ; ( iii ) the approximation of the backward-time transitions by means of a neural network . Following the training step ( iii ) , a sample whose distribution approximates PD is drawn by ( iv ) simulating from the approximated backward-time transitions starting with a sample from PZ . Both discrete-time ( Ho et al. , 2020 ) and continuous-time ( Song et al. , 2021 ) formulations of DDPM have been pursued . This work focuses on the latter case , to which we refer as diffusion time-reversal transport ( DTRT ) . As in DTRT , dynamics are specified through diffusion processes , i.e . solutions to stochastic differential equations ( SDE ) with associated drift f ( · ) and diffusion g ( · ) coefficients . A number of approximations are involved in the aforementioned steps . Firstly , as the dynamics are defined on a finite time interval , a dependency from PD is retained through the noising process . Hence , starting with a sample from the data-independent distribution PZ in ( iv ) introduces an approximation . Secondly , while the backward-time dynamics of ( ii ) are directly available for diffusions , they are approximated by means of a neural network in ( iii ) . Thirdly , sampling in ( iv ) is achieved through a discretization on a time-grid , which introduces a discretization error . De Bortoli et al . ( 2021 , Theorem 1 ) links these approximations to the total variation distance between the distribution of the generated samples from ( iv ) and PD . In our first methodological contribution we develop a procedure for constructing diffusion processes targeting PD without relying on time-reversal arguments . The proposed transport ( coupling ) between PZ and PD is achieved by : ( 1 ) specifying a diffusion process X on [ 0 , τ ] starting from a generic x0 ; ( 2 ) conditioning X on hitting a generic xτ at time τ , thus obtaining a diffusion bridge ; ( 3 ) taking a bivariate mixture Π0 , τ of diffusion bridges over ( x0 , xτ ) with marginals Π0 = PZ and Πτ = PD , obtaining a mixture process M ; ( 4 ) matching the marginal distribution of M over [ 0 , τ ] with a diffusion process , resulting in a diffusion with initial distribution PZ and terminal distribution PD . The realized diffusion bridge mixture transport ( DBMT ) between PZ and PD is exact by construction . We thus sidestep the approximation common to all DDPM approaches due to the dependency from PD retained through the noising process . Moreover , the DBMT can be realized for almost arbitrary PZ , f ( · ) and g ( · ) . This increased flexibility is a departure from the DTRT where f ( · ) and g ( · ) need to be chosen to obtain convergence toward a simple distribution PZ . Similarly to the DTRT , achieving the DBMT requires the computation of a drift adjustment term which depends onD . For a SDE class of interest , we develop a unified and interpretable representation of DTRT and DBMT drift adjustments as simple transformations of conditional expectations over D. This novel result provides insights on the target mapping that we aim to approximate and on the quality of approximation achieved by the trained score models of Song et al . ( 2021 ) . Having defined for the DBMT a Fisher divergence objective similarly to Song et al . ( 2021 ) , we leverage on this unified representation to define two additional training objectives featuring appealing properties . In our last methodological contribution we extend the class of SDEs that can be realistically employed in computer vision applications . Specifically , computational considerations have so far restricted the transitions of the stochastic processes employed in DDPM to be fully factorials . We view images at a given resolution as taking values over a 2D lattice which discretizes the continuous coordinate system [ 0 , 1 ] 2 representing heights and widths . Diffusion processes are viewed as spatio-temporal processes with spatial support [ 0 , 1 ] 2 . Doing so , it is possible to leverage on scalable simulation and inference techniques from spatial statistics and consider more realistic diffusion transitions . This paper is structured as follows . In Section 2 we review the DTRT of Song et al . ( 2021 ) and in Section 3 we introduce the DBMT . In order to implement the DTRT and the DBMT it is necessary to specify the underlying SDE , i.e . the coefficients f ( · ) and g ( · ) . We study a class of interest in Section 4 . The unified view of drift adjustments is introduced in Section 5 . Section 6 develops the training objectives and Section 7 reviews the obtained results and finalizes the DBMT construction . In Section 8 we establish the connection with spatio-temporal processes . We conclude in Section 9 . Appendices A to D contain the theoretical framework , assumptions , proofs , and additional material . Notation and conventions : we use uppercase notation for probability distributions ( measures , laws ) and lowercase notation for densities ; each probability distribution , and corresponding density , is uniquely identified by its associated letter not by its arguments ( which are muted ) ; for example P ( dx ) is a distribution , p ( x ) is its corresponding density ; random elements are always uppercase ( an exception is made for times , always lowercase for typographical reasons ) ; if P is the distribution of a stochastic process , we use subscript notation to refer to its finite dimensional distributions ( densities with p ) , conditional or not , for some collection of times ; for example pt′|t denotes a transition density , which is understood to be a function of four arguments pt′|t ( y|x ) = f ( t , t′ , x , y ) ; δx is the delta distribution at x and ⊗ is used for product distributions ; we refer directly to a given SDE instead of referring to the diffusion process satisfying such SDE when no ambiguity arises ; we use [ a ] i and [ A ] i , j for vector and matrix indexing , A > for matrix transposition . 2 DIFFUSION TIME-REVERSAL TRANSPORT . The starting point of Song et al . ( 2021 ) is a diffusion process Y satisfying a generic D-dimensional time-inhomogenous SDE with initial distribution Y0 ∼ PD dYr = f ( Yr , r ) dr + g ( Yr , r ) dWr , ( 1 ) over noising time r ∈ [ 0 , τ ] . Thorough this paper we denote with Q the law of the diffusion solving ( 1 ) and with q the corresponding densities . Thus , let qr′|r ( y|x ) , 0 ≤ r < r′ ≤ τ , be the transition density of ( 1 ) , and let qr ( y ) , 0 < r ≤ τ , be the marginal density of ( 1 ) . As Y0 ∼ PD , we have qr ( y ) = 1 N N∑ n=1 qr|0 ( y|x ( n ) ) . ( 2 ) The dynamics of ( 1 ) over the reversed , i.e . sampling , time t = τ − r , t ∈ [ 0 , τ ] , are given by ( Anderson , 1982 ; Haussmann & Pardoux , 1986 ; Millet et al. , 1989 ) dXt = [ −f ( Xt , r ) +∇ ·G ( Xt , r ) +G ( Xt , r ) ∇Xt ln qr ( Xt ) ] dt+ g ( Xt , r ) dWt , ( 3 ) where r = τ − t is the remaining sampling time , G ( x , r ) = g ( x , r ) g ( x , r ) > and the D-dimensional vector ∇ ·G ( x , r ) is defined by [ ∇ ·G ( x , r ) ] i = ∑D j=1∇xj [ G ( x , r ) ] i , j . That is the processes Xt and Yr = Yτ−t have the same distribution . Approximating the terminal distribution Qτ of ( 1 ) , i.e . the initial distribution of ( 3 ) , with PZ , X0 is sampled from PZ and ( 3 ) is discretized and integrated over t to produce a sample Xτ approximately distributed as PD . The computation of the multiplicative drift adjustment ∇y ln qr ( y ) entering ( 3 ) , i.e . the score of the marginal density ( 2 ) , requires in principle O ( N ) operations . Let sφ ( y , r ) be a neural network for which we would like sφ ( y , r ) ≈ ∇y ln qr ( y ) . It remains to find a suitable training objective for which unbiased gradients with respect to φ can be obtained at O ( 1 ) cost with respect to the dataset size N . As qr ( y ) has a mixture representation , the identity of Vincent ( 2011 ) for Fisher divergences provides us with the desired objective for a fixed r ∈ ( 0 , τ ] LFD , DTRT ( φ , r ) = E Yr∼Qr [ ∥∥∇Yr ln qr ( Yr ) − sφ ( Yr , r ) ∥∥2 ] = E ( Y0 , Yr ) ∼Q0 , r [ ∥∥∇Yr ln qr|0 ( Yr|Y0 ) − sφ ( Yr , r ) ∥∥2 ] . ( 4 ) The key point is that an unbiased , O ( 1 ) with respect to N , mini-batch Monte Carlo ( MC ) estimator for the expectation ( 4 ) can be trivially obtained by sampling a batch Y0 ∼ PD , Yr ∼ Qr|0 ( dyr|Y0 ) , and evaluating the average loss over the batch . In order to achieve a global approximation over the whole time interval ( 0 , τ ] , Song et al . ( 2021 ) proposes uniform sampling of time r LFD , DTRT ( φ ) = E r∼U ( 0 , τ ] , ( Y0 , Yr ) ∼Q0 , r [ Rr ∥∥∇Yr ln qr|0 ( Yr|Y0 ) − sφ ( Yr , r ) ∥∥2 ] , ( 5 ) where Rr = E [ ‖∇Yr ln qr|0 ( Yr|Y0 ) ‖2 ] −1 is a regularization term . A MC estimator for ( 5 ) is constructed by augmenting the MC estimator for ( 4 ) with the additional sampling step r ∼ U ( 0 , τ ] . 3 DIFFUSION BRIDGE MIXTURE TRANSPORT . Our starting point is a generic D-dimensional time-inhomogenous SDE which , in contrast to Song et al . ( 2021 ) , is directly defined on the sampling time t ∈ [ 0 , τ ] dXt = f ( Xt , t ) dt+ g ( Xt , t ) dWt . ( 6 ) We reserve P · |0 ( · |x0 ) to denote the law of the diffusion solving ( 6 ) for a given starting value x0 and p · |0 ( · |x0 ) to denote the corresponding densities . | The paper introduces a methodological framework for generative modeling through diffusion processes without time-reversal arguments. By utilizing diffusion bridges the authors consider processes that start and end in pre-determined points $x_0$ and $a_{\tau}$. Then by extending this to mixtures of diffusion bridges they show how to transport a distribution $\Pi_0 = P_D$ to $\Pi_{\tau} = P_Z$ without time-reversal of the diffusion process. For specific classes of SDEs by drawing connections to the paradigm introduced by Song et al 2021 and provide a unified view on the drift adjustment in forward and backward SDEs. This allows for defining a time and state-dependent class probability function (given by conditional expectation) providing further insight into the inner-workings of DTRT and DBMT. The authors then introduce two other training objectives $L_{\text{FD}},L_{\text{CE}}$ and discuss their favorable properties. Finally, methods for moving beyond fully factorial noise models are presented by extending the process and the noise term from functions of time to be functions of both time and space. This allows for incorporating "priors" with better spatial dependency models more suitable for specific datasets. | SP:2d8dcc4b9162de930d5f4376dbe9928d8f08dc4b |
Non-Denoising Forward-Time Diffusions | 1 INTRODUCTION . Denoising diffusion probabilistic modeling ( DDPM ) ( Sohl-Dickstein et al. , 2015 ; Ho et al. , 2020 ; Song et al. , 2021 ) is a recent generative modeling paradigm exhibiting strong empirical performance . Consider a dataset of N samples D = { x ( n ) } Nn=1 with empirical distribution PD . The unifying key steps underlying DDPM approaches are : ( i ) the definition of a stochastic process with initial distribution PD , whose forward-time ( noising ) dynamics progressively transform PD toward a simple data-independent distribution PZ ; ( ii ) the derivation of the backward-time ( denoising / sampling ) dynamics transforming PZ toward PD ; ( iii ) the approximation of the backward-time transitions by means of a neural network . Following the training step ( iii ) , a sample whose distribution approximates PD is drawn by ( iv ) simulating from the approximated backward-time transitions starting with a sample from PZ . Both discrete-time ( Ho et al. , 2020 ) and continuous-time ( Song et al. , 2021 ) formulations of DDPM have been pursued . This work focuses on the latter case , to which we refer as diffusion time-reversal transport ( DTRT ) . As in DTRT , dynamics are specified through diffusion processes , i.e . solutions to stochastic differential equations ( SDE ) with associated drift f ( · ) and diffusion g ( · ) coefficients . A number of approximations are involved in the aforementioned steps . Firstly , as the dynamics are defined on a finite time interval , a dependency from PD is retained through the noising process . Hence , starting with a sample from the data-independent distribution PZ in ( iv ) introduces an approximation . Secondly , while the backward-time dynamics of ( ii ) are directly available for diffusions , they are approximated by means of a neural network in ( iii ) . Thirdly , sampling in ( iv ) is achieved through a discretization on a time-grid , which introduces a discretization error . De Bortoli et al . ( 2021 , Theorem 1 ) links these approximations to the total variation distance between the distribution of the generated samples from ( iv ) and PD . In our first methodological contribution we develop a procedure for constructing diffusion processes targeting PD without relying on time-reversal arguments . The proposed transport ( coupling ) between PZ and PD is achieved by : ( 1 ) specifying a diffusion process X on [ 0 , τ ] starting from a generic x0 ; ( 2 ) conditioning X on hitting a generic xτ at time τ , thus obtaining a diffusion bridge ; ( 3 ) taking a bivariate mixture Π0 , τ of diffusion bridges over ( x0 , xτ ) with marginals Π0 = PZ and Πτ = PD , obtaining a mixture process M ; ( 4 ) matching the marginal distribution of M over [ 0 , τ ] with a diffusion process , resulting in a diffusion with initial distribution PZ and terminal distribution PD . The realized diffusion bridge mixture transport ( DBMT ) between PZ and PD is exact by construction . We thus sidestep the approximation common to all DDPM approaches due to the dependency from PD retained through the noising process . Moreover , the DBMT can be realized for almost arbitrary PZ , f ( · ) and g ( · ) . This increased flexibility is a departure from the DTRT where f ( · ) and g ( · ) need to be chosen to obtain convergence toward a simple distribution PZ . Similarly to the DTRT , achieving the DBMT requires the computation of a drift adjustment term which depends onD . For a SDE class of interest , we develop a unified and interpretable representation of DTRT and DBMT drift adjustments as simple transformations of conditional expectations over D. This novel result provides insights on the target mapping that we aim to approximate and on the quality of approximation achieved by the trained score models of Song et al . ( 2021 ) . Having defined for the DBMT a Fisher divergence objective similarly to Song et al . ( 2021 ) , we leverage on this unified representation to define two additional training objectives featuring appealing properties . In our last methodological contribution we extend the class of SDEs that can be realistically employed in computer vision applications . Specifically , computational considerations have so far restricted the transitions of the stochastic processes employed in DDPM to be fully factorials . We view images at a given resolution as taking values over a 2D lattice which discretizes the continuous coordinate system [ 0 , 1 ] 2 representing heights and widths . Diffusion processes are viewed as spatio-temporal processes with spatial support [ 0 , 1 ] 2 . Doing so , it is possible to leverage on scalable simulation and inference techniques from spatial statistics and consider more realistic diffusion transitions . This paper is structured as follows . In Section 2 we review the DTRT of Song et al . ( 2021 ) and in Section 3 we introduce the DBMT . In order to implement the DTRT and the DBMT it is necessary to specify the underlying SDE , i.e . the coefficients f ( · ) and g ( · ) . We study a class of interest in Section 4 . The unified view of drift adjustments is introduced in Section 5 . Section 6 develops the training objectives and Section 7 reviews the obtained results and finalizes the DBMT construction . In Section 8 we establish the connection with spatio-temporal processes . We conclude in Section 9 . Appendices A to D contain the theoretical framework , assumptions , proofs , and additional material . Notation and conventions : we use uppercase notation for probability distributions ( measures , laws ) and lowercase notation for densities ; each probability distribution , and corresponding density , is uniquely identified by its associated letter not by its arguments ( which are muted ) ; for example P ( dx ) is a distribution , p ( x ) is its corresponding density ; random elements are always uppercase ( an exception is made for times , always lowercase for typographical reasons ) ; if P is the distribution of a stochastic process , we use subscript notation to refer to its finite dimensional distributions ( densities with p ) , conditional or not , for some collection of times ; for example pt′|t denotes a transition density , which is understood to be a function of four arguments pt′|t ( y|x ) = f ( t , t′ , x , y ) ; δx is the delta distribution at x and ⊗ is used for product distributions ; we refer directly to a given SDE instead of referring to the diffusion process satisfying such SDE when no ambiguity arises ; we use [ a ] i and [ A ] i , j for vector and matrix indexing , A > for matrix transposition . 2 DIFFUSION TIME-REVERSAL TRANSPORT . The starting point of Song et al . ( 2021 ) is a diffusion process Y satisfying a generic D-dimensional time-inhomogenous SDE with initial distribution Y0 ∼ PD dYr = f ( Yr , r ) dr + g ( Yr , r ) dWr , ( 1 ) over noising time r ∈ [ 0 , τ ] . Thorough this paper we denote with Q the law of the diffusion solving ( 1 ) and with q the corresponding densities . Thus , let qr′|r ( y|x ) , 0 ≤ r < r′ ≤ τ , be the transition density of ( 1 ) , and let qr ( y ) , 0 < r ≤ τ , be the marginal density of ( 1 ) . As Y0 ∼ PD , we have qr ( y ) = 1 N N∑ n=1 qr|0 ( y|x ( n ) ) . ( 2 ) The dynamics of ( 1 ) over the reversed , i.e . sampling , time t = τ − r , t ∈ [ 0 , τ ] , are given by ( Anderson , 1982 ; Haussmann & Pardoux , 1986 ; Millet et al. , 1989 ) dXt = [ −f ( Xt , r ) +∇ ·G ( Xt , r ) +G ( Xt , r ) ∇Xt ln qr ( Xt ) ] dt+ g ( Xt , r ) dWt , ( 3 ) where r = τ − t is the remaining sampling time , G ( x , r ) = g ( x , r ) g ( x , r ) > and the D-dimensional vector ∇ ·G ( x , r ) is defined by [ ∇ ·G ( x , r ) ] i = ∑D j=1∇xj [ G ( x , r ) ] i , j . That is the processes Xt and Yr = Yτ−t have the same distribution . Approximating the terminal distribution Qτ of ( 1 ) , i.e . the initial distribution of ( 3 ) , with PZ , X0 is sampled from PZ and ( 3 ) is discretized and integrated over t to produce a sample Xτ approximately distributed as PD . The computation of the multiplicative drift adjustment ∇y ln qr ( y ) entering ( 3 ) , i.e . the score of the marginal density ( 2 ) , requires in principle O ( N ) operations . Let sφ ( y , r ) be a neural network for which we would like sφ ( y , r ) ≈ ∇y ln qr ( y ) . It remains to find a suitable training objective for which unbiased gradients with respect to φ can be obtained at O ( 1 ) cost with respect to the dataset size N . As qr ( y ) has a mixture representation , the identity of Vincent ( 2011 ) for Fisher divergences provides us with the desired objective for a fixed r ∈ ( 0 , τ ] LFD , DTRT ( φ , r ) = E Yr∼Qr [ ∥∥∇Yr ln qr ( Yr ) − sφ ( Yr , r ) ∥∥2 ] = E ( Y0 , Yr ) ∼Q0 , r [ ∥∥∇Yr ln qr|0 ( Yr|Y0 ) − sφ ( Yr , r ) ∥∥2 ] . ( 4 ) The key point is that an unbiased , O ( 1 ) with respect to N , mini-batch Monte Carlo ( MC ) estimator for the expectation ( 4 ) can be trivially obtained by sampling a batch Y0 ∼ PD , Yr ∼ Qr|0 ( dyr|Y0 ) , and evaluating the average loss over the batch . In order to achieve a global approximation over the whole time interval ( 0 , τ ] , Song et al . ( 2021 ) proposes uniform sampling of time r LFD , DTRT ( φ ) = E r∼U ( 0 , τ ] , ( Y0 , Yr ) ∼Q0 , r [ Rr ∥∥∇Yr ln qr|0 ( Yr|Y0 ) − sφ ( Yr , r ) ∥∥2 ] , ( 5 ) where Rr = E [ ‖∇Yr ln qr|0 ( Yr|Y0 ) ‖2 ] −1 is a regularization term . A MC estimator for ( 5 ) is constructed by augmenting the MC estimator for ( 4 ) with the additional sampling step r ∼ U ( 0 , τ ] . 3 DIFFUSION BRIDGE MIXTURE TRANSPORT . Our starting point is a generic D-dimensional time-inhomogenous SDE which , in contrast to Song et al . ( 2021 ) , is directly defined on the sampling time t ∈ [ 0 , τ ] dXt = f ( Xt , t ) dt+ g ( Xt , t ) dWt . ( 6 ) We reserve P · |0 ( · |x0 ) to denote the law of the diffusion solving ( 6 ) for a given starting value x0 and p · |0 ( · |x0 ) to denote the corresponding densities . | In this paper the authors introduce a new model for diffusion-based generative modelling. Instead of relying on time-reversed processes as in existing works, they propose an approach based on the mixing of diffusion bridges. They show that a mixing of diffusion bridges remains a diffusion with closed-form drift and volatility. Similarly to existing score-matching based generative modelling works the drift in this new formulation can be expressed as a conditional expectation and therefore can be seen as the minimizer of some loss function, allowing the use of neural-network based approximations. In addition, the authors propose some unification of the SDE classes used in [1] and to use non-identity volatility matrices. [1] Song, Sohl-Dickstein, Kingma, Kumar, Ermon, Poole -- Score-based Generative Modeling through Stochastic Differential Equations | SP:2d8dcc4b9162de930d5f4376dbe9928d8f08dc4b |
Orchestrated Value Mapping for Reinforcement Learning | 1 INTRODUCTION . The chief goal of reinforcement learning ( RL ) algorithms is to maximize the expected return — the value function — from each state ( Sutton & Barto , 2018 ; Szepesvári , 2010 ) . For decades , many algorithms have been proposed to compute the value function either as their main goal ( critic-only algorithms ) or as the means to help the policy search process ( actor-critic algorithms ) . However , when the environment comprises certain properties , learning the induced value function may become very challenging ( van Seijen et al. , 2019 ) . Examples include environments where rewards are dense in some parts of the state-space but very sparse in other parts , or when the size of rewards may vary dramatically . In the Atari 2600 game of Ms. Pac-Man , for instance , the reward can vary from 10 for small pellets to as large as 5000 for moving bananas . In other games like Tennis , as the agent acts randomly , it easily loses the game , causing negative rewards with high frequency . However , when the agent learns to capture the ball ( hence no negative reward anymore ) , it may still take a very long time before the agent gains a score and see a positive reward . Such learning scenarios , for one reason or another , have proved challenging for the conventional RL algorithms . One issue that may rise due to these environmental challenges is for the action gap — the optimal value difference between the best and second-best actions ( Farahmand , 2011 ) — to become significantly non-uniform . A recent study ( van Seijen et al. , 2019 ) showed promising results by simply mapping the value function to a logarithmic space and add important algorithmic steps to guarantee the convergence under generic conditions . While this construction addresses the problem of nonuniform action-gap and facilitates the use of smaller discount factors , it further opens a new direction to improve the learning : learn the value function in a different space that admits better properties compared to the original space . This interesting view naturally raises theoretical questions about the required properties of the functions that map the value to the learning space , and whether the algorithm still guarantees to converge to the optimal value function under this new construction . A loosely related topic is to presume a nonlinear Bellman equation . Originally , the Bellman equation of optimality ( Bellman , 1954 ; 1957 ) is a direct result of defining return as a discounted sum of future rewards . However , one may ignore this basis , and re-define Bellman equation in a generic non-linear way . In particular , van Hasselt et al . ( 2019 ) have shown that the new Bellman operator is still a contraction mapping and therefore the resulting algorithms may be well-behaved . The application of such algorithms is still unclear since the fixed-point does not have direct connection to the concept of return . In this paper , we do not consider nonlinear Bellman equations . Continuing with the first line of thought , a natural extension is to use different mappings concurrently as an ensemble , each of which adding different benefits , just like having various expertise in the board that runs a company . This may also be seen as a way of separation of concerns ( van Seijen et al. , 2016 ) . Ideally , we may wish to dynamically modify the influence of different mappings as the learning advances . For example , the agent may start with mappings that facilitate learning from sparse rewards , then as the agent learns to collect more rewards and they get denser , it gradually switches to mappings that simplifies learning on dense rewards . Of note , if there are known sources of rewards with known , specific characteristics ( say sparse positive rewards , but dense negative ones ) , same approach may prove beneficial . This has been the backbone for reward channeling architectures such as ( van Seijen et al. , 2017 ) . In this paper , building upon the aforementioned ideas , we present two orthogonal directions : generic value mapping and reward decomposition . We then combine the two and build a broad algorithm class , which can be instantiated to generate various interesting agents . We present the convergence results for the complete version of the algorithm . It is worth noting that this algorithm may be best seen as a blueprint for constructing other convergent algorithm classes . 2 VALUE MAPPING . We consider a general reinforcement learning problem , modeled as a Markov Decision Process ( MDP ) ( Puterman , 1994 ) M = ( S , A , P , r , γ ) , where S and A are the discrete sets of states and actions ; P : S ×A× S → [ 0 , 1 ] is a transition function that defines the transition probability from state s to s′ if action a is taken ; r : S × A × S → [ rmin , rmax ] is a reward function and γ ∈ [ 0 , 1 ] denotes a scalar discount factor . A policy π ( s , a ) = P [ At = a | St = s ] defines how an action is selected in a given state . Therefore , selecting actions according to a stationary policy in general results in a stochastic trajectory . The discounted sum of rewards over the trajectory induces a random variable , called return . We assume that all returns are finite and bounded . A trajectory is therefore called optimal if it induces maximum return . A state-action value function Qπ ( s , a ) is defined in conjunction with a policy π. Qπ ( s , a ) induces the expected return of taking action a at state s and following π thereafter . The optimal value function is defined as Q∗ ( s , a ) = maxπ Qπ ( s , a ) , which is the maximum expected return of all trajectories starting from ( s , a ) . Similarly , an optimal policy is defined as π∗ ( s , a ) = arg maxπ Qπ ( s , a ) . The optimal value function is unique ( Bertsekas & Tsitsiklis , 1996 ) and can be found for example as the fixed-point of the Q-Learning algorithm ( Watkins , 1989 ; Watkins & Dayan , 1992 ) , given by the following update rule : Qt+1 ( st , at ) ←− ( 1− αt ) Qt ( s , a ) + αt ( r ( st , at , st ) ) + γmax a′ Qt ( st+1 , a ′ ) ) ( 1 ) where αt is the learning rate ( step size ) parameter defined at time t. Our goal is to first map Q to a different space , and then perform the update , so that the learning process can benefit from the properties of the mapped space . We define a function f that maps the value function to some new space . In particular , we consider the following assumptions : Assumption 1 The function f ( x ) is a bijection ( either strictly increasing or strictly decreasing ) for all x in the given domain D = [ c1 , c2 ] ⊆ R. Assumption 2 The function f ( x ) holds the following properties for all x in the given domain D = [ c1 , c2 ] ⊆ R : 1. f is continuous on [ c1 , c2 ] and differentiable on ( c1 , c2 ) ; 2 . |f ′ ( x ) | ∈ [ δ1 , δ2 ] for x ∈ ( c1 , c2 ) , with 0 < δ1 < δ2 < ∞ ; 3. f is either of semi-convex or semi-concave . We next use f to map the value function , Q ( s , a ) , to its transformed version , namely Q̃ ( s , a ) = f ( Q ( s , a ) ) ( 2 ) Assumption 1 induces that f ( x ) is invertible , which we denote by f−1 ( x ) . Additionally , having known either of Q ( s , a ) or Q̃ ( s , a ) , the other one is uniquely computable . Of note , this assumption also implies that f preserves ordering ; however , it will change the direction of ordering if f is decreasing . Assumption 2 imposes more restriction on f ; nevertheless , it is still a broad class of functions to consider . Throughout the paper , we use tilde notation to refer to the “ mapped ” function or variable , while the mapping f is understandable from the context ( otherwise it is explicitly said ) . 2.1 BASE ALGORITHM . If the mapped value is naively placed in a Q-Learning-like algorithm , it will not converge to the optimal values in stochastic environments . More formally , for a tabular MDP , an update of the following form : ( compare it with equation 1 ) Q̃t+1 ( st , at ) : = ( 1− α ) Q̃t ( st , at ) + αf ( rt + γmax a′ f−1 ( Q̃t ( st+1 , a ′ ) ) ) ( 3 ) converges1 to the fixed point Q̃ ( s , a ) that satisfies Q̃ ( s , a ) = Es′∼P ( s , a , · ) [ f ( R ( s , a , s′ ) + γmax a′ f−1 ( Q̃ ( s′ , a′ ) ) ) ] , ( 4 ) where s′ denotes the next state . Let us define the notation Q ( s , a ) .= f−1 ( Q̃ ( s , a ) ) . If f is a semi-convex bijection , f−1 will be semi-concave and equation 4 deduces Q ( s , a ) . = f−1 ( Q̃ ( s , a ) ) = f−1 ( Es′∼P ( s , a , · ) [ f ( R ( s , a , s′ ) + γmax a′ Q ( s′ , a′ ) ) ] ) ≥ Es′∼P ( s , a , · ) [ f−1 ( f ( R ( s , a , s′ ) + γmax a′ Q ( s′ , a′ ) ) ) ] = Es′∼P ( s , a , · ) [ R ( s , a , s′ ) + γmax a′ Q ( s′ , a′ ) ] , ( 5 ) where the third line follows Jensen ’ s inequality . Comparing ( 5 ) with the Bellman ’ s optimality equation in the regular space , i.e . Q∗ ( s , a ) = Es′∼P ( s , a , · ) [ R ( s , a , s′ ) + γmaxa′ Q∗ ( s′ , a′ ) ] ; we conclude that the value function to which ( 3 ) converges over-estimates Bellman ’ s backup . Similarly , if f is a semi-concave function , then Q ( s , a ) under-estimates Bellman ’ s backup . Either way , it follows that the learned value function deviates from the optimal one . Further , the Jensen ’ s gap at a given state s — the difference between left- and right-hand-side of ( 5 ) — depends on the action a because the expectation operator depends on a . That is , at a given state s , the deviation of Q ( s , a ) from Q∗ ( s , a ) is not a fixed-value shift and can vary for various actions . Hence , the greedy policy w.r.t . Q ( s , · ) may not preserve ordering and it may not be an optimal policy either . In an effort to address this problem in the spacial case of f being a logarithmic function , van Seijen et al . ( 2019 ) observed that in the algorithm described by equation 3 , the step-size α generally conflates two forms of averaging : ( i ) averaging of stochastic update targets due to environment stochasticity ( happens in the regular space ) , and ( ii ) averaging over different states/actions ( happens in the f space ) . Moreover , they proposed to algorithmically separate the two and showed that such a separation will lift the Jensen gap between Q ( s , a ) and Q∗ ( s , a ) if the learning rate of the regular space decays to zero fast enough . Building from Log Q-Learning ( van Seijen et al. , 2019 ) , we define the base algorithm as the following : at time t it receives Q̃t ( s , a ) and a transition tuple ( s , a , r , s′ ) as defined previously , and outputs Q̃t+1 ( s , a ) , which then yields Qt+1 ( s , a ) = f−1 ( Q̃t+1 ( s , a ) ) . The steps are listed below : 1The convergence follows from stochastic approximation theory with the additional steps to show by induction that Q̃ remains bounded and then the corresponding operator is a contraction mapping . Qt ( s , a ) : = f −1 ( Q̃t ( s , a ) ) ( 6 ) ã′ : = arg max a′ ( Qt ( s ′ , a′ ) ) ( 7 ) Ut : = r + γf −1 ( Q̃t ( s ′ , ã′ ) ) ( 8 ) Ût : = f −1 ( Q̃t ( s , a ) ) + βreg , t ( Ut − f−1 ( Q̃t ( s , a ) ) ) ( 9 ) Q̃t+1 ( s , a ) : = Q̃t ( s , a ) + βf , t ( f ( Ût ) − Q̃t ( s , a ) ) ( 10 ) Here , the mapping f is any function that satisfies Assumptions 1 and 2 . Remark that similarly to the Log Q-Learning algorithm , ( 9 ) and ( 10 ) have decoupled averaging of stochastic update targets from that of different state-actions . | This paper proposes a new RL algorithm that contains two principles of value function mapping and reward decomposition. This proposal generalizes many existing RL frameworks such as classical Q-learning, Logarithmic Q-learning, and Q-Decomposition. The paper also provides generic theoretical results to backup the theory. The paper also demonstrates this idea on the suite of Atari 2600 games. | SP:209240ad604dd91251300c88ff55781357d562dc |
Orchestrated Value Mapping for Reinforcement Learning | 1 INTRODUCTION . The chief goal of reinforcement learning ( RL ) algorithms is to maximize the expected return — the value function — from each state ( Sutton & Barto , 2018 ; Szepesvári , 2010 ) . For decades , many algorithms have been proposed to compute the value function either as their main goal ( critic-only algorithms ) or as the means to help the policy search process ( actor-critic algorithms ) . However , when the environment comprises certain properties , learning the induced value function may become very challenging ( van Seijen et al. , 2019 ) . Examples include environments where rewards are dense in some parts of the state-space but very sparse in other parts , or when the size of rewards may vary dramatically . In the Atari 2600 game of Ms. Pac-Man , for instance , the reward can vary from 10 for small pellets to as large as 5000 for moving bananas . In other games like Tennis , as the agent acts randomly , it easily loses the game , causing negative rewards with high frequency . However , when the agent learns to capture the ball ( hence no negative reward anymore ) , it may still take a very long time before the agent gains a score and see a positive reward . Such learning scenarios , for one reason or another , have proved challenging for the conventional RL algorithms . One issue that may rise due to these environmental challenges is for the action gap — the optimal value difference between the best and second-best actions ( Farahmand , 2011 ) — to become significantly non-uniform . A recent study ( van Seijen et al. , 2019 ) showed promising results by simply mapping the value function to a logarithmic space and add important algorithmic steps to guarantee the convergence under generic conditions . While this construction addresses the problem of nonuniform action-gap and facilitates the use of smaller discount factors , it further opens a new direction to improve the learning : learn the value function in a different space that admits better properties compared to the original space . This interesting view naturally raises theoretical questions about the required properties of the functions that map the value to the learning space , and whether the algorithm still guarantees to converge to the optimal value function under this new construction . A loosely related topic is to presume a nonlinear Bellman equation . Originally , the Bellman equation of optimality ( Bellman , 1954 ; 1957 ) is a direct result of defining return as a discounted sum of future rewards . However , one may ignore this basis , and re-define Bellman equation in a generic non-linear way . In particular , van Hasselt et al . ( 2019 ) have shown that the new Bellman operator is still a contraction mapping and therefore the resulting algorithms may be well-behaved . The application of such algorithms is still unclear since the fixed-point does not have direct connection to the concept of return . In this paper , we do not consider nonlinear Bellman equations . Continuing with the first line of thought , a natural extension is to use different mappings concurrently as an ensemble , each of which adding different benefits , just like having various expertise in the board that runs a company . This may also be seen as a way of separation of concerns ( van Seijen et al. , 2016 ) . Ideally , we may wish to dynamically modify the influence of different mappings as the learning advances . For example , the agent may start with mappings that facilitate learning from sparse rewards , then as the agent learns to collect more rewards and they get denser , it gradually switches to mappings that simplifies learning on dense rewards . Of note , if there are known sources of rewards with known , specific characteristics ( say sparse positive rewards , but dense negative ones ) , same approach may prove beneficial . This has been the backbone for reward channeling architectures such as ( van Seijen et al. , 2017 ) . In this paper , building upon the aforementioned ideas , we present two orthogonal directions : generic value mapping and reward decomposition . We then combine the two and build a broad algorithm class , which can be instantiated to generate various interesting agents . We present the convergence results for the complete version of the algorithm . It is worth noting that this algorithm may be best seen as a blueprint for constructing other convergent algorithm classes . 2 VALUE MAPPING . We consider a general reinforcement learning problem , modeled as a Markov Decision Process ( MDP ) ( Puterman , 1994 ) M = ( S , A , P , r , γ ) , where S and A are the discrete sets of states and actions ; P : S ×A× S → [ 0 , 1 ] is a transition function that defines the transition probability from state s to s′ if action a is taken ; r : S × A × S → [ rmin , rmax ] is a reward function and γ ∈ [ 0 , 1 ] denotes a scalar discount factor . A policy π ( s , a ) = P [ At = a | St = s ] defines how an action is selected in a given state . Therefore , selecting actions according to a stationary policy in general results in a stochastic trajectory . The discounted sum of rewards over the trajectory induces a random variable , called return . We assume that all returns are finite and bounded . A trajectory is therefore called optimal if it induces maximum return . A state-action value function Qπ ( s , a ) is defined in conjunction with a policy π. Qπ ( s , a ) induces the expected return of taking action a at state s and following π thereafter . The optimal value function is defined as Q∗ ( s , a ) = maxπ Qπ ( s , a ) , which is the maximum expected return of all trajectories starting from ( s , a ) . Similarly , an optimal policy is defined as π∗ ( s , a ) = arg maxπ Qπ ( s , a ) . The optimal value function is unique ( Bertsekas & Tsitsiklis , 1996 ) and can be found for example as the fixed-point of the Q-Learning algorithm ( Watkins , 1989 ; Watkins & Dayan , 1992 ) , given by the following update rule : Qt+1 ( st , at ) ←− ( 1− αt ) Qt ( s , a ) + αt ( r ( st , at , st ) ) + γmax a′ Qt ( st+1 , a ′ ) ) ( 1 ) where αt is the learning rate ( step size ) parameter defined at time t. Our goal is to first map Q to a different space , and then perform the update , so that the learning process can benefit from the properties of the mapped space . We define a function f that maps the value function to some new space . In particular , we consider the following assumptions : Assumption 1 The function f ( x ) is a bijection ( either strictly increasing or strictly decreasing ) for all x in the given domain D = [ c1 , c2 ] ⊆ R. Assumption 2 The function f ( x ) holds the following properties for all x in the given domain D = [ c1 , c2 ] ⊆ R : 1. f is continuous on [ c1 , c2 ] and differentiable on ( c1 , c2 ) ; 2 . |f ′ ( x ) | ∈ [ δ1 , δ2 ] for x ∈ ( c1 , c2 ) , with 0 < δ1 < δ2 < ∞ ; 3. f is either of semi-convex or semi-concave . We next use f to map the value function , Q ( s , a ) , to its transformed version , namely Q̃ ( s , a ) = f ( Q ( s , a ) ) ( 2 ) Assumption 1 induces that f ( x ) is invertible , which we denote by f−1 ( x ) . Additionally , having known either of Q ( s , a ) or Q̃ ( s , a ) , the other one is uniquely computable . Of note , this assumption also implies that f preserves ordering ; however , it will change the direction of ordering if f is decreasing . Assumption 2 imposes more restriction on f ; nevertheless , it is still a broad class of functions to consider . Throughout the paper , we use tilde notation to refer to the “ mapped ” function or variable , while the mapping f is understandable from the context ( otherwise it is explicitly said ) . 2.1 BASE ALGORITHM . If the mapped value is naively placed in a Q-Learning-like algorithm , it will not converge to the optimal values in stochastic environments . More formally , for a tabular MDP , an update of the following form : ( compare it with equation 1 ) Q̃t+1 ( st , at ) : = ( 1− α ) Q̃t ( st , at ) + αf ( rt + γmax a′ f−1 ( Q̃t ( st+1 , a ′ ) ) ) ( 3 ) converges1 to the fixed point Q̃ ( s , a ) that satisfies Q̃ ( s , a ) = Es′∼P ( s , a , · ) [ f ( R ( s , a , s′ ) + γmax a′ f−1 ( Q̃ ( s′ , a′ ) ) ) ] , ( 4 ) where s′ denotes the next state . Let us define the notation Q ( s , a ) .= f−1 ( Q̃ ( s , a ) ) . If f is a semi-convex bijection , f−1 will be semi-concave and equation 4 deduces Q ( s , a ) . = f−1 ( Q̃ ( s , a ) ) = f−1 ( Es′∼P ( s , a , · ) [ f ( R ( s , a , s′ ) + γmax a′ Q ( s′ , a′ ) ) ] ) ≥ Es′∼P ( s , a , · ) [ f−1 ( f ( R ( s , a , s′ ) + γmax a′ Q ( s′ , a′ ) ) ) ] = Es′∼P ( s , a , · ) [ R ( s , a , s′ ) + γmax a′ Q ( s′ , a′ ) ] , ( 5 ) where the third line follows Jensen ’ s inequality . Comparing ( 5 ) with the Bellman ’ s optimality equation in the regular space , i.e . Q∗ ( s , a ) = Es′∼P ( s , a , · ) [ R ( s , a , s′ ) + γmaxa′ Q∗ ( s′ , a′ ) ] ; we conclude that the value function to which ( 3 ) converges over-estimates Bellman ’ s backup . Similarly , if f is a semi-concave function , then Q ( s , a ) under-estimates Bellman ’ s backup . Either way , it follows that the learned value function deviates from the optimal one . Further , the Jensen ’ s gap at a given state s — the difference between left- and right-hand-side of ( 5 ) — depends on the action a because the expectation operator depends on a . That is , at a given state s , the deviation of Q ( s , a ) from Q∗ ( s , a ) is not a fixed-value shift and can vary for various actions . Hence , the greedy policy w.r.t . Q ( s , · ) may not preserve ordering and it may not be an optimal policy either . In an effort to address this problem in the spacial case of f being a logarithmic function , van Seijen et al . ( 2019 ) observed that in the algorithm described by equation 3 , the step-size α generally conflates two forms of averaging : ( i ) averaging of stochastic update targets due to environment stochasticity ( happens in the regular space ) , and ( ii ) averaging over different states/actions ( happens in the f space ) . Moreover , they proposed to algorithmically separate the two and showed that such a separation will lift the Jensen gap between Q ( s , a ) and Q∗ ( s , a ) if the learning rate of the regular space decays to zero fast enough . Building from Log Q-Learning ( van Seijen et al. , 2019 ) , we define the base algorithm as the following : at time t it receives Q̃t ( s , a ) and a transition tuple ( s , a , r , s′ ) as defined previously , and outputs Q̃t+1 ( s , a ) , which then yields Qt+1 ( s , a ) = f−1 ( Q̃t+1 ( s , a ) ) . The steps are listed below : 1The convergence follows from stochastic approximation theory with the additional steps to show by induction that Q̃ remains bounded and then the corresponding operator is a contraction mapping . Qt ( s , a ) : = f −1 ( Q̃t ( s , a ) ) ( 6 ) ã′ : = arg max a′ ( Qt ( s ′ , a′ ) ) ( 7 ) Ut : = r + γf −1 ( Q̃t ( s ′ , ã′ ) ) ( 8 ) Ût : = f −1 ( Q̃t ( s , a ) ) + βreg , t ( Ut − f−1 ( Q̃t ( s , a ) ) ) ( 9 ) Q̃t+1 ( s , a ) : = Q̃t ( s , a ) + βf , t ( f ( Ût ) − Q̃t ( s , a ) ) ( 10 ) Here , the mapping f is any function that satisfies Assumptions 1 and 2 . Remark that similarly to the Log Q-Learning algorithm , ( 9 ) and ( 10 ) have decoupled averaging of stochastic update targets from that of different state-actions . | The paper proposes a framework for estimating the Q-value function by decomposing the reward into a linear combination of reward signals or channels. These individual channels are then mapped into a new space, similarly to the log Q-learning approach of van Seijen et al (2019). However, here the framework is extended to a more general class of function (convex, etc). Additionally, some of the theoretical assumptions in the original log Q-learning paper are softened. The method (with a particular instantiation of reward mapping) is tested on the Atari benchmark, and demonstrates improved performance compared to DQN and log Q-learning. | SP:209240ad604dd91251300c88ff55781357d562dc |
Orchestrated Value Mapping for Reinforcement Learning | 1 INTRODUCTION . The chief goal of reinforcement learning ( RL ) algorithms is to maximize the expected return — the value function — from each state ( Sutton & Barto , 2018 ; Szepesvári , 2010 ) . For decades , many algorithms have been proposed to compute the value function either as their main goal ( critic-only algorithms ) or as the means to help the policy search process ( actor-critic algorithms ) . However , when the environment comprises certain properties , learning the induced value function may become very challenging ( van Seijen et al. , 2019 ) . Examples include environments where rewards are dense in some parts of the state-space but very sparse in other parts , or when the size of rewards may vary dramatically . In the Atari 2600 game of Ms. Pac-Man , for instance , the reward can vary from 10 for small pellets to as large as 5000 for moving bananas . In other games like Tennis , as the agent acts randomly , it easily loses the game , causing negative rewards with high frequency . However , when the agent learns to capture the ball ( hence no negative reward anymore ) , it may still take a very long time before the agent gains a score and see a positive reward . Such learning scenarios , for one reason or another , have proved challenging for the conventional RL algorithms . One issue that may rise due to these environmental challenges is for the action gap — the optimal value difference between the best and second-best actions ( Farahmand , 2011 ) — to become significantly non-uniform . A recent study ( van Seijen et al. , 2019 ) showed promising results by simply mapping the value function to a logarithmic space and add important algorithmic steps to guarantee the convergence under generic conditions . While this construction addresses the problem of nonuniform action-gap and facilitates the use of smaller discount factors , it further opens a new direction to improve the learning : learn the value function in a different space that admits better properties compared to the original space . This interesting view naturally raises theoretical questions about the required properties of the functions that map the value to the learning space , and whether the algorithm still guarantees to converge to the optimal value function under this new construction . A loosely related topic is to presume a nonlinear Bellman equation . Originally , the Bellman equation of optimality ( Bellman , 1954 ; 1957 ) is a direct result of defining return as a discounted sum of future rewards . However , one may ignore this basis , and re-define Bellman equation in a generic non-linear way . In particular , van Hasselt et al . ( 2019 ) have shown that the new Bellman operator is still a contraction mapping and therefore the resulting algorithms may be well-behaved . The application of such algorithms is still unclear since the fixed-point does not have direct connection to the concept of return . In this paper , we do not consider nonlinear Bellman equations . Continuing with the first line of thought , a natural extension is to use different mappings concurrently as an ensemble , each of which adding different benefits , just like having various expertise in the board that runs a company . This may also be seen as a way of separation of concerns ( van Seijen et al. , 2016 ) . Ideally , we may wish to dynamically modify the influence of different mappings as the learning advances . For example , the agent may start with mappings that facilitate learning from sparse rewards , then as the agent learns to collect more rewards and they get denser , it gradually switches to mappings that simplifies learning on dense rewards . Of note , if there are known sources of rewards with known , specific characteristics ( say sparse positive rewards , but dense negative ones ) , same approach may prove beneficial . This has been the backbone for reward channeling architectures such as ( van Seijen et al. , 2017 ) . In this paper , building upon the aforementioned ideas , we present two orthogonal directions : generic value mapping and reward decomposition . We then combine the two and build a broad algorithm class , which can be instantiated to generate various interesting agents . We present the convergence results for the complete version of the algorithm . It is worth noting that this algorithm may be best seen as a blueprint for constructing other convergent algorithm classes . 2 VALUE MAPPING . We consider a general reinforcement learning problem , modeled as a Markov Decision Process ( MDP ) ( Puterman , 1994 ) M = ( S , A , P , r , γ ) , where S and A are the discrete sets of states and actions ; P : S ×A× S → [ 0 , 1 ] is a transition function that defines the transition probability from state s to s′ if action a is taken ; r : S × A × S → [ rmin , rmax ] is a reward function and γ ∈ [ 0 , 1 ] denotes a scalar discount factor . A policy π ( s , a ) = P [ At = a | St = s ] defines how an action is selected in a given state . Therefore , selecting actions according to a stationary policy in general results in a stochastic trajectory . The discounted sum of rewards over the trajectory induces a random variable , called return . We assume that all returns are finite and bounded . A trajectory is therefore called optimal if it induces maximum return . A state-action value function Qπ ( s , a ) is defined in conjunction with a policy π. Qπ ( s , a ) induces the expected return of taking action a at state s and following π thereafter . The optimal value function is defined as Q∗ ( s , a ) = maxπ Qπ ( s , a ) , which is the maximum expected return of all trajectories starting from ( s , a ) . Similarly , an optimal policy is defined as π∗ ( s , a ) = arg maxπ Qπ ( s , a ) . The optimal value function is unique ( Bertsekas & Tsitsiklis , 1996 ) and can be found for example as the fixed-point of the Q-Learning algorithm ( Watkins , 1989 ; Watkins & Dayan , 1992 ) , given by the following update rule : Qt+1 ( st , at ) ←− ( 1− αt ) Qt ( s , a ) + αt ( r ( st , at , st ) ) + γmax a′ Qt ( st+1 , a ′ ) ) ( 1 ) where αt is the learning rate ( step size ) parameter defined at time t. Our goal is to first map Q to a different space , and then perform the update , so that the learning process can benefit from the properties of the mapped space . We define a function f that maps the value function to some new space . In particular , we consider the following assumptions : Assumption 1 The function f ( x ) is a bijection ( either strictly increasing or strictly decreasing ) for all x in the given domain D = [ c1 , c2 ] ⊆ R. Assumption 2 The function f ( x ) holds the following properties for all x in the given domain D = [ c1 , c2 ] ⊆ R : 1. f is continuous on [ c1 , c2 ] and differentiable on ( c1 , c2 ) ; 2 . |f ′ ( x ) | ∈ [ δ1 , δ2 ] for x ∈ ( c1 , c2 ) , with 0 < δ1 < δ2 < ∞ ; 3. f is either of semi-convex or semi-concave . We next use f to map the value function , Q ( s , a ) , to its transformed version , namely Q̃ ( s , a ) = f ( Q ( s , a ) ) ( 2 ) Assumption 1 induces that f ( x ) is invertible , which we denote by f−1 ( x ) . Additionally , having known either of Q ( s , a ) or Q̃ ( s , a ) , the other one is uniquely computable . Of note , this assumption also implies that f preserves ordering ; however , it will change the direction of ordering if f is decreasing . Assumption 2 imposes more restriction on f ; nevertheless , it is still a broad class of functions to consider . Throughout the paper , we use tilde notation to refer to the “ mapped ” function or variable , while the mapping f is understandable from the context ( otherwise it is explicitly said ) . 2.1 BASE ALGORITHM . If the mapped value is naively placed in a Q-Learning-like algorithm , it will not converge to the optimal values in stochastic environments . More formally , for a tabular MDP , an update of the following form : ( compare it with equation 1 ) Q̃t+1 ( st , at ) : = ( 1− α ) Q̃t ( st , at ) + αf ( rt + γmax a′ f−1 ( Q̃t ( st+1 , a ′ ) ) ) ( 3 ) converges1 to the fixed point Q̃ ( s , a ) that satisfies Q̃ ( s , a ) = Es′∼P ( s , a , · ) [ f ( R ( s , a , s′ ) + γmax a′ f−1 ( Q̃ ( s′ , a′ ) ) ) ] , ( 4 ) where s′ denotes the next state . Let us define the notation Q ( s , a ) .= f−1 ( Q̃ ( s , a ) ) . If f is a semi-convex bijection , f−1 will be semi-concave and equation 4 deduces Q ( s , a ) . = f−1 ( Q̃ ( s , a ) ) = f−1 ( Es′∼P ( s , a , · ) [ f ( R ( s , a , s′ ) + γmax a′ Q ( s′ , a′ ) ) ] ) ≥ Es′∼P ( s , a , · ) [ f−1 ( f ( R ( s , a , s′ ) + γmax a′ Q ( s′ , a′ ) ) ) ] = Es′∼P ( s , a , · ) [ R ( s , a , s′ ) + γmax a′ Q ( s′ , a′ ) ] , ( 5 ) where the third line follows Jensen ’ s inequality . Comparing ( 5 ) with the Bellman ’ s optimality equation in the regular space , i.e . Q∗ ( s , a ) = Es′∼P ( s , a , · ) [ R ( s , a , s′ ) + γmaxa′ Q∗ ( s′ , a′ ) ] ; we conclude that the value function to which ( 3 ) converges over-estimates Bellman ’ s backup . Similarly , if f is a semi-concave function , then Q ( s , a ) under-estimates Bellman ’ s backup . Either way , it follows that the learned value function deviates from the optimal one . Further , the Jensen ’ s gap at a given state s — the difference between left- and right-hand-side of ( 5 ) — depends on the action a because the expectation operator depends on a . That is , at a given state s , the deviation of Q ( s , a ) from Q∗ ( s , a ) is not a fixed-value shift and can vary for various actions . Hence , the greedy policy w.r.t . Q ( s , · ) may not preserve ordering and it may not be an optimal policy either . In an effort to address this problem in the spacial case of f being a logarithmic function , van Seijen et al . ( 2019 ) observed that in the algorithm described by equation 3 , the step-size α generally conflates two forms of averaging : ( i ) averaging of stochastic update targets due to environment stochasticity ( happens in the regular space ) , and ( ii ) averaging over different states/actions ( happens in the f space ) . Moreover , they proposed to algorithmically separate the two and showed that such a separation will lift the Jensen gap between Q ( s , a ) and Q∗ ( s , a ) if the learning rate of the regular space decays to zero fast enough . Building from Log Q-Learning ( van Seijen et al. , 2019 ) , we define the base algorithm as the following : at time t it receives Q̃t ( s , a ) and a transition tuple ( s , a , r , s′ ) as defined previously , and outputs Q̃t+1 ( s , a ) , which then yields Qt+1 ( s , a ) = f−1 ( Q̃t+1 ( s , a ) ) . The steps are listed below : 1The convergence follows from stochastic approximation theory with the additional steps to show by induction that Q̃ remains bounded and then the corresponding operator is a contraction mapping . Qt ( s , a ) : = f −1 ( Q̃t ( s , a ) ) ( 6 ) ã′ : = arg max a′ ( Qt ( s ′ , a′ ) ) ( 7 ) Ut : = r + γf −1 ( Q̃t ( s ′ , ã′ ) ) ( 8 ) Ût : = f −1 ( Q̃t ( s , a ) ) + βreg , t ( Ut − f−1 ( Q̃t ( s , a ) ) ) ( 9 ) Q̃t+1 ( s , a ) : = Q̃t ( s , a ) + βf , t ( f ( Ût ) − Q̃t ( s , a ) ) ( 10 ) Here , the mapping f is any function that satisfies Assumptions 1 and 2 . Remark that similarly to the Log Q-Learning algorithm , ( 9 ) and ( 10 ) have decoupled averaging of stochastic update targets from that of different state-actions . | The paper describes a generic class of algorithms that decompose the reward signal into multiple channels and also map the value function into another generic space via arbitrary functions. They argue such a class of function is useful to specify certain properties of the learned value on a specific reward signal, also decomposed into channels. They show that known algorithms from the literature are instances of this convergent class of methods. | SP:209240ad604dd91251300c88ff55781357d562dc |
Pareto Policy Adaptation | 1 INTRODUCTION . Deep reinforcement learning has a pivotal role in solving several control problems of practical interest that would otherwise be intractable , such as robotic locomotion ( 1 ) , the Atari ( 2 ) and Go games ( 3 ) to name a few . While such approaches have focused on the scalar reward setting , there exist many real-world problems that have multiple , conflicting objectives and , therefore , can not be addressed by the current reinforcement learning tools . In such scenario , it is challenging to find an optimal control policy as the trade-offs ( preferences ) among the objectives may not be precisely known at training time or may differ from user to user . The paradigm of Multi-Objective Reinforcement Learning ( MORL ) provides a generalized framework for dealing with multi-dimensional rewards signals and has been identified as one of the main challenges of real-world reinforcement learning ( 4 ) . However , learning optimal policies for MORL has been proven to be quite challenging , because most strategies require either to have access to or be able to infer a quantification of the relative importance of the objectives , or they perform sophisticated searches in the value or policy space aiming to find an ensemble of policies that are non-inferior to each other . The former methods lack adaptability and generalizability , as their performance is tied to the given or inferred preferences , while the later ones suffer from scalability issues , because they learn multiple policies , and are usually complicated to implement . In this work , we aim to strike a balance between those two families of methods . Related Work : Multi-Objective Optimization ( MOO ) provides the fundamental tools for MORL . In MOO , there are two common solution concepts : scalarization and Pareto optimality . The former one derives a scalar objective and uses standard single-objective optimization techniques ( 5 ; 6 ; 7 ; 8 ; 9 ) . The later method is based on the concept of Pareto dominance and considers the set of all noninferior solutions ( 10 ; 11 ) . Multiple gradient methods that leverage first-order , necessary conditions for Pareto optimality have also been developed ( 12 ; 13 ; 14 ) . Similarly to MOO , existing work in MORL can be roughly divided into two main categories : Singlepolicy methods aim to maximize a single , scalarized reward . These methods essentially transform the problem into a single-objective MDP and differ mostly in the way they determine and express the preferences . Scalarization is usually performed using a weighted sum of the reward vector ( 15 ; 16 ; 17 ) or , less commonly , using linear mappings ( 18 ) . Different single-policy methods are based on thresholds or lexicographical ordering ( 19 ) or different classes of preferences ( 20 ; 21 ) . More recently , a scalarized Q-learning algorithm has been developed ( 22 ) which uses the concept of corner weight to infer and optimize over preferences . It was extended to handle dynamic preferences in ( 23 ) and to utilize the convex envelop of the Pareto front in ( 24 ) . Finally , a scale-invariant supervised learning approach for encoding the preferences was developed in ( 25 ) . On the other hand , multiple-policy methods use the vector-valued reward signal and learn a set of policies that approximate the Pareto front . The Pareto optimal solutions are the subset of non-inferior and equally good alternative polices among all distributions in the policy space and multiple-policy methods mainly differ on the approximation scheme for the Pareto front . One common approach is to perform multiple runs ( 16 ; 15 ) of a single scalarized reward function over a set of preferences . Unfortunately , such methods lack scalability to high-dimensional rewards . Other approaches leverage convex approximations of the Pareto front ( 26 ) or linear approximations of the value function ( 27 ; 28 ) to learn optimal deterministic policies . Multi-objective fitted Q-iteration ( 29 ; 30 ) enables us to learn policies for all linear preferences by encapsulating the preference vector as an input to the Q-function approximator . A policy gradient method based on discrete approximations of the Pareto front was proposed in ( 31 ) and enhanced to utilize continuous approximations in ( 32 ) . A gradient-based method that learns a manifold on the policy parameter space leveraging episodic exploration and importance sampling was developed in ( 33 ) . Finally , a prediction-guided evolutionary algorithm which is able to find dense approximation to the Pareto front was proposed in ( 34 ) . Single-policy methods have the advantage of learning a single policy and being simple to implement . However , they suffer from instability issues , as a small change on the preferences may lead to performance collapse ( 35 ) , and also rely on heuristics to infer the preferences when they are not known . On the other hand , multiple-policy methods enjoy the advantage of being able to adapt to changing preferences because the solution ( being an approximation to the Pareto front ) encapsulates all trade-offs between the objectives . However , this benefit comes at a higher computational cost as we typically have to learn and store multiple policies . In this paper , we aim to bridge the gab between single and multiple policy MORL methods : Our method learns a single policy along with the underlying preference vectors and is able to adapt the inferred preference to any preference distribution . Our preference vectors are inferred , not by using heuristics , but by approximating the Pareto front via a first-order condition ( see Fig . 1 for an example ) . Our method is inspired by the multiple gradient descent algorithm for MOO introduced in ( 13 ) as well as its application in the field of multi-task supervised learning presented in ( 36 ) . Contributions : We propose a policy gradient method for multi-objective reinforcement learning under unknown , linear preferences . Initially , we present Pareto stationarity as a necessary , firstorder condition for Pareto optimality and develop a multi-objective policy gradient algorithm which uses a projected gradient descent solver to search for and take steps in a common ascent direction for all objectives . Following that , we tackle the problem of adapting the policy gradient to any given preference distribution . We utilize our method from the first part and introduce the Pareto Policy Adaptation ( PPA ) , a loss function that penalizes deviations between the given preference distribution and the recovered preferences . Using implicit differentiation , we are able to back-propagate the gradient of PPA bypassing the operations of the projected gradient descent solver , which makes our method applicable to real-world problems . We evaluate our method in a series reinforcement learning tasks . The most closely related work to ours is presented in ( 31 ) . The authors discuss the existence of common ascent directions , introduce a quadratic optimization problem for their computation and give two gradient-based learning algorithms . Even though our method identifies the common ascent directions using a similar optimization problem , we leverage these directions to define the PPA loss function , which is a simple and efficient way 1 ) to incorporate the ascent directions into any learning algorithm and 2 ) to account for a given preference distribution . Leveraging implicit differentiation , PPA enables us to incorporate multiple rewards and preference distributions into any modern policy gradient algorithm by a mere modification of the loss function and by implementing a projected gradient descent optimizer . 2 PRELIMINARIES . We consider the framework of Multi-Objective Markov Decision Process ( MOMDP ) M : = ( S , A , R , P , γ , Ω , fΩ ) , where S and A denote the ( discrete ) state and action spaces , P : S × A × S → [ 0 , 1 ] is the transition kernel representing the environment dynamics , r ( s , a ) ≡ R : S × A → RM is a function mapping state-action tuples to reward vectors , Ω is the space of preferences and fω : RM → R a preference function which produces a scalar utility using a preference ω ∈ Ω . To declutter notation , we assume that there exists a given initial state . We consider linear preferences fω ( r ( s , a ) ) = ωTr ( s , a ) . A fixed preference vector ω ∈ Ω allows to directly compare the vectorized reward and value function by comparing their scalarized utilities , and , therefore , the MOMDP collapses to a standard MDP . A stationary control policy π : S × A → P ( A ) , where P ( A ) is the Borel set of A , is a function that assigns a probability distribution over actions for all states . The value vπ : S → RM×|S| of a policy π is defined as vπ ( s ) : = Eπ [ ∑∞ t=0 γ tr ( st , at ) | s0 = s ] , where γ ∈ ( 0 , 1 ) is a discount factor and the expectation is taken under the distribution over trajectories τ = ( s0 , a0 , s1 , a , s2 , . . . ) obtained by starting from s and following policy π thereafter . The discounted state-action occupation measure under policy π is defined as dπ ( s , a ) : = ∑∞ t=0 γ tP ( st = s , at = a | π ) for all states s ∈ S and allows us to write the value function compactly as vπ ( s ) = Edπ [ r ( s , a ) | s0 = s ] . Definition 1 . Considering all possible returns r̃ : = ∑∞ t=0 γ tr ( st , at ) , we define the Reward Space Pareto Coverage Set ( RS-PCS ) or Pareto frontier as F∗r : = { r̃ : r̃ ∈ RM , r̃′ ≻P r̃ } , where the symbol ≻P denotes Pareto dominance : greater or equal in all objectives and strictly greater in at least one objective . For all possible preferences in Ω and under the linear preference assumption , we define the Reward Space Convex Coverage Set ( RS-CCS ) as C∗R , Ω : = { r̃ : r̃ ∈ R , ∃ω ∈ Ω s.t . ωT r̃ ≥ ωT r̃′ , ∀r̃′ ∈ RM } . ( 1 ) The set C∗R , Ω contains all discounted reward vectors that could be optimal for some preference vector in Ω . Anything in F∗r but not in C∗R , Ω can not be useful under linear preferences . In that case , it suffices to restrict our analysis to C∗R , Ω . Also , we assume , without loss of generality , that∑ m ωm = 1 , ωm ≥ 0 , m = 1 , 2 . . .M for all ω ∈ Ω , i.e. , the preference vector is a convex combination of the objectives . We extend the definition of Pareto optimality from the reward space to the policy space . Definition 2 . A policy π dominates a policy π′ if and only if vπ ≻P vπ ′ . A policy π∗ is called Pareto optimal if there exists no other policy π that dominates π∗ . The set Π∗P of all Pareto optimal policies is called Pareto policy set and its image F∗π : = { vπ } π∈Π∗P is called Pareto policy frontier . The set C∗Π , Ω : = { π : π ∈ Π , ∃ω ∈ Ω s.t . ωTvπ ≥ ωTvπ ′ , ∀π′ ∈ Π , ∑ m ωm = 1 , ωm ≥ 0 } ( 2 ) is called the Policy Space Convex Coverage Set ( PS-CCS ) . Lemma 1 . Let π ∈ C∗Π , Ω be a policy . Then , we have Eπ [ r̃ ] ∈ C∗R , Ω , i.e. , the expected return vector under policy π belongs in the RS-CCS . Lemma 1 ( proof given in the Appendix ) connects the PS-CCS with the RS-CCS and allows us to use the former one in place of the later . This is very convenient because searching for Pareto optimal vectors in the reward space is not practically efficient ( e.g. , due to the sparsity of reward signal ) or useful ( e.g. , because they can not be easily mapped to values or actions ) . By finding a policy π ∈ C∗Π , Ω , Lemma 1 guarantees that the expected return vector under π belongs in C∗R , Ω and , therefore , maps the problem of reward space exploration to policy space exploration . Additionally , Lemma 1 imposes no restrictions on the class of policies and allows us to adopt the common practice of parameterizing the policy by high-dimensional vector θ ∈ Θ ( e.g. , a neural network ) . The definition of PS-CCS given Eq . equation 3 carries over to this parametric class as is , i.e. , we can define the PS-CCS in the policy parameter space as follows C∗Θ , Ω : = { θ : θ ∈ Θ , ∃ω ∈ Ω s.t . ωTvπθ ≥ ωTvπθ′ , ∀θ′ ∈ Θ } . ( 3 ) | The paper presents a new method for solving MORL problems. The main contributions are: a generic gradient descent MORL algorithm for finding multiple solutions, and another algorithm to retrieves preferences from the given solutions. The authors also present theoretical proofs of their method. | SP:8633b6b3a1d32a6c850b8ba5ccfa7b6fa3110960 |
Pareto Policy Adaptation | 1 INTRODUCTION . Deep reinforcement learning has a pivotal role in solving several control problems of practical interest that would otherwise be intractable , such as robotic locomotion ( 1 ) , the Atari ( 2 ) and Go games ( 3 ) to name a few . While such approaches have focused on the scalar reward setting , there exist many real-world problems that have multiple , conflicting objectives and , therefore , can not be addressed by the current reinforcement learning tools . In such scenario , it is challenging to find an optimal control policy as the trade-offs ( preferences ) among the objectives may not be precisely known at training time or may differ from user to user . The paradigm of Multi-Objective Reinforcement Learning ( MORL ) provides a generalized framework for dealing with multi-dimensional rewards signals and has been identified as one of the main challenges of real-world reinforcement learning ( 4 ) . However , learning optimal policies for MORL has been proven to be quite challenging , because most strategies require either to have access to or be able to infer a quantification of the relative importance of the objectives , or they perform sophisticated searches in the value or policy space aiming to find an ensemble of policies that are non-inferior to each other . The former methods lack adaptability and generalizability , as their performance is tied to the given or inferred preferences , while the later ones suffer from scalability issues , because they learn multiple policies , and are usually complicated to implement . In this work , we aim to strike a balance between those two families of methods . Related Work : Multi-Objective Optimization ( MOO ) provides the fundamental tools for MORL . In MOO , there are two common solution concepts : scalarization and Pareto optimality . The former one derives a scalar objective and uses standard single-objective optimization techniques ( 5 ; 6 ; 7 ; 8 ; 9 ) . The later method is based on the concept of Pareto dominance and considers the set of all noninferior solutions ( 10 ; 11 ) . Multiple gradient methods that leverage first-order , necessary conditions for Pareto optimality have also been developed ( 12 ; 13 ; 14 ) . Similarly to MOO , existing work in MORL can be roughly divided into two main categories : Singlepolicy methods aim to maximize a single , scalarized reward . These methods essentially transform the problem into a single-objective MDP and differ mostly in the way they determine and express the preferences . Scalarization is usually performed using a weighted sum of the reward vector ( 15 ; 16 ; 17 ) or , less commonly , using linear mappings ( 18 ) . Different single-policy methods are based on thresholds or lexicographical ordering ( 19 ) or different classes of preferences ( 20 ; 21 ) . More recently , a scalarized Q-learning algorithm has been developed ( 22 ) which uses the concept of corner weight to infer and optimize over preferences . It was extended to handle dynamic preferences in ( 23 ) and to utilize the convex envelop of the Pareto front in ( 24 ) . Finally , a scale-invariant supervised learning approach for encoding the preferences was developed in ( 25 ) . On the other hand , multiple-policy methods use the vector-valued reward signal and learn a set of policies that approximate the Pareto front . The Pareto optimal solutions are the subset of non-inferior and equally good alternative polices among all distributions in the policy space and multiple-policy methods mainly differ on the approximation scheme for the Pareto front . One common approach is to perform multiple runs ( 16 ; 15 ) of a single scalarized reward function over a set of preferences . Unfortunately , such methods lack scalability to high-dimensional rewards . Other approaches leverage convex approximations of the Pareto front ( 26 ) or linear approximations of the value function ( 27 ; 28 ) to learn optimal deterministic policies . Multi-objective fitted Q-iteration ( 29 ; 30 ) enables us to learn policies for all linear preferences by encapsulating the preference vector as an input to the Q-function approximator . A policy gradient method based on discrete approximations of the Pareto front was proposed in ( 31 ) and enhanced to utilize continuous approximations in ( 32 ) . A gradient-based method that learns a manifold on the policy parameter space leveraging episodic exploration and importance sampling was developed in ( 33 ) . Finally , a prediction-guided evolutionary algorithm which is able to find dense approximation to the Pareto front was proposed in ( 34 ) . Single-policy methods have the advantage of learning a single policy and being simple to implement . However , they suffer from instability issues , as a small change on the preferences may lead to performance collapse ( 35 ) , and also rely on heuristics to infer the preferences when they are not known . On the other hand , multiple-policy methods enjoy the advantage of being able to adapt to changing preferences because the solution ( being an approximation to the Pareto front ) encapsulates all trade-offs between the objectives . However , this benefit comes at a higher computational cost as we typically have to learn and store multiple policies . In this paper , we aim to bridge the gab between single and multiple policy MORL methods : Our method learns a single policy along with the underlying preference vectors and is able to adapt the inferred preference to any preference distribution . Our preference vectors are inferred , not by using heuristics , but by approximating the Pareto front via a first-order condition ( see Fig . 1 for an example ) . Our method is inspired by the multiple gradient descent algorithm for MOO introduced in ( 13 ) as well as its application in the field of multi-task supervised learning presented in ( 36 ) . Contributions : We propose a policy gradient method for multi-objective reinforcement learning under unknown , linear preferences . Initially , we present Pareto stationarity as a necessary , firstorder condition for Pareto optimality and develop a multi-objective policy gradient algorithm which uses a projected gradient descent solver to search for and take steps in a common ascent direction for all objectives . Following that , we tackle the problem of adapting the policy gradient to any given preference distribution . We utilize our method from the first part and introduce the Pareto Policy Adaptation ( PPA ) , a loss function that penalizes deviations between the given preference distribution and the recovered preferences . Using implicit differentiation , we are able to back-propagate the gradient of PPA bypassing the operations of the projected gradient descent solver , which makes our method applicable to real-world problems . We evaluate our method in a series reinforcement learning tasks . The most closely related work to ours is presented in ( 31 ) . The authors discuss the existence of common ascent directions , introduce a quadratic optimization problem for their computation and give two gradient-based learning algorithms . Even though our method identifies the common ascent directions using a similar optimization problem , we leverage these directions to define the PPA loss function , which is a simple and efficient way 1 ) to incorporate the ascent directions into any learning algorithm and 2 ) to account for a given preference distribution . Leveraging implicit differentiation , PPA enables us to incorporate multiple rewards and preference distributions into any modern policy gradient algorithm by a mere modification of the loss function and by implementing a projected gradient descent optimizer . 2 PRELIMINARIES . We consider the framework of Multi-Objective Markov Decision Process ( MOMDP ) M : = ( S , A , R , P , γ , Ω , fΩ ) , where S and A denote the ( discrete ) state and action spaces , P : S × A × S → [ 0 , 1 ] is the transition kernel representing the environment dynamics , r ( s , a ) ≡ R : S × A → RM is a function mapping state-action tuples to reward vectors , Ω is the space of preferences and fω : RM → R a preference function which produces a scalar utility using a preference ω ∈ Ω . To declutter notation , we assume that there exists a given initial state . We consider linear preferences fω ( r ( s , a ) ) = ωTr ( s , a ) . A fixed preference vector ω ∈ Ω allows to directly compare the vectorized reward and value function by comparing their scalarized utilities , and , therefore , the MOMDP collapses to a standard MDP . A stationary control policy π : S × A → P ( A ) , where P ( A ) is the Borel set of A , is a function that assigns a probability distribution over actions for all states . The value vπ : S → RM×|S| of a policy π is defined as vπ ( s ) : = Eπ [ ∑∞ t=0 γ tr ( st , at ) | s0 = s ] , where γ ∈ ( 0 , 1 ) is a discount factor and the expectation is taken under the distribution over trajectories τ = ( s0 , a0 , s1 , a , s2 , . . . ) obtained by starting from s and following policy π thereafter . The discounted state-action occupation measure under policy π is defined as dπ ( s , a ) : = ∑∞ t=0 γ tP ( st = s , at = a | π ) for all states s ∈ S and allows us to write the value function compactly as vπ ( s ) = Edπ [ r ( s , a ) | s0 = s ] . Definition 1 . Considering all possible returns r̃ : = ∑∞ t=0 γ tr ( st , at ) , we define the Reward Space Pareto Coverage Set ( RS-PCS ) or Pareto frontier as F∗r : = { r̃ : r̃ ∈ RM , r̃′ ≻P r̃ } , where the symbol ≻P denotes Pareto dominance : greater or equal in all objectives and strictly greater in at least one objective . For all possible preferences in Ω and under the linear preference assumption , we define the Reward Space Convex Coverage Set ( RS-CCS ) as C∗R , Ω : = { r̃ : r̃ ∈ R , ∃ω ∈ Ω s.t . ωT r̃ ≥ ωT r̃′ , ∀r̃′ ∈ RM } . ( 1 ) The set C∗R , Ω contains all discounted reward vectors that could be optimal for some preference vector in Ω . Anything in F∗r but not in C∗R , Ω can not be useful under linear preferences . In that case , it suffices to restrict our analysis to C∗R , Ω . Also , we assume , without loss of generality , that∑ m ωm = 1 , ωm ≥ 0 , m = 1 , 2 . . .M for all ω ∈ Ω , i.e. , the preference vector is a convex combination of the objectives . We extend the definition of Pareto optimality from the reward space to the policy space . Definition 2 . A policy π dominates a policy π′ if and only if vπ ≻P vπ ′ . A policy π∗ is called Pareto optimal if there exists no other policy π that dominates π∗ . The set Π∗P of all Pareto optimal policies is called Pareto policy set and its image F∗π : = { vπ } π∈Π∗P is called Pareto policy frontier . The set C∗Π , Ω : = { π : π ∈ Π , ∃ω ∈ Ω s.t . ωTvπ ≥ ωTvπ ′ , ∀π′ ∈ Π , ∑ m ωm = 1 , ωm ≥ 0 } ( 2 ) is called the Policy Space Convex Coverage Set ( PS-CCS ) . Lemma 1 . Let π ∈ C∗Π , Ω be a policy . Then , we have Eπ [ r̃ ] ∈ C∗R , Ω , i.e. , the expected return vector under policy π belongs in the RS-CCS . Lemma 1 ( proof given in the Appendix ) connects the PS-CCS with the RS-CCS and allows us to use the former one in place of the later . This is very convenient because searching for Pareto optimal vectors in the reward space is not practically efficient ( e.g. , due to the sparsity of reward signal ) or useful ( e.g. , because they can not be easily mapped to values or actions ) . By finding a policy π ∈ C∗Π , Ω , Lemma 1 guarantees that the expected return vector under π belongs in C∗R , Ω and , therefore , maps the problem of reward space exploration to policy space exploration . Additionally , Lemma 1 imposes no restrictions on the class of policies and allows us to adopt the common practice of parameterizing the policy by high-dimensional vector θ ∈ Θ ( e.g. , a neural network ) . The definition of PS-CCS given Eq . equation 3 carries over to this parametric class as is , i.e. , we can define the PS-CCS in the policy parameter space as follows C∗Θ , Ω : = { θ : θ ∈ Θ , ∃ω ∈ Ω s.t . ωTvπθ ≥ ωTvπθ′ , ∀θ′ ∈ Θ } . ( 3 ) | The paper presents a multi-objective method for linear preferences. The key concept used for the design of the approach is that there always exists a common ascent direction for all the objectives. The authors leverage this property for introducing a novel loss function that can be integrated into different DeepRL methods. The proposed approach is simple and proved to be effective in the proposed experiments. | SP:8633b6b3a1d32a6c850b8ba5ccfa7b6fa3110960 |
Pareto Policy Adaptation | 1 INTRODUCTION . Deep reinforcement learning has a pivotal role in solving several control problems of practical interest that would otherwise be intractable , such as robotic locomotion ( 1 ) , the Atari ( 2 ) and Go games ( 3 ) to name a few . While such approaches have focused on the scalar reward setting , there exist many real-world problems that have multiple , conflicting objectives and , therefore , can not be addressed by the current reinforcement learning tools . In such scenario , it is challenging to find an optimal control policy as the trade-offs ( preferences ) among the objectives may not be precisely known at training time or may differ from user to user . The paradigm of Multi-Objective Reinforcement Learning ( MORL ) provides a generalized framework for dealing with multi-dimensional rewards signals and has been identified as one of the main challenges of real-world reinforcement learning ( 4 ) . However , learning optimal policies for MORL has been proven to be quite challenging , because most strategies require either to have access to or be able to infer a quantification of the relative importance of the objectives , or they perform sophisticated searches in the value or policy space aiming to find an ensemble of policies that are non-inferior to each other . The former methods lack adaptability and generalizability , as their performance is tied to the given or inferred preferences , while the later ones suffer from scalability issues , because they learn multiple policies , and are usually complicated to implement . In this work , we aim to strike a balance between those two families of methods . Related Work : Multi-Objective Optimization ( MOO ) provides the fundamental tools for MORL . In MOO , there are two common solution concepts : scalarization and Pareto optimality . The former one derives a scalar objective and uses standard single-objective optimization techniques ( 5 ; 6 ; 7 ; 8 ; 9 ) . The later method is based on the concept of Pareto dominance and considers the set of all noninferior solutions ( 10 ; 11 ) . Multiple gradient methods that leverage first-order , necessary conditions for Pareto optimality have also been developed ( 12 ; 13 ; 14 ) . Similarly to MOO , existing work in MORL can be roughly divided into two main categories : Singlepolicy methods aim to maximize a single , scalarized reward . These methods essentially transform the problem into a single-objective MDP and differ mostly in the way they determine and express the preferences . Scalarization is usually performed using a weighted sum of the reward vector ( 15 ; 16 ; 17 ) or , less commonly , using linear mappings ( 18 ) . Different single-policy methods are based on thresholds or lexicographical ordering ( 19 ) or different classes of preferences ( 20 ; 21 ) . More recently , a scalarized Q-learning algorithm has been developed ( 22 ) which uses the concept of corner weight to infer and optimize over preferences . It was extended to handle dynamic preferences in ( 23 ) and to utilize the convex envelop of the Pareto front in ( 24 ) . Finally , a scale-invariant supervised learning approach for encoding the preferences was developed in ( 25 ) . On the other hand , multiple-policy methods use the vector-valued reward signal and learn a set of policies that approximate the Pareto front . The Pareto optimal solutions are the subset of non-inferior and equally good alternative polices among all distributions in the policy space and multiple-policy methods mainly differ on the approximation scheme for the Pareto front . One common approach is to perform multiple runs ( 16 ; 15 ) of a single scalarized reward function over a set of preferences . Unfortunately , such methods lack scalability to high-dimensional rewards . Other approaches leverage convex approximations of the Pareto front ( 26 ) or linear approximations of the value function ( 27 ; 28 ) to learn optimal deterministic policies . Multi-objective fitted Q-iteration ( 29 ; 30 ) enables us to learn policies for all linear preferences by encapsulating the preference vector as an input to the Q-function approximator . A policy gradient method based on discrete approximations of the Pareto front was proposed in ( 31 ) and enhanced to utilize continuous approximations in ( 32 ) . A gradient-based method that learns a manifold on the policy parameter space leveraging episodic exploration and importance sampling was developed in ( 33 ) . Finally , a prediction-guided evolutionary algorithm which is able to find dense approximation to the Pareto front was proposed in ( 34 ) . Single-policy methods have the advantage of learning a single policy and being simple to implement . However , they suffer from instability issues , as a small change on the preferences may lead to performance collapse ( 35 ) , and also rely on heuristics to infer the preferences when they are not known . On the other hand , multiple-policy methods enjoy the advantage of being able to adapt to changing preferences because the solution ( being an approximation to the Pareto front ) encapsulates all trade-offs between the objectives . However , this benefit comes at a higher computational cost as we typically have to learn and store multiple policies . In this paper , we aim to bridge the gab between single and multiple policy MORL methods : Our method learns a single policy along with the underlying preference vectors and is able to adapt the inferred preference to any preference distribution . Our preference vectors are inferred , not by using heuristics , but by approximating the Pareto front via a first-order condition ( see Fig . 1 for an example ) . Our method is inspired by the multiple gradient descent algorithm for MOO introduced in ( 13 ) as well as its application in the field of multi-task supervised learning presented in ( 36 ) . Contributions : We propose a policy gradient method for multi-objective reinforcement learning under unknown , linear preferences . Initially , we present Pareto stationarity as a necessary , firstorder condition for Pareto optimality and develop a multi-objective policy gradient algorithm which uses a projected gradient descent solver to search for and take steps in a common ascent direction for all objectives . Following that , we tackle the problem of adapting the policy gradient to any given preference distribution . We utilize our method from the first part and introduce the Pareto Policy Adaptation ( PPA ) , a loss function that penalizes deviations between the given preference distribution and the recovered preferences . Using implicit differentiation , we are able to back-propagate the gradient of PPA bypassing the operations of the projected gradient descent solver , which makes our method applicable to real-world problems . We evaluate our method in a series reinforcement learning tasks . The most closely related work to ours is presented in ( 31 ) . The authors discuss the existence of common ascent directions , introduce a quadratic optimization problem for their computation and give two gradient-based learning algorithms . Even though our method identifies the common ascent directions using a similar optimization problem , we leverage these directions to define the PPA loss function , which is a simple and efficient way 1 ) to incorporate the ascent directions into any learning algorithm and 2 ) to account for a given preference distribution . Leveraging implicit differentiation , PPA enables us to incorporate multiple rewards and preference distributions into any modern policy gradient algorithm by a mere modification of the loss function and by implementing a projected gradient descent optimizer . 2 PRELIMINARIES . We consider the framework of Multi-Objective Markov Decision Process ( MOMDP ) M : = ( S , A , R , P , γ , Ω , fΩ ) , where S and A denote the ( discrete ) state and action spaces , P : S × A × S → [ 0 , 1 ] is the transition kernel representing the environment dynamics , r ( s , a ) ≡ R : S × A → RM is a function mapping state-action tuples to reward vectors , Ω is the space of preferences and fω : RM → R a preference function which produces a scalar utility using a preference ω ∈ Ω . To declutter notation , we assume that there exists a given initial state . We consider linear preferences fω ( r ( s , a ) ) = ωTr ( s , a ) . A fixed preference vector ω ∈ Ω allows to directly compare the vectorized reward and value function by comparing their scalarized utilities , and , therefore , the MOMDP collapses to a standard MDP . A stationary control policy π : S × A → P ( A ) , where P ( A ) is the Borel set of A , is a function that assigns a probability distribution over actions for all states . The value vπ : S → RM×|S| of a policy π is defined as vπ ( s ) : = Eπ [ ∑∞ t=0 γ tr ( st , at ) | s0 = s ] , where γ ∈ ( 0 , 1 ) is a discount factor and the expectation is taken under the distribution over trajectories τ = ( s0 , a0 , s1 , a , s2 , . . . ) obtained by starting from s and following policy π thereafter . The discounted state-action occupation measure under policy π is defined as dπ ( s , a ) : = ∑∞ t=0 γ tP ( st = s , at = a | π ) for all states s ∈ S and allows us to write the value function compactly as vπ ( s ) = Edπ [ r ( s , a ) | s0 = s ] . Definition 1 . Considering all possible returns r̃ : = ∑∞ t=0 γ tr ( st , at ) , we define the Reward Space Pareto Coverage Set ( RS-PCS ) or Pareto frontier as F∗r : = { r̃ : r̃ ∈ RM , r̃′ ≻P r̃ } , where the symbol ≻P denotes Pareto dominance : greater or equal in all objectives and strictly greater in at least one objective . For all possible preferences in Ω and under the linear preference assumption , we define the Reward Space Convex Coverage Set ( RS-CCS ) as C∗R , Ω : = { r̃ : r̃ ∈ R , ∃ω ∈ Ω s.t . ωT r̃ ≥ ωT r̃′ , ∀r̃′ ∈ RM } . ( 1 ) The set C∗R , Ω contains all discounted reward vectors that could be optimal for some preference vector in Ω . Anything in F∗r but not in C∗R , Ω can not be useful under linear preferences . In that case , it suffices to restrict our analysis to C∗R , Ω . Also , we assume , without loss of generality , that∑ m ωm = 1 , ωm ≥ 0 , m = 1 , 2 . . .M for all ω ∈ Ω , i.e. , the preference vector is a convex combination of the objectives . We extend the definition of Pareto optimality from the reward space to the policy space . Definition 2 . A policy π dominates a policy π′ if and only if vπ ≻P vπ ′ . A policy π∗ is called Pareto optimal if there exists no other policy π that dominates π∗ . The set Π∗P of all Pareto optimal policies is called Pareto policy set and its image F∗π : = { vπ } π∈Π∗P is called Pareto policy frontier . The set C∗Π , Ω : = { π : π ∈ Π , ∃ω ∈ Ω s.t . ωTvπ ≥ ωTvπ ′ , ∀π′ ∈ Π , ∑ m ωm = 1 , ωm ≥ 0 } ( 2 ) is called the Policy Space Convex Coverage Set ( PS-CCS ) . Lemma 1 . Let π ∈ C∗Π , Ω be a policy . Then , we have Eπ [ r̃ ] ∈ C∗R , Ω , i.e. , the expected return vector under policy π belongs in the RS-CCS . Lemma 1 ( proof given in the Appendix ) connects the PS-CCS with the RS-CCS and allows us to use the former one in place of the later . This is very convenient because searching for Pareto optimal vectors in the reward space is not practically efficient ( e.g. , due to the sparsity of reward signal ) or useful ( e.g. , because they can not be easily mapped to values or actions ) . By finding a policy π ∈ C∗Π , Ω , Lemma 1 guarantees that the expected return vector under π belongs in C∗R , Ω and , therefore , maps the problem of reward space exploration to policy space exploration . Additionally , Lemma 1 imposes no restrictions on the class of policies and allows us to adopt the common practice of parameterizing the policy by high-dimensional vector θ ∈ Θ ( e.g. , a neural network ) . The definition of PS-CCS given Eq . equation 3 carries over to this parametric class as is , i.e. , we can define the PS-CCS in the policy parameter space as follows C∗Θ , Ω : = { θ : θ ∈ Θ , ∃ω ∈ Ω s.t . ωTvπθ ≥ ωTvπθ′ , ∀θ′ ∈ Θ } . ( 3 ) | This paper introduces a policy gradient approach to multi objective RL. The authors learn show that an optimal solution for a specific reward vector can be found by minimizing a constrained quadratic optimization problem. They propose to solve this problem using projected gradient descent. Then, the authors offer an efficient solution for optimizing the Pareto front through "Pareto Policy Adaptation" loss function, which trades off learning the Pareto front and the policy. The authors conduct experiments and ablations studies on four benchmarks, validating their method with improvement over current sota approaches for MORL. | SP:8633b6b3a1d32a6c850b8ba5ccfa7b6fa3110960 |
Closed-loop Control for Online Continual Learning | 1 INTRODUCTION . A major challenge in research on artificial neural networks is to develop incremental learning ability to accumulate knowledge over time from a non-stationary stream of data . Most deep learning techniques are designed with the assumption that the training samples are drawn independently and identically from a fixed data distribution , but this assumption is often violated in ever-changing realworld environments . Most successful deep learning results are achieved by training on pre-collected datasets . The resulting model is static and incapable of adapting its behavior to the non-stationary environment over time ( Delange et al. , 2021 ) . When new data becomes available , the training process needs to restart again . In a non-stationary environment , training on the new data can seriously undermine the model ’ s previously acquired knowledge of past data , which may cause what is known as “ catastrophic forgetting ” ( Parisi et al. , 2019 ) . In many real-world applications , a large amount of new data are generated continually , and it has become increasingly important to ensure that the learning agent has lifelong learning capabilities to learn new knowledge and maintain the old knowledge . Our work focuses on online class incremental ( OCI ) continual learning problems to learn a sequence of classification tasks with a single pass over the data . To address the problem of catastrophic forgetting in this setting , continual learning algorithms need to balance between stability and plasticity : the ability to robustly maintain old knowledge while being able to quickly incorporate new knowledge . Previous work on continual learning deals with this problem by modifying the standard training process using memory replay-based , regularization-based , or parameter isolation-based techniques . The work presented in this paper rests on the observation that , besides requiring changes to the training algorithm , the sequential learning process also brings special challenges to the hyperparameter tuning process , which has not been extensively studied so far . In fact , a large number of CL methods have to rely on well-selected hyperparameters to effectively balance the trade-off between stability and plasticity ; to search for the best hyperparameters , most research in this area follows an offline approach to go through the whole data sequence several times measuring performance against a representative , held-out validation set . This violates the fundamental assumption of continual learning , namely that there is no access to previous task data . There is some work on heuristic hyperparameter tuning specifically designed for online CL ( Aljundi et al. , 2019 ; Mai et al. , 2021a ) , but it requires extra held-out task validation data , which may not be available . To address the hyperparameter tuning problem , we propose a closed-loop continual learning framework that is able to balance stability and plasticity without access to an external held-out validation set . Specifically , we build a real-time feedback signal that measures the performance of the CL agent and enables online hyperparameter tuning using reinforcement learning ( RL ) . The proposed closed-loop CL framework is combined with replay-based continual learning to achieve adaptive memory replay for online class-incremental continual learning . Replay-based CL methods prevent forgetting of previously learned knowledge by maintaining a small memory of past data and performing joint training on incoming and memorized data during the optimization process . Despite their simplicity , these methods have significantly outperformed CL approaches without episodic memory in the online class-incremental setting ( Chaudhry et al. , 2019 ) . Compared to standard supervised learning , two main challenges exist in memory replay methods . One is the risk of overfitting the memory , as a relatively small amount of memorized samples are repeatedly rehearsed in the training process . The other challenge is the class imbalance problem in the joint training process : generally , only a relatively small amount of old-class data is available in the memory . Because of these challenges , it is important to be able to modulate the replay dynamics of these methods by hyperparameters such as the replay step size and the number of replay iterations . However , the values assigned to these hyperparameters are often hand-crafted and kept fixed during the whole learning process in previous research on memory replay methods . In this work , we address this problem by proposing a method that is able to dynamically adapt the hyperparameters of memory replay methods in an online manner . Specifically , based on a closedloop CL framework , we apply reinforcement learning to adjust replay hyperparameters to achieve a dynamic adjustment between stability and plasticity . We formulate the problem of adjusting replay hyperparameters as a Markov decision process and use a purpose-built state space to capture the current performance of the CL model and the relevant input data information for replay hyperparameter decision-making . To address the non-stationarity of the environment , we propose a Q function with task-shared and task-specific components . The proposed RL-based methods are used to improve the two replay-based methods ER ( Chaudhry et al. , 2019 ) and SCR ( Mai et al. , 2021b ) , and achieve adaptive memory replay . 2 RELATED WORK . 2.1 CONTINUAL LEARNING . Continual learning is concerned with learning a sequence of tasks . In each task t , data X ( t ) is sampled from distribution D ( t ) ; the corresponding class labels are Y ( t ) . The goal is to minimize the loss on all seen tasks given limited or no access to data X ( t ) , Y ( t ) from previous tasks t < T : ∑T t=1 E ( X ( t ) , Y ( t ) ) [ ` ( f ( X ( t ) ; θ ) , Y ( t ) ) ] with loss function ` , CL parameters θ , T the number of tasks seen so far , and f representing the CL network function . In recent years , continual learning methods have been proposed to deal with different problem settings and evaluation protocols . Van de Ven & Tolias ( 2019 ) summarize three continual learning scenarios based on whether task identity is provided at test time . Notably , there are substantial differences between the difficulties of these three scenarios . The first scenario is task-incremental , which assumes the task identity is provided at test time . Methods proposed for this scenario usually train task-specific components to prevent the interference between new tasks and old task ( Yoon et al. , 2020 ; 2018 ; Mallya & Lazebnik , 2018 ) . A common practice in this setting is to use multi-head evaluation with a separate output layer ( head ) assigned to each task . The task ID is used to determine the head to use for inference . This scenario is the easiest since the model just needs to distinguish classes within a task . The second scenario is domain incremental , where the structure of the task is always the same and the input distribution is changing . The last scenario is class-incremental , with new tasks containing new classes . This setting employs single-head evaluation , meaning the CL agent needs to classify all the classes seen so far , without known task information . This setting can be used as a realistic framework of the common real-world problem of incrementally learning new classes of objects . Another aspect of CL is whether offline or online learning is considered . The offline CL setting assumes full access to the whole data for a task at once . Therefore , training on each single task can be performed over multiple epochs , before moving on to the next task ( Rebuffi et al. , 2017 ) . The online CL setting is more challenging : a stream of samples is seen only once and the sampling distribution is non-IID . In this paper , we focus on this more challenging and realistic setting . To combat catastrophic forgetting , CL methods can be categorized into three families : replay methods , regularization-based methods , and parameter isolation methods ( Delange et al. , 2021 ; Parisi et al. , 2019 ) . The regularization methods , such as EWC++ ( Chaudhry et al. , 2018a ) and LWF ( Li & Hoiem , 2017 ) introduce a regularization term in the loss function to prevent dramatic changes to important parameters and consolidate previous knowledge . Parameter isolation-based methods assign different subsets of model parameters to different tasks to prevent the interference between tasks . Some examples include methods that dynamically expand the network , such as RCL ( Xu & Zhu , 2018 ) , APD ( Yoon et al. , 2020 ) , and DEN ( Yoon et al. , 2018 ) ; alternatively , one can use a fixed network ( Mallya & Lazebnik , 2018 ) . This line of work generally requires knowledge of the task ID at test time and thus is applied in the task-incremental scenario . Replay-based methods retain a memory to store past data for joint training ( Chaudhry et al. , 2019 ; Prabhu et al. , 2020 ) . Some methods in this area focus on how to store and sample informative memory samples , such as MIR ( Aljundi et al. , 2019 ) . Recent work uses supervised contrastive loss in memory-replay to help learn a high-quality feature representation ( Mai et al. , 2021b ) . Some work also combines the regularization and replay approaches , such as MC-SGD ( Mirzadeh et al. , 2020 ) , ICARL ( Rebuffi et al. , 2017 ) . In terms of hyperparameter tuning for continual learning , most work in CL simply employs offline hyperparameter optimization using a held-out validation set . However , there is some recent work that discusses hyperparameter tuning frameworks specifically designed for continual learning settings without a representative validation set . For offline continual learning , Delange et al . ( 2021 ) proposes a method to dynamically balance the stability-plasticity trade-off via a maximal plasticity search followed by stability decay . Instead of requiring a validation set covering all the tasks , this method makes use of a held-out validation set for a new task ; however , some parameters , like the tolerance threshold and decaying speed , need to be manually set in advance . Considering the online continual learning setting , Chaudhry et al . ( 2018b ) and Mai et al . ( 2021a ) employ a hyperparameter tuning protocol targeting this setting . These approaches use external cross-validation data streaming with a small number of tasks . Offline hyperparameter tuning is applied on this external validation data with multiple passes to identify optimal values , which are then used for the actual online continual learning tasks . A limitation of this work is that it relies on external validation data . Depending on the similarity between the validation tasks and the actual continual learning tasks , the chosen hyperparameters may not be appropriate . 2.2 REINFORCEMENT LEARNING . Reinforcement learning ( RL ) concerns the problem of sequential decision-making in a stochastic environment ( Sutton & Barto , 2018 ) . In standard reinforcement learning settings , an RL agent interacts with the environment to maximize the long-term rewards . Typically , this interactive process is formulated as a Markov decision process ( MDP ) described by a tuple < S , A , R , P , γ > , where S is the state space , A is the action space , R : S×A→ R is the reward function , P : S×A×A→ [ 0 , 1 ] is the state transition probability , and γ is the discount factor . The agent behavior is defined as the policy π : S → A that determines how and action is selected during the interaction . The goal of the RL agent is to learn a policy that maximizes the cumulative rewards in an episode . The action-value function Qπ ( s , a ) is used to represent the expected long-term reward of executing action a in state s , where s0 is the initial state distribution . Although reinforcement learning has achieved superior performance in many challenging applications such as board games , continual locomotion control , and complex computer games ( Schrittwieser et al. , 2020 ; Mnih et al. , 2015 ; Vinyals et al. , 2019 ) , its application to adapting the learning process of other machine learning algorithms is relatively limited . Reinforcement learning and bandits algorithms have been used in the area of neural network architecture search and offline hyperparameter optimization in IID environments where a held-out validation set is available and the reward distribution is static ( Li et al. , 2017 ; Parker-Holder et al. , 2020 ; Hoffman et al. , 2014 ) . To our knowledge , the only work applying reinforcement learning in continual learning is in the parameter isolation-based method , which applies it to dynamically expand a network ( Xu & Zhu , 2018 ) . This approach is applied in the offline task-incremental continual learning setting and assumes access to a held-out validation set . There does not appear to be any work that applies reinforcement learning to replay-based continual learning methods or online continual learning settings . | The authors present an approach for continual learning based on replay. By finding a way to represent hyperparameters of the replay learning process, specifically the replay ratio and the amount of replay iterations, the authors use a reinforcement learning approach to attempt to find the optimal parameters for each epoch. The impetus for this design is ascribed to the fact that in the continual learning regime it is expected that the input distribution is not stationary and so we would also like to be able to modify the parameters automatically in response to the change in present data. The authors provide experimental results for this method on cifar10, cifar100, and CLRS and by using their approach in complement to Experience Replay (ER) and Supervised Contrastive Replay (SCR). | SP:7df4ab11155a311ef5c73c5ee96b61d9aa8148ff |
Closed-loop Control for Online Continual Learning | 1 INTRODUCTION . A major challenge in research on artificial neural networks is to develop incremental learning ability to accumulate knowledge over time from a non-stationary stream of data . Most deep learning techniques are designed with the assumption that the training samples are drawn independently and identically from a fixed data distribution , but this assumption is often violated in ever-changing realworld environments . Most successful deep learning results are achieved by training on pre-collected datasets . The resulting model is static and incapable of adapting its behavior to the non-stationary environment over time ( Delange et al. , 2021 ) . When new data becomes available , the training process needs to restart again . In a non-stationary environment , training on the new data can seriously undermine the model ’ s previously acquired knowledge of past data , which may cause what is known as “ catastrophic forgetting ” ( Parisi et al. , 2019 ) . In many real-world applications , a large amount of new data are generated continually , and it has become increasingly important to ensure that the learning agent has lifelong learning capabilities to learn new knowledge and maintain the old knowledge . Our work focuses on online class incremental ( OCI ) continual learning problems to learn a sequence of classification tasks with a single pass over the data . To address the problem of catastrophic forgetting in this setting , continual learning algorithms need to balance between stability and plasticity : the ability to robustly maintain old knowledge while being able to quickly incorporate new knowledge . Previous work on continual learning deals with this problem by modifying the standard training process using memory replay-based , regularization-based , or parameter isolation-based techniques . The work presented in this paper rests on the observation that , besides requiring changes to the training algorithm , the sequential learning process also brings special challenges to the hyperparameter tuning process , which has not been extensively studied so far . In fact , a large number of CL methods have to rely on well-selected hyperparameters to effectively balance the trade-off between stability and plasticity ; to search for the best hyperparameters , most research in this area follows an offline approach to go through the whole data sequence several times measuring performance against a representative , held-out validation set . This violates the fundamental assumption of continual learning , namely that there is no access to previous task data . There is some work on heuristic hyperparameter tuning specifically designed for online CL ( Aljundi et al. , 2019 ; Mai et al. , 2021a ) , but it requires extra held-out task validation data , which may not be available . To address the hyperparameter tuning problem , we propose a closed-loop continual learning framework that is able to balance stability and plasticity without access to an external held-out validation set . Specifically , we build a real-time feedback signal that measures the performance of the CL agent and enables online hyperparameter tuning using reinforcement learning ( RL ) . The proposed closed-loop CL framework is combined with replay-based continual learning to achieve adaptive memory replay for online class-incremental continual learning . Replay-based CL methods prevent forgetting of previously learned knowledge by maintaining a small memory of past data and performing joint training on incoming and memorized data during the optimization process . Despite their simplicity , these methods have significantly outperformed CL approaches without episodic memory in the online class-incremental setting ( Chaudhry et al. , 2019 ) . Compared to standard supervised learning , two main challenges exist in memory replay methods . One is the risk of overfitting the memory , as a relatively small amount of memorized samples are repeatedly rehearsed in the training process . The other challenge is the class imbalance problem in the joint training process : generally , only a relatively small amount of old-class data is available in the memory . Because of these challenges , it is important to be able to modulate the replay dynamics of these methods by hyperparameters such as the replay step size and the number of replay iterations . However , the values assigned to these hyperparameters are often hand-crafted and kept fixed during the whole learning process in previous research on memory replay methods . In this work , we address this problem by proposing a method that is able to dynamically adapt the hyperparameters of memory replay methods in an online manner . Specifically , based on a closedloop CL framework , we apply reinforcement learning to adjust replay hyperparameters to achieve a dynamic adjustment between stability and plasticity . We formulate the problem of adjusting replay hyperparameters as a Markov decision process and use a purpose-built state space to capture the current performance of the CL model and the relevant input data information for replay hyperparameter decision-making . To address the non-stationarity of the environment , we propose a Q function with task-shared and task-specific components . The proposed RL-based methods are used to improve the two replay-based methods ER ( Chaudhry et al. , 2019 ) and SCR ( Mai et al. , 2021b ) , and achieve adaptive memory replay . 2 RELATED WORK . 2.1 CONTINUAL LEARNING . Continual learning is concerned with learning a sequence of tasks . In each task t , data X ( t ) is sampled from distribution D ( t ) ; the corresponding class labels are Y ( t ) . The goal is to minimize the loss on all seen tasks given limited or no access to data X ( t ) , Y ( t ) from previous tasks t < T : ∑T t=1 E ( X ( t ) , Y ( t ) ) [ ` ( f ( X ( t ) ; θ ) , Y ( t ) ) ] with loss function ` , CL parameters θ , T the number of tasks seen so far , and f representing the CL network function . In recent years , continual learning methods have been proposed to deal with different problem settings and evaluation protocols . Van de Ven & Tolias ( 2019 ) summarize three continual learning scenarios based on whether task identity is provided at test time . Notably , there are substantial differences between the difficulties of these three scenarios . The first scenario is task-incremental , which assumes the task identity is provided at test time . Methods proposed for this scenario usually train task-specific components to prevent the interference between new tasks and old task ( Yoon et al. , 2020 ; 2018 ; Mallya & Lazebnik , 2018 ) . A common practice in this setting is to use multi-head evaluation with a separate output layer ( head ) assigned to each task . The task ID is used to determine the head to use for inference . This scenario is the easiest since the model just needs to distinguish classes within a task . The second scenario is domain incremental , where the structure of the task is always the same and the input distribution is changing . The last scenario is class-incremental , with new tasks containing new classes . This setting employs single-head evaluation , meaning the CL agent needs to classify all the classes seen so far , without known task information . This setting can be used as a realistic framework of the common real-world problem of incrementally learning new classes of objects . Another aspect of CL is whether offline or online learning is considered . The offline CL setting assumes full access to the whole data for a task at once . Therefore , training on each single task can be performed over multiple epochs , before moving on to the next task ( Rebuffi et al. , 2017 ) . The online CL setting is more challenging : a stream of samples is seen only once and the sampling distribution is non-IID . In this paper , we focus on this more challenging and realistic setting . To combat catastrophic forgetting , CL methods can be categorized into three families : replay methods , regularization-based methods , and parameter isolation methods ( Delange et al. , 2021 ; Parisi et al. , 2019 ) . The regularization methods , such as EWC++ ( Chaudhry et al. , 2018a ) and LWF ( Li & Hoiem , 2017 ) introduce a regularization term in the loss function to prevent dramatic changes to important parameters and consolidate previous knowledge . Parameter isolation-based methods assign different subsets of model parameters to different tasks to prevent the interference between tasks . Some examples include methods that dynamically expand the network , such as RCL ( Xu & Zhu , 2018 ) , APD ( Yoon et al. , 2020 ) , and DEN ( Yoon et al. , 2018 ) ; alternatively , one can use a fixed network ( Mallya & Lazebnik , 2018 ) . This line of work generally requires knowledge of the task ID at test time and thus is applied in the task-incremental scenario . Replay-based methods retain a memory to store past data for joint training ( Chaudhry et al. , 2019 ; Prabhu et al. , 2020 ) . Some methods in this area focus on how to store and sample informative memory samples , such as MIR ( Aljundi et al. , 2019 ) . Recent work uses supervised contrastive loss in memory-replay to help learn a high-quality feature representation ( Mai et al. , 2021b ) . Some work also combines the regularization and replay approaches , such as MC-SGD ( Mirzadeh et al. , 2020 ) , ICARL ( Rebuffi et al. , 2017 ) . In terms of hyperparameter tuning for continual learning , most work in CL simply employs offline hyperparameter optimization using a held-out validation set . However , there is some recent work that discusses hyperparameter tuning frameworks specifically designed for continual learning settings without a representative validation set . For offline continual learning , Delange et al . ( 2021 ) proposes a method to dynamically balance the stability-plasticity trade-off via a maximal plasticity search followed by stability decay . Instead of requiring a validation set covering all the tasks , this method makes use of a held-out validation set for a new task ; however , some parameters , like the tolerance threshold and decaying speed , need to be manually set in advance . Considering the online continual learning setting , Chaudhry et al . ( 2018b ) and Mai et al . ( 2021a ) employ a hyperparameter tuning protocol targeting this setting . These approaches use external cross-validation data streaming with a small number of tasks . Offline hyperparameter tuning is applied on this external validation data with multiple passes to identify optimal values , which are then used for the actual online continual learning tasks . A limitation of this work is that it relies on external validation data . Depending on the similarity between the validation tasks and the actual continual learning tasks , the chosen hyperparameters may not be appropriate . 2.2 REINFORCEMENT LEARNING . Reinforcement learning ( RL ) concerns the problem of sequential decision-making in a stochastic environment ( Sutton & Barto , 2018 ) . In standard reinforcement learning settings , an RL agent interacts with the environment to maximize the long-term rewards . Typically , this interactive process is formulated as a Markov decision process ( MDP ) described by a tuple < S , A , R , P , γ > , where S is the state space , A is the action space , R : S×A→ R is the reward function , P : S×A×A→ [ 0 , 1 ] is the state transition probability , and γ is the discount factor . The agent behavior is defined as the policy π : S → A that determines how and action is selected during the interaction . The goal of the RL agent is to learn a policy that maximizes the cumulative rewards in an episode . The action-value function Qπ ( s , a ) is used to represent the expected long-term reward of executing action a in state s , where s0 is the initial state distribution . Although reinforcement learning has achieved superior performance in many challenging applications such as board games , continual locomotion control , and complex computer games ( Schrittwieser et al. , 2020 ; Mnih et al. , 2015 ; Vinyals et al. , 2019 ) , its application to adapting the learning process of other machine learning algorithms is relatively limited . Reinforcement learning and bandits algorithms have been used in the area of neural network architecture search and offline hyperparameter optimization in IID environments where a held-out validation set is available and the reward distribution is static ( Li et al. , 2017 ; Parker-Holder et al. , 2020 ; Hoffman et al. , 2014 ) . To our knowledge , the only work applying reinforcement learning in continual learning is in the parameter isolation-based method , which applies it to dynamically expand a network ( Xu & Zhu , 2018 ) . This approach is applied in the offline task-incremental continual learning setting and assumes access to a held-out validation set . There does not appear to be any work that applies reinforcement learning to replay-based continual learning methods or online continual learning settings . | This submission proposes an RL-based method for tuning hyper-parameters of continual learning (CL) methods. The rationale is that tuning hyper-parameters on the entire set of tasks off-line invalidates the CL assumption of online learning, and therefore online methods are needed. The authors discuss the elements that make up the state space for making hyper-parameter choices, such as various performance metrics, and use use (deep) Q-learning to train an RL agent to make decisions about the hyper-parameter to use at each training step. The approach is applied on top of two existing replay-based methods, varying two hyper-parameters (one each in separate evaluations), and demonstrated to achieve improved performance w.r.t. the _un-tuned_ variants. | SP:7df4ab11155a311ef5c73c5ee96b61d9aa8148ff |
Closed-loop Control for Online Continual Learning | 1 INTRODUCTION . A major challenge in research on artificial neural networks is to develop incremental learning ability to accumulate knowledge over time from a non-stationary stream of data . Most deep learning techniques are designed with the assumption that the training samples are drawn independently and identically from a fixed data distribution , but this assumption is often violated in ever-changing realworld environments . Most successful deep learning results are achieved by training on pre-collected datasets . The resulting model is static and incapable of adapting its behavior to the non-stationary environment over time ( Delange et al. , 2021 ) . When new data becomes available , the training process needs to restart again . In a non-stationary environment , training on the new data can seriously undermine the model ’ s previously acquired knowledge of past data , which may cause what is known as “ catastrophic forgetting ” ( Parisi et al. , 2019 ) . In many real-world applications , a large amount of new data are generated continually , and it has become increasingly important to ensure that the learning agent has lifelong learning capabilities to learn new knowledge and maintain the old knowledge . Our work focuses on online class incremental ( OCI ) continual learning problems to learn a sequence of classification tasks with a single pass over the data . To address the problem of catastrophic forgetting in this setting , continual learning algorithms need to balance between stability and plasticity : the ability to robustly maintain old knowledge while being able to quickly incorporate new knowledge . Previous work on continual learning deals with this problem by modifying the standard training process using memory replay-based , regularization-based , or parameter isolation-based techniques . The work presented in this paper rests on the observation that , besides requiring changes to the training algorithm , the sequential learning process also brings special challenges to the hyperparameter tuning process , which has not been extensively studied so far . In fact , a large number of CL methods have to rely on well-selected hyperparameters to effectively balance the trade-off between stability and plasticity ; to search for the best hyperparameters , most research in this area follows an offline approach to go through the whole data sequence several times measuring performance against a representative , held-out validation set . This violates the fundamental assumption of continual learning , namely that there is no access to previous task data . There is some work on heuristic hyperparameter tuning specifically designed for online CL ( Aljundi et al. , 2019 ; Mai et al. , 2021a ) , but it requires extra held-out task validation data , which may not be available . To address the hyperparameter tuning problem , we propose a closed-loop continual learning framework that is able to balance stability and plasticity without access to an external held-out validation set . Specifically , we build a real-time feedback signal that measures the performance of the CL agent and enables online hyperparameter tuning using reinforcement learning ( RL ) . The proposed closed-loop CL framework is combined with replay-based continual learning to achieve adaptive memory replay for online class-incremental continual learning . Replay-based CL methods prevent forgetting of previously learned knowledge by maintaining a small memory of past data and performing joint training on incoming and memorized data during the optimization process . Despite their simplicity , these methods have significantly outperformed CL approaches without episodic memory in the online class-incremental setting ( Chaudhry et al. , 2019 ) . Compared to standard supervised learning , two main challenges exist in memory replay methods . One is the risk of overfitting the memory , as a relatively small amount of memorized samples are repeatedly rehearsed in the training process . The other challenge is the class imbalance problem in the joint training process : generally , only a relatively small amount of old-class data is available in the memory . Because of these challenges , it is important to be able to modulate the replay dynamics of these methods by hyperparameters such as the replay step size and the number of replay iterations . However , the values assigned to these hyperparameters are often hand-crafted and kept fixed during the whole learning process in previous research on memory replay methods . In this work , we address this problem by proposing a method that is able to dynamically adapt the hyperparameters of memory replay methods in an online manner . Specifically , based on a closedloop CL framework , we apply reinforcement learning to adjust replay hyperparameters to achieve a dynamic adjustment between stability and plasticity . We formulate the problem of adjusting replay hyperparameters as a Markov decision process and use a purpose-built state space to capture the current performance of the CL model and the relevant input data information for replay hyperparameter decision-making . To address the non-stationarity of the environment , we propose a Q function with task-shared and task-specific components . The proposed RL-based methods are used to improve the two replay-based methods ER ( Chaudhry et al. , 2019 ) and SCR ( Mai et al. , 2021b ) , and achieve adaptive memory replay . 2 RELATED WORK . 2.1 CONTINUAL LEARNING . Continual learning is concerned with learning a sequence of tasks . In each task t , data X ( t ) is sampled from distribution D ( t ) ; the corresponding class labels are Y ( t ) . The goal is to minimize the loss on all seen tasks given limited or no access to data X ( t ) , Y ( t ) from previous tasks t < T : ∑T t=1 E ( X ( t ) , Y ( t ) ) [ ` ( f ( X ( t ) ; θ ) , Y ( t ) ) ] with loss function ` , CL parameters θ , T the number of tasks seen so far , and f representing the CL network function . In recent years , continual learning methods have been proposed to deal with different problem settings and evaluation protocols . Van de Ven & Tolias ( 2019 ) summarize three continual learning scenarios based on whether task identity is provided at test time . Notably , there are substantial differences between the difficulties of these three scenarios . The first scenario is task-incremental , which assumes the task identity is provided at test time . Methods proposed for this scenario usually train task-specific components to prevent the interference between new tasks and old task ( Yoon et al. , 2020 ; 2018 ; Mallya & Lazebnik , 2018 ) . A common practice in this setting is to use multi-head evaluation with a separate output layer ( head ) assigned to each task . The task ID is used to determine the head to use for inference . This scenario is the easiest since the model just needs to distinguish classes within a task . The second scenario is domain incremental , where the structure of the task is always the same and the input distribution is changing . The last scenario is class-incremental , with new tasks containing new classes . This setting employs single-head evaluation , meaning the CL agent needs to classify all the classes seen so far , without known task information . This setting can be used as a realistic framework of the common real-world problem of incrementally learning new classes of objects . Another aspect of CL is whether offline or online learning is considered . The offline CL setting assumes full access to the whole data for a task at once . Therefore , training on each single task can be performed over multiple epochs , before moving on to the next task ( Rebuffi et al. , 2017 ) . The online CL setting is more challenging : a stream of samples is seen only once and the sampling distribution is non-IID . In this paper , we focus on this more challenging and realistic setting . To combat catastrophic forgetting , CL methods can be categorized into three families : replay methods , regularization-based methods , and parameter isolation methods ( Delange et al. , 2021 ; Parisi et al. , 2019 ) . The regularization methods , such as EWC++ ( Chaudhry et al. , 2018a ) and LWF ( Li & Hoiem , 2017 ) introduce a regularization term in the loss function to prevent dramatic changes to important parameters and consolidate previous knowledge . Parameter isolation-based methods assign different subsets of model parameters to different tasks to prevent the interference between tasks . Some examples include methods that dynamically expand the network , such as RCL ( Xu & Zhu , 2018 ) , APD ( Yoon et al. , 2020 ) , and DEN ( Yoon et al. , 2018 ) ; alternatively , one can use a fixed network ( Mallya & Lazebnik , 2018 ) . This line of work generally requires knowledge of the task ID at test time and thus is applied in the task-incremental scenario . Replay-based methods retain a memory to store past data for joint training ( Chaudhry et al. , 2019 ; Prabhu et al. , 2020 ) . Some methods in this area focus on how to store and sample informative memory samples , such as MIR ( Aljundi et al. , 2019 ) . Recent work uses supervised contrastive loss in memory-replay to help learn a high-quality feature representation ( Mai et al. , 2021b ) . Some work also combines the regularization and replay approaches , such as MC-SGD ( Mirzadeh et al. , 2020 ) , ICARL ( Rebuffi et al. , 2017 ) . In terms of hyperparameter tuning for continual learning , most work in CL simply employs offline hyperparameter optimization using a held-out validation set . However , there is some recent work that discusses hyperparameter tuning frameworks specifically designed for continual learning settings without a representative validation set . For offline continual learning , Delange et al . ( 2021 ) proposes a method to dynamically balance the stability-plasticity trade-off via a maximal plasticity search followed by stability decay . Instead of requiring a validation set covering all the tasks , this method makes use of a held-out validation set for a new task ; however , some parameters , like the tolerance threshold and decaying speed , need to be manually set in advance . Considering the online continual learning setting , Chaudhry et al . ( 2018b ) and Mai et al . ( 2021a ) employ a hyperparameter tuning protocol targeting this setting . These approaches use external cross-validation data streaming with a small number of tasks . Offline hyperparameter tuning is applied on this external validation data with multiple passes to identify optimal values , which are then used for the actual online continual learning tasks . A limitation of this work is that it relies on external validation data . Depending on the similarity between the validation tasks and the actual continual learning tasks , the chosen hyperparameters may not be appropriate . 2.2 REINFORCEMENT LEARNING . Reinforcement learning ( RL ) concerns the problem of sequential decision-making in a stochastic environment ( Sutton & Barto , 2018 ) . In standard reinforcement learning settings , an RL agent interacts with the environment to maximize the long-term rewards . Typically , this interactive process is formulated as a Markov decision process ( MDP ) described by a tuple < S , A , R , P , γ > , where S is the state space , A is the action space , R : S×A→ R is the reward function , P : S×A×A→ [ 0 , 1 ] is the state transition probability , and γ is the discount factor . The agent behavior is defined as the policy π : S → A that determines how and action is selected during the interaction . The goal of the RL agent is to learn a policy that maximizes the cumulative rewards in an episode . The action-value function Qπ ( s , a ) is used to represent the expected long-term reward of executing action a in state s , where s0 is the initial state distribution . Although reinforcement learning has achieved superior performance in many challenging applications such as board games , continual locomotion control , and complex computer games ( Schrittwieser et al. , 2020 ; Mnih et al. , 2015 ; Vinyals et al. , 2019 ) , its application to adapting the learning process of other machine learning algorithms is relatively limited . Reinforcement learning and bandits algorithms have been used in the area of neural network architecture search and offline hyperparameter optimization in IID environments where a held-out validation set is available and the reward distribution is static ( Li et al. , 2017 ; Parker-Holder et al. , 2020 ; Hoffman et al. , 2014 ) . To our knowledge , the only work applying reinforcement learning in continual learning is in the parameter isolation-based method , which applies it to dynamically expand a network ( Xu & Zhu , 2018 ) . This approach is applied in the offline task-incremental continual learning setting and assumes access to a held-out validation set . There does not appear to be any work that applies reinforcement learning to replay-based continual learning methods or online continual learning settings . | This paper takes a particular continual learning setup and addresses the challenge of choosing two important hyper-parameters of standard continual learning approaches based on experience replay: the online-to-memory loss ratio, and the number of replay iterations. A DQN-style reinforcement learning approach is proposed to adapt these two parameters online. An additional small test memory is introduced, which is used to construct the reward and states. The efficacy of the approach is demonstrated using CIFAR datasets. | SP:7df4ab11155a311ef5c73c5ee96b61d9aa8148ff |
Semi-Empirical Objective Functions for Neural MCMC Proposal Optimization | 1 INTRODUCTION . The development of efficient Markov Chain Monte Carlo ( MCMC ) proposal distributions is vital to enable numerical estimation and statistical inference in increasingly complicated problem domains . If we had an exact definition of the notion of MCMC efficiency , this could be accomplished by straightforward optimization over a set of proposal distributions . Past computational limitations encouraged the use of architecturally limited MCMC schemes that yield useful results for a wide range of target distributions , such as Random Walk Metropolis ( RWM ) ( Metropolis et al. , 1953 ) , Metroplis Adjusted Langevin Diffusion ( MALA ) ( Besag and Green , 1993 ) , and Hamiltonian Monte Carlo ( HMC ) ( Duane et al. , 1987 ) . Although much research has been devoted to adaptive methods to improve MCMC performance , traditional adaptive methods ( Roberts and Rosenthal , 2009 ; Sejdinovic et al. , 2014 ; Haario et al. , 2001 ; Roberts and Rosenthal , 2007 ) focus on optimization across highly restricted proposal distribution model classes . Ideally , we would like to develop a practical means of optimizing MCMC performance over arbitrarily parameterized classes of proposal distributions . Given their demonstrated success in parameterizing expressive distributions , deep generative models are naturally suited to the problem of MCMC proposal optimization . Recent research regarding applications of deep learning to proposal optimization has yielded new MCMC schemes ( Song et al. , 2017 ; Spanbauer et al. , 2020 ; Hoffman et al. , 2019 ) and extensions of existing schemes ( de Freitas et al. , 2001 ; Habib and Barber , 2018 ; Levy et al. , 2018 ; Li et al. , 2021 ) . A variety of objective functions are utilized to optimize these deep learning based approaches , with functional forms generally dependent on the type of MCMC scheme being optimized . As demonstrated by the experiments of this work , the objective functions currently used for MCMC proposal optimization rely on model class restrictions imposed on the proposal architecture and are not suitable for optimizing proposal distributions more expressive than traditional MCMC schemes . In this work , we introduce and demonstrate Ab Initio objective functions for MCMC proposal optimization intended to remain compatible with any proposal distribution defined using deep generative models . Presumably , there exists some `` ground truth '' objective function underlying our notion of MCMC sampling performance . However , even after the decades of research regarding MCMC methods , there appears to be no universal definition for what we mean by MCMC efficiency . Metrics like effective sample size ( ESS ) ( Gelman et al. , 2013 ; Vats et al. , 2019 ) generally coincide with our notion of sampling performance , but no such metric serves as the canonical definition of MCMC efficiency . Theoretical analysis regarding optimal acceptance rates for particular MCMC schemes ( Roberts et al. , 2001 ; Gelman et al. , 1997 ; Roberts and Rosenthal , 1998 ; Neal et al. , 2012 ; Beskos et al. , 2013 ) considers restricted proposal schemes and targets within a continuous diffusionary limit wherein our common performance metrics converge in their definition of optimality ( Roberts et al. , 2001 ) . Within this diffusionary limit , useful properties regarding MCMC optimality ( e.g . the rules of thumb to seek an acceptance rate of 0.234 when using RWM and of 0.574 when using MALA ) may be derived without specifically defining sampling performance . In light of the lack of an exactly specified objective function for MCMC efficiency , our Ab Initio objective functions seek to approximate the ground truth definition of sampling performance by adhering to certain reasonable first principles properties and fitting to reproduce the `` mathematical observations '' provided by existing theoretical analysis of optimal acceptance rates . Our contributions are as follows : • We describe a set of first principles properties that may be reasonably assumed of the ground truth objective function underlying our notion of MCMC efficiency . • We illustrate the construction of an example Ab Initio objective function via the combination of simpler objective functions with coefficients determined to reproduce optimal behavior on reference problems with analytically known solutions . • We verify the generality of the resulting Ab Initio objective function through its ability to closely reproduce analytically known optimal results for a wide range of optimization tasks beyond the reference problem used in its construction . • Through a series of illustrative experiments , we demonstrate the advantages of Ab Initio objective functions for optimizing arbitrarily defined MCMC proposal distributions . 2 RELATION TO PRIOR WORK . Ab Initio techniques ( Hehre , 1976 ; Yin and Cohen , 1982 ; Marx and Hutter , 2009 ) are used in the physical sciences to simulate systems that would otherwise be unobservable in a laboratory setting . These Ab Initio methods are founded on principled approximations of fundamental physical laws with parameters chosen to reproduce the properties of reference systems that can be observed . We take inspiration from these methods in the physical sciences in forming the methodology of this work . The purpose of this work is to introduce a procedure for selecting objective functions for MCMC proposal optimization that are suited to the optimization of proposal model classes arbitrarily parameterized by deep generative models . Research into the applications of deep learning for MCMC proposal optimization ( Song et al. , 2017 ; Spanbauer et al. , 2020 ; Hoffman et al. , 2019 ; de Freitas et al. , 2001 ; Habib and Barber , 2018 ; Levy et al. , 2018 ; Li et al. , 2021 ) has yielded a number of potential candidates for this objective function . We therefore compare our Ab Initio objective functions to these candidates on the basis of their suitability for optimization of arbitrary proposal distributions . Pure KL-divergence based objectives ( de Freitas et al. , 2001 ; Habib and Barber , 2018 ; Neklyudov et al. , 2018 ; Wang et al. , 2018 ) have found some success , particularly when optimizing resampling style schemes . These objectives are unable to properly optimize proposals within a diffusionary limit ( Titsias and Dellaportas , 2019 ) . We therefore omit pure KL-divergence based objectives from the comparisons within this work . Adversarial objectives have been used to optimize proposal distributions , notably with A-NICE-MC ( Song et al. , 2017 ; Spanbauer et al. , 2020 ) . We view adversarial training as approximately optimizing an existing performance measure ( e.g . KL-divergence ) , rather than defining a fundamentally new performance measure . We therefore also omit adversarial objectives from our comparisons . Mean squared jump distance ( Pasarica and Gelman , 2010 ) ( MSJD ) remains a popular objective for optimizing proposals . Notably , L2HMC ( Levy et al. , 2018 ) is optimized using a modification of MSJD with a regularization intended to encourage mixing of the resulting Markov Chain . As shown in our experiments , both MSJD and L2HMC ’ s modification can produce arbitrarily non-ergodic Markov Chains when optimizing proposal distributions with position dependence . Our Ab Initio objective functions avoid this undesirable optimization behavior by maintaining i.i.d . resampling from the target as their unique global minima . Another potential advantage of the Ab Initio objective of Equation ( 2 ) over MSJD based objective functions is that it does not rely on the notion of a metric of the underlying space of the proposal distribution , and so may be more suited to optimizing proposals in settings where the space is equipped with only a measure and not a metric ( e.g . MCMC settings involving discrete or graph based distributions ) . Recently , Titsias and Dellaportas ( 2019 ) introduced the Generalized Speed Measure ( GSM ) as an objective function for MCMC proposal optimization . The GSM amounts to maximizing proposal entropy subject to the constraint of achieving a user specified acceptance rate . Although it is theoretically well motivated , the GSM relies on knowledge of optimal acceptance rates for a given optimization problem , which will generally be unknown when using very general neural architectures . Our example Ab Initio objective function of Equation ( 1 ) takes inspiration from the components of the GSM , while also ensuring the functional limitations argued for in Section 4 . A key advantage of our Ab Initio objective functions over the GSM is that they do not require prior knowledge to recover near optimal MCMC behavior ( e.g . our Ab Initio objective function , whose construction only involved the knowledge of the optimal acceptance rate for RWM , recovers optimized MALA proposals with acceptance rates around 0.5 ) . An additional advantage of our Ab Initio objective functions over the GSM is that they may be used to compare the efficiencies of proposal distributions with differing acceptance rates outside of the context of parameter optimization . 3 MCMC PROPOSAL OPTIMIZATION . In this work , we consider the task of optimizing a proposal density gθ ( ~x′|~x ) ( ~x ∈ Rn ) to sample from a target density π ( ~x ) for a MCMC task . Proposals are accepted with rate αgθ , π ( ~x ′|~x ) that ensures the resulting Markov Chain converges towards π ( ~x ) . For this work , we restrict ourselves to Metropolis-Hastings type schemes , wherein αgθ , π ( ~x ′|~x ) = min { 1 , π ( ~x ′ ) gθ ( ~x|~x′ ) π ( ~x ) gθ ( ~x′|~x ) } . For optimization , we utilize some measure of sampling performance to define an objective function L [ g ; π ] that imposes an ordering over proposal distributions by defining g1 < g2 exactly when L [ g1 ; π ] > L [ g2 ; π ] . We do not seek to provide an argument for the application of deep learning methods to MCMC proposal optimization , so we will simply assume that all objective functions of interest are well-behaved for optimization via deep learning techniques ( i.e . they are continuous and almost surely differentiable ) . We will also assume that all proposal and target densities considered are positive and non-singular . Let G be the set of allowed proposals to consider during optimization and let D be the group of almost sure diffeomorphisms over the space of our data . To perform optimization , we first select some T ∈ D that provides us with the coordinate system we will use for optimization . Defining : T ◦ f ( ~z ) = f ( T−1 ( ~z ) ) |∂T −1 ( ~z ) ∂~z | We finally optimize to find gopt = argmin g∈G L [ T ◦ g ; T ◦ π ] . The focus of this work is to illustrate the construction of objective functions such that , when the model class G is very expansive ( e.g . having been parameterized by a deep generative model ) , the optimized proposal gopt aligns with our notion of an efficient MCMC proposal , as discussed below . 4 PROPERTIES OF THE GROUND TRUTH OBJECTIVE FUNCTION L∗ . For us to sensibly pursue the task of MCMC proposal optimization , we must assume the existence of some ground truth objective , L∗ , that produces our notion of sampling performance . As previously stated , we currently do not know a universal definition for L∗ . We may , however , assume that the ground truth objective satisfies a number of first principles properties : L∗ is Proper Define an objective function to be proper if it attains a unique global minimum at g ( ~x′|~x ) = π ( ~x′ ) and αg , π ( ~x′|~x ) = 1 for all ~x′ , ~x . The overall goal of our MCMC methodology is to approximate perfect i.i.d . sampling from the target , π . We therefore find it uncontroversial to assume that L∗ is proper . L∗ is Representation Independent Define an objective function , L , to be representation independent over a group of almost sure diffeomorphisms T if , for all T ∈ T , and for all proposal distributions g1 , g2 , L [ g1 ; π ] > L [ g2 ; π ] if and only if L [ T ◦ g1 ; T ◦ π ] > L [ T ◦ g2 ; T ◦ π ] . Similarly , we will say L is representation invariant over T if L [ T ◦ g ; T ◦ π ] = L [ g ; π ] for all g. If L∗ were not representation independent over D , then our definition of sampling performance would depend on which T ∈ D/H is used when computing the optimization , whereH is the maximal subgroup of D over which L∗ remains representation independent . To fully justify an ordering , we would need to justify our selection of a particular member from D/H , which we should expect to be exceptionally burdensome . Of course , we usually have little prior justification for selecting a particular T and instead often use the coordinate system in which data was originally collected , perhaps applying some rescaling and recentering . Thus , unless contradicted by future experimental or theoretical results , we should assume that L∗ is at least representation independent . L∗ Yields Established Optimal Results Prior theoretical analysis has established certain properties regarding optimal proposal distributions for a number of MCMC schemes under diffusionary limits . If L∗ is to correspond to the same notion of sampling performance , it must yield the same results . Thus , we should expect that optimization of L∗ will recover the properties established within these theoretical works when applied in the same diffusionary limits . | The paper approaches the problem of learning the optimal parameters of the MCMC chain. Namely, it tries to design an objective function that allows for the learning of a perfect proposal distribution in the Metropolis-Hastings algorithm. The main contribution of the current paper is based on the developments from [Titsias, 2019]. [Titsias, 2019] proposes the following objective for the optimization of the proposal $$\text{GSM} = \text{Acceptance Rate} + \beta \cdot \text{Entropy of the proposal}.$$ Maximization of this objective results in better mixing properties of the chain. Indeed, the next sample comes from a distribution with high entropy and should be accepted with a high probability, and the proposal should converge to the independent sampler in the perfect scenario. However, the choice of $\beta$ remains to be a question since it defines the tradeoff between the acceptance rate and the entropy, which is known to be different for different proposals and different targets. The original paper [Titsias, 2019] solves this issue by adaptively setting the acceptance rate to some desired value. The current paper then can be summarized as follows. Instead of setting $\beta$ adaptively based on the acceptance rate, the authors propose to set it constant. The constant is then found by "manual trial and error" in such a way that the acceptance rate of Random-Walk Metropolis-Hastings is 0.234 for high-dimensional standard Gaussian, which is known to be optimal for this task. Then this constant is claimed to be universal for all targets and proposals. To verify this empirically, the authors first optimize the parameters of MALA and RW Metropolis-Hastings for several synthetic targets (Uniform, Laplace, Cauchy, Gaussian) and demonstrate that the procedure yields the right parameters. Finally, the authors perform an empirical study of the proposed procedure. They use the proposed objective to learn a proposal parameterized by the normalizing flow and compare it to the optimization of the original objective from [Titsias, 2019] targeting different acceptance rates. The target distributions for the empirical study are a mixture of four Gaussians (2-D), Bayesian logistic regression (21-D, 14-D). [Titsias, 2019]: Titsias, Michalis, and Petros Dellaportas. "Gradient-based adaptive markov chain monte carlo." Advances in Neural Information Processing Systems 32 (2019): 15730-15739. | SP:bdaa8ab11c8bd2c4d72f7db4efa6efc576c25a24 |
Semi-Empirical Objective Functions for Neural MCMC Proposal Optimization | 1 INTRODUCTION . The development of efficient Markov Chain Monte Carlo ( MCMC ) proposal distributions is vital to enable numerical estimation and statistical inference in increasingly complicated problem domains . If we had an exact definition of the notion of MCMC efficiency , this could be accomplished by straightforward optimization over a set of proposal distributions . Past computational limitations encouraged the use of architecturally limited MCMC schemes that yield useful results for a wide range of target distributions , such as Random Walk Metropolis ( RWM ) ( Metropolis et al. , 1953 ) , Metroplis Adjusted Langevin Diffusion ( MALA ) ( Besag and Green , 1993 ) , and Hamiltonian Monte Carlo ( HMC ) ( Duane et al. , 1987 ) . Although much research has been devoted to adaptive methods to improve MCMC performance , traditional adaptive methods ( Roberts and Rosenthal , 2009 ; Sejdinovic et al. , 2014 ; Haario et al. , 2001 ; Roberts and Rosenthal , 2007 ) focus on optimization across highly restricted proposal distribution model classes . Ideally , we would like to develop a practical means of optimizing MCMC performance over arbitrarily parameterized classes of proposal distributions . Given their demonstrated success in parameterizing expressive distributions , deep generative models are naturally suited to the problem of MCMC proposal optimization . Recent research regarding applications of deep learning to proposal optimization has yielded new MCMC schemes ( Song et al. , 2017 ; Spanbauer et al. , 2020 ; Hoffman et al. , 2019 ) and extensions of existing schemes ( de Freitas et al. , 2001 ; Habib and Barber , 2018 ; Levy et al. , 2018 ; Li et al. , 2021 ) . A variety of objective functions are utilized to optimize these deep learning based approaches , with functional forms generally dependent on the type of MCMC scheme being optimized . As demonstrated by the experiments of this work , the objective functions currently used for MCMC proposal optimization rely on model class restrictions imposed on the proposal architecture and are not suitable for optimizing proposal distributions more expressive than traditional MCMC schemes . In this work , we introduce and demonstrate Ab Initio objective functions for MCMC proposal optimization intended to remain compatible with any proposal distribution defined using deep generative models . Presumably , there exists some `` ground truth '' objective function underlying our notion of MCMC sampling performance . However , even after the decades of research regarding MCMC methods , there appears to be no universal definition for what we mean by MCMC efficiency . Metrics like effective sample size ( ESS ) ( Gelman et al. , 2013 ; Vats et al. , 2019 ) generally coincide with our notion of sampling performance , but no such metric serves as the canonical definition of MCMC efficiency . Theoretical analysis regarding optimal acceptance rates for particular MCMC schemes ( Roberts et al. , 2001 ; Gelman et al. , 1997 ; Roberts and Rosenthal , 1998 ; Neal et al. , 2012 ; Beskos et al. , 2013 ) considers restricted proposal schemes and targets within a continuous diffusionary limit wherein our common performance metrics converge in their definition of optimality ( Roberts et al. , 2001 ) . Within this diffusionary limit , useful properties regarding MCMC optimality ( e.g . the rules of thumb to seek an acceptance rate of 0.234 when using RWM and of 0.574 when using MALA ) may be derived without specifically defining sampling performance . In light of the lack of an exactly specified objective function for MCMC efficiency , our Ab Initio objective functions seek to approximate the ground truth definition of sampling performance by adhering to certain reasonable first principles properties and fitting to reproduce the `` mathematical observations '' provided by existing theoretical analysis of optimal acceptance rates . Our contributions are as follows : • We describe a set of first principles properties that may be reasonably assumed of the ground truth objective function underlying our notion of MCMC efficiency . • We illustrate the construction of an example Ab Initio objective function via the combination of simpler objective functions with coefficients determined to reproduce optimal behavior on reference problems with analytically known solutions . • We verify the generality of the resulting Ab Initio objective function through its ability to closely reproduce analytically known optimal results for a wide range of optimization tasks beyond the reference problem used in its construction . • Through a series of illustrative experiments , we demonstrate the advantages of Ab Initio objective functions for optimizing arbitrarily defined MCMC proposal distributions . 2 RELATION TO PRIOR WORK . Ab Initio techniques ( Hehre , 1976 ; Yin and Cohen , 1982 ; Marx and Hutter , 2009 ) are used in the physical sciences to simulate systems that would otherwise be unobservable in a laboratory setting . These Ab Initio methods are founded on principled approximations of fundamental physical laws with parameters chosen to reproduce the properties of reference systems that can be observed . We take inspiration from these methods in the physical sciences in forming the methodology of this work . The purpose of this work is to introduce a procedure for selecting objective functions for MCMC proposal optimization that are suited to the optimization of proposal model classes arbitrarily parameterized by deep generative models . Research into the applications of deep learning for MCMC proposal optimization ( Song et al. , 2017 ; Spanbauer et al. , 2020 ; Hoffman et al. , 2019 ; de Freitas et al. , 2001 ; Habib and Barber , 2018 ; Levy et al. , 2018 ; Li et al. , 2021 ) has yielded a number of potential candidates for this objective function . We therefore compare our Ab Initio objective functions to these candidates on the basis of their suitability for optimization of arbitrary proposal distributions . Pure KL-divergence based objectives ( de Freitas et al. , 2001 ; Habib and Barber , 2018 ; Neklyudov et al. , 2018 ; Wang et al. , 2018 ) have found some success , particularly when optimizing resampling style schemes . These objectives are unable to properly optimize proposals within a diffusionary limit ( Titsias and Dellaportas , 2019 ) . We therefore omit pure KL-divergence based objectives from the comparisons within this work . Adversarial objectives have been used to optimize proposal distributions , notably with A-NICE-MC ( Song et al. , 2017 ; Spanbauer et al. , 2020 ) . We view adversarial training as approximately optimizing an existing performance measure ( e.g . KL-divergence ) , rather than defining a fundamentally new performance measure . We therefore also omit adversarial objectives from our comparisons . Mean squared jump distance ( Pasarica and Gelman , 2010 ) ( MSJD ) remains a popular objective for optimizing proposals . Notably , L2HMC ( Levy et al. , 2018 ) is optimized using a modification of MSJD with a regularization intended to encourage mixing of the resulting Markov Chain . As shown in our experiments , both MSJD and L2HMC ’ s modification can produce arbitrarily non-ergodic Markov Chains when optimizing proposal distributions with position dependence . Our Ab Initio objective functions avoid this undesirable optimization behavior by maintaining i.i.d . resampling from the target as their unique global minima . Another potential advantage of the Ab Initio objective of Equation ( 2 ) over MSJD based objective functions is that it does not rely on the notion of a metric of the underlying space of the proposal distribution , and so may be more suited to optimizing proposals in settings where the space is equipped with only a measure and not a metric ( e.g . MCMC settings involving discrete or graph based distributions ) . Recently , Titsias and Dellaportas ( 2019 ) introduced the Generalized Speed Measure ( GSM ) as an objective function for MCMC proposal optimization . The GSM amounts to maximizing proposal entropy subject to the constraint of achieving a user specified acceptance rate . Although it is theoretically well motivated , the GSM relies on knowledge of optimal acceptance rates for a given optimization problem , which will generally be unknown when using very general neural architectures . Our example Ab Initio objective function of Equation ( 1 ) takes inspiration from the components of the GSM , while also ensuring the functional limitations argued for in Section 4 . A key advantage of our Ab Initio objective functions over the GSM is that they do not require prior knowledge to recover near optimal MCMC behavior ( e.g . our Ab Initio objective function , whose construction only involved the knowledge of the optimal acceptance rate for RWM , recovers optimized MALA proposals with acceptance rates around 0.5 ) . An additional advantage of our Ab Initio objective functions over the GSM is that they may be used to compare the efficiencies of proposal distributions with differing acceptance rates outside of the context of parameter optimization . 3 MCMC PROPOSAL OPTIMIZATION . In this work , we consider the task of optimizing a proposal density gθ ( ~x′|~x ) ( ~x ∈ Rn ) to sample from a target density π ( ~x ) for a MCMC task . Proposals are accepted with rate αgθ , π ( ~x ′|~x ) that ensures the resulting Markov Chain converges towards π ( ~x ) . For this work , we restrict ourselves to Metropolis-Hastings type schemes , wherein αgθ , π ( ~x ′|~x ) = min { 1 , π ( ~x ′ ) gθ ( ~x|~x′ ) π ( ~x ) gθ ( ~x′|~x ) } . For optimization , we utilize some measure of sampling performance to define an objective function L [ g ; π ] that imposes an ordering over proposal distributions by defining g1 < g2 exactly when L [ g1 ; π ] > L [ g2 ; π ] . We do not seek to provide an argument for the application of deep learning methods to MCMC proposal optimization , so we will simply assume that all objective functions of interest are well-behaved for optimization via deep learning techniques ( i.e . they are continuous and almost surely differentiable ) . We will also assume that all proposal and target densities considered are positive and non-singular . Let G be the set of allowed proposals to consider during optimization and let D be the group of almost sure diffeomorphisms over the space of our data . To perform optimization , we first select some T ∈ D that provides us with the coordinate system we will use for optimization . Defining : T ◦ f ( ~z ) = f ( T−1 ( ~z ) ) |∂T −1 ( ~z ) ∂~z | We finally optimize to find gopt = argmin g∈G L [ T ◦ g ; T ◦ π ] . The focus of this work is to illustrate the construction of objective functions such that , when the model class G is very expansive ( e.g . having been parameterized by a deep generative model ) , the optimized proposal gopt aligns with our notion of an efficient MCMC proposal , as discussed below . 4 PROPERTIES OF THE GROUND TRUTH OBJECTIVE FUNCTION L∗ . For us to sensibly pursue the task of MCMC proposal optimization , we must assume the existence of some ground truth objective , L∗ , that produces our notion of sampling performance . As previously stated , we currently do not know a universal definition for L∗ . We may , however , assume that the ground truth objective satisfies a number of first principles properties : L∗ is Proper Define an objective function to be proper if it attains a unique global minimum at g ( ~x′|~x ) = π ( ~x′ ) and αg , π ( ~x′|~x ) = 1 for all ~x′ , ~x . The overall goal of our MCMC methodology is to approximate perfect i.i.d . sampling from the target , π . We therefore find it uncontroversial to assume that L∗ is proper . L∗ is Representation Independent Define an objective function , L , to be representation independent over a group of almost sure diffeomorphisms T if , for all T ∈ T , and for all proposal distributions g1 , g2 , L [ g1 ; π ] > L [ g2 ; π ] if and only if L [ T ◦ g1 ; T ◦ π ] > L [ T ◦ g2 ; T ◦ π ] . Similarly , we will say L is representation invariant over T if L [ T ◦ g ; T ◦ π ] = L [ g ; π ] for all g. If L∗ were not representation independent over D , then our definition of sampling performance would depend on which T ∈ D/H is used when computing the optimization , whereH is the maximal subgroup of D over which L∗ remains representation independent . To fully justify an ordering , we would need to justify our selection of a particular member from D/H , which we should expect to be exceptionally burdensome . Of course , we usually have little prior justification for selecting a particular T and instead often use the coordinate system in which data was originally collected , perhaps applying some rescaling and recentering . Thus , unless contradicted by future experimental or theoretical results , we should assume that L∗ is at least representation independent . L∗ Yields Established Optimal Results Prior theoretical analysis has established certain properties regarding optimal proposal distributions for a number of MCMC schemes under diffusionary limits . If L∗ is to correspond to the same notion of sampling performance , it must yield the same results . Thus , we should expect that optimization of L∗ will recover the properties established within these theoretical works when applied in the same diffusionary limits . | The paper proposes four desirable properties that should be satisfied by objective functions used to tune MCMC proposals. These are based on first principles, such as that the objective must have a unique global minimum when the proposal is equal to the target, must be representation invariant, and must recover known optimal results in well-studied settings (e.g. optimal acceptance rate for Langevin dynamics with a Gaussian target). Using these principles it proposes a new objective based on GSM (Titsias and Dellaportas, 2019) that satisfies all proposed principles. | SP:bdaa8ab11c8bd2c4d72f7db4efa6efc576c25a24 |
Semi-Empirical Objective Functions for Neural MCMC Proposal Optimization | 1 INTRODUCTION . The development of efficient Markov Chain Monte Carlo ( MCMC ) proposal distributions is vital to enable numerical estimation and statistical inference in increasingly complicated problem domains . If we had an exact definition of the notion of MCMC efficiency , this could be accomplished by straightforward optimization over a set of proposal distributions . Past computational limitations encouraged the use of architecturally limited MCMC schemes that yield useful results for a wide range of target distributions , such as Random Walk Metropolis ( RWM ) ( Metropolis et al. , 1953 ) , Metroplis Adjusted Langevin Diffusion ( MALA ) ( Besag and Green , 1993 ) , and Hamiltonian Monte Carlo ( HMC ) ( Duane et al. , 1987 ) . Although much research has been devoted to adaptive methods to improve MCMC performance , traditional adaptive methods ( Roberts and Rosenthal , 2009 ; Sejdinovic et al. , 2014 ; Haario et al. , 2001 ; Roberts and Rosenthal , 2007 ) focus on optimization across highly restricted proposal distribution model classes . Ideally , we would like to develop a practical means of optimizing MCMC performance over arbitrarily parameterized classes of proposal distributions . Given their demonstrated success in parameterizing expressive distributions , deep generative models are naturally suited to the problem of MCMC proposal optimization . Recent research regarding applications of deep learning to proposal optimization has yielded new MCMC schemes ( Song et al. , 2017 ; Spanbauer et al. , 2020 ; Hoffman et al. , 2019 ) and extensions of existing schemes ( de Freitas et al. , 2001 ; Habib and Barber , 2018 ; Levy et al. , 2018 ; Li et al. , 2021 ) . A variety of objective functions are utilized to optimize these deep learning based approaches , with functional forms generally dependent on the type of MCMC scheme being optimized . As demonstrated by the experiments of this work , the objective functions currently used for MCMC proposal optimization rely on model class restrictions imposed on the proposal architecture and are not suitable for optimizing proposal distributions more expressive than traditional MCMC schemes . In this work , we introduce and demonstrate Ab Initio objective functions for MCMC proposal optimization intended to remain compatible with any proposal distribution defined using deep generative models . Presumably , there exists some `` ground truth '' objective function underlying our notion of MCMC sampling performance . However , even after the decades of research regarding MCMC methods , there appears to be no universal definition for what we mean by MCMC efficiency . Metrics like effective sample size ( ESS ) ( Gelman et al. , 2013 ; Vats et al. , 2019 ) generally coincide with our notion of sampling performance , but no such metric serves as the canonical definition of MCMC efficiency . Theoretical analysis regarding optimal acceptance rates for particular MCMC schemes ( Roberts et al. , 2001 ; Gelman et al. , 1997 ; Roberts and Rosenthal , 1998 ; Neal et al. , 2012 ; Beskos et al. , 2013 ) considers restricted proposal schemes and targets within a continuous diffusionary limit wherein our common performance metrics converge in their definition of optimality ( Roberts et al. , 2001 ) . Within this diffusionary limit , useful properties regarding MCMC optimality ( e.g . the rules of thumb to seek an acceptance rate of 0.234 when using RWM and of 0.574 when using MALA ) may be derived without specifically defining sampling performance . In light of the lack of an exactly specified objective function for MCMC efficiency , our Ab Initio objective functions seek to approximate the ground truth definition of sampling performance by adhering to certain reasonable first principles properties and fitting to reproduce the `` mathematical observations '' provided by existing theoretical analysis of optimal acceptance rates . Our contributions are as follows : • We describe a set of first principles properties that may be reasonably assumed of the ground truth objective function underlying our notion of MCMC efficiency . • We illustrate the construction of an example Ab Initio objective function via the combination of simpler objective functions with coefficients determined to reproduce optimal behavior on reference problems with analytically known solutions . • We verify the generality of the resulting Ab Initio objective function through its ability to closely reproduce analytically known optimal results for a wide range of optimization tasks beyond the reference problem used in its construction . • Through a series of illustrative experiments , we demonstrate the advantages of Ab Initio objective functions for optimizing arbitrarily defined MCMC proposal distributions . 2 RELATION TO PRIOR WORK . Ab Initio techniques ( Hehre , 1976 ; Yin and Cohen , 1982 ; Marx and Hutter , 2009 ) are used in the physical sciences to simulate systems that would otherwise be unobservable in a laboratory setting . These Ab Initio methods are founded on principled approximations of fundamental physical laws with parameters chosen to reproduce the properties of reference systems that can be observed . We take inspiration from these methods in the physical sciences in forming the methodology of this work . The purpose of this work is to introduce a procedure for selecting objective functions for MCMC proposal optimization that are suited to the optimization of proposal model classes arbitrarily parameterized by deep generative models . Research into the applications of deep learning for MCMC proposal optimization ( Song et al. , 2017 ; Spanbauer et al. , 2020 ; Hoffman et al. , 2019 ; de Freitas et al. , 2001 ; Habib and Barber , 2018 ; Levy et al. , 2018 ; Li et al. , 2021 ) has yielded a number of potential candidates for this objective function . We therefore compare our Ab Initio objective functions to these candidates on the basis of their suitability for optimization of arbitrary proposal distributions . Pure KL-divergence based objectives ( de Freitas et al. , 2001 ; Habib and Barber , 2018 ; Neklyudov et al. , 2018 ; Wang et al. , 2018 ) have found some success , particularly when optimizing resampling style schemes . These objectives are unable to properly optimize proposals within a diffusionary limit ( Titsias and Dellaportas , 2019 ) . We therefore omit pure KL-divergence based objectives from the comparisons within this work . Adversarial objectives have been used to optimize proposal distributions , notably with A-NICE-MC ( Song et al. , 2017 ; Spanbauer et al. , 2020 ) . We view adversarial training as approximately optimizing an existing performance measure ( e.g . KL-divergence ) , rather than defining a fundamentally new performance measure . We therefore also omit adversarial objectives from our comparisons . Mean squared jump distance ( Pasarica and Gelman , 2010 ) ( MSJD ) remains a popular objective for optimizing proposals . Notably , L2HMC ( Levy et al. , 2018 ) is optimized using a modification of MSJD with a regularization intended to encourage mixing of the resulting Markov Chain . As shown in our experiments , both MSJD and L2HMC ’ s modification can produce arbitrarily non-ergodic Markov Chains when optimizing proposal distributions with position dependence . Our Ab Initio objective functions avoid this undesirable optimization behavior by maintaining i.i.d . resampling from the target as their unique global minima . Another potential advantage of the Ab Initio objective of Equation ( 2 ) over MSJD based objective functions is that it does not rely on the notion of a metric of the underlying space of the proposal distribution , and so may be more suited to optimizing proposals in settings where the space is equipped with only a measure and not a metric ( e.g . MCMC settings involving discrete or graph based distributions ) . Recently , Titsias and Dellaportas ( 2019 ) introduced the Generalized Speed Measure ( GSM ) as an objective function for MCMC proposal optimization . The GSM amounts to maximizing proposal entropy subject to the constraint of achieving a user specified acceptance rate . Although it is theoretically well motivated , the GSM relies on knowledge of optimal acceptance rates for a given optimization problem , which will generally be unknown when using very general neural architectures . Our example Ab Initio objective function of Equation ( 1 ) takes inspiration from the components of the GSM , while also ensuring the functional limitations argued for in Section 4 . A key advantage of our Ab Initio objective functions over the GSM is that they do not require prior knowledge to recover near optimal MCMC behavior ( e.g . our Ab Initio objective function , whose construction only involved the knowledge of the optimal acceptance rate for RWM , recovers optimized MALA proposals with acceptance rates around 0.5 ) . An additional advantage of our Ab Initio objective functions over the GSM is that they may be used to compare the efficiencies of proposal distributions with differing acceptance rates outside of the context of parameter optimization . 3 MCMC PROPOSAL OPTIMIZATION . In this work , we consider the task of optimizing a proposal density gθ ( ~x′|~x ) ( ~x ∈ Rn ) to sample from a target density π ( ~x ) for a MCMC task . Proposals are accepted with rate αgθ , π ( ~x ′|~x ) that ensures the resulting Markov Chain converges towards π ( ~x ) . For this work , we restrict ourselves to Metropolis-Hastings type schemes , wherein αgθ , π ( ~x ′|~x ) = min { 1 , π ( ~x ′ ) gθ ( ~x|~x′ ) π ( ~x ) gθ ( ~x′|~x ) } . For optimization , we utilize some measure of sampling performance to define an objective function L [ g ; π ] that imposes an ordering over proposal distributions by defining g1 < g2 exactly when L [ g1 ; π ] > L [ g2 ; π ] . We do not seek to provide an argument for the application of deep learning methods to MCMC proposal optimization , so we will simply assume that all objective functions of interest are well-behaved for optimization via deep learning techniques ( i.e . they are continuous and almost surely differentiable ) . We will also assume that all proposal and target densities considered are positive and non-singular . Let G be the set of allowed proposals to consider during optimization and let D be the group of almost sure diffeomorphisms over the space of our data . To perform optimization , we first select some T ∈ D that provides us with the coordinate system we will use for optimization . Defining : T ◦ f ( ~z ) = f ( T−1 ( ~z ) ) |∂T −1 ( ~z ) ∂~z | We finally optimize to find gopt = argmin g∈G L [ T ◦ g ; T ◦ π ] . The focus of this work is to illustrate the construction of objective functions such that , when the model class G is very expansive ( e.g . having been parameterized by a deep generative model ) , the optimized proposal gopt aligns with our notion of an efficient MCMC proposal , as discussed below . 4 PROPERTIES OF THE GROUND TRUTH OBJECTIVE FUNCTION L∗ . For us to sensibly pursue the task of MCMC proposal optimization , we must assume the existence of some ground truth objective , L∗ , that produces our notion of sampling performance . As previously stated , we currently do not know a universal definition for L∗ . We may , however , assume that the ground truth objective satisfies a number of first principles properties : L∗ is Proper Define an objective function to be proper if it attains a unique global minimum at g ( ~x′|~x ) = π ( ~x′ ) and αg , π ( ~x′|~x ) = 1 for all ~x′ , ~x . The overall goal of our MCMC methodology is to approximate perfect i.i.d . sampling from the target , π . We therefore find it uncontroversial to assume that L∗ is proper . L∗ is Representation Independent Define an objective function , L , to be representation independent over a group of almost sure diffeomorphisms T if , for all T ∈ T , and for all proposal distributions g1 , g2 , L [ g1 ; π ] > L [ g2 ; π ] if and only if L [ T ◦ g1 ; T ◦ π ] > L [ T ◦ g2 ; T ◦ π ] . Similarly , we will say L is representation invariant over T if L [ T ◦ g ; T ◦ π ] = L [ g ; π ] for all g. If L∗ were not representation independent over D , then our definition of sampling performance would depend on which T ∈ D/H is used when computing the optimization , whereH is the maximal subgroup of D over which L∗ remains representation independent . To fully justify an ordering , we would need to justify our selection of a particular member from D/H , which we should expect to be exceptionally burdensome . Of course , we usually have little prior justification for selecting a particular T and instead often use the coordinate system in which data was originally collected , perhaps applying some rescaling and recentering . Thus , unless contradicted by future experimental or theoretical results , we should assume that L∗ is at least representation independent . L∗ Yields Established Optimal Results Prior theoretical analysis has established certain properties regarding optimal proposal distributions for a number of MCMC schemes under diffusionary limits . If L∗ is to correspond to the same notion of sampling performance , it must yield the same results . Thus , we should expect that optimization of L∗ will recover the properties established within these theoretical works when applied in the same diffusionary limits . | This paper proposed an objective function for training neural MCMC proposal, called Ab Initio objective. The new objective seems to improve upon existing alternatives by maintaining property and representation invariance, and reducing the requirement of prior knowledges (e.g., optimal acceptance rate). The author demonstrated the effectiveness of Ab Initio objective on several benchmark models. | SP:bdaa8ab11c8bd2c4d72f7db4efa6efc576c25a24 |
DL-based prediction of optimal actions of human experts | 1 INTRODUCTION . To assist our decision-making , knowledge engineering has been developed to code human experts ’ knowledge into artificial expert systems , which have been successfully applied to multiple domains ( Buchanan & Smith , 1988 ; Russell & Norvig , 1995 ; Kiritsis , 1995 ) . For instance , MYCYN ( Buchanan & Shortliffe , 1984 ) can provide medical advice on infectious diseases , and XCON ( McDermott , 1980 ) can help users to find right computer components . However , knowledge engineering requires expensive and complex engineering , limiting the expert systems ’ utilities ( Buchanan & Smith , 1988 ; Kiritsis , 1995 ) . Notably , DL can enable artificial agents to automatically learn general rules essential for complex tasks from examples without human experts ’ instructions ( LeCun et al. , 2015 ; Hertz et al. , 1991 ) . This leads to the hypothesis that we can use DL to build expert systems without expensive knowledge engineering ( Tan , 2017 ) . Indeed , a line of study already explores DL agents ’ utility in diagnosing diseases based on medical images , for which traditional expert systems were used ; see ( Litjens et al. , 2017 ) for a review . However , it should be noted that most humans ’ decisions involve a sequence of actions , each of which has a subgoal . Thus , sequence learning can be a key component in building artificial intelligent agents that mimic human experts ’ decision-making ( Sun & Giles , 2001 ; Boddy , 1996 ) . Traditionally , symbolic planning is used to mimic humans ’ goal-directed high-level planning , which repeatedly creates sub-goals necessary to accomplish higher level goals until a subgoal can be accomplished in a single action , and deploying symbolic planning requires ‘ substantial prior knowledge ’ and highly computational complexity ( Sun & Giles , 2001 ) . That is , the cost of symbolic planning can be as high as that of other expert systems . In this study , we explored if DL can be used to learn high-level planning essential for human experts ’ decision-making . We note that deep Q learning ( Mnih et al. , 2015 ) has demonstrated impressive achievements in learning optimal sequences of actions for games ( Silver et al. , 2016 ) and that recurrent neural networks have been used to model time series ( Hertz et al. , 1991 ) . Our goal differs from these traditional DL approaches , in that we aim to model high-level planning more directly . To this end , we asked if deep neural networks ( DNNs , agents trained by DL ) can learn to predict strategies written by human experts for the popular game ‘ Angry Bird ’ ( AB ) ( Contributors , 2021 ; Renz et al. , 2019 ) from examples . To clear each stage , players must destroy all pigs in each stage . As the pigs within the game are protected by piles of objects or stay inside towers , a single attack is often not enough to destroy all the pigs in each stage . Instead , players must sequentially organize subgoals to destroy all pigs efficiently , making AB an ideal testbed for high-level planning . Thus , we trained DNNs to predict human experts ’ AB game strategies available at AB wiki pages ( Contributors , 2021 ) ; the AB strategies will be referred to as 3-star guides ( 3SG ) hereafter . In the experiments , we asked three questions . First , can DL learn the functional relationships between screenshots ( still images ) of the stages and 3SG ( human experts ’ strategies ) ? Second , can an attention-based image captioning ( ABIC ) system , previously proposed ( Xu et al. , 2015 ) , learn to create verbal strategies , which would sound reasonable to human players ? Third , can ABIC predict a sequence of strategies ( high-level planning ) appropriate to clear a stage ? Due to the lack of proper evaluation metric , we qualitatively evaluate the outcomes of the answers after training ABIC ; the evaluation metrics of the language model is the topic of active research ( Sellam et al. , 2020 ; Papineni et al. , 2001 ; Chen et al. , 1998 ) . Our empirical studies suggest that ABIC can learn to create verbal strategies after training and that it can predict a sequence of actions , not just a single action . They also support our hypothesis that DL can learn high-level planning from examples and that it can be used to build expert systems to assist human decision making without relying on overly expensive and complex knowledge engineering . Thus , our study indicates that DL can help us deploy expert systems into more domains . 2 DL AGENTS TO PREDICT OPTIMAL STRATEGIES OF ANGRY BIRDS ( AB ) . To clear each level of AB , players use birds to destroy the pigs that are scattered around and protected by towers or piles of wood , glass ( or ice ) and stone blocks . Each level provides a fixed sequence of birds and a unique challenging environment , and the players need to find an effective sequence of actions that can destroy all pigs in each level . The scores are estimated using various factors such as incurred damages and the number of birds used . When players obtain sufficiently high scores , they receive 3 stars . Any experienced game player ( i.e. , an expert ) can devise good strategies ( i.e. , sequence of actions ) to clear even the unseen levels , and conversely , the accuracy/efficiency of the plans can indicate the players ’ ability/efficiency . Therefore , we ask if DL could predict optimal actions ( or action sequence ) from given screenshots of levels . We use the 3SG available at the wiki page ( Contributors , 2021 ) as optimal strategies for DL to predict them . 2.1 FUNCTIONAL CORRELATIONS BETWEEN SCREENSHOTS AND 3SG . In principle , we can consider an expert system as an unknown functional mapping function that can identify an optimal relationship between problems/situations ( i.e. , screenshots in this study ) to decisions/solutions ( i.e. , 3SG in this study ) ; see Fig . 1A . If the mapping does exist , it would be possible to build expert systems . Thus , we first investigate functional correlations between screenshots and 3SG . Since a multilayer perceptron ( MLP ) has been considered a universal problem solver ( Hertz et al. , 1991 ) , we assume that a trained MLP can predict the embeddings of 3SG ( word embeddings ) from the embeddings of screenshots ( image embeddings ) , if the functional mappings from the screenshots to 3SG exist . Based on this assumption , we train MLPs , which contain 100 hidden neurons in single hidden layers , with 80 % levels ( out of 327 ) randomly selected and test them with the remaining ( test ) levels . The image embeddings are created using the ResNet18 ( Safka , 2021 ) , and the word embeddings are generated using Hugging Face ’ s BERT model ( Wolf et al. , 2020 ) . We first use image embeddings as inputs and word embeddings as outputs ( Fig . 1B ) and train MLP to minimize the mean squared error ( MSE ) . A open-source ML library Pytorch ( Paszke et al. , 2017 ) is used to construct MLPs , and its built-in function ( MSELoss ) is used to estimate MSE . The word embeddings are projected to the PCA space , which is spanned by various numbers of principal axes , using a python package ‘ Scikit-learn ’ ( Pedregosa et al. , 2011 ) . In the experiments , we repeat the same experiment 5 times with different random seeds and display the mean and standard deviations of them in Fig . 1C . As the number of principal axes increases , MLPs ’ errors are reduced , and the magnitudes of reduction grow bigger ; see the blue line in Fig . 1C . Interestingly , when the word and image embeddings are used as inputs and outputs , MLP can not predict the outputs anymore ( the orange line in Fig . 1C ) . These results suggest that functional mappings from screenshots to 3SG exist , but not vice versa . 2.2 EXPERT SYSTEMS OF AB . Encouraged by the results above , we ask if DL can directly predict human instructions from screenshots . Here , we train the attention-based image-captioning system ( ABIC ) ( Xu et al. , 2015 ) to predict 3SG from the screenshots . In the original form , ABIC uses convolutional networks as an encoder and recurrent networks as a decoder . The encoder extracts 14-by-14 annotation vectors , and the decoder uses annotation vectors to predict word sequences after training . They further proposed that the attention network , which determines the region of interest , can help the encoder-decoder system learn to produce captions . We refer to the original study for more details ( Xu et al. , 2015 ) . In this study , we adopted Pytorch implementation of ABIC from a public github repository ( Vinodababu , 2021 ) and train it to predict 3SG from the screenshots using the default setting of the implementation . This adopted Pytorch implementation uses ResNet101 ( He et al. , 2015 ) as a encoder and the long short term memory ( LSTM ) ( Hochreiter & Schmidhuber , 1997 ) as a decoder . Specifically , ResNet101 produces 2048 annotation vectors ( 14-by-14 pixels ) , the attentional network transforms annotation vectors using weighted sum , and LSTM selects the best word with previously selected word and weighted annotation vectors . In the experiments , we randomly select 70 % of the levels as training examples , 15 % as validation examples , and 15 % as test examples . The number of total levels used here is 359 . ResNet101 was adopted from TorchVision ( Marcel & Rodriguez , 2010 ) and frozen during training , whereas both LSTM and the attentional network were trained . 2.2.1 ABIC CAN BE AN AB EXPERT . We note that ABIC was trained to produce a single sentence caption after being trained with multiple captions for a single image ( Xu et al. , 2015 ) . To test the potential of AIBC as an AB expert , we mimic this baseline training of AIBC by ignoring the fact that 3SG describe the sequence of actions . Instead , we treat them as independently generated guides for the same stage and use them to train AIBC as an expert system of Angry Birds ( EAB ) to predict a single action . With this setting , we also effectively increase the number of training examples . In AB and its wiki page ( Contributors , 2021 ) , levels are grouped into multiple stages , and the two consecutive numbers are used to refer to each level . For instance , level ‘ 12-03 ’ refers to the third level in the 12th stage , and the same type of reference is used to clarify the levels below . In the experiments , 253 levels are randomly chosen as training and 50 levels as test examples ( i.e. , levels ) . We edit the guides slightly for clarification and remove irrelevant descriptions . Many instructions explain the bird types , while most screenshots do not include the birds . Thus , we augment the screenshots by inserting the circles that represent the first birds in the levels via colors in the top-left corners ( Fig . 2 ) . With the edited guides and augmented screenshots , we train EAB and evaluate its predicted actions for test ( unseen ) screenshots . Fig . 2B shows an example of EAB outputs . As shown in the figure , the model utilizes attention to create a strategy ( sentence ) . Table 1 shows some examples of EAB ’ s predicted actions/strategies for the unseen test levels ( i.e. , screenshots ) . Here , we make a few observations . First , although the guides describe the sequence of actions , most EAB outputs appear to describe only the first action . Second , EAB selects the correct birds to create predictions on strategies for 10 test levels . Third , a few of the predicted strategies are consistent with the guides . Fourth , the 3SG have diverse writing styles , making the quantitative evaluation of predicted strategies extremely difficult . These results raise the possibility that DL can learn to predict an optimal action from examples only . Due to EAB ’ s low precision , we tested if EAB ’ s performance can be further improved .. | This paper suggests using deep learning to learn expert decision-making from game strategy guides. They focus on the task of Angry Birds, for which they have natural language descriptions of what actions to take to pass a given level. Given a visual representation of an Angry Birds screenshot, they train an LSTM to model the natural language guides. They claim that their model generalizes well. | SP:65813cd8cf21f54a546df1a0329cc9bb7dec1f22 |
DL-based prediction of optimal actions of human experts | 1 INTRODUCTION . To assist our decision-making , knowledge engineering has been developed to code human experts ’ knowledge into artificial expert systems , which have been successfully applied to multiple domains ( Buchanan & Smith , 1988 ; Russell & Norvig , 1995 ; Kiritsis , 1995 ) . For instance , MYCYN ( Buchanan & Shortliffe , 1984 ) can provide medical advice on infectious diseases , and XCON ( McDermott , 1980 ) can help users to find right computer components . However , knowledge engineering requires expensive and complex engineering , limiting the expert systems ’ utilities ( Buchanan & Smith , 1988 ; Kiritsis , 1995 ) . Notably , DL can enable artificial agents to automatically learn general rules essential for complex tasks from examples without human experts ’ instructions ( LeCun et al. , 2015 ; Hertz et al. , 1991 ) . This leads to the hypothesis that we can use DL to build expert systems without expensive knowledge engineering ( Tan , 2017 ) . Indeed , a line of study already explores DL agents ’ utility in diagnosing diseases based on medical images , for which traditional expert systems were used ; see ( Litjens et al. , 2017 ) for a review . However , it should be noted that most humans ’ decisions involve a sequence of actions , each of which has a subgoal . Thus , sequence learning can be a key component in building artificial intelligent agents that mimic human experts ’ decision-making ( Sun & Giles , 2001 ; Boddy , 1996 ) . Traditionally , symbolic planning is used to mimic humans ’ goal-directed high-level planning , which repeatedly creates sub-goals necessary to accomplish higher level goals until a subgoal can be accomplished in a single action , and deploying symbolic planning requires ‘ substantial prior knowledge ’ and highly computational complexity ( Sun & Giles , 2001 ) . That is , the cost of symbolic planning can be as high as that of other expert systems . In this study , we explored if DL can be used to learn high-level planning essential for human experts ’ decision-making . We note that deep Q learning ( Mnih et al. , 2015 ) has demonstrated impressive achievements in learning optimal sequences of actions for games ( Silver et al. , 2016 ) and that recurrent neural networks have been used to model time series ( Hertz et al. , 1991 ) . Our goal differs from these traditional DL approaches , in that we aim to model high-level planning more directly . To this end , we asked if deep neural networks ( DNNs , agents trained by DL ) can learn to predict strategies written by human experts for the popular game ‘ Angry Bird ’ ( AB ) ( Contributors , 2021 ; Renz et al. , 2019 ) from examples . To clear each stage , players must destroy all pigs in each stage . As the pigs within the game are protected by piles of objects or stay inside towers , a single attack is often not enough to destroy all the pigs in each stage . Instead , players must sequentially organize subgoals to destroy all pigs efficiently , making AB an ideal testbed for high-level planning . Thus , we trained DNNs to predict human experts ’ AB game strategies available at AB wiki pages ( Contributors , 2021 ) ; the AB strategies will be referred to as 3-star guides ( 3SG ) hereafter . In the experiments , we asked three questions . First , can DL learn the functional relationships between screenshots ( still images ) of the stages and 3SG ( human experts ’ strategies ) ? Second , can an attention-based image captioning ( ABIC ) system , previously proposed ( Xu et al. , 2015 ) , learn to create verbal strategies , which would sound reasonable to human players ? Third , can ABIC predict a sequence of strategies ( high-level planning ) appropriate to clear a stage ? Due to the lack of proper evaluation metric , we qualitatively evaluate the outcomes of the answers after training ABIC ; the evaluation metrics of the language model is the topic of active research ( Sellam et al. , 2020 ; Papineni et al. , 2001 ; Chen et al. , 1998 ) . Our empirical studies suggest that ABIC can learn to create verbal strategies after training and that it can predict a sequence of actions , not just a single action . They also support our hypothesis that DL can learn high-level planning from examples and that it can be used to build expert systems to assist human decision making without relying on overly expensive and complex knowledge engineering . Thus , our study indicates that DL can help us deploy expert systems into more domains . 2 DL AGENTS TO PREDICT OPTIMAL STRATEGIES OF ANGRY BIRDS ( AB ) . To clear each level of AB , players use birds to destroy the pigs that are scattered around and protected by towers or piles of wood , glass ( or ice ) and stone blocks . Each level provides a fixed sequence of birds and a unique challenging environment , and the players need to find an effective sequence of actions that can destroy all pigs in each level . The scores are estimated using various factors such as incurred damages and the number of birds used . When players obtain sufficiently high scores , they receive 3 stars . Any experienced game player ( i.e. , an expert ) can devise good strategies ( i.e. , sequence of actions ) to clear even the unseen levels , and conversely , the accuracy/efficiency of the plans can indicate the players ’ ability/efficiency . Therefore , we ask if DL could predict optimal actions ( or action sequence ) from given screenshots of levels . We use the 3SG available at the wiki page ( Contributors , 2021 ) as optimal strategies for DL to predict them . 2.1 FUNCTIONAL CORRELATIONS BETWEEN SCREENSHOTS AND 3SG . In principle , we can consider an expert system as an unknown functional mapping function that can identify an optimal relationship between problems/situations ( i.e. , screenshots in this study ) to decisions/solutions ( i.e. , 3SG in this study ) ; see Fig . 1A . If the mapping does exist , it would be possible to build expert systems . Thus , we first investigate functional correlations between screenshots and 3SG . Since a multilayer perceptron ( MLP ) has been considered a universal problem solver ( Hertz et al. , 1991 ) , we assume that a trained MLP can predict the embeddings of 3SG ( word embeddings ) from the embeddings of screenshots ( image embeddings ) , if the functional mappings from the screenshots to 3SG exist . Based on this assumption , we train MLPs , which contain 100 hidden neurons in single hidden layers , with 80 % levels ( out of 327 ) randomly selected and test them with the remaining ( test ) levels . The image embeddings are created using the ResNet18 ( Safka , 2021 ) , and the word embeddings are generated using Hugging Face ’ s BERT model ( Wolf et al. , 2020 ) . We first use image embeddings as inputs and word embeddings as outputs ( Fig . 1B ) and train MLP to minimize the mean squared error ( MSE ) . A open-source ML library Pytorch ( Paszke et al. , 2017 ) is used to construct MLPs , and its built-in function ( MSELoss ) is used to estimate MSE . The word embeddings are projected to the PCA space , which is spanned by various numbers of principal axes , using a python package ‘ Scikit-learn ’ ( Pedregosa et al. , 2011 ) . In the experiments , we repeat the same experiment 5 times with different random seeds and display the mean and standard deviations of them in Fig . 1C . As the number of principal axes increases , MLPs ’ errors are reduced , and the magnitudes of reduction grow bigger ; see the blue line in Fig . 1C . Interestingly , when the word and image embeddings are used as inputs and outputs , MLP can not predict the outputs anymore ( the orange line in Fig . 1C ) . These results suggest that functional mappings from screenshots to 3SG exist , but not vice versa . 2.2 EXPERT SYSTEMS OF AB . Encouraged by the results above , we ask if DL can directly predict human instructions from screenshots . Here , we train the attention-based image-captioning system ( ABIC ) ( Xu et al. , 2015 ) to predict 3SG from the screenshots . In the original form , ABIC uses convolutional networks as an encoder and recurrent networks as a decoder . The encoder extracts 14-by-14 annotation vectors , and the decoder uses annotation vectors to predict word sequences after training . They further proposed that the attention network , which determines the region of interest , can help the encoder-decoder system learn to produce captions . We refer to the original study for more details ( Xu et al. , 2015 ) . In this study , we adopted Pytorch implementation of ABIC from a public github repository ( Vinodababu , 2021 ) and train it to predict 3SG from the screenshots using the default setting of the implementation . This adopted Pytorch implementation uses ResNet101 ( He et al. , 2015 ) as a encoder and the long short term memory ( LSTM ) ( Hochreiter & Schmidhuber , 1997 ) as a decoder . Specifically , ResNet101 produces 2048 annotation vectors ( 14-by-14 pixels ) , the attentional network transforms annotation vectors using weighted sum , and LSTM selects the best word with previously selected word and weighted annotation vectors . In the experiments , we randomly select 70 % of the levels as training examples , 15 % as validation examples , and 15 % as test examples . The number of total levels used here is 359 . ResNet101 was adopted from TorchVision ( Marcel & Rodriguez , 2010 ) and frozen during training , whereas both LSTM and the attentional network were trained . 2.2.1 ABIC CAN BE AN AB EXPERT . We note that ABIC was trained to produce a single sentence caption after being trained with multiple captions for a single image ( Xu et al. , 2015 ) . To test the potential of AIBC as an AB expert , we mimic this baseline training of AIBC by ignoring the fact that 3SG describe the sequence of actions . Instead , we treat them as independently generated guides for the same stage and use them to train AIBC as an expert system of Angry Birds ( EAB ) to predict a single action . With this setting , we also effectively increase the number of training examples . In AB and its wiki page ( Contributors , 2021 ) , levels are grouped into multiple stages , and the two consecutive numbers are used to refer to each level . For instance , level ‘ 12-03 ’ refers to the third level in the 12th stage , and the same type of reference is used to clarify the levels below . In the experiments , 253 levels are randomly chosen as training and 50 levels as test examples ( i.e. , levels ) . We edit the guides slightly for clarification and remove irrelevant descriptions . Many instructions explain the bird types , while most screenshots do not include the birds . Thus , we augment the screenshots by inserting the circles that represent the first birds in the levels via colors in the top-left corners ( Fig . 2 ) . With the edited guides and augmented screenshots , we train EAB and evaluate its predicted actions for test ( unseen ) screenshots . Fig . 2B shows an example of EAB outputs . As shown in the figure , the model utilizes attention to create a strategy ( sentence ) . Table 1 shows some examples of EAB ’ s predicted actions/strategies for the unseen test levels ( i.e. , screenshots ) . Here , we make a few observations . First , although the guides describe the sequence of actions , most EAB outputs appear to describe only the first action . Second , EAB selects the correct birds to create predictions on strategies for 10 test levels . Third , a few of the predicted strategies are consistent with the guides . Fourth , the 3SG have diverse writing styles , making the quantitative evaluation of predicted strategies extremely difficult . These results raise the possibility that DL can learn to predict an optimal action from examples only . Due to EAB ’ s low precision , we tested if EAB ’ s performance can be further improved .. | The paper proposes an approach for building an expert system for sequential decision making problems from image-represented states and instruction-represented actions. The authors reuse pretrained image- and word embeddings to train a MLP for predicting instructions from game frames. The paper specifically addresses the game angry birds and reports good results for mapping image embeddings to word embeddings. | SP:65813cd8cf21f54a546df1a0329cc9bb7dec1f22 |
DL-based prediction of optimal actions of human experts | 1 INTRODUCTION . To assist our decision-making , knowledge engineering has been developed to code human experts ’ knowledge into artificial expert systems , which have been successfully applied to multiple domains ( Buchanan & Smith , 1988 ; Russell & Norvig , 1995 ; Kiritsis , 1995 ) . For instance , MYCYN ( Buchanan & Shortliffe , 1984 ) can provide medical advice on infectious diseases , and XCON ( McDermott , 1980 ) can help users to find right computer components . However , knowledge engineering requires expensive and complex engineering , limiting the expert systems ’ utilities ( Buchanan & Smith , 1988 ; Kiritsis , 1995 ) . Notably , DL can enable artificial agents to automatically learn general rules essential for complex tasks from examples without human experts ’ instructions ( LeCun et al. , 2015 ; Hertz et al. , 1991 ) . This leads to the hypothesis that we can use DL to build expert systems without expensive knowledge engineering ( Tan , 2017 ) . Indeed , a line of study already explores DL agents ’ utility in diagnosing diseases based on medical images , for which traditional expert systems were used ; see ( Litjens et al. , 2017 ) for a review . However , it should be noted that most humans ’ decisions involve a sequence of actions , each of which has a subgoal . Thus , sequence learning can be a key component in building artificial intelligent agents that mimic human experts ’ decision-making ( Sun & Giles , 2001 ; Boddy , 1996 ) . Traditionally , symbolic planning is used to mimic humans ’ goal-directed high-level planning , which repeatedly creates sub-goals necessary to accomplish higher level goals until a subgoal can be accomplished in a single action , and deploying symbolic planning requires ‘ substantial prior knowledge ’ and highly computational complexity ( Sun & Giles , 2001 ) . That is , the cost of symbolic planning can be as high as that of other expert systems . In this study , we explored if DL can be used to learn high-level planning essential for human experts ’ decision-making . We note that deep Q learning ( Mnih et al. , 2015 ) has demonstrated impressive achievements in learning optimal sequences of actions for games ( Silver et al. , 2016 ) and that recurrent neural networks have been used to model time series ( Hertz et al. , 1991 ) . Our goal differs from these traditional DL approaches , in that we aim to model high-level planning more directly . To this end , we asked if deep neural networks ( DNNs , agents trained by DL ) can learn to predict strategies written by human experts for the popular game ‘ Angry Bird ’ ( AB ) ( Contributors , 2021 ; Renz et al. , 2019 ) from examples . To clear each stage , players must destroy all pigs in each stage . As the pigs within the game are protected by piles of objects or stay inside towers , a single attack is often not enough to destroy all the pigs in each stage . Instead , players must sequentially organize subgoals to destroy all pigs efficiently , making AB an ideal testbed for high-level planning . Thus , we trained DNNs to predict human experts ’ AB game strategies available at AB wiki pages ( Contributors , 2021 ) ; the AB strategies will be referred to as 3-star guides ( 3SG ) hereafter . In the experiments , we asked three questions . First , can DL learn the functional relationships between screenshots ( still images ) of the stages and 3SG ( human experts ’ strategies ) ? Second , can an attention-based image captioning ( ABIC ) system , previously proposed ( Xu et al. , 2015 ) , learn to create verbal strategies , which would sound reasonable to human players ? Third , can ABIC predict a sequence of strategies ( high-level planning ) appropriate to clear a stage ? Due to the lack of proper evaluation metric , we qualitatively evaluate the outcomes of the answers after training ABIC ; the evaluation metrics of the language model is the topic of active research ( Sellam et al. , 2020 ; Papineni et al. , 2001 ; Chen et al. , 1998 ) . Our empirical studies suggest that ABIC can learn to create verbal strategies after training and that it can predict a sequence of actions , not just a single action . They also support our hypothesis that DL can learn high-level planning from examples and that it can be used to build expert systems to assist human decision making without relying on overly expensive and complex knowledge engineering . Thus , our study indicates that DL can help us deploy expert systems into more domains . 2 DL AGENTS TO PREDICT OPTIMAL STRATEGIES OF ANGRY BIRDS ( AB ) . To clear each level of AB , players use birds to destroy the pigs that are scattered around and protected by towers or piles of wood , glass ( or ice ) and stone blocks . Each level provides a fixed sequence of birds and a unique challenging environment , and the players need to find an effective sequence of actions that can destroy all pigs in each level . The scores are estimated using various factors such as incurred damages and the number of birds used . When players obtain sufficiently high scores , they receive 3 stars . Any experienced game player ( i.e. , an expert ) can devise good strategies ( i.e. , sequence of actions ) to clear even the unseen levels , and conversely , the accuracy/efficiency of the plans can indicate the players ’ ability/efficiency . Therefore , we ask if DL could predict optimal actions ( or action sequence ) from given screenshots of levels . We use the 3SG available at the wiki page ( Contributors , 2021 ) as optimal strategies for DL to predict them . 2.1 FUNCTIONAL CORRELATIONS BETWEEN SCREENSHOTS AND 3SG . In principle , we can consider an expert system as an unknown functional mapping function that can identify an optimal relationship between problems/situations ( i.e. , screenshots in this study ) to decisions/solutions ( i.e. , 3SG in this study ) ; see Fig . 1A . If the mapping does exist , it would be possible to build expert systems . Thus , we first investigate functional correlations between screenshots and 3SG . Since a multilayer perceptron ( MLP ) has been considered a universal problem solver ( Hertz et al. , 1991 ) , we assume that a trained MLP can predict the embeddings of 3SG ( word embeddings ) from the embeddings of screenshots ( image embeddings ) , if the functional mappings from the screenshots to 3SG exist . Based on this assumption , we train MLPs , which contain 100 hidden neurons in single hidden layers , with 80 % levels ( out of 327 ) randomly selected and test them with the remaining ( test ) levels . The image embeddings are created using the ResNet18 ( Safka , 2021 ) , and the word embeddings are generated using Hugging Face ’ s BERT model ( Wolf et al. , 2020 ) . We first use image embeddings as inputs and word embeddings as outputs ( Fig . 1B ) and train MLP to minimize the mean squared error ( MSE ) . A open-source ML library Pytorch ( Paszke et al. , 2017 ) is used to construct MLPs , and its built-in function ( MSELoss ) is used to estimate MSE . The word embeddings are projected to the PCA space , which is spanned by various numbers of principal axes , using a python package ‘ Scikit-learn ’ ( Pedregosa et al. , 2011 ) . In the experiments , we repeat the same experiment 5 times with different random seeds and display the mean and standard deviations of them in Fig . 1C . As the number of principal axes increases , MLPs ’ errors are reduced , and the magnitudes of reduction grow bigger ; see the blue line in Fig . 1C . Interestingly , when the word and image embeddings are used as inputs and outputs , MLP can not predict the outputs anymore ( the orange line in Fig . 1C ) . These results suggest that functional mappings from screenshots to 3SG exist , but not vice versa . 2.2 EXPERT SYSTEMS OF AB . Encouraged by the results above , we ask if DL can directly predict human instructions from screenshots . Here , we train the attention-based image-captioning system ( ABIC ) ( Xu et al. , 2015 ) to predict 3SG from the screenshots . In the original form , ABIC uses convolutional networks as an encoder and recurrent networks as a decoder . The encoder extracts 14-by-14 annotation vectors , and the decoder uses annotation vectors to predict word sequences after training . They further proposed that the attention network , which determines the region of interest , can help the encoder-decoder system learn to produce captions . We refer to the original study for more details ( Xu et al. , 2015 ) . In this study , we adopted Pytorch implementation of ABIC from a public github repository ( Vinodababu , 2021 ) and train it to predict 3SG from the screenshots using the default setting of the implementation . This adopted Pytorch implementation uses ResNet101 ( He et al. , 2015 ) as a encoder and the long short term memory ( LSTM ) ( Hochreiter & Schmidhuber , 1997 ) as a decoder . Specifically , ResNet101 produces 2048 annotation vectors ( 14-by-14 pixels ) , the attentional network transforms annotation vectors using weighted sum , and LSTM selects the best word with previously selected word and weighted annotation vectors . In the experiments , we randomly select 70 % of the levels as training examples , 15 % as validation examples , and 15 % as test examples . The number of total levels used here is 359 . ResNet101 was adopted from TorchVision ( Marcel & Rodriguez , 2010 ) and frozen during training , whereas both LSTM and the attentional network were trained . 2.2.1 ABIC CAN BE AN AB EXPERT . We note that ABIC was trained to produce a single sentence caption after being trained with multiple captions for a single image ( Xu et al. , 2015 ) . To test the potential of AIBC as an AB expert , we mimic this baseline training of AIBC by ignoring the fact that 3SG describe the sequence of actions . Instead , we treat them as independently generated guides for the same stage and use them to train AIBC as an expert system of Angry Birds ( EAB ) to predict a single action . With this setting , we also effectively increase the number of training examples . In AB and its wiki page ( Contributors , 2021 ) , levels are grouped into multiple stages , and the two consecutive numbers are used to refer to each level . For instance , level ‘ 12-03 ’ refers to the third level in the 12th stage , and the same type of reference is used to clarify the levels below . In the experiments , 253 levels are randomly chosen as training and 50 levels as test examples ( i.e. , levels ) . We edit the guides slightly for clarification and remove irrelevant descriptions . Many instructions explain the bird types , while most screenshots do not include the birds . Thus , we augment the screenshots by inserting the circles that represent the first birds in the levels via colors in the top-left corners ( Fig . 2 ) . With the edited guides and augmented screenshots , we train EAB and evaluate its predicted actions for test ( unseen ) screenshots . Fig . 2B shows an example of EAB outputs . As shown in the figure , the model utilizes attention to create a strategy ( sentence ) . Table 1 shows some examples of EAB ’ s predicted actions/strategies for the unseen test levels ( i.e. , screenshots ) . Here , we make a few observations . First , although the guides describe the sequence of actions , most EAB outputs appear to describe only the first action . Second , EAB selects the correct birds to create predictions on strategies for 10 test levels . Third , a few of the predicted strategies are consistent with the guides . Fourth , the 3SG have diverse writing styles , making the quantitative evaluation of predicted strategies extremely difficult . These results raise the possibility that DL can learn to predict an optimal action from examples only . Due to EAB ’ s low precision , we tested if EAB ’ s performance can be further improved .. | The paper aims to study the training of Deep Learning (DL) models from examples and to this end trains a DL agent to predict actions given screenshots of the game "Angry Birds" and observe that the trained model is able to predict actions for test samples and concludes that possibly DL expert systems can learn only by examples. The contributions are three-fold: 1- First, they train an MLP model to learn the mapping from screenshots of the game to the word embeddings which correspond to the guide provided by a player on that stage of the game. 2-Trains an Attention Based Image Captioning System (ABIC) to predict human strategies from the screenshots of the game. 3- Trains ABIC to learn the sequence of strategies necessary to pass a stage. | SP:65813cd8cf21f54a546df1a0329cc9bb7dec1f22 |
Adaptive Control Flow in Transformers Improves Systematic Generalization | 1 INTRODUCTION . Neural networks ( NNs ) may easily learn certain training sets , but typically they do not generalize on systematically different test sets . Examples of systematic generalization ( Fodor et al. , 1988 ) include generalization to sequences longer than those seen during training—productivity , and algorithmic combinations of previously learned rules—systematicity . Despite recent efforts ( Bahdanau et al. , 2019 ; Korrel et al. , 2019 ; Lake , 2019 ; Li et al. , 2019 ; Russin et al. , 2019 ; Csordás et al. , 2021 ) , systematic generalization generally remains unsolved ( Fodor & McLaughlin , 1990 ; Lake & Baroni , 2018 ; Liska et al. , 2018 ; Greff et al. , 2020 ; Hupkes et al. , 2020 ) . On some datasets , the best performing models are neuro-symbolic hybrids ( Chen et al. , 2020 ; Liu et al. , 2020 ) using task-specific symbolic functions . However , their applicability to other datasets remains limited ( Furrer et al. , 2020 ; Shaw et al. , 2020 ) . A big question is : which type of architectural inductive bias encourages the training process to select “ good ” solutions which generalize systematically ? The popular Transformers ( Vaswani et al. , 2017 ) also often fail to generalize on algorithmic tasks ( e.g . Liska et al . ( 2018 ) ; Dubois et al . ( 2020 ) ; Chaabouni et al . ( 2021 ) ; Csordás et al . ( 2021 ) ; Ontañón et al . ( 2021 ) ) , even on tasks with intuitive solutions that can be simply expressed in terms of Transformer attention patterns . Given an input sequence of length N and a Transformer encoder of depth T , solving an algorithmic task is often all about routing the relevant information to the right node/operation at the right time in the T -by-N grid represented by Transformer columns . Effectively the task is to learn to draw an adaptive control flow on the canvas of Transformer columns . In fact , recent work by Weiss et al . ( 2021 ) introduced a programming language called RASP , which is specifically designed to express solutions to sequence processing problems , and which has a direct equivalent to the operations in Transformer encoders . However , it is shown that Transformers learn solutions expressed in RASP only through intermediate supervision of attention patterns , and sometimes , even such supervision fails . Generally speaking , Transformers fail to find easily interpretable and/or symbolic solutions to algorithmic tasks . We conversely hypothesize that attention-based NNs that are able to find intuitive solutions ( achieving interpretable attention patterns ) could improve systematic generalization . 1https : //github.com/robertcsordas/ndr Here we point out that regular Transformers lack some basic ingredients for learning such “ intuitive ” solutions to algorithmic problems . As a remedy , we propose simple architectural modifications to help them learn data routing . As a first step towards validating our model , we focus on the popular length generalization task of compositional table lookup ( CTL ; Liska et al . ( 2018 ) ; Hupkes et al . ( 2019 ) ; Dubois et al . ( 2020 ) ) , as well as two more complex tasks : a simple arithmetic task and a variant of ListOps ( Nangia & Bowman , 2018 ) designed to test the compositional generalization ability of NNs . Our novel Neural Data Router ( NDR ) achieves 100 % generalization accuracy ( never reported before ; Dubois et al . ( 2020 ) ) on the CTL task , and obtains nearly perfect accuracy on both the proposed simple arithmetic and ListOps tasks . We show that the attention and gating patterns of NDR tend to be interpretable as plausible control flows . 2 IMPROVING TRANSFORMERS FOR LEARNING ADAPTIVE CONTROL FLOW . We argue that the following components are needed to build Transformers capable of learning adaptive control flow . First , composing known operations in an arbitrary order requires that all operations are available at every computational step . This can be easily achieved by sharing the weights of the layers , as is done in Universal Transformers ( Dehghani et al. , 2019 ) . Second , the network should be sufficiently deep , at least as deep as the deepest data dependency in the computational graph built from elementary operations ( e.g. , in the case of a parse tree , this is the depth of the tree ) . Otherwise , multiple operations must be fused into a single layer and hinder natural and elegant compositions . Third , inputs in some columns should be kept unchanged until it is their turn to be processed . The regular Transformer lacks a mechanism for skipping the whole transformation step by simply copying the input to the next step/layer . We propose a special gating function , copy gate , to implement such a mechanism ( Sec . 2.1 ) . Finally , many algorithmic tasks require combining several local computations in the right order . This typically implies that attention should not focus on all possible matches at a given time but only on the closest match . We propose and investigate a new type of attention with a corresponding inductive bias called geometric attention ( Sec . 2.2 ) . Using both the geometric attention and copy gate , our model implements a “ neural data routing mechanism ” , which can adaptively serialize the input problem . We refer to the resulting new Transformer as Neural Data Router ( NDR ) . In the experimental section ( Sec . 3 ) , we evaluate this model on three algorithmic tasks requiring length generalization and demonstrate its effectiveness . 2.1 COPY GATE : LEARNING TO SKIP OPERATIONS ( VERTICAL FLOW ) . Each layer of the regular Transformer consists of one self-attention and one feedforward block . The input to each of these blocks is directly connected to the corresponding output via a residual connection ( Srivastava et al. , 2015 ; He et al. , 2016 ) . However , such a connection does not allow for skipping the transformation of the entire layer and simply passing the unchanged input to the next layer . Here we propose to add an explicit gate , which we call copy gate , to facilitate such a behavior . We consider a T -layer Transformer encoder and an input sequence of length N . Since each layer corresponds to one computational step , we often refer to a layer as a step t. We denote the Transformer state of column i in layer t as h ( i , t ) = Ht , i ∈ Rd where d is the state size , and Ht ∈ RN×d denotes the states of all N columns in layer t. In the copy gate-augmented Transformer , each column i in layer ( t+ 1 ) processes the input Ht similarly to regular Transformers : a ( i , t+1 ) = LayerNorm ( MultiHeadAttention ( h ( i , t ) , Ht , Ht ) + h ( i , t ) ) ( 1 ) ĥ ( i , t+1 ) = LayerNorm ( FFNdata ( a ( i , t+1 ) ) ) ( 2 ) using the standard multi-head attention operation ( Vaswani et al. , 2017 ) MultiHeadAttention with a query obtained from h ( i , t ) and keys/values from Ht , but the output is gated ( using g ( i , t+1 ) ∈ Rd ) as : g ( i , t+1 ) = σ ( FFNgate ( a ( i , t+1 ) ) ) ( 3 ) h ( i , t+1 ) = g ( i , t+1 ) ĥ ( i , t+1 ) + ( 1− g ( i , t+1 ) ) h ( i , t ) ( 4 ) We use the basic two-layer feedforward block ( Vaswani et al. , 2017 ) for both FFNdata and FFNgate which transforms input x ∈ Rd to : FFN ( x ) = W2 max ( W1x+ b1 , 0 ) + b2 ( 5 ) but with separate parameters and different dimensionalities : for FFNdata W data1 ∈ RdFF×d , W data2 ∈ Rd×dFF , while for FFNgate W gate1 , W gate 2 ∈ Rd×d , with biases bdata1 ∈ RdFF and bdata2 , b gate 1 , b gate 2 ∈ Rd . When the gate is closed i.e . g ( i , t+1 ) = 0 in Eq . 4 , the entire transformation is skipped and the input is copied over to the next layer h ( i , t+1 ) = h ( i , t ) . Crucially , we parameterize the gate ( Eq . 3 ) as a function of the output of the self-attention ( Eq . 1 ) , such that the decision to copy or transform the input for each column depends on the states of all columns . This is a crucial difference compared to previously proposed gatings in Transformers , which are solely motivated by training stability ( Parisotto et al. , 2020 ) or by a common practice from convolution-based models ( Chaabouni et al. , 2021 ) . None of the previous approaches can implement the behavior of our copy gate ( see Sec . 6 on related work ) . The bias of the gate bgate2 is initialized to −3 ( Hochreiter & Schmidhuber , 1997 ) . This ensures that no update happens initially to create a better gradient flow between layers . It also encourages the model to skip layers unless they have an important contribution in the corresponding step . 2.2 GEOMETRIC ATTENTION : LEARNING TO ATTEND TO THE CLOSEST MATCH ( HORIZONTAL FLOW ) . We propose geometric attention designed to attend to the closest matching element . Like in regular self-attention , given an input sequence [ x ( 1 ) , x ( 2 ) , ... , x ( N ) ] with x ( i ) ∈ Rdin , each input is projected to key k ( i ) ∈ Rdkey , value v ( i ) ∈ Rdvalue , query q ( i ) ∈ Rdkey vectors , and the dot product is computed for each key/query combination . In our geometric attention , the dot product is followed by a sigmoid function to obtain a score between 0 and 1 : Pi , j = σ ( k ( j ) > q ( i ) ) ( 6 ) which will be treated as a probability of the key at ( source ) position j matching the query at ( target ) position i . These probabilities are finally converted to the attention scores Ai , j as follows : Ai , j = Pi , j ∏ k∈Si , j ( 1− Pi , k ) ( 7 ) where Si , j denotes the set of all ( source ) indices which are closer to i than j is to i , and when two indices have the same distance to i , we consider the one which is to the right of i ( i.e. , greater than i ) to be closer , i.e. , Si , j = { k ∈ { 1 , ... , N } \ { i , j } : |i− k| ≤ |i− j| , if i < j k ∈ { 1 , ... , N } \ { i , j } : |i− k| < |i− j| , if j < i ( 8 ) In addition , we explicitly zero out the diagonal by setting Ai , i = 0 for all i = 1 , ... , N . The ordering of source indices is illustrated in Figure 1/Right . The resulting scores Ai , j are the attention scores used to compute the weighted averages of the value vectors . By using the terms ( 1− Pi , k ) in Eq . 7 , when there is a match , it downscales any other more distant matches . Two recent works ( Brooks et al. , 2021 ; Banino et al. , 2021 ) use such a parameterized geometric distribution in the form of Eq . 7 ( see Sec . 6 on related work ) . The resulting attention function has a complexity of O ( N2 ) , similar to the regular self-attention used in Transformers ( Vaswani et al. , 2017 ) . Eq . 7 can be implemented in a numerically stable way in log space . The products can then be calculated using cumulative sums , subtracting the elements for the correct indices in each position . Directional encoding . In practice , we augment Eq . 6 with an additional directional encoding . In fact , the only positional information available in the geometric attention presented above is the ordering used to define the product in Eqs . 7-8 . In practice , we found it crucial to augment the score computation of Eq . 6 with additional directional information , encoded as a scalar Di , j ∈ R for each target/source position pair ( i , j ) : Di , j = { WLRh ( i ) + bLR , if i ≤ j WRLh ( i ) + bRL , if i > j ( 9 ) where h ( i ) ∈ Rd denotes the input/state at position i and WLR , WRL ∈ R1×d , bLR , bRL ∈ R are trainable parameters . This directional information is integrated into the score computation of Eq . 6 as follows ( akin to how Dai et al . ( 2019 ) introduce the relative positional encoding ( Schmidhuber , 1992 ) as an extra term in the computation of attention scores ) : Pi , j = σ ( α ( Wqh ( i ) + u ) > Wk , Eh ( j ) + βDi , j + γ ) ( 10 ) where the matrix Wq ∈ Rdhead×d maps the states to queries , u ∈ Rdhead is a bias for queries , Wk , E ∈ Rdhead×d maps states to keys ( we note that dhead is typically the size of the key , query and value vectors for each head , dhead = dnheads ) , and α , β , γ ∈ R are learned scaling coefficients and bias , initialized to α = 1√ dhead , β = 1 , γ = 0 . Using this additional directional information , each query ( position i ) can potentially learn to restrict its attention to either the left or right side . | This paper addresses an issue of transformers that sometimes they fail to find solutions that are easily expressible by attention patterns. The issue is justified to be the same as the problem of learning useful control flow. The authors propose two modifications, namely adding a copy gate functionality and a geometric attention module which facilitates focusing on local useful operations. The resulting method achieves near perfect accuracy on the considered benchmarks for length generalization, simple arithmetic tasks, and computational depth generalization. | SP:f041e2f13cd9c65b3eba2e53c11db7286bfbb796 |
Adaptive Control Flow in Transformers Improves Systematic Generalization | 1 INTRODUCTION . Neural networks ( NNs ) may easily learn certain training sets , but typically they do not generalize on systematically different test sets . Examples of systematic generalization ( Fodor et al. , 1988 ) include generalization to sequences longer than those seen during training—productivity , and algorithmic combinations of previously learned rules—systematicity . Despite recent efforts ( Bahdanau et al. , 2019 ; Korrel et al. , 2019 ; Lake , 2019 ; Li et al. , 2019 ; Russin et al. , 2019 ; Csordás et al. , 2021 ) , systematic generalization generally remains unsolved ( Fodor & McLaughlin , 1990 ; Lake & Baroni , 2018 ; Liska et al. , 2018 ; Greff et al. , 2020 ; Hupkes et al. , 2020 ) . On some datasets , the best performing models are neuro-symbolic hybrids ( Chen et al. , 2020 ; Liu et al. , 2020 ) using task-specific symbolic functions . However , their applicability to other datasets remains limited ( Furrer et al. , 2020 ; Shaw et al. , 2020 ) . A big question is : which type of architectural inductive bias encourages the training process to select “ good ” solutions which generalize systematically ? The popular Transformers ( Vaswani et al. , 2017 ) also often fail to generalize on algorithmic tasks ( e.g . Liska et al . ( 2018 ) ; Dubois et al . ( 2020 ) ; Chaabouni et al . ( 2021 ) ; Csordás et al . ( 2021 ) ; Ontañón et al . ( 2021 ) ) , even on tasks with intuitive solutions that can be simply expressed in terms of Transformer attention patterns . Given an input sequence of length N and a Transformer encoder of depth T , solving an algorithmic task is often all about routing the relevant information to the right node/operation at the right time in the T -by-N grid represented by Transformer columns . Effectively the task is to learn to draw an adaptive control flow on the canvas of Transformer columns . In fact , recent work by Weiss et al . ( 2021 ) introduced a programming language called RASP , which is specifically designed to express solutions to sequence processing problems , and which has a direct equivalent to the operations in Transformer encoders . However , it is shown that Transformers learn solutions expressed in RASP only through intermediate supervision of attention patterns , and sometimes , even such supervision fails . Generally speaking , Transformers fail to find easily interpretable and/or symbolic solutions to algorithmic tasks . We conversely hypothesize that attention-based NNs that are able to find intuitive solutions ( achieving interpretable attention patterns ) could improve systematic generalization . 1https : //github.com/robertcsordas/ndr Here we point out that regular Transformers lack some basic ingredients for learning such “ intuitive ” solutions to algorithmic problems . As a remedy , we propose simple architectural modifications to help them learn data routing . As a first step towards validating our model , we focus on the popular length generalization task of compositional table lookup ( CTL ; Liska et al . ( 2018 ) ; Hupkes et al . ( 2019 ) ; Dubois et al . ( 2020 ) ) , as well as two more complex tasks : a simple arithmetic task and a variant of ListOps ( Nangia & Bowman , 2018 ) designed to test the compositional generalization ability of NNs . Our novel Neural Data Router ( NDR ) achieves 100 % generalization accuracy ( never reported before ; Dubois et al . ( 2020 ) ) on the CTL task , and obtains nearly perfect accuracy on both the proposed simple arithmetic and ListOps tasks . We show that the attention and gating patterns of NDR tend to be interpretable as plausible control flows . 2 IMPROVING TRANSFORMERS FOR LEARNING ADAPTIVE CONTROL FLOW . We argue that the following components are needed to build Transformers capable of learning adaptive control flow . First , composing known operations in an arbitrary order requires that all operations are available at every computational step . This can be easily achieved by sharing the weights of the layers , as is done in Universal Transformers ( Dehghani et al. , 2019 ) . Second , the network should be sufficiently deep , at least as deep as the deepest data dependency in the computational graph built from elementary operations ( e.g. , in the case of a parse tree , this is the depth of the tree ) . Otherwise , multiple operations must be fused into a single layer and hinder natural and elegant compositions . Third , inputs in some columns should be kept unchanged until it is their turn to be processed . The regular Transformer lacks a mechanism for skipping the whole transformation step by simply copying the input to the next step/layer . We propose a special gating function , copy gate , to implement such a mechanism ( Sec . 2.1 ) . Finally , many algorithmic tasks require combining several local computations in the right order . This typically implies that attention should not focus on all possible matches at a given time but only on the closest match . We propose and investigate a new type of attention with a corresponding inductive bias called geometric attention ( Sec . 2.2 ) . Using both the geometric attention and copy gate , our model implements a “ neural data routing mechanism ” , which can adaptively serialize the input problem . We refer to the resulting new Transformer as Neural Data Router ( NDR ) . In the experimental section ( Sec . 3 ) , we evaluate this model on three algorithmic tasks requiring length generalization and demonstrate its effectiveness . 2.1 COPY GATE : LEARNING TO SKIP OPERATIONS ( VERTICAL FLOW ) . Each layer of the regular Transformer consists of one self-attention and one feedforward block . The input to each of these blocks is directly connected to the corresponding output via a residual connection ( Srivastava et al. , 2015 ; He et al. , 2016 ) . However , such a connection does not allow for skipping the transformation of the entire layer and simply passing the unchanged input to the next layer . Here we propose to add an explicit gate , which we call copy gate , to facilitate such a behavior . We consider a T -layer Transformer encoder and an input sequence of length N . Since each layer corresponds to one computational step , we often refer to a layer as a step t. We denote the Transformer state of column i in layer t as h ( i , t ) = Ht , i ∈ Rd where d is the state size , and Ht ∈ RN×d denotes the states of all N columns in layer t. In the copy gate-augmented Transformer , each column i in layer ( t+ 1 ) processes the input Ht similarly to regular Transformers : a ( i , t+1 ) = LayerNorm ( MultiHeadAttention ( h ( i , t ) , Ht , Ht ) + h ( i , t ) ) ( 1 ) ĥ ( i , t+1 ) = LayerNorm ( FFNdata ( a ( i , t+1 ) ) ) ( 2 ) using the standard multi-head attention operation ( Vaswani et al. , 2017 ) MultiHeadAttention with a query obtained from h ( i , t ) and keys/values from Ht , but the output is gated ( using g ( i , t+1 ) ∈ Rd ) as : g ( i , t+1 ) = σ ( FFNgate ( a ( i , t+1 ) ) ) ( 3 ) h ( i , t+1 ) = g ( i , t+1 ) ĥ ( i , t+1 ) + ( 1− g ( i , t+1 ) ) h ( i , t ) ( 4 ) We use the basic two-layer feedforward block ( Vaswani et al. , 2017 ) for both FFNdata and FFNgate which transforms input x ∈ Rd to : FFN ( x ) = W2 max ( W1x+ b1 , 0 ) + b2 ( 5 ) but with separate parameters and different dimensionalities : for FFNdata W data1 ∈ RdFF×d , W data2 ∈ Rd×dFF , while for FFNgate W gate1 , W gate 2 ∈ Rd×d , with biases bdata1 ∈ RdFF and bdata2 , b gate 1 , b gate 2 ∈ Rd . When the gate is closed i.e . g ( i , t+1 ) = 0 in Eq . 4 , the entire transformation is skipped and the input is copied over to the next layer h ( i , t+1 ) = h ( i , t ) . Crucially , we parameterize the gate ( Eq . 3 ) as a function of the output of the self-attention ( Eq . 1 ) , such that the decision to copy or transform the input for each column depends on the states of all columns . This is a crucial difference compared to previously proposed gatings in Transformers , which are solely motivated by training stability ( Parisotto et al. , 2020 ) or by a common practice from convolution-based models ( Chaabouni et al. , 2021 ) . None of the previous approaches can implement the behavior of our copy gate ( see Sec . 6 on related work ) . The bias of the gate bgate2 is initialized to −3 ( Hochreiter & Schmidhuber , 1997 ) . This ensures that no update happens initially to create a better gradient flow between layers . It also encourages the model to skip layers unless they have an important contribution in the corresponding step . 2.2 GEOMETRIC ATTENTION : LEARNING TO ATTEND TO THE CLOSEST MATCH ( HORIZONTAL FLOW ) . We propose geometric attention designed to attend to the closest matching element . Like in regular self-attention , given an input sequence [ x ( 1 ) , x ( 2 ) , ... , x ( N ) ] with x ( i ) ∈ Rdin , each input is projected to key k ( i ) ∈ Rdkey , value v ( i ) ∈ Rdvalue , query q ( i ) ∈ Rdkey vectors , and the dot product is computed for each key/query combination . In our geometric attention , the dot product is followed by a sigmoid function to obtain a score between 0 and 1 : Pi , j = σ ( k ( j ) > q ( i ) ) ( 6 ) which will be treated as a probability of the key at ( source ) position j matching the query at ( target ) position i . These probabilities are finally converted to the attention scores Ai , j as follows : Ai , j = Pi , j ∏ k∈Si , j ( 1− Pi , k ) ( 7 ) where Si , j denotes the set of all ( source ) indices which are closer to i than j is to i , and when two indices have the same distance to i , we consider the one which is to the right of i ( i.e. , greater than i ) to be closer , i.e. , Si , j = { k ∈ { 1 , ... , N } \ { i , j } : |i− k| ≤ |i− j| , if i < j k ∈ { 1 , ... , N } \ { i , j } : |i− k| < |i− j| , if j < i ( 8 ) In addition , we explicitly zero out the diagonal by setting Ai , i = 0 for all i = 1 , ... , N . The ordering of source indices is illustrated in Figure 1/Right . The resulting scores Ai , j are the attention scores used to compute the weighted averages of the value vectors . By using the terms ( 1− Pi , k ) in Eq . 7 , when there is a match , it downscales any other more distant matches . Two recent works ( Brooks et al. , 2021 ; Banino et al. , 2021 ) use such a parameterized geometric distribution in the form of Eq . 7 ( see Sec . 6 on related work ) . The resulting attention function has a complexity of O ( N2 ) , similar to the regular self-attention used in Transformers ( Vaswani et al. , 2017 ) . Eq . 7 can be implemented in a numerically stable way in log space . The products can then be calculated using cumulative sums , subtracting the elements for the correct indices in each position . Directional encoding . In practice , we augment Eq . 6 with an additional directional encoding . In fact , the only positional information available in the geometric attention presented above is the ordering used to define the product in Eqs . 7-8 . In practice , we found it crucial to augment the score computation of Eq . 6 with additional directional information , encoded as a scalar Di , j ∈ R for each target/source position pair ( i , j ) : Di , j = { WLRh ( i ) + bLR , if i ≤ j WRLh ( i ) + bRL , if i > j ( 9 ) where h ( i ) ∈ Rd denotes the input/state at position i and WLR , WRL ∈ R1×d , bLR , bRL ∈ R are trainable parameters . This directional information is integrated into the score computation of Eq . 6 as follows ( akin to how Dai et al . ( 2019 ) introduce the relative positional encoding ( Schmidhuber , 1992 ) as an extra term in the computation of attention scores ) : Pi , j = σ ( α ( Wqh ( i ) + u ) > Wk , Eh ( j ) + βDi , j + γ ) ( 10 ) where the matrix Wq ∈ Rdhead×d maps the states to queries , u ∈ Rdhead is a bias for queries , Wk , E ∈ Rdhead×d maps states to keys ( we note that dhead is typically the size of the key , query and value vectors for each head , dhead = dnheads ) , and α , β , γ ∈ R are learned scaling coefficients and bias , initialized to α = 1√ dhead , β = 1 , γ = 0 . Using this additional directional information , each query ( position i ) can potentially learn to restrict its attention to either the left or right side . | The authors propose Transformer Control Flow (TCF), a set of improvements to the Universal Transformer (Dehghani et al, ICLR 2019). They show that, for three compositional problems, TCF allows trained models to generalize to longer sequences, a common problem of many transformer implementations. As in the Universal Transformer (UT), the encoder consists of one shared transformer layer (self attention + fully connected network) which is iterated through a fixed number of times, by feeding the output of each iteration back into the input of the shared layer. However, whereas the UT uses a sequence to sequence model, TCF is an encoder-only architecture, which decodes the last element in the output sequence as the final result. Two new features are introduced : - a gating mechanism that allows the model to "skip a layer" (the input is then copied to the output), on the basis of the self-attention output, - a weighting system for the outputs of attention heads, which favors short-range attention (i.e. tokens close to the one currently considered), and can be trained to be biased towards a certain direction (before or after the current token). Experiments are conducted over three tasks: - predicting the output of sequences of permutations of 8 elements, in prefix or postfix notation, - predicting the result of of additions and multiplications modulo 10, in infix notation, - predicting the result of operations on lists of small integers, in prefix notation. For each task, TCF is shown to be capable of extrapolation to larger problems (i.e. longer sequences) than those seen at training. | SP:f041e2f13cd9c65b3eba2e53c11db7286bfbb796 |
Adaptive Control Flow in Transformers Improves Systematic Generalization | 1 INTRODUCTION . Neural networks ( NNs ) may easily learn certain training sets , but typically they do not generalize on systematically different test sets . Examples of systematic generalization ( Fodor et al. , 1988 ) include generalization to sequences longer than those seen during training—productivity , and algorithmic combinations of previously learned rules—systematicity . Despite recent efforts ( Bahdanau et al. , 2019 ; Korrel et al. , 2019 ; Lake , 2019 ; Li et al. , 2019 ; Russin et al. , 2019 ; Csordás et al. , 2021 ) , systematic generalization generally remains unsolved ( Fodor & McLaughlin , 1990 ; Lake & Baroni , 2018 ; Liska et al. , 2018 ; Greff et al. , 2020 ; Hupkes et al. , 2020 ) . On some datasets , the best performing models are neuro-symbolic hybrids ( Chen et al. , 2020 ; Liu et al. , 2020 ) using task-specific symbolic functions . However , their applicability to other datasets remains limited ( Furrer et al. , 2020 ; Shaw et al. , 2020 ) . A big question is : which type of architectural inductive bias encourages the training process to select “ good ” solutions which generalize systematically ? The popular Transformers ( Vaswani et al. , 2017 ) also often fail to generalize on algorithmic tasks ( e.g . Liska et al . ( 2018 ) ; Dubois et al . ( 2020 ) ; Chaabouni et al . ( 2021 ) ; Csordás et al . ( 2021 ) ; Ontañón et al . ( 2021 ) ) , even on tasks with intuitive solutions that can be simply expressed in terms of Transformer attention patterns . Given an input sequence of length N and a Transformer encoder of depth T , solving an algorithmic task is often all about routing the relevant information to the right node/operation at the right time in the T -by-N grid represented by Transformer columns . Effectively the task is to learn to draw an adaptive control flow on the canvas of Transformer columns . In fact , recent work by Weiss et al . ( 2021 ) introduced a programming language called RASP , which is specifically designed to express solutions to sequence processing problems , and which has a direct equivalent to the operations in Transformer encoders . However , it is shown that Transformers learn solutions expressed in RASP only through intermediate supervision of attention patterns , and sometimes , even such supervision fails . Generally speaking , Transformers fail to find easily interpretable and/or symbolic solutions to algorithmic tasks . We conversely hypothesize that attention-based NNs that are able to find intuitive solutions ( achieving interpretable attention patterns ) could improve systematic generalization . 1https : //github.com/robertcsordas/ndr Here we point out that regular Transformers lack some basic ingredients for learning such “ intuitive ” solutions to algorithmic problems . As a remedy , we propose simple architectural modifications to help them learn data routing . As a first step towards validating our model , we focus on the popular length generalization task of compositional table lookup ( CTL ; Liska et al . ( 2018 ) ; Hupkes et al . ( 2019 ) ; Dubois et al . ( 2020 ) ) , as well as two more complex tasks : a simple arithmetic task and a variant of ListOps ( Nangia & Bowman , 2018 ) designed to test the compositional generalization ability of NNs . Our novel Neural Data Router ( NDR ) achieves 100 % generalization accuracy ( never reported before ; Dubois et al . ( 2020 ) ) on the CTL task , and obtains nearly perfect accuracy on both the proposed simple arithmetic and ListOps tasks . We show that the attention and gating patterns of NDR tend to be interpretable as plausible control flows . 2 IMPROVING TRANSFORMERS FOR LEARNING ADAPTIVE CONTROL FLOW . We argue that the following components are needed to build Transformers capable of learning adaptive control flow . First , composing known operations in an arbitrary order requires that all operations are available at every computational step . This can be easily achieved by sharing the weights of the layers , as is done in Universal Transformers ( Dehghani et al. , 2019 ) . Second , the network should be sufficiently deep , at least as deep as the deepest data dependency in the computational graph built from elementary operations ( e.g. , in the case of a parse tree , this is the depth of the tree ) . Otherwise , multiple operations must be fused into a single layer and hinder natural and elegant compositions . Third , inputs in some columns should be kept unchanged until it is their turn to be processed . The regular Transformer lacks a mechanism for skipping the whole transformation step by simply copying the input to the next step/layer . We propose a special gating function , copy gate , to implement such a mechanism ( Sec . 2.1 ) . Finally , many algorithmic tasks require combining several local computations in the right order . This typically implies that attention should not focus on all possible matches at a given time but only on the closest match . We propose and investigate a new type of attention with a corresponding inductive bias called geometric attention ( Sec . 2.2 ) . Using both the geometric attention and copy gate , our model implements a “ neural data routing mechanism ” , which can adaptively serialize the input problem . We refer to the resulting new Transformer as Neural Data Router ( NDR ) . In the experimental section ( Sec . 3 ) , we evaluate this model on three algorithmic tasks requiring length generalization and demonstrate its effectiveness . 2.1 COPY GATE : LEARNING TO SKIP OPERATIONS ( VERTICAL FLOW ) . Each layer of the regular Transformer consists of one self-attention and one feedforward block . The input to each of these blocks is directly connected to the corresponding output via a residual connection ( Srivastava et al. , 2015 ; He et al. , 2016 ) . However , such a connection does not allow for skipping the transformation of the entire layer and simply passing the unchanged input to the next layer . Here we propose to add an explicit gate , which we call copy gate , to facilitate such a behavior . We consider a T -layer Transformer encoder and an input sequence of length N . Since each layer corresponds to one computational step , we often refer to a layer as a step t. We denote the Transformer state of column i in layer t as h ( i , t ) = Ht , i ∈ Rd where d is the state size , and Ht ∈ RN×d denotes the states of all N columns in layer t. In the copy gate-augmented Transformer , each column i in layer ( t+ 1 ) processes the input Ht similarly to regular Transformers : a ( i , t+1 ) = LayerNorm ( MultiHeadAttention ( h ( i , t ) , Ht , Ht ) + h ( i , t ) ) ( 1 ) ĥ ( i , t+1 ) = LayerNorm ( FFNdata ( a ( i , t+1 ) ) ) ( 2 ) using the standard multi-head attention operation ( Vaswani et al. , 2017 ) MultiHeadAttention with a query obtained from h ( i , t ) and keys/values from Ht , but the output is gated ( using g ( i , t+1 ) ∈ Rd ) as : g ( i , t+1 ) = σ ( FFNgate ( a ( i , t+1 ) ) ) ( 3 ) h ( i , t+1 ) = g ( i , t+1 ) ĥ ( i , t+1 ) + ( 1− g ( i , t+1 ) ) h ( i , t ) ( 4 ) We use the basic two-layer feedforward block ( Vaswani et al. , 2017 ) for both FFNdata and FFNgate which transforms input x ∈ Rd to : FFN ( x ) = W2 max ( W1x+ b1 , 0 ) + b2 ( 5 ) but with separate parameters and different dimensionalities : for FFNdata W data1 ∈ RdFF×d , W data2 ∈ Rd×dFF , while for FFNgate W gate1 , W gate 2 ∈ Rd×d , with biases bdata1 ∈ RdFF and bdata2 , b gate 1 , b gate 2 ∈ Rd . When the gate is closed i.e . g ( i , t+1 ) = 0 in Eq . 4 , the entire transformation is skipped and the input is copied over to the next layer h ( i , t+1 ) = h ( i , t ) . Crucially , we parameterize the gate ( Eq . 3 ) as a function of the output of the self-attention ( Eq . 1 ) , such that the decision to copy or transform the input for each column depends on the states of all columns . This is a crucial difference compared to previously proposed gatings in Transformers , which are solely motivated by training stability ( Parisotto et al. , 2020 ) or by a common practice from convolution-based models ( Chaabouni et al. , 2021 ) . None of the previous approaches can implement the behavior of our copy gate ( see Sec . 6 on related work ) . The bias of the gate bgate2 is initialized to −3 ( Hochreiter & Schmidhuber , 1997 ) . This ensures that no update happens initially to create a better gradient flow between layers . It also encourages the model to skip layers unless they have an important contribution in the corresponding step . 2.2 GEOMETRIC ATTENTION : LEARNING TO ATTEND TO THE CLOSEST MATCH ( HORIZONTAL FLOW ) . We propose geometric attention designed to attend to the closest matching element . Like in regular self-attention , given an input sequence [ x ( 1 ) , x ( 2 ) , ... , x ( N ) ] with x ( i ) ∈ Rdin , each input is projected to key k ( i ) ∈ Rdkey , value v ( i ) ∈ Rdvalue , query q ( i ) ∈ Rdkey vectors , and the dot product is computed for each key/query combination . In our geometric attention , the dot product is followed by a sigmoid function to obtain a score between 0 and 1 : Pi , j = σ ( k ( j ) > q ( i ) ) ( 6 ) which will be treated as a probability of the key at ( source ) position j matching the query at ( target ) position i . These probabilities are finally converted to the attention scores Ai , j as follows : Ai , j = Pi , j ∏ k∈Si , j ( 1− Pi , k ) ( 7 ) where Si , j denotes the set of all ( source ) indices which are closer to i than j is to i , and when two indices have the same distance to i , we consider the one which is to the right of i ( i.e. , greater than i ) to be closer , i.e. , Si , j = { k ∈ { 1 , ... , N } \ { i , j } : |i− k| ≤ |i− j| , if i < j k ∈ { 1 , ... , N } \ { i , j } : |i− k| < |i− j| , if j < i ( 8 ) In addition , we explicitly zero out the diagonal by setting Ai , i = 0 for all i = 1 , ... , N . The ordering of source indices is illustrated in Figure 1/Right . The resulting scores Ai , j are the attention scores used to compute the weighted averages of the value vectors . By using the terms ( 1− Pi , k ) in Eq . 7 , when there is a match , it downscales any other more distant matches . Two recent works ( Brooks et al. , 2021 ; Banino et al. , 2021 ) use such a parameterized geometric distribution in the form of Eq . 7 ( see Sec . 6 on related work ) . The resulting attention function has a complexity of O ( N2 ) , similar to the regular self-attention used in Transformers ( Vaswani et al. , 2017 ) . Eq . 7 can be implemented in a numerically stable way in log space . The products can then be calculated using cumulative sums , subtracting the elements for the correct indices in each position . Directional encoding . In practice , we augment Eq . 6 with an additional directional encoding . In fact , the only positional information available in the geometric attention presented above is the ordering used to define the product in Eqs . 7-8 . In practice , we found it crucial to augment the score computation of Eq . 6 with additional directional information , encoded as a scalar Di , j ∈ R for each target/source position pair ( i , j ) : Di , j = { WLRh ( i ) + bLR , if i ≤ j WRLh ( i ) + bRL , if i > j ( 9 ) where h ( i ) ∈ Rd denotes the input/state at position i and WLR , WRL ∈ R1×d , bLR , bRL ∈ R are trainable parameters . This directional information is integrated into the score computation of Eq . 6 as follows ( akin to how Dai et al . ( 2019 ) introduce the relative positional encoding ( Schmidhuber , 1992 ) as an extra term in the computation of attention scores ) : Pi , j = σ ( α ( Wqh ( i ) + u ) > Wk , Eh ( j ) + βDi , j + γ ) ( 10 ) where the matrix Wq ∈ Rdhead×d maps the states to queries , u ∈ Rdhead is a bias for queries , Wk , E ∈ Rdhead×d maps states to keys ( we note that dhead is typically the size of the key , query and value vectors for each head , dhead = dnheads ) , and α , β , γ ∈ R are learned scaling coefficients and bias , initialized to α = 1√ dhead , β = 1 , γ = 0 . Using this additional directional information , each query ( position i ) can potentially learn to restrict its attention to either the left or right side . | This paper proposes two modifications to provide additional inductive bias to the attention mechanism in the transformer architecture. The first modification adds a copy mechanism to simulate a “no-op” at a given transformer layer, and the second modification is an attention mechanism that is biased towards attending to local context. Both of these modifications are motivated as being useful for algorithmic tasks like compositional table lookup and arithmetic. From experiments that are *mostly* concerned with some kind of length/depth generalization, we see very significant improvements. | SP:f041e2f13cd9c65b3eba2e53c11db7286bfbb796 |
Spectral Multiplicity Entails Sample-wise Multiple Descent | 1 INTRODUCTION The double/multiple descent phenomenon attracted recent research attention due to ( Belkin et al. , 2019 ) . This line of work focuses on the parameter-wise double/multiple descent phenomenon of the risk curve ( Bartlett et al. , 2020 ; Tsigler & Bartlett , 2020 ; Belkin et al. , 2019 ; 2020 ; Chen et al. , 2020a ; Liang et al. , 2020 ; Advani et al. , 2020 ; Bös & Opper , 1998 ; Krogh & Hertz , 1992 ; Le Cun et al. , 1991 ; Mei & Montanari , 2019 ; Opper et al. , 1990 ; Vallet et al. , 1989 ; Watkin et al. , 1993 ) . The classical learning theory shows that when the number of parameters ( which reflects the model complexity ) increases , the test error ( generalization risk ) first decreases due to more fitting power , and then increases due to overfitting . The generalization risk attains a peak at the interpolation threshold ( the number of parameters equals the number of data points so that the model interpolates the data ) . This results in a U-shaped risk curve if we plot the test error versus the number of parameters . The double descent risk curve posits that the risk will decrease ( again ) if one further increases the model complexity beyond the interpolation threshold ( Belkin et al. , 2019 ) . Thus there is a second descent in addition to the first one in the U-shaped stage of the curve . Belkin et al . ( 2019 ) presented empirical results and showed the existence of such double descent behavior in the random Fourier features model , the fully connected neural network , and the random forest model . Prior to ( Belkin et al. , 2019 ) , earlier studies of the shape and features of the risk curve in a number of contexts include ( Vallet et al. , 1989 ; Opper et al. , 1990 ; Le Cun et al. , 1991 ; Krogh & Hertz , 1992 ; Bös & Opper , 1998 ; Watkin et al. , 1993 ; Advani et al. , 2020 ) . Loog et al . ( 2020 ) presented a prehistory of the double descent phenomenon . Belkin et al . ( 2020 ) proved the double descent curve in the Gaussian model and the Fourier series model . Mei & Montanari ( 2019 ) theoretically established the double descent curve of the random features regression . Bartlett et al . ( 2020 ) ; Tsigler & Bartlett ( 2020 ) characterized the conditions for ridgeless and ridge linear regression problems , respectively , under which the minimum-norm interpolants achieve near-optimal generalization risk . Liang et al . ( 2020 ) showed that the test error of the minimum-norm interpolator of data in reproducing kernel Hilbert space is upper bounded by a multiple descent curve as the model complexity increases . They also presented a numerical result supporting that the test error itself exhibits a multiple descent curve . Chen et al . ( 2020a ) proved that the multiple descent curve does exist for the minimum-norm interpolator in linear regression and that the curve can be even designed . Following the parameter-wise double descent , research interest extended to epoch-wise and samplewise double descent ( Nakkiran et al. , 2020 ; Chen et al. , 2020b ; Min et al. , 2021 ; Nakkiran et al. , 2021 ) . Nakkiran et al . ( 2020 ) observed from their numerical result that the generalization risk experiences a double descent as one keeps the model size fixed and increases the training time . They called this observation epoch-wise double descent . Nakkiran et al . ( 2020 ) also noted sample-wise non-monotonicity , which means that more data can hurt generalization . Nakkiran et al . ( 2021 ) proved that for isotropic features , optimally regularized ridge regression yields a monotonic generalization risk curve with more samples . Nakkiran et al . ( 2021 ) also showed that if the features are formed by projecting high-dimensional isotropic data to a random low-dimensional space ( say , ddimensional ) , the optimally regularized ridge regression has a monotonic generalization risk curve with increasing d ( the model size ) . Sample-wise non-monotonicity and double descent was also observed in ( Chen et al. , 2020b ; Min et al. , 2021 ) in adversarially trained models . C ompared to ( Wu & Xu , 2020 ; ichi Amari et al. , 2021 ; Dobriban & Wager , 2018 ; Richards et al. , 2021 ) , in what follows , we highlight our contributions and the differences from them . First , our major contribution is providing a rigorous proof for the existence of sample-wise ( test error vs. the number of training samples ) double and multiple descent in linear regression . However , ( Richards et al. , 2021 ) only mentioned parameter-wise double descent ( test error vs. model capacity ) in their related work . ( ichi Amari et al. , 2021 ) only mentioned epoch-wise ( test error vs. training time ) double descent in Appendix A.2 . Neither ( Richards et al. , 2021 ) nor ( ichi Amari et al. , 2021 ) mentioned multiple descent . Second , we made and theoretically proved the observation that an ill-conditioned covariance matrix is a sufficient condition for the existence of sample-wise multiple descent . To the best of our knowledge , our work is the first paper that pointed this out . Third , we solved the Stieltjes transform explicitly and derived explicit formulae for the risk and variance in our setup . In addition , we also provided rigorous treatment to the ridgeless setting and also obtained explicit formulae for it . Fourth , there is another difference between our paper and the papers that the reviewer mentioned . ( Wu & Xu , 2020 ; ichi Amari et al. , 2021 ; Dobriban & Wager , 2018 ; Richards et al. , 2021 ) assumed a prior on the true linear model and takes expectation over the prior . In our paper , we do not assume a prior on the true linear model and our risk does not take the expectation over a random true linear model . In the setting of generally anisotropic features , this paper gives an asymptotic characterization of the generalization risk curve with more samples . The asymptotic regime is an approximation for large n , d and can also shed light on practical machine learning problems . We first introduce our problem setup . 1.1 PROBLEM SETUP Data Distribution Let Σ ∈ Rd×d be a positive semi-definite matrix which is termed the covariance matrix , and let θ∗ ∈ Rd . The eigenvalues of Σ are λ1 , . . . , λm with multiplicity d1 , . . . , dm , respectively . We have d = ∑m i=1 di . Assume that λ1 , . . . , λm are fixed , distinct , all positive , and do not depend on d ( i.e. , for all d , the eigenvalue of Σ are always λ1 , . . . , λm ) . We assume the following data distribution D for ( x , y ) ∈ Rd × R : x ∼ N ( 0 , Σ ) , y = x > θ∗ + , where x and are independent and ∼ N ( 0 , σ2 ) . In practice , there are natural random variables x that satisfy our assumption . For example , assume that we want to use machine A to measure the length of several objects and use machine B to measure their temperature . The measured lengths and temperatures follow an i.i.d . Gaussian distribution . However , the variance of measurement of machine A is different from that of machine B . Then we consider the random vector formed by the measurements x = ( l1 , . . . , ln , t1 , . . . , tn ) , where li and ti are the length and temperature of object i , respectively . This results in a block-structured covariance matrix . When we measure more objects , the size of the covariance matrix tends to infinity . Second , the motivation came from ( Nakkiran et al. , 2021 ) . ( Nakkiran et al. , 2021 ) observed empirically in their Figure 2 that when the covariance matrix has a block structure ( specifically , there are only two fixed different eigenvalues 10 and 1 ) , the expected excess risk exhibits multiple descent . We quantitatively studied this observation and obtained the related formulae . The excess risk of an estimator θ ∈ Rd is given by R ( θ ) = Ex , y∼D [ ( y − x > θ ) 2 − ( y − x > θ∗ ) 2 ] . Assume that the training data { ( xi , yi ) } ni=1 ⊆ Rd × R is drawn i.i.d . from D. Write X = x > 1 ... x > n ∈ Rn×d , y = y1 ... yn ∈ Rn . ( 1 ) We have y = Xθ∗ + , where ∼ N ( 0 , σ2In ) . Ridge Estimator and Minimum-Norm Estimator Definition 1 ( Ridge estimator ) . The ridge estimator θ̂λ , n , d ∈ Rd ( λ > 0 ) solves the following minimization problem min θ∈Rd 1 n ‖Xθ − y‖22 + λ ‖θ‖ 2 2 . Definition 2 ( Minimum-norm estimator ) . The minimum-norm estimator ( also known as the ridgeless estimator ) θ̂0 , n , d ∈ Rd solves the following minimization problem min θ∈Rd ‖θ‖2 such that ‖Xθ − y‖2 = min θ∈Rd ‖Xθ − y‖2 . We are interested in the expected excess risk of θ̂λ , n , d , which is given by Rλ , n , d = E [ R ( θ̂λ , n , d ) ] . The expectation is taken over the randomness of the training data { ( xi , yi ) } ni=1 . Asymptotic Regime Let Πi ∈ Rd×d be the orthogonal projection to the eigenspace of λi . This paper focuses on the asymptotic behavior of the expected excess risk of θ̂λ , n , d where n , di → +∞ , di/n→ zi ( zi is a fixed positive constant ) , and ‖Πiθ∗‖2 → ηi . In other words , we are interested in lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi Rλ , n , d . 1.2 OUR CONTRIBUTIONS Our contributions are summarized as follows . 1 . We obtain the formulae for the limiting bias and variance , and thereby the limiting risk . We use two methods to obtain these formulae . Specifically , we obtain the limiting bias and variance by solving the Stieltjes transform and computing its derivatives and antiderivatives . We also use convex Gaussian min-max theorem ( CGMT ) ( Thrampoulidis et al. , 2015 ) to compute the limiting variance . The advantage of the CGMT method is that it is more mathematically tractable for the ridgeless estimator . Through the CGMT approach , we obtain a closed-form formula for the variance in the underparameterized regime and simplify the formula for the variance in the overparameterized regime . Moreover , based on the simplified formula , we deduce a closed-form expression for the variance if the covariance matrix of the data distribution has two different eigenvalues . 2 . We find and theoretically prove that sample-wise multiple descent happens when the covariance matrix has eigenvalues of very different orders of magnitude ( thus the covariance matrix is highly ill-conditioned ) . 3 . We show that if the true linear model θ∗ satisfies ‖Πiθ∗‖2 = √ di d , optimal regulariza- tion ( i.e. , pick λ that minimizes the generalization risk of θ̂λ , n , d ) results in a monotone generalization risk curve—in other words , with optimal regularization , more data samples always improve generalization . Thus there is no sample-wise double or multiple descent . This provides a theoretical proof of a phenomenon observed in ( Nakkiran et al. , 2021 ) that optimal regularization can mitigate double descent for anisotropic data . Note that without regularization , there will be a blow-up in expected excess risk when n = d ( the linear model exactly interpolates the data ) and therefore , there is no samplewise descent across the under- and over-parameterized regimes . 2 PRELIMINARIES Notation Write [ m ] for { 1 , 2 , . . . , m } . Let i denote the imaginary unit . If x ∈ Rn and Σ ∈ Rn×n is a positive semidefinite matrix , write ‖x‖Σ , √ x > Σx . For a vector x , let ‖·‖1 and ‖·‖2 denote the ` 1 and ` 2 norm , respectively . Let denote the Hadamard ( entry-wise ) product between vectors . Write ‖ · ‖2 and ‖ · ‖F for the spectral matrix norm and Frobenius matrix norm , respectively . Let 4 denotes the Loewner order . For two square matrices A and B of the same size , write A 4 B if B − A is positive semidefinite . Define spec ( A ) as the set of all eigenvalues of A . Let O ( d ) = { A ∈ Rd×d | AA > = A > A = Id } denote the set of d × d orthogonal matrices . Define Sd−1 ( r ) , { x ∈ Rd | ‖x‖2 = r } . Denote almost sure convergence by a.s.→ , and convergence in probability plim and P→ . Ridge Estimator and Minimum-Norm Estimator We begin with the equivalent characterizations of the ridge and minimum-norm estimator . An equivalent characterization of the ridge estimator θ̂λ , n , d is θ̂λ , n , d = ( X > X + λnId ) −1 X > y = X > ( λnIn +XX > ) −1 y . ( 2 ) The second equality in Equation ( 2 ) is because of the Sherman–Morrison–Woodbury formula . A proof of Equation ( 2 ) can be found in ( Tsigler & Bartlett , 2020 ) . An equivalent definition of the minimum-norm estimator θ̂0 , n , d is that θ̂0 , n , d solves the following minimization problem min θ∈Rd ‖θ‖2 such that X > Xθ = X > y . Thus we have θ̂0 , n , d = ( X > X ) + X > y = X > ( XX > ) + y = X+y , where A+ denotes the pseudo-inverse of A . The second and third equalities are because of the identity X+ = ( X > X ) + X > = X > ( XX > ) + . The minimum-norm estimator is the limit of the ridge estimator θ̂λ , n , d as λ→ 0+ : θ̂0 , n , d = lim λ→0+ θ̂λ , n , d . This is because of the identity limλ→0+ ( X > X + λnId ) −1 X > = limλ→0+ X > ( λnIn +XX > ) −1 = X+ . Bias-Variance Decomposition of Expected Excess Risk We first show that the excess risk of an estimator θ equals the norm of θ − θ∗ : R ( θ ) = E ( x , y ) ∼D [ ( y − x > θ ) 2 − ( y − x > θ∗ ) ] = Ex [ ( x > ( θ∗ − θ ) ) 2 ] = E [ ( θ∗ − θ ) > Σ ( θ∗ − θ ) ] = E [ ‖θ∗ − θ‖2Σ ] . For the ridge estimator , the expected excess risk is Rλ , d , n =E [ ‖θ∗ −X > ( nλIn +XX > ) −1 ( Xθ∗ + ) ‖2Σ ] =E [ ‖ ( Id −X > ( nλIn +XX > ) −1X ) θ∗ −X > ( nλIn +XX > ) −1 ‖2Σ ] =E [ ‖ ( Id −X > ( nλIn +XX > ) −1X ) θ∗‖2Σ ] + E [ ∥∥X > ( nλIn +XX > ) −1 ∥∥2Σ ] =E [ ‖ ( Id −X > ( nλIn +XX > ) −1X ) θ∗‖2Σ ] + σ2E tr [ XΣX > ( nλIn +XX > ) −2 ] , Bλ , d , n + Vλ , d , n . ( 3 ) For the minimum-norm estimator , the expected excess risk is R0 , d , n = E [ ‖θ∗ −X+ ( Xθ∗ + ) ‖2Σ ] = E [ ∥∥ ( Id −X+X ) θ∗ −X+ ∥∥2Σ ] = E [ ∥∥ ( Id −X+X ) θ∗∥∥2Σ ] + E [ ∥∥X+ ∥∥2Σ ] = E [ ∥∥ ( Id −X+X ) θ∗∥∥2Σ ] + σ2E tr [ ( X+ ) > ΣX+ ] , B0 , d , n + V0 , d , n . ( 4 ) We call Bλ , d , n and B0 , d , n the bias term , and call Vλ , d , n and V0 , d , n the variance term . The bias and variance for the minimum-norm estimator are the limit of their counterpart for the ridge estimator as λ → 0+ , i.e. , limλ→0+ Bλ , d , n = B0 , d , n and limλ→0+ Vλ , d , n = V0 , d , n ( this can be shown by Lebesgue ’ s dominated convergence theorem , see our proof in Lemma 5 and Lemma 6 , respectively ) . 3 MAIN RESULTS 3.1 LIMITING RISK AND SAMPLE-WISE MULTIPLE DESCENT We study the limiting bias and variance for a linear regression problem in which the data distribution follows a multivariate normal distribution , the spectrum of the covariance matrix exhibits a block structure and tends to a discrete distribution . Thanks to the random matrix theory , we obtain the formulae ( presented in Theorem 1 ) for the limiting bias and variance , and thereby the total risk . We use two methods to obtain these formulae . The first method is through the Stieltjes transform of the matrix 1nXX > . The central quantity for computing the limiting bias and variance through the first method is the solution ρ∗ to the optimization problem Equation ( 5 ) in Item 1 of Theorem 1 . Item 1 guarantees the existence of a solution and determines its optimality condition Equation ( 6 ) . Item 2 computes the Jacobian matrix of ρ∗ with respect to λi and provides a closed-form formula to compute the Jacobian matrix . Equation ( 9 ) and Equation ( 10 ) in Item 4 give the formulae for the limiting bias obtained by the first method . Equation ( 11 ) and Equation ( 12 ) give the limiting variance . The second method is through the convex Gaussian min-max theorem ( CGMT ) ( Thrampoulidis et al. , 2015 ) . The central quantity is the solution r∗ to the minimax optimization problem Equation ( 8 ) in Item 3 . We use CGMT to obtain the formulae for the variance term . They are presented in Equation ( 13 ) and Equation ( 14 ) in Item 4 . Theorem 1 . The following statements hold : 1 . There exists a minimizer ρ ∈ Rm+ that solves inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) . ( 5 ) The minimizer ρ∗ satisfies λi λ+ ∑m j=1 λjρ ∗ j + 1− zi ρi = 0 , ∀i ∈ [ m ] . ( 6 ) 2 . Let ρ∗ ∈ Rm be a minimizer of Equation ( 5 ) and J = ∂ρ ∗ ∂λ ∈ R m×m be the Jacobian matrix Jij = ∂ρ∗i ∂λj . Then J is given by J = ( diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > ) −1 ( ( z− ρ∗ ) ρ∗ > − diag ( ρ∗ ) ) and the matrix ( diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > ) is always invertible . 3 . Define r = ( r1 , . . . , rm ) , λ = ( λ1 , . . . , λm ) , and ϑ ( rt , r , λ ) = 2rt √ 1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t . ( 7 ) For any Kt ≥ 2λ and Ku ≥ 2λ+ ( 2+ √ γ ) λ , we have max 0≤rt≤Kt min 0≤ri≤Ku ϑ ( rt , r , λ ) = min 0≤ri≤Ku max 0≤rt≤Kt ϑ ( rt , r , λ ) = max rt≥0 min ri≥0 ϑ ( rt , r , λ ) = min ri≥0 max rt≥0 ϑ ( rt , r , λ ) ( 8 ) and the above optimization problem has a solution . 4 . Let r∗ = ( r∗1 , . . . , r ∗ m ) solve Equation ( 8 ) . Define q = ( η21/z1 , . . . , η 2 m/zm ) > and view λ = ( λ1 , . . . , λm ) > as a column vector . The limiting bias is given by lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi Bλ , d , n = q > ( λ ρ∗ + Jλ 2 ) , ( 9 ) lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi B0 , d , n = lim λ→0+ q > ( λ ρ∗ + Jλ 2 ) . ( 10 ) The limiting variance is given by lim n , di→+∞ di/n→zi Vλ , d , n = σ 2λ 2 > ( ρ∗ + J > λ ) ( λ+ λ > ρ∗ ) 2 , ( 11 ) lim n , di→+∞ di/n→zi V0 , d , n = σ 2 lim λ→0+ λ 2 > ( ρ∗ + J > λ ) ( λ+ λ > ρ∗ ) 2 , ( 12 ) lim n , di→+∞ di/n→zi Vλ , d , n = σ 2 m∑ i=1 r∗2i , ( 13 ) lim n , di→+∞ di/n→zi V0 , d , n = σ 2 lim λ→0+ m∑ i=1 r∗2i . ( 14 ) Figure 1 illustrates the theoretical and numerical values of the bias , variance , and total risk . We observe a triple descent in Figure 1a where the covariance matrix has three blocks , and a quadruple descent in Figure 1b where the covariance has four blocks . In the three-block example , we set λ3 λ2 λ1 ( λ1 = 1 , λ2 = 100 , λ3 = 1000 ) . In the four-block example , we set λ4 λ3 λ2 λ1 ( λ1 = 1 , λ2 = 100 , λ3 = 104 , λ4 = 107 ) . For the values of other parameters , please refer to the caption of Figure 1 Our findings provide an explanation for the occurrence of sample-wise multiple descent : it occurs when the covariance matrix is highly ill-conditioned . Moreover , we find that the generalization risk curve is continuous in ridge regression ( λ > 0 ) while it blows up at n = d in ridgeless regression ( λ = 0 ) . We can see the singularity ( at n = d = 200 ) of the ridgeless generalization risk curve in Figure 2a . Following Theorem 1 , we focus on the variance in the ridgeless case ( λ = 0 ) and further study the expressions in Equation ( 13 ) and Equation ( 14 ) . We find that the variance exhibits sharply different behaviors in the underparameterized and overparameterized regimes . Recall that we will let n , di → +∞ and keep di/n → zi . Then d/n → ∑ i∈ [ m ] zi . If lim d/n = ∑ i∈ [ m ] zi > 1 , we are in the underparameterized regime . In this regime , the bias vanishes and therefore the risk equals the variance . If lim d/n < 1 , we are in the overparameterized regime . Theorem 2 . If d/n→ ∑ i∈ [ m ] zi > 1 and r ∗ = ( r∗1 , . . . , r ∗ m ) solves min ri≥0 ∑ i∈ [ m ] 1 λi r2i subject to √∑ i∈ [ m ] r2i + 1 = ∑ i∈ [ m ] √ ziri , then we have an optimality condition for r∗ : r∗i r∗j = λi λj · √ ziA ∗ − r∗i√ zjA∗ − r∗j , i , j ∈ [ m ] , ( 15 ) where A∗ = √∑ i∈ [ m ] r ∗2 i + 1 . Moreover , we have limn , di→+∞ di/n→zi V0 , d , n = σ 2 limλ→0+ ∑m i=1 r ∗2 i . If d/n→ ∑ i∈ [ m ] zi < 1 , then we have lim n , di→+∞ di/n→zi V0 , d , n = σ 2 ∑ i∈ [ m ] zi 1− ∑ i∈ [ m ] zi . . Corollary 1 . If m = 1 and d/n→ z1 > 1 , we have limn , di→+∞ di/n→zi V0 , d , n = σ 2 1 z1−1 . Proof . In the case m = 1 , we have r∗1 solves minr1≥0 1 λ1 r21 subject to √ r21 + 1 = √ z1r1 . The equality constraint gives r∗21 = 1 z1−1 . Then by Theorem 2 , the limiting variance is σ 2r∗21 = σ 2 1 z1−1 . In Theorem 2 , we find that in the underparameterized regime , r∗ solves an equality-constrained minimization problem . In the proof of Theorem 2 , we see that the equality constraint is feasible in the underparameterized regime but infeasible in the overparameterized regime . Moreover , we present an optimality condition for r∗ , which will be used in Theorem 3 to study the two-block ( m = 2 ) case . If the data distribution is isotropic ( which means that the covariance matrix is a scalar matrix ) , Collorary 1 shows that the limiting variance is σ2 1z1−1 , which agrees with ( Hastie et al. , 2019 , Theorem 1 ) . In the overparameterized regime , however , we find that the limiting variance does not depend on the spectrum { λ1 , . . . , λm } of the covariance matrix and only depends on the noise intensity σ and the ratios zi = lim di/n . This agrees with ( Hastie et al. , 2019 , Proposition 2 ) . In Theorem 3 , we study the case m = 2 and present a concrete closed-form formula for the limiting variance in the overparameterized regime . Recall that the limiting variance in the underparameterized regime has a closed-form σ2 ∑ i∈ [ m ] zi 1− ∑ i∈ [ m ] zi for general m , as shown in Theorem 2 . Theorem 3 . If m = 2 and d/n→ z1 + z2 > 1 , we have lim n , di→+∞ di/n→zi V0 , d , n = σ 2 q 2 + 1 q2 ( z1 − 1 ) + 2q √ z1z2 + z2 − 1 . where q = λ1 ( z1 − 1 ) + λ2 ( 1− z2 ) + √ ( λ1 ( z1 − 1 ) + λ2 ( 1− z2 ) ) 2 + 4λ1λ2z1z2 2λ2 √ z1z2 . ( 16 ) We illustrate the theoretical values predicted by Theorem 3 ( overparameterized regime ) and Theorem 2 ( underparameterized regime ) in Figure 2a and compare it to the numerical values . Corollary 2 ( Triple descent in the two-block case ) . Assume m = 2 , z1 = z2 , d/n→ ζ = 2z1 , and λ2/λ1 = % . Define f % ( ζ ) = limn , di→+∞ di/n→zi V0 , d , n . We have f ( ζ ) , lim % →+∞ fρ ( ζ ) = σ2 ζ1−ζ ζ < 1 , σ2 ( 1 ζ−1 + 2 2−ζ − 1 ) 1 < ζ < 2 σ2 2ζ−2 ζ > 2 . ( 17 ) There exists ζ1 , ζ2 , ζ3 , ζ4 and % 0 such that for all % > % 0 , we have f ′ % ( ζ1 ) < 0 , f ′ % ( ζ2 ) > 0 , f ′ % ( ζ3 ) < 0 , and f ′ % ( ζ4 ) < 0 . Proof . The case ζ < 1 is already given in Theorem 2 . In the sequel , assume ζ > 1 . Define q as in Equation ( 16 ) . We have q = ζ + √ ζ2 ( % + 1 ) 2 − 4ζ ( % − 1 ) 2 + 4 ( % − 1 ) 2 − ( ζ − 2 ) % − 2 2ζ % . Recall Theorem 3 , we get f % ( ζ ) = lim n , di→+∞ di/n→zi V0 , d , n = 2 ( q2 + 1 ) ζ ( q + 1 ) 2 − 2 ( q2 + 1 ) = 2σ2 ζ ( q+1 ) 2 q2+1 − 2 . Direct calculation yields lim % →+∞ f % ( ζ ) = σ2 ζ1−ζ ζ < 1 , σ2 ( 1 ζ−1 + 2 2−ζ − 1 ) 1 < ζ < 2 σ2 2ζ−2 ζ > 2 . , g ( ζ ) , lim % →+∞ f ′ % ( ζ ) = σ2 1 ( ζ−1 ) 2 ζ < 1 , σ2 ζ 2−2 ( ζ2−3ζ+2 ) 2 1 < ζ < 2 σ2 −2 ( ζ−2 ) 2 ζ > 2 . , The function g ( ζ ) > 0 if ζ ∈ ( √ 2 , 2 ) and we have g ( ζ ) < 0 if ζ < √ 2 or ζ > 2 . Pick ζ1 > 2 > ζ2 > √ 2 > ζ3 > 1 > ζ4 . Then we have g ( ζ1 ) < 0 , g ( ζ2 ) > 0 , g ( ζ3 ) < 0 , and g ( ζ4 ) > 0 . There exists % 0 such that for all % > % 0 , we have f ′ % ( ζ1 ) < 0 , f ′ % ( ζ2 ) > 0 , f ′ % ( ζ3 ) < 0 , and f ′ % ( ζ4 ) < 0 . Collorary 2 theoretically proves that there exists triple descent when m = 2 and λ2 λ1 . Note that a larger ζ = lim d/n reflects a relatively smaller n. If f ′ % ( ζ ) < 0 , then f % ( ζ ) decreases on a neighborhood of ζ and therefore the limiting variance increases with a relatively larger n. As n becomes relatively larger , we see an increasing stage , a decreasing stage , and finally an increasing stage in order in the overparameterized regime ( n < d ) . When we further increase n and enter the underparameterized regime , we observe a decreasing stage . We illustrate f ( ζ ) in Figure 2b . In Figure 2b , we observe two singularities at ζ = 1 and ζ = 2 . 3.2 OPTIMAL REGULARIZATION MONOTONIZES GENERALIZATION RISK CURVE Recall the definition of the ridge estimator in Definition 1 . Since this subsection concerns samplewise monotonicity , we add a subscript n toX and y ( they are defined by Equation ( 1 ) in Section 1.1 ) to emphasize that they consist of n data items . Therefore we write θ̂λ , n , d , arg min θ 1 n ‖yn −Xnθ‖22 + λ ‖θ‖ 2 2 . In this subsection , under an assumption , we show that optimal regularization ( i.e. , pick λ that minimizes the generalization risk of θ̂λ , n , d ) results in a monotone generalization risk curve—in other words , with optimal regularization , more data always reduces the generalization risk . The assump- tion is that ‖Πiθ∗‖2 = √ di d , i.e. , the squared norm of the projection of θ ∗ onto each eigenspace of the covariance matrix is proportional to the dimension of that eigenspace . ( Nakkiran et al. , 2021 ) showed by numerical results that optimal regularization can mitigate double descent for anisotropic data distribution . We give a partial theoretical proof of their observed phenomenon . To ease the notation , we use γi , limn/di rather than zi , lim di/n in Theorem 4 because a larger γ reflects a relatively larger n ( in the limit ) . Theorem 4 shows that with the optimal regularization , the limiting risk is an increasing function of γ1 , . . . , γm . Theorem 4 ( Optimal regularization ) . If ‖Πiθ∗‖2 = √ di d , ( 18 ) then there exists a function g ( γ1 , . . . , γm ) such that g ( γ1 , . . . , γm ) is increasing in every γi and lim n , di→∞ n/di→γi inf λ > 0 EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ = g ( γ1 , . . . , γm ) . 4 CONCLUSION We studied the generalization risk ( test error ) versus the number of training samples in ridgeless regression . Under the assumption that the data distribution is Gaussian and the spectrum distribution of its covariance matrix converges to a discrete distribution , we obtained the exact formulae for the limiting bias and variance terms using the random matrix theory when the dimension and the number of training samples go to infinity in a proportional manner . Using these formulae , we proved the sample-wise multiple descent phenomenon of the generalization risk curve.Moreover , we theoretically showed that the ridge estimator with optimal regularization can result in a monotone generalization risk curve and thereby eliminate multiple descent under some assumptions . REFERENCES Madhu S Advani , Andrew M Saxe , and Haim Sompolinsky . High-dimensional dynamics of gener- alization error in neural networks . Neural Networks , 132:428–446 , 2020 . Zhi-Dong Bai and Yong-Qua Yin . Limit of the smallest eigenvalue of a large dimensional sample covariance matrix . In Advances In Statistics , pp . 108–127 . World Scientific , 2008 . Zhidong Bai and Jack W Silverstein . Spectral analysis of large dimensional random matrices , volume 20 . Springer , 2010 . Peter L Bartlett , Philip M Long , Gábor Lugosi , and Alexander Tsigler . Benign overfitting in linear regression . Proceedings of the National Academy of Sciences , 117 ( 48 ) :30063–30070 , 2020 . Mikhail Belkin , Daniel Hsu , Siyuan Ma , and Soumik Mandal . Reconciling modern machinelearning practice and the classical bias–variance trade-off . Proceedings of the National Academy of Sciences , 116 ( 32 ) :15849–15854 , 2019 . Mikhail Belkin , Daniel Hsu , and Ji Xu . Two models of double descent for weak features . SIAM Journal on Mathematics of Data Science , 2 ( 4 ) :1167–1180 , 2020 . Siegfried Bös and Manfred Opper . Dynamics of batch training in a perceptron . Journal of Physics A : Mathematical and General , 31 ( 21 ) :4835 , 1998 . Lin Chen , Yifei Min , Mikhail Belkin , and Amin Karbasi . Multiple descent : Design your own generalization curve . arXiv preprint arXiv:2008.01036 , 2020a . Lin Chen , Yifei Min , Mingrui Zhang , and Amin Karbasi . More data can expand the generalization gap between adversarially robust and standard models . In International Conference on Machine Learning , pp . 1670–1680 . PMLR , 2020b . Donald L Cohn . Measure theory . Springer , 2013 . Edgar Dobriban and Stefan Wager . High-dimensional asymptotics of prediction : Ridge regression and classification . The Annals of Statistics , 46 ( 1 ) :247–279 , 2018 . Trevor Hastie , Andrea Montanari , Saharon Rosset , and Ryan J Tibshirani . Surprises in highdimensional ridgeless least squares interpolation . arXiv preprint arXiv:1903.08560 , 2019 . Shun ichi Amari , Jimmy Ba , Roger Baker Grosse , Xuechen Li , Atsushi Nitanda , Taiji Suzuki , Denny Wu , and Ji Xu . When does preconditioning help or hurt generalization ? In International Conference on Learning Representations , 2021 . URL https : //openreview.net/forum ? id= S724o4_WB3 . Anders Krogh and John A Hertz . Generalization in a linear perceptron in the presence of noise . Journal of Physics A : Mathematical and General , 25 ( 5 ) :1135 , 1992 . Yann Le Cun , Ido Kanter , and Sara A Solla . Eigenvalues of covariance matrices : Application to neural-network learning . Physical Review Letters , 66 ( 18 ) :2396 , 1991 . Tengyuan Liang , Alexander Rakhlin , and Xiyu Zhai . On the multiple descent of minimum-norm interpolants and restricted lower isometry of kernels . In Conference on Learning Theory , pp . 2683–2711 . PMLR , 2020 . F. Liese and K.J . Miescke . Statistical Decision Theory : Estimation , Testing , and Selection . Springer Series in Statistics . Springer New York , 2008 . ISBN 9780387731940 . Marco Loog , Tom Viering , Alexander Mey , Jesse H Krijthe , and David MJ Tax . A brief prehistory of double descent . Proceedings of the National Academy of Sciences , 117 ( 20 ) :10625–10626 , 2020 . Song Mei and Andrea Montanari . The generalization error of random features regression : Precise asymptotics and the double descent curve . Communications on Pure and Applied Mathematics , 2019 . Yifei Min , Lin Chen , and Amin Karbasi . The curious case of adversarially robust models : More data can help , double descend , or hurt generalization . In Conference on Uncertainty in Artificial Intelligence , 2021 . Preetum Nakkiran , Gal Kaplun , Yamini Bansal , Tristan Yang , Boaz Barak , and Ilya Sutskever . Deep double descent : Where bigger models and more data hurt . In International Conference on Learning Representations , 2020 . URL https : //openreview.net/forum ? id=B1g5sA4twr . Preetum Nakkiran , Prayaag Venkat , Sham M. Kakade , and Tengyu Ma . Optimal regularization can mitigate double descent . In International Conference on Learning Representations , 2021 . URL https : //openreview.net/forum ? id=7R7fAoUygoa . M Opper , W Kinzel , J Kleinz , and R Nehl . On the ability of the optimal perceptron to generalise . Journal of Physics A : Mathematical and General , 23 ( 11 ) : L581 , 1990 . Dominic Richards , Jaouad Mourtada , and Lorenzo Rosasco . Asymptotics of ridge ( less ) regression under general source condition . In International Conference on Artificial Intelligence and Statistics , pp . 3889–3897 . PMLR , 2021 . Walter Rudin . Principles of mathematical analysis . New York , NY : McGraw-Hill , Inc. , 3 edition , 1976 . Christos Thrampoulidis , Samet Oymak , and Babak Hassibi . Regularized linear regression : A precise analysis of the estimation error . Proceedings of Machine Learning Research , 40:1683–1709 , 2015 . Alexander Tsigler and Peter L Bartlett . Benign overfitting in ridge regression . arXiv preprint arXiv:2009.14286 , 2020 . F Vallet , J-G Cailton , and Ph Refregier . Linear and nonlinear extension of the pseudo-inverse solution for learning boolean functions . EPL ( Europhysics Letters ) , 9 ( 4 ) :315 , 1989 . Roman Vershynin . Introduction to the non-asymptotic analysis of random matrices . arXiv preprint arXiv:1011.3027 , 2010 . Roman Vershynin . High-dimensional probability : An introduction with applications in data science , volume 47 . Cambridge university press , 2018 . Timothy LH Watkin , Albrecht Rau , and Michael Biehl . The statistical mechanics of learning a rule . Reviews of Modern Physics , 65 ( 2 ) :499 , 1993 . Denny Wu and Ji Xu . On the optimal weighted ` 2 regularization in overparameterized linear regression . arXiv preprint arXiv:2006.05800 , 2020 . A EIGENDECOMPOSITION AND MORE NOTATION Write Σ = PΛP > , where P is an orthogonal matrix and Λ = diag ( λ1Id1 , . . . , λmIdm ) ∈ Rd×d is a diagonal matrix . Write λ− = mini∈ [ m ] λi and λ+ = maxi∈ [ m ] λi . We can generate x1 , . . . , xn from standard normal random vector zi ∼ N ( 0 , Id ) by setting xi = PΛ1/2zi . Therefore , if Z = ( z1 . . . zn ) ∈ Rd×n , we get X > = ( x1 . . . xn ) = PΛ 1/2 ( z1 . . . zn ) = PΛ 1/2Z . Take the transpose gives X = Z > Λ1/2P > . Note that every entry of Z ∈ Rd×n follows i.i.d . N ( 0 , 1 ) . Write Z in a row-partitioned form Z = Z > 1 ... Z > m , where Zi ∈ Rn×di . Write P in a column-partitioned form P = ( P1 . . . Pm ) , where Pi ∈ Rd×di . Recall that Πi ∈ Rd×d denotes the orthogonal projection to the eigenspace of λi . We have Πi = PiP > i . Define θ ′ , P > θ∗ and write it in a row-partitioned form θ′ = P > 1 θ ∗ ... P > mθ ∗ = θ ′ 1 ... θ′m , ( 19 ) where θ′i ∈ Rdi . Then ‖θ′i‖2 = ∥∥P > i θ∗∥∥2 = ∥∥PiP > i θ∗∥∥2 = ‖Πiθ∗‖2 . We summarize part of the notation above in Table 1 . B BIAS AND VARIANCE UNDER EIGENDECOMPOSITION Lemma 1 characterizes the smallest and largest eigenvalue of Z > Z d ( if n/d → γ < 1 ) and ZZ > n ( if n/d→ γ > 1 ) . Recall that we study the asymptotic regime di/n→ zi . Therefore γ = 1∑ j∈ [ m ] zj . Lemma 1 ( ( Bai & Yin , 2008 , Theorem 2 ) ) . Let Z ∈ Rd×n be a random matrix whose entries are i.i.d . N ( 0 , 1 ) random variables . As n , d→ +∞ , n/d→ γ ∈ ( 0 , 1 ) , we have limλmin ( Z > Z d ) = ( 1−√γ ) 2 , limλmax ( Z > Z d ) = ( 1 + √ γ ) 2 almost surely . If γ ∈ ( 1 , ∞ ) , as n , d→ +∞ , n/d→ γ , we have limλmin ( ZZ > n ) = ( 1− √ 1/γ ) 2 , limλmax ( ZZ > n ) = ( 1 + √ 1/γ ) 2 almost surely . Lemma 2 ( Corollary 5.35 ( Vershynin , 2010 ) ) . Let A be an N × n matrix whose entries are independent standard normal random variables . Then for every t ≥ 0 , with probability at least 1− 2 exp ( −t2/2 ) one has √ N − √ n− t ≤ smin ( A ) ≤ smax ( A ) ≤ √ N + √ n+ t , where smin ( A ) and smax ( A ) are the smallest and largest singular value of A. Lemma 3 . Let Z ∈ Rd×n be a random matrix whose entries are i.i.d . N ( 0 , 1 ) random variables , where d = d ( n ) satisfies limn→∞ nd ( n ) = γ . There exists universal positive constants C1 , C2 , N such that for all n > N , we have 0 < C1 < 1 n s2min ( Z ) ≤ 1 n s2max ( Z ) < C2 . Proof . Since d ( n ) n , with loss of generality , we assume n/d → γ ∈ ( 0 , 1 ) . Take t = c1 √ n in Lemma 2 , where c1 = 12 ( 1√ γ − 1 ) > 0 . With probability at least 1− 2e−c21n/2 , we have √ d− √ n− c1 √ n ≤ smin ( Z ) ≤ smax ( Z ) ≤ √ d+ √ n+ c1 √ n . Therefore , we deduce ( √ d n − 1− c1 ) 2 ≤ 1 n s2min ( Z ) ≤ 1 n s2max ( Z ) ≤ ( √ d n + 1 + c1 ) 2 . Define C1 = 18 ( 1√ γ − 1 ) 2 > 0 and C2 = ( 3√ γ + 1 ) 2 . Then there exists a universal constant N1 such that for all n > N1 , with probability at least 1− 2e−c 2 1n/2 , we have 0 < C1 < 1 n s2min ( Z ) ≤ 1 n s2max ( Z ) < C2 . Define event En = { C1 < 1 ns 2 min ( Z ) ≤ 1ns 2 max ( Z ) < C2 } c . Then we have Pr { En } ≤ 2e−c 2 1n/2 . Since ∑ n≥1 Pr { En } ≤ ∑ n≥1 2e −c21n/2 < ∞ , then the probability that infinitely many of En occur is 0 , i.e. , Pr { lim sup n En } = 0 . Therefore , there exists a universal constant N2 such that for all n > N2 , En does not happen , in other words , 0 < C1 < 1 n s2min ( Z ) ≤ 1 n s2max ( Z ) < C2 holds . Lemma 4 . Let Z ∈ Rd×n be a random matrix whose entries are i.i.d . N ( 0 , 1 ) random variables , and let p be a fixed positive integer which is viewed as a constant and hidden in .. If n d , we have E tr ( ZZ > ) n2 , E tr ( ZZ > ) 2 n3 , and E ‖Z‖p2 . np/2 . Proof . We have E tr ( ZZ > ) = E ‖Z‖2F = ∑ i∈ [ d ] , j∈ [ n ] Ez2ij = nd n2 . Write Z = z > 1 ... z > d , where zi ∈ Rn and zi ∼ N ( 0 , In ) . We have E ( z > i zi ) 2 = E ‖zi‖42 = n ( n + 2 ) . For i 6= j , we deduce E ( z > i zj ) 2 = E ( ‖zi‖2 ‖zj‖2 u > v ) 2 where u , v ∼ Unif ( Sn−1 ) and ‖zi‖2 , ‖zj‖2 , u , v are independent . Then we get E ( ‖zi‖ ‖zj‖ s > i sj ) 2 = E ‖zi‖22 ‖zj‖ 2 2 ( s > i sj ) 2 = n2Eu21 = n2 · 1 n = n . As a result , we have E tr ( ZZ > ) 2 = E ∥∥ZZ > ∥∥2 F = ∑ i , j∈ [ d ] E ( z > i zj ) 2 = dn ( n+ 2 ) + ( d2 − d ) n n3 . By ( Vershynin , 2018 ) , there exists a universal constant C > 0 such that for any t > 0 , P { ‖Z‖2 > C ( √ n+ √ d+ t ) } < 2e−t 2 . Define K = C ( √ n+ √ d ) . Then we have P { ‖Z‖2 > K + t } < 2e −t2/C2 . ( 20 ) Recall Γ ( z ) = ∫∞ 0 xz−1e−xdx . Setting t = C √ u in the equation below yields∫ ∞ 0 e−t 2/C2tp−1dt . ∫ ∞ 0 e−uu p 2−1du = Γ ( p 2 ) 1 . Then we can bound the following integral∫ ∞ K P { ‖Z‖2 ≥ t } pt p−1dt = ∫ ∞ 0 P { ‖Z‖2 ≥ K + t } p ( t+K ) p−1 dt . ∫ ∞ 0 e−t 2/C2 ( t+K ) p−1 dt . ∫ ∞ 0 e−t 2/C2 ( tp−1 +Kp−1 ) dt = ∫ ∞ 0 e−t 2/C2tp−1dt+Kp−1 ∫ ∞ 0 e−t 2/C2dt .n p−1 2 , where the first inequality is because of Equation ( 20 ) . We are in a position to bound E ‖Z‖p2 : E ‖Z‖p2 = ∫ ∞ 0 P { ‖Z‖p2 ≥ u } du = ∫ ∞ 0 P { ‖Z‖2 ≥ t } pt p−1dt = ∫ K 0 P { ‖Z‖2 ≥ t } pt p−1dt+ ∫ ∞ K P { ‖Z‖2 ≥ t } pt p−1dt .np/2 + n ( p−1 ) /2 .np/2 , where the first inequality is because∫ K 0 P { ‖Z‖2 ≥ t } pt p−1dt ≤ ∫ K 0 ptp−1dt = Kp . np/2 . Lemma 5 . The following equation for the bias term Bλ , d , n ( defined in Equation ( 3 ) ) holds Bλ , d , n =E [ ‖Λ1/2 ( Id − Λ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2 ) θ′‖22 ] ( 21 ) =E [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] . ( 22 ) Moreover , we have |Bλ , d , n| . ‖θ∗‖22 and limλ→0+ Bλ , d , n = B0 , d , n . For all sufficiently large n and d such that n/d → γ ∈ ( 0 , 1 ) , we have 0 ≤ ddλBλ , d , n . ‖θ ∗‖22 . Therefore , { Bλ , d , n } is uniformly bounded and uniformly equicontinuous with respect to λ ∈ ( 0 , ∞ ) . Proof . Introduce the shorthand notation M = Λ1/2ZZ > Λ1/2 ∈ Rd×d , A = Id + 1nλM ∈ R d×d , N = nλIn + Z > ΛZ ∈ Rn×n , and Q = Id − Λ1/2ZN−1Z > Λ1/2 ∈ Rd×d . Because X > ( nλIn +XX > ) −1X = PΛ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2P > , we have Bλ , d , n =E [ ‖ ( Id − PΛ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2P > ) θ∗‖2PΛP > ] =E [ ‖Λ1/2 ( Id − Λ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2 ) θ′‖22 ] =E [ ‖Λ1/2Qθ′‖22 ] . Using the Sherman–Morrison-Woodbury formula yields N−1 = 1 nλ In − 1 ( nλ ) 2Z > Λ1/2 ( I + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 Λ1/2Z = 1 nλ ( In − Z > Λ1/2 ( nλId + Λ 1/2ZZ > Λ1/2 ) −1 Λ1/2Z ) = 1 nλ ( In − Z > Λ1/2 ( nλId +M ) −1 Λ1/2Z ) . ( 23 ) It follows that Q =Id − Λ1/2ZN−1Z > Λ1/2 =Id − 1 nλ Λ1/2Z ( In − Z > Λ1/2 ( nλId +M ) −1 Λ1/2Z ) Z > Λ1/2 =Id − M nλ ( Id − ( nλId +M ) −1M ) =Id − M nλ ( Id − ( nλId +M ) −1 ( nλId +M − nλId ) ) =Id −M ( nλId +M ) −1 = ( Id + 1 nλ M ) −1 =A−1 . Therefore , we deduce Bλ , d , n = E [ ‖Λ1/2 ( Id + 1 nλ M ) −1 θ′‖22 ] = E [ ‖Λ1/2A−1θ′‖22 ] . Because ∥∥Λ1/2∥∥ 2 . 1 and ∥∥∥ ( Id + 1nλΛ1/2ZZ > Λ1/2 ) −1∥∥∥ 2 ≤ 1 , we have ‖Λ1/2A−1θ′‖22 . ‖θ′‖ 2 2 = ‖θ ∗‖22 . Therefore |Bλ , d , n| . ‖θ∗‖22 . Moreover , by the dominated convergence theorem , lim λ→0+ Bλ , d , n = B0 , d , n . We compute the derivative of A−1 : dA−1 dλ = −A−1 dA dλ A−1 = MA−2 nλ2 . The matrix Mn = Λ1/2ZZ > Λ1/2 n ∈ R d×d is positive semidefinite and its d − n smallest eigenvalues are zeros . Its non-zero eigenvalues are the same as the non-zero eigenvalues of Z > ΛZ n . Because all eigenvalues of Z > ΛZ n are positive almost surely , the spectrum of M n consists of d− n zeros and the spectrum of Z > ΛZ n . We study the range of the spectrum of Z > ΛZ n . Because λ− Z > Z n 4 Z > ΛZ n 4 λ+ Z > Z n , we deduce λmin ( Z > ΛZ n ) ≥ λ−λmin ( Z > Z n ) → λ− ( 1− √ 1/γ ) 2 ( 24 ) λmax ( Z > ΛZ n ) ≤ λ+λmax ( Z > Z n ) → λ+ ( 1 + √ 1/γ ) 2 . ( 25 ) Define L1 = λ−λmin ( Z > Z n ) and L2 = λ+λmax ( Z > Z n ) . We get limn , d→+∞ n/d→γ < 1 L1 = λ− ( 1− √ 1/γ ) 2 , limn , d→+∞ n/d→γ < 1 L2 = λ+ ( 1 + √ 1/γ ) 2 and spec ( Z > ΛZ n ) ⊆ [ L1 , L2 ] . We bound ∥∥MA−3∥∥ 2 ∥∥MA−3∥∥ 2 =n ∥∥∥∥∥Mn ( Id + M nλ ) −3∥∥∥∥∥ 2 =n max s∈spec ( Mn ) s ( 1 + s/λ ) 3 =n max s∈ { 0 } ∪spec ( Z > ΛZ n . ) s ( 1 + s/λ ) 3 =n max s∈spec ( Z > ΛZ n . ) s ( 1 + s/λ ) 3 ≤n max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 . We compute ddλ‖Λ 1/2A−1θ′‖22 : d dλ ‖Λ1/2A−1θ′‖22 = 1 nλ2 θ′ > ( A−1ΛMA−2 +MA−2ΛA−1 ) θ′ = 1 nλ2 ( A−1θ′ ) > ( ΛMA−1 +MA−1Λ ) ( A−1θ′ ) Next , we bound ∣∣ d dλ‖Λ 1/2A−1θ′‖22 ∣∣ : ∣∣∣∣ ddλBλ , d , n ∣∣∣∣ ≤ 1 nλ2 ∥∥MA−2ΛA−1 +A−1ΛMA−2∥∥ 2 ‖θ′‖22 ≤ 2 nλ2 ∥∥MA−2ΛA−1∥∥ 2 ‖θ′‖22 = 2 nλ2 ∥∥MA−3AΛA−1∥∥ 2 ‖θ′‖22 ≤ 2 nλ2 ∥∥MA−3∥∥ 2 ∥∥AΛA−1∥∥ 2 ‖θ′‖22 . 1 λ2 max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 ‖θ ′‖22 , where the last inequality is because ∥∥AΛA−1∥∥ 2 = ‖Λ‖2 ≤ λ+ . 1 . Define f ( s ) = s ( 1+s/λ ) 3 . Because f ′ ( s ) = λ 3 ( λ−2s ) ( λ+s ) 4 , the function f is increasing on [ 0 , λ/2 ] and decreasing on [ λ/2 , +∞ ) . If λ ≤ 2L1 , we have max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 = L1 ( 1 + L1/λ ) 3 . It follows that 1 λ2 · L1 ( 1 + L1/λ ) 3 = L1λ ( λ+ L1 ) 3 ≤ max λ∈ [ 0,2L1 ] L1λ ( λ+ L1 ) 3 . 1 L1 . If λ ≥ 2L2 , we get 1 λ2 max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 = 1 λ2 · L2 ( 1 + L2/λ ) 3 ≤ max λ∈ [ 2L2 , ∞ ) L2λ ( λ+ L2 ) 3 . 1 L2 ≤ 1 L1 . If 2L1 < λ < 2L2 , we obtain 1 λ2 max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 . 1 λ . 1 L1 . In all three cases , we show that 1λ2 maxs∈ [ L1 , L2 ] s ( 1+s/λ ) 3 . 1L1 . It follows that∣∣∣∣ ddλ‖Λ1/2A−1θ′‖22 ∣∣∣∣ . 1L1 ‖θ′‖22 = ‖θ ′‖22 λ−λmin ( Z > Z n ) ‖θ′‖22 λmin ( Z > Z n ) . By Lemma 3 , there exists a universal constant n0 such that for all n > n0 , one has 1 λmin ( Z > Z n ) . 1 . Thus we conclude that ∣∣∣∣ ddλ‖Λ1/2A−1θ′‖22 ∣∣∣∣ . ‖θ′‖22 . We can exchange differentiation and expectation and get d dλ Bλ , d , n = E [ d dλ ‖Λ1/2A−1θ′‖22 ] and ∣∣∣∣ ddλBλ , d , n ∣∣∣∣ = E [ ∣∣∣∣ ddλ‖Λ1/2A−1θ′‖22 ∣∣∣∣ ] . ‖θ′‖22 . Lemma 6 . The following equation for the variance term holds Vλ , d , n =σ 2E‖Λ1/2 ( λnId + Λ 1/2ZZ > Λ1/2 ) −1 Λ1/2Z‖22 =σ2E‖ΛZ ( λnIn + Z > ΛZ ) −1 ‖22 . Moreover , for all sufficiently large n and d such that n/d → γ 6= 1 , we have limλ→0+ Vλ , d , n = V0 , d , n , |Vλ , d , n| . 1 and ∣∣ d dλVλ , d , n ∣∣ . 1 . Therefore , { Vλ , d , n } is uniformly bounded and uniformly equicontinuous with respect to λ ∈ ( 0 , ∞ ) . Proof . As in the proof of Lemma 5 , defineM = Λ1/2ZZ > Λ1/2 ∈ Rd×d andN = nλIn+Z > ΛZ ∈ Rn×n . Recalling Σ = PΛP > and X = Z > Λ1/2P > , we have Vλ , d , n =σ 2E tr [ XΣX > ( nλIn +XX > ) −2 ] =σ2E tr [ Z > Λ2ZN−2 ] =σ2E tr [ N−1Z > Λ2ZN−1 ] =σ2E ∥∥ΛZN−1∥∥2 F . Recalling Equation ( 23 ) yields ΛZN−1 = 1 nλ ΛZ ( In − Z > Λ1/2 ( nλId +M ) −1 Λ1/2Z ) = 1 nλ Λ1/2 ( In −M ( nλId +M ) −1 ) Λ1/2Z =Λ1/2 ( nλId +M ) −1 Λ1/2Z . Define R = Λ1/2Z ∈ Rd×n . We get ( nλId +M ) −1 Λ1/2Z = ( nλId +RR > ) −1R . Notice that if 0 < a < b , then aId +RR > 4 bId +RR > . We deduce ( bId +RR > ) 2 − ( aId +RR > ) 2 = ( b2 − a2 ) Id + 2 ( b− a ) RR > < 0 . Thus ( bId +RR > ) 2 < ( aId +RR > ) 2 , which implies ( bId +RR > ) −2 4 ( aId +RR > ) −2 . We get R > ( bId +RR > ) −2R 4 R > ( aId +RR > ) −2R , tr ( R > ( bId +RR > ) −2R ) ≤ tr ( R > ( aId +RR > ) −2R ) Let λ0 ( · ) denote the smallest non-zero eigenvalue of a positive semidefinite matrix . We bound the Frobenius norm ∥∥∥ ( nλId +M ) −1 Λ1/2Z∥∥∥2 F = tr ( R > ( nλId +RR > ) −1R ) ≤ tr ( lim λ→0+ R > ( nλId +RR > ) −2R ) = tr ( R > R ) + = tr ( Z > ΛZ ) + . tr ( Z > Z ) + . It follows that∥∥ΛZN−1∥∥2 F = ∥∥∥Λ1/2 ( nλId +M ) −1 Λ1/2Z∥∥∥2 F . ∥∥∥ ( nλId +M ) −1 Λ1/2Z∥∥∥2 F . tr ( Z > Z ) + = tr ( ZZ > ) + . If n/d → γ < 1 , the matrix Z > Z is full-rank almost surely . Then , using the formula for the mean of inverse Wishart distribution , we have E tr ( Z > Z ) + = trE ( Z > Z ) −1 = tr ( In d−n−1 ) 1 . If n/d → γ > 1 , the matrix ZZ > is full-rank almost surely . Similarly , we have E tr ( ZZ > ) + = trE ( ZZ > ) −1 1 . By the dominated convergence theorem , we have limλ→0+ Vλ , d , n = V0 , d , n . Moreover , Vλ , d , n . E ∥∥ΛZN−1∥∥2 F . 1 . Next we bound ddλV ( θ̂ ) . Because dN−1 dλ = −N −1 dN dλN −1 = −nN−2 , we deduce d dλ ∥∥ΛZN−1∥∥2 2 = d dλ tr ( N−1Z > Λ2ZN−1 ) = −2n tr ( Z > Λ2ZN−3 ) ≤ 0 . On the other hand , we have tr ( Z > Λ2ZN−3 ) = tr ( N−3/2Z > Λ2ZN−3/2 ) . tr ( N−3/2Z > ΛZN−3/2 ) = tr ( Z > ΛZN−3 ) = ∑ s∈spec ( Z > ΛZ ) s ( λn+ s ) 3 . Because the number of non-zero eigenvalues of Z > ΛZ equals rank ( Z > ΛZ ) = n ∧ d n , we get∣∣∣∣ ddλ ∥∥ΛZN−1∥∥22 ∣∣∣∣ n tr ( Z > Λ2ZN−3 ) . n2 max s∈spec ( Z > ΛZ ) s ( λn+ s ) 3 = max s∈spec ( Z > ΛZ n ) \ { 0 } s ( λ+ s ) 3 . If γ < 1 , the matrix Z > ΛZ n is full-rank almost surely . By Equation ( 24 ) and Equation ( 25 ) in the proof of Lemma 5 , there exists universal positive constants C1 and C2 such that spec ( Z > ΛZ n ) ⊆ [ C1 , C2 ] for all sufficiently large n and d such that n/d→ γ < 1 . If γ > 1 , the non-zero eigenvalues of Z > ΛZ n and M n are the same . The matrix M n is full-rank almost surely . Thus spec ( Z > ΛZ n ) \ { 0 } = spec ( M n ) . Because y > Λ−1y . y > y , λmin ( M n ) = min x6=0 x > Λ 1/2ZZ > Λ1/2 n x x > x = min y 6=0 y > ZZ > n y y > Λ−1y & min y 6=0 y > ZZ > n y y > y = λmin ( ZZ > n ) . Similarly , we get λmax ( M n ) . λmax ( ZZ > n ) . Therefore , there exists universal positive constants C1 and C2 such that spec ( Z > ΛZ n ) \ { 0 } ⊆ [ C1λmin ( Z > Z n ) , C2λmax ( Z > Z n ) ] . Thus in both cases , we have shown that there exists universal positive constants C1 and C2 such that spec ( Z > ΛZ n ) \ { 0 } ⊆ [ C1λmin ( Z > Z n ) , C2λmax ( Z > Z n ) ] . Define L1 = C1λmin ( Z > Z n ) and L2 = C2λmax ( Z > Z n ) . As a result , we get∣∣∣∣ ddλ ∥∥ΛZN−1∥∥22 ∣∣∣∣ . maxs∈ [ L1 , L2 ] s ( λ+ s ) 3 . Define f ( s ) = s ( λ+s ) 3 . Because f ′ ( s ) = λ−2s ( λ+s ) 4 , the function f is increasing on [ 0 , λ/2 ] and decreasing on [ λ/2 , +∞ ) . If λ ≥ 2L2 or λ ≤ 2L1 , we get max s∈ [ L1 , L2 ] s ( λ+ s ) 3 ≤ L1 ( λ+ L1 ) 3 ∨ L2 ( λ+ L2 ) 3 ≤ 1 L21 . If 2L1 < λ < 2L2 , we get max s∈ [ L1 , L2 ] s ( λ+ s ) 3 . 1 λ2 . 1 L21 . As a result , for all sufficiently large n , we have∣∣∣∣ ddλ ∥∥ΛZN−1∥∥22 ∣∣∣∣ = maxs∈ [ L1 , L2 ] s ( λ+ s ) 3 . 1L21 . 1λ2min ( Z > Zn ) . 1 , where the final inequality is because of Lemma 3 . We can exchange the expectation and differentiation and obtain d dλ Vλ , d , n = σ 2E d dλ ∥∥ΛZN−1∥∥2 2 and ∣∣∣∣ ddλVλ , d , n ∣∣∣∣ ≤ σ2E ∣∣∣∣ ddλ ∥∥ΛZN−1∥∥22 ∣∣∣∣ . 1 . C LEMMAS ON STIELTJES TRANSFORM Definition 3 ( Stieltjes transform ) . The Stieltjes transform of a distribution with cumulative distribution function F is defined by sF ( z ) = ∫ 1 λ− z dF ( λ ) ( z ∈ H , { z ∈ C | =z > 0 } ) . Lemma 7 ( Theorem 4.3 ( Bai & Silverstein , 2010 ) ) . Suppose that the entries of Xn ∈ Cn×p are complex random variables that are independent for each n and identically distributed for all n and satisfy E [ |x11 − Ex11|2 ] = 1 . Also , assume that Tn = diag ( τ1 , . . . , τp ) , τi is real , and the empirical distribution function of { τ1 , . . . , τp } converges almost surely to a probability distribution function H as n → ∞ . The entries of both Xn and Tn may depend on n , which is suppressed for brevity . Set Bn = An + 1nXnTnX ∗ n , where X ∗ n is the conjugate transpose of Xn , An is Hermitian , n× n satisfying FAn → FA almost surely , where FA is a distribution function ( possibly defective ) on the real line . Assume also that Xn , Tn , and An are independent . When p = p ( n ) with p/n → y > 0 as n → ∞ , then , almost surely , FBn , the empirical spectral distribution of the eigenvalues of Bn , converges vaguely , as n → ∞ , to a ( nonrandom ) distribution function F , where for any z ∈ C+ = { z ∈ C | =z > 0 } , its Stieltjes transform s = s ( z ) is the unique solution in C+ to the equation s = sA ( z − y ∫ τdH ( τ ) 1 + τs ) , where sA is the Stieltjes transform of FA . Lemma 8 . If the functions fα , gα : I → R satisfy fα ( x ) − gα ( x ) → 0 uniformly as α→ +∞ , then limα→+∞ ( infx∈I f ( x ) − infx∈I g ( x ) ) = 0 . Proof . Because fα ( x ) − gα ( x ) → 0 uniformly as α→ +∞ , we have for ∀ > 0 , there exists N ( ) such that for ∀α > N ( ) and ∀x ∈ I , it holds that |fα ( x ) − gα ( x ) | < . Therefore , we get gα ( x ) − < fα ( x ) < gα ( x ) + . Thus we obtain inf x∈I fα ( x ) ≤ fα ( x ) < gα ( x ) + inf x∈I gα ( x ) − ≤ gα ( x ) − < fα ( x ) , which in turn implies inf x∈I fα ( x ) ≤ inf x∈I gα ( x ) + inf x∈I gα ( x ) − ≤ inf x∈I fα ( x ) . It follows that |infx∈I fα ( x ) − infx∈I gα ( x ) | ≤ . In other words , we proved lim α→+∞ ( inf x∈I f ( x ) − inf x∈I g ( x ) ) = 0 . Lemma 9 . Define N = λnIn + Z > ΛZ . Then we have lim n , di→+∞ di/n→zi tr ( N−1 ) = d dλ inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) , ( 26 ) lim n , di→+∞ di/n→zi 1 n log det N n = inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . ( 27 ) Proof . Proof of Equation ( 26 ) . We apply Lemma 7 with An = 0n×n , Xn = Z > ∈ Rn×d , Tn = Λ , and Bn = 1nZ > ΛZ . The distribution function of 0n×n converges to 1t≤0 and its Stieltjes transform is sA ( z ) = ∫ 1 λ−zd1λ≤0 = − 1 z . The empirical distribution function of { λ1 , . . . , λ1︸ ︷︷ ︸ d1 , . . . , λm . . . , λm︸ ︷︷ ︸ dm } is Hn , di ( t ) = ∑ i∈ [ m ] di d 1t≤λi . Recall di/n → zi . Thus di/d → zi/K , where d/n → y = ∑ j∈ [ m ] zj . The empirical distribution function converges to H ( t ) = ∑ i∈ [ m ] zi y 1t≤λi . Then the empirical spectral distribution of the eigenvalues of 1 nZ > ΛZ converges vaguely to a nonrandom distribution function F and its Stieltjes transform is s = s ( z ) = lim n , di→+∞ di/n=zi 1 n tr ( 1 n Z > ΛZ − zIn ) −1 = lim n , di→+∞ di/n=zi tr ( Z > ΛZ − znIn ) −1 ( this is because of ( Bai & Silverstein , 2010 , Theorem B.9 ) ) . By Lemma 7 , s ( z ) is the unique solution in C+ to the equation s ( z ) = sA ( z − y ∫ τdH ( τ ) 1 + τs ) = − 1 z − ∑ i∈ [ m ] λizi 1+λis ( z ) , which gives s ( z ) z − ∑ i∈ [ m ] λizi 1 + λis ( z ) = −1 . We want to prove Equation ( 26 ) first . The lefthand side of Equation ( 26 ) equals lim n , di→+∞ di/n=zi tr ( λnIn + Z > ΛZ ) −1 = s ( −λ ) . Because the matrix 1nZ > ΛZ is positive semidefinite and thereby all of its eigenvalues are nonnegative , its limiting spectral distribution is supported on [ 0 , ∞ ) . The Stieltjes transform s ( z ) of the limiting spectral distribution can be continuously extended to ( −∞ , 0 ) . Therefore , for ∀λ > 0 , s ( −λ ) is the unique solution to the following equation s ( −λ ) ( λ+ m∑ i=1 λizi 1 + λis ( −λ ) ) = 1 . ( 28 ) We will verify that d dλ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) satisfies Equation ( 28 ) . Take a minimizer ρ∗ of Equation ( 5 ) . Using the envelope theorem yields d dλ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = 1 λ+ ∑m j=1 λjρ ∗ j . ( 29 ) Plugging the righthand side of Equation ( 29 ) into Equation ( 28 ) , we get 1 λ+ ∑m j=1 λjρ ∗ j ( λ+ m∑ i=1 λizi 1 + λi · 1λ+∑mj=1 λjρ∗j ) = 1 . Rewriting the above equation yields m∑ i=1 λizi 1 + λi · 1λ+∑mj=1 λjρ∗j = m∑ i=1 λiρ ∗ i . It suffices to show that each summand on the lefthand side equals its counterpart on the righthand side λizi 1 + λi · 1λ+∑mj=1 λjρ∗j = λiρ ∗ i . We need to show zi ρ∗i = 1 + λi · 1 λ+ ∑m j=1 λjρ ∗ j , which is equivalent to Equation ( 6 ) and therefore holds . Hence we have proved Equation ( 26 ) . Proof of Equation ( 27 ) . We use α to denote the indices n , di . Define h ( λ ) = inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) . First , we want to show that limλ0→+∞ ( h ( λ0 ) − log λ0 ) = 0 . Define lλ0 ( ρ ) = log 1 + 1 λ0 m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) , q ( ρ ) = m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) . The Hessian matrix of q ( p ) is diag ( z1 ρ21 , . . . , zmρ2m ) , which is positive definite since zi , ρi > 0 . Therefore , q ( p ) is convex and the minimum of q ( ρ ) on Rm+ is attained at ρ = z , where z = ( z1 , . . . , zm ) > . The minimum is infρ∈Rm+ q ( ρ ) = q ( z ) = 0 . Because lim‖ρ‖2→+∞ lλ0 ( ρ ) = +∞ , there exists a universal constant K1 > ‖z‖2 > 0 such that lλ0 ( ρ ) > lλ0 ( z ) for all ‖ρ‖2 > K1 . Define E = { ρ ∈ Rm+ | ‖ρ‖2 ≤ K1 } . We have z ∈ E , infρ∈E lλ0 ( ρ ) = infρ∈Rm+ lλ0 ( ρ ) , and infρ∈E q ( ρ ) = infρ∈Rm+ q ( ρ ) = 0 . Therefore , we get h ( λ0 ) − log λ0 = inf ρ∈Rm+ lλ0 ( ρ ) = inf ρ∈E lλ0 ( ρ ) − inf ρ∈E q ( ρ ) . ( 30 ) On E , there exists a universal constant K2 > 0 such that ∑ j∈ [ m ] λjρj < K2 . Thus on E , we deduce 0 < lλ0 ( ρ ) − q ( ρ ) = log 1 + 1 λ0 m∑ j=1 λjρj < log ( 1 + K2 λ0 ) . The right-hand side log ( 1 + K2λ0 ) → 0 as λ0 → +∞ . Thus limλ0→+∞ ( lλ0 ( ρ ) − q ( ρ ) ) = 0 uniformly for ρ ∈ E. By Lemma 8 , we get lim λ0→+∞ ( inf ρ∈E lλ0 ( ρ ) − inf ρ∈E q ( ρ ) ) = 0 . Recalling Equation ( 30 ) yields lim λ0→+∞ ( h ( λ0 ) − log λ0 ) = 0 . ( 31 ) Define fα ( λ ) = 1n log det N n . Second , we want to show limα fα ( λ ) = h ( λ ) , where limα means limn , di→+∞ di/n=zi . We have fα ( λ ) − fα ( λ0 ) = ∫ λ λ0 f ′α ( x ) dx for ∀λ , λ0 > 0 . It follows that |fα ( λ ) − h ( λ ) | ≤ |fα ( λ ) − h ( λ ) + h ( λ0 ) − fα ( λ0 ) + fα ( λ0 ) − log λ0 + log λ0 − h ( λ0 ) | ≤ |fα ( λ ) − h ( λ ) + h ( λ0 ) − fα ( λ0 ) |+ |fα ( λ0 ) − log λ0|+ |log λ0 − h ( λ0 ) | = ∣∣∣∣∣ ∫ λ λ0 f ′α ( x ) dx− ( h ( λ ) − h ( λ0 ) ) ∣∣∣∣∣+ |fα ( λ0 ) − log λ0|+ |log λ0 − h ( λ0 ) | . Taking lim supα on both sides gives lim sup α |fα ( λ ) − h ( λ ) | ≤ lim sup α ∣∣∣∣∣ ∫ λ λ0 f ′α ( x ) dx− ( h ( λ ) − h ( λ0 ) ) ∣∣∣∣∣+lim supα |fα ( λ0 ) − log λ0|+|log λ0 − h ( λ0 ) | . ( 32 ) Recall f ′α ( λ ) = trN −1 and limα f ′α ( λ ) = h ′ ( λ ) ( this is exactly Equation ( 26 ) ) . Because∣∣trN−1∣∣ = trN−1 ≤ 1λ and ∫ λλ0 1xdx < +∞ , by the dominated convergence theorem , we have lim α ∫ λ λ0 f ′α ( x ) dx = ∫ λ λ0 h′ ( x ) dx = h ( λ ) − h ( λ0 ) . It follows that lim sup α ∣∣∣∣∣ ∫ λ λ0 f ′α ( x ) dx− ( h ( λ ) − h ( λ0 ) ) ∣∣∣∣∣ = limα ∣∣∣∣∣ ∫ λ λ0 f ′α ( x ) dx− ( h ( λ ) − h ( λ0 ) ) ∣∣∣∣∣ = 0 . ( 33 ) Since fα ( λ0 ) −log λ0 = 1 n log det ( λ0In + 1 n Z > ΛZ ) − 1 n log det ( λ0In ) = 1 n log det ( In + 1 nλ0 Z > ΛZ ) and the matrix 1nλ0Z > ΛZ is positive semidefinite , we have fα ( λ0 ) − log λ0 ≥ 0 . We have fα ( λ0 ) − log λ0 = 1 n log det ( In + 1 nλ0 Z > ΛZ ) ≤ 1 n log det ( In + λ+ nλ0 Z > Z ) ≤ log ( 1 + λ+ λ0 λmax ( Z > Z n ) ) ≤λ+ λ0 λmax ( Z > Z n ) . Then taking lim supα , we get lim sup α |fα ( λ0 ) − log λ0| = lim sup α ( fα ( λ0 ) − log λ0 ) ≤ λ+ λ0 lim sup α λmax ( Z > Z n ) . 1 λ0 , ( 34 ) where the last inequality is because lim supα λmax ( Z > Z n ) = ( 1 + √ γ ∨ 1γ ) 2 1 by Lemma 1 . Using Equation ( 32 ) , Equation ( 33 ) and Equation ( 34 ) gives lim sup α |fα ( λ ) − h ( λ ) | . 1 λ0 + |log λ0 − h ( λ0 ) | . Then taking limλ0→+∞ and recalling Equation ( 31 ) yields lim α |fα ( λ ) − h ( λ ) | = lim sup α |fα ( λ ) − h ( λ ) | = 0 . Therefore , we conclude limα fα ( λ ) = h ( λ ) . Lemma 10 . Define N = λnIn+Z > ΛZ = λnIn+ ∑ i∈ [ m ] λiZiZ > i . The following equation holds lim n , di→+∞ di/n→zi E [ ∂ ∂λi 1 n log det N n ] = ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) , ( 35 ) lim n , di→+∞ di/n→zi E [ ∂2 ∂λj∂λi 1 n log det N n ] = ∂2 ∂λj∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . ( 36 ) Proof . Proof of Equation ( 35 ) . We use α to denote the indices n , di and use limα to denote limn , di→+∞ di/n=zi . Define fα ( λi ) = E [ 1 n log det N n ] , f ′α ( λi ) = ∂ ∂λi E [ 1 n log det N n ] , and h ( λi ) = inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . We have∣∣∣∣ 1n log det Nn ∣∣∣∣ ≤ 1n log det ( λIn + λ+ Z > Z n ) = log λ+ 1 n log det ( In + λ+ nλ Z > Z ) . By Lemma 3 , there exists a universal constant C > 0 such that for all sufficiently large n , 1 n log det ( In + λ+ nλ Z > Z ) ≤ log ( 1 + C λ ) . Therefore , we get ∣∣∣∣ 1n log det Nn ∣∣∣∣ ≤ log ( λ+ C ) . By the dominated convergence theorem and Lemma 9 ( specifically , Equation ( 27 ) ) , we obtain lim α fα ( λi ) = h ( λi ) . ( 37 ) Because ∣∣∣∣ ∂∂λi 1n log det Nn ∣∣∣∣ = 1n tr ( Z > i N−1Zi ) ≤ 1λn2 tr ( Z > i Zi ) and E [ 1 λn2 tr ( Z > i Zi ) ] < +∞ , we can interchange the differentiation and the expectation and get f ′α ( λi ) = ∂ ∂λi E [ 1 n log det N n ] = E [ ∂ ∂λi 1 n log det N n ] . ( 38 ) Thus we deduce∣∣∣∣ ∂∂λiE [ 1 n log det N n ] ∣∣∣∣ = ∣∣∣∣E [ ∂∂λi 1n log det Nn ] ∣∣∣∣ ≤ E ∣∣∣∣ ∂∂λi 1n log det Nn ∣∣∣∣ ≤ E [ 1λn2 tr ( Z > i Zi ) ] . By Lemma 4 , E tr ( Z > i Zi ) n2 and therefore E [ 1 λn2 tr ( Z > i Zi ) ] . 1λ . The function sequence { f ′α } is uniformly bounded . Then we want to show that { f ′α } is uniformly equicontinuous by showing that { f ′′α } is uniformly bounded . Because∣∣∣∣ ∂2∂λ2i 1n log det Nn ∣∣∣∣ = 1n tr ( Z > i N−1Zi ) 2 ≤ 1nλ2 tr ( Z > i Zi n ) 2 and E [ 1 nλ2 tr ( Z > i Zi n ) 2 ] < +∞ , we can interchange the differentiation and the expectation and get ∂2 ∂λ2i E [ 1 n log det N n ] = ∂ ∂λi E [ ∂ ∂λi 1 n log det N n ] = E [ ∂2 ∂λ2i 1 n log det N n ] . Therefore , we deduce∣∣∣∣ ∂2∂λ2i E [ 1 n log det N n ] ∣∣∣∣ ≤ E ∣∣∣∣ ∂2∂λ2i 1n log det Nn ∣∣∣∣ ≤ 1nλ2E tr ( Z > i Zi n ) 2 . Again , by Lemma 4 , tr ( Z > i Zi n ) 2 n. It follows that 1nλ2E tr ( Z > i Zi n ) 2 . 1λ2 . Therefore { f ′ α } is uniformly equicontinuous . We want to show limα f ′α ( λi ) = h ′ ( λi ) by contradiction . If it is not true , there exists > 0 and a subsequence { f ′αk } such that ∣∣f ′αk ( λi ) − h′ ( λi ) ∣∣ ≥ . Let E = [ a , b ] 3 λi ( b > a > 0 ) be a closed interval that contains λi . The subsequence { f ′αk } is uniformly bounded and uniformly equicontinuous . By the Arzela-Ascoli theorem , there exists a subsequence { f ′αkj } that converges uniformly on λi ∈ E. Recall limα fα ( λi ) = h ( λi ) ( Equation ( 37 ) ) . Thus limj fαkj ( λi ) = h ( λi ) . By ( Rudin , 1976 , Theorem 7.17 ) , for λi ∈ E , we have lim j f ′αkj ( λi ) = h ′ ( λi ) . This is a contradiction . Hence , we have shown that limα f ′α ( λi ) = h ′ ( λi ) , which is exactly Equation ( 35 ) ( recall f ′α ( λi ) = ∂ ∂λi E [ 1 n log det N n ] = E [ ∂ ∂λi 1 n log det N n ] in Equation ( 38 ) ) . Proof of Equation ( 36 ) . Define gα ( λj ) = ∂∂λiE [ 1 n log det N n ] = E [ ∂ ∂λi 1 n log det N n ] . Then g′α ( λj ) = ∂2 ∂λj∂λi E [ 1 n log det N n ] = ∂∂λjE [ ∂ ∂λi 1 n log det N n ] . We have ∣∣∣∣ ∂2∂λj∂λi 1n log det Nn ∣∣∣∣ = 1 n tr ( ZiZ > i N −1ZjZ > j N −1 ) = 1 n tr ( Z > i N −1ZjZ > j N −1Zi ) = 1 n ∥∥Z > j N−1Zi∥∥2F ≤ 1 n ‖Zj‖22 ‖Zi‖ 2 2 ∥∥N−1∥∥2 F ≤ 1 λ2n2 ‖Zj‖22 ‖Zi‖ 2 2 . where the last inequality is because ∥∥N−1∥∥2 F ≤ ∥∥ 1 λnIn ∥∥2 F = 1λ2n . If i 6= j , by Lemma 4 , we have 1 λ2n2 E ‖Zj‖22 ‖Zi‖ 2 2 = 1 λ2n2 E ‖Zj‖22 · E ‖Zi‖ 2 2 . 1 λ2 . If i = j , by Lemma 4 , we have 1 λ2n2 E ‖Zi‖42 . 1 λ2n2 · n2 = 1 λ2 . As a result , we get ∣∣∣∣ ∂2∂λj∂λi 1n log det Nn ∣∣∣∣ . 1n · n2 · 1λ2n = 1λ2 . Thus we can interexchange ∂∂λj and expectation , and get g ′ α ( λj ) = E [ ∂2 ∂λj∂λi 1 n log det N n ] . Be- cause |g′α ( λj ) | ≤ E ∣∣∣ ∂2∂λj∂λi 1n log det Nn ∣∣∣ . 1λ2 , the function sequence { g′α } is uniformly bounded for λj . Define L = Z > j N −1Zi and W = Z > j N −1Zj . We have∣∣∣∣∣ ∂3∂λ2j∂λi 1n log det Nn ∣∣∣∣∣ = 2 n tr ( L > WL ) . 1 λn2 tr ( L > Z > j ZjL ) = 1 λn2 tr ( Z > i N −1 ( ZjZ > j ) 2N−1Zi ) . = 1 λn2 ∥∥ZjZ > j N−1Zi∥∥2F ≤ 1 λn2 ∥∥N−1∥∥2 F ∥∥ZjZ > j ∥∥22 ‖Zi‖22 ≤ 1 λ3n3 ∥∥ZjZ > j ∥∥22 ‖Zi‖22 = 1 λ3n3 ‖Zj‖42 ‖Zi‖ 2 2 , where the first inequality is becauseW 4 1λnZ > j Zj and the third inequality is becauseN −1 4 1λnIn and then ∥∥N−1∥∥2 F ≤ ∥∥ 1 λnIn ∥∥2 F ≤ 1λ2n . By Lemma 4 , we have E ‖Zj‖ 4 2 . n 2 and E ‖Zi‖22 . n. If i 6= j , then Zj and Zi are independent , and we deduce 1 λ3n3 E ‖Zj‖42 ‖Zi‖ 2 2 . 1 λ3 . If i = j , we have 1 λ3n3 E ‖Zi‖42 ‖Zi‖ 2 2 = 1 λ3n3 E ‖Zi‖62 . 1 λ3 . As a result , we deduce E [ ∂3 ∂λ2j∂λi 1 n log det N n ] = ∂∂λjE [ ∂2 ∂λj∂λi 1 n log det N n ] = g′′α ( λj ) . Moreover , we have |g′′α ( λj ) | ≤ E ∣∣∣∣∣ ∂3∂λ2j∂λi 1n log det Nn ∣∣∣∣∣ . 1λ3 . Therefore { g′α } is uniformly equicontinuous . Define w ( λj ) = ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . We want to show by contradiction that limα g′α ( λj ) = w ′ ( λj ) . Assume that it is not true . Then there exists > 0 and a subsequence { g′αk } such that ∣∣g′αk ( λj ) − w′ ( λj ) ∣∣ > . Since { g′αk } is uniformly bounded and uniformly equicontinuous , by the Arzela-Ascoli theorem , there is a subsequence { g′αkr } that converges uniformly on a closed intervalE containing λj . Equation ( 35 ) shows that limα gα ( λj ) = w ( λj ) . It follows that limr gαkr ( λj ) = w ( λj ) . By ( Rudin , 1976 , Theorem 7.17 ) , for λi ∈ E , we have lim r g′αkr ( λj ) = w ′ ( λj ) , which is a contradiction . Therefore , we have shown that limα g′α ( λj ) = w ′ ( λj ) , which is exactly Equation ( 36 ) . D PROOF OF THEOREM 1 D.1 PROOF OF ITEM 1 Define g ( ρ ) = log ( λ+ ∑m j=1 λjρj ) + ∑m j=1 ( ρj − zj ( log ρjzj + 1 ) ) . The function g ( ρ ) is continuously differentiable on Rm+ . The boundary of R+m is ∂Rm+ = { ρ ∈ Rm | ( ∀i ∈ [ m ] , ρi ≥ 0 ) ∧ ( ∃i ∈ [ m ] , ρi = 0 ) } . Because limRm+3ρ→ρ0∈∂Rm+ g ( ρ ) = limRm+3ρ→∞ g ( ρ ) = +∞ , there exists a minimizer ρ ∗ ∈ Rm+ of g ( ρ ) . Taking the derivative with respect to ρi gives ∂ ∂ρi log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = λi λ+ ∑m j=1 λjρj + 1− zi ρi . Setting it to zero gives Equation ( 6 ) . D.2 PROOF OF ITEM 2 Recall Equation ( 6 ) λi λ+ ∑m j=1 λjρ ∗ j + 1− zi ρ∗i = 0 , ∀i ∈ [ m ] . Rewriting the above equation gives ( zi − ρ∗i ) ( λ+ m∑ k=1 λkρ ∗ k ) = λiρ ∗ i , ∀i ∈ [ m ] . Rewriting it in the linear algebraic form yields ( z− ρ∗ ) ( λ+ λ > ρ∗ ) = λ ρ∗ . Applying ∂∂λ to both sides and using the implicit function theorem , we get ( z− ρ∗ ) ( ρ∗ > + λ > J ) − J ( λ+ λ > ρ∗ ) = diag ( λ ) J + diag ( ρ∗ ) . Arranging the above equation yields ( diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > ) J = ( z− ρ∗ ) ρ∗ > − diag ( ρ∗ ) . Define a = λ + λ > ρ∗ , A = diag ( λ ) + ( λ+ λ > ρ∗ ) Im = diag ( λ ) + aIm and B = diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > = A− ( z− ρ∗ ) λ > . The matrix determinant lemma gives det ( B ) = ( 1− λ > A−1 ( z− ρ∗ ) ) det ( A ) . Recall Equation ( 6 ) again and we have λi + a = zia ρ∗i . We have a− ∑ i∈ [ m ] λiρ ∗ i ( 1− ρ∗i /zi ) = λ+ ∑ i∈ [ m ] λiρ ∗ i − ∑ i∈ [ m ] λiρ ∗ i ( 1− ρ∗i /zi ) =λ+ ∑ i∈ [ m ] λi ( ρ∗i ) 2 zi > 0 . It follows that ∑ i∈ [ m ] λiρ ∗ i ( 1− ρ∗i /zi ) a < 1 . Then we compute λ > A−1 ( z− ρ∗ ) : λ > A−1 ( z− ρ∗ ) = ∑ i∈ [ m ] λi ( zi − ρ∗i ) λi + a = ∑ i∈ [ m ] λi ( zi − ρ∗i ) zia ρ∗i = ∑ i∈ [ m ] λiρ ∗ i ( 1− ρ∗i /zi ) a < 1 . Thus we get 1− λ > A−1 ( z− ρ∗ ) > 0 . Therefore , detB 6= 0 and the matrix B is invertible . D.3 PROOF OF ITEM 3 Lemma 11 . Define N = λnIn + Z > ΛZ , γ = ∑ i∈ [ m ] zi , r = ( r1 , . . . , rm ) , λ = ( λ1 , . . . , λm ) , and ϑ ( rt , r , λ ) = 2rt √ 1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t . For any Kt ≥ 2λ and Ku ≥ 2λ+ ( 2+ √ γ ) λ , we have lim n , di→+∞ di/n→zi trN−1 = lim n , di→+∞ di/n→zi E trN−1 = max 0≤rt≤Kt min 0≤ri≤Ku ϑ ( rt , r , λ ) = min 0≤ri≤Ku max 0≤rt≤Kt ϑ ( rt , r , λ ) = max rt≥0 min ri≥0 ϑ ( rt , r , λ ) = min ri≥0 max rt≥0 ϑ ( rt , r , λ ) . ( 39 ) If r∗ is a solution to the optimization problem in Equation ( 39 ) , then 1 + m∑ j=1 r∗2j = m∑ j=1 r∗j √ zj + λr ∗ t 2 , ( 40 ) r∗t r∗i√ 1 + ∑m j=1 r ∗2 j = r∗t √ zi − r∗i λi . ( 41 ) Moreover , we have ∂ ∂λi max rt≥0 min ri≥0 ϑ ( rt , r , λ ) = − r∗2i λ2i . Proof . Let g ∼ N ( 0 , In ) be a multivariate standard normal random vector . We have trN−1 =Egg > N−1g =Eg sup t∈Rn ( 2g > t− t > Nt ) =Eg sup t∈Rn ( 2g > t− t > Z > ΛZt− nλ ‖t‖22 ) =Eg sup t∈Rn inf u∈Rd ( 2g > t− 2u > ΛZt+ u > Λu− nλ ‖t‖22 ) =− 2Eg inf t∈Rn sup u∈Rd ( u > ΛZt− g > t− 1 2 u > Λu+ 1 2 nλ ‖t‖22 ) =− 2Eg inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) We view inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) ( 42 ) as the primal optimization ( PO ) problem in the convex Gaussian min-max theorem ( CGMT ) ( Thrampoulidis et al. , 2015 ) . The KKT conditions for Equation ( 42 ) give Z > u− g + nλt = 0 , Zt− Λ−1u = 0 . Solving the above equations gives t = N−1g , u = ΛZN−1g . With probability at least 1− 4 exp ( −cn ) ( c > 0 is a universal constant ) , we have ‖g‖2 ≤ 2 √ n and ‖Z‖ ≤ √ d+ 2 √ n ≤ ( 2 + √ γ ) √ n. Therefore , we get ‖t‖2 ≤ ∥∥N−1∥∥ ‖g‖2 ≤ 1λn · 2√n = 2λ√n , ‖u‖2 ≤ λ+ ‖Z‖ ‖t‖2 ≤ λ+ ( 2 + √ γ ) √ n · 2 λ √ n = 2λ+ ( 2 + √ γ ) λ . Write u = u1 ... um , where ui ∈ Rdi . For all Kt ≥ 2λ , Ku ≥ 2λ+ ( 2+√γ ) λ , the optimal solutions t∗ and u∗ to Equation ( 42 ) satisfy √ n ‖t∗‖2 ≤ Kt and ‖ui‖2 ≤ Ku for all i ∈ [ m ] with probability at least 1 − 4 exp ( −cn ) . Define St = { t ∈ Rn | √ n ‖t‖2 ≤ Kt } and Su = { u ∈ Rd | ‖ui‖ ≤ Ku , ∀i ∈ [ m ] } . We use α to denote the indices n , di and use limα to denote limn , di→+∞ di/n=zi . Define event Eα = { inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) = inf t∈St sup u∈Su ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) } . Then with probability at least 1 − 4 exp ( −cn ) , we have t∗ ∈ St and u∗ ∈ Su . Therefore the event Eα occurs with probability at least 1− 4 exp ( −cn ) , which yields P { Ecα } ≤ 4 exp ( −cn ) . Since ∑ n≥1 4 exp ( −cn ) < +∞ , by Borel-Cantelli lemma , we have P { lim sup α Ecα } = P { ( lim inf α Eα ) c } = 0 . Then with probability 1 , all but finitely many Eα occur . Then almost surely there exists n0 such that for all n > n0 , Eα occurs . The auxiliary optimization ( AO ) problem is inf t∈St sup u∈Su ( ‖t‖2 g > 1 u+ ‖u‖2 g > 2 t− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) = inf 0≤rt≤Kt sup 0≤ri≤Ku − ∥∥∥g −√∑i∈ [ m ] r2i g2∥∥∥ 2√ n rt + rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t = inf 0≤rt≤Kt sup 0≤ri≤Ku −√1 + ∑ i∈ [ m ] r2i ‖g3‖2√ n rt + rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t , where g1 ∼ N ( 0 , Id ) , g2 ∼ N ( 0 , In ) , and g3 ∼ N ( 0 , In ) . Taking n , di → +∞ with di/n→ zi constant , the strong law of large numbers gives√ 1 + ∑ i∈ [ m ] r2i ‖g3‖2√ n a.s.→ √ 1 + ∑ i∈ [ m ] r2i , ‖g1 , j‖2√ n = √ dj n ‖g1 , j‖2√ dj a.s.→ √zj . Define Xα ( rt , r ) = − √ 1 + ∑ i∈ [ m ] r2i ‖g3‖2√ n rt + rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t . It is a stochastic process on ( rt , r ) ∈ [ 0 , Kt ] × [ 0 , Ku ] m. We have lim α Xα ( rt , r ) = X ( rt , r ) : = −rt √ 1 + ∑ i∈ [ m ] r2i + rt ∑ i∈ [ m ] √ ziri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t almost surely . Since √ 1 + x2 is convex and increasing and the function ‖r‖2 is convex , thus √ 1 + ‖r‖22 is convex in r and then − √ 1 + ∑ i∈ [ m ] r 2 i ‖g3‖2√ n rt = − √ 1 + ‖r‖22 ‖g3‖2√ n rt is concave in r. Because − 12 ∑ i∈ [ m ] 1 λi r2i is concave in r and rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri is linear in r , we deduce that Xα ( rt , r ) is concave in r. By ( Liese & Miescke , 2008 , Lemma 7.75 ) , supr∈ [ 0 , Ku ] m |Xα ( rt , r ) −X ( rt , r ) | → 0 almost surely . Then for ∀ > 0 , there exists n0 ( ) , d0 , i ( ) , δ0 , i ( ) such that for all n > n0 ( ) , di > d0 , i ( ) , |di/n− zi| < δ0 , i ( ) and for all r ∈ [ 0 , Ku ] m , we have X ( rt , r ) − < Xα ( rt , r ) < X ( rt , r ) + . Thus we obtain X ( rt , r ) − < Xα ( rt , r ) ≤ sup r∈ [ 0 , Ku ] m Xα ( rt , r ) Xα ( rt , r ) < X ( rt , r ) + ≤ sup r∈ [ 0 , Ku ] m X ( rt , r ) + , which in turn implies sup r∈ [ 0 , Ku ] m X ( rt , r ) − ≤ sup r∈ [ 0 , Ku ] m Xα ( rt , r ) sup r∈ [ 0 , Ku ] m Xα ( rt , r ) ≤ sup r∈ [ 0 , Ku ] m X ( rt , r ) + . It follows that ∣∣∣supr∈ [ 0 , Ku ] m Xα ( rt , r ) − supr∈ [ 0 , Ku ] m X ( rt , r ) ∣∣∣ ≤ . In other words , we showed |Yα ( rt ) − Y ( rt ) | → 0 almost surely , where Y ( rt ) : = supr∈ [ 0 , Ku ] m Xα ( rt , r ) and Y ( rt ) : = supr∈ [ 0 , Ku ] m X ( rt , r ) . Because Xα ( rt , r ) is convex in rt , then Y ( rt ) = supr∈ [ 0 , Ku ] m Xα ( rt , r ) is convex in rt . By ( Liese & Miescke , 2008 , Lemma 7.75 ) again , suprt∈ [ 0 , Kt ] |Yα ( rt ) − Y ( rt ) | → 0 almost surely . A similar argument shows that∣∣∣∣ infrt∈ [ 0 , Kt ] Yα ( rt ) − infrt∈ [ 0 , Kt ] Y ( rt ) ∣∣∣∣ = ∣∣∣∣∣ infrt∈ [ 0 , Kt ] supr∈ [ 0 , Ku ] mXα ( rt , r ) − infrt∈ [ 0 , Kt ] supr∈ [ 0 , Ku ] mX ( rt , r ) ∣∣∣∣∣→ 0 almost surely . Therefore , we obtain inf t∈St sup u∈Su ( ‖t‖2 g > 1 u+ ‖u‖2 g > 2 t− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) = inf 0≤rt≤Kt sup 0≤ri≤Ku −√1 + ∑ i∈ [ m ] r2i ‖g3‖2√ n rt + rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t a.s.→ inf 0≤rt≤Kt sup 0≤ri≤Ku −rt√1 + ∑ i∈ [ m ] r2i + rt ∑ i∈ [ m ] √ ziri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t ( 43 ) = : µ . Define event Aα = { ∣∣∣∣ inft∈Rn supu∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) − µ ∣∣∣∣ > τ } , Bα = { ∣∣∣∣ inft∈St supu∈Su ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) − µ ∣∣∣∣ > τ } , Cα = { ∣∣∣∣ inft∈St supu∈Su ( ‖t‖2 g > 1 u+ ‖u‖2 g > 2 t− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) − µ ∣∣∣∣ > τ } . Recall Eα = { inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) = inf t∈St sup u∈Su ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) } . We have Aα ∩ Eα ⊆ Bα . Equation ( 43 ) gives limα P { Cα } = 0 for any τ > 0 because almost sure convergence implies convergence in probability . By the convex Gaussian min-max theorem ( Thrampoulidis et al. , 2015 ) , we have P { Bα } ≤ 2P { Cα } . It follows that P { Aα } ≤ P { Aα ∩ Eα } + P { Ecα } ≤ P { Bα } + P { Ecα } ≤ 2P { Cα } + P { Ecα } . Taking lim supα on both sides , because lim supα P { Bα } ≤ 2 lim supα P { Cα } = 0 , we get lim sup α P { Aα } ≤ lim sup α P { Ecα } ≤ P { lim sup α Ecα } = 0 , where the second inequality is because of the reverse Fatou ’ s lemma . Thus inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) P→ µ . Therefore , we deduce g > N−1g P→ −2 inf 0≤rt≤Kt sup 0≤ri≤Ku −rt√1 + ∑ i∈ [ m ] r2i + rt ∑ i∈ [ m ] √ ziri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t = sup 0≤rt≤Kt inf 0≤ri≤Ku 2rt√1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t = sup 0≤rt≤Kt inf 0≤ri≤Ku ϑ ( rt , r , λ ) . ( 44 ) Because ∣∣g > N−1g∣∣ ≤ 1λn ‖g‖22 and E 1λn ‖g‖22 = 1λ < ∞ , by the dominated convergence theorem for convergence in probability ( Cohn , 2013 , Proposition 3.1.6 ) , we get lim α trN−1 = lim α Eg [ g > N−1g ] = max 0≤rt≤Kt min 0≤ri≤Ku ϑ ( rt , r , λ ) . ( 45 ) Note that 2rt √ 1 + ∑ i∈ [ m ] r 2 i is convex in r , −2rt ∑ i∈ [ m ] √ ziri is linear in r , and ∑ i∈ [ m ] 1 λi r2i is strongly convex in r. Thus ϑ is strongly convex in r. Note that 2rt √ 1 + ∑ i∈ [ m ] r 2 i − 2rt ∑ i∈ [ m ] √ ziri is linear in rt and that −λr2t is strongly concave in rt . Thus ϑ is strongly concave in rt . Then ϑ has a unique saddle point ( r∗t , r ∗ ) on [ 0 , Kt ] × [ 0 , Ku ] m that satisfies max rt∈ [ 0 , Kt ] min r∈ [ 0 , Ku ] m ϑ ( rt , r ) = min r∈ [ 0 , Ku ] m max rt∈ [ 0 , Kt ] ϑ ( rt , r ) = ϑ ( r ∗ t , r ∗ ) , ( 46 ) where the first equality is due to Sion ’ s minimax theorem . Since ∣∣trN−1∣∣ ≤ 1λ , using the dominated convergence theorem and combining Equation ( 45 ) and Equation ( 46 ) yields lim α E trN−1 = max 0≤rt≤Kt min 0≤ri≤Ku ϑ ( rt , r , λ ) = min 0≤ri≤Ku max 0≤rt≤Kt ϑ ( rt , r , λ ) . By the uniqueness of the limit , the right-hand side max0≤rt≤Kt min0≤ri≤Ku ϑ ( rt , r , λ ) and min0≤ri≤Ku max0≤rt≤Kt ϑ ( rt , r , λ ) do not depend on Kt and Ku as long as Kt ≥ 2λandKu ≥ 2λ+ ( 2+ √ γ ) λ . Thus we have lim α E trN−1 = max rt≥0 min ri≥0 ϑ ( rt , r , λ ) = min ri≥0 max rt≥0 ϑ ( rt , r , λ ) . If r∗t = 0 , then ϑ ( 0 , r ∗ ) = minr∈ [ 0 , Ku ] m ∑ i∈ [ m ] 1 λi r2i = 0 . Thus r ∗ must be zero . However , ϑ ( 1 2λ ,0 ) = 34λ > ϑ ( 0 , r ∗ ) . Therefore r∗t > 0 . We compute the partial derivative ∂ϑ ∂ri = 2rt ri√ 1 + ∑ i∈ [ m ] r 2 i − 2rt √ zi + 2 ri λi . If r∗i = 0 , we have ∂ϑ ∂ri ∣∣∣ ri=0 , rt=r∗t = −2r∗t √ zi < 0 . Therefore , one can increase r∗i and make maxrt∈ [ 0 , Kt ] minr∈ [ 0 , Ku ] m ϑ ( rt , r ) smaller , which results in a contradiction . Thus r∗i > 0 . Thus the minimax value is attained when rt , ri > 0 for all i ∈ [ m ] . To obtain the optimality condition , we compute the partial derivatives ∂ϑ ∂rt = 2 √ 1 + ∑ i∈ [ m ] r2i − 2 ∑ i∈ [ m ] ri √ zi − 2λrt , ∂ϑ ∂ri = 2rt ri√ 1 + ∑ i∈ [ m ] r 2 i − 2rt √ zi + 2 ri λi . Setting them to zero gives the optimality condition for r∗t , r ∗ 1 , . . . , r ∗ m and yields Equation ( 40 ) and Equation ( 41 ) . Using the envelope theorem , we get ∂ ∂λi max rt∈ [ 0 , Kt ] min r∈ [ 0 , Ku ] m ϑ ( rt , r , λ ) = ∂ϑ ( r∗t , r ∗ , λ1 , . . . , λm ) ∂λi =− r ∗2 i λ2i . Lemma 12 . Define N = λnIn + Z > ΛZ . The following equation holds lim n , di→+∞ di/n→zi E [ ∂ ∂λi tr ( N−1 ) ] = ∂2 ∂λi∂λ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = −r∗2i λ2i , where r∗ is a solution to suprt > 0 infr1 , ... , rm > 0 ϑ ( rt , r1 , . . . , rm , λ1 , . . . , λm ) and ϑ ( rt , r1 , . . . , rm , λ1 , . . . , λm ) = 2rt √ 1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t . Proof . Since ∣∣∣∣ ∂∂λi tr ( N−1 ) ∣∣∣∣ = tr ( Z > i N−2Zi ) ≤ 1 ( λn ) 2 tr ( Z > i Zi ) ( 47 ) and E 1 ( λn ) 2 tr ( Z > i Zi ) 1λ2 ( by Lemma 4 ) , using the dominated convergence theorem gives E [ ∂ ∂λi tr ( N−1 ) ] = ∂ ∂λi E tr ( N−1 ) . We use α to denote the indices n , di and use limα to denote limn , di→+∞ di/n=zi . Define fα ( λi ) = E tr ( N−1 ) , g ( λi ) = ∂∂λ infρ∈Rm+ [ log ( λ+ ∑ i∈ [ m ] λiρi ) + ∑ i∈ [ m ] ( ρi − zi ( log ρizi + 1 ) ) ] , and h ( λi ) = suprt > 0 infr1 , ... , rm > 0 ϑ ( rt , r1 , . . . , rm , λ1 , . . . , λm ) . Because ∣∣tr ( N−1 ) ∣∣ ≤ tr ( 1 λnIn ) ≤ 1λ and limα tr ( N−1 ) = g ( λi ) ( by Lemma 9 ) , we have Lemma 9 limα fα ( λi ) = limα E tr ( N−1 ) = g ( λi ) . Lemma 11 shows limα fα ( λi ) = h ( λi ) . Therefore limα fα ( λi ) = g ( λi ) = h ( λi ) . Because of Equation ( 47 ) , we have f ′α ( λi ) = ∂ ∂λi E tr ( N−1 ) and |f ′α ( λi ) | = ∣∣∣∣ ∂∂λiE tr ( N−1 ) ∣∣∣∣ = ∣∣∣∣E [ ∂∂λi tr ( N−1 ) ] ∣∣∣∣ ≤ E ∣∣∣∣ ∂∂λi tr ( N−1 ) ∣∣∣∣ . 1λ2 and therefore { f ′α } is uniformly bounded for λi . Because∣∣∣∣ ∂2∂λ2i tr ( N−1 ) ∣∣∣∣ =2 tr ( N−1ZiZ > i N −1ZiZ > i N −1 ) . 1 λn tr ( N−1 ( ZiZ > i ) 2 N−1 ) = 1 λn tr ( ZiZ > i N −2ZiZ > i ) ≤ 1 ( λn ) 3 tr ( ZiZ > i ) 2 , and E 1 ( λn ) 3 tr ( ZiZ > i ) 2 1λ3 ( by Lemma 4 ) , using the dominated convergence theorem yields E [ ∂2 ∂λ2i tr ( N−1 ) ] = ∂ ∂λi E [ ∂ ∂λi tr ( N−1 ) ] = ∂2 ∂λ2i E [ tr ( N−1 ) ] = f ′′α ( λi ) . Moreover , we have |f ′′α ( λi ) | ≤ E ∣∣∣∣ ∂2∂λ2i tr ( N−1 ) ∣∣∣∣ . 1λ3 . Thus { f ′α } is uniformly equicontinuous for λi . We want to show that limα f ′α ( λi ) = g′ ( λi ) by contradiction . Assume that it is not true . Then there exists > 0 and a subsequence { f ′αk } such that ∣∣f ′αk ( λi ) − g′ ( λi ) ∣∣ > . Since { f ′αk } is uniformly bounded and uniformly equicontinuous for λi ∈ E ( E is any closed finite interval containing λi ) , by the Arzela-Ascoli theorem , there exists a subsequence { f ′αkr } that converges uniformly on E. Since limα fαkr ( λi ) = g ( λi ) , by ( Rudin , 1976 , Thoerem 7.17 ) , we have lim r f ′αkr ( λi ) = g ′ ( λi ) , which yields a contradiction . Therefore , we have limα f ′α ( λi ) = g ′ ( λi ) . Recall g ( λi ) = h ( λi ) for any λi > 0 . Then by the final part of Lemma 11 , we have limα f ′α ( λi ) = g ′ ( λi ) = h ′ ( λi ) = − r ∗2 i λ2i . D.4 BIAS Lemma 13 . Suppose that U ∼ ⊕ i∈ [ m ] Unif ( O ( di ) ) and V are two independent d × d random matrices such that V d= UV U > , where d = ∑m i=1 di . Let θ ∈ Rd be a fixed vector . Write θ = θ1 ... θm , where θi ∈ Rdi . Let φ ∼ ⊕ i∈ [ m ] Unif ( Sdi−1 ( ‖θi‖2 ) ) be a random vector independent of V and let Λ = diag ( λ1Id1 , . . . , λmIdm ) ∈ Rd×d . Then we have E [ ∥∥∥Λ1/2V θ∥∥∥2 2 ] = E [ ∥∥∥Λ1/2V φ∥∥∥2 2 ] . Proof . Recall UΛU > = Λ and noticing U > θ d= φ , we get E [ ∥∥∥Λ1/2V θ∥∥∥2 2 ] =E [ ∥∥∥Λ1/2UV U > θ∥∥∥2 2 ] =E [ θ > UV > U > ΛUV U > θ ] =E [ θ > UV > ΛV U > θ ] =E [ ∥∥∥Λ1/2V U > θ∥∥∥2 2 ] =E [ ∥∥∥Λ1/2V φ∥∥∥2 2 ] . Lemma 14 . Define Θ̃ = diag ( ‖θ′1‖22/d1Id1 , . . . , ‖θ′m‖22/dmIdm ) and S = Λ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2 . Then we have Bλ , d , n = ‖θ∗‖2Σ − 2E tr ( ΛSΘ̃ ) + E tr ( SΛSΘ̃ ) . Proof . Recall Equation ( 22 ) in Lemma 5 Bλ , d , n = E [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] . Let U ∼ ⊕ i∈ [ m ] Unif ( O ( di ) ) be a random matrix independent of Z . Because UZ d = Z , we have Id + 1 nλ Λ1/2ZZ > Λ1/2 d = Id + 1 nλ Λ1/2UZZ > U > Λ1/2 = U ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) U > . Define θ̃ ∼ ⊕ i∈ [ m ] Unif ( Sdi−1 ( ‖θ′i‖2 ) ) . Lemma 13 gives Bλ , d , n =E [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ̃‖22 ] =E [ ‖Λ1/2 ( Id − S ) θ̃‖22 ] =E [ ‖ ( Id − S ) θ̃‖2Λ ] =E ∥∥∥θ̃∥∥∥2 Λ − E [ θ̃ > ΛSθ̃ ] − E [ θ̃ > SΛθ̃ ] + E [ θ̃ > SΛSθ̃ ] . Notice that ∥∥∥θ̃∥∥∥2 Λ = ‖θ′‖2Λ and Θ̃ = E [ θ̃θ̃ > ] . Because Θ̃ commutes with Λ , we have tr ( SΛΘ̃ ) = tr ( SΘ̃Λ ) = tr ( ΛSΘ̃ ) . In light of these , we deduce Bλ , d , n = ‖θ′‖ 2 Λ − E tr ( ΛSΘ̃ ) − E tr ( SΛΘ̃ ) + E tr ( SΛSΘ̃ ) = ‖θ′‖2Λ − 2E tr ( ΛSΘ̃ ) + E tr ( SΛSΘ̃ ) . Lemma 14 expresses the bias Bλ , d , n as the sum of three terms . Computing ‖θ′‖2Λ Note that ‖θ′‖ 2 Λ = θ ′ > Λθ′ = ∑ i∈ [ m ] λi ‖θ′i‖ 2 2 . Therefore , lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi ‖θ′‖2Λ = q > ( λ z ) . Computing E tr ( ΛSΘ̃ ) Define N = λnIn + Z > ΛZ = λnIn + ∑ i∈ [ m ] λiZiZ > i . We have E tr ( ΛSΘ̃ ) =E tr ( Z > Λ1/2Θ̃Λ3/2Z ( nλIn + Z > ΛZ ) −1 ) =E tr ( Z > Λ2Θ̃ZN−1 ) = ∑ i∈ [ m ] λ2i ‖θ′i‖22 di E tr ( ZiZ > i N −1 ) = ∑ i∈ [ m ] λ2i ‖θ′i‖22 n di E [ ∂ ∂λi 1 n log det N n ] = ∑ i∈ [ m ] λ2i ‖θ′i‖22 n di ∂ ∂λi E [ 1 n log det N n ] , where the second inequality is because Θ̃ commutes with Λ3/2 and the final equality is because of Equation ( 38 ) . Taking lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi and using Lemma 10 gives lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi E tr ( ΛSΘ̃ ) = ∑ i∈ [ m ] λ2i η 2 i zi ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . Using the envelope theorem yields ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) = ρ∗i λ+ ∑ i∈ [ m ] λiρ ∗ i = zi − ρ∗i λi , where the final equality is because of Equation ( 6 ) in Item 1 . Therefore , we deduce lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi E tr ( ΛSΘ̃ ) = ∑ i∈ [ m ] λ2i η 2 i zi zi − ρ∗i λi = ∑ i∈ [ m ] λiη 2 i ( 1− ρ ∗ i zi ) = q > ( λ ( z− ρ∗ ) ) . Computing E tr ( SΛSΘ̃ ) We have E tr ( SΛSΘ̃ ) =E tr [ Λ1/2ZN−1Z > Λ2ZN−1Z > Λ1/2Θ̃ ] =E tr [ Z > Λ1/2Θ̃Λ1/2ZN−1Z > Λ2ZN−1 ] =E tr [ Z > ΛΘ̃ZN−1Z > Λ2ZN−1 ] = ∑ i∈ [ m ] λi‖θ′i‖22 di ∑ j∈ [ m ] λ2jE tr [ ZiZ > i N −1ZjZ > j N −1 ] =− ∑ i∈ [ m ] λi‖θ′i‖22n di ∑ j∈ [ m ] λ2jE [ ∂2 ∂λj∂λi 1 n log det N n ] , where the third equality is because Θ̃ commutes with Λ1/2 . Taking lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi and using Lemma 10 gives lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi E tr ( SΛSΘ̃ ) = − ∑ i∈ [ m ] λiη 2 i zi ∑ j∈ [ m ] λ2j ∂2 ∂λj∂λi inf ρ∈Rm+ log λ+ ∑ l∈ [ m ] λlρl + ∑ l∈ [ m ] ( ρl − zl ( log ρl zl + 1 ) ) . Write λ = ( λ1 , . . . , λm ) > and z = ( z1 , . . . , zm ) > . Let ρ∗ ∈ Rm be a minimizer of Equation ( 5 ) and J = ∂ρ ∗ ∂λ ∈ R m×m be the Jacobian matrix Jij = ∂ρ∗i ∂λj . Recall Item 2 ( diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > ) J = ( z− ρ∗ ) ρ∗ > − diag ( ρ∗ ) . Using the envelope theorem , we have ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ l∈ [ m ] λlρl + ∑ l∈ [ m ] ( ρl − zl ( log ρl zl + 1 ) ) = ρ∗i λ+ ∑ l∈ [ m ] λlρ ∗ l = ρ∗i λ+ λ > ρ∗ . Recall Equation ( 6 ) yields ρ∗i λ+ λ > ρ∗ = zi − ρ∗i λi . Differentiating the above equation with respect to λj gives ∂2 ∂λj∂λi inf ρ∈Rm+ log λ+ ∑ l∈ [ m ] λlρl + ∑ l∈ [ m ] ( ρl − zl ( log ρl zl + 1 ) ) = ∂ ∂λj zi − ρ∗i λi = −λiJij − ( zi − ρ∗i ) δij λ2i . It follows that lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi E tr ( SΛSΘ̃ ) = ∑ i∈ [ m ] λiη 2 i zi ∑ j∈ [ m ] λ2j λiJij + ( zi − ρ∗i ) δij λ2i = ∑ i , j∈ [ m ] qiλ 2 j ( Jij + ( zi − ρ∗i ) δij λi ) =q > ( λ ( z− ρ∗ ) + Jλ 2 ) Putting all three terms together , we have lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi Bλ , d , n = q > ( λ z ) −2q > ( λ ( z− ρ∗ ) ) +q > ( λ ( z− ρ∗ ) + Jλ 2 ) = q > ( λ ρ∗ + Jλ 2 ) . Since { Bλ , d , n } is uniformly bounded and uniformly equicontinuous for λ ∈ ( 0 , 1 ] by Lemma 5 , { Bλ , d , n } can be extended continuously to [ 0 , 1 ] and the family of extended functions is still uniformly bounded and uniformly equicontinuous for λ ∈ [ 0 , 1 ] . By the Arzela-Ascoli theorem , { Bλ , d , n } converges uniformly to the limit . By the Moore-Osgood theorem , we can exchange the two limits lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi and limλ→0+ and get lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi B0 , d , n = lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi lim λ→0+ Bλ , d , n = lim λ→0+ lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi Bλ , d , n = q > ( λ ρ∗ + Jλ 2 ) |λ=0 . D.5 VARIANCE Define N = nλIn + Z > ΛZ . Recalling Lemma 6 gives Vλ , d , n =σ2E‖ΛZN−1‖22 =σ2 m∑ i=1 λ2iE tr ( ZiZ > i N −2 ) =− σ2 m∑ i=1 λ2iE [ ∂ ∂λi tr ( N−1 ) ] . Using Lemma 12 , we get lim n , di→∞ di/n→zi Vλ , d , n =− σ2 m∑ i=1 λ2i lim n , di→∞ di/n→zi E [ ∂ ∂λi tr ( N−1 ) ] =− σ2 m∑ i=1 λ2i lim n , di→∞ di/n→zi E [ ∂ ∂λi tr ( N−1 ) ] =− σ2 m∑ i=1 λ2i ∂2 ∂λi∂λ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) . Using the envelope theorem , we deduce ∂ ∂λ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = 1 λ+ ∑m j=1 λjρ ∗ j . Then we take ∂∂λi and obtain ∂2 ∂λi∂λ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = ∂ ∂λi 1 λ+ ∑m j=1 λjρ ∗ j =− ρ∗i + ∑ j∈ [ m ] λjJji ( λ+ ∑ j∈ [ m ] λjρ ∗ j ) 2 . As a result , lim n , di→∞ di/n→zi Vλ , d , n = σ 2 m∑ i=1 λ2i ρ∗i + ∑ j∈ [ m ] λjJji ( λ+ ∑ j∈ [ m ] λjρ ∗ j ) 2 = σ2 ( λ 2 ) > ( ρ∗ + J > λ ) ( λ+ λ > ρ∗ ) 2 . By Lemma 12 , the variance is given by lim n , di→∞ di/n→zi Vλ , d , n = lim n , di→∞ di/n→zi −σ2 m∑ i=1 λ2iE [ ∂ ∂λi tr ( N−1 ) ] = σ2 m∑ i=1 r∗2i , where r∗ solves sup rt > 0 inf r1 , ... , rm > 0 2rt√1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t . Since { Vλ , d , n } is uniformly bounded and uniformly equicontinuous with respect to λ ∈ ( 0 , 1 ] by Lemma 5 , { Vλ , d , n } can be extended continuously to [ 0 , 1 ] and the family of extended functions is still uniformly bounded and uniformly equicontinuous . By the Arzela-Ascoli theorem , { Vλ , d , n } converges uniformly to the limit . By the Moore-Osgood theorem , we can exchange the two limits limn , di→∞ di/n→zi and limλ→0+ and get lim n , di→∞ di/n→zi lim λ→0+ Vλ , d , n = lim λ→0+ lim n , di→∞ di/n→zi Vλ , d , n = σ 2 m∑ i=1 r∗2i |λ=0 . E PROOF OF THEOREM 2 We use Theorem 1 to prove Theorem 2 . As in Theorem 1 , let r∗ solve minri≥0 maxrt≥0 ϑ ( rt , r , λ ) , where ϑ is defined in Equation ( 7 ) . Note that ϑ is a quadratic function of rt . Define A =√∑ i∈ [ m ] r 2 i + 1 , B = ∑ i∈ [ m ] √ ziri , A∗ = √∑ i∈ [ m ] r ∗2 i + 1 , and B ∗ = ∑ i∈ [ m ] √ zir ∗ i . Then r∗t = A−B λ and we get min ri≥0 max rt≥0 ϑ ( rt , r , λ ) = min ri≥0 ( A−B ) 2 λ + ∑ i∈ [ m ] 1 λi r2i = min ri≥0 ( A−B ) 2 λ + ∑ i∈ [ m ] 1 λi r2i . Taking the partial derivative with respect to ri gives ∂ ∂ri ( A−B ) 2 λ + ∑ i∈ [ m ] 1 λi r2i = 2 · A−B λ ( ri A − √ zi ) + 2 · ri λi . Setting it to zero gives the optimality condition for r∗i : A∗ −B∗ λ ( r∗i A∗ − √ zi ) = −r ∗ i λi , i ∈ [ m ] . ( 48 ) It follows that r∗i A∗ − √ zi r∗j A∗ − √ zj = r∗i /λi r∗j /λj , i , j ∈ [ m ] . Some algebraic manipulation in the above equation yields r∗i r∗j = λi λj · √ ziA ∗ − r∗i√ zjA∗ − r∗j , i , j ∈ [ m ] . Define z = ( z1 , . . . , zm ) . Then ‖z‖1 = ∑ i∈ [ m ] zi . By Cauchy–Schwarz inequality , if d/n →∑ i∈ [ m ] zi < 1 B ≤ √∑ i∈ [ m ] zi ‖r‖2 < ‖r‖2 < √ ‖r‖22 + 1 = A . Thus there does not exist r such that A = B . If d/n → ∑ i∈ [ m ] zi > 1 , then A = B is feasible for r. For example , set r = 1√ ( ‖z‖1 − 1 ) ‖z‖1 √ z . We have B = 〈 r , √ z 〉 = √ ‖z‖1 ‖z‖1 − 1 A = √ 1 + ‖r‖22 = √ 1 + 1 ‖z‖1 − 1 = B . If ‖z‖1 > 1 , since A = B is feasible , then lim λ→0+ min ri≥0 ( A−B ) 2 λ + ∑ i∈ [ m ] 1 λi r2i = min ri≥0 A=B ∑ i∈ [ m ] 1 λi r2i . If ‖z‖1 < 1 , then A−B always holds . To be precise , we have A−B ≥ ( √ ‖r‖22 + 1− ‖r‖2 ) ∨ ( ( 1− √ ‖z‖1 ) ‖r‖2 ) . If ‖r‖2 > 1 , then ( 1− √ ‖z‖1 ) ‖r‖2 > 1− √ ‖z‖1 . If ‖r‖2 ≤ 1 , then √ ‖r‖22 + 1−‖r‖2 ≥ √ 2−1 . Thus there exists a universal constant C0 = ( 1− √ ‖z‖1 ) ∨ ( √ 2− 1 ) > 0 such that A−B ≥ C0 . Recall Equation ( 48 ) . We have ( A∗ −B∗ ) ( r∗i A∗ − √ zi ) = −λr ∗ i λi , i ∈ [ m ] . Taking limλ→0+ , since A∗ −B∗ ≥ C0 does not go to zero , we have r∗i A∗ − √ zi = 0 , i ∈ [ m ] . Then we get r∗2i 1 + ∑ j∈ [ m ] r ∗2 j = zi , i ∈ [ m ] . Summing all i ∈ [ m ] yields ‖z‖1 = ∑ i∈ [ m ] r ∗2 i 1 + ∑ i∈ [ m ] r ∗2 i . Therefore , we have lim n , di→+∞ di/n→zi V0 , d , n = σ 2 lim λ→0+ m∑ i=1 r∗2i = σ 2 ∑ i∈ [ m ] zi 1− ∑ i∈ [ m ] zi . F PROOF OF THEOREM 3 Define A∗ = √∑ i∈ [ m ] r ∗2 i + 1 and B ∗ = ∑ i∈ [ m ] √ zir ∗ i . Equation ( 15 ) in Theorem 2 yields r∗1 r∗2 = λ1 λ2 · √ z1A ∗ − r∗1√ z2A∗ − r∗2 . Using the constraint A∗ = B∗ , we get r∗1 r∗2 = λ1 ( √ z1B ∗ − r∗1 ) λ2 ( √ z2B∗ − r∗2 ) . Define q = r ∗ 1 r∗2 . We have the following equation q = λ1 ( q ( z1 − 1 ) + √ z1z2 ) λ2 ( q √ z1z2 + z2 − 1 ) . Solving the above equation yields q = λ1 ( z1 − 1 ) + λ2 ( 1− z2 ) + √ ( λ1 ( z1 − 1 ) + λ2 ( 1− z2 ) ) 2 + 4λ1λ2z1z2 2λ2 √ z1z2 . ( 49 ) Here we discard the negative root . Let x = r∗21 + r ∗2 2 = r ∗2 2 ( 1 + q2 ) . ? ? yields 1 + x = r∗22 ( q √ z1 + √ z2 ) 2 = x 1 + q2 ( q √ z1 + √ z2 ) 2 . Solving x from the above equation gives x = q2 + 1 q2 ( z1 − 1 ) + 2q √ z1z2 + z2 − 1 . Therefore , lim n , di→+∞ di/n→zi V0 , d , n = q2 + 1 q2 ( z1 − 1 ) + 2q √ z1z2 + z2 − 1 . G PROOF OF THEOREM 4 Instead of considering the θ∗ specified in Equation ( 18 ) , we first consider a Bayesian setting where θ∗ ∼ N ( 0 , 1dId ) . Later , we will show that the setup in Equation ( 18 ) is asymptotically ( as di →∞ ) equivalent to this Bayesian setting . The precise meaning of equivalence will also be presented later . Our strategy can be divided into two steps . The first step is to show that the Bayes risk of the Bayes estimator is monotonically decreasing in the sample size n. The second step is to translate the sample-wise monotonicity of the Bayes estimator to the excess risk of the optimally regularized estimator θ̂λ , d , n in the setup of Equation ( 18 ) . Recall that since we are interested in sample-wise monotonicity , we add a subscript n to X and y ( they are defined by Equation ( 1 ) in Section 1.1 ) to emphasize that they consist of n data items . In this Bayesian setting , the likelihood function of θ∗ is L ( θ∗ | Xn , yn ) = ∏ i∈ [ n ] L ( θ∗ | xi , yi ) ∝ exp ( − ∑ i∈ [ n ] ( yi − 〈θ∗ , xi〉 ) 2 2σ2 ) = exp ( − ‖Xnθ∗ − yn‖22 2σ2 ) . The density of the prior of θ∗ is proportional to exp ( −d2 ‖θ ∗‖22 ) . Therefore , the posterior density of θ∗ is given by p ( θ∗ | Xn , yn ) ∝ exp ( − d ‖θ∗‖22 2 − ‖Xnθ∗ − yn‖22 2σ2 ) . As a result , the posterior distribution of θ∗ is Gaussian . The Bayes estimator is θ̂Bayes ( Xn , yn ) = arg min θ Eθ∗∼p ( θ∗|Xn , yn ) ‖θ − θ ∗‖2Σ . Taking the derivative with respect to θ gives ∂ ∂θ Eθ∗∼p ( θ∗|Xn , yn ) ‖θ − θ ∗‖2Σ = 2Σ ( θ − θ ∗ ) . Setting the above equation to zero yields Σ ( θ̂Bayes ( Xn , yn ) − Eθ∗∼p ( θ∗|Xn , yn ) θ∗ ) = 0 and there- fore θ̂Bayes ( Xn , yn ) = Eθ∗∼p ( θ∗|Xn , yn ) θ ∗ = E [ θ∗ | Xn , yn ] = arg min θ ( d ‖θ∗‖22 + ‖Xnθ∗ − yn‖22 σ2 ) . The final equality is because the posterior mean of a Gaussian distribution equals its mode . Define the Bayes risk Rn , Eθ∗∼N ( 0 , 1d Id ) , Xn , yn [ ∥∥∥θ̂Bayes ( Xn , yn ) − θ∗∥∥∥2 Σ ] . Write X = Rd and Y = R. Define R′n , inf θ̂ : Xn×Yn→R Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂ ( Xn , yn ) − θ∗∥∥∥2 Σ . We have R′n = inf θ̂ : Xn×Yn→Rd Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥Σ1/2θ̂ ( Xn , yn ) − Σ1/2θ∗∥∥∥2 2 = inf θ̂ : Xn×Yn→Rd Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂ ( Xn , yn ) − Σ1/2θ∗∥∥∥2 2 = Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥E [ Σ1/2θ∗ | Xn , yn ] − Σ1/2θ∗∥∥∥2 2 = Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥Σ1/2θ̂Bayes ( Xn , yn ) − Σ1/2θ∗∥∥∥2 2 = Rn . where the third equality is because the conditional expectation minimizes the ` 2 loss . Next , we want to show that Rn+1 ≤ Rn , i.e. , the Bayes risk of the Bayes estimator is monotonically decreasing in the sample size n. Rn+1 = inf θ̂ : Xn+1×Yn+1→Rd Eθ∗∼N ( 0 , 1d Id ) , Xn+1 , yn+1 [ ∥∥∥θ̂ ( Xn+1 , yn+1 ) − θ∗∥∥∥2 Σ ] ≤ inf θ̂ : Xn×Yn→R Eθ∗∼N ( 0 , 1d Id ) , Xn+1 , yn+1 [ ∥∥∥θ̂ ( Xn , yn ) − θ∗∥∥∥2 Σ ] = Rn . Then we want to show that Rn equals the Bayes risk of the optimally regularized estimator θ̂λ , n , d : Rn = inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . Since Rn = inf θ̂ : Xn×Yn→Rd Eθ∗ , Xn , yn ∥∥∥θ̂ ( Xn , yn ) − θ∗∥∥∥2 Σ , we get Rn ≤ inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . On the other hand , recalling θ̂Bayes ( Xn , yn ) = arg minθ ( d ‖θ‖22 + ‖Xnθ−yn‖22 σ2 ) = θ̂σ2d n , n , d and Rn = Eθ∗∼N ( 0 , 1d Id ) , Xn , yn [ ∥∥∥θ̂Bayes ( Xn , yn ) − θ∗∥∥∥2 Σ ] , we deduce Rn ≥ inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . Therefore we deduce Rn = infλ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . As a result , we establish sample-wise monotonicity of the Bayes risk of optimal regularized θ̂λ , n , d : Rn+1 = inf λ≥0 Eθ∗ , Xn+1 , yn+1 ∥∥∥θ̂λ , n+1 , d − θ∗∥∥∥2 Σ ≤ inf λ≥0 Eθ∗ , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ = Rn . ( 50 ) In what follows , we show that if θ∗ is given by Equation ( 18 ) , the excess risk of θ̂λ , n , d is asymptotically equal to its Bayes risk when θ∗ ∼ N ( 0 , 1dId ) : lim di→∞ ∣∣∣∣EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ − Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ ∣∣∣∣ = 0 . We abuse the notation in the above equation . The θ∗ in EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ satisfies Equation ( 18 ) , while the θ∗ in Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ follows a normal distribution N ( 0 , 1dId ) . By Lemma 5 and Lemma 6 , if Σ = PΛP > and θ′ = P > θ∗ are as defined in Table 1 ( where P is an orthogonal matrix and Λ = diag ( λ1Id1 , . . . , λmIdm ) ∈ Rd×d is a diagonal matrix ) , for fixed θ∗ we have EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ =EXn , yn [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] + σ2EXn , yn [ ‖ΛZ ( λnIn + Z > ΛZ ) −1 ‖22 ] , where every entry ofZ ∈ Rd×n follows i.i.d . N ( 0 , 1 ) . If θ∗ ∼ N ( 0 , 1dId ) , we have θ ′ ∼ N ( 0 , 1dId ) . Since the variance term σ2EXn , yn [ ‖ΛZ ( λnIn + Z > ΛZ ) −1 ‖22 ] does not depend on θ∗ , the two variance terms cancel out and we get EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ − Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ =EXn , yn [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] − EXn , yn , θ′∼N ( 0 , 1d Id ) [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] For U ∼ ⊕ i∈ [ m ] Unif ( O ( di ) ) , we have ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 d = ( Id + 1 nλ Λ1/2UZZ > U > Λ1/2 ) −1 = U ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 U > . By Lemma 13 , for θ∗ ( and thereby θ′ ) specified in Equation ( 18 ) , we get EXn , yn [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] = EXn , yn , φ [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 φ‖22 ] , where φ ∼ ⊕ i∈ [ m ] Unif ( Sdi−1 ( ‖θ′i‖2 ) ) = ⊕ i∈ [ m ] Unif ( Sdi−1 ( √ di/d ) ) . In the Bayesian setting , if θ′ ∼ N ( 0 , 1dId ) , then U > θ′ ∼ N ( 0 , 1dId ) . We have Eθ′∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ = Eθ′∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥∥∥Λ1/2U ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 U > θ′ ∥∥∥∥∥ 2 2 = EXn , yn , ψ ∥∥∥∥∥Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 ψ ∥∥∥∥∥ 2 2 , where ψ = U > θ′ ∼ N ( 0 , 1dId ) . Next , we want to couple φ and ψ . Let si i.i.d.∼ Unif ( Sdi−1 ( 1 ) ) , hi i.i.d.∼ χ2 ( di ) , and define φ = √ d1/ds1 ... √ dm/dsm , ψ = √ h1/ds1 ... √ hm/dsm . We have ‖φ‖2 = 1 and ‖ψ‖2 = √√√√ m∑ i=1 hi d = √√√√ m∑ i=1 di d · hi di , ‖φ− ψ‖2 = √√√√ m∑ i=1 di d ( 1− √ hi di ) 2 . By the strong law of large numbers , limdi→+∞ hi/di = 1 almost surely . Thus we get limdi→+∞ , di/d→νi ‖ψ‖2 = √∑m i=1 νi and limdi→+∞ , di/d→νi ‖φ− ψ‖2 = 0 almost surely ( recall that we will let di → +∞ and di/d → νi for some constant νi > 0 . ) . Because∥∥Λ1/2∥∥ 2 . 1 and ∥∥∥ ( Id + 1nλΛ1/2ZZ > Λ1/2 ) −1∥∥∥ 2 ≤ ‖Id‖2 = 1 , we bound the norm of Q , Λ1/2 ( Id + 1 nλΛ 1/2ZZ > Λ1/2 ) −1 as follows ‖Q‖2 ≤ ∥∥∥Λ1/2∥∥∥ 2 ∥∥∥∥∥ ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1∥∥∥∥∥ 2 . 1 . It follows that ∣∣∣EXn , yn , φ [ ‖Qφ‖22 ] − EXn , yn , ψ [ ‖Qψ‖22 ] ∣∣∣ ≤EXn , yn , φ , ψ ∣∣∣‖Qφ‖22 − ‖Qψ‖22∣∣∣ =EXn , ynφ , ψ ( ‖Qφ‖2 + ‖Qψ‖2 ) |‖Qφ‖2 − ‖Qψ‖2| .EXn , ynφ , ψ [ ( ‖φ‖2 + ‖ψ‖2 ) ‖Q ( φ− ψ ) ‖2 ] .EXn , ynφ , ψ ‖φ− ψ‖2 , where the last inequality is because ‖φ‖2 + ‖ψ‖2 . 1 for all sufficiently large di . We know that limdi→+∞ , di/d→νi ‖φ− ψ‖2 = 0 almost surely . To apply Lebesgue ’ s dominated convergence theorem , we need to find a dominating integrable random variable . In fact , 1 + ‖ψ‖2 dominates ‖φ− ψ‖2 : ‖φ− ψ‖2 ≤ ‖φ‖2 + ‖ψ‖2 = 1 + ‖ψ‖2 . It is integrable because E ‖ψ‖2 = E [ √ χ2 ( d ) d ] ≤ √ E [ χ2 ( d ) ] d = 1 . Application of Lebesgue ’ s dominated convergence theorem yields lim di→+∞ , di/d→νi ∣∣∣EXn , yn , φ [ ‖Qφ‖22 ] − EXn , yn , ψ [ ‖Qψ‖22 ] ∣∣∣ = 0 . Therefore , we conclude that lim di→+∞ , di/d→νi ∣∣∣∣EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2Σ − Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ ∣∣∣∣ = 0 and this convergence is uniform in n and λ ∈ ( 0 , ∞ ) . It follows that lim n , di→∞ n/di→γi ∣∣∣∣EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ − Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ ∣∣∣∣ = 0 and this convergence is uniform in λ ∈ ( 0 , ∞ ) . By Lemma 8 ( the proof is similar when we replace α→ +∞ by n , di →∞ , n/di → γi ) , we have lim n , di→∞ n/di→γi ∣∣∣∣ infλ > 0EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ − infλ > 0Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ ∣∣∣∣ = 0 . ( 51 ) Define fα ( λ ) = Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . We use α to denote the indices n , di . By Lemma 5 and Lemma 6 , we have Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . Eθ∗∼N ( 0 , 1d Id ) ‖θ ∗‖22 = 1 . Therefore { fα ( λ ) } is uniformly bounded for λ > 0 . Since ∣∣∣∣ ddλEXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ ∣∣∣∣ . ‖θ∗‖22 and Eθ∗∼N ( 0 , 1d Id ) ‖θ ∗‖22 = 1 , we have∣∣∣∣ ddλEθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2Σ ∣∣∣∣ = ∣∣∣∣Eθ∗∼N ( 0 , 1d Id ) ddλEXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2Σ ∣∣∣∣ . 1 . As a result , { fα ( λ ) } is uniformly equicontinuous for λ > 0 , and in particular λ ∈ ( 0 , M ] for any M > 0 . Therefore { fα ( λ ) } can be extended continuously to [ 0 , M ] and the family of extended functions is still uniformly bounded and uniformly equicontinuous . Recall that if θ∗ ∼ N ( 0 , 1dId ) , we have θ′ ∼ N ( 0 , 1dId ) . As in Equation ( 19 ) , write θ ′ in a row-partitioned form θ′ = θ ′ 1 ... θ′m , where θ′i ∈ Rdi . Then ‖Πiθ∗‖2 = ‖θ′i‖2 ∼ √ χ2 ( di ) d = √ χ2 ( di ) di · did → √ νi as n , di → +∞ and n/di → γi , where νi = ( γi ∑ j∈ [ m ] 1 γj ) −1 . By Theorem 1 , { fα ( λ ) } converges pointwise , say , to h ( λ , γ1 , . . . , γm ) . By the Arzela-Ascoli theorem , limα fα ( λ ) = h ( λ , γ1 , . . . , γm ) uniformly on λ ∈ [ 0 , M ] . Therefore , as n , di →∞ and n/di → γi , by Lemma 8 , we have inf λ∈ [ 0 , M ] Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ → inf λ∈ [ 0 , M ] h ( λ , γ1 , . . . , γm ) . Recalling θ̂Bayes ( Xn , yn ) = arg minθ ( d ‖θ‖22 + ‖Xnθ−yn‖22 σ2 ) = θ̂σ2d n , n and Rn = Eθ∗∼N ( 0 , 1d Id ) , Xn , yn [ ∥∥∥θ̂Bayes ( Xn , yn ) − θ∗∥∥∥2 Σ ] = inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . For all M > CM : = 2σ2 ∑ i∈ [ m ] 1 γi ≥ σ 2d n ( recall d n → ∑ i∈ [ m ] 1 γi ) , we have inf λ∈ [ 0 , M ] Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ = inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ → inf λ∈ [ 0 , M ] h ( λ , γ1 , . . . , γm ) . The uniqueness of limits implies that infλ∈ [ 0 , M ] h ( λ , γ1 , . . . , γm ) is independent of M as long as M > σ2 . As a result , if M > CM , we have infλ∈ [ 0 , M ] h ( λ , γ1 , . . . , γm ) = infλ≥0 h ( λ , γ1 , . . . , γm ) , which yields inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ → inf λ≥0 h ( λ , γ1 , . . . , γm ) . ( 52 ) Equation ( 50 ) implies infλ≥0 h ( λ , γ1 , . . . , γm ) is decreasing in every γi . Combining Equation ( 51 ) and Equation ( 52 ) gives inf λ≥0 EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ → inf λ≥0 h ( λ , γ1 , . . . , γm ) . | This paper studies the generalization risk of ridge and ridgeless linear regression under Gaussian data and Gaussian noise settings. The limiting bias and variance are described in closed-form. The analysis leverages random matrix theory and CGMT. The authors show that sample-wise multiple descent phenomenon can take place or be avoided if optimal regularization is applied. | SP:393abedf96b356492f7524a041bf15b677328c4a |
Spectral Multiplicity Entails Sample-wise Multiple Descent | 1 INTRODUCTION The double/multiple descent phenomenon attracted recent research attention due to ( Belkin et al. , 2019 ) . This line of work focuses on the parameter-wise double/multiple descent phenomenon of the risk curve ( Bartlett et al. , 2020 ; Tsigler & Bartlett , 2020 ; Belkin et al. , 2019 ; 2020 ; Chen et al. , 2020a ; Liang et al. , 2020 ; Advani et al. , 2020 ; Bös & Opper , 1998 ; Krogh & Hertz , 1992 ; Le Cun et al. , 1991 ; Mei & Montanari , 2019 ; Opper et al. , 1990 ; Vallet et al. , 1989 ; Watkin et al. , 1993 ) . The classical learning theory shows that when the number of parameters ( which reflects the model complexity ) increases , the test error ( generalization risk ) first decreases due to more fitting power , and then increases due to overfitting . The generalization risk attains a peak at the interpolation threshold ( the number of parameters equals the number of data points so that the model interpolates the data ) . This results in a U-shaped risk curve if we plot the test error versus the number of parameters . The double descent risk curve posits that the risk will decrease ( again ) if one further increases the model complexity beyond the interpolation threshold ( Belkin et al. , 2019 ) . Thus there is a second descent in addition to the first one in the U-shaped stage of the curve . Belkin et al . ( 2019 ) presented empirical results and showed the existence of such double descent behavior in the random Fourier features model , the fully connected neural network , and the random forest model . Prior to ( Belkin et al. , 2019 ) , earlier studies of the shape and features of the risk curve in a number of contexts include ( Vallet et al. , 1989 ; Opper et al. , 1990 ; Le Cun et al. , 1991 ; Krogh & Hertz , 1992 ; Bös & Opper , 1998 ; Watkin et al. , 1993 ; Advani et al. , 2020 ) . Loog et al . ( 2020 ) presented a prehistory of the double descent phenomenon . Belkin et al . ( 2020 ) proved the double descent curve in the Gaussian model and the Fourier series model . Mei & Montanari ( 2019 ) theoretically established the double descent curve of the random features regression . Bartlett et al . ( 2020 ) ; Tsigler & Bartlett ( 2020 ) characterized the conditions for ridgeless and ridge linear regression problems , respectively , under which the minimum-norm interpolants achieve near-optimal generalization risk . Liang et al . ( 2020 ) showed that the test error of the minimum-norm interpolator of data in reproducing kernel Hilbert space is upper bounded by a multiple descent curve as the model complexity increases . They also presented a numerical result supporting that the test error itself exhibits a multiple descent curve . Chen et al . ( 2020a ) proved that the multiple descent curve does exist for the minimum-norm interpolator in linear regression and that the curve can be even designed . Following the parameter-wise double descent , research interest extended to epoch-wise and samplewise double descent ( Nakkiran et al. , 2020 ; Chen et al. , 2020b ; Min et al. , 2021 ; Nakkiran et al. , 2021 ) . Nakkiran et al . ( 2020 ) observed from their numerical result that the generalization risk experiences a double descent as one keeps the model size fixed and increases the training time . They called this observation epoch-wise double descent . Nakkiran et al . ( 2020 ) also noted sample-wise non-monotonicity , which means that more data can hurt generalization . Nakkiran et al . ( 2021 ) proved that for isotropic features , optimally regularized ridge regression yields a monotonic generalization risk curve with more samples . Nakkiran et al . ( 2021 ) also showed that if the features are formed by projecting high-dimensional isotropic data to a random low-dimensional space ( say , ddimensional ) , the optimally regularized ridge regression has a monotonic generalization risk curve with increasing d ( the model size ) . Sample-wise non-monotonicity and double descent was also observed in ( Chen et al. , 2020b ; Min et al. , 2021 ) in adversarially trained models . C ompared to ( Wu & Xu , 2020 ; ichi Amari et al. , 2021 ; Dobriban & Wager , 2018 ; Richards et al. , 2021 ) , in what follows , we highlight our contributions and the differences from them . First , our major contribution is providing a rigorous proof for the existence of sample-wise ( test error vs. the number of training samples ) double and multiple descent in linear regression . However , ( Richards et al. , 2021 ) only mentioned parameter-wise double descent ( test error vs. model capacity ) in their related work . ( ichi Amari et al. , 2021 ) only mentioned epoch-wise ( test error vs. training time ) double descent in Appendix A.2 . Neither ( Richards et al. , 2021 ) nor ( ichi Amari et al. , 2021 ) mentioned multiple descent . Second , we made and theoretically proved the observation that an ill-conditioned covariance matrix is a sufficient condition for the existence of sample-wise multiple descent . To the best of our knowledge , our work is the first paper that pointed this out . Third , we solved the Stieltjes transform explicitly and derived explicit formulae for the risk and variance in our setup . In addition , we also provided rigorous treatment to the ridgeless setting and also obtained explicit formulae for it . Fourth , there is another difference between our paper and the papers that the reviewer mentioned . ( Wu & Xu , 2020 ; ichi Amari et al. , 2021 ; Dobriban & Wager , 2018 ; Richards et al. , 2021 ) assumed a prior on the true linear model and takes expectation over the prior . In our paper , we do not assume a prior on the true linear model and our risk does not take the expectation over a random true linear model . In the setting of generally anisotropic features , this paper gives an asymptotic characterization of the generalization risk curve with more samples . The asymptotic regime is an approximation for large n , d and can also shed light on practical machine learning problems . We first introduce our problem setup . 1.1 PROBLEM SETUP Data Distribution Let Σ ∈ Rd×d be a positive semi-definite matrix which is termed the covariance matrix , and let θ∗ ∈ Rd . The eigenvalues of Σ are λ1 , . . . , λm with multiplicity d1 , . . . , dm , respectively . We have d = ∑m i=1 di . Assume that λ1 , . . . , λm are fixed , distinct , all positive , and do not depend on d ( i.e. , for all d , the eigenvalue of Σ are always λ1 , . . . , λm ) . We assume the following data distribution D for ( x , y ) ∈ Rd × R : x ∼ N ( 0 , Σ ) , y = x > θ∗ + , where x and are independent and ∼ N ( 0 , σ2 ) . In practice , there are natural random variables x that satisfy our assumption . For example , assume that we want to use machine A to measure the length of several objects and use machine B to measure their temperature . The measured lengths and temperatures follow an i.i.d . Gaussian distribution . However , the variance of measurement of machine A is different from that of machine B . Then we consider the random vector formed by the measurements x = ( l1 , . . . , ln , t1 , . . . , tn ) , where li and ti are the length and temperature of object i , respectively . This results in a block-structured covariance matrix . When we measure more objects , the size of the covariance matrix tends to infinity . Second , the motivation came from ( Nakkiran et al. , 2021 ) . ( Nakkiran et al. , 2021 ) observed empirically in their Figure 2 that when the covariance matrix has a block structure ( specifically , there are only two fixed different eigenvalues 10 and 1 ) , the expected excess risk exhibits multiple descent . We quantitatively studied this observation and obtained the related formulae . The excess risk of an estimator θ ∈ Rd is given by R ( θ ) = Ex , y∼D [ ( y − x > θ ) 2 − ( y − x > θ∗ ) 2 ] . Assume that the training data { ( xi , yi ) } ni=1 ⊆ Rd × R is drawn i.i.d . from D. Write X = x > 1 ... x > n ∈ Rn×d , y = y1 ... yn ∈ Rn . ( 1 ) We have y = Xθ∗ + , where ∼ N ( 0 , σ2In ) . Ridge Estimator and Minimum-Norm Estimator Definition 1 ( Ridge estimator ) . The ridge estimator θ̂λ , n , d ∈ Rd ( λ > 0 ) solves the following minimization problem min θ∈Rd 1 n ‖Xθ − y‖22 + λ ‖θ‖ 2 2 . Definition 2 ( Minimum-norm estimator ) . The minimum-norm estimator ( also known as the ridgeless estimator ) θ̂0 , n , d ∈ Rd solves the following minimization problem min θ∈Rd ‖θ‖2 such that ‖Xθ − y‖2 = min θ∈Rd ‖Xθ − y‖2 . We are interested in the expected excess risk of θ̂λ , n , d , which is given by Rλ , n , d = E [ R ( θ̂λ , n , d ) ] . The expectation is taken over the randomness of the training data { ( xi , yi ) } ni=1 . Asymptotic Regime Let Πi ∈ Rd×d be the orthogonal projection to the eigenspace of λi . This paper focuses on the asymptotic behavior of the expected excess risk of θ̂λ , n , d where n , di → +∞ , di/n→ zi ( zi is a fixed positive constant ) , and ‖Πiθ∗‖2 → ηi . In other words , we are interested in lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi Rλ , n , d . 1.2 OUR CONTRIBUTIONS Our contributions are summarized as follows . 1 . We obtain the formulae for the limiting bias and variance , and thereby the limiting risk . We use two methods to obtain these formulae . Specifically , we obtain the limiting bias and variance by solving the Stieltjes transform and computing its derivatives and antiderivatives . We also use convex Gaussian min-max theorem ( CGMT ) ( Thrampoulidis et al. , 2015 ) to compute the limiting variance . The advantage of the CGMT method is that it is more mathematically tractable for the ridgeless estimator . Through the CGMT approach , we obtain a closed-form formula for the variance in the underparameterized regime and simplify the formula for the variance in the overparameterized regime . Moreover , based on the simplified formula , we deduce a closed-form expression for the variance if the covariance matrix of the data distribution has two different eigenvalues . 2 . We find and theoretically prove that sample-wise multiple descent happens when the covariance matrix has eigenvalues of very different orders of magnitude ( thus the covariance matrix is highly ill-conditioned ) . 3 . We show that if the true linear model θ∗ satisfies ‖Πiθ∗‖2 = √ di d , optimal regulariza- tion ( i.e. , pick λ that minimizes the generalization risk of θ̂λ , n , d ) results in a monotone generalization risk curve—in other words , with optimal regularization , more data samples always improve generalization . Thus there is no sample-wise double or multiple descent . This provides a theoretical proof of a phenomenon observed in ( Nakkiran et al. , 2021 ) that optimal regularization can mitigate double descent for anisotropic data . Note that without regularization , there will be a blow-up in expected excess risk when n = d ( the linear model exactly interpolates the data ) and therefore , there is no samplewise descent across the under- and over-parameterized regimes . 2 PRELIMINARIES Notation Write [ m ] for { 1 , 2 , . . . , m } . Let i denote the imaginary unit . If x ∈ Rn and Σ ∈ Rn×n is a positive semidefinite matrix , write ‖x‖Σ , √ x > Σx . For a vector x , let ‖·‖1 and ‖·‖2 denote the ` 1 and ` 2 norm , respectively . Let denote the Hadamard ( entry-wise ) product between vectors . Write ‖ · ‖2 and ‖ · ‖F for the spectral matrix norm and Frobenius matrix norm , respectively . Let 4 denotes the Loewner order . For two square matrices A and B of the same size , write A 4 B if B − A is positive semidefinite . Define spec ( A ) as the set of all eigenvalues of A . Let O ( d ) = { A ∈ Rd×d | AA > = A > A = Id } denote the set of d × d orthogonal matrices . Define Sd−1 ( r ) , { x ∈ Rd | ‖x‖2 = r } . Denote almost sure convergence by a.s.→ , and convergence in probability plim and P→ . Ridge Estimator and Minimum-Norm Estimator We begin with the equivalent characterizations of the ridge and minimum-norm estimator . An equivalent characterization of the ridge estimator θ̂λ , n , d is θ̂λ , n , d = ( X > X + λnId ) −1 X > y = X > ( λnIn +XX > ) −1 y . ( 2 ) The second equality in Equation ( 2 ) is because of the Sherman–Morrison–Woodbury formula . A proof of Equation ( 2 ) can be found in ( Tsigler & Bartlett , 2020 ) . An equivalent definition of the minimum-norm estimator θ̂0 , n , d is that θ̂0 , n , d solves the following minimization problem min θ∈Rd ‖θ‖2 such that X > Xθ = X > y . Thus we have θ̂0 , n , d = ( X > X ) + X > y = X > ( XX > ) + y = X+y , where A+ denotes the pseudo-inverse of A . The second and third equalities are because of the identity X+ = ( X > X ) + X > = X > ( XX > ) + . The minimum-norm estimator is the limit of the ridge estimator θ̂λ , n , d as λ→ 0+ : θ̂0 , n , d = lim λ→0+ θ̂λ , n , d . This is because of the identity limλ→0+ ( X > X + λnId ) −1 X > = limλ→0+ X > ( λnIn +XX > ) −1 = X+ . Bias-Variance Decomposition of Expected Excess Risk We first show that the excess risk of an estimator θ equals the norm of θ − θ∗ : R ( θ ) = E ( x , y ) ∼D [ ( y − x > θ ) 2 − ( y − x > θ∗ ) ] = Ex [ ( x > ( θ∗ − θ ) ) 2 ] = E [ ( θ∗ − θ ) > Σ ( θ∗ − θ ) ] = E [ ‖θ∗ − θ‖2Σ ] . For the ridge estimator , the expected excess risk is Rλ , d , n =E [ ‖θ∗ −X > ( nλIn +XX > ) −1 ( Xθ∗ + ) ‖2Σ ] =E [ ‖ ( Id −X > ( nλIn +XX > ) −1X ) θ∗ −X > ( nλIn +XX > ) −1 ‖2Σ ] =E [ ‖ ( Id −X > ( nλIn +XX > ) −1X ) θ∗‖2Σ ] + E [ ∥∥X > ( nλIn +XX > ) −1 ∥∥2Σ ] =E [ ‖ ( Id −X > ( nλIn +XX > ) −1X ) θ∗‖2Σ ] + σ2E tr [ XΣX > ( nλIn +XX > ) −2 ] , Bλ , d , n + Vλ , d , n . ( 3 ) For the minimum-norm estimator , the expected excess risk is R0 , d , n = E [ ‖θ∗ −X+ ( Xθ∗ + ) ‖2Σ ] = E [ ∥∥ ( Id −X+X ) θ∗ −X+ ∥∥2Σ ] = E [ ∥∥ ( Id −X+X ) θ∗∥∥2Σ ] + E [ ∥∥X+ ∥∥2Σ ] = E [ ∥∥ ( Id −X+X ) θ∗∥∥2Σ ] + σ2E tr [ ( X+ ) > ΣX+ ] , B0 , d , n + V0 , d , n . ( 4 ) We call Bλ , d , n and B0 , d , n the bias term , and call Vλ , d , n and V0 , d , n the variance term . The bias and variance for the minimum-norm estimator are the limit of their counterpart for the ridge estimator as λ → 0+ , i.e. , limλ→0+ Bλ , d , n = B0 , d , n and limλ→0+ Vλ , d , n = V0 , d , n ( this can be shown by Lebesgue ’ s dominated convergence theorem , see our proof in Lemma 5 and Lemma 6 , respectively ) . 3 MAIN RESULTS 3.1 LIMITING RISK AND SAMPLE-WISE MULTIPLE DESCENT We study the limiting bias and variance for a linear regression problem in which the data distribution follows a multivariate normal distribution , the spectrum of the covariance matrix exhibits a block structure and tends to a discrete distribution . Thanks to the random matrix theory , we obtain the formulae ( presented in Theorem 1 ) for the limiting bias and variance , and thereby the total risk . We use two methods to obtain these formulae . The first method is through the Stieltjes transform of the matrix 1nXX > . The central quantity for computing the limiting bias and variance through the first method is the solution ρ∗ to the optimization problem Equation ( 5 ) in Item 1 of Theorem 1 . Item 1 guarantees the existence of a solution and determines its optimality condition Equation ( 6 ) . Item 2 computes the Jacobian matrix of ρ∗ with respect to λi and provides a closed-form formula to compute the Jacobian matrix . Equation ( 9 ) and Equation ( 10 ) in Item 4 give the formulae for the limiting bias obtained by the first method . Equation ( 11 ) and Equation ( 12 ) give the limiting variance . The second method is through the convex Gaussian min-max theorem ( CGMT ) ( Thrampoulidis et al. , 2015 ) . The central quantity is the solution r∗ to the minimax optimization problem Equation ( 8 ) in Item 3 . We use CGMT to obtain the formulae for the variance term . They are presented in Equation ( 13 ) and Equation ( 14 ) in Item 4 . Theorem 1 . The following statements hold : 1 . There exists a minimizer ρ ∈ Rm+ that solves inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) . ( 5 ) The minimizer ρ∗ satisfies λi λ+ ∑m j=1 λjρ ∗ j + 1− zi ρi = 0 , ∀i ∈ [ m ] . ( 6 ) 2 . Let ρ∗ ∈ Rm be a minimizer of Equation ( 5 ) and J = ∂ρ ∗ ∂λ ∈ R m×m be the Jacobian matrix Jij = ∂ρ∗i ∂λj . Then J is given by J = ( diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > ) −1 ( ( z− ρ∗ ) ρ∗ > − diag ( ρ∗ ) ) and the matrix ( diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > ) is always invertible . 3 . Define r = ( r1 , . . . , rm ) , λ = ( λ1 , . . . , λm ) , and ϑ ( rt , r , λ ) = 2rt √ 1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t . ( 7 ) For any Kt ≥ 2λ and Ku ≥ 2λ+ ( 2+ √ γ ) λ , we have max 0≤rt≤Kt min 0≤ri≤Ku ϑ ( rt , r , λ ) = min 0≤ri≤Ku max 0≤rt≤Kt ϑ ( rt , r , λ ) = max rt≥0 min ri≥0 ϑ ( rt , r , λ ) = min ri≥0 max rt≥0 ϑ ( rt , r , λ ) ( 8 ) and the above optimization problem has a solution . 4 . Let r∗ = ( r∗1 , . . . , r ∗ m ) solve Equation ( 8 ) . Define q = ( η21/z1 , . . . , η 2 m/zm ) > and view λ = ( λ1 , . . . , λm ) > as a column vector . The limiting bias is given by lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi Bλ , d , n = q > ( λ ρ∗ + Jλ 2 ) , ( 9 ) lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi B0 , d , n = lim λ→0+ q > ( λ ρ∗ + Jλ 2 ) . ( 10 ) The limiting variance is given by lim n , di→+∞ di/n→zi Vλ , d , n = σ 2λ 2 > ( ρ∗ + J > λ ) ( λ+ λ > ρ∗ ) 2 , ( 11 ) lim n , di→+∞ di/n→zi V0 , d , n = σ 2 lim λ→0+ λ 2 > ( ρ∗ + J > λ ) ( λ+ λ > ρ∗ ) 2 , ( 12 ) lim n , di→+∞ di/n→zi Vλ , d , n = σ 2 m∑ i=1 r∗2i , ( 13 ) lim n , di→+∞ di/n→zi V0 , d , n = σ 2 lim λ→0+ m∑ i=1 r∗2i . ( 14 ) Figure 1 illustrates the theoretical and numerical values of the bias , variance , and total risk . We observe a triple descent in Figure 1a where the covariance matrix has three blocks , and a quadruple descent in Figure 1b where the covariance has four blocks . In the three-block example , we set λ3 λ2 λ1 ( λ1 = 1 , λ2 = 100 , λ3 = 1000 ) . In the four-block example , we set λ4 λ3 λ2 λ1 ( λ1 = 1 , λ2 = 100 , λ3 = 104 , λ4 = 107 ) . For the values of other parameters , please refer to the caption of Figure 1 Our findings provide an explanation for the occurrence of sample-wise multiple descent : it occurs when the covariance matrix is highly ill-conditioned . Moreover , we find that the generalization risk curve is continuous in ridge regression ( λ > 0 ) while it blows up at n = d in ridgeless regression ( λ = 0 ) . We can see the singularity ( at n = d = 200 ) of the ridgeless generalization risk curve in Figure 2a . Following Theorem 1 , we focus on the variance in the ridgeless case ( λ = 0 ) and further study the expressions in Equation ( 13 ) and Equation ( 14 ) . We find that the variance exhibits sharply different behaviors in the underparameterized and overparameterized regimes . Recall that we will let n , di → +∞ and keep di/n → zi . Then d/n → ∑ i∈ [ m ] zi . If lim d/n = ∑ i∈ [ m ] zi > 1 , we are in the underparameterized regime . In this regime , the bias vanishes and therefore the risk equals the variance . If lim d/n < 1 , we are in the overparameterized regime . Theorem 2 . If d/n→ ∑ i∈ [ m ] zi > 1 and r ∗ = ( r∗1 , . . . , r ∗ m ) solves min ri≥0 ∑ i∈ [ m ] 1 λi r2i subject to √∑ i∈ [ m ] r2i + 1 = ∑ i∈ [ m ] √ ziri , then we have an optimality condition for r∗ : r∗i r∗j = λi λj · √ ziA ∗ − r∗i√ zjA∗ − r∗j , i , j ∈ [ m ] , ( 15 ) where A∗ = √∑ i∈ [ m ] r ∗2 i + 1 . Moreover , we have limn , di→+∞ di/n→zi V0 , d , n = σ 2 limλ→0+ ∑m i=1 r ∗2 i . If d/n→ ∑ i∈ [ m ] zi < 1 , then we have lim n , di→+∞ di/n→zi V0 , d , n = σ 2 ∑ i∈ [ m ] zi 1− ∑ i∈ [ m ] zi . . Corollary 1 . If m = 1 and d/n→ z1 > 1 , we have limn , di→+∞ di/n→zi V0 , d , n = σ 2 1 z1−1 . Proof . In the case m = 1 , we have r∗1 solves minr1≥0 1 λ1 r21 subject to √ r21 + 1 = √ z1r1 . The equality constraint gives r∗21 = 1 z1−1 . Then by Theorem 2 , the limiting variance is σ 2r∗21 = σ 2 1 z1−1 . In Theorem 2 , we find that in the underparameterized regime , r∗ solves an equality-constrained minimization problem . In the proof of Theorem 2 , we see that the equality constraint is feasible in the underparameterized regime but infeasible in the overparameterized regime . Moreover , we present an optimality condition for r∗ , which will be used in Theorem 3 to study the two-block ( m = 2 ) case . If the data distribution is isotropic ( which means that the covariance matrix is a scalar matrix ) , Collorary 1 shows that the limiting variance is σ2 1z1−1 , which agrees with ( Hastie et al. , 2019 , Theorem 1 ) . In the overparameterized regime , however , we find that the limiting variance does not depend on the spectrum { λ1 , . . . , λm } of the covariance matrix and only depends on the noise intensity σ and the ratios zi = lim di/n . This agrees with ( Hastie et al. , 2019 , Proposition 2 ) . In Theorem 3 , we study the case m = 2 and present a concrete closed-form formula for the limiting variance in the overparameterized regime . Recall that the limiting variance in the underparameterized regime has a closed-form σ2 ∑ i∈ [ m ] zi 1− ∑ i∈ [ m ] zi for general m , as shown in Theorem 2 . Theorem 3 . If m = 2 and d/n→ z1 + z2 > 1 , we have lim n , di→+∞ di/n→zi V0 , d , n = σ 2 q 2 + 1 q2 ( z1 − 1 ) + 2q √ z1z2 + z2 − 1 . where q = λ1 ( z1 − 1 ) + λ2 ( 1− z2 ) + √ ( λ1 ( z1 − 1 ) + λ2 ( 1− z2 ) ) 2 + 4λ1λ2z1z2 2λ2 √ z1z2 . ( 16 ) We illustrate the theoretical values predicted by Theorem 3 ( overparameterized regime ) and Theorem 2 ( underparameterized regime ) in Figure 2a and compare it to the numerical values . Corollary 2 ( Triple descent in the two-block case ) . Assume m = 2 , z1 = z2 , d/n→ ζ = 2z1 , and λ2/λ1 = % . Define f % ( ζ ) = limn , di→+∞ di/n→zi V0 , d , n . We have f ( ζ ) , lim % →+∞ fρ ( ζ ) = σ2 ζ1−ζ ζ < 1 , σ2 ( 1 ζ−1 + 2 2−ζ − 1 ) 1 < ζ < 2 σ2 2ζ−2 ζ > 2 . ( 17 ) There exists ζ1 , ζ2 , ζ3 , ζ4 and % 0 such that for all % > % 0 , we have f ′ % ( ζ1 ) < 0 , f ′ % ( ζ2 ) > 0 , f ′ % ( ζ3 ) < 0 , and f ′ % ( ζ4 ) < 0 . Proof . The case ζ < 1 is already given in Theorem 2 . In the sequel , assume ζ > 1 . Define q as in Equation ( 16 ) . We have q = ζ + √ ζ2 ( % + 1 ) 2 − 4ζ ( % − 1 ) 2 + 4 ( % − 1 ) 2 − ( ζ − 2 ) % − 2 2ζ % . Recall Theorem 3 , we get f % ( ζ ) = lim n , di→+∞ di/n→zi V0 , d , n = 2 ( q2 + 1 ) ζ ( q + 1 ) 2 − 2 ( q2 + 1 ) = 2σ2 ζ ( q+1 ) 2 q2+1 − 2 . Direct calculation yields lim % →+∞ f % ( ζ ) = σ2 ζ1−ζ ζ < 1 , σ2 ( 1 ζ−1 + 2 2−ζ − 1 ) 1 < ζ < 2 σ2 2ζ−2 ζ > 2 . , g ( ζ ) , lim % →+∞ f ′ % ( ζ ) = σ2 1 ( ζ−1 ) 2 ζ < 1 , σ2 ζ 2−2 ( ζ2−3ζ+2 ) 2 1 < ζ < 2 σ2 −2 ( ζ−2 ) 2 ζ > 2 . , The function g ( ζ ) > 0 if ζ ∈ ( √ 2 , 2 ) and we have g ( ζ ) < 0 if ζ < √ 2 or ζ > 2 . Pick ζ1 > 2 > ζ2 > √ 2 > ζ3 > 1 > ζ4 . Then we have g ( ζ1 ) < 0 , g ( ζ2 ) > 0 , g ( ζ3 ) < 0 , and g ( ζ4 ) > 0 . There exists % 0 such that for all % > % 0 , we have f ′ % ( ζ1 ) < 0 , f ′ % ( ζ2 ) > 0 , f ′ % ( ζ3 ) < 0 , and f ′ % ( ζ4 ) < 0 . Collorary 2 theoretically proves that there exists triple descent when m = 2 and λ2 λ1 . Note that a larger ζ = lim d/n reflects a relatively smaller n. If f ′ % ( ζ ) < 0 , then f % ( ζ ) decreases on a neighborhood of ζ and therefore the limiting variance increases with a relatively larger n. As n becomes relatively larger , we see an increasing stage , a decreasing stage , and finally an increasing stage in order in the overparameterized regime ( n < d ) . When we further increase n and enter the underparameterized regime , we observe a decreasing stage . We illustrate f ( ζ ) in Figure 2b . In Figure 2b , we observe two singularities at ζ = 1 and ζ = 2 . 3.2 OPTIMAL REGULARIZATION MONOTONIZES GENERALIZATION RISK CURVE Recall the definition of the ridge estimator in Definition 1 . Since this subsection concerns samplewise monotonicity , we add a subscript n toX and y ( they are defined by Equation ( 1 ) in Section 1.1 ) to emphasize that they consist of n data items . Therefore we write θ̂λ , n , d , arg min θ 1 n ‖yn −Xnθ‖22 + λ ‖θ‖ 2 2 . In this subsection , under an assumption , we show that optimal regularization ( i.e. , pick λ that minimizes the generalization risk of θ̂λ , n , d ) results in a monotone generalization risk curve—in other words , with optimal regularization , more data always reduces the generalization risk . The assump- tion is that ‖Πiθ∗‖2 = √ di d , i.e. , the squared norm of the projection of θ ∗ onto each eigenspace of the covariance matrix is proportional to the dimension of that eigenspace . ( Nakkiran et al. , 2021 ) showed by numerical results that optimal regularization can mitigate double descent for anisotropic data distribution . We give a partial theoretical proof of their observed phenomenon . To ease the notation , we use γi , limn/di rather than zi , lim di/n in Theorem 4 because a larger γ reflects a relatively larger n ( in the limit ) . Theorem 4 shows that with the optimal regularization , the limiting risk is an increasing function of γ1 , . . . , γm . Theorem 4 ( Optimal regularization ) . If ‖Πiθ∗‖2 = √ di d , ( 18 ) then there exists a function g ( γ1 , . . . , γm ) such that g ( γ1 , . . . , γm ) is increasing in every γi and lim n , di→∞ n/di→γi inf λ > 0 EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ = g ( γ1 , . . . , γm ) . 4 CONCLUSION We studied the generalization risk ( test error ) versus the number of training samples in ridgeless regression . Under the assumption that the data distribution is Gaussian and the spectrum distribution of its covariance matrix converges to a discrete distribution , we obtained the exact formulae for the limiting bias and variance terms using the random matrix theory when the dimension and the number of training samples go to infinity in a proportional manner . Using these formulae , we proved the sample-wise multiple descent phenomenon of the generalization risk curve.Moreover , we theoretically showed that the ridge estimator with optimal regularization can result in a monotone generalization risk curve and thereby eliminate multiple descent under some assumptions . REFERENCES Madhu S Advani , Andrew M Saxe , and Haim Sompolinsky . High-dimensional dynamics of gener- alization error in neural networks . Neural Networks , 132:428–446 , 2020 . Zhi-Dong Bai and Yong-Qua Yin . Limit of the smallest eigenvalue of a large dimensional sample covariance matrix . In Advances In Statistics , pp . 108–127 . World Scientific , 2008 . Zhidong Bai and Jack W Silverstein . Spectral analysis of large dimensional random matrices , volume 20 . Springer , 2010 . Peter L Bartlett , Philip M Long , Gábor Lugosi , and Alexander Tsigler . Benign overfitting in linear regression . Proceedings of the National Academy of Sciences , 117 ( 48 ) :30063–30070 , 2020 . Mikhail Belkin , Daniel Hsu , Siyuan Ma , and Soumik Mandal . Reconciling modern machinelearning practice and the classical bias–variance trade-off . Proceedings of the National Academy of Sciences , 116 ( 32 ) :15849–15854 , 2019 . Mikhail Belkin , Daniel Hsu , and Ji Xu . Two models of double descent for weak features . SIAM Journal on Mathematics of Data Science , 2 ( 4 ) :1167–1180 , 2020 . Siegfried Bös and Manfred Opper . Dynamics of batch training in a perceptron . Journal of Physics A : Mathematical and General , 31 ( 21 ) :4835 , 1998 . Lin Chen , Yifei Min , Mikhail Belkin , and Amin Karbasi . Multiple descent : Design your own generalization curve . arXiv preprint arXiv:2008.01036 , 2020a . Lin Chen , Yifei Min , Mingrui Zhang , and Amin Karbasi . More data can expand the generalization gap between adversarially robust and standard models . In International Conference on Machine Learning , pp . 1670–1680 . PMLR , 2020b . Donald L Cohn . Measure theory . Springer , 2013 . Edgar Dobriban and Stefan Wager . High-dimensional asymptotics of prediction : Ridge regression and classification . The Annals of Statistics , 46 ( 1 ) :247–279 , 2018 . Trevor Hastie , Andrea Montanari , Saharon Rosset , and Ryan J Tibshirani . Surprises in highdimensional ridgeless least squares interpolation . arXiv preprint arXiv:1903.08560 , 2019 . Shun ichi Amari , Jimmy Ba , Roger Baker Grosse , Xuechen Li , Atsushi Nitanda , Taiji Suzuki , Denny Wu , and Ji Xu . When does preconditioning help or hurt generalization ? In International Conference on Learning Representations , 2021 . URL https : //openreview.net/forum ? id= S724o4_WB3 . Anders Krogh and John A Hertz . Generalization in a linear perceptron in the presence of noise . Journal of Physics A : Mathematical and General , 25 ( 5 ) :1135 , 1992 . Yann Le Cun , Ido Kanter , and Sara A Solla . Eigenvalues of covariance matrices : Application to neural-network learning . Physical Review Letters , 66 ( 18 ) :2396 , 1991 . Tengyuan Liang , Alexander Rakhlin , and Xiyu Zhai . On the multiple descent of minimum-norm interpolants and restricted lower isometry of kernels . In Conference on Learning Theory , pp . 2683–2711 . PMLR , 2020 . F. Liese and K.J . Miescke . Statistical Decision Theory : Estimation , Testing , and Selection . Springer Series in Statistics . Springer New York , 2008 . ISBN 9780387731940 . Marco Loog , Tom Viering , Alexander Mey , Jesse H Krijthe , and David MJ Tax . A brief prehistory of double descent . Proceedings of the National Academy of Sciences , 117 ( 20 ) :10625–10626 , 2020 . Song Mei and Andrea Montanari . The generalization error of random features regression : Precise asymptotics and the double descent curve . Communications on Pure and Applied Mathematics , 2019 . Yifei Min , Lin Chen , and Amin Karbasi . The curious case of adversarially robust models : More data can help , double descend , or hurt generalization . In Conference on Uncertainty in Artificial Intelligence , 2021 . Preetum Nakkiran , Gal Kaplun , Yamini Bansal , Tristan Yang , Boaz Barak , and Ilya Sutskever . Deep double descent : Where bigger models and more data hurt . In International Conference on Learning Representations , 2020 . URL https : //openreview.net/forum ? id=B1g5sA4twr . Preetum Nakkiran , Prayaag Venkat , Sham M. Kakade , and Tengyu Ma . Optimal regularization can mitigate double descent . In International Conference on Learning Representations , 2021 . URL https : //openreview.net/forum ? id=7R7fAoUygoa . M Opper , W Kinzel , J Kleinz , and R Nehl . On the ability of the optimal perceptron to generalise . Journal of Physics A : Mathematical and General , 23 ( 11 ) : L581 , 1990 . Dominic Richards , Jaouad Mourtada , and Lorenzo Rosasco . Asymptotics of ridge ( less ) regression under general source condition . In International Conference on Artificial Intelligence and Statistics , pp . 3889–3897 . PMLR , 2021 . Walter Rudin . Principles of mathematical analysis . New York , NY : McGraw-Hill , Inc. , 3 edition , 1976 . Christos Thrampoulidis , Samet Oymak , and Babak Hassibi . Regularized linear regression : A precise analysis of the estimation error . Proceedings of Machine Learning Research , 40:1683–1709 , 2015 . Alexander Tsigler and Peter L Bartlett . Benign overfitting in ridge regression . arXiv preprint arXiv:2009.14286 , 2020 . F Vallet , J-G Cailton , and Ph Refregier . Linear and nonlinear extension of the pseudo-inverse solution for learning boolean functions . EPL ( Europhysics Letters ) , 9 ( 4 ) :315 , 1989 . Roman Vershynin . Introduction to the non-asymptotic analysis of random matrices . arXiv preprint arXiv:1011.3027 , 2010 . Roman Vershynin . High-dimensional probability : An introduction with applications in data science , volume 47 . Cambridge university press , 2018 . Timothy LH Watkin , Albrecht Rau , and Michael Biehl . The statistical mechanics of learning a rule . Reviews of Modern Physics , 65 ( 2 ) :499 , 1993 . Denny Wu and Ji Xu . On the optimal weighted ` 2 regularization in overparameterized linear regression . arXiv preprint arXiv:2006.05800 , 2020 . A EIGENDECOMPOSITION AND MORE NOTATION Write Σ = PΛP > , where P is an orthogonal matrix and Λ = diag ( λ1Id1 , . . . , λmIdm ) ∈ Rd×d is a diagonal matrix . Write λ− = mini∈ [ m ] λi and λ+ = maxi∈ [ m ] λi . We can generate x1 , . . . , xn from standard normal random vector zi ∼ N ( 0 , Id ) by setting xi = PΛ1/2zi . Therefore , if Z = ( z1 . . . zn ) ∈ Rd×n , we get X > = ( x1 . . . xn ) = PΛ 1/2 ( z1 . . . zn ) = PΛ 1/2Z . Take the transpose gives X = Z > Λ1/2P > . Note that every entry of Z ∈ Rd×n follows i.i.d . N ( 0 , 1 ) . Write Z in a row-partitioned form Z = Z > 1 ... Z > m , where Zi ∈ Rn×di . Write P in a column-partitioned form P = ( P1 . . . Pm ) , where Pi ∈ Rd×di . Recall that Πi ∈ Rd×d denotes the orthogonal projection to the eigenspace of λi . We have Πi = PiP > i . Define θ ′ , P > θ∗ and write it in a row-partitioned form θ′ = P > 1 θ ∗ ... P > mθ ∗ = θ ′ 1 ... θ′m , ( 19 ) where θ′i ∈ Rdi . Then ‖θ′i‖2 = ∥∥P > i θ∗∥∥2 = ∥∥PiP > i θ∗∥∥2 = ‖Πiθ∗‖2 . We summarize part of the notation above in Table 1 . B BIAS AND VARIANCE UNDER EIGENDECOMPOSITION Lemma 1 characterizes the smallest and largest eigenvalue of Z > Z d ( if n/d → γ < 1 ) and ZZ > n ( if n/d→ γ > 1 ) . Recall that we study the asymptotic regime di/n→ zi . Therefore γ = 1∑ j∈ [ m ] zj . Lemma 1 ( ( Bai & Yin , 2008 , Theorem 2 ) ) . Let Z ∈ Rd×n be a random matrix whose entries are i.i.d . N ( 0 , 1 ) random variables . As n , d→ +∞ , n/d→ γ ∈ ( 0 , 1 ) , we have limλmin ( Z > Z d ) = ( 1−√γ ) 2 , limλmax ( Z > Z d ) = ( 1 + √ γ ) 2 almost surely . If γ ∈ ( 1 , ∞ ) , as n , d→ +∞ , n/d→ γ , we have limλmin ( ZZ > n ) = ( 1− √ 1/γ ) 2 , limλmax ( ZZ > n ) = ( 1 + √ 1/γ ) 2 almost surely . Lemma 2 ( Corollary 5.35 ( Vershynin , 2010 ) ) . Let A be an N × n matrix whose entries are independent standard normal random variables . Then for every t ≥ 0 , with probability at least 1− 2 exp ( −t2/2 ) one has √ N − √ n− t ≤ smin ( A ) ≤ smax ( A ) ≤ √ N + √ n+ t , where smin ( A ) and smax ( A ) are the smallest and largest singular value of A. Lemma 3 . Let Z ∈ Rd×n be a random matrix whose entries are i.i.d . N ( 0 , 1 ) random variables , where d = d ( n ) satisfies limn→∞ nd ( n ) = γ . There exists universal positive constants C1 , C2 , N such that for all n > N , we have 0 < C1 < 1 n s2min ( Z ) ≤ 1 n s2max ( Z ) < C2 . Proof . Since d ( n ) n , with loss of generality , we assume n/d → γ ∈ ( 0 , 1 ) . Take t = c1 √ n in Lemma 2 , where c1 = 12 ( 1√ γ − 1 ) > 0 . With probability at least 1− 2e−c21n/2 , we have √ d− √ n− c1 √ n ≤ smin ( Z ) ≤ smax ( Z ) ≤ √ d+ √ n+ c1 √ n . Therefore , we deduce ( √ d n − 1− c1 ) 2 ≤ 1 n s2min ( Z ) ≤ 1 n s2max ( Z ) ≤ ( √ d n + 1 + c1 ) 2 . Define C1 = 18 ( 1√ γ − 1 ) 2 > 0 and C2 = ( 3√ γ + 1 ) 2 . Then there exists a universal constant N1 such that for all n > N1 , with probability at least 1− 2e−c 2 1n/2 , we have 0 < C1 < 1 n s2min ( Z ) ≤ 1 n s2max ( Z ) < C2 . Define event En = { C1 < 1 ns 2 min ( Z ) ≤ 1ns 2 max ( Z ) < C2 } c . Then we have Pr { En } ≤ 2e−c 2 1n/2 . Since ∑ n≥1 Pr { En } ≤ ∑ n≥1 2e −c21n/2 < ∞ , then the probability that infinitely many of En occur is 0 , i.e. , Pr { lim sup n En } = 0 . Therefore , there exists a universal constant N2 such that for all n > N2 , En does not happen , in other words , 0 < C1 < 1 n s2min ( Z ) ≤ 1 n s2max ( Z ) < C2 holds . Lemma 4 . Let Z ∈ Rd×n be a random matrix whose entries are i.i.d . N ( 0 , 1 ) random variables , and let p be a fixed positive integer which is viewed as a constant and hidden in .. If n d , we have E tr ( ZZ > ) n2 , E tr ( ZZ > ) 2 n3 , and E ‖Z‖p2 . np/2 . Proof . We have E tr ( ZZ > ) = E ‖Z‖2F = ∑ i∈ [ d ] , j∈ [ n ] Ez2ij = nd n2 . Write Z = z > 1 ... z > d , where zi ∈ Rn and zi ∼ N ( 0 , In ) . We have E ( z > i zi ) 2 = E ‖zi‖42 = n ( n + 2 ) . For i 6= j , we deduce E ( z > i zj ) 2 = E ( ‖zi‖2 ‖zj‖2 u > v ) 2 where u , v ∼ Unif ( Sn−1 ) and ‖zi‖2 , ‖zj‖2 , u , v are independent . Then we get E ( ‖zi‖ ‖zj‖ s > i sj ) 2 = E ‖zi‖22 ‖zj‖ 2 2 ( s > i sj ) 2 = n2Eu21 = n2 · 1 n = n . As a result , we have E tr ( ZZ > ) 2 = E ∥∥ZZ > ∥∥2 F = ∑ i , j∈ [ d ] E ( z > i zj ) 2 = dn ( n+ 2 ) + ( d2 − d ) n n3 . By ( Vershynin , 2018 ) , there exists a universal constant C > 0 such that for any t > 0 , P { ‖Z‖2 > C ( √ n+ √ d+ t ) } < 2e−t 2 . Define K = C ( √ n+ √ d ) . Then we have P { ‖Z‖2 > K + t } < 2e −t2/C2 . ( 20 ) Recall Γ ( z ) = ∫∞ 0 xz−1e−xdx . Setting t = C √ u in the equation below yields∫ ∞ 0 e−t 2/C2tp−1dt . ∫ ∞ 0 e−uu p 2−1du = Γ ( p 2 ) 1 . Then we can bound the following integral∫ ∞ K P { ‖Z‖2 ≥ t } pt p−1dt = ∫ ∞ 0 P { ‖Z‖2 ≥ K + t } p ( t+K ) p−1 dt . ∫ ∞ 0 e−t 2/C2 ( t+K ) p−1 dt . ∫ ∞ 0 e−t 2/C2 ( tp−1 +Kp−1 ) dt = ∫ ∞ 0 e−t 2/C2tp−1dt+Kp−1 ∫ ∞ 0 e−t 2/C2dt .n p−1 2 , where the first inequality is because of Equation ( 20 ) . We are in a position to bound E ‖Z‖p2 : E ‖Z‖p2 = ∫ ∞ 0 P { ‖Z‖p2 ≥ u } du = ∫ ∞ 0 P { ‖Z‖2 ≥ t } pt p−1dt = ∫ K 0 P { ‖Z‖2 ≥ t } pt p−1dt+ ∫ ∞ K P { ‖Z‖2 ≥ t } pt p−1dt .np/2 + n ( p−1 ) /2 .np/2 , where the first inequality is because∫ K 0 P { ‖Z‖2 ≥ t } pt p−1dt ≤ ∫ K 0 ptp−1dt = Kp . np/2 . Lemma 5 . The following equation for the bias term Bλ , d , n ( defined in Equation ( 3 ) ) holds Bλ , d , n =E [ ‖Λ1/2 ( Id − Λ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2 ) θ′‖22 ] ( 21 ) =E [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] . ( 22 ) Moreover , we have |Bλ , d , n| . ‖θ∗‖22 and limλ→0+ Bλ , d , n = B0 , d , n . For all sufficiently large n and d such that n/d → γ ∈ ( 0 , 1 ) , we have 0 ≤ ddλBλ , d , n . ‖θ ∗‖22 . Therefore , { Bλ , d , n } is uniformly bounded and uniformly equicontinuous with respect to λ ∈ ( 0 , ∞ ) . Proof . Introduce the shorthand notation M = Λ1/2ZZ > Λ1/2 ∈ Rd×d , A = Id + 1nλM ∈ R d×d , N = nλIn + Z > ΛZ ∈ Rn×n , and Q = Id − Λ1/2ZN−1Z > Λ1/2 ∈ Rd×d . Because X > ( nλIn +XX > ) −1X = PΛ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2P > , we have Bλ , d , n =E [ ‖ ( Id − PΛ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2P > ) θ∗‖2PΛP > ] =E [ ‖Λ1/2 ( Id − Λ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2 ) θ′‖22 ] =E [ ‖Λ1/2Qθ′‖22 ] . Using the Sherman–Morrison-Woodbury formula yields N−1 = 1 nλ In − 1 ( nλ ) 2Z > Λ1/2 ( I + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 Λ1/2Z = 1 nλ ( In − Z > Λ1/2 ( nλId + Λ 1/2ZZ > Λ1/2 ) −1 Λ1/2Z ) = 1 nλ ( In − Z > Λ1/2 ( nλId +M ) −1 Λ1/2Z ) . ( 23 ) It follows that Q =Id − Λ1/2ZN−1Z > Λ1/2 =Id − 1 nλ Λ1/2Z ( In − Z > Λ1/2 ( nλId +M ) −1 Λ1/2Z ) Z > Λ1/2 =Id − M nλ ( Id − ( nλId +M ) −1M ) =Id − M nλ ( Id − ( nλId +M ) −1 ( nλId +M − nλId ) ) =Id −M ( nλId +M ) −1 = ( Id + 1 nλ M ) −1 =A−1 . Therefore , we deduce Bλ , d , n = E [ ‖Λ1/2 ( Id + 1 nλ M ) −1 θ′‖22 ] = E [ ‖Λ1/2A−1θ′‖22 ] . Because ∥∥Λ1/2∥∥ 2 . 1 and ∥∥∥ ( Id + 1nλΛ1/2ZZ > Λ1/2 ) −1∥∥∥ 2 ≤ 1 , we have ‖Λ1/2A−1θ′‖22 . ‖θ′‖ 2 2 = ‖θ ∗‖22 . Therefore |Bλ , d , n| . ‖θ∗‖22 . Moreover , by the dominated convergence theorem , lim λ→0+ Bλ , d , n = B0 , d , n . We compute the derivative of A−1 : dA−1 dλ = −A−1 dA dλ A−1 = MA−2 nλ2 . The matrix Mn = Λ1/2ZZ > Λ1/2 n ∈ R d×d is positive semidefinite and its d − n smallest eigenvalues are zeros . Its non-zero eigenvalues are the same as the non-zero eigenvalues of Z > ΛZ n . Because all eigenvalues of Z > ΛZ n are positive almost surely , the spectrum of M n consists of d− n zeros and the spectrum of Z > ΛZ n . We study the range of the spectrum of Z > ΛZ n . Because λ− Z > Z n 4 Z > ΛZ n 4 λ+ Z > Z n , we deduce λmin ( Z > ΛZ n ) ≥ λ−λmin ( Z > Z n ) → λ− ( 1− √ 1/γ ) 2 ( 24 ) λmax ( Z > ΛZ n ) ≤ λ+λmax ( Z > Z n ) → λ+ ( 1 + √ 1/γ ) 2 . ( 25 ) Define L1 = λ−λmin ( Z > Z n ) and L2 = λ+λmax ( Z > Z n ) . We get limn , d→+∞ n/d→γ < 1 L1 = λ− ( 1− √ 1/γ ) 2 , limn , d→+∞ n/d→γ < 1 L2 = λ+ ( 1 + √ 1/γ ) 2 and spec ( Z > ΛZ n ) ⊆ [ L1 , L2 ] . We bound ∥∥MA−3∥∥ 2 ∥∥MA−3∥∥ 2 =n ∥∥∥∥∥Mn ( Id + M nλ ) −3∥∥∥∥∥ 2 =n max s∈spec ( Mn ) s ( 1 + s/λ ) 3 =n max s∈ { 0 } ∪spec ( Z > ΛZ n . ) s ( 1 + s/λ ) 3 =n max s∈spec ( Z > ΛZ n . ) s ( 1 + s/λ ) 3 ≤n max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 . We compute ddλ‖Λ 1/2A−1θ′‖22 : d dλ ‖Λ1/2A−1θ′‖22 = 1 nλ2 θ′ > ( A−1ΛMA−2 +MA−2ΛA−1 ) θ′ = 1 nλ2 ( A−1θ′ ) > ( ΛMA−1 +MA−1Λ ) ( A−1θ′ ) Next , we bound ∣∣ d dλ‖Λ 1/2A−1θ′‖22 ∣∣ : ∣∣∣∣ ddλBλ , d , n ∣∣∣∣ ≤ 1 nλ2 ∥∥MA−2ΛA−1 +A−1ΛMA−2∥∥ 2 ‖θ′‖22 ≤ 2 nλ2 ∥∥MA−2ΛA−1∥∥ 2 ‖θ′‖22 = 2 nλ2 ∥∥MA−3AΛA−1∥∥ 2 ‖θ′‖22 ≤ 2 nλ2 ∥∥MA−3∥∥ 2 ∥∥AΛA−1∥∥ 2 ‖θ′‖22 . 1 λ2 max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 ‖θ ′‖22 , where the last inequality is because ∥∥AΛA−1∥∥ 2 = ‖Λ‖2 ≤ λ+ . 1 . Define f ( s ) = s ( 1+s/λ ) 3 . Because f ′ ( s ) = λ 3 ( λ−2s ) ( λ+s ) 4 , the function f is increasing on [ 0 , λ/2 ] and decreasing on [ λ/2 , +∞ ) . If λ ≤ 2L1 , we have max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 = L1 ( 1 + L1/λ ) 3 . It follows that 1 λ2 · L1 ( 1 + L1/λ ) 3 = L1λ ( λ+ L1 ) 3 ≤ max λ∈ [ 0,2L1 ] L1λ ( λ+ L1 ) 3 . 1 L1 . If λ ≥ 2L2 , we get 1 λ2 max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 = 1 λ2 · L2 ( 1 + L2/λ ) 3 ≤ max λ∈ [ 2L2 , ∞ ) L2λ ( λ+ L2 ) 3 . 1 L2 ≤ 1 L1 . If 2L1 < λ < 2L2 , we obtain 1 λ2 max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 . 1 λ . 1 L1 . In all three cases , we show that 1λ2 maxs∈ [ L1 , L2 ] s ( 1+s/λ ) 3 . 1L1 . It follows that∣∣∣∣ ddλ‖Λ1/2A−1θ′‖22 ∣∣∣∣ . 1L1 ‖θ′‖22 = ‖θ ′‖22 λ−λmin ( Z > Z n ) ‖θ′‖22 λmin ( Z > Z n ) . By Lemma 3 , there exists a universal constant n0 such that for all n > n0 , one has 1 λmin ( Z > Z n ) . 1 . Thus we conclude that ∣∣∣∣ ddλ‖Λ1/2A−1θ′‖22 ∣∣∣∣ . ‖θ′‖22 . We can exchange differentiation and expectation and get d dλ Bλ , d , n = E [ d dλ ‖Λ1/2A−1θ′‖22 ] and ∣∣∣∣ ddλBλ , d , n ∣∣∣∣ = E [ ∣∣∣∣ ddλ‖Λ1/2A−1θ′‖22 ∣∣∣∣ ] . ‖θ′‖22 . Lemma 6 . The following equation for the variance term holds Vλ , d , n =σ 2E‖Λ1/2 ( λnId + Λ 1/2ZZ > Λ1/2 ) −1 Λ1/2Z‖22 =σ2E‖ΛZ ( λnIn + Z > ΛZ ) −1 ‖22 . Moreover , for all sufficiently large n and d such that n/d → γ 6= 1 , we have limλ→0+ Vλ , d , n = V0 , d , n , |Vλ , d , n| . 1 and ∣∣ d dλVλ , d , n ∣∣ . 1 . Therefore , { Vλ , d , n } is uniformly bounded and uniformly equicontinuous with respect to λ ∈ ( 0 , ∞ ) . Proof . As in the proof of Lemma 5 , defineM = Λ1/2ZZ > Λ1/2 ∈ Rd×d andN = nλIn+Z > ΛZ ∈ Rn×n . Recalling Σ = PΛP > and X = Z > Λ1/2P > , we have Vλ , d , n =σ 2E tr [ XΣX > ( nλIn +XX > ) −2 ] =σ2E tr [ Z > Λ2ZN−2 ] =σ2E tr [ N−1Z > Λ2ZN−1 ] =σ2E ∥∥ΛZN−1∥∥2 F . Recalling Equation ( 23 ) yields ΛZN−1 = 1 nλ ΛZ ( In − Z > Λ1/2 ( nλId +M ) −1 Λ1/2Z ) = 1 nλ Λ1/2 ( In −M ( nλId +M ) −1 ) Λ1/2Z =Λ1/2 ( nλId +M ) −1 Λ1/2Z . Define R = Λ1/2Z ∈ Rd×n . We get ( nλId +M ) −1 Λ1/2Z = ( nλId +RR > ) −1R . Notice that if 0 < a < b , then aId +RR > 4 bId +RR > . We deduce ( bId +RR > ) 2 − ( aId +RR > ) 2 = ( b2 − a2 ) Id + 2 ( b− a ) RR > < 0 . Thus ( bId +RR > ) 2 < ( aId +RR > ) 2 , which implies ( bId +RR > ) −2 4 ( aId +RR > ) −2 . We get R > ( bId +RR > ) −2R 4 R > ( aId +RR > ) −2R , tr ( R > ( bId +RR > ) −2R ) ≤ tr ( R > ( aId +RR > ) −2R ) Let λ0 ( · ) denote the smallest non-zero eigenvalue of a positive semidefinite matrix . We bound the Frobenius norm ∥∥∥ ( nλId +M ) −1 Λ1/2Z∥∥∥2 F = tr ( R > ( nλId +RR > ) −1R ) ≤ tr ( lim λ→0+ R > ( nλId +RR > ) −2R ) = tr ( R > R ) + = tr ( Z > ΛZ ) + . tr ( Z > Z ) + . It follows that∥∥ΛZN−1∥∥2 F = ∥∥∥Λ1/2 ( nλId +M ) −1 Λ1/2Z∥∥∥2 F . ∥∥∥ ( nλId +M ) −1 Λ1/2Z∥∥∥2 F . tr ( Z > Z ) + = tr ( ZZ > ) + . If n/d → γ < 1 , the matrix Z > Z is full-rank almost surely . Then , using the formula for the mean of inverse Wishart distribution , we have E tr ( Z > Z ) + = trE ( Z > Z ) −1 = tr ( In d−n−1 ) 1 . If n/d → γ > 1 , the matrix ZZ > is full-rank almost surely . Similarly , we have E tr ( ZZ > ) + = trE ( ZZ > ) −1 1 . By the dominated convergence theorem , we have limλ→0+ Vλ , d , n = V0 , d , n . Moreover , Vλ , d , n . E ∥∥ΛZN−1∥∥2 F . 1 . Next we bound ddλV ( θ̂ ) . Because dN−1 dλ = −N −1 dN dλN −1 = −nN−2 , we deduce d dλ ∥∥ΛZN−1∥∥2 2 = d dλ tr ( N−1Z > Λ2ZN−1 ) = −2n tr ( Z > Λ2ZN−3 ) ≤ 0 . On the other hand , we have tr ( Z > Λ2ZN−3 ) = tr ( N−3/2Z > Λ2ZN−3/2 ) . tr ( N−3/2Z > ΛZN−3/2 ) = tr ( Z > ΛZN−3 ) = ∑ s∈spec ( Z > ΛZ ) s ( λn+ s ) 3 . Because the number of non-zero eigenvalues of Z > ΛZ equals rank ( Z > ΛZ ) = n ∧ d n , we get∣∣∣∣ ddλ ∥∥ΛZN−1∥∥22 ∣∣∣∣ n tr ( Z > Λ2ZN−3 ) . n2 max s∈spec ( Z > ΛZ ) s ( λn+ s ) 3 = max s∈spec ( Z > ΛZ n ) \ { 0 } s ( λ+ s ) 3 . If γ < 1 , the matrix Z > ΛZ n is full-rank almost surely . By Equation ( 24 ) and Equation ( 25 ) in the proof of Lemma 5 , there exists universal positive constants C1 and C2 such that spec ( Z > ΛZ n ) ⊆ [ C1 , C2 ] for all sufficiently large n and d such that n/d→ γ < 1 . If γ > 1 , the non-zero eigenvalues of Z > ΛZ n and M n are the same . The matrix M n is full-rank almost surely . Thus spec ( Z > ΛZ n ) \ { 0 } = spec ( M n ) . Because y > Λ−1y . y > y , λmin ( M n ) = min x6=0 x > Λ 1/2ZZ > Λ1/2 n x x > x = min y 6=0 y > ZZ > n y y > Λ−1y & min y 6=0 y > ZZ > n y y > y = λmin ( ZZ > n ) . Similarly , we get λmax ( M n ) . λmax ( ZZ > n ) . Therefore , there exists universal positive constants C1 and C2 such that spec ( Z > ΛZ n ) \ { 0 } ⊆ [ C1λmin ( Z > Z n ) , C2λmax ( Z > Z n ) ] . Thus in both cases , we have shown that there exists universal positive constants C1 and C2 such that spec ( Z > ΛZ n ) \ { 0 } ⊆ [ C1λmin ( Z > Z n ) , C2λmax ( Z > Z n ) ] . Define L1 = C1λmin ( Z > Z n ) and L2 = C2λmax ( Z > Z n ) . As a result , we get∣∣∣∣ ddλ ∥∥ΛZN−1∥∥22 ∣∣∣∣ . maxs∈ [ L1 , L2 ] s ( λ+ s ) 3 . Define f ( s ) = s ( λ+s ) 3 . Because f ′ ( s ) = λ−2s ( λ+s ) 4 , the function f is increasing on [ 0 , λ/2 ] and decreasing on [ λ/2 , +∞ ) . If λ ≥ 2L2 or λ ≤ 2L1 , we get max s∈ [ L1 , L2 ] s ( λ+ s ) 3 ≤ L1 ( λ+ L1 ) 3 ∨ L2 ( λ+ L2 ) 3 ≤ 1 L21 . If 2L1 < λ < 2L2 , we get max s∈ [ L1 , L2 ] s ( λ+ s ) 3 . 1 λ2 . 1 L21 . As a result , for all sufficiently large n , we have∣∣∣∣ ddλ ∥∥ΛZN−1∥∥22 ∣∣∣∣ = maxs∈ [ L1 , L2 ] s ( λ+ s ) 3 . 1L21 . 1λ2min ( Z > Zn ) . 1 , where the final inequality is because of Lemma 3 . We can exchange the expectation and differentiation and obtain d dλ Vλ , d , n = σ 2E d dλ ∥∥ΛZN−1∥∥2 2 and ∣∣∣∣ ddλVλ , d , n ∣∣∣∣ ≤ σ2E ∣∣∣∣ ddλ ∥∥ΛZN−1∥∥22 ∣∣∣∣ . 1 . C LEMMAS ON STIELTJES TRANSFORM Definition 3 ( Stieltjes transform ) . The Stieltjes transform of a distribution with cumulative distribution function F is defined by sF ( z ) = ∫ 1 λ− z dF ( λ ) ( z ∈ H , { z ∈ C | =z > 0 } ) . Lemma 7 ( Theorem 4.3 ( Bai & Silverstein , 2010 ) ) . Suppose that the entries of Xn ∈ Cn×p are complex random variables that are independent for each n and identically distributed for all n and satisfy E [ |x11 − Ex11|2 ] = 1 . Also , assume that Tn = diag ( τ1 , . . . , τp ) , τi is real , and the empirical distribution function of { τ1 , . . . , τp } converges almost surely to a probability distribution function H as n → ∞ . The entries of both Xn and Tn may depend on n , which is suppressed for brevity . Set Bn = An + 1nXnTnX ∗ n , where X ∗ n is the conjugate transpose of Xn , An is Hermitian , n× n satisfying FAn → FA almost surely , where FA is a distribution function ( possibly defective ) on the real line . Assume also that Xn , Tn , and An are independent . When p = p ( n ) with p/n → y > 0 as n → ∞ , then , almost surely , FBn , the empirical spectral distribution of the eigenvalues of Bn , converges vaguely , as n → ∞ , to a ( nonrandom ) distribution function F , where for any z ∈ C+ = { z ∈ C | =z > 0 } , its Stieltjes transform s = s ( z ) is the unique solution in C+ to the equation s = sA ( z − y ∫ τdH ( τ ) 1 + τs ) , where sA is the Stieltjes transform of FA . Lemma 8 . If the functions fα , gα : I → R satisfy fα ( x ) − gα ( x ) → 0 uniformly as α→ +∞ , then limα→+∞ ( infx∈I f ( x ) − infx∈I g ( x ) ) = 0 . Proof . Because fα ( x ) − gα ( x ) → 0 uniformly as α→ +∞ , we have for ∀ > 0 , there exists N ( ) such that for ∀α > N ( ) and ∀x ∈ I , it holds that |fα ( x ) − gα ( x ) | < . Therefore , we get gα ( x ) − < fα ( x ) < gα ( x ) + . Thus we obtain inf x∈I fα ( x ) ≤ fα ( x ) < gα ( x ) + inf x∈I gα ( x ) − ≤ gα ( x ) − < fα ( x ) , which in turn implies inf x∈I fα ( x ) ≤ inf x∈I gα ( x ) + inf x∈I gα ( x ) − ≤ inf x∈I fα ( x ) . It follows that |infx∈I fα ( x ) − infx∈I gα ( x ) | ≤ . In other words , we proved lim α→+∞ ( inf x∈I f ( x ) − inf x∈I g ( x ) ) = 0 . Lemma 9 . Define N = λnIn + Z > ΛZ . Then we have lim n , di→+∞ di/n→zi tr ( N−1 ) = d dλ inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) , ( 26 ) lim n , di→+∞ di/n→zi 1 n log det N n = inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . ( 27 ) Proof . Proof of Equation ( 26 ) . We apply Lemma 7 with An = 0n×n , Xn = Z > ∈ Rn×d , Tn = Λ , and Bn = 1nZ > ΛZ . The distribution function of 0n×n converges to 1t≤0 and its Stieltjes transform is sA ( z ) = ∫ 1 λ−zd1λ≤0 = − 1 z . The empirical distribution function of { λ1 , . . . , λ1︸ ︷︷ ︸ d1 , . . . , λm . . . , λm︸ ︷︷ ︸ dm } is Hn , di ( t ) = ∑ i∈ [ m ] di d 1t≤λi . Recall di/n → zi . Thus di/d → zi/K , where d/n → y = ∑ j∈ [ m ] zj . The empirical distribution function converges to H ( t ) = ∑ i∈ [ m ] zi y 1t≤λi . Then the empirical spectral distribution of the eigenvalues of 1 nZ > ΛZ converges vaguely to a nonrandom distribution function F and its Stieltjes transform is s = s ( z ) = lim n , di→+∞ di/n=zi 1 n tr ( 1 n Z > ΛZ − zIn ) −1 = lim n , di→+∞ di/n=zi tr ( Z > ΛZ − znIn ) −1 ( this is because of ( Bai & Silverstein , 2010 , Theorem B.9 ) ) . By Lemma 7 , s ( z ) is the unique solution in C+ to the equation s ( z ) = sA ( z − y ∫ τdH ( τ ) 1 + τs ) = − 1 z − ∑ i∈ [ m ] λizi 1+λis ( z ) , which gives s ( z ) z − ∑ i∈ [ m ] λizi 1 + λis ( z ) = −1 . We want to prove Equation ( 26 ) first . The lefthand side of Equation ( 26 ) equals lim n , di→+∞ di/n=zi tr ( λnIn + Z > ΛZ ) −1 = s ( −λ ) . Because the matrix 1nZ > ΛZ is positive semidefinite and thereby all of its eigenvalues are nonnegative , its limiting spectral distribution is supported on [ 0 , ∞ ) . The Stieltjes transform s ( z ) of the limiting spectral distribution can be continuously extended to ( −∞ , 0 ) . Therefore , for ∀λ > 0 , s ( −λ ) is the unique solution to the following equation s ( −λ ) ( λ+ m∑ i=1 λizi 1 + λis ( −λ ) ) = 1 . ( 28 ) We will verify that d dλ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) satisfies Equation ( 28 ) . Take a minimizer ρ∗ of Equation ( 5 ) . Using the envelope theorem yields d dλ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = 1 λ+ ∑m j=1 λjρ ∗ j . ( 29 ) Plugging the righthand side of Equation ( 29 ) into Equation ( 28 ) , we get 1 λ+ ∑m j=1 λjρ ∗ j ( λ+ m∑ i=1 λizi 1 + λi · 1λ+∑mj=1 λjρ∗j ) = 1 . Rewriting the above equation yields m∑ i=1 λizi 1 + λi · 1λ+∑mj=1 λjρ∗j = m∑ i=1 λiρ ∗ i . It suffices to show that each summand on the lefthand side equals its counterpart on the righthand side λizi 1 + λi · 1λ+∑mj=1 λjρ∗j = λiρ ∗ i . We need to show zi ρ∗i = 1 + λi · 1 λ+ ∑m j=1 λjρ ∗ j , which is equivalent to Equation ( 6 ) and therefore holds . Hence we have proved Equation ( 26 ) . Proof of Equation ( 27 ) . We use α to denote the indices n , di . Define h ( λ ) = inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) . First , we want to show that limλ0→+∞ ( h ( λ0 ) − log λ0 ) = 0 . Define lλ0 ( ρ ) = log 1 + 1 λ0 m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) , q ( ρ ) = m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) . The Hessian matrix of q ( p ) is diag ( z1 ρ21 , . . . , zmρ2m ) , which is positive definite since zi , ρi > 0 . Therefore , q ( p ) is convex and the minimum of q ( ρ ) on Rm+ is attained at ρ = z , where z = ( z1 , . . . , zm ) > . The minimum is infρ∈Rm+ q ( ρ ) = q ( z ) = 0 . Because lim‖ρ‖2→+∞ lλ0 ( ρ ) = +∞ , there exists a universal constant K1 > ‖z‖2 > 0 such that lλ0 ( ρ ) > lλ0 ( z ) for all ‖ρ‖2 > K1 . Define E = { ρ ∈ Rm+ | ‖ρ‖2 ≤ K1 } . We have z ∈ E , infρ∈E lλ0 ( ρ ) = infρ∈Rm+ lλ0 ( ρ ) , and infρ∈E q ( ρ ) = infρ∈Rm+ q ( ρ ) = 0 . Therefore , we get h ( λ0 ) − log λ0 = inf ρ∈Rm+ lλ0 ( ρ ) = inf ρ∈E lλ0 ( ρ ) − inf ρ∈E q ( ρ ) . ( 30 ) On E , there exists a universal constant K2 > 0 such that ∑ j∈ [ m ] λjρj < K2 . Thus on E , we deduce 0 < lλ0 ( ρ ) − q ( ρ ) = log 1 + 1 λ0 m∑ j=1 λjρj < log ( 1 + K2 λ0 ) . The right-hand side log ( 1 + K2λ0 ) → 0 as λ0 → +∞ . Thus limλ0→+∞ ( lλ0 ( ρ ) − q ( ρ ) ) = 0 uniformly for ρ ∈ E. By Lemma 8 , we get lim λ0→+∞ ( inf ρ∈E lλ0 ( ρ ) − inf ρ∈E q ( ρ ) ) = 0 . Recalling Equation ( 30 ) yields lim λ0→+∞ ( h ( λ0 ) − log λ0 ) = 0 . ( 31 ) Define fα ( λ ) = 1n log det N n . Second , we want to show limα fα ( λ ) = h ( λ ) , where limα means limn , di→+∞ di/n=zi . We have fα ( λ ) − fα ( λ0 ) = ∫ λ λ0 f ′α ( x ) dx for ∀λ , λ0 > 0 . It follows that |fα ( λ ) − h ( λ ) | ≤ |fα ( λ ) − h ( λ ) + h ( λ0 ) − fα ( λ0 ) + fα ( λ0 ) − log λ0 + log λ0 − h ( λ0 ) | ≤ |fα ( λ ) − h ( λ ) + h ( λ0 ) − fα ( λ0 ) |+ |fα ( λ0 ) − log λ0|+ |log λ0 − h ( λ0 ) | = ∣∣∣∣∣ ∫ λ λ0 f ′α ( x ) dx− ( h ( λ ) − h ( λ0 ) ) ∣∣∣∣∣+ |fα ( λ0 ) − log λ0|+ |log λ0 − h ( λ0 ) | . Taking lim supα on both sides gives lim sup α |fα ( λ ) − h ( λ ) | ≤ lim sup α ∣∣∣∣∣ ∫ λ λ0 f ′α ( x ) dx− ( h ( λ ) − h ( λ0 ) ) ∣∣∣∣∣+lim supα |fα ( λ0 ) − log λ0|+|log λ0 − h ( λ0 ) | . ( 32 ) Recall f ′α ( λ ) = trN −1 and limα f ′α ( λ ) = h ′ ( λ ) ( this is exactly Equation ( 26 ) ) . Because∣∣trN−1∣∣ = trN−1 ≤ 1λ and ∫ λλ0 1xdx < +∞ , by the dominated convergence theorem , we have lim α ∫ λ λ0 f ′α ( x ) dx = ∫ λ λ0 h′ ( x ) dx = h ( λ ) − h ( λ0 ) . It follows that lim sup α ∣∣∣∣∣ ∫ λ λ0 f ′α ( x ) dx− ( h ( λ ) − h ( λ0 ) ) ∣∣∣∣∣ = limα ∣∣∣∣∣ ∫ λ λ0 f ′α ( x ) dx− ( h ( λ ) − h ( λ0 ) ) ∣∣∣∣∣ = 0 . ( 33 ) Since fα ( λ0 ) −log λ0 = 1 n log det ( λ0In + 1 n Z > ΛZ ) − 1 n log det ( λ0In ) = 1 n log det ( In + 1 nλ0 Z > ΛZ ) and the matrix 1nλ0Z > ΛZ is positive semidefinite , we have fα ( λ0 ) − log λ0 ≥ 0 . We have fα ( λ0 ) − log λ0 = 1 n log det ( In + 1 nλ0 Z > ΛZ ) ≤ 1 n log det ( In + λ+ nλ0 Z > Z ) ≤ log ( 1 + λ+ λ0 λmax ( Z > Z n ) ) ≤λ+ λ0 λmax ( Z > Z n ) . Then taking lim supα , we get lim sup α |fα ( λ0 ) − log λ0| = lim sup α ( fα ( λ0 ) − log λ0 ) ≤ λ+ λ0 lim sup α λmax ( Z > Z n ) . 1 λ0 , ( 34 ) where the last inequality is because lim supα λmax ( Z > Z n ) = ( 1 + √ γ ∨ 1γ ) 2 1 by Lemma 1 . Using Equation ( 32 ) , Equation ( 33 ) and Equation ( 34 ) gives lim sup α |fα ( λ ) − h ( λ ) | . 1 λ0 + |log λ0 − h ( λ0 ) | . Then taking limλ0→+∞ and recalling Equation ( 31 ) yields lim α |fα ( λ ) − h ( λ ) | = lim sup α |fα ( λ ) − h ( λ ) | = 0 . Therefore , we conclude limα fα ( λ ) = h ( λ ) . Lemma 10 . Define N = λnIn+Z > ΛZ = λnIn+ ∑ i∈ [ m ] λiZiZ > i . The following equation holds lim n , di→+∞ di/n→zi E [ ∂ ∂λi 1 n log det N n ] = ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) , ( 35 ) lim n , di→+∞ di/n→zi E [ ∂2 ∂λj∂λi 1 n log det N n ] = ∂2 ∂λj∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . ( 36 ) Proof . Proof of Equation ( 35 ) . We use α to denote the indices n , di and use limα to denote limn , di→+∞ di/n=zi . Define fα ( λi ) = E [ 1 n log det N n ] , f ′α ( λi ) = ∂ ∂λi E [ 1 n log det N n ] , and h ( λi ) = inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . We have∣∣∣∣ 1n log det Nn ∣∣∣∣ ≤ 1n log det ( λIn + λ+ Z > Z n ) = log λ+ 1 n log det ( In + λ+ nλ Z > Z ) . By Lemma 3 , there exists a universal constant C > 0 such that for all sufficiently large n , 1 n log det ( In + λ+ nλ Z > Z ) ≤ log ( 1 + C λ ) . Therefore , we get ∣∣∣∣ 1n log det Nn ∣∣∣∣ ≤ log ( λ+ C ) . By the dominated convergence theorem and Lemma 9 ( specifically , Equation ( 27 ) ) , we obtain lim α fα ( λi ) = h ( λi ) . ( 37 ) Because ∣∣∣∣ ∂∂λi 1n log det Nn ∣∣∣∣ = 1n tr ( Z > i N−1Zi ) ≤ 1λn2 tr ( Z > i Zi ) and E [ 1 λn2 tr ( Z > i Zi ) ] < +∞ , we can interchange the differentiation and the expectation and get f ′α ( λi ) = ∂ ∂λi E [ 1 n log det N n ] = E [ ∂ ∂λi 1 n log det N n ] . ( 38 ) Thus we deduce∣∣∣∣ ∂∂λiE [ 1 n log det N n ] ∣∣∣∣ = ∣∣∣∣E [ ∂∂λi 1n log det Nn ] ∣∣∣∣ ≤ E ∣∣∣∣ ∂∂λi 1n log det Nn ∣∣∣∣ ≤ E [ 1λn2 tr ( Z > i Zi ) ] . By Lemma 4 , E tr ( Z > i Zi ) n2 and therefore E [ 1 λn2 tr ( Z > i Zi ) ] . 1λ . The function sequence { f ′α } is uniformly bounded . Then we want to show that { f ′α } is uniformly equicontinuous by showing that { f ′′α } is uniformly bounded . Because∣∣∣∣ ∂2∂λ2i 1n log det Nn ∣∣∣∣ = 1n tr ( Z > i N−1Zi ) 2 ≤ 1nλ2 tr ( Z > i Zi n ) 2 and E [ 1 nλ2 tr ( Z > i Zi n ) 2 ] < +∞ , we can interchange the differentiation and the expectation and get ∂2 ∂λ2i E [ 1 n log det N n ] = ∂ ∂λi E [ ∂ ∂λi 1 n log det N n ] = E [ ∂2 ∂λ2i 1 n log det N n ] . Therefore , we deduce∣∣∣∣ ∂2∂λ2i E [ 1 n log det N n ] ∣∣∣∣ ≤ E ∣∣∣∣ ∂2∂λ2i 1n log det Nn ∣∣∣∣ ≤ 1nλ2E tr ( Z > i Zi n ) 2 . Again , by Lemma 4 , tr ( Z > i Zi n ) 2 n. It follows that 1nλ2E tr ( Z > i Zi n ) 2 . 1λ2 . Therefore { f ′ α } is uniformly equicontinuous . We want to show limα f ′α ( λi ) = h ′ ( λi ) by contradiction . If it is not true , there exists > 0 and a subsequence { f ′αk } such that ∣∣f ′αk ( λi ) − h′ ( λi ) ∣∣ ≥ . Let E = [ a , b ] 3 λi ( b > a > 0 ) be a closed interval that contains λi . The subsequence { f ′αk } is uniformly bounded and uniformly equicontinuous . By the Arzela-Ascoli theorem , there exists a subsequence { f ′αkj } that converges uniformly on λi ∈ E. Recall limα fα ( λi ) = h ( λi ) ( Equation ( 37 ) ) . Thus limj fαkj ( λi ) = h ( λi ) . By ( Rudin , 1976 , Theorem 7.17 ) , for λi ∈ E , we have lim j f ′αkj ( λi ) = h ′ ( λi ) . This is a contradiction . Hence , we have shown that limα f ′α ( λi ) = h ′ ( λi ) , which is exactly Equation ( 35 ) ( recall f ′α ( λi ) = ∂ ∂λi E [ 1 n log det N n ] = E [ ∂ ∂λi 1 n log det N n ] in Equation ( 38 ) ) . Proof of Equation ( 36 ) . Define gα ( λj ) = ∂∂λiE [ 1 n log det N n ] = E [ ∂ ∂λi 1 n log det N n ] . Then g′α ( λj ) = ∂2 ∂λj∂λi E [ 1 n log det N n ] = ∂∂λjE [ ∂ ∂λi 1 n log det N n ] . We have ∣∣∣∣ ∂2∂λj∂λi 1n log det Nn ∣∣∣∣ = 1 n tr ( ZiZ > i N −1ZjZ > j N −1 ) = 1 n tr ( Z > i N −1ZjZ > j N −1Zi ) = 1 n ∥∥Z > j N−1Zi∥∥2F ≤ 1 n ‖Zj‖22 ‖Zi‖ 2 2 ∥∥N−1∥∥2 F ≤ 1 λ2n2 ‖Zj‖22 ‖Zi‖ 2 2 . where the last inequality is because ∥∥N−1∥∥2 F ≤ ∥∥ 1 λnIn ∥∥2 F = 1λ2n . If i 6= j , by Lemma 4 , we have 1 λ2n2 E ‖Zj‖22 ‖Zi‖ 2 2 = 1 λ2n2 E ‖Zj‖22 · E ‖Zi‖ 2 2 . 1 λ2 . If i = j , by Lemma 4 , we have 1 λ2n2 E ‖Zi‖42 . 1 λ2n2 · n2 = 1 λ2 . As a result , we get ∣∣∣∣ ∂2∂λj∂λi 1n log det Nn ∣∣∣∣ . 1n · n2 · 1λ2n = 1λ2 . Thus we can interexchange ∂∂λj and expectation , and get g ′ α ( λj ) = E [ ∂2 ∂λj∂λi 1 n log det N n ] . Be- cause |g′α ( λj ) | ≤ E ∣∣∣ ∂2∂λj∂λi 1n log det Nn ∣∣∣ . 1λ2 , the function sequence { g′α } is uniformly bounded for λj . Define L = Z > j N −1Zi and W = Z > j N −1Zj . We have∣∣∣∣∣ ∂3∂λ2j∂λi 1n log det Nn ∣∣∣∣∣ = 2 n tr ( L > WL ) . 1 λn2 tr ( L > Z > j ZjL ) = 1 λn2 tr ( Z > i N −1 ( ZjZ > j ) 2N−1Zi ) . = 1 λn2 ∥∥ZjZ > j N−1Zi∥∥2F ≤ 1 λn2 ∥∥N−1∥∥2 F ∥∥ZjZ > j ∥∥22 ‖Zi‖22 ≤ 1 λ3n3 ∥∥ZjZ > j ∥∥22 ‖Zi‖22 = 1 λ3n3 ‖Zj‖42 ‖Zi‖ 2 2 , where the first inequality is becauseW 4 1λnZ > j Zj and the third inequality is becauseN −1 4 1λnIn and then ∥∥N−1∥∥2 F ≤ ∥∥ 1 λnIn ∥∥2 F ≤ 1λ2n . By Lemma 4 , we have E ‖Zj‖ 4 2 . n 2 and E ‖Zi‖22 . n. If i 6= j , then Zj and Zi are independent , and we deduce 1 λ3n3 E ‖Zj‖42 ‖Zi‖ 2 2 . 1 λ3 . If i = j , we have 1 λ3n3 E ‖Zi‖42 ‖Zi‖ 2 2 = 1 λ3n3 E ‖Zi‖62 . 1 λ3 . As a result , we deduce E [ ∂3 ∂λ2j∂λi 1 n log det N n ] = ∂∂λjE [ ∂2 ∂λj∂λi 1 n log det N n ] = g′′α ( λj ) . Moreover , we have |g′′α ( λj ) | ≤ E ∣∣∣∣∣ ∂3∂λ2j∂λi 1n log det Nn ∣∣∣∣∣ . 1λ3 . Therefore { g′α } is uniformly equicontinuous . Define w ( λj ) = ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . We want to show by contradiction that limα g′α ( λj ) = w ′ ( λj ) . Assume that it is not true . Then there exists > 0 and a subsequence { g′αk } such that ∣∣g′αk ( λj ) − w′ ( λj ) ∣∣ > . Since { g′αk } is uniformly bounded and uniformly equicontinuous , by the Arzela-Ascoli theorem , there is a subsequence { g′αkr } that converges uniformly on a closed intervalE containing λj . Equation ( 35 ) shows that limα gα ( λj ) = w ( λj ) . It follows that limr gαkr ( λj ) = w ( λj ) . By ( Rudin , 1976 , Theorem 7.17 ) , for λi ∈ E , we have lim r g′αkr ( λj ) = w ′ ( λj ) , which is a contradiction . Therefore , we have shown that limα g′α ( λj ) = w ′ ( λj ) , which is exactly Equation ( 36 ) . D PROOF OF THEOREM 1 D.1 PROOF OF ITEM 1 Define g ( ρ ) = log ( λ+ ∑m j=1 λjρj ) + ∑m j=1 ( ρj − zj ( log ρjzj + 1 ) ) . The function g ( ρ ) is continuously differentiable on Rm+ . The boundary of R+m is ∂Rm+ = { ρ ∈ Rm | ( ∀i ∈ [ m ] , ρi ≥ 0 ) ∧ ( ∃i ∈ [ m ] , ρi = 0 ) } . Because limRm+3ρ→ρ0∈∂Rm+ g ( ρ ) = limRm+3ρ→∞ g ( ρ ) = +∞ , there exists a minimizer ρ ∗ ∈ Rm+ of g ( ρ ) . Taking the derivative with respect to ρi gives ∂ ∂ρi log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = λi λ+ ∑m j=1 λjρj + 1− zi ρi . Setting it to zero gives Equation ( 6 ) . D.2 PROOF OF ITEM 2 Recall Equation ( 6 ) λi λ+ ∑m j=1 λjρ ∗ j + 1− zi ρ∗i = 0 , ∀i ∈ [ m ] . Rewriting the above equation gives ( zi − ρ∗i ) ( λ+ m∑ k=1 λkρ ∗ k ) = λiρ ∗ i , ∀i ∈ [ m ] . Rewriting it in the linear algebraic form yields ( z− ρ∗ ) ( λ+ λ > ρ∗ ) = λ ρ∗ . Applying ∂∂λ to both sides and using the implicit function theorem , we get ( z− ρ∗ ) ( ρ∗ > + λ > J ) − J ( λ+ λ > ρ∗ ) = diag ( λ ) J + diag ( ρ∗ ) . Arranging the above equation yields ( diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > ) J = ( z− ρ∗ ) ρ∗ > − diag ( ρ∗ ) . Define a = λ + λ > ρ∗ , A = diag ( λ ) + ( λ+ λ > ρ∗ ) Im = diag ( λ ) + aIm and B = diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > = A− ( z− ρ∗ ) λ > . The matrix determinant lemma gives det ( B ) = ( 1− λ > A−1 ( z− ρ∗ ) ) det ( A ) . Recall Equation ( 6 ) again and we have λi + a = zia ρ∗i . We have a− ∑ i∈ [ m ] λiρ ∗ i ( 1− ρ∗i /zi ) = λ+ ∑ i∈ [ m ] λiρ ∗ i − ∑ i∈ [ m ] λiρ ∗ i ( 1− ρ∗i /zi ) =λ+ ∑ i∈ [ m ] λi ( ρ∗i ) 2 zi > 0 . It follows that ∑ i∈ [ m ] λiρ ∗ i ( 1− ρ∗i /zi ) a < 1 . Then we compute λ > A−1 ( z− ρ∗ ) : λ > A−1 ( z− ρ∗ ) = ∑ i∈ [ m ] λi ( zi − ρ∗i ) λi + a = ∑ i∈ [ m ] λi ( zi − ρ∗i ) zia ρ∗i = ∑ i∈ [ m ] λiρ ∗ i ( 1− ρ∗i /zi ) a < 1 . Thus we get 1− λ > A−1 ( z− ρ∗ ) > 0 . Therefore , detB 6= 0 and the matrix B is invertible . D.3 PROOF OF ITEM 3 Lemma 11 . Define N = λnIn + Z > ΛZ , γ = ∑ i∈ [ m ] zi , r = ( r1 , . . . , rm ) , λ = ( λ1 , . . . , λm ) , and ϑ ( rt , r , λ ) = 2rt √ 1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t . For any Kt ≥ 2λ and Ku ≥ 2λ+ ( 2+ √ γ ) λ , we have lim n , di→+∞ di/n→zi trN−1 = lim n , di→+∞ di/n→zi E trN−1 = max 0≤rt≤Kt min 0≤ri≤Ku ϑ ( rt , r , λ ) = min 0≤ri≤Ku max 0≤rt≤Kt ϑ ( rt , r , λ ) = max rt≥0 min ri≥0 ϑ ( rt , r , λ ) = min ri≥0 max rt≥0 ϑ ( rt , r , λ ) . ( 39 ) If r∗ is a solution to the optimization problem in Equation ( 39 ) , then 1 + m∑ j=1 r∗2j = m∑ j=1 r∗j √ zj + λr ∗ t 2 , ( 40 ) r∗t r∗i√ 1 + ∑m j=1 r ∗2 j = r∗t √ zi − r∗i λi . ( 41 ) Moreover , we have ∂ ∂λi max rt≥0 min ri≥0 ϑ ( rt , r , λ ) = − r∗2i λ2i . Proof . Let g ∼ N ( 0 , In ) be a multivariate standard normal random vector . We have trN−1 =Egg > N−1g =Eg sup t∈Rn ( 2g > t− t > Nt ) =Eg sup t∈Rn ( 2g > t− t > Z > ΛZt− nλ ‖t‖22 ) =Eg sup t∈Rn inf u∈Rd ( 2g > t− 2u > ΛZt+ u > Λu− nλ ‖t‖22 ) =− 2Eg inf t∈Rn sup u∈Rd ( u > ΛZt− g > t− 1 2 u > Λu+ 1 2 nλ ‖t‖22 ) =− 2Eg inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) We view inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) ( 42 ) as the primal optimization ( PO ) problem in the convex Gaussian min-max theorem ( CGMT ) ( Thrampoulidis et al. , 2015 ) . The KKT conditions for Equation ( 42 ) give Z > u− g + nλt = 0 , Zt− Λ−1u = 0 . Solving the above equations gives t = N−1g , u = ΛZN−1g . With probability at least 1− 4 exp ( −cn ) ( c > 0 is a universal constant ) , we have ‖g‖2 ≤ 2 √ n and ‖Z‖ ≤ √ d+ 2 √ n ≤ ( 2 + √ γ ) √ n. Therefore , we get ‖t‖2 ≤ ∥∥N−1∥∥ ‖g‖2 ≤ 1λn · 2√n = 2λ√n , ‖u‖2 ≤ λ+ ‖Z‖ ‖t‖2 ≤ λ+ ( 2 + √ γ ) √ n · 2 λ √ n = 2λ+ ( 2 + √ γ ) λ . Write u = u1 ... um , where ui ∈ Rdi . For all Kt ≥ 2λ , Ku ≥ 2λ+ ( 2+√γ ) λ , the optimal solutions t∗ and u∗ to Equation ( 42 ) satisfy √ n ‖t∗‖2 ≤ Kt and ‖ui‖2 ≤ Ku for all i ∈ [ m ] with probability at least 1 − 4 exp ( −cn ) . Define St = { t ∈ Rn | √ n ‖t‖2 ≤ Kt } and Su = { u ∈ Rd | ‖ui‖ ≤ Ku , ∀i ∈ [ m ] } . We use α to denote the indices n , di and use limα to denote limn , di→+∞ di/n=zi . Define event Eα = { inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) = inf t∈St sup u∈Su ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) } . Then with probability at least 1 − 4 exp ( −cn ) , we have t∗ ∈ St and u∗ ∈ Su . Therefore the event Eα occurs with probability at least 1− 4 exp ( −cn ) , which yields P { Ecα } ≤ 4 exp ( −cn ) . Since ∑ n≥1 4 exp ( −cn ) < +∞ , by Borel-Cantelli lemma , we have P { lim sup α Ecα } = P { ( lim inf α Eα ) c } = 0 . Then with probability 1 , all but finitely many Eα occur . Then almost surely there exists n0 such that for all n > n0 , Eα occurs . The auxiliary optimization ( AO ) problem is inf t∈St sup u∈Su ( ‖t‖2 g > 1 u+ ‖u‖2 g > 2 t− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) = inf 0≤rt≤Kt sup 0≤ri≤Ku − ∥∥∥g −√∑i∈ [ m ] r2i g2∥∥∥ 2√ n rt + rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t = inf 0≤rt≤Kt sup 0≤ri≤Ku −√1 + ∑ i∈ [ m ] r2i ‖g3‖2√ n rt + rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t , where g1 ∼ N ( 0 , Id ) , g2 ∼ N ( 0 , In ) , and g3 ∼ N ( 0 , In ) . Taking n , di → +∞ with di/n→ zi constant , the strong law of large numbers gives√ 1 + ∑ i∈ [ m ] r2i ‖g3‖2√ n a.s.→ √ 1 + ∑ i∈ [ m ] r2i , ‖g1 , j‖2√ n = √ dj n ‖g1 , j‖2√ dj a.s.→ √zj . Define Xα ( rt , r ) = − √ 1 + ∑ i∈ [ m ] r2i ‖g3‖2√ n rt + rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t . It is a stochastic process on ( rt , r ) ∈ [ 0 , Kt ] × [ 0 , Ku ] m. We have lim α Xα ( rt , r ) = X ( rt , r ) : = −rt √ 1 + ∑ i∈ [ m ] r2i + rt ∑ i∈ [ m ] √ ziri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t almost surely . Since √ 1 + x2 is convex and increasing and the function ‖r‖2 is convex , thus √ 1 + ‖r‖22 is convex in r and then − √ 1 + ∑ i∈ [ m ] r 2 i ‖g3‖2√ n rt = − √ 1 + ‖r‖22 ‖g3‖2√ n rt is concave in r. Because − 12 ∑ i∈ [ m ] 1 λi r2i is concave in r and rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri is linear in r , we deduce that Xα ( rt , r ) is concave in r. By ( Liese & Miescke , 2008 , Lemma 7.75 ) , supr∈ [ 0 , Ku ] m |Xα ( rt , r ) −X ( rt , r ) | → 0 almost surely . Then for ∀ > 0 , there exists n0 ( ) , d0 , i ( ) , δ0 , i ( ) such that for all n > n0 ( ) , di > d0 , i ( ) , |di/n− zi| < δ0 , i ( ) and for all r ∈ [ 0 , Ku ] m , we have X ( rt , r ) − < Xα ( rt , r ) < X ( rt , r ) + . Thus we obtain X ( rt , r ) − < Xα ( rt , r ) ≤ sup r∈ [ 0 , Ku ] m Xα ( rt , r ) Xα ( rt , r ) < X ( rt , r ) + ≤ sup r∈ [ 0 , Ku ] m X ( rt , r ) + , which in turn implies sup r∈ [ 0 , Ku ] m X ( rt , r ) − ≤ sup r∈ [ 0 , Ku ] m Xα ( rt , r ) sup r∈ [ 0 , Ku ] m Xα ( rt , r ) ≤ sup r∈ [ 0 , Ku ] m X ( rt , r ) + . It follows that ∣∣∣supr∈ [ 0 , Ku ] m Xα ( rt , r ) − supr∈ [ 0 , Ku ] m X ( rt , r ) ∣∣∣ ≤ . In other words , we showed |Yα ( rt ) − Y ( rt ) | → 0 almost surely , where Y ( rt ) : = supr∈ [ 0 , Ku ] m Xα ( rt , r ) and Y ( rt ) : = supr∈ [ 0 , Ku ] m X ( rt , r ) . Because Xα ( rt , r ) is convex in rt , then Y ( rt ) = supr∈ [ 0 , Ku ] m Xα ( rt , r ) is convex in rt . By ( Liese & Miescke , 2008 , Lemma 7.75 ) again , suprt∈ [ 0 , Kt ] |Yα ( rt ) − Y ( rt ) | → 0 almost surely . A similar argument shows that∣∣∣∣ infrt∈ [ 0 , Kt ] Yα ( rt ) − infrt∈ [ 0 , Kt ] Y ( rt ) ∣∣∣∣ = ∣∣∣∣∣ infrt∈ [ 0 , Kt ] supr∈ [ 0 , Ku ] mXα ( rt , r ) − infrt∈ [ 0 , Kt ] supr∈ [ 0 , Ku ] mX ( rt , r ) ∣∣∣∣∣→ 0 almost surely . Therefore , we obtain inf t∈St sup u∈Su ( ‖t‖2 g > 1 u+ ‖u‖2 g > 2 t− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) = inf 0≤rt≤Kt sup 0≤ri≤Ku −√1 + ∑ i∈ [ m ] r2i ‖g3‖2√ n rt + rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t a.s.→ inf 0≤rt≤Kt sup 0≤ri≤Ku −rt√1 + ∑ i∈ [ m ] r2i + rt ∑ i∈ [ m ] √ ziri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t ( 43 ) = : µ . Define event Aα = { ∣∣∣∣ inft∈Rn supu∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) − µ ∣∣∣∣ > τ } , Bα = { ∣∣∣∣ inft∈St supu∈Su ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) − µ ∣∣∣∣ > τ } , Cα = { ∣∣∣∣ inft∈St supu∈Su ( ‖t‖2 g > 1 u+ ‖u‖2 g > 2 t− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) − µ ∣∣∣∣ > τ } . Recall Eα = { inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) = inf t∈St sup u∈Su ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) } . We have Aα ∩ Eα ⊆ Bα . Equation ( 43 ) gives limα P { Cα } = 0 for any τ > 0 because almost sure convergence implies convergence in probability . By the convex Gaussian min-max theorem ( Thrampoulidis et al. , 2015 ) , we have P { Bα } ≤ 2P { Cα } . It follows that P { Aα } ≤ P { Aα ∩ Eα } + P { Ecα } ≤ P { Bα } + P { Ecα } ≤ 2P { Cα } + P { Ecα } . Taking lim supα on both sides , because lim supα P { Bα } ≤ 2 lim supα P { Cα } = 0 , we get lim sup α P { Aα } ≤ lim sup α P { Ecα } ≤ P { lim sup α Ecα } = 0 , where the second inequality is because of the reverse Fatou ’ s lemma . Thus inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) P→ µ . Therefore , we deduce g > N−1g P→ −2 inf 0≤rt≤Kt sup 0≤ri≤Ku −rt√1 + ∑ i∈ [ m ] r2i + rt ∑ i∈ [ m ] √ ziri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t = sup 0≤rt≤Kt inf 0≤ri≤Ku 2rt√1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t = sup 0≤rt≤Kt inf 0≤ri≤Ku ϑ ( rt , r , λ ) . ( 44 ) Because ∣∣g > N−1g∣∣ ≤ 1λn ‖g‖22 and E 1λn ‖g‖22 = 1λ < ∞ , by the dominated convergence theorem for convergence in probability ( Cohn , 2013 , Proposition 3.1.6 ) , we get lim α trN−1 = lim α Eg [ g > N−1g ] = max 0≤rt≤Kt min 0≤ri≤Ku ϑ ( rt , r , λ ) . ( 45 ) Note that 2rt √ 1 + ∑ i∈ [ m ] r 2 i is convex in r , −2rt ∑ i∈ [ m ] √ ziri is linear in r , and ∑ i∈ [ m ] 1 λi r2i is strongly convex in r. Thus ϑ is strongly convex in r. Note that 2rt √ 1 + ∑ i∈ [ m ] r 2 i − 2rt ∑ i∈ [ m ] √ ziri is linear in rt and that −λr2t is strongly concave in rt . Thus ϑ is strongly concave in rt . Then ϑ has a unique saddle point ( r∗t , r ∗ ) on [ 0 , Kt ] × [ 0 , Ku ] m that satisfies max rt∈ [ 0 , Kt ] min r∈ [ 0 , Ku ] m ϑ ( rt , r ) = min r∈ [ 0 , Ku ] m max rt∈ [ 0 , Kt ] ϑ ( rt , r ) = ϑ ( r ∗ t , r ∗ ) , ( 46 ) where the first equality is due to Sion ’ s minimax theorem . Since ∣∣trN−1∣∣ ≤ 1λ , using the dominated convergence theorem and combining Equation ( 45 ) and Equation ( 46 ) yields lim α E trN−1 = max 0≤rt≤Kt min 0≤ri≤Ku ϑ ( rt , r , λ ) = min 0≤ri≤Ku max 0≤rt≤Kt ϑ ( rt , r , λ ) . By the uniqueness of the limit , the right-hand side max0≤rt≤Kt min0≤ri≤Ku ϑ ( rt , r , λ ) and min0≤ri≤Ku max0≤rt≤Kt ϑ ( rt , r , λ ) do not depend on Kt and Ku as long as Kt ≥ 2λandKu ≥ 2λ+ ( 2+ √ γ ) λ . Thus we have lim α E trN−1 = max rt≥0 min ri≥0 ϑ ( rt , r , λ ) = min ri≥0 max rt≥0 ϑ ( rt , r , λ ) . If r∗t = 0 , then ϑ ( 0 , r ∗ ) = minr∈ [ 0 , Ku ] m ∑ i∈ [ m ] 1 λi r2i = 0 . Thus r ∗ must be zero . However , ϑ ( 1 2λ ,0 ) = 34λ > ϑ ( 0 , r ∗ ) . Therefore r∗t > 0 . We compute the partial derivative ∂ϑ ∂ri = 2rt ri√ 1 + ∑ i∈ [ m ] r 2 i − 2rt √ zi + 2 ri λi . If r∗i = 0 , we have ∂ϑ ∂ri ∣∣∣ ri=0 , rt=r∗t = −2r∗t √ zi < 0 . Therefore , one can increase r∗i and make maxrt∈ [ 0 , Kt ] minr∈ [ 0 , Ku ] m ϑ ( rt , r ) smaller , which results in a contradiction . Thus r∗i > 0 . Thus the minimax value is attained when rt , ri > 0 for all i ∈ [ m ] . To obtain the optimality condition , we compute the partial derivatives ∂ϑ ∂rt = 2 √ 1 + ∑ i∈ [ m ] r2i − 2 ∑ i∈ [ m ] ri √ zi − 2λrt , ∂ϑ ∂ri = 2rt ri√ 1 + ∑ i∈ [ m ] r 2 i − 2rt √ zi + 2 ri λi . Setting them to zero gives the optimality condition for r∗t , r ∗ 1 , . . . , r ∗ m and yields Equation ( 40 ) and Equation ( 41 ) . Using the envelope theorem , we get ∂ ∂λi max rt∈ [ 0 , Kt ] min r∈ [ 0 , Ku ] m ϑ ( rt , r , λ ) = ∂ϑ ( r∗t , r ∗ , λ1 , . . . , λm ) ∂λi =− r ∗2 i λ2i . Lemma 12 . Define N = λnIn + Z > ΛZ . The following equation holds lim n , di→+∞ di/n→zi E [ ∂ ∂λi tr ( N−1 ) ] = ∂2 ∂λi∂λ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = −r∗2i λ2i , where r∗ is a solution to suprt > 0 infr1 , ... , rm > 0 ϑ ( rt , r1 , . . . , rm , λ1 , . . . , λm ) and ϑ ( rt , r1 , . . . , rm , λ1 , . . . , λm ) = 2rt √ 1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t . Proof . Since ∣∣∣∣ ∂∂λi tr ( N−1 ) ∣∣∣∣ = tr ( Z > i N−2Zi ) ≤ 1 ( λn ) 2 tr ( Z > i Zi ) ( 47 ) and E 1 ( λn ) 2 tr ( Z > i Zi ) 1λ2 ( by Lemma 4 ) , using the dominated convergence theorem gives E [ ∂ ∂λi tr ( N−1 ) ] = ∂ ∂λi E tr ( N−1 ) . We use α to denote the indices n , di and use limα to denote limn , di→+∞ di/n=zi . Define fα ( λi ) = E tr ( N−1 ) , g ( λi ) = ∂∂λ infρ∈Rm+ [ log ( λ+ ∑ i∈ [ m ] λiρi ) + ∑ i∈ [ m ] ( ρi − zi ( log ρizi + 1 ) ) ] , and h ( λi ) = suprt > 0 infr1 , ... , rm > 0 ϑ ( rt , r1 , . . . , rm , λ1 , . . . , λm ) . Because ∣∣tr ( N−1 ) ∣∣ ≤ tr ( 1 λnIn ) ≤ 1λ and limα tr ( N−1 ) = g ( λi ) ( by Lemma 9 ) , we have Lemma 9 limα fα ( λi ) = limα E tr ( N−1 ) = g ( λi ) . Lemma 11 shows limα fα ( λi ) = h ( λi ) . Therefore limα fα ( λi ) = g ( λi ) = h ( λi ) . Because of Equation ( 47 ) , we have f ′α ( λi ) = ∂ ∂λi E tr ( N−1 ) and |f ′α ( λi ) | = ∣∣∣∣ ∂∂λiE tr ( N−1 ) ∣∣∣∣ = ∣∣∣∣E [ ∂∂λi tr ( N−1 ) ] ∣∣∣∣ ≤ E ∣∣∣∣ ∂∂λi tr ( N−1 ) ∣∣∣∣ . 1λ2 and therefore { f ′α } is uniformly bounded for λi . Because∣∣∣∣ ∂2∂λ2i tr ( N−1 ) ∣∣∣∣ =2 tr ( N−1ZiZ > i N −1ZiZ > i N −1 ) . 1 λn tr ( N−1 ( ZiZ > i ) 2 N−1 ) = 1 λn tr ( ZiZ > i N −2ZiZ > i ) ≤ 1 ( λn ) 3 tr ( ZiZ > i ) 2 , and E 1 ( λn ) 3 tr ( ZiZ > i ) 2 1λ3 ( by Lemma 4 ) , using the dominated convergence theorem yields E [ ∂2 ∂λ2i tr ( N−1 ) ] = ∂ ∂λi E [ ∂ ∂λi tr ( N−1 ) ] = ∂2 ∂λ2i E [ tr ( N−1 ) ] = f ′′α ( λi ) . Moreover , we have |f ′′α ( λi ) | ≤ E ∣∣∣∣ ∂2∂λ2i tr ( N−1 ) ∣∣∣∣ . 1λ3 . Thus { f ′α } is uniformly equicontinuous for λi . We want to show that limα f ′α ( λi ) = g′ ( λi ) by contradiction . Assume that it is not true . Then there exists > 0 and a subsequence { f ′αk } such that ∣∣f ′αk ( λi ) − g′ ( λi ) ∣∣ > . Since { f ′αk } is uniformly bounded and uniformly equicontinuous for λi ∈ E ( E is any closed finite interval containing λi ) , by the Arzela-Ascoli theorem , there exists a subsequence { f ′αkr } that converges uniformly on E. Since limα fαkr ( λi ) = g ( λi ) , by ( Rudin , 1976 , Thoerem 7.17 ) , we have lim r f ′αkr ( λi ) = g ′ ( λi ) , which yields a contradiction . Therefore , we have limα f ′α ( λi ) = g ′ ( λi ) . Recall g ( λi ) = h ( λi ) for any λi > 0 . Then by the final part of Lemma 11 , we have limα f ′α ( λi ) = g ′ ( λi ) = h ′ ( λi ) = − r ∗2 i λ2i . D.4 BIAS Lemma 13 . Suppose that U ∼ ⊕ i∈ [ m ] Unif ( O ( di ) ) and V are two independent d × d random matrices such that V d= UV U > , where d = ∑m i=1 di . Let θ ∈ Rd be a fixed vector . Write θ = θ1 ... θm , where θi ∈ Rdi . Let φ ∼ ⊕ i∈ [ m ] Unif ( Sdi−1 ( ‖θi‖2 ) ) be a random vector independent of V and let Λ = diag ( λ1Id1 , . . . , λmIdm ) ∈ Rd×d . Then we have E [ ∥∥∥Λ1/2V θ∥∥∥2 2 ] = E [ ∥∥∥Λ1/2V φ∥∥∥2 2 ] . Proof . Recall UΛU > = Λ and noticing U > θ d= φ , we get E [ ∥∥∥Λ1/2V θ∥∥∥2 2 ] =E [ ∥∥∥Λ1/2UV U > θ∥∥∥2 2 ] =E [ θ > UV > U > ΛUV U > θ ] =E [ θ > UV > ΛV U > θ ] =E [ ∥∥∥Λ1/2V U > θ∥∥∥2 2 ] =E [ ∥∥∥Λ1/2V φ∥∥∥2 2 ] . Lemma 14 . Define Θ̃ = diag ( ‖θ′1‖22/d1Id1 , . . . , ‖θ′m‖22/dmIdm ) and S = Λ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2 . Then we have Bλ , d , n = ‖θ∗‖2Σ − 2E tr ( ΛSΘ̃ ) + E tr ( SΛSΘ̃ ) . Proof . Recall Equation ( 22 ) in Lemma 5 Bλ , d , n = E [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] . Let U ∼ ⊕ i∈ [ m ] Unif ( O ( di ) ) be a random matrix independent of Z . Because UZ d = Z , we have Id + 1 nλ Λ1/2ZZ > Λ1/2 d = Id + 1 nλ Λ1/2UZZ > U > Λ1/2 = U ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) U > . Define θ̃ ∼ ⊕ i∈ [ m ] Unif ( Sdi−1 ( ‖θ′i‖2 ) ) . Lemma 13 gives Bλ , d , n =E [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ̃‖22 ] =E [ ‖Λ1/2 ( Id − S ) θ̃‖22 ] =E [ ‖ ( Id − S ) θ̃‖2Λ ] =E ∥∥∥θ̃∥∥∥2 Λ − E [ θ̃ > ΛSθ̃ ] − E [ θ̃ > SΛθ̃ ] + E [ θ̃ > SΛSθ̃ ] . Notice that ∥∥∥θ̃∥∥∥2 Λ = ‖θ′‖2Λ and Θ̃ = E [ θ̃θ̃ > ] . Because Θ̃ commutes with Λ , we have tr ( SΛΘ̃ ) = tr ( SΘ̃Λ ) = tr ( ΛSΘ̃ ) . In light of these , we deduce Bλ , d , n = ‖θ′‖ 2 Λ − E tr ( ΛSΘ̃ ) − E tr ( SΛΘ̃ ) + E tr ( SΛSΘ̃ ) = ‖θ′‖2Λ − 2E tr ( ΛSΘ̃ ) + E tr ( SΛSΘ̃ ) . Lemma 14 expresses the bias Bλ , d , n as the sum of three terms . Computing ‖θ′‖2Λ Note that ‖θ′‖ 2 Λ = θ ′ > Λθ′ = ∑ i∈ [ m ] λi ‖θ′i‖ 2 2 . Therefore , lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi ‖θ′‖2Λ = q > ( λ z ) . Computing E tr ( ΛSΘ̃ ) Define N = λnIn + Z > ΛZ = λnIn + ∑ i∈ [ m ] λiZiZ > i . We have E tr ( ΛSΘ̃ ) =E tr ( Z > Λ1/2Θ̃Λ3/2Z ( nλIn + Z > ΛZ ) −1 ) =E tr ( Z > Λ2Θ̃ZN−1 ) = ∑ i∈ [ m ] λ2i ‖θ′i‖22 di E tr ( ZiZ > i N −1 ) = ∑ i∈ [ m ] λ2i ‖θ′i‖22 n di E [ ∂ ∂λi 1 n log det N n ] = ∑ i∈ [ m ] λ2i ‖θ′i‖22 n di ∂ ∂λi E [ 1 n log det N n ] , where the second inequality is because Θ̃ commutes with Λ3/2 and the final equality is because of Equation ( 38 ) . Taking lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi and using Lemma 10 gives lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi E tr ( ΛSΘ̃ ) = ∑ i∈ [ m ] λ2i η 2 i zi ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . Using the envelope theorem yields ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) = ρ∗i λ+ ∑ i∈ [ m ] λiρ ∗ i = zi − ρ∗i λi , where the final equality is because of Equation ( 6 ) in Item 1 . Therefore , we deduce lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi E tr ( ΛSΘ̃ ) = ∑ i∈ [ m ] λ2i η 2 i zi zi − ρ∗i λi = ∑ i∈ [ m ] λiη 2 i ( 1− ρ ∗ i zi ) = q > ( λ ( z− ρ∗ ) ) . Computing E tr ( SΛSΘ̃ ) We have E tr ( SΛSΘ̃ ) =E tr [ Λ1/2ZN−1Z > Λ2ZN−1Z > Λ1/2Θ̃ ] =E tr [ Z > Λ1/2Θ̃Λ1/2ZN−1Z > Λ2ZN−1 ] =E tr [ Z > ΛΘ̃ZN−1Z > Λ2ZN−1 ] = ∑ i∈ [ m ] λi‖θ′i‖22 di ∑ j∈ [ m ] λ2jE tr [ ZiZ > i N −1ZjZ > j N −1 ] =− ∑ i∈ [ m ] λi‖θ′i‖22n di ∑ j∈ [ m ] λ2jE [ ∂2 ∂λj∂λi 1 n log det N n ] , where the third equality is because Θ̃ commutes with Λ1/2 . Taking lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi and using Lemma 10 gives lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi E tr ( SΛSΘ̃ ) = − ∑ i∈ [ m ] λiη 2 i zi ∑ j∈ [ m ] λ2j ∂2 ∂λj∂λi inf ρ∈Rm+ log λ+ ∑ l∈ [ m ] λlρl + ∑ l∈ [ m ] ( ρl − zl ( log ρl zl + 1 ) ) . Write λ = ( λ1 , . . . , λm ) > and z = ( z1 , . . . , zm ) > . Let ρ∗ ∈ Rm be a minimizer of Equation ( 5 ) and J = ∂ρ ∗ ∂λ ∈ R m×m be the Jacobian matrix Jij = ∂ρ∗i ∂λj . Recall Item 2 ( diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > ) J = ( z− ρ∗ ) ρ∗ > − diag ( ρ∗ ) . Using the envelope theorem , we have ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ l∈ [ m ] λlρl + ∑ l∈ [ m ] ( ρl − zl ( log ρl zl + 1 ) ) = ρ∗i λ+ ∑ l∈ [ m ] λlρ ∗ l = ρ∗i λ+ λ > ρ∗ . Recall Equation ( 6 ) yields ρ∗i λ+ λ > ρ∗ = zi − ρ∗i λi . Differentiating the above equation with respect to λj gives ∂2 ∂λj∂λi inf ρ∈Rm+ log λ+ ∑ l∈ [ m ] λlρl + ∑ l∈ [ m ] ( ρl − zl ( log ρl zl + 1 ) ) = ∂ ∂λj zi − ρ∗i λi = −λiJij − ( zi − ρ∗i ) δij λ2i . It follows that lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi E tr ( SΛSΘ̃ ) = ∑ i∈ [ m ] λiη 2 i zi ∑ j∈ [ m ] λ2j λiJij + ( zi − ρ∗i ) δij λ2i = ∑ i , j∈ [ m ] qiλ 2 j ( Jij + ( zi − ρ∗i ) δij λi ) =q > ( λ ( z− ρ∗ ) + Jλ 2 ) Putting all three terms together , we have lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi Bλ , d , n = q > ( λ z ) −2q > ( λ ( z− ρ∗ ) ) +q > ( λ ( z− ρ∗ ) + Jλ 2 ) = q > ( λ ρ∗ + Jλ 2 ) . Since { Bλ , d , n } is uniformly bounded and uniformly equicontinuous for λ ∈ ( 0 , 1 ] by Lemma 5 , { Bλ , d , n } can be extended continuously to [ 0 , 1 ] and the family of extended functions is still uniformly bounded and uniformly equicontinuous for λ ∈ [ 0 , 1 ] . By the Arzela-Ascoli theorem , { Bλ , d , n } converges uniformly to the limit . By the Moore-Osgood theorem , we can exchange the two limits lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi and limλ→0+ and get lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi B0 , d , n = lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi lim λ→0+ Bλ , d , n = lim λ→0+ lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi Bλ , d , n = q > ( λ ρ∗ + Jλ 2 ) |λ=0 . D.5 VARIANCE Define N = nλIn + Z > ΛZ . Recalling Lemma 6 gives Vλ , d , n =σ2E‖ΛZN−1‖22 =σ2 m∑ i=1 λ2iE tr ( ZiZ > i N −2 ) =− σ2 m∑ i=1 λ2iE [ ∂ ∂λi tr ( N−1 ) ] . Using Lemma 12 , we get lim n , di→∞ di/n→zi Vλ , d , n =− σ2 m∑ i=1 λ2i lim n , di→∞ di/n→zi E [ ∂ ∂λi tr ( N−1 ) ] =− σ2 m∑ i=1 λ2i lim n , di→∞ di/n→zi E [ ∂ ∂λi tr ( N−1 ) ] =− σ2 m∑ i=1 λ2i ∂2 ∂λi∂λ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) . Using the envelope theorem , we deduce ∂ ∂λ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = 1 λ+ ∑m j=1 λjρ ∗ j . Then we take ∂∂λi and obtain ∂2 ∂λi∂λ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = ∂ ∂λi 1 λ+ ∑m j=1 λjρ ∗ j =− ρ∗i + ∑ j∈ [ m ] λjJji ( λ+ ∑ j∈ [ m ] λjρ ∗ j ) 2 . As a result , lim n , di→∞ di/n→zi Vλ , d , n = σ 2 m∑ i=1 λ2i ρ∗i + ∑ j∈ [ m ] λjJji ( λ+ ∑ j∈ [ m ] λjρ ∗ j ) 2 = σ2 ( λ 2 ) > ( ρ∗ + J > λ ) ( λ+ λ > ρ∗ ) 2 . By Lemma 12 , the variance is given by lim n , di→∞ di/n→zi Vλ , d , n = lim n , di→∞ di/n→zi −σ2 m∑ i=1 λ2iE [ ∂ ∂λi tr ( N−1 ) ] = σ2 m∑ i=1 r∗2i , where r∗ solves sup rt > 0 inf r1 , ... , rm > 0 2rt√1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t . Since { Vλ , d , n } is uniformly bounded and uniformly equicontinuous with respect to λ ∈ ( 0 , 1 ] by Lemma 5 , { Vλ , d , n } can be extended continuously to [ 0 , 1 ] and the family of extended functions is still uniformly bounded and uniformly equicontinuous . By the Arzela-Ascoli theorem , { Vλ , d , n } converges uniformly to the limit . By the Moore-Osgood theorem , we can exchange the two limits limn , di→∞ di/n→zi and limλ→0+ and get lim n , di→∞ di/n→zi lim λ→0+ Vλ , d , n = lim λ→0+ lim n , di→∞ di/n→zi Vλ , d , n = σ 2 m∑ i=1 r∗2i |λ=0 . E PROOF OF THEOREM 2 We use Theorem 1 to prove Theorem 2 . As in Theorem 1 , let r∗ solve minri≥0 maxrt≥0 ϑ ( rt , r , λ ) , where ϑ is defined in Equation ( 7 ) . Note that ϑ is a quadratic function of rt . Define A =√∑ i∈ [ m ] r 2 i + 1 , B = ∑ i∈ [ m ] √ ziri , A∗ = √∑ i∈ [ m ] r ∗2 i + 1 , and B ∗ = ∑ i∈ [ m ] √ zir ∗ i . Then r∗t = A−B λ and we get min ri≥0 max rt≥0 ϑ ( rt , r , λ ) = min ri≥0 ( A−B ) 2 λ + ∑ i∈ [ m ] 1 λi r2i = min ri≥0 ( A−B ) 2 λ + ∑ i∈ [ m ] 1 λi r2i . Taking the partial derivative with respect to ri gives ∂ ∂ri ( A−B ) 2 λ + ∑ i∈ [ m ] 1 λi r2i = 2 · A−B λ ( ri A − √ zi ) + 2 · ri λi . Setting it to zero gives the optimality condition for r∗i : A∗ −B∗ λ ( r∗i A∗ − √ zi ) = −r ∗ i λi , i ∈ [ m ] . ( 48 ) It follows that r∗i A∗ − √ zi r∗j A∗ − √ zj = r∗i /λi r∗j /λj , i , j ∈ [ m ] . Some algebraic manipulation in the above equation yields r∗i r∗j = λi λj · √ ziA ∗ − r∗i√ zjA∗ − r∗j , i , j ∈ [ m ] . Define z = ( z1 , . . . , zm ) . Then ‖z‖1 = ∑ i∈ [ m ] zi . By Cauchy–Schwarz inequality , if d/n →∑ i∈ [ m ] zi < 1 B ≤ √∑ i∈ [ m ] zi ‖r‖2 < ‖r‖2 < √ ‖r‖22 + 1 = A . Thus there does not exist r such that A = B . If d/n → ∑ i∈ [ m ] zi > 1 , then A = B is feasible for r. For example , set r = 1√ ( ‖z‖1 − 1 ) ‖z‖1 √ z . We have B = 〈 r , √ z 〉 = √ ‖z‖1 ‖z‖1 − 1 A = √ 1 + ‖r‖22 = √ 1 + 1 ‖z‖1 − 1 = B . If ‖z‖1 > 1 , since A = B is feasible , then lim λ→0+ min ri≥0 ( A−B ) 2 λ + ∑ i∈ [ m ] 1 λi r2i = min ri≥0 A=B ∑ i∈ [ m ] 1 λi r2i . If ‖z‖1 < 1 , then A−B always holds . To be precise , we have A−B ≥ ( √ ‖r‖22 + 1− ‖r‖2 ) ∨ ( ( 1− √ ‖z‖1 ) ‖r‖2 ) . If ‖r‖2 > 1 , then ( 1− √ ‖z‖1 ) ‖r‖2 > 1− √ ‖z‖1 . If ‖r‖2 ≤ 1 , then √ ‖r‖22 + 1−‖r‖2 ≥ √ 2−1 . Thus there exists a universal constant C0 = ( 1− √ ‖z‖1 ) ∨ ( √ 2− 1 ) > 0 such that A−B ≥ C0 . Recall Equation ( 48 ) . We have ( A∗ −B∗ ) ( r∗i A∗ − √ zi ) = −λr ∗ i λi , i ∈ [ m ] . Taking limλ→0+ , since A∗ −B∗ ≥ C0 does not go to zero , we have r∗i A∗ − √ zi = 0 , i ∈ [ m ] . Then we get r∗2i 1 + ∑ j∈ [ m ] r ∗2 j = zi , i ∈ [ m ] . Summing all i ∈ [ m ] yields ‖z‖1 = ∑ i∈ [ m ] r ∗2 i 1 + ∑ i∈ [ m ] r ∗2 i . Therefore , we have lim n , di→+∞ di/n→zi V0 , d , n = σ 2 lim λ→0+ m∑ i=1 r∗2i = σ 2 ∑ i∈ [ m ] zi 1− ∑ i∈ [ m ] zi . F PROOF OF THEOREM 3 Define A∗ = √∑ i∈ [ m ] r ∗2 i + 1 and B ∗ = ∑ i∈ [ m ] √ zir ∗ i . Equation ( 15 ) in Theorem 2 yields r∗1 r∗2 = λ1 λ2 · √ z1A ∗ − r∗1√ z2A∗ − r∗2 . Using the constraint A∗ = B∗ , we get r∗1 r∗2 = λ1 ( √ z1B ∗ − r∗1 ) λ2 ( √ z2B∗ − r∗2 ) . Define q = r ∗ 1 r∗2 . We have the following equation q = λ1 ( q ( z1 − 1 ) + √ z1z2 ) λ2 ( q √ z1z2 + z2 − 1 ) . Solving the above equation yields q = λ1 ( z1 − 1 ) + λ2 ( 1− z2 ) + √ ( λ1 ( z1 − 1 ) + λ2 ( 1− z2 ) ) 2 + 4λ1λ2z1z2 2λ2 √ z1z2 . ( 49 ) Here we discard the negative root . Let x = r∗21 + r ∗2 2 = r ∗2 2 ( 1 + q2 ) . ? ? yields 1 + x = r∗22 ( q √ z1 + √ z2 ) 2 = x 1 + q2 ( q √ z1 + √ z2 ) 2 . Solving x from the above equation gives x = q2 + 1 q2 ( z1 − 1 ) + 2q √ z1z2 + z2 − 1 . Therefore , lim n , di→+∞ di/n→zi V0 , d , n = q2 + 1 q2 ( z1 − 1 ) + 2q √ z1z2 + z2 − 1 . G PROOF OF THEOREM 4 Instead of considering the θ∗ specified in Equation ( 18 ) , we first consider a Bayesian setting where θ∗ ∼ N ( 0 , 1dId ) . Later , we will show that the setup in Equation ( 18 ) is asymptotically ( as di →∞ ) equivalent to this Bayesian setting . The precise meaning of equivalence will also be presented later . Our strategy can be divided into two steps . The first step is to show that the Bayes risk of the Bayes estimator is monotonically decreasing in the sample size n. The second step is to translate the sample-wise monotonicity of the Bayes estimator to the excess risk of the optimally regularized estimator θ̂λ , d , n in the setup of Equation ( 18 ) . Recall that since we are interested in sample-wise monotonicity , we add a subscript n to X and y ( they are defined by Equation ( 1 ) in Section 1.1 ) to emphasize that they consist of n data items . In this Bayesian setting , the likelihood function of θ∗ is L ( θ∗ | Xn , yn ) = ∏ i∈ [ n ] L ( θ∗ | xi , yi ) ∝ exp ( − ∑ i∈ [ n ] ( yi − 〈θ∗ , xi〉 ) 2 2σ2 ) = exp ( − ‖Xnθ∗ − yn‖22 2σ2 ) . The density of the prior of θ∗ is proportional to exp ( −d2 ‖θ ∗‖22 ) . Therefore , the posterior density of θ∗ is given by p ( θ∗ | Xn , yn ) ∝ exp ( − d ‖θ∗‖22 2 − ‖Xnθ∗ − yn‖22 2σ2 ) . As a result , the posterior distribution of θ∗ is Gaussian . The Bayes estimator is θ̂Bayes ( Xn , yn ) = arg min θ Eθ∗∼p ( θ∗|Xn , yn ) ‖θ − θ ∗‖2Σ . Taking the derivative with respect to θ gives ∂ ∂θ Eθ∗∼p ( θ∗|Xn , yn ) ‖θ − θ ∗‖2Σ = 2Σ ( θ − θ ∗ ) . Setting the above equation to zero yields Σ ( θ̂Bayes ( Xn , yn ) − Eθ∗∼p ( θ∗|Xn , yn ) θ∗ ) = 0 and there- fore θ̂Bayes ( Xn , yn ) = Eθ∗∼p ( θ∗|Xn , yn ) θ ∗ = E [ θ∗ | Xn , yn ] = arg min θ ( d ‖θ∗‖22 + ‖Xnθ∗ − yn‖22 σ2 ) . The final equality is because the posterior mean of a Gaussian distribution equals its mode . Define the Bayes risk Rn , Eθ∗∼N ( 0 , 1d Id ) , Xn , yn [ ∥∥∥θ̂Bayes ( Xn , yn ) − θ∗∥∥∥2 Σ ] . Write X = Rd and Y = R. Define R′n , inf θ̂ : Xn×Yn→R Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂ ( Xn , yn ) − θ∗∥∥∥2 Σ . We have R′n = inf θ̂ : Xn×Yn→Rd Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥Σ1/2θ̂ ( Xn , yn ) − Σ1/2θ∗∥∥∥2 2 = inf θ̂ : Xn×Yn→Rd Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂ ( Xn , yn ) − Σ1/2θ∗∥∥∥2 2 = Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥E [ Σ1/2θ∗ | Xn , yn ] − Σ1/2θ∗∥∥∥2 2 = Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥Σ1/2θ̂Bayes ( Xn , yn ) − Σ1/2θ∗∥∥∥2 2 = Rn . where the third equality is because the conditional expectation minimizes the ` 2 loss . Next , we want to show that Rn+1 ≤ Rn , i.e. , the Bayes risk of the Bayes estimator is monotonically decreasing in the sample size n. Rn+1 = inf θ̂ : Xn+1×Yn+1→Rd Eθ∗∼N ( 0 , 1d Id ) , Xn+1 , yn+1 [ ∥∥∥θ̂ ( Xn+1 , yn+1 ) − θ∗∥∥∥2 Σ ] ≤ inf θ̂ : Xn×Yn→R Eθ∗∼N ( 0 , 1d Id ) , Xn+1 , yn+1 [ ∥∥∥θ̂ ( Xn , yn ) − θ∗∥∥∥2 Σ ] = Rn . Then we want to show that Rn equals the Bayes risk of the optimally regularized estimator θ̂λ , n , d : Rn = inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . Since Rn = inf θ̂ : Xn×Yn→Rd Eθ∗ , Xn , yn ∥∥∥θ̂ ( Xn , yn ) − θ∗∥∥∥2 Σ , we get Rn ≤ inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . On the other hand , recalling θ̂Bayes ( Xn , yn ) = arg minθ ( d ‖θ‖22 + ‖Xnθ−yn‖22 σ2 ) = θ̂σ2d n , n , d and Rn = Eθ∗∼N ( 0 , 1d Id ) , Xn , yn [ ∥∥∥θ̂Bayes ( Xn , yn ) − θ∗∥∥∥2 Σ ] , we deduce Rn ≥ inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . Therefore we deduce Rn = infλ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . As a result , we establish sample-wise monotonicity of the Bayes risk of optimal regularized θ̂λ , n , d : Rn+1 = inf λ≥0 Eθ∗ , Xn+1 , yn+1 ∥∥∥θ̂λ , n+1 , d − θ∗∥∥∥2 Σ ≤ inf λ≥0 Eθ∗ , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ = Rn . ( 50 ) In what follows , we show that if θ∗ is given by Equation ( 18 ) , the excess risk of θ̂λ , n , d is asymptotically equal to its Bayes risk when θ∗ ∼ N ( 0 , 1dId ) : lim di→∞ ∣∣∣∣EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ − Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ ∣∣∣∣ = 0 . We abuse the notation in the above equation . The θ∗ in EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ satisfies Equation ( 18 ) , while the θ∗ in Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ follows a normal distribution N ( 0 , 1dId ) . By Lemma 5 and Lemma 6 , if Σ = PΛP > and θ′ = P > θ∗ are as defined in Table 1 ( where P is an orthogonal matrix and Λ = diag ( λ1Id1 , . . . , λmIdm ) ∈ Rd×d is a diagonal matrix ) , for fixed θ∗ we have EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ =EXn , yn [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] + σ2EXn , yn [ ‖ΛZ ( λnIn + Z > ΛZ ) −1 ‖22 ] , where every entry ofZ ∈ Rd×n follows i.i.d . N ( 0 , 1 ) . If θ∗ ∼ N ( 0 , 1dId ) , we have θ ′ ∼ N ( 0 , 1dId ) . Since the variance term σ2EXn , yn [ ‖ΛZ ( λnIn + Z > ΛZ ) −1 ‖22 ] does not depend on θ∗ , the two variance terms cancel out and we get EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ − Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ =EXn , yn [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] − EXn , yn , θ′∼N ( 0 , 1d Id ) [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] For U ∼ ⊕ i∈ [ m ] Unif ( O ( di ) ) , we have ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 d = ( Id + 1 nλ Λ1/2UZZ > U > Λ1/2 ) −1 = U ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 U > . By Lemma 13 , for θ∗ ( and thereby θ′ ) specified in Equation ( 18 ) , we get EXn , yn [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] = EXn , yn , φ [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 φ‖22 ] , where φ ∼ ⊕ i∈ [ m ] Unif ( Sdi−1 ( ‖θ′i‖2 ) ) = ⊕ i∈ [ m ] Unif ( Sdi−1 ( √ di/d ) ) . In the Bayesian setting , if θ′ ∼ N ( 0 , 1dId ) , then U > θ′ ∼ N ( 0 , 1dId ) . We have Eθ′∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ = Eθ′∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥∥∥Λ1/2U ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 U > θ′ ∥∥∥∥∥ 2 2 = EXn , yn , ψ ∥∥∥∥∥Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 ψ ∥∥∥∥∥ 2 2 , where ψ = U > θ′ ∼ N ( 0 , 1dId ) . Next , we want to couple φ and ψ . Let si i.i.d.∼ Unif ( Sdi−1 ( 1 ) ) , hi i.i.d.∼ χ2 ( di ) , and define φ = √ d1/ds1 ... √ dm/dsm , ψ = √ h1/ds1 ... √ hm/dsm . We have ‖φ‖2 = 1 and ‖ψ‖2 = √√√√ m∑ i=1 hi d = √√√√ m∑ i=1 di d · hi di , ‖φ− ψ‖2 = √√√√ m∑ i=1 di d ( 1− √ hi di ) 2 . By the strong law of large numbers , limdi→+∞ hi/di = 1 almost surely . Thus we get limdi→+∞ , di/d→νi ‖ψ‖2 = √∑m i=1 νi and limdi→+∞ , di/d→νi ‖φ− ψ‖2 = 0 almost surely ( recall that we will let di → +∞ and di/d → νi for some constant νi > 0 . ) . Because∥∥Λ1/2∥∥ 2 . 1 and ∥∥∥ ( Id + 1nλΛ1/2ZZ > Λ1/2 ) −1∥∥∥ 2 ≤ ‖Id‖2 = 1 , we bound the norm of Q , Λ1/2 ( Id + 1 nλΛ 1/2ZZ > Λ1/2 ) −1 as follows ‖Q‖2 ≤ ∥∥∥Λ1/2∥∥∥ 2 ∥∥∥∥∥ ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1∥∥∥∥∥ 2 . 1 . It follows that ∣∣∣EXn , yn , φ [ ‖Qφ‖22 ] − EXn , yn , ψ [ ‖Qψ‖22 ] ∣∣∣ ≤EXn , yn , φ , ψ ∣∣∣‖Qφ‖22 − ‖Qψ‖22∣∣∣ =EXn , ynφ , ψ ( ‖Qφ‖2 + ‖Qψ‖2 ) |‖Qφ‖2 − ‖Qψ‖2| .EXn , ynφ , ψ [ ( ‖φ‖2 + ‖ψ‖2 ) ‖Q ( φ− ψ ) ‖2 ] .EXn , ynφ , ψ ‖φ− ψ‖2 , where the last inequality is because ‖φ‖2 + ‖ψ‖2 . 1 for all sufficiently large di . We know that limdi→+∞ , di/d→νi ‖φ− ψ‖2 = 0 almost surely . To apply Lebesgue ’ s dominated convergence theorem , we need to find a dominating integrable random variable . In fact , 1 + ‖ψ‖2 dominates ‖φ− ψ‖2 : ‖φ− ψ‖2 ≤ ‖φ‖2 + ‖ψ‖2 = 1 + ‖ψ‖2 . It is integrable because E ‖ψ‖2 = E [ √ χ2 ( d ) d ] ≤ √ E [ χ2 ( d ) ] d = 1 . Application of Lebesgue ’ s dominated convergence theorem yields lim di→+∞ , di/d→νi ∣∣∣EXn , yn , φ [ ‖Qφ‖22 ] − EXn , yn , ψ [ ‖Qψ‖22 ] ∣∣∣ = 0 . Therefore , we conclude that lim di→+∞ , di/d→νi ∣∣∣∣EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2Σ − Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ ∣∣∣∣ = 0 and this convergence is uniform in n and λ ∈ ( 0 , ∞ ) . It follows that lim n , di→∞ n/di→γi ∣∣∣∣EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ − Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ ∣∣∣∣ = 0 and this convergence is uniform in λ ∈ ( 0 , ∞ ) . By Lemma 8 ( the proof is similar when we replace α→ +∞ by n , di →∞ , n/di → γi ) , we have lim n , di→∞ n/di→γi ∣∣∣∣ infλ > 0EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ − infλ > 0Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ ∣∣∣∣ = 0 . ( 51 ) Define fα ( λ ) = Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . We use α to denote the indices n , di . By Lemma 5 and Lemma 6 , we have Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . Eθ∗∼N ( 0 , 1d Id ) ‖θ ∗‖22 = 1 . Therefore { fα ( λ ) } is uniformly bounded for λ > 0 . Since ∣∣∣∣ ddλEXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ ∣∣∣∣ . ‖θ∗‖22 and Eθ∗∼N ( 0 , 1d Id ) ‖θ ∗‖22 = 1 , we have∣∣∣∣ ddλEθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2Σ ∣∣∣∣ = ∣∣∣∣Eθ∗∼N ( 0 , 1d Id ) ddλEXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2Σ ∣∣∣∣ . 1 . As a result , { fα ( λ ) } is uniformly equicontinuous for λ > 0 , and in particular λ ∈ ( 0 , M ] for any M > 0 . Therefore { fα ( λ ) } can be extended continuously to [ 0 , M ] and the family of extended functions is still uniformly bounded and uniformly equicontinuous . Recall that if θ∗ ∼ N ( 0 , 1dId ) , we have θ′ ∼ N ( 0 , 1dId ) . As in Equation ( 19 ) , write θ ′ in a row-partitioned form θ′ = θ ′ 1 ... θ′m , where θ′i ∈ Rdi . Then ‖Πiθ∗‖2 = ‖θ′i‖2 ∼ √ χ2 ( di ) d = √ χ2 ( di ) di · did → √ νi as n , di → +∞ and n/di → γi , where νi = ( γi ∑ j∈ [ m ] 1 γj ) −1 . By Theorem 1 , { fα ( λ ) } converges pointwise , say , to h ( λ , γ1 , . . . , γm ) . By the Arzela-Ascoli theorem , limα fα ( λ ) = h ( λ , γ1 , . . . , γm ) uniformly on λ ∈ [ 0 , M ] . Therefore , as n , di →∞ and n/di → γi , by Lemma 8 , we have inf λ∈ [ 0 , M ] Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ → inf λ∈ [ 0 , M ] h ( λ , γ1 , . . . , γm ) . Recalling θ̂Bayes ( Xn , yn ) = arg minθ ( d ‖θ‖22 + ‖Xnθ−yn‖22 σ2 ) = θ̂σ2d n , n and Rn = Eθ∗∼N ( 0 , 1d Id ) , Xn , yn [ ∥∥∥θ̂Bayes ( Xn , yn ) − θ∗∥∥∥2 Σ ] = inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . For all M > CM : = 2σ2 ∑ i∈ [ m ] 1 γi ≥ σ 2d n ( recall d n → ∑ i∈ [ m ] 1 γi ) , we have inf λ∈ [ 0 , M ] Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ = inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ → inf λ∈ [ 0 , M ] h ( λ , γ1 , . . . , γm ) . The uniqueness of limits implies that infλ∈ [ 0 , M ] h ( λ , γ1 , . . . , γm ) is independent of M as long as M > σ2 . As a result , if M > CM , we have infλ∈ [ 0 , M ] h ( λ , γ1 , . . . , γm ) = infλ≥0 h ( λ , γ1 , . . . , γm ) , which yields inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ → inf λ≥0 h ( λ , γ1 , . . . , γm ) . ( 52 ) Equation ( 50 ) implies infλ≥0 h ( λ , γ1 , . . . , γm ) is decreasing in every γi . Combining Equation ( 51 ) and Equation ( 52 ) gives inf λ≥0 EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ → inf λ≥0 h ( λ , γ1 , . . . , γm ) . | Authors study the generalization risk of ridge and ridgeless linear regression. It is assumed that the data follows a multivariate normal distribution and there is also an assumption on the spectrum of the covariance matrix. Among the contributions, the authors show a formula for the limiting bias and variance, show that sample-wise multiple descent happens when the covariance matrix is highly ill-conditioned, and study optimal regularization. | SP:393abedf96b356492f7524a041bf15b677328c4a |
Spectral Multiplicity Entails Sample-wise Multiple Descent | 1 INTRODUCTION The double/multiple descent phenomenon attracted recent research attention due to ( Belkin et al. , 2019 ) . This line of work focuses on the parameter-wise double/multiple descent phenomenon of the risk curve ( Bartlett et al. , 2020 ; Tsigler & Bartlett , 2020 ; Belkin et al. , 2019 ; 2020 ; Chen et al. , 2020a ; Liang et al. , 2020 ; Advani et al. , 2020 ; Bös & Opper , 1998 ; Krogh & Hertz , 1992 ; Le Cun et al. , 1991 ; Mei & Montanari , 2019 ; Opper et al. , 1990 ; Vallet et al. , 1989 ; Watkin et al. , 1993 ) . The classical learning theory shows that when the number of parameters ( which reflects the model complexity ) increases , the test error ( generalization risk ) first decreases due to more fitting power , and then increases due to overfitting . The generalization risk attains a peak at the interpolation threshold ( the number of parameters equals the number of data points so that the model interpolates the data ) . This results in a U-shaped risk curve if we plot the test error versus the number of parameters . The double descent risk curve posits that the risk will decrease ( again ) if one further increases the model complexity beyond the interpolation threshold ( Belkin et al. , 2019 ) . Thus there is a second descent in addition to the first one in the U-shaped stage of the curve . Belkin et al . ( 2019 ) presented empirical results and showed the existence of such double descent behavior in the random Fourier features model , the fully connected neural network , and the random forest model . Prior to ( Belkin et al. , 2019 ) , earlier studies of the shape and features of the risk curve in a number of contexts include ( Vallet et al. , 1989 ; Opper et al. , 1990 ; Le Cun et al. , 1991 ; Krogh & Hertz , 1992 ; Bös & Opper , 1998 ; Watkin et al. , 1993 ; Advani et al. , 2020 ) . Loog et al . ( 2020 ) presented a prehistory of the double descent phenomenon . Belkin et al . ( 2020 ) proved the double descent curve in the Gaussian model and the Fourier series model . Mei & Montanari ( 2019 ) theoretically established the double descent curve of the random features regression . Bartlett et al . ( 2020 ) ; Tsigler & Bartlett ( 2020 ) characterized the conditions for ridgeless and ridge linear regression problems , respectively , under which the minimum-norm interpolants achieve near-optimal generalization risk . Liang et al . ( 2020 ) showed that the test error of the minimum-norm interpolator of data in reproducing kernel Hilbert space is upper bounded by a multiple descent curve as the model complexity increases . They also presented a numerical result supporting that the test error itself exhibits a multiple descent curve . Chen et al . ( 2020a ) proved that the multiple descent curve does exist for the minimum-norm interpolator in linear regression and that the curve can be even designed . Following the parameter-wise double descent , research interest extended to epoch-wise and samplewise double descent ( Nakkiran et al. , 2020 ; Chen et al. , 2020b ; Min et al. , 2021 ; Nakkiran et al. , 2021 ) . Nakkiran et al . ( 2020 ) observed from their numerical result that the generalization risk experiences a double descent as one keeps the model size fixed and increases the training time . They called this observation epoch-wise double descent . Nakkiran et al . ( 2020 ) also noted sample-wise non-monotonicity , which means that more data can hurt generalization . Nakkiran et al . ( 2021 ) proved that for isotropic features , optimally regularized ridge regression yields a monotonic generalization risk curve with more samples . Nakkiran et al . ( 2021 ) also showed that if the features are formed by projecting high-dimensional isotropic data to a random low-dimensional space ( say , ddimensional ) , the optimally regularized ridge regression has a monotonic generalization risk curve with increasing d ( the model size ) . Sample-wise non-monotonicity and double descent was also observed in ( Chen et al. , 2020b ; Min et al. , 2021 ) in adversarially trained models . C ompared to ( Wu & Xu , 2020 ; ichi Amari et al. , 2021 ; Dobriban & Wager , 2018 ; Richards et al. , 2021 ) , in what follows , we highlight our contributions and the differences from them . First , our major contribution is providing a rigorous proof for the existence of sample-wise ( test error vs. the number of training samples ) double and multiple descent in linear regression . However , ( Richards et al. , 2021 ) only mentioned parameter-wise double descent ( test error vs. model capacity ) in their related work . ( ichi Amari et al. , 2021 ) only mentioned epoch-wise ( test error vs. training time ) double descent in Appendix A.2 . Neither ( Richards et al. , 2021 ) nor ( ichi Amari et al. , 2021 ) mentioned multiple descent . Second , we made and theoretically proved the observation that an ill-conditioned covariance matrix is a sufficient condition for the existence of sample-wise multiple descent . To the best of our knowledge , our work is the first paper that pointed this out . Third , we solved the Stieltjes transform explicitly and derived explicit formulae for the risk and variance in our setup . In addition , we also provided rigorous treatment to the ridgeless setting and also obtained explicit formulae for it . Fourth , there is another difference between our paper and the papers that the reviewer mentioned . ( Wu & Xu , 2020 ; ichi Amari et al. , 2021 ; Dobriban & Wager , 2018 ; Richards et al. , 2021 ) assumed a prior on the true linear model and takes expectation over the prior . In our paper , we do not assume a prior on the true linear model and our risk does not take the expectation over a random true linear model . In the setting of generally anisotropic features , this paper gives an asymptotic characterization of the generalization risk curve with more samples . The asymptotic regime is an approximation for large n , d and can also shed light on practical machine learning problems . We first introduce our problem setup . 1.1 PROBLEM SETUP Data Distribution Let Σ ∈ Rd×d be a positive semi-definite matrix which is termed the covariance matrix , and let θ∗ ∈ Rd . The eigenvalues of Σ are λ1 , . . . , λm with multiplicity d1 , . . . , dm , respectively . We have d = ∑m i=1 di . Assume that λ1 , . . . , λm are fixed , distinct , all positive , and do not depend on d ( i.e. , for all d , the eigenvalue of Σ are always λ1 , . . . , λm ) . We assume the following data distribution D for ( x , y ) ∈ Rd × R : x ∼ N ( 0 , Σ ) , y = x > θ∗ + , where x and are independent and ∼ N ( 0 , σ2 ) . In practice , there are natural random variables x that satisfy our assumption . For example , assume that we want to use machine A to measure the length of several objects and use machine B to measure their temperature . The measured lengths and temperatures follow an i.i.d . Gaussian distribution . However , the variance of measurement of machine A is different from that of machine B . Then we consider the random vector formed by the measurements x = ( l1 , . . . , ln , t1 , . . . , tn ) , where li and ti are the length and temperature of object i , respectively . This results in a block-structured covariance matrix . When we measure more objects , the size of the covariance matrix tends to infinity . Second , the motivation came from ( Nakkiran et al. , 2021 ) . ( Nakkiran et al. , 2021 ) observed empirically in their Figure 2 that when the covariance matrix has a block structure ( specifically , there are only two fixed different eigenvalues 10 and 1 ) , the expected excess risk exhibits multiple descent . We quantitatively studied this observation and obtained the related formulae . The excess risk of an estimator θ ∈ Rd is given by R ( θ ) = Ex , y∼D [ ( y − x > θ ) 2 − ( y − x > θ∗ ) 2 ] . Assume that the training data { ( xi , yi ) } ni=1 ⊆ Rd × R is drawn i.i.d . from D. Write X = x > 1 ... x > n ∈ Rn×d , y = y1 ... yn ∈ Rn . ( 1 ) We have y = Xθ∗ + , where ∼ N ( 0 , σ2In ) . Ridge Estimator and Minimum-Norm Estimator Definition 1 ( Ridge estimator ) . The ridge estimator θ̂λ , n , d ∈ Rd ( λ > 0 ) solves the following minimization problem min θ∈Rd 1 n ‖Xθ − y‖22 + λ ‖θ‖ 2 2 . Definition 2 ( Minimum-norm estimator ) . The minimum-norm estimator ( also known as the ridgeless estimator ) θ̂0 , n , d ∈ Rd solves the following minimization problem min θ∈Rd ‖θ‖2 such that ‖Xθ − y‖2 = min θ∈Rd ‖Xθ − y‖2 . We are interested in the expected excess risk of θ̂λ , n , d , which is given by Rλ , n , d = E [ R ( θ̂λ , n , d ) ] . The expectation is taken over the randomness of the training data { ( xi , yi ) } ni=1 . Asymptotic Regime Let Πi ∈ Rd×d be the orthogonal projection to the eigenspace of λi . This paper focuses on the asymptotic behavior of the expected excess risk of θ̂λ , n , d where n , di → +∞ , di/n→ zi ( zi is a fixed positive constant ) , and ‖Πiθ∗‖2 → ηi . In other words , we are interested in lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi Rλ , n , d . 1.2 OUR CONTRIBUTIONS Our contributions are summarized as follows . 1 . We obtain the formulae for the limiting bias and variance , and thereby the limiting risk . We use two methods to obtain these formulae . Specifically , we obtain the limiting bias and variance by solving the Stieltjes transform and computing its derivatives and antiderivatives . We also use convex Gaussian min-max theorem ( CGMT ) ( Thrampoulidis et al. , 2015 ) to compute the limiting variance . The advantage of the CGMT method is that it is more mathematically tractable for the ridgeless estimator . Through the CGMT approach , we obtain a closed-form formula for the variance in the underparameterized regime and simplify the formula for the variance in the overparameterized regime . Moreover , based on the simplified formula , we deduce a closed-form expression for the variance if the covariance matrix of the data distribution has two different eigenvalues . 2 . We find and theoretically prove that sample-wise multiple descent happens when the covariance matrix has eigenvalues of very different orders of magnitude ( thus the covariance matrix is highly ill-conditioned ) . 3 . We show that if the true linear model θ∗ satisfies ‖Πiθ∗‖2 = √ di d , optimal regulariza- tion ( i.e. , pick λ that minimizes the generalization risk of θ̂λ , n , d ) results in a monotone generalization risk curve—in other words , with optimal regularization , more data samples always improve generalization . Thus there is no sample-wise double or multiple descent . This provides a theoretical proof of a phenomenon observed in ( Nakkiran et al. , 2021 ) that optimal regularization can mitigate double descent for anisotropic data . Note that without regularization , there will be a blow-up in expected excess risk when n = d ( the linear model exactly interpolates the data ) and therefore , there is no samplewise descent across the under- and over-parameterized regimes . 2 PRELIMINARIES Notation Write [ m ] for { 1 , 2 , . . . , m } . Let i denote the imaginary unit . If x ∈ Rn and Σ ∈ Rn×n is a positive semidefinite matrix , write ‖x‖Σ , √ x > Σx . For a vector x , let ‖·‖1 and ‖·‖2 denote the ` 1 and ` 2 norm , respectively . Let denote the Hadamard ( entry-wise ) product between vectors . Write ‖ · ‖2 and ‖ · ‖F for the spectral matrix norm and Frobenius matrix norm , respectively . Let 4 denotes the Loewner order . For two square matrices A and B of the same size , write A 4 B if B − A is positive semidefinite . Define spec ( A ) as the set of all eigenvalues of A . Let O ( d ) = { A ∈ Rd×d | AA > = A > A = Id } denote the set of d × d orthogonal matrices . Define Sd−1 ( r ) , { x ∈ Rd | ‖x‖2 = r } . Denote almost sure convergence by a.s.→ , and convergence in probability plim and P→ . Ridge Estimator and Minimum-Norm Estimator We begin with the equivalent characterizations of the ridge and minimum-norm estimator . An equivalent characterization of the ridge estimator θ̂λ , n , d is θ̂λ , n , d = ( X > X + λnId ) −1 X > y = X > ( λnIn +XX > ) −1 y . ( 2 ) The second equality in Equation ( 2 ) is because of the Sherman–Morrison–Woodbury formula . A proof of Equation ( 2 ) can be found in ( Tsigler & Bartlett , 2020 ) . An equivalent definition of the minimum-norm estimator θ̂0 , n , d is that θ̂0 , n , d solves the following minimization problem min θ∈Rd ‖θ‖2 such that X > Xθ = X > y . Thus we have θ̂0 , n , d = ( X > X ) + X > y = X > ( XX > ) + y = X+y , where A+ denotes the pseudo-inverse of A . The second and third equalities are because of the identity X+ = ( X > X ) + X > = X > ( XX > ) + . The minimum-norm estimator is the limit of the ridge estimator θ̂λ , n , d as λ→ 0+ : θ̂0 , n , d = lim λ→0+ θ̂λ , n , d . This is because of the identity limλ→0+ ( X > X + λnId ) −1 X > = limλ→0+ X > ( λnIn +XX > ) −1 = X+ . Bias-Variance Decomposition of Expected Excess Risk We first show that the excess risk of an estimator θ equals the norm of θ − θ∗ : R ( θ ) = E ( x , y ) ∼D [ ( y − x > θ ) 2 − ( y − x > θ∗ ) ] = Ex [ ( x > ( θ∗ − θ ) ) 2 ] = E [ ( θ∗ − θ ) > Σ ( θ∗ − θ ) ] = E [ ‖θ∗ − θ‖2Σ ] . For the ridge estimator , the expected excess risk is Rλ , d , n =E [ ‖θ∗ −X > ( nλIn +XX > ) −1 ( Xθ∗ + ) ‖2Σ ] =E [ ‖ ( Id −X > ( nλIn +XX > ) −1X ) θ∗ −X > ( nλIn +XX > ) −1 ‖2Σ ] =E [ ‖ ( Id −X > ( nλIn +XX > ) −1X ) θ∗‖2Σ ] + E [ ∥∥X > ( nλIn +XX > ) −1 ∥∥2Σ ] =E [ ‖ ( Id −X > ( nλIn +XX > ) −1X ) θ∗‖2Σ ] + σ2E tr [ XΣX > ( nλIn +XX > ) −2 ] , Bλ , d , n + Vλ , d , n . ( 3 ) For the minimum-norm estimator , the expected excess risk is R0 , d , n = E [ ‖θ∗ −X+ ( Xθ∗ + ) ‖2Σ ] = E [ ∥∥ ( Id −X+X ) θ∗ −X+ ∥∥2Σ ] = E [ ∥∥ ( Id −X+X ) θ∗∥∥2Σ ] + E [ ∥∥X+ ∥∥2Σ ] = E [ ∥∥ ( Id −X+X ) θ∗∥∥2Σ ] + σ2E tr [ ( X+ ) > ΣX+ ] , B0 , d , n + V0 , d , n . ( 4 ) We call Bλ , d , n and B0 , d , n the bias term , and call Vλ , d , n and V0 , d , n the variance term . The bias and variance for the minimum-norm estimator are the limit of their counterpart for the ridge estimator as λ → 0+ , i.e. , limλ→0+ Bλ , d , n = B0 , d , n and limλ→0+ Vλ , d , n = V0 , d , n ( this can be shown by Lebesgue ’ s dominated convergence theorem , see our proof in Lemma 5 and Lemma 6 , respectively ) . 3 MAIN RESULTS 3.1 LIMITING RISK AND SAMPLE-WISE MULTIPLE DESCENT We study the limiting bias and variance for a linear regression problem in which the data distribution follows a multivariate normal distribution , the spectrum of the covariance matrix exhibits a block structure and tends to a discrete distribution . Thanks to the random matrix theory , we obtain the formulae ( presented in Theorem 1 ) for the limiting bias and variance , and thereby the total risk . We use two methods to obtain these formulae . The first method is through the Stieltjes transform of the matrix 1nXX > . The central quantity for computing the limiting bias and variance through the first method is the solution ρ∗ to the optimization problem Equation ( 5 ) in Item 1 of Theorem 1 . Item 1 guarantees the existence of a solution and determines its optimality condition Equation ( 6 ) . Item 2 computes the Jacobian matrix of ρ∗ with respect to λi and provides a closed-form formula to compute the Jacobian matrix . Equation ( 9 ) and Equation ( 10 ) in Item 4 give the formulae for the limiting bias obtained by the first method . Equation ( 11 ) and Equation ( 12 ) give the limiting variance . The second method is through the convex Gaussian min-max theorem ( CGMT ) ( Thrampoulidis et al. , 2015 ) . The central quantity is the solution r∗ to the minimax optimization problem Equation ( 8 ) in Item 3 . We use CGMT to obtain the formulae for the variance term . They are presented in Equation ( 13 ) and Equation ( 14 ) in Item 4 . Theorem 1 . The following statements hold : 1 . There exists a minimizer ρ ∈ Rm+ that solves inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) . ( 5 ) The minimizer ρ∗ satisfies λi λ+ ∑m j=1 λjρ ∗ j + 1− zi ρi = 0 , ∀i ∈ [ m ] . ( 6 ) 2 . Let ρ∗ ∈ Rm be a minimizer of Equation ( 5 ) and J = ∂ρ ∗ ∂λ ∈ R m×m be the Jacobian matrix Jij = ∂ρ∗i ∂λj . Then J is given by J = ( diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > ) −1 ( ( z− ρ∗ ) ρ∗ > − diag ( ρ∗ ) ) and the matrix ( diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > ) is always invertible . 3 . Define r = ( r1 , . . . , rm ) , λ = ( λ1 , . . . , λm ) , and ϑ ( rt , r , λ ) = 2rt √ 1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t . ( 7 ) For any Kt ≥ 2λ and Ku ≥ 2λ+ ( 2+ √ γ ) λ , we have max 0≤rt≤Kt min 0≤ri≤Ku ϑ ( rt , r , λ ) = min 0≤ri≤Ku max 0≤rt≤Kt ϑ ( rt , r , λ ) = max rt≥0 min ri≥0 ϑ ( rt , r , λ ) = min ri≥0 max rt≥0 ϑ ( rt , r , λ ) ( 8 ) and the above optimization problem has a solution . 4 . Let r∗ = ( r∗1 , . . . , r ∗ m ) solve Equation ( 8 ) . Define q = ( η21/z1 , . . . , η 2 m/zm ) > and view λ = ( λ1 , . . . , λm ) > as a column vector . The limiting bias is given by lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi Bλ , d , n = q > ( λ ρ∗ + Jλ 2 ) , ( 9 ) lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi B0 , d , n = lim λ→0+ q > ( λ ρ∗ + Jλ 2 ) . ( 10 ) The limiting variance is given by lim n , di→+∞ di/n→zi Vλ , d , n = σ 2λ 2 > ( ρ∗ + J > λ ) ( λ+ λ > ρ∗ ) 2 , ( 11 ) lim n , di→+∞ di/n→zi V0 , d , n = σ 2 lim λ→0+ λ 2 > ( ρ∗ + J > λ ) ( λ+ λ > ρ∗ ) 2 , ( 12 ) lim n , di→+∞ di/n→zi Vλ , d , n = σ 2 m∑ i=1 r∗2i , ( 13 ) lim n , di→+∞ di/n→zi V0 , d , n = σ 2 lim λ→0+ m∑ i=1 r∗2i . ( 14 ) Figure 1 illustrates the theoretical and numerical values of the bias , variance , and total risk . We observe a triple descent in Figure 1a where the covariance matrix has three blocks , and a quadruple descent in Figure 1b where the covariance has four blocks . In the three-block example , we set λ3 λ2 λ1 ( λ1 = 1 , λ2 = 100 , λ3 = 1000 ) . In the four-block example , we set λ4 λ3 λ2 λ1 ( λ1 = 1 , λ2 = 100 , λ3 = 104 , λ4 = 107 ) . For the values of other parameters , please refer to the caption of Figure 1 Our findings provide an explanation for the occurrence of sample-wise multiple descent : it occurs when the covariance matrix is highly ill-conditioned . Moreover , we find that the generalization risk curve is continuous in ridge regression ( λ > 0 ) while it blows up at n = d in ridgeless regression ( λ = 0 ) . We can see the singularity ( at n = d = 200 ) of the ridgeless generalization risk curve in Figure 2a . Following Theorem 1 , we focus on the variance in the ridgeless case ( λ = 0 ) and further study the expressions in Equation ( 13 ) and Equation ( 14 ) . We find that the variance exhibits sharply different behaviors in the underparameterized and overparameterized regimes . Recall that we will let n , di → +∞ and keep di/n → zi . Then d/n → ∑ i∈ [ m ] zi . If lim d/n = ∑ i∈ [ m ] zi > 1 , we are in the underparameterized regime . In this regime , the bias vanishes and therefore the risk equals the variance . If lim d/n < 1 , we are in the overparameterized regime . Theorem 2 . If d/n→ ∑ i∈ [ m ] zi > 1 and r ∗ = ( r∗1 , . . . , r ∗ m ) solves min ri≥0 ∑ i∈ [ m ] 1 λi r2i subject to √∑ i∈ [ m ] r2i + 1 = ∑ i∈ [ m ] √ ziri , then we have an optimality condition for r∗ : r∗i r∗j = λi λj · √ ziA ∗ − r∗i√ zjA∗ − r∗j , i , j ∈ [ m ] , ( 15 ) where A∗ = √∑ i∈ [ m ] r ∗2 i + 1 . Moreover , we have limn , di→+∞ di/n→zi V0 , d , n = σ 2 limλ→0+ ∑m i=1 r ∗2 i . If d/n→ ∑ i∈ [ m ] zi < 1 , then we have lim n , di→+∞ di/n→zi V0 , d , n = σ 2 ∑ i∈ [ m ] zi 1− ∑ i∈ [ m ] zi . . Corollary 1 . If m = 1 and d/n→ z1 > 1 , we have limn , di→+∞ di/n→zi V0 , d , n = σ 2 1 z1−1 . Proof . In the case m = 1 , we have r∗1 solves minr1≥0 1 λ1 r21 subject to √ r21 + 1 = √ z1r1 . The equality constraint gives r∗21 = 1 z1−1 . Then by Theorem 2 , the limiting variance is σ 2r∗21 = σ 2 1 z1−1 . In Theorem 2 , we find that in the underparameterized regime , r∗ solves an equality-constrained minimization problem . In the proof of Theorem 2 , we see that the equality constraint is feasible in the underparameterized regime but infeasible in the overparameterized regime . Moreover , we present an optimality condition for r∗ , which will be used in Theorem 3 to study the two-block ( m = 2 ) case . If the data distribution is isotropic ( which means that the covariance matrix is a scalar matrix ) , Collorary 1 shows that the limiting variance is σ2 1z1−1 , which agrees with ( Hastie et al. , 2019 , Theorem 1 ) . In the overparameterized regime , however , we find that the limiting variance does not depend on the spectrum { λ1 , . . . , λm } of the covariance matrix and only depends on the noise intensity σ and the ratios zi = lim di/n . This agrees with ( Hastie et al. , 2019 , Proposition 2 ) . In Theorem 3 , we study the case m = 2 and present a concrete closed-form formula for the limiting variance in the overparameterized regime . Recall that the limiting variance in the underparameterized regime has a closed-form σ2 ∑ i∈ [ m ] zi 1− ∑ i∈ [ m ] zi for general m , as shown in Theorem 2 . Theorem 3 . If m = 2 and d/n→ z1 + z2 > 1 , we have lim n , di→+∞ di/n→zi V0 , d , n = σ 2 q 2 + 1 q2 ( z1 − 1 ) + 2q √ z1z2 + z2 − 1 . where q = λ1 ( z1 − 1 ) + λ2 ( 1− z2 ) + √ ( λ1 ( z1 − 1 ) + λ2 ( 1− z2 ) ) 2 + 4λ1λ2z1z2 2λ2 √ z1z2 . ( 16 ) We illustrate the theoretical values predicted by Theorem 3 ( overparameterized regime ) and Theorem 2 ( underparameterized regime ) in Figure 2a and compare it to the numerical values . Corollary 2 ( Triple descent in the two-block case ) . Assume m = 2 , z1 = z2 , d/n→ ζ = 2z1 , and λ2/λ1 = % . Define f % ( ζ ) = limn , di→+∞ di/n→zi V0 , d , n . We have f ( ζ ) , lim % →+∞ fρ ( ζ ) = σ2 ζ1−ζ ζ < 1 , σ2 ( 1 ζ−1 + 2 2−ζ − 1 ) 1 < ζ < 2 σ2 2ζ−2 ζ > 2 . ( 17 ) There exists ζ1 , ζ2 , ζ3 , ζ4 and % 0 such that for all % > % 0 , we have f ′ % ( ζ1 ) < 0 , f ′ % ( ζ2 ) > 0 , f ′ % ( ζ3 ) < 0 , and f ′ % ( ζ4 ) < 0 . Proof . The case ζ < 1 is already given in Theorem 2 . In the sequel , assume ζ > 1 . Define q as in Equation ( 16 ) . We have q = ζ + √ ζ2 ( % + 1 ) 2 − 4ζ ( % − 1 ) 2 + 4 ( % − 1 ) 2 − ( ζ − 2 ) % − 2 2ζ % . Recall Theorem 3 , we get f % ( ζ ) = lim n , di→+∞ di/n→zi V0 , d , n = 2 ( q2 + 1 ) ζ ( q + 1 ) 2 − 2 ( q2 + 1 ) = 2σ2 ζ ( q+1 ) 2 q2+1 − 2 . Direct calculation yields lim % →+∞ f % ( ζ ) = σ2 ζ1−ζ ζ < 1 , σ2 ( 1 ζ−1 + 2 2−ζ − 1 ) 1 < ζ < 2 σ2 2ζ−2 ζ > 2 . , g ( ζ ) , lim % →+∞ f ′ % ( ζ ) = σ2 1 ( ζ−1 ) 2 ζ < 1 , σ2 ζ 2−2 ( ζ2−3ζ+2 ) 2 1 < ζ < 2 σ2 −2 ( ζ−2 ) 2 ζ > 2 . , The function g ( ζ ) > 0 if ζ ∈ ( √ 2 , 2 ) and we have g ( ζ ) < 0 if ζ < √ 2 or ζ > 2 . Pick ζ1 > 2 > ζ2 > √ 2 > ζ3 > 1 > ζ4 . Then we have g ( ζ1 ) < 0 , g ( ζ2 ) > 0 , g ( ζ3 ) < 0 , and g ( ζ4 ) > 0 . There exists % 0 such that for all % > % 0 , we have f ′ % ( ζ1 ) < 0 , f ′ % ( ζ2 ) > 0 , f ′ % ( ζ3 ) < 0 , and f ′ % ( ζ4 ) < 0 . Collorary 2 theoretically proves that there exists triple descent when m = 2 and λ2 λ1 . Note that a larger ζ = lim d/n reflects a relatively smaller n. If f ′ % ( ζ ) < 0 , then f % ( ζ ) decreases on a neighborhood of ζ and therefore the limiting variance increases with a relatively larger n. As n becomes relatively larger , we see an increasing stage , a decreasing stage , and finally an increasing stage in order in the overparameterized regime ( n < d ) . When we further increase n and enter the underparameterized regime , we observe a decreasing stage . We illustrate f ( ζ ) in Figure 2b . In Figure 2b , we observe two singularities at ζ = 1 and ζ = 2 . 3.2 OPTIMAL REGULARIZATION MONOTONIZES GENERALIZATION RISK CURVE Recall the definition of the ridge estimator in Definition 1 . Since this subsection concerns samplewise monotonicity , we add a subscript n toX and y ( they are defined by Equation ( 1 ) in Section 1.1 ) to emphasize that they consist of n data items . Therefore we write θ̂λ , n , d , arg min θ 1 n ‖yn −Xnθ‖22 + λ ‖θ‖ 2 2 . In this subsection , under an assumption , we show that optimal regularization ( i.e. , pick λ that minimizes the generalization risk of θ̂λ , n , d ) results in a monotone generalization risk curve—in other words , with optimal regularization , more data always reduces the generalization risk . The assump- tion is that ‖Πiθ∗‖2 = √ di d , i.e. , the squared norm of the projection of θ ∗ onto each eigenspace of the covariance matrix is proportional to the dimension of that eigenspace . ( Nakkiran et al. , 2021 ) showed by numerical results that optimal regularization can mitigate double descent for anisotropic data distribution . We give a partial theoretical proof of their observed phenomenon . To ease the notation , we use γi , limn/di rather than zi , lim di/n in Theorem 4 because a larger γ reflects a relatively larger n ( in the limit ) . Theorem 4 shows that with the optimal regularization , the limiting risk is an increasing function of γ1 , . . . , γm . Theorem 4 ( Optimal regularization ) . If ‖Πiθ∗‖2 = √ di d , ( 18 ) then there exists a function g ( γ1 , . . . , γm ) such that g ( γ1 , . . . , γm ) is increasing in every γi and lim n , di→∞ n/di→γi inf λ > 0 EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ = g ( γ1 , . . . , γm ) . 4 CONCLUSION We studied the generalization risk ( test error ) versus the number of training samples in ridgeless regression . Under the assumption that the data distribution is Gaussian and the spectrum distribution of its covariance matrix converges to a discrete distribution , we obtained the exact formulae for the limiting bias and variance terms using the random matrix theory when the dimension and the number of training samples go to infinity in a proportional manner . Using these formulae , we proved the sample-wise multiple descent phenomenon of the generalization risk curve.Moreover , we theoretically showed that the ridge estimator with optimal regularization can result in a monotone generalization risk curve and thereby eliminate multiple descent under some assumptions . REFERENCES Madhu S Advani , Andrew M Saxe , and Haim Sompolinsky . High-dimensional dynamics of gener- alization error in neural networks . Neural Networks , 132:428–446 , 2020 . Zhi-Dong Bai and Yong-Qua Yin . Limit of the smallest eigenvalue of a large dimensional sample covariance matrix . In Advances In Statistics , pp . 108–127 . World Scientific , 2008 . Zhidong Bai and Jack W Silverstein . Spectral analysis of large dimensional random matrices , volume 20 . Springer , 2010 . Peter L Bartlett , Philip M Long , Gábor Lugosi , and Alexander Tsigler . Benign overfitting in linear regression . Proceedings of the National Academy of Sciences , 117 ( 48 ) :30063–30070 , 2020 . Mikhail Belkin , Daniel Hsu , Siyuan Ma , and Soumik Mandal . Reconciling modern machinelearning practice and the classical bias–variance trade-off . Proceedings of the National Academy of Sciences , 116 ( 32 ) :15849–15854 , 2019 . Mikhail Belkin , Daniel Hsu , and Ji Xu . Two models of double descent for weak features . SIAM Journal on Mathematics of Data Science , 2 ( 4 ) :1167–1180 , 2020 . Siegfried Bös and Manfred Opper . Dynamics of batch training in a perceptron . Journal of Physics A : Mathematical and General , 31 ( 21 ) :4835 , 1998 . Lin Chen , Yifei Min , Mikhail Belkin , and Amin Karbasi . Multiple descent : Design your own generalization curve . arXiv preprint arXiv:2008.01036 , 2020a . Lin Chen , Yifei Min , Mingrui Zhang , and Amin Karbasi . More data can expand the generalization gap between adversarially robust and standard models . In International Conference on Machine Learning , pp . 1670–1680 . PMLR , 2020b . Donald L Cohn . Measure theory . Springer , 2013 . Edgar Dobriban and Stefan Wager . High-dimensional asymptotics of prediction : Ridge regression and classification . The Annals of Statistics , 46 ( 1 ) :247–279 , 2018 . Trevor Hastie , Andrea Montanari , Saharon Rosset , and Ryan J Tibshirani . Surprises in highdimensional ridgeless least squares interpolation . arXiv preprint arXiv:1903.08560 , 2019 . Shun ichi Amari , Jimmy Ba , Roger Baker Grosse , Xuechen Li , Atsushi Nitanda , Taiji Suzuki , Denny Wu , and Ji Xu . When does preconditioning help or hurt generalization ? In International Conference on Learning Representations , 2021 . URL https : //openreview.net/forum ? id= S724o4_WB3 . Anders Krogh and John A Hertz . Generalization in a linear perceptron in the presence of noise . Journal of Physics A : Mathematical and General , 25 ( 5 ) :1135 , 1992 . Yann Le Cun , Ido Kanter , and Sara A Solla . Eigenvalues of covariance matrices : Application to neural-network learning . Physical Review Letters , 66 ( 18 ) :2396 , 1991 . Tengyuan Liang , Alexander Rakhlin , and Xiyu Zhai . On the multiple descent of minimum-norm interpolants and restricted lower isometry of kernels . In Conference on Learning Theory , pp . 2683–2711 . PMLR , 2020 . F. Liese and K.J . Miescke . Statistical Decision Theory : Estimation , Testing , and Selection . Springer Series in Statistics . Springer New York , 2008 . ISBN 9780387731940 . Marco Loog , Tom Viering , Alexander Mey , Jesse H Krijthe , and David MJ Tax . A brief prehistory of double descent . Proceedings of the National Academy of Sciences , 117 ( 20 ) :10625–10626 , 2020 . Song Mei and Andrea Montanari . The generalization error of random features regression : Precise asymptotics and the double descent curve . Communications on Pure and Applied Mathematics , 2019 . Yifei Min , Lin Chen , and Amin Karbasi . The curious case of adversarially robust models : More data can help , double descend , or hurt generalization . In Conference on Uncertainty in Artificial Intelligence , 2021 . Preetum Nakkiran , Gal Kaplun , Yamini Bansal , Tristan Yang , Boaz Barak , and Ilya Sutskever . Deep double descent : Where bigger models and more data hurt . In International Conference on Learning Representations , 2020 . URL https : //openreview.net/forum ? id=B1g5sA4twr . Preetum Nakkiran , Prayaag Venkat , Sham M. Kakade , and Tengyu Ma . Optimal regularization can mitigate double descent . In International Conference on Learning Representations , 2021 . URL https : //openreview.net/forum ? id=7R7fAoUygoa . M Opper , W Kinzel , J Kleinz , and R Nehl . On the ability of the optimal perceptron to generalise . Journal of Physics A : Mathematical and General , 23 ( 11 ) : L581 , 1990 . Dominic Richards , Jaouad Mourtada , and Lorenzo Rosasco . Asymptotics of ridge ( less ) regression under general source condition . In International Conference on Artificial Intelligence and Statistics , pp . 3889–3897 . PMLR , 2021 . Walter Rudin . Principles of mathematical analysis . New York , NY : McGraw-Hill , Inc. , 3 edition , 1976 . Christos Thrampoulidis , Samet Oymak , and Babak Hassibi . Regularized linear regression : A precise analysis of the estimation error . Proceedings of Machine Learning Research , 40:1683–1709 , 2015 . Alexander Tsigler and Peter L Bartlett . Benign overfitting in ridge regression . arXiv preprint arXiv:2009.14286 , 2020 . F Vallet , J-G Cailton , and Ph Refregier . Linear and nonlinear extension of the pseudo-inverse solution for learning boolean functions . EPL ( Europhysics Letters ) , 9 ( 4 ) :315 , 1989 . Roman Vershynin . Introduction to the non-asymptotic analysis of random matrices . arXiv preprint arXiv:1011.3027 , 2010 . Roman Vershynin . High-dimensional probability : An introduction with applications in data science , volume 47 . Cambridge university press , 2018 . Timothy LH Watkin , Albrecht Rau , and Michael Biehl . The statistical mechanics of learning a rule . Reviews of Modern Physics , 65 ( 2 ) :499 , 1993 . Denny Wu and Ji Xu . On the optimal weighted ` 2 regularization in overparameterized linear regression . arXiv preprint arXiv:2006.05800 , 2020 . A EIGENDECOMPOSITION AND MORE NOTATION Write Σ = PΛP > , where P is an orthogonal matrix and Λ = diag ( λ1Id1 , . . . , λmIdm ) ∈ Rd×d is a diagonal matrix . Write λ− = mini∈ [ m ] λi and λ+ = maxi∈ [ m ] λi . We can generate x1 , . . . , xn from standard normal random vector zi ∼ N ( 0 , Id ) by setting xi = PΛ1/2zi . Therefore , if Z = ( z1 . . . zn ) ∈ Rd×n , we get X > = ( x1 . . . xn ) = PΛ 1/2 ( z1 . . . zn ) = PΛ 1/2Z . Take the transpose gives X = Z > Λ1/2P > . Note that every entry of Z ∈ Rd×n follows i.i.d . N ( 0 , 1 ) . Write Z in a row-partitioned form Z = Z > 1 ... Z > m , where Zi ∈ Rn×di . Write P in a column-partitioned form P = ( P1 . . . Pm ) , where Pi ∈ Rd×di . Recall that Πi ∈ Rd×d denotes the orthogonal projection to the eigenspace of λi . We have Πi = PiP > i . Define θ ′ , P > θ∗ and write it in a row-partitioned form θ′ = P > 1 θ ∗ ... P > mθ ∗ = θ ′ 1 ... θ′m , ( 19 ) where θ′i ∈ Rdi . Then ‖θ′i‖2 = ∥∥P > i θ∗∥∥2 = ∥∥PiP > i θ∗∥∥2 = ‖Πiθ∗‖2 . We summarize part of the notation above in Table 1 . B BIAS AND VARIANCE UNDER EIGENDECOMPOSITION Lemma 1 characterizes the smallest and largest eigenvalue of Z > Z d ( if n/d → γ < 1 ) and ZZ > n ( if n/d→ γ > 1 ) . Recall that we study the asymptotic regime di/n→ zi . Therefore γ = 1∑ j∈ [ m ] zj . Lemma 1 ( ( Bai & Yin , 2008 , Theorem 2 ) ) . Let Z ∈ Rd×n be a random matrix whose entries are i.i.d . N ( 0 , 1 ) random variables . As n , d→ +∞ , n/d→ γ ∈ ( 0 , 1 ) , we have limλmin ( Z > Z d ) = ( 1−√γ ) 2 , limλmax ( Z > Z d ) = ( 1 + √ γ ) 2 almost surely . If γ ∈ ( 1 , ∞ ) , as n , d→ +∞ , n/d→ γ , we have limλmin ( ZZ > n ) = ( 1− √ 1/γ ) 2 , limλmax ( ZZ > n ) = ( 1 + √ 1/γ ) 2 almost surely . Lemma 2 ( Corollary 5.35 ( Vershynin , 2010 ) ) . Let A be an N × n matrix whose entries are independent standard normal random variables . Then for every t ≥ 0 , with probability at least 1− 2 exp ( −t2/2 ) one has √ N − √ n− t ≤ smin ( A ) ≤ smax ( A ) ≤ √ N + √ n+ t , where smin ( A ) and smax ( A ) are the smallest and largest singular value of A. Lemma 3 . Let Z ∈ Rd×n be a random matrix whose entries are i.i.d . N ( 0 , 1 ) random variables , where d = d ( n ) satisfies limn→∞ nd ( n ) = γ . There exists universal positive constants C1 , C2 , N such that for all n > N , we have 0 < C1 < 1 n s2min ( Z ) ≤ 1 n s2max ( Z ) < C2 . Proof . Since d ( n ) n , with loss of generality , we assume n/d → γ ∈ ( 0 , 1 ) . Take t = c1 √ n in Lemma 2 , where c1 = 12 ( 1√ γ − 1 ) > 0 . With probability at least 1− 2e−c21n/2 , we have √ d− √ n− c1 √ n ≤ smin ( Z ) ≤ smax ( Z ) ≤ √ d+ √ n+ c1 √ n . Therefore , we deduce ( √ d n − 1− c1 ) 2 ≤ 1 n s2min ( Z ) ≤ 1 n s2max ( Z ) ≤ ( √ d n + 1 + c1 ) 2 . Define C1 = 18 ( 1√ γ − 1 ) 2 > 0 and C2 = ( 3√ γ + 1 ) 2 . Then there exists a universal constant N1 such that for all n > N1 , with probability at least 1− 2e−c 2 1n/2 , we have 0 < C1 < 1 n s2min ( Z ) ≤ 1 n s2max ( Z ) < C2 . Define event En = { C1 < 1 ns 2 min ( Z ) ≤ 1ns 2 max ( Z ) < C2 } c . Then we have Pr { En } ≤ 2e−c 2 1n/2 . Since ∑ n≥1 Pr { En } ≤ ∑ n≥1 2e −c21n/2 < ∞ , then the probability that infinitely many of En occur is 0 , i.e. , Pr { lim sup n En } = 0 . Therefore , there exists a universal constant N2 such that for all n > N2 , En does not happen , in other words , 0 < C1 < 1 n s2min ( Z ) ≤ 1 n s2max ( Z ) < C2 holds . Lemma 4 . Let Z ∈ Rd×n be a random matrix whose entries are i.i.d . N ( 0 , 1 ) random variables , and let p be a fixed positive integer which is viewed as a constant and hidden in .. If n d , we have E tr ( ZZ > ) n2 , E tr ( ZZ > ) 2 n3 , and E ‖Z‖p2 . np/2 . Proof . We have E tr ( ZZ > ) = E ‖Z‖2F = ∑ i∈ [ d ] , j∈ [ n ] Ez2ij = nd n2 . Write Z = z > 1 ... z > d , where zi ∈ Rn and zi ∼ N ( 0 , In ) . We have E ( z > i zi ) 2 = E ‖zi‖42 = n ( n + 2 ) . For i 6= j , we deduce E ( z > i zj ) 2 = E ( ‖zi‖2 ‖zj‖2 u > v ) 2 where u , v ∼ Unif ( Sn−1 ) and ‖zi‖2 , ‖zj‖2 , u , v are independent . Then we get E ( ‖zi‖ ‖zj‖ s > i sj ) 2 = E ‖zi‖22 ‖zj‖ 2 2 ( s > i sj ) 2 = n2Eu21 = n2 · 1 n = n . As a result , we have E tr ( ZZ > ) 2 = E ∥∥ZZ > ∥∥2 F = ∑ i , j∈ [ d ] E ( z > i zj ) 2 = dn ( n+ 2 ) + ( d2 − d ) n n3 . By ( Vershynin , 2018 ) , there exists a universal constant C > 0 such that for any t > 0 , P { ‖Z‖2 > C ( √ n+ √ d+ t ) } < 2e−t 2 . Define K = C ( √ n+ √ d ) . Then we have P { ‖Z‖2 > K + t } < 2e −t2/C2 . ( 20 ) Recall Γ ( z ) = ∫∞ 0 xz−1e−xdx . Setting t = C √ u in the equation below yields∫ ∞ 0 e−t 2/C2tp−1dt . ∫ ∞ 0 e−uu p 2−1du = Γ ( p 2 ) 1 . Then we can bound the following integral∫ ∞ K P { ‖Z‖2 ≥ t } pt p−1dt = ∫ ∞ 0 P { ‖Z‖2 ≥ K + t } p ( t+K ) p−1 dt . ∫ ∞ 0 e−t 2/C2 ( t+K ) p−1 dt . ∫ ∞ 0 e−t 2/C2 ( tp−1 +Kp−1 ) dt = ∫ ∞ 0 e−t 2/C2tp−1dt+Kp−1 ∫ ∞ 0 e−t 2/C2dt .n p−1 2 , where the first inequality is because of Equation ( 20 ) . We are in a position to bound E ‖Z‖p2 : E ‖Z‖p2 = ∫ ∞ 0 P { ‖Z‖p2 ≥ u } du = ∫ ∞ 0 P { ‖Z‖2 ≥ t } pt p−1dt = ∫ K 0 P { ‖Z‖2 ≥ t } pt p−1dt+ ∫ ∞ K P { ‖Z‖2 ≥ t } pt p−1dt .np/2 + n ( p−1 ) /2 .np/2 , where the first inequality is because∫ K 0 P { ‖Z‖2 ≥ t } pt p−1dt ≤ ∫ K 0 ptp−1dt = Kp . np/2 . Lemma 5 . The following equation for the bias term Bλ , d , n ( defined in Equation ( 3 ) ) holds Bλ , d , n =E [ ‖Λ1/2 ( Id − Λ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2 ) θ′‖22 ] ( 21 ) =E [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] . ( 22 ) Moreover , we have |Bλ , d , n| . ‖θ∗‖22 and limλ→0+ Bλ , d , n = B0 , d , n . For all sufficiently large n and d such that n/d → γ ∈ ( 0 , 1 ) , we have 0 ≤ ddλBλ , d , n . ‖θ ∗‖22 . Therefore , { Bλ , d , n } is uniformly bounded and uniformly equicontinuous with respect to λ ∈ ( 0 , ∞ ) . Proof . Introduce the shorthand notation M = Λ1/2ZZ > Λ1/2 ∈ Rd×d , A = Id + 1nλM ∈ R d×d , N = nλIn + Z > ΛZ ∈ Rn×n , and Q = Id − Λ1/2ZN−1Z > Λ1/2 ∈ Rd×d . Because X > ( nλIn +XX > ) −1X = PΛ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2P > , we have Bλ , d , n =E [ ‖ ( Id − PΛ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2P > ) θ∗‖2PΛP > ] =E [ ‖Λ1/2 ( Id − Λ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2 ) θ′‖22 ] =E [ ‖Λ1/2Qθ′‖22 ] . Using the Sherman–Morrison-Woodbury formula yields N−1 = 1 nλ In − 1 ( nλ ) 2Z > Λ1/2 ( I + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 Λ1/2Z = 1 nλ ( In − Z > Λ1/2 ( nλId + Λ 1/2ZZ > Λ1/2 ) −1 Λ1/2Z ) = 1 nλ ( In − Z > Λ1/2 ( nλId +M ) −1 Λ1/2Z ) . ( 23 ) It follows that Q =Id − Λ1/2ZN−1Z > Λ1/2 =Id − 1 nλ Λ1/2Z ( In − Z > Λ1/2 ( nλId +M ) −1 Λ1/2Z ) Z > Λ1/2 =Id − M nλ ( Id − ( nλId +M ) −1M ) =Id − M nλ ( Id − ( nλId +M ) −1 ( nλId +M − nλId ) ) =Id −M ( nλId +M ) −1 = ( Id + 1 nλ M ) −1 =A−1 . Therefore , we deduce Bλ , d , n = E [ ‖Λ1/2 ( Id + 1 nλ M ) −1 θ′‖22 ] = E [ ‖Λ1/2A−1θ′‖22 ] . Because ∥∥Λ1/2∥∥ 2 . 1 and ∥∥∥ ( Id + 1nλΛ1/2ZZ > Λ1/2 ) −1∥∥∥ 2 ≤ 1 , we have ‖Λ1/2A−1θ′‖22 . ‖θ′‖ 2 2 = ‖θ ∗‖22 . Therefore |Bλ , d , n| . ‖θ∗‖22 . Moreover , by the dominated convergence theorem , lim λ→0+ Bλ , d , n = B0 , d , n . We compute the derivative of A−1 : dA−1 dλ = −A−1 dA dλ A−1 = MA−2 nλ2 . The matrix Mn = Λ1/2ZZ > Λ1/2 n ∈ R d×d is positive semidefinite and its d − n smallest eigenvalues are zeros . Its non-zero eigenvalues are the same as the non-zero eigenvalues of Z > ΛZ n . Because all eigenvalues of Z > ΛZ n are positive almost surely , the spectrum of M n consists of d− n zeros and the spectrum of Z > ΛZ n . We study the range of the spectrum of Z > ΛZ n . Because λ− Z > Z n 4 Z > ΛZ n 4 λ+ Z > Z n , we deduce λmin ( Z > ΛZ n ) ≥ λ−λmin ( Z > Z n ) → λ− ( 1− √ 1/γ ) 2 ( 24 ) λmax ( Z > ΛZ n ) ≤ λ+λmax ( Z > Z n ) → λ+ ( 1 + √ 1/γ ) 2 . ( 25 ) Define L1 = λ−λmin ( Z > Z n ) and L2 = λ+λmax ( Z > Z n ) . We get limn , d→+∞ n/d→γ < 1 L1 = λ− ( 1− √ 1/γ ) 2 , limn , d→+∞ n/d→γ < 1 L2 = λ+ ( 1 + √ 1/γ ) 2 and spec ( Z > ΛZ n ) ⊆ [ L1 , L2 ] . We bound ∥∥MA−3∥∥ 2 ∥∥MA−3∥∥ 2 =n ∥∥∥∥∥Mn ( Id + M nλ ) −3∥∥∥∥∥ 2 =n max s∈spec ( Mn ) s ( 1 + s/λ ) 3 =n max s∈ { 0 } ∪spec ( Z > ΛZ n . ) s ( 1 + s/λ ) 3 =n max s∈spec ( Z > ΛZ n . ) s ( 1 + s/λ ) 3 ≤n max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 . We compute ddλ‖Λ 1/2A−1θ′‖22 : d dλ ‖Λ1/2A−1θ′‖22 = 1 nλ2 θ′ > ( A−1ΛMA−2 +MA−2ΛA−1 ) θ′ = 1 nλ2 ( A−1θ′ ) > ( ΛMA−1 +MA−1Λ ) ( A−1θ′ ) Next , we bound ∣∣ d dλ‖Λ 1/2A−1θ′‖22 ∣∣ : ∣∣∣∣ ddλBλ , d , n ∣∣∣∣ ≤ 1 nλ2 ∥∥MA−2ΛA−1 +A−1ΛMA−2∥∥ 2 ‖θ′‖22 ≤ 2 nλ2 ∥∥MA−2ΛA−1∥∥ 2 ‖θ′‖22 = 2 nλ2 ∥∥MA−3AΛA−1∥∥ 2 ‖θ′‖22 ≤ 2 nλ2 ∥∥MA−3∥∥ 2 ∥∥AΛA−1∥∥ 2 ‖θ′‖22 . 1 λ2 max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 ‖θ ′‖22 , where the last inequality is because ∥∥AΛA−1∥∥ 2 = ‖Λ‖2 ≤ λ+ . 1 . Define f ( s ) = s ( 1+s/λ ) 3 . Because f ′ ( s ) = λ 3 ( λ−2s ) ( λ+s ) 4 , the function f is increasing on [ 0 , λ/2 ] and decreasing on [ λ/2 , +∞ ) . If λ ≤ 2L1 , we have max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 = L1 ( 1 + L1/λ ) 3 . It follows that 1 λ2 · L1 ( 1 + L1/λ ) 3 = L1λ ( λ+ L1 ) 3 ≤ max λ∈ [ 0,2L1 ] L1λ ( λ+ L1 ) 3 . 1 L1 . If λ ≥ 2L2 , we get 1 λ2 max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 = 1 λ2 · L2 ( 1 + L2/λ ) 3 ≤ max λ∈ [ 2L2 , ∞ ) L2λ ( λ+ L2 ) 3 . 1 L2 ≤ 1 L1 . If 2L1 < λ < 2L2 , we obtain 1 λ2 max s∈ [ L1 , L2 ] s ( 1 + s/λ ) 3 . 1 λ . 1 L1 . In all three cases , we show that 1λ2 maxs∈ [ L1 , L2 ] s ( 1+s/λ ) 3 . 1L1 . It follows that∣∣∣∣ ddλ‖Λ1/2A−1θ′‖22 ∣∣∣∣ . 1L1 ‖θ′‖22 = ‖θ ′‖22 λ−λmin ( Z > Z n ) ‖θ′‖22 λmin ( Z > Z n ) . By Lemma 3 , there exists a universal constant n0 such that for all n > n0 , one has 1 λmin ( Z > Z n ) . 1 . Thus we conclude that ∣∣∣∣ ddλ‖Λ1/2A−1θ′‖22 ∣∣∣∣ . ‖θ′‖22 . We can exchange differentiation and expectation and get d dλ Bλ , d , n = E [ d dλ ‖Λ1/2A−1θ′‖22 ] and ∣∣∣∣ ddλBλ , d , n ∣∣∣∣ = E [ ∣∣∣∣ ddλ‖Λ1/2A−1θ′‖22 ∣∣∣∣ ] . ‖θ′‖22 . Lemma 6 . The following equation for the variance term holds Vλ , d , n =σ 2E‖Λ1/2 ( λnId + Λ 1/2ZZ > Λ1/2 ) −1 Λ1/2Z‖22 =σ2E‖ΛZ ( λnIn + Z > ΛZ ) −1 ‖22 . Moreover , for all sufficiently large n and d such that n/d → γ 6= 1 , we have limλ→0+ Vλ , d , n = V0 , d , n , |Vλ , d , n| . 1 and ∣∣ d dλVλ , d , n ∣∣ . 1 . Therefore , { Vλ , d , n } is uniformly bounded and uniformly equicontinuous with respect to λ ∈ ( 0 , ∞ ) . Proof . As in the proof of Lemma 5 , defineM = Λ1/2ZZ > Λ1/2 ∈ Rd×d andN = nλIn+Z > ΛZ ∈ Rn×n . Recalling Σ = PΛP > and X = Z > Λ1/2P > , we have Vλ , d , n =σ 2E tr [ XΣX > ( nλIn +XX > ) −2 ] =σ2E tr [ Z > Λ2ZN−2 ] =σ2E tr [ N−1Z > Λ2ZN−1 ] =σ2E ∥∥ΛZN−1∥∥2 F . Recalling Equation ( 23 ) yields ΛZN−1 = 1 nλ ΛZ ( In − Z > Λ1/2 ( nλId +M ) −1 Λ1/2Z ) = 1 nλ Λ1/2 ( In −M ( nλId +M ) −1 ) Λ1/2Z =Λ1/2 ( nλId +M ) −1 Λ1/2Z . Define R = Λ1/2Z ∈ Rd×n . We get ( nλId +M ) −1 Λ1/2Z = ( nλId +RR > ) −1R . Notice that if 0 < a < b , then aId +RR > 4 bId +RR > . We deduce ( bId +RR > ) 2 − ( aId +RR > ) 2 = ( b2 − a2 ) Id + 2 ( b− a ) RR > < 0 . Thus ( bId +RR > ) 2 < ( aId +RR > ) 2 , which implies ( bId +RR > ) −2 4 ( aId +RR > ) −2 . We get R > ( bId +RR > ) −2R 4 R > ( aId +RR > ) −2R , tr ( R > ( bId +RR > ) −2R ) ≤ tr ( R > ( aId +RR > ) −2R ) Let λ0 ( · ) denote the smallest non-zero eigenvalue of a positive semidefinite matrix . We bound the Frobenius norm ∥∥∥ ( nλId +M ) −1 Λ1/2Z∥∥∥2 F = tr ( R > ( nλId +RR > ) −1R ) ≤ tr ( lim λ→0+ R > ( nλId +RR > ) −2R ) = tr ( R > R ) + = tr ( Z > ΛZ ) + . tr ( Z > Z ) + . It follows that∥∥ΛZN−1∥∥2 F = ∥∥∥Λ1/2 ( nλId +M ) −1 Λ1/2Z∥∥∥2 F . ∥∥∥ ( nλId +M ) −1 Λ1/2Z∥∥∥2 F . tr ( Z > Z ) + = tr ( ZZ > ) + . If n/d → γ < 1 , the matrix Z > Z is full-rank almost surely . Then , using the formula for the mean of inverse Wishart distribution , we have E tr ( Z > Z ) + = trE ( Z > Z ) −1 = tr ( In d−n−1 ) 1 . If n/d → γ > 1 , the matrix ZZ > is full-rank almost surely . Similarly , we have E tr ( ZZ > ) + = trE ( ZZ > ) −1 1 . By the dominated convergence theorem , we have limλ→0+ Vλ , d , n = V0 , d , n . Moreover , Vλ , d , n . E ∥∥ΛZN−1∥∥2 F . 1 . Next we bound ddλV ( θ̂ ) . Because dN−1 dλ = −N −1 dN dλN −1 = −nN−2 , we deduce d dλ ∥∥ΛZN−1∥∥2 2 = d dλ tr ( N−1Z > Λ2ZN−1 ) = −2n tr ( Z > Λ2ZN−3 ) ≤ 0 . On the other hand , we have tr ( Z > Λ2ZN−3 ) = tr ( N−3/2Z > Λ2ZN−3/2 ) . tr ( N−3/2Z > ΛZN−3/2 ) = tr ( Z > ΛZN−3 ) = ∑ s∈spec ( Z > ΛZ ) s ( λn+ s ) 3 . Because the number of non-zero eigenvalues of Z > ΛZ equals rank ( Z > ΛZ ) = n ∧ d n , we get∣∣∣∣ ddλ ∥∥ΛZN−1∥∥22 ∣∣∣∣ n tr ( Z > Λ2ZN−3 ) . n2 max s∈spec ( Z > ΛZ ) s ( λn+ s ) 3 = max s∈spec ( Z > ΛZ n ) \ { 0 } s ( λ+ s ) 3 . If γ < 1 , the matrix Z > ΛZ n is full-rank almost surely . By Equation ( 24 ) and Equation ( 25 ) in the proof of Lemma 5 , there exists universal positive constants C1 and C2 such that spec ( Z > ΛZ n ) ⊆ [ C1 , C2 ] for all sufficiently large n and d such that n/d→ γ < 1 . If γ > 1 , the non-zero eigenvalues of Z > ΛZ n and M n are the same . The matrix M n is full-rank almost surely . Thus spec ( Z > ΛZ n ) \ { 0 } = spec ( M n ) . Because y > Λ−1y . y > y , λmin ( M n ) = min x6=0 x > Λ 1/2ZZ > Λ1/2 n x x > x = min y 6=0 y > ZZ > n y y > Λ−1y & min y 6=0 y > ZZ > n y y > y = λmin ( ZZ > n ) . Similarly , we get λmax ( M n ) . λmax ( ZZ > n ) . Therefore , there exists universal positive constants C1 and C2 such that spec ( Z > ΛZ n ) \ { 0 } ⊆ [ C1λmin ( Z > Z n ) , C2λmax ( Z > Z n ) ] . Thus in both cases , we have shown that there exists universal positive constants C1 and C2 such that spec ( Z > ΛZ n ) \ { 0 } ⊆ [ C1λmin ( Z > Z n ) , C2λmax ( Z > Z n ) ] . Define L1 = C1λmin ( Z > Z n ) and L2 = C2λmax ( Z > Z n ) . As a result , we get∣∣∣∣ ddλ ∥∥ΛZN−1∥∥22 ∣∣∣∣ . maxs∈ [ L1 , L2 ] s ( λ+ s ) 3 . Define f ( s ) = s ( λ+s ) 3 . Because f ′ ( s ) = λ−2s ( λ+s ) 4 , the function f is increasing on [ 0 , λ/2 ] and decreasing on [ λ/2 , +∞ ) . If λ ≥ 2L2 or λ ≤ 2L1 , we get max s∈ [ L1 , L2 ] s ( λ+ s ) 3 ≤ L1 ( λ+ L1 ) 3 ∨ L2 ( λ+ L2 ) 3 ≤ 1 L21 . If 2L1 < λ < 2L2 , we get max s∈ [ L1 , L2 ] s ( λ+ s ) 3 . 1 λ2 . 1 L21 . As a result , for all sufficiently large n , we have∣∣∣∣ ddλ ∥∥ΛZN−1∥∥22 ∣∣∣∣ = maxs∈ [ L1 , L2 ] s ( λ+ s ) 3 . 1L21 . 1λ2min ( Z > Zn ) . 1 , where the final inequality is because of Lemma 3 . We can exchange the expectation and differentiation and obtain d dλ Vλ , d , n = σ 2E d dλ ∥∥ΛZN−1∥∥2 2 and ∣∣∣∣ ddλVλ , d , n ∣∣∣∣ ≤ σ2E ∣∣∣∣ ddλ ∥∥ΛZN−1∥∥22 ∣∣∣∣ . 1 . C LEMMAS ON STIELTJES TRANSFORM Definition 3 ( Stieltjes transform ) . The Stieltjes transform of a distribution with cumulative distribution function F is defined by sF ( z ) = ∫ 1 λ− z dF ( λ ) ( z ∈ H , { z ∈ C | =z > 0 } ) . Lemma 7 ( Theorem 4.3 ( Bai & Silverstein , 2010 ) ) . Suppose that the entries of Xn ∈ Cn×p are complex random variables that are independent for each n and identically distributed for all n and satisfy E [ |x11 − Ex11|2 ] = 1 . Also , assume that Tn = diag ( τ1 , . . . , τp ) , τi is real , and the empirical distribution function of { τ1 , . . . , τp } converges almost surely to a probability distribution function H as n → ∞ . The entries of both Xn and Tn may depend on n , which is suppressed for brevity . Set Bn = An + 1nXnTnX ∗ n , where X ∗ n is the conjugate transpose of Xn , An is Hermitian , n× n satisfying FAn → FA almost surely , where FA is a distribution function ( possibly defective ) on the real line . Assume also that Xn , Tn , and An are independent . When p = p ( n ) with p/n → y > 0 as n → ∞ , then , almost surely , FBn , the empirical spectral distribution of the eigenvalues of Bn , converges vaguely , as n → ∞ , to a ( nonrandom ) distribution function F , where for any z ∈ C+ = { z ∈ C | =z > 0 } , its Stieltjes transform s = s ( z ) is the unique solution in C+ to the equation s = sA ( z − y ∫ τdH ( τ ) 1 + τs ) , where sA is the Stieltjes transform of FA . Lemma 8 . If the functions fα , gα : I → R satisfy fα ( x ) − gα ( x ) → 0 uniformly as α→ +∞ , then limα→+∞ ( infx∈I f ( x ) − infx∈I g ( x ) ) = 0 . Proof . Because fα ( x ) − gα ( x ) → 0 uniformly as α→ +∞ , we have for ∀ > 0 , there exists N ( ) such that for ∀α > N ( ) and ∀x ∈ I , it holds that |fα ( x ) − gα ( x ) | < . Therefore , we get gα ( x ) − < fα ( x ) < gα ( x ) + . Thus we obtain inf x∈I fα ( x ) ≤ fα ( x ) < gα ( x ) + inf x∈I gα ( x ) − ≤ gα ( x ) − < fα ( x ) , which in turn implies inf x∈I fα ( x ) ≤ inf x∈I gα ( x ) + inf x∈I gα ( x ) − ≤ inf x∈I fα ( x ) . It follows that |infx∈I fα ( x ) − infx∈I gα ( x ) | ≤ . In other words , we proved lim α→+∞ ( inf x∈I f ( x ) − inf x∈I g ( x ) ) = 0 . Lemma 9 . Define N = λnIn + Z > ΛZ . Then we have lim n , di→+∞ di/n→zi tr ( N−1 ) = d dλ inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) , ( 26 ) lim n , di→+∞ di/n→zi 1 n log det N n = inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . ( 27 ) Proof . Proof of Equation ( 26 ) . We apply Lemma 7 with An = 0n×n , Xn = Z > ∈ Rn×d , Tn = Λ , and Bn = 1nZ > ΛZ . The distribution function of 0n×n converges to 1t≤0 and its Stieltjes transform is sA ( z ) = ∫ 1 λ−zd1λ≤0 = − 1 z . The empirical distribution function of { λ1 , . . . , λ1︸ ︷︷ ︸ d1 , . . . , λm . . . , λm︸ ︷︷ ︸ dm } is Hn , di ( t ) = ∑ i∈ [ m ] di d 1t≤λi . Recall di/n → zi . Thus di/d → zi/K , where d/n → y = ∑ j∈ [ m ] zj . The empirical distribution function converges to H ( t ) = ∑ i∈ [ m ] zi y 1t≤λi . Then the empirical spectral distribution of the eigenvalues of 1 nZ > ΛZ converges vaguely to a nonrandom distribution function F and its Stieltjes transform is s = s ( z ) = lim n , di→+∞ di/n=zi 1 n tr ( 1 n Z > ΛZ − zIn ) −1 = lim n , di→+∞ di/n=zi tr ( Z > ΛZ − znIn ) −1 ( this is because of ( Bai & Silverstein , 2010 , Theorem B.9 ) ) . By Lemma 7 , s ( z ) is the unique solution in C+ to the equation s ( z ) = sA ( z − y ∫ τdH ( τ ) 1 + τs ) = − 1 z − ∑ i∈ [ m ] λizi 1+λis ( z ) , which gives s ( z ) z − ∑ i∈ [ m ] λizi 1 + λis ( z ) = −1 . We want to prove Equation ( 26 ) first . The lefthand side of Equation ( 26 ) equals lim n , di→+∞ di/n=zi tr ( λnIn + Z > ΛZ ) −1 = s ( −λ ) . Because the matrix 1nZ > ΛZ is positive semidefinite and thereby all of its eigenvalues are nonnegative , its limiting spectral distribution is supported on [ 0 , ∞ ) . The Stieltjes transform s ( z ) of the limiting spectral distribution can be continuously extended to ( −∞ , 0 ) . Therefore , for ∀λ > 0 , s ( −λ ) is the unique solution to the following equation s ( −λ ) ( λ+ m∑ i=1 λizi 1 + λis ( −λ ) ) = 1 . ( 28 ) We will verify that d dλ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) satisfies Equation ( 28 ) . Take a minimizer ρ∗ of Equation ( 5 ) . Using the envelope theorem yields d dλ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = 1 λ+ ∑m j=1 λjρ ∗ j . ( 29 ) Plugging the righthand side of Equation ( 29 ) into Equation ( 28 ) , we get 1 λ+ ∑m j=1 λjρ ∗ j ( λ+ m∑ i=1 λizi 1 + λi · 1λ+∑mj=1 λjρ∗j ) = 1 . Rewriting the above equation yields m∑ i=1 λizi 1 + λi · 1λ+∑mj=1 λjρ∗j = m∑ i=1 λiρ ∗ i . It suffices to show that each summand on the lefthand side equals its counterpart on the righthand side λizi 1 + λi · 1λ+∑mj=1 λjρ∗j = λiρ ∗ i . We need to show zi ρ∗i = 1 + λi · 1 λ+ ∑m j=1 λjρ ∗ j , which is equivalent to Equation ( 6 ) and therefore holds . Hence we have proved Equation ( 26 ) . Proof of Equation ( 27 ) . We use α to denote the indices n , di . Define h ( λ ) = inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) . First , we want to show that limλ0→+∞ ( h ( λ0 ) − log λ0 ) = 0 . Define lλ0 ( ρ ) = log 1 + 1 λ0 m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) , q ( ρ ) = m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) . The Hessian matrix of q ( p ) is diag ( z1 ρ21 , . . . , zmρ2m ) , which is positive definite since zi , ρi > 0 . Therefore , q ( p ) is convex and the minimum of q ( ρ ) on Rm+ is attained at ρ = z , where z = ( z1 , . . . , zm ) > . The minimum is infρ∈Rm+ q ( ρ ) = q ( z ) = 0 . Because lim‖ρ‖2→+∞ lλ0 ( ρ ) = +∞ , there exists a universal constant K1 > ‖z‖2 > 0 such that lλ0 ( ρ ) > lλ0 ( z ) for all ‖ρ‖2 > K1 . Define E = { ρ ∈ Rm+ | ‖ρ‖2 ≤ K1 } . We have z ∈ E , infρ∈E lλ0 ( ρ ) = infρ∈Rm+ lλ0 ( ρ ) , and infρ∈E q ( ρ ) = infρ∈Rm+ q ( ρ ) = 0 . Therefore , we get h ( λ0 ) − log λ0 = inf ρ∈Rm+ lλ0 ( ρ ) = inf ρ∈E lλ0 ( ρ ) − inf ρ∈E q ( ρ ) . ( 30 ) On E , there exists a universal constant K2 > 0 such that ∑ j∈ [ m ] λjρj < K2 . Thus on E , we deduce 0 < lλ0 ( ρ ) − q ( ρ ) = log 1 + 1 λ0 m∑ j=1 λjρj < log ( 1 + K2 λ0 ) . The right-hand side log ( 1 + K2λ0 ) → 0 as λ0 → +∞ . Thus limλ0→+∞ ( lλ0 ( ρ ) − q ( ρ ) ) = 0 uniformly for ρ ∈ E. By Lemma 8 , we get lim λ0→+∞ ( inf ρ∈E lλ0 ( ρ ) − inf ρ∈E q ( ρ ) ) = 0 . Recalling Equation ( 30 ) yields lim λ0→+∞ ( h ( λ0 ) − log λ0 ) = 0 . ( 31 ) Define fα ( λ ) = 1n log det N n . Second , we want to show limα fα ( λ ) = h ( λ ) , where limα means limn , di→+∞ di/n=zi . We have fα ( λ ) − fα ( λ0 ) = ∫ λ λ0 f ′α ( x ) dx for ∀λ , λ0 > 0 . It follows that |fα ( λ ) − h ( λ ) | ≤ |fα ( λ ) − h ( λ ) + h ( λ0 ) − fα ( λ0 ) + fα ( λ0 ) − log λ0 + log λ0 − h ( λ0 ) | ≤ |fα ( λ ) − h ( λ ) + h ( λ0 ) − fα ( λ0 ) |+ |fα ( λ0 ) − log λ0|+ |log λ0 − h ( λ0 ) | = ∣∣∣∣∣ ∫ λ λ0 f ′α ( x ) dx− ( h ( λ ) − h ( λ0 ) ) ∣∣∣∣∣+ |fα ( λ0 ) − log λ0|+ |log λ0 − h ( λ0 ) | . Taking lim supα on both sides gives lim sup α |fα ( λ ) − h ( λ ) | ≤ lim sup α ∣∣∣∣∣ ∫ λ λ0 f ′α ( x ) dx− ( h ( λ ) − h ( λ0 ) ) ∣∣∣∣∣+lim supα |fα ( λ0 ) − log λ0|+|log λ0 − h ( λ0 ) | . ( 32 ) Recall f ′α ( λ ) = trN −1 and limα f ′α ( λ ) = h ′ ( λ ) ( this is exactly Equation ( 26 ) ) . Because∣∣trN−1∣∣ = trN−1 ≤ 1λ and ∫ λλ0 1xdx < +∞ , by the dominated convergence theorem , we have lim α ∫ λ λ0 f ′α ( x ) dx = ∫ λ λ0 h′ ( x ) dx = h ( λ ) − h ( λ0 ) . It follows that lim sup α ∣∣∣∣∣ ∫ λ λ0 f ′α ( x ) dx− ( h ( λ ) − h ( λ0 ) ) ∣∣∣∣∣ = limα ∣∣∣∣∣ ∫ λ λ0 f ′α ( x ) dx− ( h ( λ ) − h ( λ0 ) ) ∣∣∣∣∣ = 0 . ( 33 ) Since fα ( λ0 ) −log λ0 = 1 n log det ( λ0In + 1 n Z > ΛZ ) − 1 n log det ( λ0In ) = 1 n log det ( In + 1 nλ0 Z > ΛZ ) and the matrix 1nλ0Z > ΛZ is positive semidefinite , we have fα ( λ0 ) − log λ0 ≥ 0 . We have fα ( λ0 ) − log λ0 = 1 n log det ( In + 1 nλ0 Z > ΛZ ) ≤ 1 n log det ( In + λ+ nλ0 Z > Z ) ≤ log ( 1 + λ+ λ0 λmax ( Z > Z n ) ) ≤λ+ λ0 λmax ( Z > Z n ) . Then taking lim supα , we get lim sup α |fα ( λ0 ) − log λ0| = lim sup α ( fα ( λ0 ) − log λ0 ) ≤ λ+ λ0 lim sup α λmax ( Z > Z n ) . 1 λ0 , ( 34 ) where the last inequality is because lim supα λmax ( Z > Z n ) = ( 1 + √ γ ∨ 1γ ) 2 1 by Lemma 1 . Using Equation ( 32 ) , Equation ( 33 ) and Equation ( 34 ) gives lim sup α |fα ( λ ) − h ( λ ) | . 1 λ0 + |log λ0 − h ( λ0 ) | . Then taking limλ0→+∞ and recalling Equation ( 31 ) yields lim α |fα ( λ ) − h ( λ ) | = lim sup α |fα ( λ ) − h ( λ ) | = 0 . Therefore , we conclude limα fα ( λ ) = h ( λ ) . Lemma 10 . Define N = λnIn+Z > ΛZ = λnIn+ ∑ i∈ [ m ] λiZiZ > i . The following equation holds lim n , di→+∞ di/n→zi E [ ∂ ∂λi 1 n log det N n ] = ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) , ( 35 ) lim n , di→+∞ di/n→zi E [ ∂2 ∂λj∂λi 1 n log det N n ] = ∂2 ∂λj∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . ( 36 ) Proof . Proof of Equation ( 35 ) . We use α to denote the indices n , di and use limα to denote limn , di→+∞ di/n=zi . Define fα ( λi ) = E [ 1 n log det N n ] , f ′α ( λi ) = ∂ ∂λi E [ 1 n log det N n ] , and h ( λi ) = inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . We have∣∣∣∣ 1n log det Nn ∣∣∣∣ ≤ 1n log det ( λIn + λ+ Z > Z n ) = log λ+ 1 n log det ( In + λ+ nλ Z > Z ) . By Lemma 3 , there exists a universal constant C > 0 such that for all sufficiently large n , 1 n log det ( In + λ+ nλ Z > Z ) ≤ log ( 1 + C λ ) . Therefore , we get ∣∣∣∣ 1n log det Nn ∣∣∣∣ ≤ log ( λ+ C ) . By the dominated convergence theorem and Lemma 9 ( specifically , Equation ( 27 ) ) , we obtain lim α fα ( λi ) = h ( λi ) . ( 37 ) Because ∣∣∣∣ ∂∂λi 1n log det Nn ∣∣∣∣ = 1n tr ( Z > i N−1Zi ) ≤ 1λn2 tr ( Z > i Zi ) and E [ 1 λn2 tr ( Z > i Zi ) ] < +∞ , we can interchange the differentiation and the expectation and get f ′α ( λi ) = ∂ ∂λi E [ 1 n log det N n ] = E [ ∂ ∂λi 1 n log det N n ] . ( 38 ) Thus we deduce∣∣∣∣ ∂∂λiE [ 1 n log det N n ] ∣∣∣∣ = ∣∣∣∣E [ ∂∂λi 1n log det Nn ] ∣∣∣∣ ≤ E ∣∣∣∣ ∂∂λi 1n log det Nn ∣∣∣∣ ≤ E [ 1λn2 tr ( Z > i Zi ) ] . By Lemma 4 , E tr ( Z > i Zi ) n2 and therefore E [ 1 λn2 tr ( Z > i Zi ) ] . 1λ . The function sequence { f ′α } is uniformly bounded . Then we want to show that { f ′α } is uniformly equicontinuous by showing that { f ′′α } is uniformly bounded . Because∣∣∣∣ ∂2∂λ2i 1n log det Nn ∣∣∣∣ = 1n tr ( Z > i N−1Zi ) 2 ≤ 1nλ2 tr ( Z > i Zi n ) 2 and E [ 1 nλ2 tr ( Z > i Zi n ) 2 ] < +∞ , we can interchange the differentiation and the expectation and get ∂2 ∂λ2i E [ 1 n log det N n ] = ∂ ∂λi E [ ∂ ∂λi 1 n log det N n ] = E [ ∂2 ∂λ2i 1 n log det N n ] . Therefore , we deduce∣∣∣∣ ∂2∂λ2i E [ 1 n log det N n ] ∣∣∣∣ ≤ E ∣∣∣∣ ∂2∂λ2i 1n log det Nn ∣∣∣∣ ≤ 1nλ2E tr ( Z > i Zi n ) 2 . Again , by Lemma 4 , tr ( Z > i Zi n ) 2 n. It follows that 1nλ2E tr ( Z > i Zi n ) 2 . 1λ2 . Therefore { f ′ α } is uniformly equicontinuous . We want to show limα f ′α ( λi ) = h ′ ( λi ) by contradiction . If it is not true , there exists > 0 and a subsequence { f ′αk } such that ∣∣f ′αk ( λi ) − h′ ( λi ) ∣∣ ≥ . Let E = [ a , b ] 3 λi ( b > a > 0 ) be a closed interval that contains λi . The subsequence { f ′αk } is uniformly bounded and uniformly equicontinuous . By the Arzela-Ascoli theorem , there exists a subsequence { f ′αkj } that converges uniformly on λi ∈ E. Recall limα fα ( λi ) = h ( λi ) ( Equation ( 37 ) ) . Thus limj fαkj ( λi ) = h ( λi ) . By ( Rudin , 1976 , Theorem 7.17 ) , for λi ∈ E , we have lim j f ′αkj ( λi ) = h ′ ( λi ) . This is a contradiction . Hence , we have shown that limα f ′α ( λi ) = h ′ ( λi ) , which is exactly Equation ( 35 ) ( recall f ′α ( λi ) = ∂ ∂λi E [ 1 n log det N n ] = E [ ∂ ∂λi 1 n log det N n ] in Equation ( 38 ) ) . Proof of Equation ( 36 ) . Define gα ( λj ) = ∂∂λiE [ 1 n log det N n ] = E [ ∂ ∂λi 1 n log det N n ] . Then g′α ( λj ) = ∂2 ∂λj∂λi E [ 1 n log det N n ] = ∂∂λjE [ ∂ ∂λi 1 n log det N n ] . We have ∣∣∣∣ ∂2∂λj∂λi 1n log det Nn ∣∣∣∣ = 1 n tr ( ZiZ > i N −1ZjZ > j N −1 ) = 1 n tr ( Z > i N −1ZjZ > j N −1Zi ) = 1 n ∥∥Z > j N−1Zi∥∥2F ≤ 1 n ‖Zj‖22 ‖Zi‖ 2 2 ∥∥N−1∥∥2 F ≤ 1 λ2n2 ‖Zj‖22 ‖Zi‖ 2 2 . where the last inequality is because ∥∥N−1∥∥2 F ≤ ∥∥ 1 λnIn ∥∥2 F = 1λ2n . If i 6= j , by Lemma 4 , we have 1 λ2n2 E ‖Zj‖22 ‖Zi‖ 2 2 = 1 λ2n2 E ‖Zj‖22 · E ‖Zi‖ 2 2 . 1 λ2 . If i = j , by Lemma 4 , we have 1 λ2n2 E ‖Zi‖42 . 1 λ2n2 · n2 = 1 λ2 . As a result , we get ∣∣∣∣ ∂2∂λj∂λi 1n log det Nn ∣∣∣∣ . 1n · n2 · 1λ2n = 1λ2 . Thus we can interexchange ∂∂λj and expectation , and get g ′ α ( λj ) = E [ ∂2 ∂λj∂λi 1 n log det N n ] . Be- cause |g′α ( λj ) | ≤ E ∣∣∣ ∂2∂λj∂λi 1n log det Nn ∣∣∣ . 1λ2 , the function sequence { g′α } is uniformly bounded for λj . Define L = Z > j N −1Zi and W = Z > j N −1Zj . We have∣∣∣∣∣ ∂3∂λ2j∂λi 1n log det Nn ∣∣∣∣∣ = 2 n tr ( L > WL ) . 1 λn2 tr ( L > Z > j ZjL ) = 1 λn2 tr ( Z > i N −1 ( ZjZ > j ) 2N−1Zi ) . = 1 λn2 ∥∥ZjZ > j N−1Zi∥∥2F ≤ 1 λn2 ∥∥N−1∥∥2 F ∥∥ZjZ > j ∥∥22 ‖Zi‖22 ≤ 1 λ3n3 ∥∥ZjZ > j ∥∥22 ‖Zi‖22 = 1 λ3n3 ‖Zj‖42 ‖Zi‖ 2 2 , where the first inequality is becauseW 4 1λnZ > j Zj and the third inequality is becauseN −1 4 1λnIn and then ∥∥N−1∥∥2 F ≤ ∥∥ 1 λnIn ∥∥2 F ≤ 1λ2n . By Lemma 4 , we have E ‖Zj‖ 4 2 . n 2 and E ‖Zi‖22 . n. If i 6= j , then Zj and Zi are independent , and we deduce 1 λ3n3 E ‖Zj‖42 ‖Zi‖ 2 2 . 1 λ3 . If i = j , we have 1 λ3n3 E ‖Zi‖42 ‖Zi‖ 2 2 = 1 λ3n3 E ‖Zi‖62 . 1 λ3 . As a result , we deduce E [ ∂3 ∂λ2j∂λi 1 n log det N n ] = ∂∂λjE [ ∂2 ∂λj∂λi 1 n log det N n ] = g′′α ( λj ) . Moreover , we have |g′′α ( λj ) | ≤ E ∣∣∣∣∣ ∂3∂λ2j∂λi 1n log det Nn ∣∣∣∣∣ . 1λ3 . Therefore { g′α } is uniformly equicontinuous . Define w ( λj ) = ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . We want to show by contradiction that limα g′α ( λj ) = w ′ ( λj ) . Assume that it is not true . Then there exists > 0 and a subsequence { g′αk } such that ∣∣g′αk ( λj ) − w′ ( λj ) ∣∣ > . Since { g′αk } is uniformly bounded and uniformly equicontinuous , by the Arzela-Ascoli theorem , there is a subsequence { g′αkr } that converges uniformly on a closed intervalE containing λj . Equation ( 35 ) shows that limα gα ( λj ) = w ( λj ) . It follows that limr gαkr ( λj ) = w ( λj ) . By ( Rudin , 1976 , Theorem 7.17 ) , for λi ∈ E , we have lim r g′αkr ( λj ) = w ′ ( λj ) , which is a contradiction . Therefore , we have shown that limα g′α ( λj ) = w ′ ( λj ) , which is exactly Equation ( 36 ) . D PROOF OF THEOREM 1 D.1 PROOF OF ITEM 1 Define g ( ρ ) = log ( λ+ ∑m j=1 λjρj ) + ∑m j=1 ( ρj − zj ( log ρjzj + 1 ) ) . The function g ( ρ ) is continuously differentiable on Rm+ . The boundary of R+m is ∂Rm+ = { ρ ∈ Rm | ( ∀i ∈ [ m ] , ρi ≥ 0 ) ∧ ( ∃i ∈ [ m ] , ρi = 0 ) } . Because limRm+3ρ→ρ0∈∂Rm+ g ( ρ ) = limRm+3ρ→∞ g ( ρ ) = +∞ , there exists a minimizer ρ ∗ ∈ Rm+ of g ( ρ ) . Taking the derivative with respect to ρi gives ∂ ∂ρi log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = λi λ+ ∑m j=1 λjρj + 1− zi ρi . Setting it to zero gives Equation ( 6 ) . D.2 PROOF OF ITEM 2 Recall Equation ( 6 ) λi λ+ ∑m j=1 λjρ ∗ j + 1− zi ρ∗i = 0 , ∀i ∈ [ m ] . Rewriting the above equation gives ( zi − ρ∗i ) ( λ+ m∑ k=1 λkρ ∗ k ) = λiρ ∗ i , ∀i ∈ [ m ] . Rewriting it in the linear algebraic form yields ( z− ρ∗ ) ( λ+ λ > ρ∗ ) = λ ρ∗ . Applying ∂∂λ to both sides and using the implicit function theorem , we get ( z− ρ∗ ) ( ρ∗ > + λ > J ) − J ( λ+ λ > ρ∗ ) = diag ( λ ) J + diag ( ρ∗ ) . Arranging the above equation yields ( diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > ) J = ( z− ρ∗ ) ρ∗ > − diag ( ρ∗ ) . Define a = λ + λ > ρ∗ , A = diag ( λ ) + ( λ+ λ > ρ∗ ) Im = diag ( λ ) + aIm and B = diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > = A− ( z− ρ∗ ) λ > . The matrix determinant lemma gives det ( B ) = ( 1− λ > A−1 ( z− ρ∗ ) ) det ( A ) . Recall Equation ( 6 ) again and we have λi + a = zia ρ∗i . We have a− ∑ i∈ [ m ] λiρ ∗ i ( 1− ρ∗i /zi ) = λ+ ∑ i∈ [ m ] λiρ ∗ i − ∑ i∈ [ m ] λiρ ∗ i ( 1− ρ∗i /zi ) =λ+ ∑ i∈ [ m ] λi ( ρ∗i ) 2 zi > 0 . It follows that ∑ i∈ [ m ] λiρ ∗ i ( 1− ρ∗i /zi ) a < 1 . Then we compute λ > A−1 ( z− ρ∗ ) : λ > A−1 ( z− ρ∗ ) = ∑ i∈ [ m ] λi ( zi − ρ∗i ) λi + a = ∑ i∈ [ m ] λi ( zi − ρ∗i ) zia ρ∗i = ∑ i∈ [ m ] λiρ ∗ i ( 1− ρ∗i /zi ) a < 1 . Thus we get 1− λ > A−1 ( z− ρ∗ ) > 0 . Therefore , detB 6= 0 and the matrix B is invertible . D.3 PROOF OF ITEM 3 Lemma 11 . Define N = λnIn + Z > ΛZ , γ = ∑ i∈ [ m ] zi , r = ( r1 , . . . , rm ) , λ = ( λ1 , . . . , λm ) , and ϑ ( rt , r , λ ) = 2rt √ 1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t . For any Kt ≥ 2λ and Ku ≥ 2λ+ ( 2+ √ γ ) λ , we have lim n , di→+∞ di/n→zi trN−1 = lim n , di→+∞ di/n→zi E trN−1 = max 0≤rt≤Kt min 0≤ri≤Ku ϑ ( rt , r , λ ) = min 0≤ri≤Ku max 0≤rt≤Kt ϑ ( rt , r , λ ) = max rt≥0 min ri≥0 ϑ ( rt , r , λ ) = min ri≥0 max rt≥0 ϑ ( rt , r , λ ) . ( 39 ) If r∗ is a solution to the optimization problem in Equation ( 39 ) , then 1 + m∑ j=1 r∗2j = m∑ j=1 r∗j √ zj + λr ∗ t 2 , ( 40 ) r∗t r∗i√ 1 + ∑m j=1 r ∗2 j = r∗t √ zi − r∗i λi . ( 41 ) Moreover , we have ∂ ∂λi max rt≥0 min ri≥0 ϑ ( rt , r , λ ) = − r∗2i λ2i . Proof . Let g ∼ N ( 0 , In ) be a multivariate standard normal random vector . We have trN−1 =Egg > N−1g =Eg sup t∈Rn ( 2g > t− t > Nt ) =Eg sup t∈Rn ( 2g > t− t > Z > ΛZt− nλ ‖t‖22 ) =Eg sup t∈Rn inf u∈Rd ( 2g > t− 2u > ΛZt+ u > Λu− nλ ‖t‖22 ) =− 2Eg inf t∈Rn sup u∈Rd ( u > ΛZt− g > t− 1 2 u > Λu+ 1 2 nλ ‖t‖22 ) =− 2Eg inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) We view inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) ( 42 ) as the primal optimization ( PO ) problem in the convex Gaussian min-max theorem ( CGMT ) ( Thrampoulidis et al. , 2015 ) . The KKT conditions for Equation ( 42 ) give Z > u− g + nλt = 0 , Zt− Λ−1u = 0 . Solving the above equations gives t = N−1g , u = ΛZN−1g . With probability at least 1− 4 exp ( −cn ) ( c > 0 is a universal constant ) , we have ‖g‖2 ≤ 2 √ n and ‖Z‖ ≤ √ d+ 2 √ n ≤ ( 2 + √ γ ) √ n. Therefore , we get ‖t‖2 ≤ ∥∥N−1∥∥ ‖g‖2 ≤ 1λn · 2√n = 2λ√n , ‖u‖2 ≤ λ+ ‖Z‖ ‖t‖2 ≤ λ+ ( 2 + √ γ ) √ n · 2 λ √ n = 2λ+ ( 2 + √ γ ) λ . Write u = u1 ... um , where ui ∈ Rdi . For all Kt ≥ 2λ , Ku ≥ 2λ+ ( 2+√γ ) λ , the optimal solutions t∗ and u∗ to Equation ( 42 ) satisfy √ n ‖t∗‖2 ≤ Kt and ‖ui‖2 ≤ Ku for all i ∈ [ m ] with probability at least 1 − 4 exp ( −cn ) . Define St = { t ∈ Rn | √ n ‖t‖2 ≤ Kt } and Su = { u ∈ Rd | ‖ui‖ ≤ Ku , ∀i ∈ [ m ] } . We use α to denote the indices n , di and use limα to denote limn , di→+∞ di/n=zi . Define event Eα = { inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) = inf t∈St sup u∈Su ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) } . Then with probability at least 1 − 4 exp ( −cn ) , we have t∗ ∈ St and u∗ ∈ Su . Therefore the event Eα occurs with probability at least 1− 4 exp ( −cn ) , which yields P { Ecα } ≤ 4 exp ( −cn ) . Since ∑ n≥1 4 exp ( −cn ) < +∞ , by Borel-Cantelli lemma , we have P { lim sup α Ecα } = P { ( lim inf α Eα ) c } = 0 . Then with probability 1 , all but finitely many Eα occur . Then almost surely there exists n0 such that for all n > n0 , Eα occurs . The auxiliary optimization ( AO ) problem is inf t∈St sup u∈Su ( ‖t‖2 g > 1 u+ ‖u‖2 g > 2 t− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) = inf 0≤rt≤Kt sup 0≤ri≤Ku − ∥∥∥g −√∑i∈ [ m ] r2i g2∥∥∥ 2√ n rt + rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t = inf 0≤rt≤Kt sup 0≤ri≤Ku −√1 + ∑ i∈ [ m ] r2i ‖g3‖2√ n rt + rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t , where g1 ∼ N ( 0 , Id ) , g2 ∼ N ( 0 , In ) , and g3 ∼ N ( 0 , In ) . Taking n , di → +∞ with di/n→ zi constant , the strong law of large numbers gives√ 1 + ∑ i∈ [ m ] r2i ‖g3‖2√ n a.s.→ √ 1 + ∑ i∈ [ m ] r2i , ‖g1 , j‖2√ n = √ dj n ‖g1 , j‖2√ dj a.s.→ √zj . Define Xα ( rt , r ) = − √ 1 + ∑ i∈ [ m ] r2i ‖g3‖2√ n rt + rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t . It is a stochastic process on ( rt , r ) ∈ [ 0 , Kt ] × [ 0 , Ku ] m. We have lim α Xα ( rt , r ) = X ( rt , r ) : = −rt √ 1 + ∑ i∈ [ m ] r2i + rt ∑ i∈ [ m ] √ ziri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t almost surely . Since √ 1 + x2 is convex and increasing and the function ‖r‖2 is convex , thus √ 1 + ‖r‖22 is convex in r and then − √ 1 + ∑ i∈ [ m ] r 2 i ‖g3‖2√ n rt = − √ 1 + ‖r‖22 ‖g3‖2√ n rt is concave in r. Because − 12 ∑ i∈ [ m ] 1 λi r2i is concave in r and rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri is linear in r , we deduce that Xα ( rt , r ) is concave in r. By ( Liese & Miescke , 2008 , Lemma 7.75 ) , supr∈ [ 0 , Ku ] m |Xα ( rt , r ) −X ( rt , r ) | → 0 almost surely . Then for ∀ > 0 , there exists n0 ( ) , d0 , i ( ) , δ0 , i ( ) such that for all n > n0 ( ) , di > d0 , i ( ) , |di/n− zi| < δ0 , i ( ) and for all r ∈ [ 0 , Ku ] m , we have X ( rt , r ) − < Xα ( rt , r ) < X ( rt , r ) + . Thus we obtain X ( rt , r ) − < Xα ( rt , r ) ≤ sup r∈ [ 0 , Ku ] m Xα ( rt , r ) Xα ( rt , r ) < X ( rt , r ) + ≤ sup r∈ [ 0 , Ku ] m X ( rt , r ) + , which in turn implies sup r∈ [ 0 , Ku ] m X ( rt , r ) − ≤ sup r∈ [ 0 , Ku ] m Xα ( rt , r ) sup r∈ [ 0 , Ku ] m Xα ( rt , r ) ≤ sup r∈ [ 0 , Ku ] m X ( rt , r ) + . It follows that ∣∣∣supr∈ [ 0 , Ku ] m Xα ( rt , r ) − supr∈ [ 0 , Ku ] m X ( rt , r ) ∣∣∣ ≤ . In other words , we showed |Yα ( rt ) − Y ( rt ) | → 0 almost surely , where Y ( rt ) : = supr∈ [ 0 , Ku ] m Xα ( rt , r ) and Y ( rt ) : = supr∈ [ 0 , Ku ] m X ( rt , r ) . Because Xα ( rt , r ) is convex in rt , then Y ( rt ) = supr∈ [ 0 , Ku ] m Xα ( rt , r ) is convex in rt . By ( Liese & Miescke , 2008 , Lemma 7.75 ) again , suprt∈ [ 0 , Kt ] |Yα ( rt ) − Y ( rt ) | → 0 almost surely . A similar argument shows that∣∣∣∣ infrt∈ [ 0 , Kt ] Yα ( rt ) − infrt∈ [ 0 , Kt ] Y ( rt ) ∣∣∣∣ = ∣∣∣∣∣ infrt∈ [ 0 , Kt ] supr∈ [ 0 , Ku ] mXα ( rt , r ) − infrt∈ [ 0 , Kt ] supr∈ [ 0 , Ku ] mX ( rt , r ) ∣∣∣∣∣→ 0 almost surely . Therefore , we obtain inf t∈St sup u∈Su ( ‖t‖2 g > 1 u+ ‖u‖2 g > 2 t− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) = inf 0≤rt≤Kt sup 0≤ri≤Ku −√1 + ∑ i∈ [ m ] r2i ‖g3‖2√ n rt + rt ∑ i∈ [ m ] ‖g1 , i‖2√ n ri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t a.s.→ inf 0≤rt≤Kt sup 0≤ri≤Ku −rt√1 + ∑ i∈ [ m ] r2i + rt ∑ i∈ [ m ] √ ziri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t ( 43 ) = : µ . Define event Aα = { ∣∣∣∣ inft∈Rn supu∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) − µ ∣∣∣∣ > τ } , Bα = { ∣∣∣∣ inft∈St supu∈Su ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) − µ ∣∣∣∣ > τ } , Cα = { ∣∣∣∣ inft∈St supu∈Su ( ‖t‖2 g > 1 u+ ‖u‖2 g > 2 t− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) − µ ∣∣∣∣ > τ } . Recall Eα = { inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) = inf t∈St sup u∈Su ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) } . We have Aα ∩ Eα ⊆ Bα . Equation ( 43 ) gives limα P { Cα } = 0 for any τ > 0 because almost sure convergence implies convergence in probability . By the convex Gaussian min-max theorem ( Thrampoulidis et al. , 2015 ) , we have P { Bα } ≤ 2P { Cα } . It follows that P { Aα } ≤ P { Aα ∩ Eα } + P { Ecα } ≤ P { Bα } + P { Ecα } ≤ 2P { Cα } + P { Ecα } . Taking lim supα on both sides , because lim supα P { Bα } ≤ 2 lim supα P { Cα } = 0 , we get lim sup α P { Aα } ≤ lim sup α P { Ecα } ≤ P { lim sup α Ecα } = 0 , where the second inequality is because of the reverse Fatou ’ s lemma . Thus inf t∈Rn sup u∈Rd ( u > Zt− g > t− 1 2 u > Λ−1u+ 1 2 nλ ‖t‖22 ) P→ µ . Therefore , we deduce g > N−1g P→ −2 inf 0≤rt≤Kt sup 0≤ri≤Ku −rt√1 + ∑ i∈ [ m ] r2i + rt ∑ i∈ [ m ] √ ziri − 1 2 ∑ i∈ [ m ] 1 λi r2i + 1 2 λr2t = sup 0≤rt≤Kt inf 0≤ri≤Ku 2rt√1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t = sup 0≤rt≤Kt inf 0≤ri≤Ku ϑ ( rt , r , λ ) . ( 44 ) Because ∣∣g > N−1g∣∣ ≤ 1λn ‖g‖22 and E 1λn ‖g‖22 = 1λ < ∞ , by the dominated convergence theorem for convergence in probability ( Cohn , 2013 , Proposition 3.1.6 ) , we get lim α trN−1 = lim α Eg [ g > N−1g ] = max 0≤rt≤Kt min 0≤ri≤Ku ϑ ( rt , r , λ ) . ( 45 ) Note that 2rt √ 1 + ∑ i∈ [ m ] r 2 i is convex in r , −2rt ∑ i∈ [ m ] √ ziri is linear in r , and ∑ i∈ [ m ] 1 λi r2i is strongly convex in r. Thus ϑ is strongly convex in r. Note that 2rt √ 1 + ∑ i∈ [ m ] r 2 i − 2rt ∑ i∈ [ m ] √ ziri is linear in rt and that −λr2t is strongly concave in rt . Thus ϑ is strongly concave in rt . Then ϑ has a unique saddle point ( r∗t , r ∗ ) on [ 0 , Kt ] × [ 0 , Ku ] m that satisfies max rt∈ [ 0 , Kt ] min r∈ [ 0 , Ku ] m ϑ ( rt , r ) = min r∈ [ 0 , Ku ] m max rt∈ [ 0 , Kt ] ϑ ( rt , r ) = ϑ ( r ∗ t , r ∗ ) , ( 46 ) where the first equality is due to Sion ’ s minimax theorem . Since ∣∣trN−1∣∣ ≤ 1λ , using the dominated convergence theorem and combining Equation ( 45 ) and Equation ( 46 ) yields lim α E trN−1 = max 0≤rt≤Kt min 0≤ri≤Ku ϑ ( rt , r , λ ) = min 0≤ri≤Ku max 0≤rt≤Kt ϑ ( rt , r , λ ) . By the uniqueness of the limit , the right-hand side max0≤rt≤Kt min0≤ri≤Ku ϑ ( rt , r , λ ) and min0≤ri≤Ku max0≤rt≤Kt ϑ ( rt , r , λ ) do not depend on Kt and Ku as long as Kt ≥ 2λandKu ≥ 2λ+ ( 2+ √ γ ) λ . Thus we have lim α E trN−1 = max rt≥0 min ri≥0 ϑ ( rt , r , λ ) = min ri≥0 max rt≥0 ϑ ( rt , r , λ ) . If r∗t = 0 , then ϑ ( 0 , r ∗ ) = minr∈ [ 0 , Ku ] m ∑ i∈ [ m ] 1 λi r2i = 0 . Thus r ∗ must be zero . However , ϑ ( 1 2λ ,0 ) = 34λ > ϑ ( 0 , r ∗ ) . Therefore r∗t > 0 . We compute the partial derivative ∂ϑ ∂ri = 2rt ri√ 1 + ∑ i∈ [ m ] r 2 i − 2rt √ zi + 2 ri λi . If r∗i = 0 , we have ∂ϑ ∂ri ∣∣∣ ri=0 , rt=r∗t = −2r∗t √ zi < 0 . Therefore , one can increase r∗i and make maxrt∈ [ 0 , Kt ] minr∈ [ 0 , Ku ] m ϑ ( rt , r ) smaller , which results in a contradiction . Thus r∗i > 0 . Thus the minimax value is attained when rt , ri > 0 for all i ∈ [ m ] . To obtain the optimality condition , we compute the partial derivatives ∂ϑ ∂rt = 2 √ 1 + ∑ i∈ [ m ] r2i − 2 ∑ i∈ [ m ] ri √ zi − 2λrt , ∂ϑ ∂ri = 2rt ri√ 1 + ∑ i∈ [ m ] r 2 i − 2rt √ zi + 2 ri λi . Setting them to zero gives the optimality condition for r∗t , r ∗ 1 , . . . , r ∗ m and yields Equation ( 40 ) and Equation ( 41 ) . Using the envelope theorem , we get ∂ ∂λi max rt∈ [ 0 , Kt ] min r∈ [ 0 , Ku ] m ϑ ( rt , r , λ ) = ∂ϑ ( r∗t , r ∗ , λ1 , . . . , λm ) ∂λi =− r ∗2 i λ2i . Lemma 12 . Define N = λnIn + Z > ΛZ . The following equation holds lim n , di→+∞ di/n→zi E [ ∂ ∂λi tr ( N−1 ) ] = ∂2 ∂λi∂λ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = −r∗2i λ2i , where r∗ is a solution to suprt > 0 infr1 , ... , rm > 0 ϑ ( rt , r1 , . . . , rm , λ1 , . . . , λm ) and ϑ ( rt , r1 , . . . , rm , λ1 , . . . , λm ) = 2rt √ 1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t . Proof . Since ∣∣∣∣ ∂∂λi tr ( N−1 ) ∣∣∣∣ = tr ( Z > i N−2Zi ) ≤ 1 ( λn ) 2 tr ( Z > i Zi ) ( 47 ) and E 1 ( λn ) 2 tr ( Z > i Zi ) 1λ2 ( by Lemma 4 ) , using the dominated convergence theorem gives E [ ∂ ∂λi tr ( N−1 ) ] = ∂ ∂λi E tr ( N−1 ) . We use α to denote the indices n , di and use limα to denote limn , di→+∞ di/n=zi . Define fα ( λi ) = E tr ( N−1 ) , g ( λi ) = ∂∂λ infρ∈Rm+ [ log ( λ+ ∑ i∈ [ m ] λiρi ) + ∑ i∈ [ m ] ( ρi − zi ( log ρizi + 1 ) ) ] , and h ( λi ) = suprt > 0 infr1 , ... , rm > 0 ϑ ( rt , r1 , . . . , rm , λ1 , . . . , λm ) . Because ∣∣tr ( N−1 ) ∣∣ ≤ tr ( 1 λnIn ) ≤ 1λ and limα tr ( N−1 ) = g ( λi ) ( by Lemma 9 ) , we have Lemma 9 limα fα ( λi ) = limα E tr ( N−1 ) = g ( λi ) . Lemma 11 shows limα fα ( λi ) = h ( λi ) . Therefore limα fα ( λi ) = g ( λi ) = h ( λi ) . Because of Equation ( 47 ) , we have f ′α ( λi ) = ∂ ∂λi E tr ( N−1 ) and |f ′α ( λi ) | = ∣∣∣∣ ∂∂λiE tr ( N−1 ) ∣∣∣∣ = ∣∣∣∣E [ ∂∂λi tr ( N−1 ) ] ∣∣∣∣ ≤ E ∣∣∣∣ ∂∂λi tr ( N−1 ) ∣∣∣∣ . 1λ2 and therefore { f ′α } is uniformly bounded for λi . Because∣∣∣∣ ∂2∂λ2i tr ( N−1 ) ∣∣∣∣ =2 tr ( N−1ZiZ > i N −1ZiZ > i N −1 ) . 1 λn tr ( N−1 ( ZiZ > i ) 2 N−1 ) = 1 λn tr ( ZiZ > i N −2ZiZ > i ) ≤ 1 ( λn ) 3 tr ( ZiZ > i ) 2 , and E 1 ( λn ) 3 tr ( ZiZ > i ) 2 1λ3 ( by Lemma 4 ) , using the dominated convergence theorem yields E [ ∂2 ∂λ2i tr ( N−1 ) ] = ∂ ∂λi E [ ∂ ∂λi tr ( N−1 ) ] = ∂2 ∂λ2i E [ tr ( N−1 ) ] = f ′′α ( λi ) . Moreover , we have |f ′′α ( λi ) | ≤ E ∣∣∣∣ ∂2∂λ2i tr ( N−1 ) ∣∣∣∣ . 1λ3 . Thus { f ′α } is uniformly equicontinuous for λi . We want to show that limα f ′α ( λi ) = g′ ( λi ) by contradiction . Assume that it is not true . Then there exists > 0 and a subsequence { f ′αk } such that ∣∣f ′αk ( λi ) − g′ ( λi ) ∣∣ > . Since { f ′αk } is uniformly bounded and uniformly equicontinuous for λi ∈ E ( E is any closed finite interval containing λi ) , by the Arzela-Ascoli theorem , there exists a subsequence { f ′αkr } that converges uniformly on E. Since limα fαkr ( λi ) = g ( λi ) , by ( Rudin , 1976 , Thoerem 7.17 ) , we have lim r f ′αkr ( λi ) = g ′ ( λi ) , which yields a contradiction . Therefore , we have limα f ′α ( λi ) = g ′ ( λi ) . Recall g ( λi ) = h ( λi ) for any λi > 0 . Then by the final part of Lemma 11 , we have limα f ′α ( λi ) = g ′ ( λi ) = h ′ ( λi ) = − r ∗2 i λ2i . D.4 BIAS Lemma 13 . Suppose that U ∼ ⊕ i∈ [ m ] Unif ( O ( di ) ) and V are two independent d × d random matrices such that V d= UV U > , where d = ∑m i=1 di . Let θ ∈ Rd be a fixed vector . Write θ = θ1 ... θm , where θi ∈ Rdi . Let φ ∼ ⊕ i∈ [ m ] Unif ( Sdi−1 ( ‖θi‖2 ) ) be a random vector independent of V and let Λ = diag ( λ1Id1 , . . . , λmIdm ) ∈ Rd×d . Then we have E [ ∥∥∥Λ1/2V θ∥∥∥2 2 ] = E [ ∥∥∥Λ1/2V φ∥∥∥2 2 ] . Proof . Recall UΛU > = Λ and noticing U > θ d= φ , we get E [ ∥∥∥Λ1/2V θ∥∥∥2 2 ] =E [ ∥∥∥Λ1/2UV U > θ∥∥∥2 2 ] =E [ θ > UV > U > ΛUV U > θ ] =E [ θ > UV > ΛV U > θ ] =E [ ∥∥∥Λ1/2V U > θ∥∥∥2 2 ] =E [ ∥∥∥Λ1/2V φ∥∥∥2 2 ] . Lemma 14 . Define Θ̃ = diag ( ‖θ′1‖22/d1Id1 , . . . , ‖θ′m‖22/dmIdm ) and S = Λ1/2Z ( nλIn + Z > ΛZ ) −1 Z > Λ1/2 . Then we have Bλ , d , n = ‖θ∗‖2Σ − 2E tr ( ΛSΘ̃ ) + E tr ( SΛSΘ̃ ) . Proof . Recall Equation ( 22 ) in Lemma 5 Bλ , d , n = E [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] . Let U ∼ ⊕ i∈ [ m ] Unif ( O ( di ) ) be a random matrix independent of Z . Because UZ d = Z , we have Id + 1 nλ Λ1/2ZZ > Λ1/2 d = Id + 1 nλ Λ1/2UZZ > U > Λ1/2 = U ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) U > . Define θ̃ ∼ ⊕ i∈ [ m ] Unif ( Sdi−1 ( ‖θ′i‖2 ) ) . Lemma 13 gives Bλ , d , n =E [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ̃‖22 ] =E [ ‖Λ1/2 ( Id − S ) θ̃‖22 ] =E [ ‖ ( Id − S ) θ̃‖2Λ ] =E ∥∥∥θ̃∥∥∥2 Λ − E [ θ̃ > ΛSθ̃ ] − E [ θ̃ > SΛθ̃ ] + E [ θ̃ > SΛSθ̃ ] . Notice that ∥∥∥θ̃∥∥∥2 Λ = ‖θ′‖2Λ and Θ̃ = E [ θ̃θ̃ > ] . Because Θ̃ commutes with Λ , we have tr ( SΛΘ̃ ) = tr ( SΘ̃Λ ) = tr ( ΛSΘ̃ ) . In light of these , we deduce Bλ , d , n = ‖θ′‖ 2 Λ − E tr ( ΛSΘ̃ ) − E tr ( SΛΘ̃ ) + E tr ( SΛSΘ̃ ) = ‖θ′‖2Λ − 2E tr ( ΛSΘ̃ ) + E tr ( SΛSΘ̃ ) . Lemma 14 expresses the bias Bλ , d , n as the sum of three terms . Computing ‖θ′‖2Λ Note that ‖θ′‖ 2 Λ = θ ′ > Λθ′ = ∑ i∈ [ m ] λi ‖θ′i‖ 2 2 . Therefore , lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi ‖θ′‖2Λ = q > ( λ z ) . Computing E tr ( ΛSΘ̃ ) Define N = λnIn + Z > ΛZ = λnIn + ∑ i∈ [ m ] λiZiZ > i . We have E tr ( ΛSΘ̃ ) =E tr ( Z > Λ1/2Θ̃Λ3/2Z ( nλIn + Z > ΛZ ) −1 ) =E tr ( Z > Λ2Θ̃ZN−1 ) = ∑ i∈ [ m ] λ2i ‖θ′i‖22 di E tr ( ZiZ > i N −1 ) = ∑ i∈ [ m ] λ2i ‖θ′i‖22 n di E [ ∂ ∂λi 1 n log det N n ] = ∑ i∈ [ m ] λ2i ‖θ′i‖22 n di ∂ ∂λi E [ 1 n log det N n ] , where the second inequality is because Θ̃ commutes with Λ3/2 and the final equality is because of Equation ( 38 ) . Taking lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi and using Lemma 10 gives lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi E tr ( ΛSΘ̃ ) = ∑ i∈ [ m ] λ2i η 2 i zi ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) . Using the envelope theorem yields ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ i∈ [ m ] λiρi + ∑ i∈ [ m ] ( ρi − zi ( log ρi zi + 1 ) ) = ρ∗i λ+ ∑ i∈ [ m ] λiρ ∗ i = zi − ρ∗i λi , where the final equality is because of Equation ( 6 ) in Item 1 . Therefore , we deduce lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi E tr ( ΛSΘ̃ ) = ∑ i∈ [ m ] λ2i η 2 i zi zi − ρ∗i λi = ∑ i∈ [ m ] λiη 2 i ( 1− ρ ∗ i zi ) = q > ( λ ( z− ρ∗ ) ) . Computing E tr ( SΛSΘ̃ ) We have E tr ( SΛSΘ̃ ) =E tr [ Λ1/2ZN−1Z > Λ2ZN−1Z > Λ1/2Θ̃ ] =E tr [ Z > Λ1/2Θ̃Λ1/2ZN−1Z > Λ2ZN−1 ] =E tr [ Z > ΛΘ̃ZN−1Z > Λ2ZN−1 ] = ∑ i∈ [ m ] λi‖θ′i‖22 di ∑ j∈ [ m ] λ2jE tr [ ZiZ > i N −1ZjZ > j N −1 ] =− ∑ i∈ [ m ] λi‖θ′i‖22n di ∑ j∈ [ m ] λ2jE [ ∂2 ∂λj∂λi 1 n log det N n ] , where the third equality is because Θ̃ commutes with Λ1/2 . Taking lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi and using Lemma 10 gives lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi E tr ( SΛSΘ̃ ) = − ∑ i∈ [ m ] λiη 2 i zi ∑ j∈ [ m ] λ2j ∂2 ∂λj∂λi inf ρ∈Rm+ log λ+ ∑ l∈ [ m ] λlρl + ∑ l∈ [ m ] ( ρl − zl ( log ρl zl + 1 ) ) . Write λ = ( λ1 , . . . , λm ) > and z = ( z1 , . . . , zm ) > . Let ρ∗ ∈ Rm be a minimizer of Equation ( 5 ) and J = ∂ρ ∗ ∂λ ∈ R m×m be the Jacobian matrix Jij = ∂ρ∗i ∂λj . Recall Item 2 ( diag ( λ ) + ( λ+ λ > ρ∗ ) Im − ( z− ρ∗ ) λ > ) J = ( z− ρ∗ ) ρ∗ > − diag ( ρ∗ ) . Using the envelope theorem , we have ∂ ∂λi inf ρ∈Rm+ log λ+ ∑ l∈ [ m ] λlρl + ∑ l∈ [ m ] ( ρl − zl ( log ρl zl + 1 ) ) = ρ∗i λ+ ∑ l∈ [ m ] λlρ ∗ l = ρ∗i λ+ λ > ρ∗ . Recall Equation ( 6 ) yields ρ∗i λ+ λ > ρ∗ = zi − ρ∗i λi . Differentiating the above equation with respect to λj gives ∂2 ∂λj∂λi inf ρ∈Rm+ log λ+ ∑ l∈ [ m ] λlρl + ∑ l∈ [ m ] ( ρl − zl ( log ρl zl + 1 ) ) = ∂ ∂λj zi − ρ∗i λi = −λiJij − ( zi − ρ∗i ) δij λ2i . It follows that lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi E tr ( SΛSΘ̃ ) = ∑ i∈ [ m ] λiη 2 i zi ∑ j∈ [ m ] λ2j λiJij + ( zi − ρ∗i ) δij λ2i = ∑ i , j∈ [ m ] qiλ 2 j ( Jij + ( zi − ρ∗i ) δij λi ) =q > ( λ ( z− ρ∗ ) + Jλ 2 ) Putting all three terms together , we have lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi Bλ , d , n = q > ( λ z ) −2q > ( λ ( z− ρ∗ ) ) +q > ( λ ( z− ρ∗ ) + Jλ 2 ) = q > ( λ ρ∗ + Jλ 2 ) . Since { Bλ , d , n } is uniformly bounded and uniformly equicontinuous for λ ∈ ( 0 , 1 ] by Lemma 5 , { Bλ , d , n } can be extended continuously to [ 0 , 1 ] and the family of extended functions is still uniformly bounded and uniformly equicontinuous for λ ∈ [ 0 , 1 ] . By the Arzela-Ascoli theorem , { Bλ , d , n } converges uniformly to the limit . By the Moore-Osgood theorem , we can exchange the two limits lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi and limλ→0+ and get lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi B0 , d , n = lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi lim λ→0+ Bλ , d , n = lim λ→0+ lim n , di→+∞ di/n→zi ‖Πiθ∗‖2→ηi Bλ , d , n = q > ( λ ρ∗ + Jλ 2 ) |λ=0 . D.5 VARIANCE Define N = nλIn + Z > ΛZ . Recalling Lemma 6 gives Vλ , d , n =σ2E‖ΛZN−1‖22 =σ2 m∑ i=1 λ2iE tr ( ZiZ > i N −2 ) =− σ2 m∑ i=1 λ2iE [ ∂ ∂λi tr ( N−1 ) ] . Using Lemma 12 , we get lim n , di→∞ di/n→zi Vλ , d , n =− σ2 m∑ i=1 λ2i lim n , di→∞ di/n→zi E [ ∂ ∂λi tr ( N−1 ) ] =− σ2 m∑ i=1 λ2i lim n , di→∞ di/n→zi E [ ∂ ∂λi tr ( N−1 ) ] =− σ2 m∑ i=1 λ2i ∂2 ∂λi∂λ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) . Using the envelope theorem , we deduce ∂ ∂λ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = 1 λ+ ∑m j=1 λjρ ∗ j . Then we take ∂∂λi and obtain ∂2 ∂λi∂λ inf ρ∈Rm+ log λ+ m∑ j=1 λjρj + m∑ j=1 ( ρj − zj ( log ρj zj + 1 ) ) = ∂ ∂λi 1 λ+ ∑m j=1 λjρ ∗ j =− ρ∗i + ∑ j∈ [ m ] λjJji ( λ+ ∑ j∈ [ m ] λjρ ∗ j ) 2 . As a result , lim n , di→∞ di/n→zi Vλ , d , n = σ 2 m∑ i=1 λ2i ρ∗i + ∑ j∈ [ m ] λjJji ( λ+ ∑ j∈ [ m ] λjρ ∗ j ) 2 = σ2 ( λ 2 ) > ( ρ∗ + J > λ ) ( λ+ λ > ρ∗ ) 2 . By Lemma 12 , the variance is given by lim n , di→∞ di/n→zi Vλ , d , n = lim n , di→∞ di/n→zi −σ2 m∑ i=1 λ2iE [ ∂ ∂λi tr ( N−1 ) ] = σ2 m∑ i=1 r∗2i , where r∗ solves sup rt > 0 inf r1 , ... , rm > 0 2rt√1 + ∑ i∈ [ m ] r2i − 2rt ∑ i∈ [ m ] √ ziri + ∑ i∈ [ m ] 1 λi r2i − λr2t . Since { Vλ , d , n } is uniformly bounded and uniformly equicontinuous with respect to λ ∈ ( 0 , 1 ] by Lemma 5 , { Vλ , d , n } can be extended continuously to [ 0 , 1 ] and the family of extended functions is still uniformly bounded and uniformly equicontinuous . By the Arzela-Ascoli theorem , { Vλ , d , n } converges uniformly to the limit . By the Moore-Osgood theorem , we can exchange the two limits limn , di→∞ di/n→zi and limλ→0+ and get lim n , di→∞ di/n→zi lim λ→0+ Vλ , d , n = lim λ→0+ lim n , di→∞ di/n→zi Vλ , d , n = σ 2 m∑ i=1 r∗2i |λ=0 . E PROOF OF THEOREM 2 We use Theorem 1 to prove Theorem 2 . As in Theorem 1 , let r∗ solve minri≥0 maxrt≥0 ϑ ( rt , r , λ ) , where ϑ is defined in Equation ( 7 ) . Note that ϑ is a quadratic function of rt . Define A =√∑ i∈ [ m ] r 2 i + 1 , B = ∑ i∈ [ m ] √ ziri , A∗ = √∑ i∈ [ m ] r ∗2 i + 1 , and B ∗ = ∑ i∈ [ m ] √ zir ∗ i . Then r∗t = A−B λ and we get min ri≥0 max rt≥0 ϑ ( rt , r , λ ) = min ri≥0 ( A−B ) 2 λ + ∑ i∈ [ m ] 1 λi r2i = min ri≥0 ( A−B ) 2 λ + ∑ i∈ [ m ] 1 λi r2i . Taking the partial derivative with respect to ri gives ∂ ∂ri ( A−B ) 2 λ + ∑ i∈ [ m ] 1 λi r2i = 2 · A−B λ ( ri A − √ zi ) + 2 · ri λi . Setting it to zero gives the optimality condition for r∗i : A∗ −B∗ λ ( r∗i A∗ − √ zi ) = −r ∗ i λi , i ∈ [ m ] . ( 48 ) It follows that r∗i A∗ − √ zi r∗j A∗ − √ zj = r∗i /λi r∗j /λj , i , j ∈ [ m ] . Some algebraic manipulation in the above equation yields r∗i r∗j = λi λj · √ ziA ∗ − r∗i√ zjA∗ − r∗j , i , j ∈ [ m ] . Define z = ( z1 , . . . , zm ) . Then ‖z‖1 = ∑ i∈ [ m ] zi . By Cauchy–Schwarz inequality , if d/n →∑ i∈ [ m ] zi < 1 B ≤ √∑ i∈ [ m ] zi ‖r‖2 < ‖r‖2 < √ ‖r‖22 + 1 = A . Thus there does not exist r such that A = B . If d/n → ∑ i∈ [ m ] zi > 1 , then A = B is feasible for r. For example , set r = 1√ ( ‖z‖1 − 1 ) ‖z‖1 √ z . We have B = 〈 r , √ z 〉 = √ ‖z‖1 ‖z‖1 − 1 A = √ 1 + ‖r‖22 = √ 1 + 1 ‖z‖1 − 1 = B . If ‖z‖1 > 1 , since A = B is feasible , then lim λ→0+ min ri≥0 ( A−B ) 2 λ + ∑ i∈ [ m ] 1 λi r2i = min ri≥0 A=B ∑ i∈ [ m ] 1 λi r2i . If ‖z‖1 < 1 , then A−B always holds . To be precise , we have A−B ≥ ( √ ‖r‖22 + 1− ‖r‖2 ) ∨ ( ( 1− √ ‖z‖1 ) ‖r‖2 ) . If ‖r‖2 > 1 , then ( 1− √ ‖z‖1 ) ‖r‖2 > 1− √ ‖z‖1 . If ‖r‖2 ≤ 1 , then √ ‖r‖22 + 1−‖r‖2 ≥ √ 2−1 . Thus there exists a universal constant C0 = ( 1− √ ‖z‖1 ) ∨ ( √ 2− 1 ) > 0 such that A−B ≥ C0 . Recall Equation ( 48 ) . We have ( A∗ −B∗ ) ( r∗i A∗ − √ zi ) = −λr ∗ i λi , i ∈ [ m ] . Taking limλ→0+ , since A∗ −B∗ ≥ C0 does not go to zero , we have r∗i A∗ − √ zi = 0 , i ∈ [ m ] . Then we get r∗2i 1 + ∑ j∈ [ m ] r ∗2 j = zi , i ∈ [ m ] . Summing all i ∈ [ m ] yields ‖z‖1 = ∑ i∈ [ m ] r ∗2 i 1 + ∑ i∈ [ m ] r ∗2 i . Therefore , we have lim n , di→+∞ di/n→zi V0 , d , n = σ 2 lim λ→0+ m∑ i=1 r∗2i = σ 2 ∑ i∈ [ m ] zi 1− ∑ i∈ [ m ] zi . F PROOF OF THEOREM 3 Define A∗ = √∑ i∈ [ m ] r ∗2 i + 1 and B ∗ = ∑ i∈ [ m ] √ zir ∗ i . Equation ( 15 ) in Theorem 2 yields r∗1 r∗2 = λ1 λ2 · √ z1A ∗ − r∗1√ z2A∗ − r∗2 . Using the constraint A∗ = B∗ , we get r∗1 r∗2 = λ1 ( √ z1B ∗ − r∗1 ) λ2 ( √ z2B∗ − r∗2 ) . Define q = r ∗ 1 r∗2 . We have the following equation q = λ1 ( q ( z1 − 1 ) + √ z1z2 ) λ2 ( q √ z1z2 + z2 − 1 ) . Solving the above equation yields q = λ1 ( z1 − 1 ) + λ2 ( 1− z2 ) + √ ( λ1 ( z1 − 1 ) + λ2 ( 1− z2 ) ) 2 + 4λ1λ2z1z2 2λ2 √ z1z2 . ( 49 ) Here we discard the negative root . Let x = r∗21 + r ∗2 2 = r ∗2 2 ( 1 + q2 ) . ? ? yields 1 + x = r∗22 ( q √ z1 + √ z2 ) 2 = x 1 + q2 ( q √ z1 + √ z2 ) 2 . Solving x from the above equation gives x = q2 + 1 q2 ( z1 − 1 ) + 2q √ z1z2 + z2 − 1 . Therefore , lim n , di→+∞ di/n→zi V0 , d , n = q2 + 1 q2 ( z1 − 1 ) + 2q √ z1z2 + z2 − 1 . G PROOF OF THEOREM 4 Instead of considering the θ∗ specified in Equation ( 18 ) , we first consider a Bayesian setting where θ∗ ∼ N ( 0 , 1dId ) . Later , we will show that the setup in Equation ( 18 ) is asymptotically ( as di →∞ ) equivalent to this Bayesian setting . The precise meaning of equivalence will also be presented later . Our strategy can be divided into two steps . The first step is to show that the Bayes risk of the Bayes estimator is monotonically decreasing in the sample size n. The second step is to translate the sample-wise monotonicity of the Bayes estimator to the excess risk of the optimally regularized estimator θ̂λ , d , n in the setup of Equation ( 18 ) . Recall that since we are interested in sample-wise monotonicity , we add a subscript n to X and y ( they are defined by Equation ( 1 ) in Section 1.1 ) to emphasize that they consist of n data items . In this Bayesian setting , the likelihood function of θ∗ is L ( θ∗ | Xn , yn ) = ∏ i∈ [ n ] L ( θ∗ | xi , yi ) ∝ exp ( − ∑ i∈ [ n ] ( yi − 〈θ∗ , xi〉 ) 2 2σ2 ) = exp ( − ‖Xnθ∗ − yn‖22 2σ2 ) . The density of the prior of θ∗ is proportional to exp ( −d2 ‖θ ∗‖22 ) . Therefore , the posterior density of θ∗ is given by p ( θ∗ | Xn , yn ) ∝ exp ( − d ‖θ∗‖22 2 − ‖Xnθ∗ − yn‖22 2σ2 ) . As a result , the posterior distribution of θ∗ is Gaussian . The Bayes estimator is θ̂Bayes ( Xn , yn ) = arg min θ Eθ∗∼p ( θ∗|Xn , yn ) ‖θ − θ ∗‖2Σ . Taking the derivative with respect to θ gives ∂ ∂θ Eθ∗∼p ( θ∗|Xn , yn ) ‖θ − θ ∗‖2Σ = 2Σ ( θ − θ ∗ ) . Setting the above equation to zero yields Σ ( θ̂Bayes ( Xn , yn ) − Eθ∗∼p ( θ∗|Xn , yn ) θ∗ ) = 0 and there- fore θ̂Bayes ( Xn , yn ) = Eθ∗∼p ( θ∗|Xn , yn ) θ ∗ = E [ θ∗ | Xn , yn ] = arg min θ ( d ‖θ∗‖22 + ‖Xnθ∗ − yn‖22 σ2 ) . The final equality is because the posterior mean of a Gaussian distribution equals its mode . Define the Bayes risk Rn , Eθ∗∼N ( 0 , 1d Id ) , Xn , yn [ ∥∥∥θ̂Bayes ( Xn , yn ) − θ∗∥∥∥2 Σ ] . Write X = Rd and Y = R. Define R′n , inf θ̂ : Xn×Yn→R Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂ ( Xn , yn ) − θ∗∥∥∥2 Σ . We have R′n = inf θ̂ : Xn×Yn→Rd Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥Σ1/2θ̂ ( Xn , yn ) − Σ1/2θ∗∥∥∥2 2 = inf θ̂ : Xn×Yn→Rd Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂ ( Xn , yn ) − Σ1/2θ∗∥∥∥2 2 = Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥E [ Σ1/2θ∗ | Xn , yn ] − Σ1/2θ∗∥∥∥2 2 = Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥Σ1/2θ̂Bayes ( Xn , yn ) − Σ1/2θ∗∥∥∥2 2 = Rn . where the third equality is because the conditional expectation minimizes the ` 2 loss . Next , we want to show that Rn+1 ≤ Rn , i.e. , the Bayes risk of the Bayes estimator is monotonically decreasing in the sample size n. Rn+1 = inf θ̂ : Xn+1×Yn+1→Rd Eθ∗∼N ( 0 , 1d Id ) , Xn+1 , yn+1 [ ∥∥∥θ̂ ( Xn+1 , yn+1 ) − θ∗∥∥∥2 Σ ] ≤ inf θ̂ : Xn×Yn→R Eθ∗∼N ( 0 , 1d Id ) , Xn+1 , yn+1 [ ∥∥∥θ̂ ( Xn , yn ) − θ∗∥∥∥2 Σ ] = Rn . Then we want to show that Rn equals the Bayes risk of the optimally regularized estimator θ̂λ , n , d : Rn = inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . Since Rn = inf θ̂ : Xn×Yn→Rd Eθ∗ , Xn , yn ∥∥∥θ̂ ( Xn , yn ) − θ∗∥∥∥2 Σ , we get Rn ≤ inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . On the other hand , recalling θ̂Bayes ( Xn , yn ) = arg minθ ( d ‖θ‖22 + ‖Xnθ−yn‖22 σ2 ) = θ̂σ2d n , n , d and Rn = Eθ∗∼N ( 0 , 1d Id ) , Xn , yn [ ∥∥∥θ̂Bayes ( Xn , yn ) − θ∗∥∥∥2 Σ ] , we deduce Rn ≥ inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . Therefore we deduce Rn = infλ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . As a result , we establish sample-wise monotonicity of the Bayes risk of optimal regularized θ̂λ , n , d : Rn+1 = inf λ≥0 Eθ∗ , Xn+1 , yn+1 ∥∥∥θ̂λ , n+1 , d − θ∗∥∥∥2 Σ ≤ inf λ≥0 Eθ∗ , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ = Rn . ( 50 ) In what follows , we show that if θ∗ is given by Equation ( 18 ) , the excess risk of θ̂λ , n , d is asymptotically equal to its Bayes risk when θ∗ ∼ N ( 0 , 1dId ) : lim di→∞ ∣∣∣∣EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ − Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ ∣∣∣∣ = 0 . We abuse the notation in the above equation . The θ∗ in EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ satisfies Equation ( 18 ) , while the θ∗ in Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ follows a normal distribution N ( 0 , 1dId ) . By Lemma 5 and Lemma 6 , if Σ = PΛP > and θ′ = P > θ∗ are as defined in Table 1 ( where P is an orthogonal matrix and Λ = diag ( λ1Id1 , . . . , λmIdm ) ∈ Rd×d is a diagonal matrix ) , for fixed θ∗ we have EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ =EXn , yn [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] + σ2EXn , yn [ ‖ΛZ ( λnIn + Z > ΛZ ) −1 ‖22 ] , where every entry ofZ ∈ Rd×n follows i.i.d . N ( 0 , 1 ) . If θ∗ ∼ N ( 0 , 1dId ) , we have θ ′ ∼ N ( 0 , 1dId ) . Since the variance term σ2EXn , yn [ ‖ΛZ ( λnIn + Z > ΛZ ) −1 ‖22 ] does not depend on θ∗ , the two variance terms cancel out and we get EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ − Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ =EXn , yn [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] − EXn , yn , θ′∼N ( 0 , 1d Id ) [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] For U ∼ ⊕ i∈ [ m ] Unif ( O ( di ) ) , we have ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 d = ( Id + 1 nλ Λ1/2UZZ > U > Λ1/2 ) −1 = U ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 U > . By Lemma 13 , for θ∗ ( and thereby θ′ ) specified in Equation ( 18 ) , we get EXn , yn [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 θ′‖22 ] = EXn , yn , φ [ ‖Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 φ‖22 ] , where φ ∼ ⊕ i∈ [ m ] Unif ( Sdi−1 ( ‖θ′i‖2 ) ) = ⊕ i∈ [ m ] Unif ( Sdi−1 ( √ di/d ) ) . In the Bayesian setting , if θ′ ∼ N ( 0 , 1dId ) , then U > θ′ ∼ N ( 0 , 1dId ) . We have Eθ′∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ = Eθ′∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥∥∥Λ1/2U ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 U > θ′ ∥∥∥∥∥ 2 2 = EXn , yn , ψ ∥∥∥∥∥Λ1/2 ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1 ψ ∥∥∥∥∥ 2 2 , where ψ = U > θ′ ∼ N ( 0 , 1dId ) . Next , we want to couple φ and ψ . Let si i.i.d.∼ Unif ( Sdi−1 ( 1 ) ) , hi i.i.d.∼ χ2 ( di ) , and define φ = √ d1/ds1 ... √ dm/dsm , ψ = √ h1/ds1 ... √ hm/dsm . We have ‖φ‖2 = 1 and ‖ψ‖2 = √√√√ m∑ i=1 hi d = √√√√ m∑ i=1 di d · hi di , ‖φ− ψ‖2 = √√√√ m∑ i=1 di d ( 1− √ hi di ) 2 . By the strong law of large numbers , limdi→+∞ hi/di = 1 almost surely . Thus we get limdi→+∞ , di/d→νi ‖ψ‖2 = √∑m i=1 νi and limdi→+∞ , di/d→νi ‖φ− ψ‖2 = 0 almost surely ( recall that we will let di → +∞ and di/d → νi for some constant νi > 0 . ) . Because∥∥Λ1/2∥∥ 2 . 1 and ∥∥∥ ( Id + 1nλΛ1/2ZZ > Λ1/2 ) −1∥∥∥ 2 ≤ ‖Id‖2 = 1 , we bound the norm of Q , Λ1/2 ( Id + 1 nλΛ 1/2ZZ > Λ1/2 ) −1 as follows ‖Q‖2 ≤ ∥∥∥Λ1/2∥∥∥ 2 ∥∥∥∥∥ ( Id + 1 nλ Λ1/2ZZ > Λ1/2 ) −1∥∥∥∥∥ 2 . 1 . It follows that ∣∣∣EXn , yn , φ [ ‖Qφ‖22 ] − EXn , yn , ψ [ ‖Qψ‖22 ] ∣∣∣ ≤EXn , yn , φ , ψ ∣∣∣‖Qφ‖22 − ‖Qψ‖22∣∣∣ =EXn , ynφ , ψ ( ‖Qφ‖2 + ‖Qψ‖2 ) |‖Qφ‖2 − ‖Qψ‖2| .EXn , ynφ , ψ [ ( ‖φ‖2 + ‖ψ‖2 ) ‖Q ( φ− ψ ) ‖2 ] .EXn , ynφ , ψ ‖φ− ψ‖2 , where the last inequality is because ‖φ‖2 + ‖ψ‖2 . 1 for all sufficiently large di . We know that limdi→+∞ , di/d→νi ‖φ− ψ‖2 = 0 almost surely . To apply Lebesgue ’ s dominated convergence theorem , we need to find a dominating integrable random variable . In fact , 1 + ‖ψ‖2 dominates ‖φ− ψ‖2 : ‖φ− ψ‖2 ≤ ‖φ‖2 + ‖ψ‖2 = 1 + ‖ψ‖2 . It is integrable because E ‖ψ‖2 = E [ √ χ2 ( d ) d ] ≤ √ E [ χ2 ( d ) ] d = 1 . Application of Lebesgue ’ s dominated convergence theorem yields lim di→+∞ , di/d→νi ∣∣∣EXn , yn , φ [ ‖Qφ‖22 ] − EXn , yn , ψ [ ‖Qψ‖22 ] ∣∣∣ = 0 . Therefore , we conclude that lim di→+∞ , di/d→νi ∣∣∣∣EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2Σ − Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ ∣∣∣∣ = 0 and this convergence is uniform in n and λ ∈ ( 0 , ∞ ) . It follows that lim n , di→∞ n/di→γi ∣∣∣∣EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ − Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ ∣∣∣∣ = 0 and this convergence is uniform in λ ∈ ( 0 , ∞ ) . By Lemma 8 ( the proof is similar when we replace α→ +∞ by n , di →∞ , n/di → γi ) , we have lim n , di→∞ n/di→γi ∣∣∣∣ infλ > 0EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ − infλ > 0Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2Σ ∣∣∣∣ = 0 . ( 51 ) Define fα ( λ ) = Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . We use α to denote the indices n , di . By Lemma 5 and Lemma 6 , we have Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . Eθ∗∼N ( 0 , 1d Id ) ‖θ ∗‖22 = 1 . Therefore { fα ( λ ) } is uniformly bounded for λ > 0 . Since ∣∣∣∣ ddλEXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ ∣∣∣∣ . ‖θ∗‖22 and Eθ∗∼N ( 0 , 1d Id ) ‖θ ∗‖22 = 1 , we have∣∣∣∣ ddλEθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2Σ ∣∣∣∣ = ∣∣∣∣Eθ∗∼N ( 0 , 1d Id ) ddλEXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2Σ ∣∣∣∣ . 1 . As a result , { fα ( λ ) } is uniformly equicontinuous for λ > 0 , and in particular λ ∈ ( 0 , M ] for any M > 0 . Therefore { fα ( λ ) } can be extended continuously to [ 0 , M ] and the family of extended functions is still uniformly bounded and uniformly equicontinuous . Recall that if θ∗ ∼ N ( 0 , 1dId ) , we have θ′ ∼ N ( 0 , 1dId ) . As in Equation ( 19 ) , write θ ′ in a row-partitioned form θ′ = θ ′ 1 ... θ′m , where θ′i ∈ Rdi . Then ‖Πiθ∗‖2 = ‖θ′i‖2 ∼ √ χ2 ( di ) d = √ χ2 ( di ) di · did → √ νi as n , di → +∞ and n/di → γi , where νi = ( γi ∑ j∈ [ m ] 1 γj ) −1 . By Theorem 1 , { fα ( λ ) } converges pointwise , say , to h ( λ , γ1 , . . . , γm ) . By the Arzela-Ascoli theorem , limα fα ( λ ) = h ( λ , γ1 , . . . , γm ) uniformly on λ ∈ [ 0 , M ] . Therefore , as n , di →∞ and n/di → γi , by Lemma 8 , we have inf λ∈ [ 0 , M ] Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ → inf λ∈ [ 0 , M ] h ( λ , γ1 , . . . , γm ) . Recalling θ̂Bayes ( Xn , yn ) = arg minθ ( d ‖θ‖22 + ‖Xnθ−yn‖22 σ2 ) = θ̂σ2d n , n and Rn = Eθ∗∼N ( 0 , 1d Id ) , Xn , yn [ ∥∥∥θ̂Bayes ( Xn , yn ) − θ∗∥∥∥2 Σ ] = inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ . For all M > CM : = 2σ2 ∑ i∈ [ m ] 1 γi ≥ σ 2d n ( recall d n → ∑ i∈ [ m ] 1 γi ) , we have inf λ∈ [ 0 , M ] Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ = inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) EXn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ → inf λ∈ [ 0 , M ] h ( λ , γ1 , . . . , γm ) . The uniqueness of limits implies that infλ∈ [ 0 , M ] h ( λ , γ1 , . . . , γm ) is independent of M as long as M > σ2 . As a result , if M > CM , we have infλ∈ [ 0 , M ] h ( λ , γ1 , . . . , γm ) = infλ≥0 h ( λ , γ1 , . . . , γm ) , which yields inf λ≥0 Eθ∗∼N ( 0 , 1d Id ) , Xn , yn ∥∥∥θ̂λ , n , d − θ∗∥∥∥2 Σ → inf λ≥0 h ( λ , γ1 , . . . , γm ) . ( 52 ) Equation ( 50 ) implies infλ≥0 h ( λ , γ1 , . . . , γm ) is decreasing in every γi . Combining Equation ( 51 ) and Equation ( 52 ) gives inf λ≥0 EXn , yn ∥∥∥θ̂λ , n − θ∗∥∥∥2 Σ → inf λ≥0 h ( λ , γ1 , . . . , γm ) . | The paper builds on a very recent line of work studying the “multiple descent” phenomenon. Multiple descent is known to occur along many axes: (i) number of parameters, (ii) train time, (iii) amount of train data. The current paper focuses on studying the theoretical rates for (iii) in the asymptotic regime where the number of samples and the dimensionality of data tend to infinity at similar rates. This covers both under and over-parameterized settings. In this limiting regime, the main results of the paper are: 1. Computing formulae for the excess risk of the least squares estimator and the ridge regression estimator in a specific setting. 2. Using 1, they show that if the covariance matrix of data is ill-conditioned, then multiple descent can happen. 3. They also show that under an assumption on the scaling of the projections of the true parameter to the eigen-spaces of the eigenvalues of the covariance matrix, an optimal amount of regularization ridge regression estimator avoids multiple descent even in anisotropic settings which is novel. | SP:393abedf96b356492f7524a041bf15b677328c4a |
DictFormer: Tiny Transformer with Shared Dictionary | 1 INTRODUCTION . Transformer ( Vaswani et al. , 2017 ) has been widely used in natural language processing ( NLP ) for its superior capability in capturing long-distance dependencies . However , its good performance comes with the giant model size . For example , T5 ( Raffel et al. , 2019 ) with a hidden dimension of 65K and GPT-3 ( Brown et al. , 2020 ) with 96 transformer blocks have 11 billion and 175 billion parameters , respectively . These large Transformers suffer from multiple severe issues , such as complicated learning and difficult deployment on mobile/IoT devices . First , during the training of a big transformer model , large training corpora ( Raffel et al. , 2019 ; Brown et al. , 2020 ; Mehta et al. , 2021 ) or careful regularization ( Merity et al. , 2017 ; Mehta et al. , 2021 ) are required . Furthermore , the trained model is over-parameterized ( Reid et al. , 2021 ) . The large model size with 11 billion and 175 billion parameters is beyond the capabilities of many edge devices including mobile devices and IoTs . Therefore , there is an urgent need to design parameter-efficient and fast transformer model that eliminates redundant parameters and enables real-time NLP applications on the edge . Weights sharing is a choice proved by ALBERT ( Lan et al. , 2020 ) for designing compact and efficient pre-trained transformer encoders like BERT on self-supervised learning task . However , directly sharing all weights in an encoder-decoder transformer on a sequence-to-sequence task like machine translation will dramatically decrease transformer ’ s performance and accuracy ( Reid et al. , 2021 ) . Although a recent framework Universal Transformer ( UT ) ( Dehghani et al. , 2019 ) shows that a vanilla transformer ’ s accuracy can be improved by using recursive weight sharing , UT ’ s high accuracy comes at the cost of deeper blocks or wider hidden dimensions , which significantly enlarges the computational cost and does not necessarily reduce the model size . This paper introduces a new compact , fast , and accurate transformer architecture , DictFormer , that can be easily trained and deployed on edge devices . DictFormer depends on dictionary sharing and unshared linear projection coefficients instead of weights sharing . Specifically , a shared dictionary among all encoder/decoder blocks can significantly reduce the parameter redundancy and Under review as a conference paper at ICLR 2022 therefore compresses the model size . Few unshared linear projection with coefficients on the shared dictionary enable each encoder/decoder block to have distinct layer-wise feature representations , thus improving the representation abilities compared to prior weights sharing . Also , DictFormer provides a method to dynamically control the layer-wise representation abilities by using the groupwise shared dictionary for layers with large-dimension features , e.g. , Feed-forward Network ( FFN ) . Last but not least , we show that training dictionary and coefficients are not trivial since indices used for looking up dictionary are not differentiable . We convert coefficients and indices into a sparse matrix and train it with l1 norm relaxation and convert this sparse matrix into dense coefficients and indices during inference . Extensive experiments demonstrate that our DictFormer provides significant improvements over existing transformers on three sequence-to-sequence tasks , ( i ) machine translation , ( ii ) abstractive summarization , and ( iii ) language modeling . For machine translation , on IWSLT 2014 GermanEnglish , DictFormer attains transformer performance with 8.9× fewer parameters and 2× fewer Multi-Adds , or achieves 2.2 higher BLEU score under similar model size ; on WMT 2014 GermanEnglish , DictFormer brings about 4.9× model compression and 1.9× computation reduction with even 0.7 higher BLEU score ; on WMT 2014 English-French , DictFormer obtains consistent performance improvements : 4.9× model compression and 1.9× less computation with a similar or better BLEU score , or 2.1 BLEU score improvement with similar model size . For abstractive summarization , DictFormer reduces the model size by more than 4.7× on CNN-DailyMail dataset . For language modeling , DictFormer matches the performance of transformer with 3.6× to 5.7× fewer parameters , or achieves ∼ 1.7 lower perplexity than transformer on WikiText-103 benchmark . 2 RELATED WORK AND MOTIVATION . Related Lite-weight Transformers . Several methods have been proposed to design lite-weight transformers . The first line of research is to reduce the transformer computation complexities by redesigning self-attention mechanism including ( Katharopoulos et al. , 2020 ; Zhou et al. , 2021 ; Raganato et al. , 2020 ; You et al. , 2020 ; Correia et al. , 2019 ; Kaiser et al. , 2018 ) . These methods can not reduce model size . The second line of research is model compression , e.g. , quantization ( Prato et al. , 2020 ) , pruning ( Behnke & Heafield , 2020 ) , low-rank factorization ( Ma et al. , 2019 ) , and knowledge distillation ( Wang et al. , 2020 ) . These two directions of research can be combined with our Dictformer . The third line of research is efficient architecture design ( So et al. , 2019 ; Wu et al. , 2020 ; Mehta et al. , 2021 ) by improving the expressiveness of transformers . The forth line of research is weights sharing ( Xia et al. , 2019 ; Ma et al. , 2019 ; Dehghani et al. , 2019 ; Reid et al. , 2021 ; Takase & Kiyono , 2021 ) by reusing parameters across transformer blocks . Weights sharing can not reduce computations . Our Dictformer falls into the third and forth category . We show that our Dictformer with Dictionary sharing can reduce both model size and computations . Transformers with Weights Sharing . Weight sharing is surprisingly effective to compress model size for discriminate NLP models based on Transformer encoders , e.g. , BERT . For example , prior work ALBERT ( Lan et al. , 2020 ) shows that even sharing all parameters across layers does not introduce any accuracy reduction . However , for generative sequence-to-sequence models based on transformer ’ s encoders and decoders , sharing all parameters will significantly decrease accuracy on multiple standard machine translation or language modelling tasks ( Reid et al. , 2021 ; Takase & Kiyono , 2021 ) . To match vanilla Transformer ’ s accuracy , multiple works ( Reid et al. , 2021 ; Takase & Kiyono , 2021 ; Xia et al. , 2019 ; Ma et al. , 2019 ) only share weights across partial layers instead of all layers . However , partial weights sharing remarkably brings down the model size compression effect of weights sharing . Also , how to decide which layers should be shared in partial weights sharing is difficult due to the large and dynamic search space that is dependent on the specific tasks . Transformer with all-parameters sharing such as Universal Transformer ( Dehghani et al. , 2019 ) matches or improves transformer ’ s performance at the cost of a wider or deeper transformer architecture . A wider transformer with a larger embedding dimension enlarges the model size and brings larger computations ( Mult-Adds ) . A deeper transformer with more encoder/decoder blocks does not only increase model size , but also introduces more computations . Importantly , weights sharing techniques can not reduce Mult-Adds numbers and training/inference time . Figure 8 ( a ) in Appendix shows the comparisons of Transformers with weights sharing and our dictionary sharing . Weights sharing techniques can not solve the deployment challenges of transformers on resource-limited devices for real-time NLP applications . Under review as a conference paper at ICLR 2022 Motivation of DictFormer with Dictionary Sharing . Figure 1 shows that although transformers with weights sharing including Universal Transformer ( Dehghani et al. , 2019 ) , Tied Transformer ( Xia et al. , 2019 ) , and Subformer ( Reid et al. , 2021 ) significantly reduce the model size over vanilla transformer and even one recent lightweight transformer DeLighT ( Mehta et al. , 2021 ) , they can not reduce the # Mult-Adds and even suffer from larger # Mult-Adds , e.g. , Universal Transformer . Particularly , Tied Transformer ( Xia et al. , 2019 ) and Subformer ( Reid et al. , 2021 ) compress transformer model by 1.7× ∼ 2.6× but can not reduce Mult-Adds . Universal Transformer ( Dehghani et al. , 2019 ) achieves ∼ 1 BLEU score improvement with 1.4× less parameters , but the Mult-Adds numbers are increased by ∼ 4.3× , thereby significantly prolonging the NLP inference latency and restraining the deployment of real-time NLP applications on edge devices . To enable the deployment of transformer models on mobile devices , recent work Evolved Transformer ( So et al. , 2019 ) and Lite Transformer ( Wu et al. , 2020 ) try to design new lite-weight transformer architecture to meet the defined mobile settings , e.g. , 10 million parameters , but their tiny architectures have to suffer from a large accuracy decrease . As Figure 1 shows , Evolved Transformer and Lite Transformer lose 2.9 and 2.4 BLEU score compared to base transformer , respectively . 3 DICTFORMER . Overview . We propose DictFormer with dictionary sharing to enable a fast , compact , and accurate transformer . When matching transformer ’ s accuracy , DictFormer can reduce more than 3.6× parameters and ∼ 3× Mult-Adds shown in Figure 1 , which outperforms prior transformers with a higher BLEU score . Also , DictFormer is flexible to compress model size given an accuracy threshold . For instance , when DictFormer matches the accuracy of Lite Transformer , it could further compress the model of lite transformer by ∼ 2.2× . Given a N -layer transformer model , we can easily transform it into DictFormer by converting all the weights in N blocks into one shared dictionary and few unshared look-up coefficients , shown in Figure 2 . For example , N -layer weights attention WAi and FFN WFi , where i ∈ [ 0 , N − 1 ] , in Transformer ( Figure 2 ( a ) ) are represented by smaller dictionaries DA , DF that are shared by N blocks , and N -layer unshared coefficients CAi and C F i for DictFormer ( Figure 2 ( b ) ) . Meanwhile , the attention and FFN operations in vanilla Transformer are replaced with shared-dictionary attention and group-wise shared-dictionary FFN whose details are introduced in our following contents . Dictformer reduces Transformer ’ s # Params from O ( d2N ) to O ( d ( m + tN ) ) . This is a O ( dN/ ( m + tN ) ) × model size reduction since dictionary size m < d , coefficient size t < < d , where the embedding size is d. Dictformer also reduces # Mult-Adds from O ( d2Nn ) to O ( dNn ( m+ t ) ) , where n is input sequence length . The details on how to define and calculate # Params and # Mult-Adds are shown in Appendix A.1 . Shared-dictionary Attention . Given a N -layer transformer model , we define that Qi , Ki , and Vi are the i-th layer query , key , and values . Same to Transformer ( Vaswani et al. , 2017 ) , we also use equation 1 to calculate the attention scores once we have query , key , and values . Attention ( Qi , Ki , Vi ) = softmax ( Qi ·KTi√ d ) · Vi ( 1 ) Our DictFormer utilizes equation 2 instead of MultiHead ( Qi , Ki , Vi ) = MHi · WOi used in Transformer ( Vaswani et al. , 2017 ) to compute multi-head values , where MHi is derived according Under review as a conference paper at ICLR 2022 FFN Attention Embed Attention FFN Sh ar ed E nc od er T x Embed Attention FFN Sh ar ed D ec od er T xAttention Shared Encoder Shared Encoder Embed ... t x t x | This paper proposes a compression method for Transformer-based encoder-decoder or language models. The key idea of the proposed method is to decompose the standard parameters into a much smaller shared parameter matrix and independent parameters for each original matrix. Then, the method can approximately recover the original Transformer models by simple additions and multiplications. The experiments are conducted on three MT tasks, one summarization task, and one language modeling task. Experimental results show that the proposed method seems to reduce model sizes and computations successfully while preventing considerable performance degradation (in some cases, the proposed method appears to improve the performance). | SP:9a79d9874650abc10278a3a97bbf3a7efa8dd45e |
DictFormer: Tiny Transformer with Shared Dictionary | 1 INTRODUCTION . Transformer ( Vaswani et al. , 2017 ) has been widely used in natural language processing ( NLP ) for its superior capability in capturing long-distance dependencies . However , its good performance comes with the giant model size . For example , T5 ( Raffel et al. , 2019 ) with a hidden dimension of 65K and GPT-3 ( Brown et al. , 2020 ) with 96 transformer blocks have 11 billion and 175 billion parameters , respectively . These large Transformers suffer from multiple severe issues , such as complicated learning and difficult deployment on mobile/IoT devices . First , during the training of a big transformer model , large training corpora ( Raffel et al. , 2019 ; Brown et al. , 2020 ; Mehta et al. , 2021 ) or careful regularization ( Merity et al. , 2017 ; Mehta et al. , 2021 ) are required . Furthermore , the trained model is over-parameterized ( Reid et al. , 2021 ) . The large model size with 11 billion and 175 billion parameters is beyond the capabilities of many edge devices including mobile devices and IoTs . Therefore , there is an urgent need to design parameter-efficient and fast transformer model that eliminates redundant parameters and enables real-time NLP applications on the edge . Weights sharing is a choice proved by ALBERT ( Lan et al. , 2020 ) for designing compact and efficient pre-trained transformer encoders like BERT on self-supervised learning task . However , directly sharing all weights in an encoder-decoder transformer on a sequence-to-sequence task like machine translation will dramatically decrease transformer ’ s performance and accuracy ( Reid et al. , 2021 ) . Although a recent framework Universal Transformer ( UT ) ( Dehghani et al. , 2019 ) shows that a vanilla transformer ’ s accuracy can be improved by using recursive weight sharing , UT ’ s high accuracy comes at the cost of deeper blocks or wider hidden dimensions , which significantly enlarges the computational cost and does not necessarily reduce the model size . This paper introduces a new compact , fast , and accurate transformer architecture , DictFormer , that can be easily trained and deployed on edge devices . DictFormer depends on dictionary sharing and unshared linear projection coefficients instead of weights sharing . Specifically , a shared dictionary among all encoder/decoder blocks can significantly reduce the parameter redundancy and Under review as a conference paper at ICLR 2022 therefore compresses the model size . Few unshared linear projection with coefficients on the shared dictionary enable each encoder/decoder block to have distinct layer-wise feature representations , thus improving the representation abilities compared to prior weights sharing . Also , DictFormer provides a method to dynamically control the layer-wise representation abilities by using the groupwise shared dictionary for layers with large-dimension features , e.g. , Feed-forward Network ( FFN ) . Last but not least , we show that training dictionary and coefficients are not trivial since indices used for looking up dictionary are not differentiable . We convert coefficients and indices into a sparse matrix and train it with l1 norm relaxation and convert this sparse matrix into dense coefficients and indices during inference . Extensive experiments demonstrate that our DictFormer provides significant improvements over existing transformers on three sequence-to-sequence tasks , ( i ) machine translation , ( ii ) abstractive summarization , and ( iii ) language modeling . For machine translation , on IWSLT 2014 GermanEnglish , DictFormer attains transformer performance with 8.9× fewer parameters and 2× fewer Multi-Adds , or achieves 2.2 higher BLEU score under similar model size ; on WMT 2014 GermanEnglish , DictFormer brings about 4.9× model compression and 1.9× computation reduction with even 0.7 higher BLEU score ; on WMT 2014 English-French , DictFormer obtains consistent performance improvements : 4.9× model compression and 1.9× less computation with a similar or better BLEU score , or 2.1 BLEU score improvement with similar model size . For abstractive summarization , DictFormer reduces the model size by more than 4.7× on CNN-DailyMail dataset . For language modeling , DictFormer matches the performance of transformer with 3.6× to 5.7× fewer parameters , or achieves ∼ 1.7 lower perplexity than transformer on WikiText-103 benchmark . 2 RELATED WORK AND MOTIVATION . Related Lite-weight Transformers . Several methods have been proposed to design lite-weight transformers . The first line of research is to reduce the transformer computation complexities by redesigning self-attention mechanism including ( Katharopoulos et al. , 2020 ; Zhou et al. , 2021 ; Raganato et al. , 2020 ; You et al. , 2020 ; Correia et al. , 2019 ; Kaiser et al. , 2018 ) . These methods can not reduce model size . The second line of research is model compression , e.g. , quantization ( Prato et al. , 2020 ) , pruning ( Behnke & Heafield , 2020 ) , low-rank factorization ( Ma et al. , 2019 ) , and knowledge distillation ( Wang et al. , 2020 ) . These two directions of research can be combined with our Dictformer . The third line of research is efficient architecture design ( So et al. , 2019 ; Wu et al. , 2020 ; Mehta et al. , 2021 ) by improving the expressiveness of transformers . The forth line of research is weights sharing ( Xia et al. , 2019 ; Ma et al. , 2019 ; Dehghani et al. , 2019 ; Reid et al. , 2021 ; Takase & Kiyono , 2021 ) by reusing parameters across transformer blocks . Weights sharing can not reduce computations . Our Dictformer falls into the third and forth category . We show that our Dictformer with Dictionary sharing can reduce both model size and computations . Transformers with Weights Sharing . Weight sharing is surprisingly effective to compress model size for discriminate NLP models based on Transformer encoders , e.g. , BERT . For example , prior work ALBERT ( Lan et al. , 2020 ) shows that even sharing all parameters across layers does not introduce any accuracy reduction . However , for generative sequence-to-sequence models based on transformer ’ s encoders and decoders , sharing all parameters will significantly decrease accuracy on multiple standard machine translation or language modelling tasks ( Reid et al. , 2021 ; Takase & Kiyono , 2021 ) . To match vanilla Transformer ’ s accuracy , multiple works ( Reid et al. , 2021 ; Takase & Kiyono , 2021 ; Xia et al. , 2019 ; Ma et al. , 2019 ) only share weights across partial layers instead of all layers . However , partial weights sharing remarkably brings down the model size compression effect of weights sharing . Also , how to decide which layers should be shared in partial weights sharing is difficult due to the large and dynamic search space that is dependent on the specific tasks . Transformer with all-parameters sharing such as Universal Transformer ( Dehghani et al. , 2019 ) matches or improves transformer ’ s performance at the cost of a wider or deeper transformer architecture . A wider transformer with a larger embedding dimension enlarges the model size and brings larger computations ( Mult-Adds ) . A deeper transformer with more encoder/decoder blocks does not only increase model size , but also introduces more computations . Importantly , weights sharing techniques can not reduce Mult-Adds numbers and training/inference time . Figure 8 ( a ) in Appendix shows the comparisons of Transformers with weights sharing and our dictionary sharing . Weights sharing techniques can not solve the deployment challenges of transformers on resource-limited devices for real-time NLP applications . Under review as a conference paper at ICLR 2022 Motivation of DictFormer with Dictionary Sharing . Figure 1 shows that although transformers with weights sharing including Universal Transformer ( Dehghani et al. , 2019 ) , Tied Transformer ( Xia et al. , 2019 ) , and Subformer ( Reid et al. , 2021 ) significantly reduce the model size over vanilla transformer and even one recent lightweight transformer DeLighT ( Mehta et al. , 2021 ) , they can not reduce the # Mult-Adds and even suffer from larger # Mult-Adds , e.g. , Universal Transformer . Particularly , Tied Transformer ( Xia et al. , 2019 ) and Subformer ( Reid et al. , 2021 ) compress transformer model by 1.7× ∼ 2.6× but can not reduce Mult-Adds . Universal Transformer ( Dehghani et al. , 2019 ) achieves ∼ 1 BLEU score improvement with 1.4× less parameters , but the Mult-Adds numbers are increased by ∼ 4.3× , thereby significantly prolonging the NLP inference latency and restraining the deployment of real-time NLP applications on edge devices . To enable the deployment of transformer models on mobile devices , recent work Evolved Transformer ( So et al. , 2019 ) and Lite Transformer ( Wu et al. , 2020 ) try to design new lite-weight transformer architecture to meet the defined mobile settings , e.g. , 10 million parameters , but their tiny architectures have to suffer from a large accuracy decrease . As Figure 1 shows , Evolved Transformer and Lite Transformer lose 2.9 and 2.4 BLEU score compared to base transformer , respectively . 3 DICTFORMER . Overview . We propose DictFormer with dictionary sharing to enable a fast , compact , and accurate transformer . When matching transformer ’ s accuracy , DictFormer can reduce more than 3.6× parameters and ∼ 3× Mult-Adds shown in Figure 1 , which outperforms prior transformers with a higher BLEU score . Also , DictFormer is flexible to compress model size given an accuracy threshold . For instance , when DictFormer matches the accuracy of Lite Transformer , it could further compress the model of lite transformer by ∼ 2.2× . Given a N -layer transformer model , we can easily transform it into DictFormer by converting all the weights in N blocks into one shared dictionary and few unshared look-up coefficients , shown in Figure 2 . For example , N -layer weights attention WAi and FFN WFi , where i ∈ [ 0 , N − 1 ] , in Transformer ( Figure 2 ( a ) ) are represented by smaller dictionaries DA , DF that are shared by N blocks , and N -layer unshared coefficients CAi and C F i for DictFormer ( Figure 2 ( b ) ) . Meanwhile , the attention and FFN operations in vanilla Transformer are replaced with shared-dictionary attention and group-wise shared-dictionary FFN whose details are introduced in our following contents . Dictformer reduces Transformer ’ s # Params from O ( d2N ) to O ( d ( m + tN ) ) . This is a O ( dN/ ( m + tN ) ) × model size reduction since dictionary size m < d , coefficient size t < < d , where the embedding size is d. Dictformer also reduces # Mult-Adds from O ( d2Nn ) to O ( dNn ( m+ t ) ) , where n is input sequence length . The details on how to define and calculate # Params and # Mult-Adds are shown in Appendix A.1 . Shared-dictionary Attention . Given a N -layer transformer model , we define that Qi , Ki , and Vi are the i-th layer query , key , and values . Same to Transformer ( Vaswani et al. , 2017 ) , we also use equation 1 to calculate the attention scores once we have query , key , and values . Attention ( Qi , Ki , Vi ) = softmax ( Qi ·KTi√ d ) · Vi ( 1 ) Our DictFormer utilizes equation 2 instead of MultiHead ( Qi , Ki , Vi ) = MHi · WOi used in Transformer ( Vaswani et al. , 2017 ) to compute multi-head values , where MHi is derived according Under review as a conference paper at ICLR 2022 FFN Attention Embed Attention FFN Sh ar ed E nc od er T x Embed Attention FFN Sh ar ed D ec od er T xAttention Shared Encoder Shared Encoder Embed ... t x t x | This work proposes a modification of the original Transformer architecture by replacing attention layers and layers in its Feed-Forward Networks across all of its blocks with learned shared dictionaries. The proposed model, called DictFormer, has a smaller number of parameters and uses a smaller amount of computational operations when compared to the original Transformer and some of its variations. When evaluated against these models on popular machine translation, summarization, and language modeling benchmarks, DictFormer achieves comparable or better performance. | SP:9a79d9874650abc10278a3a97bbf3a7efa8dd45e |
DictFormer: Tiny Transformer with Shared Dictionary | 1 INTRODUCTION . Transformer ( Vaswani et al. , 2017 ) has been widely used in natural language processing ( NLP ) for its superior capability in capturing long-distance dependencies . However , its good performance comes with the giant model size . For example , T5 ( Raffel et al. , 2019 ) with a hidden dimension of 65K and GPT-3 ( Brown et al. , 2020 ) with 96 transformer blocks have 11 billion and 175 billion parameters , respectively . These large Transformers suffer from multiple severe issues , such as complicated learning and difficult deployment on mobile/IoT devices . First , during the training of a big transformer model , large training corpora ( Raffel et al. , 2019 ; Brown et al. , 2020 ; Mehta et al. , 2021 ) or careful regularization ( Merity et al. , 2017 ; Mehta et al. , 2021 ) are required . Furthermore , the trained model is over-parameterized ( Reid et al. , 2021 ) . The large model size with 11 billion and 175 billion parameters is beyond the capabilities of many edge devices including mobile devices and IoTs . Therefore , there is an urgent need to design parameter-efficient and fast transformer model that eliminates redundant parameters and enables real-time NLP applications on the edge . Weights sharing is a choice proved by ALBERT ( Lan et al. , 2020 ) for designing compact and efficient pre-trained transformer encoders like BERT on self-supervised learning task . However , directly sharing all weights in an encoder-decoder transformer on a sequence-to-sequence task like machine translation will dramatically decrease transformer ’ s performance and accuracy ( Reid et al. , 2021 ) . Although a recent framework Universal Transformer ( UT ) ( Dehghani et al. , 2019 ) shows that a vanilla transformer ’ s accuracy can be improved by using recursive weight sharing , UT ’ s high accuracy comes at the cost of deeper blocks or wider hidden dimensions , which significantly enlarges the computational cost and does not necessarily reduce the model size . This paper introduces a new compact , fast , and accurate transformer architecture , DictFormer , that can be easily trained and deployed on edge devices . DictFormer depends on dictionary sharing and unshared linear projection coefficients instead of weights sharing . Specifically , a shared dictionary among all encoder/decoder blocks can significantly reduce the parameter redundancy and Under review as a conference paper at ICLR 2022 therefore compresses the model size . Few unshared linear projection with coefficients on the shared dictionary enable each encoder/decoder block to have distinct layer-wise feature representations , thus improving the representation abilities compared to prior weights sharing . Also , DictFormer provides a method to dynamically control the layer-wise representation abilities by using the groupwise shared dictionary for layers with large-dimension features , e.g. , Feed-forward Network ( FFN ) . Last but not least , we show that training dictionary and coefficients are not trivial since indices used for looking up dictionary are not differentiable . We convert coefficients and indices into a sparse matrix and train it with l1 norm relaxation and convert this sparse matrix into dense coefficients and indices during inference . Extensive experiments demonstrate that our DictFormer provides significant improvements over existing transformers on three sequence-to-sequence tasks , ( i ) machine translation , ( ii ) abstractive summarization , and ( iii ) language modeling . For machine translation , on IWSLT 2014 GermanEnglish , DictFormer attains transformer performance with 8.9× fewer parameters and 2× fewer Multi-Adds , or achieves 2.2 higher BLEU score under similar model size ; on WMT 2014 GermanEnglish , DictFormer brings about 4.9× model compression and 1.9× computation reduction with even 0.7 higher BLEU score ; on WMT 2014 English-French , DictFormer obtains consistent performance improvements : 4.9× model compression and 1.9× less computation with a similar or better BLEU score , or 2.1 BLEU score improvement with similar model size . For abstractive summarization , DictFormer reduces the model size by more than 4.7× on CNN-DailyMail dataset . For language modeling , DictFormer matches the performance of transformer with 3.6× to 5.7× fewer parameters , or achieves ∼ 1.7 lower perplexity than transformer on WikiText-103 benchmark . 2 RELATED WORK AND MOTIVATION . Related Lite-weight Transformers . Several methods have been proposed to design lite-weight transformers . The first line of research is to reduce the transformer computation complexities by redesigning self-attention mechanism including ( Katharopoulos et al. , 2020 ; Zhou et al. , 2021 ; Raganato et al. , 2020 ; You et al. , 2020 ; Correia et al. , 2019 ; Kaiser et al. , 2018 ) . These methods can not reduce model size . The second line of research is model compression , e.g. , quantization ( Prato et al. , 2020 ) , pruning ( Behnke & Heafield , 2020 ) , low-rank factorization ( Ma et al. , 2019 ) , and knowledge distillation ( Wang et al. , 2020 ) . These two directions of research can be combined with our Dictformer . The third line of research is efficient architecture design ( So et al. , 2019 ; Wu et al. , 2020 ; Mehta et al. , 2021 ) by improving the expressiveness of transformers . The forth line of research is weights sharing ( Xia et al. , 2019 ; Ma et al. , 2019 ; Dehghani et al. , 2019 ; Reid et al. , 2021 ; Takase & Kiyono , 2021 ) by reusing parameters across transformer blocks . Weights sharing can not reduce computations . Our Dictformer falls into the third and forth category . We show that our Dictformer with Dictionary sharing can reduce both model size and computations . Transformers with Weights Sharing . Weight sharing is surprisingly effective to compress model size for discriminate NLP models based on Transformer encoders , e.g. , BERT . For example , prior work ALBERT ( Lan et al. , 2020 ) shows that even sharing all parameters across layers does not introduce any accuracy reduction . However , for generative sequence-to-sequence models based on transformer ’ s encoders and decoders , sharing all parameters will significantly decrease accuracy on multiple standard machine translation or language modelling tasks ( Reid et al. , 2021 ; Takase & Kiyono , 2021 ) . To match vanilla Transformer ’ s accuracy , multiple works ( Reid et al. , 2021 ; Takase & Kiyono , 2021 ; Xia et al. , 2019 ; Ma et al. , 2019 ) only share weights across partial layers instead of all layers . However , partial weights sharing remarkably brings down the model size compression effect of weights sharing . Also , how to decide which layers should be shared in partial weights sharing is difficult due to the large and dynamic search space that is dependent on the specific tasks . Transformer with all-parameters sharing such as Universal Transformer ( Dehghani et al. , 2019 ) matches or improves transformer ’ s performance at the cost of a wider or deeper transformer architecture . A wider transformer with a larger embedding dimension enlarges the model size and brings larger computations ( Mult-Adds ) . A deeper transformer with more encoder/decoder blocks does not only increase model size , but also introduces more computations . Importantly , weights sharing techniques can not reduce Mult-Adds numbers and training/inference time . Figure 8 ( a ) in Appendix shows the comparisons of Transformers with weights sharing and our dictionary sharing . Weights sharing techniques can not solve the deployment challenges of transformers on resource-limited devices for real-time NLP applications . Under review as a conference paper at ICLR 2022 Motivation of DictFormer with Dictionary Sharing . Figure 1 shows that although transformers with weights sharing including Universal Transformer ( Dehghani et al. , 2019 ) , Tied Transformer ( Xia et al. , 2019 ) , and Subformer ( Reid et al. , 2021 ) significantly reduce the model size over vanilla transformer and even one recent lightweight transformer DeLighT ( Mehta et al. , 2021 ) , they can not reduce the # Mult-Adds and even suffer from larger # Mult-Adds , e.g. , Universal Transformer . Particularly , Tied Transformer ( Xia et al. , 2019 ) and Subformer ( Reid et al. , 2021 ) compress transformer model by 1.7× ∼ 2.6× but can not reduce Mult-Adds . Universal Transformer ( Dehghani et al. , 2019 ) achieves ∼ 1 BLEU score improvement with 1.4× less parameters , but the Mult-Adds numbers are increased by ∼ 4.3× , thereby significantly prolonging the NLP inference latency and restraining the deployment of real-time NLP applications on edge devices . To enable the deployment of transformer models on mobile devices , recent work Evolved Transformer ( So et al. , 2019 ) and Lite Transformer ( Wu et al. , 2020 ) try to design new lite-weight transformer architecture to meet the defined mobile settings , e.g. , 10 million parameters , but their tiny architectures have to suffer from a large accuracy decrease . As Figure 1 shows , Evolved Transformer and Lite Transformer lose 2.9 and 2.4 BLEU score compared to base transformer , respectively . 3 DICTFORMER . Overview . We propose DictFormer with dictionary sharing to enable a fast , compact , and accurate transformer . When matching transformer ’ s accuracy , DictFormer can reduce more than 3.6× parameters and ∼ 3× Mult-Adds shown in Figure 1 , which outperforms prior transformers with a higher BLEU score . Also , DictFormer is flexible to compress model size given an accuracy threshold . For instance , when DictFormer matches the accuracy of Lite Transformer , it could further compress the model of lite transformer by ∼ 2.2× . Given a N -layer transformer model , we can easily transform it into DictFormer by converting all the weights in N blocks into one shared dictionary and few unshared look-up coefficients , shown in Figure 2 . For example , N -layer weights attention WAi and FFN WFi , where i ∈ [ 0 , N − 1 ] , in Transformer ( Figure 2 ( a ) ) are represented by smaller dictionaries DA , DF that are shared by N blocks , and N -layer unshared coefficients CAi and C F i for DictFormer ( Figure 2 ( b ) ) . Meanwhile , the attention and FFN operations in vanilla Transformer are replaced with shared-dictionary attention and group-wise shared-dictionary FFN whose details are introduced in our following contents . Dictformer reduces Transformer ’ s # Params from O ( d2N ) to O ( d ( m + tN ) ) . This is a O ( dN/ ( m + tN ) ) × model size reduction since dictionary size m < d , coefficient size t < < d , where the embedding size is d. Dictformer also reduces # Mult-Adds from O ( d2Nn ) to O ( dNn ( m+ t ) ) , where n is input sequence length . The details on how to define and calculate # Params and # Mult-Adds are shown in Appendix A.1 . Shared-dictionary Attention . Given a N -layer transformer model , we define that Qi , Ki , and Vi are the i-th layer query , key , and values . Same to Transformer ( Vaswani et al. , 2017 ) , we also use equation 1 to calculate the attention scores once we have query , key , and values . Attention ( Qi , Ki , Vi ) = softmax ( Qi ·KTi√ d ) · Vi ( 1 ) Our DictFormer utilizes equation 2 instead of MultiHead ( Qi , Ki , Vi ) = MHi · WOi used in Transformer ( Vaswani et al. , 2017 ) to compute multi-head values , where MHi is derived according Under review as a conference paper at ICLR 2022 FFN Attention Embed Attention FFN Sh ar ed E nc od er T x Embed Attention FFN Sh ar ed D ec od er T xAttention Shared Encoder Shared Encoder Embed ... t x t x | The authors proposed an efficient transformer layer based on a dictionary of shared parameters instead of standard self-attention. The goal is to reduce redundant parameters in transformer models. The main contributions are: a lite transformer model, modification of the self-attention parameters, and evaluation on language dowstream tasks. The proposed transformer model outperforms related work on the machine translation and language modelling tasks. | SP:9a79d9874650abc10278a3a97bbf3a7efa8dd45e |
A Systematic Evaluation of Domain Adaptation Algorithms On Time Series Data | 1 INTRODUCTION . Time series classification problem is predominant in many real-world applications including healthcare and manufacturing . Yet , time series data with its inherit temporal dynamics and complex underlying pattern can be more challenging than static data . Recently , deep learning has gained more attention in time series classification tasks , assuming access to a vast amount of labeled data for training ( Fawaz et al. , 2019 ) . However , annotating time series data can be challenging and burdensome due to its complex underlying patterns and complicated domain knowledge ( Chang et al. , 2020 ) . One way to reduce labeling burden is to leverage annotated data ( e.g. , synthetic or public data ) from a relevant domain ( i.e. , source domain ) to train the model , while testing it on the domain of interest ( i.e. , target domain ) . Nevertheless , deep learning tends to perform poorly when tested on unseen data that have different distribution from the training data , which is well-known as the domain shift problem . Considering time series applications , source and target domains usually represent data from different subjects ( persons ) as in human activity recognition ( HAR ) ( Wilson et al. , 2020 ; Chang et al. , 2020 ) or sleep stage classification ( SSC ) tasks ( Phan et al. , 2020 ) . A considerable amount of literature has been developed on Unsupervised Domain Adaptation ( UDA ) for visual applications to mitigate the domain shift problem ( Long et al. , 2015 ; Ganin et al. , 2016 ; Long et al. , 2018 ; Chen et al. , 2020 ; Rahman et al. , 2020 ) . Recently , more attention has been paid to time series UDA ( TS-UDA ) ( Wilson et al. , 2020 ; Chang et al. , 2020 ; Ragab et al. , 2020 ; Liu & Xue , 2021 ) . However , the literature of TS-UDA methods suffers from the following limitations : • Existing TS-UDA works lack consistent evaluation schemes including benchmark datasets , preprocessing , and backbone networks . For instance , some methods that leverage recurrent neural network as backbone network ( Purushotham et al. , 2017 ) are compared against methods with convolutional based backbone networks ( Wilson et al. , 2020 ) . In addition , even with a similar architecture , training procedures can also vary among different algorithms including number of epochs , weight decay , and learning rate schedulers ( Tonutti et al. , 2019 ; Purushotham et al. , 2017 ) . • Existing TS-UDA works use labeled data from the target domain for model selection , violating the basic assumption of UDA ( Wilson et al. , 2020 ; Liu & Xue , 2021 ) , and providing an overoptimistic view of their performance . It is worth noting that model selection for domain adaptation in the absence of target domain labels is a long standing problem . • Most of existing algorithms are mainly application specific , and few works have been proposed for general TS-UDA . As a result , there is a shortage of baseline methods when applying domain adaptation on time series data . All the aforementioned challenges can highly affect the performance and can be mistakenly attributed to the proposed domain adaptation methods . In this work , we propose a systematic evaluation suite ( ADATIME ) to tackle the aforementioned obstacles and remove all extraneous factors to ensure a fair evaluation of different UDA algorithms on time series data . Specifically , to address the inconsistent evaluation schemes and backbone networks , we first standardize the preparation and processing of four benchmarking datasets from two classic real-world applications , including healthcare and human activity recognition . Besides , we unify the backbone network and the training procedures when comparing between different UDA methods . Second , to select the model hyper-parameters in the absence of target labels , we explore more realistic model selection strategies for TS-UDA problem that do not require target labels . Particularly , we investigate the model performance when selecting models based on source dataset ( i.e. , source risk ( Ganin et al. , 2016 ) ) , unlabeled target data ( i.e. , deep embedded evaluation ( DEV ) ( You et al. , 2019 ) ) , or only few-shot labeled samples from target data . Last , to address the lack of TSUDA baselines , we re-implement various state-of-the-art visual UDA methods that can be adapted to time series data while comparing to the existing TS-UDA methods Given our standard methodology , we aim to systematically study the following questions : ( 1 ) With standard backbone network and evaluation schemes , how will the visual UDA methods perform on time series data ; ( 2 ) Can we use realistic model selection methods —relying on only few or no target labels— and still achieve acceptable adaptation performance on time series data ; ( 3 ) How can the backbone network contribute to the performance . In this paper , we conduct comprehensive experiments to answer the aforementioned three questions . Some of our findings are summarized as follows : • Visual domain adaptation methods can achieve comparable or even better performance than the methods proposed for time series data . • Unlike image data , selecting models based on source risk can achieve reasonable performance and outperforms the DEV risk for time series data . Additionally , we find that our proposed few-shot target risk can achieve comparable performance to target risk , with affordable few labels samples . • Changing the base architecture can be pivotal to the performance . Moreover , complex architectures with time series data can have lower generalization performance on crossdomain experiments . 2 DOMAIN ADAPTATION PROBLEM . We start by defining the unsupervised domain adaptation problem . We assume the access to a labeled source domain XS = { ( xsi , ysi ) } NS i=1 that represents uni-variate or multivariate time series data , and unlabeled target domain XT = { ( xTi ) } NT i=1 where NS and NT denote the number of samples for XS and XT respectively . The source and target domains are sampled from different marginal distributions , i.e. , PS ( x ) 6= PT ( x ) , while the conditional distribution remains stable ( PS ( y|x ) = PT ( y|x ) ) . The main goal of UDA is to reduce the distribution shift between PS ( x ) and PT ( x ) , assuming they share the same label space . The mainstream of UDA algorithms is addressing the domain shift problem by finding domain invariant feature representation . Formally , given a backbone model fθ : X → Z , which transforms the input space to the feature space , the UDA algorithm mainly optimizes the backbone network to find new invariant representation for the target features such that Ps ( fθ ( x ) ) = Pt ( fθ ( x ) ) . As a results , a model trained on the source domain can generalize well to the adapted target domain . 3 ADATIME : A BENCHMARKING APPROACH FOR TIME SERIES DOMAIN ADAPTATION . In this work , we systematically evaluate domain adaptation algorithms on time series data , ensuring fair and realistic procedures . Figure 1 shows the details of ADATIME , which proceeds as follows . Given a dataset , we first apply our standard time series preparation schemes on the selected source and target domains . Subsequently , the source train data XStrain and target train data X T train are passed through the backbone network to extract source and target features , i.e. , ZStrain and Z T train respectively . The selected UDA algorithm is then applied to mitigate the distribution shift between the extracted features of two domains . Last , to set the hyper-parameters of the UDA algorithm , we consider three practical model selection approaches ( i.e. , without any target domain labels or only few-shot labeled samples ) namely source ( SRC ) risk , deep embedded evaluation ( DEV ) risk , and few-shot target ( FST ) risk . The proposed evaluation pipeline can prevent any extraneous factors and enable fair comparison between different UDA methods . The code of ADATIME will be made publicly available for researchers to enable seamless evaluation of different domain adaptation methods on time series data . 3.1 BACKBONE NETWORK . The general domain adaptation network consists of a feature extractor , a classifier , as well as different components to align the domains . We refer to the feature extractor and the classifier as the backbone network . The backbone network can have a pivotal contribution to the UDA model performance , as using different architectures may result in different performance . Hence , changing the backbone network when comparing different UDA methods can result in misleading outcomes , which can hinder the fair evaluation protocol . In most visual applications , ResNet-50 is the dominantly adopted feature extractor , as its complex architecture can extract representative features from images . However , in time series , using such complex architectures can lead to overfitting problems ( Fawaz et al. , 2019 ) . Therefore , we use a 1D-CNN architecture in ADATIME ( see Figure 6 ) . In addition , we study the effect of different backbone architectures on the performance of TS-UDA methods . 3.2 DOMAIN ADAPTATION ALGORITHMS . While numerous UDA approaches have been proposed to address the domain shift problem ( Zhao et al. , 2020b ) , a comprehensive review of existing UDA methods is out of our scope . Instead , we only included the most solid and recent baselines for visual UDA that can be adapted to time series . Besides , we included the state-of-the-art methods proposed for time series data . Overall , the selected algorithms in ADATIME can fit into two main categories according to the domain adaptation method , namely discrepancy based methods and adversarial based methods . The former aims to minimize a statistical distance between source and target features to mitigate the domain shift problem ( Tzeng et al. , 2014 ; Sun & Saenko , 2016 ; Chen et al. , 2020 ) . The latter leverages a domain discriminator network that enforces the feature extractor to produce domain invariant features ( Ganin et al. , 2016 ; Tzeng et al. , 2017 ) . Each method in the above categories can also be classified according to the aligned distribution . Specifically , some algorithms only align the marginal distribution of the feature space , while other algorithms jointly align the marginal and conditional distributions . The selected UDA algorithms are as follows : Deep Domain Confusion ( DDC Tzeng et al . ( 2014 ) ) ; Higher-order Moment Matching ( HoMM Zhao et al . ( 2020a ) ) ; Correlation Alignment via Deep Neural Networks ( Deep-CORAL Sun et al . ( 2017 ) ) ; Minimum Discrepancy Estimation ( MMDA Rahman et al . ( 2020 ) ) ; Domain-Adversarial Training of Neural Networks ( DANN Ganin et al . ( 2016 ) ) ; Conditional Adversarial Domain Adaptation ( CDAN Long et al . ( 2018 ) ) ; Deep Subdomain Adaptation ( DSAN Zhu et al . ( 2021 ) ) ; ( DIRT-T Shu et al . ( 2018 ) ) . In addition , we also include two UDA methods applied in time series classification , which are CoDATS ( Wilson et al. , 2020 ) and AdvSKM ( Liu & Xue , 2021 ) , noting that there are very few TS-UDA methods in the literature . We excluded the methods proposed for time series prediction/forecasting since they are out of our scope . Table 1 shows a summary of the selected methods and their corresponding categories . | This paper explores the unsupervised domain adaptation of time series data (TS-UDA). And it focuses on the benchmark construction. By standardizing the base model, datasets, and model selection, this paper provides a good benchmark of TS-UDA. This benchmark can facilitate future research. Also, the paper proposes some findings. | SP:83f3879ba7d94927c69e467f08e1660efc1b0d14 |
A Systematic Evaluation of Domain Adaptation Algorithms On Time Series Data | 1 INTRODUCTION . Time series classification problem is predominant in many real-world applications including healthcare and manufacturing . Yet , time series data with its inherit temporal dynamics and complex underlying pattern can be more challenging than static data . Recently , deep learning has gained more attention in time series classification tasks , assuming access to a vast amount of labeled data for training ( Fawaz et al. , 2019 ) . However , annotating time series data can be challenging and burdensome due to its complex underlying patterns and complicated domain knowledge ( Chang et al. , 2020 ) . One way to reduce labeling burden is to leverage annotated data ( e.g. , synthetic or public data ) from a relevant domain ( i.e. , source domain ) to train the model , while testing it on the domain of interest ( i.e. , target domain ) . Nevertheless , deep learning tends to perform poorly when tested on unseen data that have different distribution from the training data , which is well-known as the domain shift problem . Considering time series applications , source and target domains usually represent data from different subjects ( persons ) as in human activity recognition ( HAR ) ( Wilson et al. , 2020 ; Chang et al. , 2020 ) or sleep stage classification ( SSC ) tasks ( Phan et al. , 2020 ) . A considerable amount of literature has been developed on Unsupervised Domain Adaptation ( UDA ) for visual applications to mitigate the domain shift problem ( Long et al. , 2015 ; Ganin et al. , 2016 ; Long et al. , 2018 ; Chen et al. , 2020 ; Rahman et al. , 2020 ) . Recently , more attention has been paid to time series UDA ( TS-UDA ) ( Wilson et al. , 2020 ; Chang et al. , 2020 ; Ragab et al. , 2020 ; Liu & Xue , 2021 ) . However , the literature of TS-UDA methods suffers from the following limitations : • Existing TS-UDA works lack consistent evaluation schemes including benchmark datasets , preprocessing , and backbone networks . For instance , some methods that leverage recurrent neural network as backbone network ( Purushotham et al. , 2017 ) are compared against methods with convolutional based backbone networks ( Wilson et al. , 2020 ) . In addition , even with a similar architecture , training procedures can also vary among different algorithms including number of epochs , weight decay , and learning rate schedulers ( Tonutti et al. , 2019 ; Purushotham et al. , 2017 ) . • Existing TS-UDA works use labeled data from the target domain for model selection , violating the basic assumption of UDA ( Wilson et al. , 2020 ; Liu & Xue , 2021 ) , and providing an overoptimistic view of their performance . It is worth noting that model selection for domain adaptation in the absence of target domain labels is a long standing problem . • Most of existing algorithms are mainly application specific , and few works have been proposed for general TS-UDA . As a result , there is a shortage of baseline methods when applying domain adaptation on time series data . All the aforementioned challenges can highly affect the performance and can be mistakenly attributed to the proposed domain adaptation methods . In this work , we propose a systematic evaluation suite ( ADATIME ) to tackle the aforementioned obstacles and remove all extraneous factors to ensure a fair evaluation of different UDA algorithms on time series data . Specifically , to address the inconsistent evaluation schemes and backbone networks , we first standardize the preparation and processing of four benchmarking datasets from two classic real-world applications , including healthcare and human activity recognition . Besides , we unify the backbone network and the training procedures when comparing between different UDA methods . Second , to select the model hyper-parameters in the absence of target labels , we explore more realistic model selection strategies for TS-UDA problem that do not require target labels . Particularly , we investigate the model performance when selecting models based on source dataset ( i.e. , source risk ( Ganin et al. , 2016 ) ) , unlabeled target data ( i.e. , deep embedded evaluation ( DEV ) ( You et al. , 2019 ) ) , or only few-shot labeled samples from target data . Last , to address the lack of TSUDA baselines , we re-implement various state-of-the-art visual UDA methods that can be adapted to time series data while comparing to the existing TS-UDA methods Given our standard methodology , we aim to systematically study the following questions : ( 1 ) With standard backbone network and evaluation schemes , how will the visual UDA methods perform on time series data ; ( 2 ) Can we use realistic model selection methods —relying on only few or no target labels— and still achieve acceptable adaptation performance on time series data ; ( 3 ) How can the backbone network contribute to the performance . In this paper , we conduct comprehensive experiments to answer the aforementioned three questions . Some of our findings are summarized as follows : • Visual domain adaptation methods can achieve comparable or even better performance than the methods proposed for time series data . • Unlike image data , selecting models based on source risk can achieve reasonable performance and outperforms the DEV risk for time series data . Additionally , we find that our proposed few-shot target risk can achieve comparable performance to target risk , with affordable few labels samples . • Changing the base architecture can be pivotal to the performance . Moreover , complex architectures with time series data can have lower generalization performance on crossdomain experiments . 2 DOMAIN ADAPTATION PROBLEM . We start by defining the unsupervised domain adaptation problem . We assume the access to a labeled source domain XS = { ( xsi , ysi ) } NS i=1 that represents uni-variate or multivariate time series data , and unlabeled target domain XT = { ( xTi ) } NT i=1 where NS and NT denote the number of samples for XS and XT respectively . The source and target domains are sampled from different marginal distributions , i.e. , PS ( x ) 6= PT ( x ) , while the conditional distribution remains stable ( PS ( y|x ) = PT ( y|x ) ) . The main goal of UDA is to reduce the distribution shift between PS ( x ) and PT ( x ) , assuming they share the same label space . The mainstream of UDA algorithms is addressing the domain shift problem by finding domain invariant feature representation . Formally , given a backbone model fθ : X → Z , which transforms the input space to the feature space , the UDA algorithm mainly optimizes the backbone network to find new invariant representation for the target features such that Ps ( fθ ( x ) ) = Pt ( fθ ( x ) ) . As a results , a model trained on the source domain can generalize well to the adapted target domain . 3 ADATIME : A BENCHMARKING APPROACH FOR TIME SERIES DOMAIN ADAPTATION . In this work , we systematically evaluate domain adaptation algorithms on time series data , ensuring fair and realistic procedures . Figure 1 shows the details of ADATIME , which proceeds as follows . Given a dataset , we first apply our standard time series preparation schemes on the selected source and target domains . Subsequently , the source train data XStrain and target train data X T train are passed through the backbone network to extract source and target features , i.e. , ZStrain and Z T train respectively . The selected UDA algorithm is then applied to mitigate the distribution shift between the extracted features of two domains . Last , to set the hyper-parameters of the UDA algorithm , we consider three practical model selection approaches ( i.e. , without any target domain labels or only few-shot labeled samples ) namely source ( SRC ) risk , deep embedded evaluation ( DEV ) risk , and few-shot target ( FST ) risk . The proposed evaluation pipeline can prevent any extraneous factors and enable fair comparison between different UDA methods . The code of ADATIME will be made publicly available for researchers to enable seamless evaluation of different domain adaptation methods on time series data . 3.1 BACKBONE NETWORK . The general domain adaptation network consists of a feature extractor , a classifier , as well as different components to align the domains . We refer to the feature extractor and the classifier as the backbone network . The backbone network can have a pivotal contribution to the UDA model performance , as using different architectures may result in different performance . Hence , changing the backbone network when comparing different UDA methods can result in misleading outcomes , which can hinder the fair evaluation protocol . In most visual applications , ResNet-50 is the dominantly adopted feature extractor , as its complex architecture can extract representative features from images . However , in time series , using such complex architectures can lead to overfitting problems ( Fawaz et al. , 2019 ) . Therefore , we use a 1D-CNN architecture in ADATIME ( see Figure 6 ) . In addition , we study the effect of different backbone architectures on the performance of TS-UDA methods . 3.2 DOMAIN ADAPTATION ALGORITHMS . While numerous UDA approaches have been proposed to address the domain shift problem ( Zhao et al. , 2020b ) , a comprehensive review of existing UDA methods is out of our scope . Instead , we only included the most solid and recent baselines for visual UDA that can be adapted to time series . Besides , we included the state-of-the-art methods proposed for time series data . Overall , the selected algorithms in ADATIME can fit into two main categories according to the domain adaptation method , namely discrepancy based methods and adversarial based methods . The former aims to minimize a statistical distance between source and target features to mitigate the domain shift problem ( Tzeng et al. , 2014 ; Sun & Saenko , 2016 ; Chen et al. , 2020 ) . The latter leverages a domain discriminator network that enforces the feature extractor to produce domain invariant features ( Ganin et al. , 2016 ; Tzeng et al. , 2017 ) . Each method in the above categories can also be classified according to the aligned distribution . Specifically , some algorithms only align the marginal distribution of the feature space , while other algorithms jointly align the marginal and conditional distributions . The selected UDA algorithms are as follows : Deep Domain Confusion ( DDC Tzeng et al . ( 2014 ) ) ; Higher-order Moment Matching ( HoMM Zhao et al . ( 2020a ) ) ; Correlation Alignment via Deep Neural Networks ( Deep-CORAL Sun et al . ( 2017 ) ) ; Minimum Discrepancy Estimation ( MMDA Rahman et al . ( 2020 ) ) ; Domain-Adversarial Training of Neural Networks ( DANN Ganin et al . ( 2016 ) ) ; Conditional Adversarial Domain Adaptation ( CDAN Long et al . ( 2018 ) ) ; Deep Subdomain Adaptation ( DSAN Zhu et al . ( 2021 ) ) ; ( DIRT-T Shu et al . ( 2018 ) ) . In addition , we also include two UDA methods applied in time series classification , which are CoDATS ( Wilson et al. , 2020 ) and AdvSKM ( Liu & Xue , 2021 ) , noting that there are very few TS-UDA methods in the literature . We excluded the methods proposed for time series prediction/forecasting since they are out of our scope . Table 1 shows a summary of the selected methods and their corresponding categories . | The paper proposes a systematic evaluation framework named ADATIME, which systematically evaluates different unsupervised domain adaptation methods on time series data. The whole framework consists of a feature extractor, a classifier, and a domain alignment component. The paper conducts large-scale experiments adapting the state-of-the-art visual domain adaptation methods to the proposed framework on time series classification tasks. The findings based on the experimental results reveal the key points of applying UDA to time series data. | SP:83f3879ba7d94927c69e467f08e1660efc1b0d14 |
A Systematic Evaluation of Domain Adaptation Algorithms On Time Series Data | 1 INTRODUCTION . Time series classification problem is predominant in many real-world applications including healthcare and manufacturing . Yet , time series data with its inherit temporal dynamics and complex underlying pattern can be more challenging than static data . Recently , deep learning has gained more attention in time series classification tasks , assuming access to a vast amount of labeled data for training ( Fawaz et al. , 2019 ) . However , annotating time series data can be challenging and burdensome due to its complex underlying patterns and complicated domain knowledge ( Chang et al. , 2020 ) . One way to reduce labeling burden is to leverage annotated data ( e.g. , synthetic or public data ) from a relevant domain ( i.e. , source domain ) to train the model , while testing it on the domain of interest ( i.e. , target domain ) . Nevertheless , deep learning tends to perform poorly when tested on unseen data that have different distribution from the training data , which is well-known as the domain shift problem . Considering time series applications , source and target domains usually represent data from different subjects ( persons ) as in human activity recognition ( HAR ) ( Wilson et al. , 2020 ; Chang et al. , 2020 ) or sleep stage classification ( SSC ) tasks ( Phan et al. , 2020 ) . A considerable amount of literature has been developed on Unsupervised Domain Adaptation ( UDA ) for visual applications to mitigate the domain shift problem ( Long et al. , 2015 ; Ganin et al. , 2016 ; Long et al. , 2018 ; Chen et al. , 2020 ; Rahman et al. , 2020 ) . Recently , more attention has been paid to time series UDA ( TS-UDA ) ( Wilson et al. , 2020 ; Chang et al. , 2020 ; Ragab et al. , 2020 ; Liu & Xue , 2021 ) . However , the literature of TS-UDA methods suffers from the following limitations : • Existing TS-UDA works lack consistent evaluation schemes including benchmark datasets , preprocessing , and backbone networks . For instance , some methods that leverage recurrent neural network as backbone network ( Purushotham et al. , 2017 ) are compared against methods with convolutional based backbone networks ( Wilson et al. , 2020 ) . In addition , even with a similar architecture , training procedures can also vary among different algorithms including number of epochs , weight decay , and learning rate schedulers ( Tonutti et al. , 2019 ; Purushotham et al. , 2017 ) . • Existing TS-UDA works use labeled data from the target domain for model selection , violating the basic assumption of UDA ( Wilson et al. , 2020 ; Liu & Xue , 2021 ) , and providing an overoptimistic view of their performance . It is worth noting that model selection for domain adaptation in the absence of target domain labels is a long standing problem . • Most of existing algorithms are mainly application specific , and few works have been proposed for general TS-UDA . As a result , there is a shortage of baseline methods when applying domain adaptation on time series data . All the aforementioned challenges can highly affect the performance and can be mistakenly attributed to the proposed domain adaptation methods . In this work , we propose a systematic evaluation suite ( ADATIME ) to tackle the aforementioned obstacles and remove all extraneous factors to ensure a fair evaluation of different UDA algorithms on time series data . Specifically , to address the inconsistent evaluation schemes and backbone networks , we first standardize the preparation and processing of four benchmarking datasets from two classic real-world applications , including healthcare and human activity recognition . Besides , we unify the backbone network and the training procedures when comparing between different UDA methods . Second , to select the model hyper-parameters in the absence of target labels , we explore more realistic model selection strategies for TS-UDA problem that do not require target labels . Particularly , we investigate the model performance when selecting models based on source dataset ( i.e. , source risk ( Ganin et al. , 2016 ) ) , unlabeled target data ( i.e. , deep embedded evaluation ( DEV ) ( You et al. , 2019 ) ) , or only few-shot labeled samples from target data . Last , to address the lack of TSUDA baselines , we re-implement various state-of-the-art visual UDA methods that can be adapted to time series data while comparing to the existing TS-UDA methods Given our standard methodology , we aim to systematically study the following questions : ( 1 ) With standard backbone network and evaluation schemes , how will the visual UDA methods perform on time series data ; ( 2 ) Can we use realistic model selection methods —relying on only few or no target labels— and still achieve acceptable adaptation performance on time series data ; ( 3 ) How can the backbone network contribute to the performance . In this paper , we conduct comprehensive experiments to answer the aforementioned three questions . Some of our findings are summarized as follows : • Visual domain adaptation methods can achieve comparable or even better performance than the methods proposed for time series data . • Unlike image data , selecting models based on source risk can achieve reasonable performance and outperforms the DEV risk for time series data . Additionally , we find that our proposed few-shot target risk can achieve comparable performance to target risk , with affordable few labels samples . • Changing the base architecture can be pivotal to the performance . Moreover , complex architectures with time series data can have lower generalization performance on crossdomain experiments . 2 DOMAIN ADAPTATION PROBLEM . We start by defining the unsupervised domain adaptation problem . We assume the access to a labeled source domain XS = { ( xsi , ysi ) } NS i=1 that represents uni-variate or multivariate time series data , and unlabeled target domain XT = { ( xTi ) } NT i=1 where NS and NT denote the number of samples for XS and XT respectively . The source and target domains are sampled from different marginal distributions , i.e. , PS ( x ) 6= PT ( x ) , while the conditional distribution remains stable ( PS ( y|x ) = PT ( y|x ) ) . The main goal of UDA is to reduce the distribution shift between PS ( x ) and PT ( x ) , assuming they share the same label space . The mainstream of UDA algorithms is addressing the domain shift problem by finding domain invariant feature representation . Formally , given a backbone model fθ : X → Z , which transforms the input space to the feature space , the UDA algorithm mainly optimizes the backbone network to find new invariant representation for the target features such that Ps ( fθ ( x ) ) = Pt ( fθ ( x ) ) . As a results , a model trained on the source domain can generalize well to the adapted target domain . 3 ADATIME : A BENCHMARKING APPROACH FOR TIME SERIES DOMAIN ADAPTATION . In this work , we systematically evaluate domain adaptation algorithms on time series data , ensuring fair and realistic procedures . Figure 1 shows the details of ADATIME , which proceeds as follows . Given a dataset , we first apply our standard time series preparation schemes on the selected source and target domains . Subsequently , the source train data XStrain and target train data X T train are passed through the backbone network to extract source and target features , i.e. , ZStrain and Z T train respectively . The selected UDA algorithm is then applied to mitigate the distribution shift between the extracted features of two domains . Last , to set the hyper-parameters of the UDA algorithm , we consider three practical model selection approaches ( i.e. , without any target domain labels or only few-shot labeled samples ) namely source ( SRC ) risk , deep embedded evaluation ( DEV ) risk , and few-shot target ( FST ) risk . The proposed evaluation pipeline can prevent any extraneous factors and enable fair comparison between different UDA methods . The code of ADATIME will be made publicly available for researchers to enable seamless evaluation of different domain adaptation methods on time series data . 3.1 BACKBONE NETWORK . The general domain adaptation network consists of a feature extractor , a classifier , as well as different components to align the domains . We refer to the feature extractor and the classifier as the backbone network . The backbone network can have a pivotal contribution to the UDA model performance , as using different architectures may result in different performance . Hence , changing the backbone network when comparing different UDA methods can result in misleading outcomes , which can hinder the fair evaluation protocol . In most visual applications , ResNet-50 is the dominantly adopted feature extractor , as its complex architecture can extract representative features from images . However , in time series , using such complex architectures can lead to overfitting problems ( Fawaz et al. , 2019 ) . Therefore , we use a 1D-CNN architecture in ADATIME ( see Figure 6 ) . In addition , we study the effect of different backbone architectures on the performance of TS-UDA methods . 3.2 DOMAIN ADAPTATION ALGORITHMS . While numerous UDA approaches have been proposed to address the domain shift problem ( Zhao et al. , 2020b ) , a comprehensive review of existing UDA methods is out of our scope . Instead , we only included the most solid and recent baselines for visual UDA that can be adapted to time series . Besides , we included the state-of-the-art methods proposed for time series data . Overall , the selected algorithms in ADATIME can fit into two main categories according to the domain adaptation method , namely discrepancy based methods and adversarial based methods . The former aims to minimize a statistical distance between source and target features to mitigate the domain shift problem ( Tzeng et al. , 2014 ; Sun & Saenko , 2016 ; Chen et al. , 2020 ) . The latter leverages a domain discriminator network that enforces the feature extractor to produce domain invariant features ( Ganin et al. , 2016 ; Tzeng et al. , 2017 ) . Each method in the above categories can also be classified according to the aligned distribution . Specifically , some algorithms only align the marginal distribution of the feature space , while other algorithms jointly align the marginal and conditional distributions . The selected UDA algorithms are as follows : Deep Domain Confusion ( DDC Tzeng et al . ( 2014 ) ) ; Higher-order Moment Matching ( HoMM Zhao et al . ( 2020a ) ) ; Correlation Alignment via Deep Neural Networks ( Deep-CORAL Sun et al . ( 2017 ) ) ; Minimum Discrepancy Estimation ( MMDA Rahman et al . ( 2020 ) ) ; Domain-Adversarial Training of Neural Networks ( DANN Ganin et al . ( 2016 ) ) ; Conditional Adversarial Domain Adaptation ( CDAN Long et al . ( 2018 ) ) ; Deep Subdomain Adaptation ( DSAN Zhu et al . ( 2021 ) ) ; ( DIRT-T Shu et al . ( 2018 ) ) . In addition , we also include two UDA methods applied in time series classification , which are CoDATS ( Wilson et al. , 2020 ) and AdvSKM ( Liu & Xue , 2021 ) , noting that there are very few TS-UDA methods in the literature . We excluded the methods proposed for time series prediction/forecasting since they are out of our scope . Table 1 shows a summary of the selected methods and their corresponding categories . | This paper presents an empirical approach for unsupervised domain adaptation of time series data. The paper points out some of the drawbacks of existing approaches due to inconsistencies in evaluation schemes, datasets, model selection rules, and base neural network architectures. The paper then presents adaptations of visual domain adaptation methods for time series data. Experimental results using ten state-of-the-art methods on three benchmark datasets spanning fifteen cross-domain scenarios are presented. | SP:83f3879ba7d94927c69e467f08e1660efc1b0d14 |
Privacy Auditing of Machine Learning using Membership Inference Attacks | 1 INTRODUCTION . Machine learning systems have come under intense scrutiny of the regulatory authorities in the past few years . Veale et al . ( 2018 ) argue that machine learning models could be considered personal data due to their susceptibility to inference attacks that can recover sensitive information about training data just from the models . Membership inference attacks ( Homer et al. , 2008 ; Dwork et al. , 2015 ; Shokri et al. , 2017 ) and reconstruction attacks ( Dinur & Nissim , 2003 ; Song et al. , 2017 ; Carlini et al. , 2020 ) are the main inference attacks that highlight , and can quantify , the privacy risk of releasing aggregate information computed on sensitive data ( Dwork et al. , 2017 ) . The focus of this paper will be on membership inference attacks for measuring privacy risk . Organizations such as the ICO ( UK ) and NIST ( US ) have highlighted membership inference as a potential confidentiality violation and privacy threat to the training data ( Murakonda & Shokri , 2020 ) . This has lead to the development of open-source tools 1 and capabilities in widely-used ML libraries 2 for measuring privacy risk from machine learning models using membership inference attacks . Although the approach of quantifying privacy risk through membership inference attacks is gaining traction , the attack success , as measured by a lot of works , can not be completely attributed to information leakage from the models and hence their privacy risk . Various factors such as the distribution of training data , difference in distributions of the train and test data may provide an over-estimate or under-estimate of the actual privacy risk from the model ( Erlingsson et al. , 2019 ; Humphries et al. , 2020 ) . Theoretical analyses that connect the success of membership inference to privacy risk through the framework of differential privacy avoid this issue by slightly modifying how the attack performance is measured ( Yeom et al. , 2018 ; Jagielski et al. , 2020 ; Nasr et al. , 2021 ; Malek et al. , 2021 ) . Instead of measuring the leakage from a particular model , these works aim at measuring the worst-case leakage of the training algorithm ( for a given model architecture ) , and construct multiple models with and without one training point and keep the rest of training set fixed . The performance of the attack ( false positive and false negative errors ) is then computed over these sampled models . 1https : //github.com/privacytrustlab/ml_privacy_meter 2https : //blog.tensorflow.org/2020/06/introducing-new-privacy-testing-library . html However , in practice and during auditing , the performance needs to be computed based on the points in the training set versus the population data ( test set ) for a given fixed model . Various works rely on measuring privacy risk through the performance of membership inference attacks , but the subtle differences in how the attack is formulated mean that they might associate different causes of attack success to privacy loss . When auditing machine learning models , we need to pay attention to what exactly we are measuring and how it relates to the information leakage of the machine learning algorithm and not other factors such as the prior knowledge of the attacker . Previous membership inference attacks are designed for high overall performance , i.e . to succeed for most member ( or non-member ) data points of most target models . With few exception , they train shadow ( reference ) models on datasets randomly sampled from a population , to mimic the general behavior of models on member ( or non-member ) data points . This general behavior , however , does not capture the behavior of specific models on specific samples . As a result , the limited performance of shadow model attack does not precisely measure the model ( sample ) -specific information leakage . In this work , we focus on designing membership inference attacks that more precisely measure what a target model leaks about each individual training data , in a binary hypothesis testing framework . We start from the ( constant ) loss threshold attack , and study how to further design different attack strategy ( loss threshold ) for different target model ( sample ) . We derive multiple attack strategies ( existing and new ) from this hypothesis test formulation via different approximations for the null hypothesis . We also formulate the performance of an attack inside the hypothesis testing framework , via the trade-off between its false positive rate and true positive rate . Following the methodology , we not only derive and explain existing shadow ( reference ) model attacks ( Attack S and R ) , but also design new attacks ( Attack P and D ) that offer more accurate privacy auditing for machine learning models , through model-dependent and ( or ) sample-dependent attack strategies . We empirically evaluate and compare the attack performance ( TPR-FPR curve and AUC score ) and computation cost of our new attacks ( notably Attack D ) , and the prior attacks on multiple datasets . 2 ATTACK FRAMEWORK . Our objective is to design a framework that enables auditing the privacy loss of machine learning models in the black-box setting ( where only model outputs —and not their parameters or internal computations— are observable ) . This framework needs to have three elements : ( i ) the inference game as the evaluation setup ; ( ii ) the indistinguishably metric to measure the privacy risk , and ( iii ) the construction of membership inference attack as hypothesis testing . The notion of privacy underlying our framework is primarily based on differential privacy , and multiple pieces of this framework are generalizations of existing inference attacks against machine learning algorithms . Instead of focusing on designing new attacks , we present the important design choices for constructing and evaluating membership inference attacks , for the purpose of having a precise privacy auditing . We identify different sources of uncertainty that influence the error of inference attacks , and can lead to miscalculation of the privacy loss of a model . We quantify privacy loss of a model in a hypothetical inference game between a challenger and an adversary . We are given a private training set D , and a model θ which is trained on D using a training algorithm T . The challenger samples a random data point ( x1 , y1 ) from the training set ( a member ) , and a random data point ( x0 , y0 ) from the data population outside the training set ( a non-member ) . He then randomly selects one of the two ( member or non-member ) b ∼ { 0 , 1 } with probability 12 , and shares the selected data point ( xb , yb ) and the model ’ s output f ( xb ; θ ) with the adversary . The adversary ’ s task is to determine if the data point is a member or not ( i.e. , guess b ) .3 3We need to emphasize that there is a difference between the privacy loss of a machine learning algorithm and that of the specific models trained with the algorithm . A model is a given instance of a training algorithm , thus its leakage needs to be computed with respect to the individual data records in its specific training set . This subsequently means that the privacy loss of an algorithm varies depending on the randomness in sampling of its training data , and the randomness of the training algorithm . One can analyze the privacy loss of an algorithm as , for example , its worst case privacy loss ( as in differential privacy ) . Differentially private algorithms enforce an upper bound on the privacy loss of an algorithm over all models with respect to all possible training data . Thus , in the inference game for differential privacy , the privacy loss of the training algorithms , would be the worst case privacy loss over all choices of D , ( x0 , y0 ) , and ( x1 , y1 ) in our inference game for model privacy . We use an indistinguishability measure ( which is the basis of differential privacy ) to define privacy of individual training data of a model . According to this measure , the privacy loss of the model with respect to its training data is the adversary ’ s success in distinguishing between the two possibilities b = 0 vs b = 1 over multiple repetitions of the inference game . Naturally , the inference attack is a hypothesis test , and adversary ’ s error is composed of the false positive ( i.e. , inferring a non-member as member ) and false negative of the test . In practice , the error of adversary in each round of the inference game depends of multiple factors : • The true leakage of the model about the target data ( xb , yb ) when b = 1 . • The uncertainty ( belief or background knowledge ) of attack algorithm about the population data • The adversary ’ s uncertainty about the training algorithm T • The uncertainty about all training data except the target data ( xb , yb ) • The attack dependency on the target data ( xb , yb ) , and the model θ In the ideal setting , we only want the attack error to be dependent on the true leakage of the model about the target data ( i.e. , whether the same model trained with and without ( xb , yb ) are distinguishable from each other ) . To this end , and to cancel out the effect of other uncertainties , an attack algorithm and the evaluation setup for the inference game need to be designed based on the following principle : The population data used for constructing the attack algorithm , and evaluating the inference game , need to be similar , in distribution , to the training data . This is to minimize the impact of prior belief ( what could have been sampled for the training set ) in the performance of the inference attack . This is not hard to achieve as all the process ( of constructing the hypothesis testing attack , and evaluating it ) is controlled by the auditor . By violating this principle , we might overestimate the privacy loss ( by making the test dependent on a distinct prior knowledge ) or underestimate the privacy loss ( by evaluating the inference attack on a population data distribution for which it was not constructed ) . Another crucial requirement is that the privacy audit needs to output a detailed report , which captures the uncertainty of the attack . Reporting one number as the accuracy of the attack , as it is mostly reported in the literature , is not an informative report . Given the attack being a hypothesis test , the audit report needs to include the analysis of the error versus power of the test : if we can tolerate a certain level of false positive rate in the inference attack , how much would be the true positive rate of the attack , over the random samples from member and non-member data ? The area under the curve for such an analysis reflects the chance that the membership of a random data point from the population or the training set can be inferred correctly . 3 CONSTRUCTING MEMBERSHIP INFERENCE ATTACKS . The adversary in the membership inference game can observe the output of a target machine learning model θ , trained on unknown dataset D. He also gets a precise target data point z as input , and is expected to output 0 or 1 to guess whether the sample z is in the dataset D or not . We use likelihood ratio test ( LRT ) as the most powerful criterion for choosing among membership hypotheses , under the following assumptions . 1 . The adversary knows , and can sample from the underlying data distribution π ( z ) over population z = ( xz , yz ) ∈ Dpop . 2 . A randomized training algorithm T : D 7→ θ takes in a training dataset D , which consists of i.i.d . samples from the data population , and produces a model θ that incurs a low loss ∑ ( x , y ) ∈D ` ( θ , x , y ) on dataset D. We denote P ( θ|D ) to be the posterior distribution of trained model θ given training dataset D. Definition 3.1 ( Approximated LRT for Membership Inference ) Let ( θ , z ) be random samples from the joint distribution of target model and target data point , specified by one of the following membership hypotheses . H0 : D n i.i.d.samples∼π ( z ) ←−−−−−−−−−−−−− Dpop , θ ∼ T ( D ) , z sample∼π ( z ) ←−−−−−−−− Dpop ( 1 ) H1 : D n i.i.d.samples∼π ( z ) ←−−−−−−−−−−−−− Dpop , θ ∼ T ( D ) , z sample←−−−− D ( 2 ) The likelihoods function of hypothesis H0 and H1 , given observed target model θ and target data point z , is as follows ( detailed derivations are in the Appendix ) . L ( H0|θ , z ) = PH0 ( θ , z ) = π ( z ) ·ED∼πn [ P ( θ|D ) ] ( 3 ) L ( H1|θ , z ) = PH1 ( θ , z ) = π ( z ) ·ED′∼πn−1 [ P ( θ|D′ ∪ z ) ] ( 4 ) Now we follow the previous construction of Bayes-optimal membership inference attack Sablayrolles et al . ( 2019 ) , and model the posterior distribution P ( θ|D ) of trained model as follows . P ( θ|D ) = e − 1T ∑ ( x , y ) ∈D ` ( θ , x , y ) ∫ e− 1 T ∑ ( x , y ) ∈D ` ( θ , x , y ) dθ , ( 5 ) where T is a temperature constant that allows some randomness in the training algorithm T . The equation 5 holds for Bayesian learning algorithms , such as stochastic gradient descent Polyak & Juditsky ( 1992 ) , deterministic MAP ( Maximum A Posteriori ) inference ( for T → 0 ) , and Bayesian posterior sampling Welling & Teh ( 2011 ) ( for T = 1 ) . Therefore , the LRT statistics can be computed as follows ( detailed derivations are in the Appendix ) . LR ( θ , z ) = L ( H0|θ , z ) L ( H1|θ , z ) = ED∼πn [ P ( θ|D ) ] ED′∼πn−1 [ P ( θ|D′ ∪ z ) ] ( 6 ) ≈ e 1T ` ( θ , xz , yz ) , ( 7 ) The LRT hypothesis test rejects H0 when the LRT statistic is small . By equation 7 , the rejection region { ( θ , z ) : LR ( θ , z ) ≤ c } can be approximated as follows . { ( θ , z ) : ` ( θ , xz , yz ) ≤ T · log c } ( 8 ) The above approximated LRT strategy compares a constant threshold T · log c with the loss ` ( θ , xz , yz ) of the target model θ on the target data point z . This recovers the commonly used ( constant ) loss threshold attacks in literature Nasr et al . ( 2019 ) ; Sablayrolles et al . ( 2019 ) . However , by derivations in the appendix ( equation 48 ) , a more accurate LRT attack strategy would compare the loss ` ( θ , xz , yz ) with a threshold function T · log ( c·ED′∼πn−1 [ P ( θ|D ′ ) ] ED∼πn [ P ( θ|D ) ] ) that depends on the tar- get model θ . Therefore , the attack in equation 8 with constant threshold cα can overly simplify the LRT , thus limiting its performance . This motivates our design of attacks with model-dependent and sample-dependent thresholds , with the objective of improving the attack performance . Our general template for attack construction . Building on the approximate LRT equation 8 , we derive the following variant of sample-dependent and ( or ) model dependent attack strategy . If ` ( θ , xz , yz ) ≤ cα ( θ , xz , yz ) , reject H0 , ( 9 ) where cα ( θ , xz , yz ) is a threshold function chosen by the attacker under α tolerance of false positive rate ( FPR ) , i.e. , cα ( θ , xz , yz ) satisfies the following equation which controls false positive rate . EPH0 ( θ , xz , yz ) [ 1 ` ( θ , xz , yz ) ≤cα ] = α ( 10 ) In the following attacks , we approximate the joint distribution PH0 ( θ , z ) with empirical distribution over its samples . This facilitates solving equation 10 , which give valid attack threshold cα ( θ , xz , yz ) . | Membership inference attacks are attacks that infer whether a given record is in the dataset of a given machine learning model or not. By definition, (the success of) such attacks is in contrast with differential privacy. The paper proposes multiple attacks to infer membership in the data sets of machine learning models. The envisioned goal of the paper is that these attacks can provide a more complete picture about how private a machine learning algorithm is, when compared with other membership inference attacks. Hence, the ultimate goal is to provide “reports” that go beyond “just a number” to better audit the privacy of learning algorithms. | SP:f74bb87763e77afaec9facd30670b701f0443b22 |
Privacy Auditing of Machine Learning using Membership Inference Attacks | 1 INTRODUCTION . Machine learning systems have come under intense scrutiny of the regulatory authorities in the past few years . Veale et al . ( 2018 ) argue that machine learning models could be considered personal data due to their susceptibility to inference attacks that can recover sensitive information about training data just from the models . Membership inference attacks ( Homer et al. , 2008 ; Dwork et al. , 2015 ; Shokri et al. , 2017 ) and reconstruction attacks ( Dinur & Nissim , 2003 ; Song et al. , 2017 ; Carlini et al. , 2020 ) are the main inference attacks that highlight , and can quantify , the privacy risk of releasing aggregate information computed on sensitive data ( Dwork et al. , 2017 ) . The focus of this paper will be on membership inference attacks for measuring privacy risk . Organizations such as the ICO ( UK ) and NIST ( US ) have highlighted membership inference as a potential confidentiality violation and privacy threat to the training data ( Murakonda & Shokri , 2020 ) . This has lead to the development of open-source tools 1 and capabilities in widely-used ML libraries 2 for measuring privacy risk from machine learning models using membership inference attacks . Although the approach of quantifying privacy risk through membership inference attacks is gaining traction , the attack success , as measured by a lot of works , can not be completely attributed to information leakage from the models and hence their privacy risk . Various factors such as the distribution of training data , difference in distributions of the train and test data may provide an over-estimate or under-estimate of the actual privacy risk from the model ( Erlingsson et al. , 2019 ; Humphries et al. , 2020 ) . Theoretical analyses that connect the success of membership inference to privacy risk through the framework of differential privacy avoid this issue by slightly modifying how the attack performance is measured ( Yeom et al. , 2018 ; Jagielski et al. , 2020 ; Nasr et al. , 2021 ; Malek et al. , 2021 ) . Instead of measuring the leakage from a particular model , these works aim at measuring the worst-case leakage of the training algorithm ( for a given model architecture ) , and construct multiple models with and without one training point and keep the rest of training set fixed . The performance of the attack ( false positive and false negative errors ) is then computed over these sampled models . 1https : //github.com/privacytrustlab/ml_privacy_meter 2https : //blog.tensorflow.org/2020/06/introducing-new-privacy-testing-library . html However , in practice and during auditing , the performance needs to be computed based on the points in the training set versus the population data ( test set ) for a given fixed model . Various works rely on measuring privacy risk through the performance of membership inference attacks , but the subtle differences in how the attack is formulated mean that they might associate different causes of attack success to privacy loss . When auditing machine learning models , we need to pay attention to what exactly we are measuring and how it relates to the information leakage of the machine learning algorithm and not other factors such as the prior knowledge of the attacker . Previous membership inference attacks are designed for high overall performance , i.e . to succeed for most member ( or non-member ) data points of most target models . With few exception , they train shadow ( reference ) models on datasets randomly sampled from a population , to mimic the general behavior of models on member ( or non-member ) data points . This general behavior , however , does not capture the behavior of specific models on specific samples . As a result , the limited performance of shadow model attack does not precisely measure the model ( sample ) -specific information leakage . In this work , we focus on designing membership inference attacks that more precisely measure what a target model leaks about each individual training data , in a binary hypothesis testing framework . We start from the ( constant ) loss threshold attack , and study how to further design different attack strategy ( loss threshold ) for different target model ( sample ) . We derive multiple attack strategies ( existing and new ) from this hypothesis test formulation via different approximations for the null hypothesis . We also formulate the performance of an attack inside the hypothesis testing framework , via the trade-off between its false positive rate and true positive rate . Following the methodology , we not only derive and explain existing shadow ( reference ) model attacks ( Attack S and R ) , but also design new attacks ( Attack P and D ) that offer more accurate privacy auditing for machine learning models , through model-dependent and ( or ) sample-dependent attack strategies . We empirically evaluate and compare the attack performance ( TPR-FPR curve and AUC score ) and computation cost of our new attacks ( notably Attack D ) , and the prior attacks on multiple datasets . 2 ATTACK FRAMEWORK . Our objective is to design a framework that enables auditing the privacy loss of machine learning models in the black-box setting ( where only model outputs —and not their parameters or internal computations— are observable ) . This framework needs to have three elements : ( i ) the inference game as the evaluation setup ; ( ii ) the indistinguishably metric to measure the privacy risk , and ( iii ) the construction of membership inference attack as hypothesis testing . The notion of privacy underlying our framework is primarily based on differential privacy , and multiple pieces of this framework are generalizations of existing inference attacks against machine learning algorithms . Instead of focusing on designing new attacks , we present the important design choices for constructing and evaluating membership inference attacks , for the purpose of having a precise privacy auditing . We identify different sources of uncertainty that influence the error of inference attacks , and can lead to miscalculation of the privacy loss of a model . We quantify privacy loss of a model in a hypothetical inference game between a challenger and an adversary . We are given a private training set D , and a model θ which is trained on D using a training algorithm T . The challenger samples a random data point ( x1 , y1 ) from the training set ( a member ) , and a random data point ( x0 , y0 ) from the data population outside the training set ( a non-member ) . He then randomly selects one of the two ( member or non-member ) b ∼ { 0 , 1 } with probability 12 , and shares the selected data point ( xb , yb ) and the model ’ s output f ( xb ; θ ) with the adversary . The adversary ’ s task is to determine if the data point is a member or not ( i.e. , guess b ) .3 3We need to emphasize that there is a difference between the privacy loss of a machine learning algorithm and that of the specific models trained with the algorithm . A model is a given instance of a training algorithm , thus its leakage needs to be computed with respect to the individual data records in its specific training set . This subsequently means that the privacy loss of an algorithm varies depending on the randomness in sampling of its training data , and the randomness of the training algorithm . One can analyze the privacy loss of an algorithm as , for example , its worst case privacy loss ( as in differential privacy ) . Differentially private algorithms enforce an upper bound on the privacy loss of an algorithm over all models with respect to all possible training data . Thus , in the inference game for differential privacy , the privacy loss of the training algorithms , would be the worst case privacy loss over all choices of D , ( x0 , y0 ) , and ( x1 , y1 ) in our inference game for model privacy . We use an indistinguishability measure ( which is the basis of differential privacy ) to define privacy of individual training data of a model . According to this measure , the privacy loss of the model with respect to its training data is the adversary ’ s success in distinguishing between the two possibilities b = 0 vs b = 1 over multiple repetitions of the inference game . Naturally , the inference attack is a hypothesis test , and adversary ’ s error is composed of the false positive ( i.e. , inferring a non-member as member ) and false negative of the test . In practice , the error of adversary in each round of the inference game depends of multiple factors : • The true leakage of the model about the target data ( xb , yb ) when b = 1 . • The uncertainty ( belief or background knowledge ) of attack algorithm about the population data • The adversary ’ s uncertainty about the training algorithm T • The uncertainty about all training data except the target data ( xb , yb ) • The attack dependency on the target data ( xb , yb ) , and the model θ In the ideal setting , we only want the attack error to be dependent on the true leakage of the model about the target data ( i.e. , whether the same model trained with and without ( xb , yb ) are distinguishable from each other ) . To this end , and to cancel out the effect of other uncertainties , an attack algorithm and the evaluation setup for the inference game need to be designed based on the following principle : The population data used for constructing the attack algorithm , and evaluating the inference game , need to be similar , in distribution , to the training data . This is to minimize the impact of prior belief ( what could have been sampled for the training set ) in the performance of the inference attack . This is not hard to achieve as all the process ( of constructing the hypothesis testing attack , and evaluating it ) is controlled by the auditor . By violating this principle , we might overestimate the privacy loss ( by making the test dependent on a distinct prior knowledge ) or underestimate the privacy loss ( by evaluating the inference attack on a population data distribution for which it was not constructed ) . Another crucial requirement is that the privacy audit needs to output a detailed report , which captures the uncertainty of the attack . Reporting one number as the accuracy of the attack , as it is mostly reported in the literature , is not an informative report . Given the attack being a hypothesis test , the audit report needs to include the analysis of the error versus power of the test : if we can tolerate a certain level of false positive rate in the inference attack , how much would be the true positive rate of the attack , over the random samples from member and non-member data ? The area under the curve for such an analysis reflects the chance that the membership of a random data point from the population or the training set can be inferred correctly . 3 CONSTRUCTING MEMBERSHIP INFERENCE ATTACKS . The adversary in the membership inference game can observe the output of a target machine learning model θ , trained on unknown dataset D. He also gets a precise target data point z as input , and is expected to output 0 or 1 to guess whether the sample z is in the dataset D or not . We use likelihood ratio test ( LRT ) as the most powerful criterion for choosing among membership hypotheses , under the following assumptions . 1 . The adversary knows , and can sample from the underlying data distribution π ( z ) over population z = ( xz , yz ) ∈ Dpop . 2 . A randomized training algorithm T : D 7→ θ takes in a training dataset D , which consists of i.i.d . samples from the data population , and produces a model θ that incurs a low loss ∑ ( x , y ) ∈D ` ( θ , x , y ) on dataset D. We denote P ( θ|D ) to be the posterior distribution of trained model θ given training dataset D. Definition 3.1 ( Approximated LRT for Membership Inference ) Let ( θ , z ) be random samples from the joint distribution of target model and target data point , specified by one of the following membership hypotheses . H0 : D n i.i.d.samples∼π ( z ) ←−−−−−−−−−−−−− Dpop , θ ∼ T ( D ) , z sample∼π ( z ) ←−−−−−−−− Dpop ( 1 ) H1 : D n i.i.d.samples∼π ( z ) ←−−−−−−−−−−−−− Dpop , θ ∼ T ( D ) , z sample←−−−− D ( 2 ) The likelihoods function of hypothesis H0 and H1 , given observed target model θ and target data point z , is as follows ( detailed derivations are in the Appendix ) . L ( H0|θ , z ) = PH0 ( θ , z ) = π ( z ) ·ED∼πn [ P ( θ|D ) ] ( 3 ) L ( H1|θ , z ) = PH1 ( θ , z ) = π ( z ) ·ED′∼πn−1 [ P ( θ|D′ ∪ z ) ] ( 4 ) Now we follow the previous construction of Bayes-optimal membership inference attack Sablayrolles et al . ( 2019 ) , and model the posterior distribution P ( θ|D ) of trained model as follows . P ( θ|D ) = e − 1T ∑ ( x , y ) ∈D ` ( θ , x , y ) ∫ e− 1 T ∑ ( x , y ) ∈D ` ( θ , x , y ) dθ , ( 5 ) where T is a temperature constant that allows some randomness in the training algorithm T . The equation 5 holds for Bayesian learning algorithms , such as stochastic gradient descent Polyak & Juditsky ( 1992 ) , deterministic MAP ( Maximum A Posteriori ) inference ( for T → 0 ) , and Bayesian posterior sampling Welling & Teh ( 2011 ) ( for T = 1 ) . Therefore , the LRT statistics can be computed as follows ( detailed derivations are in the Appendix ) . LR ( θ , z ) = L ( H0|θ , z ) L ( H1|θ , z ) = ED∼πn [ P ( θ|D ) ] ED′∼πn−1 [ P ( θ|D′ ∪ z ) ] ( 6 ) ≈ e 1T ` ( θ , xz , yz ) , ( 7 ) The LRT hypothesis test rejects H0 when the LRT statistic is small . By equation 7 , the rejection region { ( θ , z ) : LR ( θ , z ) ≤ c } can be approximated as follows . { ( θ , z ) : ` ( θ , xz , yz ) ≤ T · log c } ( 8 ) The above approximated LRT strategy compares a constant threshold T · log c with the loss ` ( θ , xz , yz ) of the target model θ on the target data point z . This recovers the commonly used ( constant ) loss threshold attacks in literature Nasr et al . ( 2019 ) ; Sablayrolles et al . ( 2019 ) . However , by derivations in the appendix ( equation 48 ) , a more accurate LRT attack strategy would compare the loss ` ( θ , xz , yz ) with a threshold function T · log ( c·ED′∼πn−1 [ P ( θ|D ′ ) ] ED∼πn [ P ( θ|D ) ] ) that depends on the tar- get model θ . Therefore , the attack in equation 8 with constant threshold cα can overly simplify the LRT , thus limiting its performance . This motivates our design of attacks with model-dependent and sample-dependent thresholds , with the objective of improving the attack performance . Our general template for attack construction . Building on the approximate LRT equation 8 , we derive the following variant of sample-dependent and ( or ) model dependent attack strategy . If ` ( θ , xz , yz ) ≤ cα ( θ , xz , yz ) , reject H0 , ( 9 ) where cα ( θ , xz , yz ) is a threshold function chosen by the attacker under α tolerance of false positive rate ( FPR ) , i.e. , cα ( θ , xz , yz ) satisfies the following equation which controls false positive rate . EPH0 ( θ , xz , yz ) [ 1 ` ( θ , xz , yz ) ≤cα ] = α ( 10 ) In the following attacks , we approximate the joint distribution PH0 ( θ , z ) with empirical distribution over its samples . This facilitates solving equation 10 , which give valid attack threshold cα ( θ , xz , yz ) . | The focus of this paper is on membership inference attacks. In particular, the paper aims at providing a framework that can help to access how different factors beyond information leakage from the model affect the performance of membership inference attacks, and how to design attacks that cancel out the effects off other factors. More specifically, a framework for understanding the relationship between, success of membership inference attacks and information leakage is introduced. Experiments using well-known datasets on visual tasks are provided to evaluate the performance of the proposed attacks(in terms of AUC scores. Various frameworks are discussed in Section 3. | SP:f74bb87763e77afaec9facd30670b701f0443b22 |
Privacy Auditing of Machine Learning using Membership Inference Attacks | 1 INTRODUCTION . Machine learning systems have come under intense scrutiny of the regulatory authorities in the past few years . Veale et al . ( 2018 ) argue that machine learning models could be considered personal data due to their susceptibility to inference attacks that can recover sensitive information about training data just from the models . Membership inference attacks ( Homer et al. , 2008 ; Dwork et al. , 2015 ; Shokri et al. , 2017 ) and reconstruction attacks ( Dinur & Nissim , 2003 ; Song et al. , 2017 ; Carlini et al. , 2020 ) are the main inference attacks that highlight , and can quantify , the privacy risk of releasing aggregate information computed on sensitive data ( Dwork et al. , 2017 ) . The focus of this paper will be on membership inference attacks for measuring privacy risk . Organizations such as the ICO ( UK ) and NIST ( US ) have highlighted membership inference as a potential confidentiality violation and privacy threat to the training data ( Murakonda & Shokri , 2020 ) . This has lead to the development of open-source tools 1 and capabilities in widely-used ML libraries 2 for measuring privacy risk from machine learning models using membership inference attacks . Although the approach of quantifying privacy risk through membership inference attacks is gaining traction , the attack success , as measured by a lot of works , can not be completely attributed to information leakage from the models and hence their privacy risk . Various factors such as the distribution of training data , difference in distributions of the train and test data may provide an over-estimate or under-estimate of the actual privacy risk from the model ( Erlingsson et al. , 2019 ; Humphries et al. , 2020 ) . Theoretical analyses that connect the success of membership inference to privacy risk through the framework of differential privacy avoid this issue by slightly modifying how the attack performance is measured ( Yeom et al. , 2018 ; Jagielski et al. , 2020 ; Nasr et al. , 2021 ; Malek et al. , 2021 ) . Instead of measuring the leakage from a particular model , these works aim at measuring the worst-case leakage of the training algorithm ( for a given model architecture ) , and construct multiple models with and without one training point and keep the rest of training set fixed . The performance of the attack ( false positive and false negative errors ) is then computed over these sampled models . 1https : //github.com/privacytrustlab/ml_privacy_meter 2https : //blog.tensorflow.org/2020/06/introducing-new-privacy-testing-library . html However , in practice and during auditing , the performance needs to be computed based on the points in the training set versus the population data ( test set ) for a given fixed model . Various works rely on measuring privacy risk through the performance of membership inference attacks , but the subtle differences in how the attack is formulated mean that they might associate different causes of attack success to privacy loss . When auditing machine learning models , we need to pay attention to what exactly we are measuring and how it relates to the information leakage of the machine learning algorithm and not other factors such as the prior knowledge of the attacker . Previous membership inference attacks are designed for high overall performance , i.e . to succeed for most member ( or non-member ) data points of most target models . With few exception , they train shadow ( reference ) models on datasets randomly sampled from a population , to mimic the general behavior of models on member ( or non-member ) data points . This general behavior , however , does not capture the behavior of specific models on specific samples . As a result , the limited performance of shadow model attack does not precisely measure the model ( sample ) -specific information leakage . In this work , we focus on designing membership inference attacks that more precisely measure what a target model leaks about each individual training data , in a binary hypothesis testing framework . We start from the ( constant ) loss threshold attack , and study how to further design different attack strategy ( loss threshold ) for different target model ( sample ) . We derive multiple attack strategies ( existing and new ) from this hypothesis test formulation via different approximations for the null hypothesis . We also formulate the performance of an attack inside the hypothesis testing framework , via the trade-off between its false positive rate and true positive rate . Following the methodology , we not only derive and explain existing shadow ( reference ) model attacks ( Attack S and R ) , but also design new attacks ( Attack P and D ) that offer more accurate privacy auditing for machine learning models , through model-dependent and ( or ) sample-dependent attack strategies . We empirically evaluate and compare the attack performance ( TPR-FPR curve and AUC score ) and computation cost of our new attacks ( notably Attack D ) , and the prior attacks on multiple datasets . 2 ATTACK FRAMEWORK . Our objective is to design a framework that enables auditing the privacy loss of machine learning models in the black-box setting ( where only model outputs —and not their parameters or internal computations— are observable ) . This framework needs to have three elements : ( i ) the inference game as the evaluation setup ; ( ii ) the indistinguishably metric to measure the privacy risk , and ( iii ) the construction of membership inference attack as hypothesis testing . The notion of privacy underlying our framework is primarily based on differential privacy , and multiple pieces of this framework are generalizations of existing inference attacks against machine learning algorithms . Instead of focusing on designing new attacks , we present the important design choices for constructing and evaluating membership inference attacks , for the purpose of having a precise privacy auditing . We identify different sources of uncertainty that influence the error of inference attacks , and can lead to miscalculation of the privacy loss of a model . We quantify privacy loss of a model in a hypothetical inference game between a challenger and an adversary . We are given a private training set D , and a model θ which is trained on D using a training algorithm T . The challenger samples a random data point ( x1 , y1 ) from the training set ( a member ) , and a random data point ( x0 , y0 ) from the data population outside the training set ( a non-member ) . He then randomly selects one of the two ( member or non-member ) b ∼ { 0 , 1 } with probability 12 , and shares the selected data point ( xb , yb ) and the model ’ s output f ( xb ; θ ) with the adversary . The adversary ’ s task is to determine if the data point is a member or not ( i.e. , guess b ) .3 3We need to emphasize that there is a difference between the privacy loss of a machine learning algorithm and that of the specific models trained with the algorithm . A model is a given instance of a training algorithm , thus its leakage needs to be computed with respect to the individual data records in its specific training set . This subsequently means that the privacy loss of an algorithm varies depending on the randomness in sampling of its training data , and the randomness of the training algorithm . One can analyze the privacy loss of an algorithm as , for example , its worst case privacy loss ( as in differential privacy ) . Differentially private algorithms enforce an upper bound on the privacy loss of an algorithm over all models with respect to all possible training data . Thus , in the inference game for differential privacy , the privacy loss of the training algorithms , would be the worst case privacy loss over all choices of D , ( x0 , y0 ) , and ( x1 , y1 ) in our inference game for model privacy . We use an indistinguishability measure ( which is the basis of differential privacy ) to define privacy of individual training data of a model . According to this measure , the privacy loss of the model with respect to its training data is the adversary ’ s success in distinguishing between the two possibilities b = 0 vs b = 1 over multiple repetitions of the inference game . Naturally , the inference attack is a hypothesis test , and adversary ’ s error is composed of the false positive ( i.e. , inferring a non-member as member ) and false negative of the test . In practice , the error of adversary in each round of the inference game depends of multiple factors : • The true leakage of the model about the target data ( xb , yb ) when b = 1 . • The uncertainty ( belief or background knowledge ) of attack algorithm about the population data • The adversary ’ s uncertainty about the training algorithm T • The uncertainty about all training data except the target data ( xb , yb ) • The attack dependency on the target data ( xb , yb ) , and the model θ In the ideal setting , we only want the attack error to be dependent on the true leakage of the model about the target data ( i.e. , whether the same model trained with and without ( xb , yb ) are distinguishable from each other ) . To this end , and to cancel out the effect of other uncertainties , an attack algorithm and the evaluation setup for the inference game need to be designed based on the following principle : The population data used for constructing the attack algorithm , and evaluating the inference game , need to be similar , in distribution , to the training data . This is to minimize the impact of prior belief ( what could have been sampled for the training set ) in the performance of the inference attack . This is not hard to achieve as all the process ( of constructing the hypothesis testing attack , and evaluating it ) is controlled by the auditor . By violating this principle , we might overestimate the privacy loss ( by making the test dependent on a distinct prior knowledge ) or underestimate the privacy loss ( by evaluating the inference attack on a population data distribution for which it was not constructed ) . Another crucial requirement is that the privacy audit needs to output a detailed report , which captures the uncertainty of the attack . Reporting one number as the accuracy of the attack , as it is mostly reported in the literature , is not an informative report . Given the attack being a hypothesis test , the audit report needs to include the analysis of the error versus power of the test : if we can tolerate a certain level of false positive rate in the inference attack , how much would be the true positive rate of the attack , over the random samples from member and non-member data ? The area under the curve for such an analysis reflects the chance that the membership of a random data point from the population or the training set can be inferred correctly . 3 CONSTRUCTING MEMBERSHIP INFERENCE ATTACKS . The adversary in the membership inference game can observe the output of a target machine learning model θ , trained on unknown dataset D. He also gets a precise target data point z as input , and is expected to output 0 or 1 to guess whether the sample z is in the dataset D or not . We use likelihood ratio test ( LRT ) as the most powerful criterion for choosing among membership hypotheses , under the following assumptions . 1 . The adversary knows , and can sample from the underlying data distribution π ( z ) over population z = ( xz , yz ) ∈ Dpop . 2 . A randomized training algorithm T : D 7→ θ takes in a training dataset D , which consists of i.i.d . samples from the data population , and produces a model θ that incurs a low loss ∑ ( x , y ) ∈D ` ( θ , x , y ) on dataset D. We denote P ( θ|D ) to be the posterior distribution of trained model θ given training dataset D. Definition 3.1 ( Approximated LRT for Membership Inference ) Let ( θ , z ) be random samples from the joint distribution of target model and target data point , specified by one of the following membership hypotheses . H0 : D n i.i.d.samples∼π ( z ) ←−−−−−−−−−−−−− Dpop , θ ∼ T ( D ) , z sample∼π ( z ) ←−−−−−−−− Dpop ( 1 ) H1 : D n i.i.d.samples∼π ( z ) ←−−−−−−−−−−−−− Dpop , θ ∼ T ( D ) , z sample←−−−− D ( 2 ) The likelihoods function of hypothesis H0 and H1 , given observed target model θ and target data point z , is as follows ( detailed derivations are in the Appendix ) . L ( H0|θ , z ) = PH0 ( θ , z ) = π ( z ) ·ED∼πn [ P ( θ|D ) ] ( 3 ) L ( H1|θ , z ) = PH1 ( θ , z ) = π ( z ) ·ED′∼πn−1 [ P ( θ|D′ ∪ z ) ] ( 4 ) Now we follow the previous construction of Bayes-optimal membership inference attack Sablayrolles et al . ( 2019 ) , and model the posterior distribution P ( θ|D ) of trained model as follows . P ( θ|D ) = e − 1T ∑ ( x , y ) ∈D ` ( θ , x , y ) ∫ e− 1 T ∑ ( x , y ) ∈D ` ( θ , x , y ) dθ , ( 5 ) where T is a temperature constant that allows some randomness in the training algorithm T . The equation 5 holds for Bayesian learning algorithms , such as stochastic gradient descent Polyak & Juditsky ( 1992 ) , deterministic MAP ( Maximum A Posteriori ) inference ( for T → 0 ) , and Bayesian posterior sampling Welling & Teh ( 2011 ) ( for T = 1 ) . Therefore , the LRT statistics can be computed as follows ( detailed derivations are in the Appendix ) . LR ( θ , z ) = L ( H0|θ , z ) L ( H1|θ , z ) = ED∼πn [ P ( θ|D ) ] ED′∼πn−1 [ P ( θ|D′ ∪ z ) ] ( 6 ) ≈ e 1T ` ( θ , xz , yz ) , ( 7 ) The LRT hypothesis test rejects H0 when the LRT statistic is small . By equation 7 , the rejection region { ( θ , z ) : LR ( θ , z ) ≤ c } can be approximated as follows . { ( θ , z ) : ` ( θ , xz , yz ) ≤ T · log c } ( 8 ) The above approximated LRT strategy compares a constant threshold T · log c with the loss ` ( θ , xz , yz ) of the target model θ on the target data point z . This recovers the commonly used ( constant ) loss threshold attacks in literature Nasr et al . ( 2019 ) ; Sablayrolles et al . ( 2019 ) . However , by derivations in the appendix ( equation 48 ) , a more accurate LRT attack strategy would compare the loss ` ( θ , xz , yz ) with a threshold function T · log ( c·ED′∼πn−1 [ P ( θ|D ′ ) ] ED∼πn [ P ( θ|D ) ] ) that depends on the tar- get model θ . Therefore , the attack in equation 8 with constant threshold cα can overly simplify the LRT , thus limiting its performance . This motivates our design of attacks with model-dependent and sample-dependent thresholds , with the objective of improving the attack performance . Our general template for attack construction . Building on the approximate LRT equation 8 , we derive the following variant of sample-dependent and ( or ) model dependent attack strategy . If ` ( θ , xz , yz ) ≤ cα ( θ , xz , yz ) , reject H0 , ( 9 ) where cα ( θ , xz , yz ) is a threshold function chosen by the attacker under α tolerance of false positive rate ( FPR ) , i.e. , cα ( θ , xz , yz ) satisfies the following equation which controls false positive rate . EPH0 ( θ , xz , yz ) [ 1 ` ( θ , xz , yz ) ≤cα ] = α ( 10 ) In the following attacks , we approximate the joint distribution PH0 ( θ , z ) with empirical distribution over its samples . This facilitates solving equation 10 , which give valid attack threshold cα ( θ , xz , yz ) . | This paper proposed a hypothesis testing framework for membership inference attacks (MIAs). The framework involves different algorithms for finding the loss threshold for MIAs, i.e. if a target data point with loss less than the threshold value then it will be inferred as a member of training data. The notation of membership privacy loss is the same as in differential privacy and the proposed algorithms improves the utility of the attacks compared to prior works on benchmark datasets. | SP:f74bb87763e77afaec9facd30670b701f0443b22 |
Determining the Ethno-nationality of Writers Using Written English Text | Ethno-nationality is where nations are defined by a shared heritage , for instance it can be a membership of a common language , nationality , religion or an ethnic ancestry . The main goal of this research is to determine a person ’ s country-oforigin using English text written in less controlled environments , employing Machine Learning ( ML ) and Natural Language Processing ( NLP ) techniques . The current literature mainly focuses on determining the native language of English writers and a minimal number of researches have been conducted in determining the country-of-origin of English writers . Further , most experiments in the literature are mainly based on the TOEFL , ICLE datasets which were collected in more controlled environments ( i.e. , standard exam answers ) . Hence , most of the writers try to follow some guidelines and patterns of writing . Subsequently , the creativity , freedom of writing and the insights of writers could be hidden . Thus , we believe it hides the real nativism of the writers . Further , those corpora are not freely available as it involves a high cost of licenses . Thus , the main data corpus used for this research was the International Corpus of English ( ICE corpus ) . Up to this point , none of the researchers have utilised the ICE corpus for the purpose of determining the writers ’ countryof-origin , even though there is a true potential . For this research , an overall accuracy of 0.7636 for the flat classification ( for all ten countries ) and accuracy of 0.6224∼1.000 for sub-categories were received . In addition , the best ML model obtained for the flat classification strategy is linear SVM with SGD optimizer trained with word ( 1,1 ) uni-gram model . 1 INTRODUCTION . Ethno-nationality can be determined as the identity in which jointly defined by ethnicity and nationality ( Sapp , 2012 ) . Identifying a writer ’ s country-of-origin is a part of identifying his ethnonationality ( Jerry , 2008 ) . Foremost focus of ethno-nationality in this research is to identify a writer ’ s country-of-origin based on their writings in a non-native or second language . In recent years , identification of ethno-nationality of a writer has gained a growing interest . In author profiling demographic features ( such as age , gender , education , native language , country of origin , etc. , ) of an author from a written text will be identified , which are commonly needed in forensic linguistics . For instance , Intelligence to build a profile of their suspect , to identify the author of an anonymous email threat . Therefore , this will enable to limit the search space as well ( Estival et al. , 2007 ) . Moreover , for business applications this can be useful ; for example , in marketing where the demographic features as stated above of customers is important to predict behaviors , upgrade the current products and to develop new products . People from different ethno-nationality make various language errors when learning a language . Identification of writer ’ s country of origin could have an impact on educational applications designed towards non-native speakers of a language . Besides , this can be used as a plug-in to online tutor systems to provide more tailored feedback to the students about their mistakes ( Tetreault et al. , 2013 ) . This can help researchers to identify specific teaching and learning issues in different ethnonationalities . This will enable them to develop pedagogical learning materials to address and solve those issues . In this research we focus on English as the second language . As English has become a ‘ universal communication ’ language due to the globalization . It is no longer restricted to the native countries such as England and United States ( Eric , 2013 ) . English language is now available in numerous emerging fields , and has become an essential requirement of labour market and further it is considered to have a cultural importance ( Marko , 2009 ) . We define , A controlled environment as a place or area where rules , regulations and norms are subject to strict enforcement . For instance , in an examination setting , candidates are required to produce answers limiting the scope of the question . 2 RELATED WORK . Distribution of English language around the world can be identified in two ways , mainly ; based on the geographic distribution and based on the Kachru ’ s theory ( Braj B , 2004 ) . In this study when segmenting according to the geographic distribution we have considered clusters namely ; ‘ Asia ’ , ‘ non-Asia ’ , ‘ South Asia ’ , ‘ non-South Asia ’ and ‘ North America ’ . According to the Kachru ’ s ‘ Concentric Circles ’ , English speakers were segmented in to three main categories , namely ; ‘ inner circle ’ , ‘ outer circle ’ and ‘ expanded circle ’ . As stated by his model , the inner circle comprises of the countries where the English is the native language ( i.e. , UK , USA , Canada , New Zealand , etc. ) . The outer circle includes countries where there are small communities of native English speakers however English is used as the second language in education and official purposes ( i.e. , Sri Lanka , India , Singapore , Nigeria , etc . ) . The expanding circle contains countries which considered English as foreign language ( i.e. , China , Indonesia , Japan , Saudi Arabia , etc. ) . The work of Koppel et al . ( 2005 ) is one of the first ethno-nationality identification work where it involves categorizing users based on their native language employing Support Vector Machines ( SVMs ) on various stylistic features focused on identification of common . Authors achieved 0.802 accuracy using five chosen languages ( i.e. , Czech , French , Bulgarian , Russian and Spanish ) from International Corpus of Learner English ( ICLE ) ( Granger , 2014 ) . The ICLE dataset contains argumentative essays writings of the university students and less nativism and creativity of the writer involved . Bykh & Meurers ( 2012 ) proposed use of recurring n-grams on three different classes ( word based , POS based , Open-Class-POS-based ) as features for training SVMs . Out of other SVM implementations LIBLINEAR produced best results . For this study , random data from seven native languages selected from the ICLE corpus . The highest performance was obtained for word-level n-grams with an accuracy of 0.8971 . Gebre et al . ( 2013 ) employs linear SVM , logistic regression and perceptron ( as baseline ) for the native language identification ( NLI ) and achieved accuracy of 0.814 for eleven languages of ‘ The Test of English as a Foreign Language ’ ( TOEFL ) data set ( Blanchard et al. , 2013 ) . Features used includes ; word n-grams , POS n-grams , character n-grams and spelling errors . TOEFL11 has become standard benchmark in NLI tasks since its introduction for the NLI Shared Task 2013 . The main limitation of the TOEFL11 dataset is that it is collected in a more controlled environment ( i.e. , exam for English ) . Cimino & Dell ’ Orletta ( 2017 ) utilizes a novel stacked classifier approach where linear logistic regression based sentence feature classifier is stacked with a SVM based document feature classifier with standard lexical , stylistic and syntactic features . However stacked classification approach has gained a minor gain compared to unstacked . Best results of the NLI shared task 2017 reported for this approach with F1-score of 0.8818 for the TOEFL11 dataset . Kulmizev et al . ( 2017 ) introduced ‘ Groningen ’ system for the NLI Shared Task 2017 which out performs employing linear SVM for character 1-9 n-grams with the F1-score of 0.8756 . Authors have reported that several experiments done with ensemble approach and other features such POS , word , lemma n-grams , skip-grams ; and those failed to match the performance of character 1-9 ngram system . Goutte & Léger ( 2017 ) explored use of voting ensemble SVM models with character , word and POS n-grams . Authors confirms that ensemble methods provide minor but systematic predictive perfor- mance gains . Highest F1-score performance was with best-vote approach consisting 10 models is 0.8740 for TOEFL11 dataset . Markov et al . ( 2018 ) has used punctuation-based features with POS n-grams for his experiments and accuracies of 0.4883 ( TOEFL11 ) and 0.6948 ( ICLE ) reported for best performing settings . SVM with one-vs-all ( OvA ) multi-class classification approach has been used to conduct these experiments . Malmasi & Dras ( 2018 ) employed a supervised multi-class classification approach and incorporated several corpora , including ; TOEFL11 , EF Cambridge Open Language Database Corpus ( EFCAMDAT ) , ASK Corpus ( Andresprȧkskorpus , Second Language Corpus ) , and Jinan Chinese Learner Corpus . The features extracted were ; word/lemma n-grams , character n-grams , function word ngrams , POS n-grams , dependencies , CFG rules , adaptor Grammars and TSG fragments . Highest accuracy of 0.871 is reported for the TOEFL11 dataset . According to the literature it is evident that most of the researchers in the computational linguistic community have employed ICLE in the early stages and TOEFL in the latest NLI tasks ( refer Table 1 ) which both were collected in more controlled environments . Finally , due to above controlled environments ; being unable to capture real nativism in written texts certainly inflate the performance of ethno-nationality identification . On the other hand , identifying the nation of the English writer opposed to his native language will be equally beneficial for author profiling as well . Thus , we introduce use of International Corpus of English ( ICE ) for the ethno-nationality identification . To the best of our knowledge , none of the researches have been conducted to determine the writer ’ s country of origin based on the International Corpus of English ( ICE ) corpus . Moreover , very limited number of researchers have identified the significant features which helps to distinguish Sri Lankan English writers using a large corpus like ICE . One limitation of these researches raised by the authors Tofıghı et al . ( 2012 ) is that , since for most of the web-based applications , automatic spell-checker has been applied , idiosyncratic features including misspelling and other anomalies are ignored . This may hide some of the features which will be useful in identifying the real categories . Nevertheless , in current context , usage of spell checkers and grammar checkers can be seen frequently . Thus , this will be a common limitation in similar types of researches . 3 RESEARCH METHODOLOGY . Supervised learning approach was chosen as it is suitable in classifying text documents into classes more accurately if the classes are known and the data set is labelled ( Slotte , 2018 ) . Hence , according to the literature most promising ML algorithms for the text classification such as ; Support Vector Machines with Stochastic Gradient Descent Optimizer ( linear SVM with SGD ) , Multinomial Naı̈ve Bayes ( MNB ) , Decision Tree ( DT ) and Random Forest ( an ensemble approach ) have been employed . For this research mostly Scikit-learn ( Pedregosa et al. , 2012 ) has been used for preprocessing , feature extraction and classification tasks . Scikit-learn is a Python module for machine learning which provides state-of-the-art implementations of many well-known machine learning algorithms , and maintains an easy-to-use interface ( Pedregosa et al. , 2012 ) . The workflow of the research is depicted in Figure 1 ( Left ) . The main assumptions of this research are authors from the same ethno-nationality share the same linguistic features in their writing and will often have an influence on the way they express themselves in writings ( Jain et al. , 2017 ) . The research questions addressed in this research are ; | This paper presents a simple classification-based approach to a newly defined problem: determining ethno-nationality of writers of English text data. The problem of determining ethno-nationality can be seen as a direct extension of the research problem of identifying the writers' native language based on written English text. The authors define ethno-nationality mostly as country-of-origin and aim to distinguish this demographic feature from native language as another feature. The empirical validations are mostly applications of standard (and even obsolete) classification models on the newly collected data for the introduced problem. | SP:add4938cd606c4f566d284b952b735debc6ff47e |
Determining the Ethno-nationality of Writers Using Written English Text | Ethno-nationality is where nations are defined by a shared heritage , for instance it can be a membership of a common language , nationality , religion or an ethnic ancestry . The main goal of this research is to determine a person ’ s country-oforigin using English text written in less controlled environments , employing Machine Learning ( ML ) and Natural Language Processing ( NLP ) techniques . The current literature mainly focuses on determining the native language of English writers and a minimal number of researches have been conducted in determining the country-of-origin of English writers . Further , most experiments in the literature are mainly based on the TOEFL , ICLE datasets which were collected in more controlled environments ( i.e. , standard exam answers ) . Hence , most of the writers try to follow some guidelines and patterns of writing . Subsequently , the creativity , freedom of writing and the insights of writers could be hidden . Thus , we believe it hides the real nativism of the writers . Further , those corpora are not freely available as it involves a high cost of licenses . Thus , the main data corpus used for this research was the International Corpus of English ( ICE corpus ) . Up to this point , none of the researchers have utilised the ICE corpus for the purpose of determining the writers ’ countryof-origin , even though there is a true potential . For this research , an overall accuracy of 0.7636 for the flat classification ( for all ten countries ) and accuracy of 0.6224∼1.000 for sub-categories were received . In addition , the best ML model obtained for the flat classification strategy is linear SVM with SGD optimizer trained with word ( 1,1 ) uni-gram model . 1 INTRODUCTION . Ethno-nationality can be determined as the identity in which jointly defined by ethnicity and nationality ( Sapp , 2012 ) . Identifying a writer ’ s country-of-origin is a part of identifying his ethnonationality ( Jerry , 2008 ) . Foremost focus of ethno-nationality in this research is to identify a writer ’ s country-of-origin based on their writings in a non-native or second language . In recent years , identification of ethno-nationality of a writer has gained a growing interest . In author profiling demographic features ( such as age , gender , education , native language , country of origin , etc. , ) of an author from a written text will be identified , which are commonly needed in forensic linguistics . For instance , Intelligence to build a profile of their suspect , to identify the author of an anonymous email threat . Therefore , this will enable to limit the search space as well ( Estival et al. , 2007 ) . Moreover , for business applications this can be useful ; for example , in marketing where the demographic features as stated above of customers is important to predict behaviors , upgrade the current products and to develop new products . People from different ethno-nationality make various language errors when learning a language . Identification of writer ’ s country of origin could have an impact on educational applications designed towards non-native speakers of a language . Besides , this can be used as a plug-in to online tutor systems to provide more tailored feedback to the students about their mistakes ( Tetreault et al. , 2013 ) . This can help researchers to identify specific teaching and learning issues in different ethnonationalities . This will enable them to develop pedagogical learning materials to address and solve those issues . In this research we focus on English as the second language . As English has become a ‘ universal communication ’ language due to the globalization . It is no longer restricted to the native countries such as England and United States ( Eric , 2013 ) . English language is now available in numerous emerging fields , and has become an essential requirement of labour market and further it is considered to have a cultural importance ( Marko , 2009 ) . We define , A controlled environment as a place or area where rules , regulations and norms are subject to strict enforcement . For instance , in an examination setting , candidates are required to produce answers limiting the scope of the question . 2 RELATED WORK . Distribution of English language around the world can be identified in two ways , mainly ; based on the geographic distribution and based on the Kachru ’ s theory ( Braj B , 2004 ) . In this study when segmenting according to the geographic distribution we have considered clusters namely ; ‘ Asia ’ , ‘ non-Asia ’ , ‘ South Asia ’ , ‘ non-South Asia ’ and ‘ North America ’ . According to the Kachru ’ s ‘ Concentric Circles ’ , English speakers were segmented in to three main categories , namely ; ‘ inner circle ’ , ‘ outer circle ’ and ‘ expanded circle ’ . As stated by his model , the inner circle comprises of the countries where the English is the native language ( i.e. , UK , USA , Canada , New Zealand , etc. ) . The outer circle includes countries where there are small communities of native English speakers however English is used as the second language in education and official purposes ( i.e. , Sri Lanka , India , Singapore , Nigeria , etc . ) . The expanding circle contains countries which considered English as foreign language ( i.e. , China , Indonesia , Japan , Saudi Arabia , etc. ) . The work of Koppel et al . ( 2005 ) is one of the first ethno-nationality identification work where it involves categorizing users based on their native language employing Support Vector Machines ( SVMs ) on various stylistic features focused on identification of common . Authors achieved 0.802 accuracy using five chosen languages ( i.e. , Czech , French , Bulgarian , Russian and Spanish ) from International Corpus of Learner English ( ICLE ) ( Granger , 2014 ) . The ICLE dataset contains argumentative essays writings of the university students and less nativism and creativity of the writer involved . Bykh & Meurers ( 2012 ) proposed use of recurring n-grams on three different classes ( word based , POS based , Open-Class-POS-based ) as features for training SVMs . Out of other SVM implementations LIBLINEAR produced best results . For this study , random data from seven native languages selected from the ICLE corpus . The highest performance was obtained for word-level n-grams with an accuracy of 0.8971 . Gebre et al . ( 2013 ) employs linear SVM , logistic regression and perceptron ( as baseline ) for the native language identification ( NLI ) and achieved accuracy of 0.814 for eleven languages of ‘ The Test of English as a Foreign Language ’ ( TOEFL ) data set ( Blanchard et al. , 2013 ) . Features used includes ; word n-grams , POS n-grams , character n-grams and spelling errors . TOEFL11 has become standard benchmark in NLI tasks since its introduction for the NLI Shared Task 2013 . The main limitation of the TOEFL11 dataset is that it is collected in a more controlled environment ( i.e. , exam for English ) . Cimino & Dell ’ Orletta ( 2017 ) utilizes a novel stacked classifier approach where linear logistic regression based sentence feature classifier is stacked with a SVM based document feature classifier with standard lexical , stylistic and syntactic features . However stacked classification approach has gained a minor gain compared to unstacked . Best results of the NLI shared task 2017 reported for this approach with F1-score of 0.8818 for the TOEFL11 dataset . Kulmizev et al . ( 2017 ) introduced ‘ Groningen ’ system for the NLI Shared Task 2017 which out performs employing linear SVM for character 1-9 n-grams with the F1-score of 0.8756 . Authors have reported that several experiments done with ensemble approach and other features such POS , word , lemma n-grams , skip-grams ; and those failed to match the performance of character 1-9 ngram system . Goutte & Léger ( 2017 ) explored use of voting ensemble SVM models with character , word and POS n-grams . Authors confirms that ensemble methods provide minor but systematic predictive perfor- mance gains . Highest F1-score performance was with best-vote approach consisting 10 models is 0.8740 for TOEFL11 dataset . Markov et al . ( 2018 ) has used punctuation-based features with POS n-grams for his experiments and accuracies of 0.4883 ( TOEFL11 ) and 0.6948 ( ICLE ) reported for best performing settings . SVM with one-vs-all ( OvA ) multi-class classification approach has been used to conduct these experiments . Malmasi & Dras ( 2018 ) employed a supervised multi-class classification approach and incorporated several corpora , including ; TOEFL11 , EF Cambridge Open Language Database Corpus ( EFCAMDAT ) , ASK Corpus ( Andresprȧkskorpus , Second Language Corpus ) , and Jinan Chinese Learner Corpus . The features extracted were ; word/lemma n-grams , character n-grams , function word ngrams , POS n-grams , dependencies , CFG rules , adaptor Grammars and TSG fragments . Highest accuracy of 0.871 is reported for the TOEFL11 dataset . According to the literature it is evident that most of the researchers in the computational linguistic community have employed ICLE in the early stages and TOEFL in the latest NLI tasks ( refer Table 1 ) which both were collected in more controlled environments . Finally , due to above controlled environments ; being unable to capture real nativism in written texts certainly inflate the performance of ethno-nationality identification . On the other hand , identifying the nation of the English writer opposed to his native language will be equally beneficial for author profiling as well . Thus , we introduce use of International Corpus of English ( ICE ) for the ethno-nationality identification . To the best of our knowledge , none of the researches have been conducted to determine the writer ’ s country of origin based on the International Corpus of English ( ICE ) corpus . Moreover , very limited number of researchers have identified the significant features which helps to distinguish Sri Lankan English writers using a large corpus like ICE . One limitation of these researches raised by the authors Tofıghı et al . ( 2012 ) is that , since for most of the web-based applications , automatic spell-checker has been applied , idiosyncratic features including misspelling and other anomalies are ignored . This may hide some of the features which will be useful in identifying the real categories . Nevertheless , in current context , usage of spell checkers and grammar checkers can be seen frequently . Thus , this will be a common limitation in similar types of researches . 3 RESEARCH METHODOLOGY . Supervised learning approach was chosen as it is suitable in classifying text documents into classes more accurately if the classes are known and the data set is labelled ( Slotte , 2018 ) . Hence , according to the literature most promising ML algorithms for the text classification such as ; Support Vector Machines with Stochastic Gradient Descent Optimizer ( linear SVM with SGD ) , Multinomial Naı̈ve Bayes ( MNB ) , Decision Tree ( DT ) and Random Forest ( an ensemble approach ) have been employed . For this research mostly Scikit-learn ( Pedregosa et al. , 2012 ) has been used for preprocessing , feature extraction and classification tasks . Scikit-learn is a Python module for machine learning which provides state-of-the-art implementations of many well-known machine learning algorithms , and maintains an easy-to-use interface ( Pedregosa et al. , 2012 ) . The workflow of the research is depicted in Figure 1 ( Left ) . The main assumptions of this research are authors from the same ethno-nationality share the same linguistic features in their writing and will often have an influence on the way they express themselves in writings ( Jain et al. , 2017 ) . The research questions addressed in this research are ; | The work aims to automatically determine the country of origin of authors given their English texts. Experiments are conducted using the International Corpus of English (ICE corpus), which includes texts of authors from Sri Lanka, India, Philippines, Singapore, Canada, Hong Kong, Nigeria, Ireland, Jamaica and USA; there are 200 text documents per origin country. It is assumed that authors from the same ethno-nationality share the same `linguistic features'. The documents are represented as TF-IDF weighted vectors of words, and a classifier is applied (it is not very obvious which classifier exactly, perhaps I missed this detail?). In classification, the authors apply text classification, either directly into the 10 countries of origin, or using two different class hierarchies. In addition to multi-class classification, they also conduct binary classification (e.g., native vs. non-native English speakers). The paper then presents the classification results. Salient features (words) are detailed. | SP:add4938cd606c4f566d284b952b735debc6ff47e |
Determining the Ethno-nationality of Writers Using Written English Text | Ethno-nationality is where nations are defined by a shared heritage , for instance it can be a membership of a common language , nationality , religion or an ethnic ancestry . The main goal of this research is to determine a person ’ s country-oforigin using English text written in less controlled environments , employing Machine Learning ( ML ) and Natural Language Processing ( NLP ) techniques . The current literature mainly focuses on determining the native language of English writers and a minimal number of researches have been conducted in determining the country-of-origin of English writers . Further , most experiments in the literature are mainly based on the TOEFL , ICLE datasets which were collected in more controlled environments ( i.e. , standard exam answers ) . Hence , most of the writers try to follow some guidelines and patterns of writing . Subsequently , the creativity , freedom of writing and the insights of writers could be hidden . Thus , we believe it hides the real nativism of the writers . Further , those corpora are not freely available as it involves a high cost of licenses . Thus , the main data corpus used for this research was the International Corpus of English ( ICE corpus ) . Up to this point , none of the researchers have utilised the ICE corpus for the purpose of determining the writers ’ countryof-origin , even though there is a true potential . For this research , an overall accuracy of 0.7636 for the flat classification ( for all ten countries ) and accuracy of 0.6224∼1.000 for sub-categories were received . In addition , the best ML model obtained for the flat classification strategy is linear SVM with SGD optimizer trained with word ( 1,1 ) uni-gram model . 1 INTRODUCTION . Ethno-nationality can be determined as the identity in which jointly defined by ethnicity and nationality ( Sapp , 2012 ) . Identifying a writer ’ s country-of-origin is a part of identifying his ethnonationality ( Jerry , 2008 ) . Foremost focus of ethno-nationality in this research is to identify a writer ’ s country-of-origin based on their writings in a non-native or second language . In recent years , identification of ethno-nationality of a writer has gained a growing interest . In author profiling demographic features ( such as age , gender , education , native language , country of origin , etc. , ) of an author from a written text will be identified , which are commonly needed in forensic linguistics . For instance , Intelligence to build a profile of their suspect , to identify the author of an anonymous email threat . Therefore , this will enable to limit the search space as well ( Estival et al. , 2007 ) . Moreover , for business applications this can be useful ; for example , in marketing where the demographic features as stated above of customers is important to predict behaviors , upgrade the current products and to develop new products . People from different ethno-nationality make various language errors when learning a language . Identification of writer ’ s country of origin could have an impact on educational applications designed towards non-native speakers of a language . Besides , this can be used as a plug-in to online tutor systems to provide more tailored feedback to the students about their mistakes ( Tetreault et al. , 2013 ) . This can help researchers to identify specific teaching and learning issues in different ethnonationalities . This will enable them to develop pedagogical learning materials to address and solve those issues . In this research we focus on English as the second language . As English has become a ‘ universal communication ’ language due to the globalization . It is no longer restricted to the native countries such as England and United States ( Eric , 2013 ) . English language is now available in numerous emerging fields , and has become an essential requirement of labour market and further it is considered to have a cultural importance ( Marko , 2009 ) . We define , A controlled environment as a place or area where rules , regulations and norms are subject to strict enforcement . For instance , in an examination setting , candidates are required to produce answers limiting the scope of the question . 2 RELATED WORK . Distribution of English language around the world can be identified in two ways , mainly ; based on the geographic distribution and based on the Kachru ’ s theory ( Braj B , 2004 ) . In this study when segmenting according to the geographic distribution we have considered clusters namely ; ‘ Asia ’ , ‘ non-Asia ’ , ‘ South Asia ’ , ‘ non-South Asia ’ and ‘ North America ’ . According to the Kachru ’ s ‘ Concentric Circles ’ , English speakers were segmented in to three main categories , namely ; ‘ inner circle ’ , ‘ outer circle ’ and ‘ expanded circle ’ . As stated by his model , the inner circle comprises of the countries where the English is the native language ( i.e. , UK , USA , Canada , New Zealand , etc. ) . The outer circle includes countries where there are small communities of native English speakers however English is used as the second language in education and official purposes ( i.e. , Sri Lanka , India , Singapore , Nigeria , etc . ) . The expanding circle contains countries which considered English as foreign language ( i.e. , China , Indonesia , Japan , Saudi Arabia , etc. ) . The work of Koppel et al . ( 2005 ) is one of the first ethno-nationality identification work where it involves categorizing users based on their native language employing Support Vector Machines ( SVMs ) on various stylistic features focused on identification of common . Authors achieved 0.802 accuracy using five chosen languages ( i.e. , Czech , French , Bulgarian , Russian and Spanish ) from International Corpus of Learner English ( ICLE ) ( Granger , 2014 ) . The ICLE dataset contains argumentative essays writings of the university students and less nativism and creativity of the writer involved . Bykh & Meurers ( 2012 ) proposed use of recurring n-grams on three different classes ( word based , POS based , Open-Class-POS-based ) as features for training SVMs . Out of other SVM implementations LIBLINEAR produced best results . For this study , random data from seven native languages selected from the ICLE corpus . The highest performance was obtained for word-level n-grams with an accuracy of 0.8971 . Gebre et al . ( 2013 ) employs linear SVM , logistic regression and perceptron ( as baseline ) for the native language identification ( NLI ) and achieved accuracy of 0.814 for eleven languages of ‘ The Test of English as a Foreign Language ’ ( TOEFL ) data set ( Blanchard et al. , 2013 ) . Features used includes ; word n-grams , POS n-grams , character n-grams and spelling errors . TOEFL11 has become standard benchmark in NLI tasks since its introduction for the NLI Shared Task 2013 . The main limitation of the TOEFL11 dataset is that it is collected in a more controlled environment ( i.e. , exam for English ) . Cimino & Dell ’ Orletta ( 2017 ) utilizes a novel stacked classifier approach where linear logistic regression based sentence feature classifier is stacked with a SVM based document feature classifier with standard lexical , stylistic and syntactic features . However stacked classification approach has gained a minor gain compared to unstacked . Best results of the NLI shared task 2017 reported for this approach with F1-score of 0.8818 for the TOEFL11 dataset . Kulmizev et al . ( 2017 ) introduced ‘ Groningen ’ system for the NLI Shared Task 2017 which out performs employing linear SVM for character 1-9 n-grams with the F1-score of 0.8756 . Authors have reported that several experiments done with ensemble approach and other features such POS , word , lemma n-grams , skip-grams ; and those failed to match the performance of character 1-9 ngram system . Goutte & Léger ( 2017 ) explored use of voting ensemble SVM models with character , word and POS n-grams . Authors confirms that ensemble methods provide minor but systematic predictive perfor- mance gains . Highest F1-score performance was with best-vote approach consisting 10 models is 0.8740 for TOEFL11 dataset . Markov et al . ( 2018 ) has used punctuation-based features with POS n-grams for his experiments and accuracies of 0.4883 ( TOEFL11 ) and 0.6948 ( ICLE ) reported for best performing settings . SVM with one-vs-all ( OvA ) multi-class classification approach has been used to conduct these experiments . Malmasi & Dras ( 2018 ) employed a supervised multi-class classification approach and incorporated several corpora , including ; TOEFL11 , EF Cambridge Open Language Database Corpus ( EFCAMDAT ) , ASK Corpus ( Andresprȧkskorpus , Second Language Corpus ) , and Jinan Chinese Learner Corpus . The features extracted were ; word/lemma n-grams , character n-grams , function word ngrams , POS n-grams , dependencies , CFG rules , adaptor Grammars and TSG fragments . Highest accuracy of 0.871 is reported for the TOEFL11 dataset . According to the literature it is evident that most of the researchers in the computational linguistic community have employed ICLE in the early stages and TOEFL in the latest NLI tasks ( refer Table 1 ) which both were collected in more controlled environments . Finally , due to above controlled environments ; being unable to capture real nativism in written texts certainly inflate the performance of ethno-nationality identification . On the other hand , identifying the nation of the English writer opposed to his native language will be equally beneficial for author profiling as well . Thus , we introduce use of International Corpus of English ( ICE ) for the ethno-nationality identification . To the best of our knowledge , none of the researches have been conducted to determine the writer ’ s country of origin based on the International Corpus of English ( ICE ) corpus . Moreover , very limited number of researchers have identified the significant features which helps to distinguish Sri Lankan English writers using a large corpus like ICE . One limitation of these researches raised by the authors Tofıghı et al . ( 2012 ) is that , since for most of the web-based applications , automatic spell-checker has been applied , idiosyncratic features including misspelling and other anomalies are ignored . This may hide some of the features which will be useful in identifying the real categories . Nevertheless , in current context , usage of spell checkers and grammar checkers can be seen frequently . Thus , this will be a common limitation in similar types of researches . 3 RESEARCH METHODOLOGY . Supervised learning approach was chosen as it is suitable in classifying text documents into classes more accurately if the classes are known and the data set is labelled ( Slotte , 2018 ) . Hence , according to the literature most promising ML algorithms for the text classification such as ; Support Vector Machines with Stochastic Gradient Descent Optimizer ( linear SVM with SGD ) , Multinomial Naı̈ve Bayes ( MNB ) , Decision Tree ( DT ) and Random Forest ( an ensemble approach ) have been employed . For this research mostly Scikit-learn ( Pedregosa et al. , 2012 ) has been used for preprocessing , feature extraction and classification tasks . Scikit-learn is a Python module for machine learning which provides state-of-the-art implementations of many well-known machine learning algorithms , and maintains an easy-to-use interface ( Pedregosa et al. , 2012 ) . The workflow of the research is depicted in Figure 1 ( Left ) . The main assumptions of this research are authors from the same ethno-nationality share the same linguistic features in their writing and will often have an influence on the way they express themselves in writings ( Jain et al. , 2017 ) . The research questions addressed in this research are ; | This paper aims to determine the country of origin of English language writers. It uses documents from the International corpus of English (ICE) and employs various learning algorithms and text-based features. The findings are that linear SVM with unigram features works best, that some countries are better distinguished than others, and that some features are more informative than others. | SP:add4938cd606c4f566d284b952b735debc6ff47e |
Image Dataset Compression Based on Matrix Product States | 1 INTRODUCTION . Large-scale datasets consisting of millions of samples are becoming the norm to obtain state-of-the-art machine learning models in several fields including speech enhancement and recognition ( Sun et al. , 2020 ; SainathTN et al. , 2013 ) , computer vision ( Russakovsky et al. , 2015 ) and natural language processing ( Devlin et al. , 2019 ) . At such a scale , the resources needed to store datasets and train neural networks become very large , and training machine learning models on it requires the use of specialized equipment and infrastructure . Therefore , it is the critical problems in machine learning that effectively reduce the size of the dataset as well as maintaining the model performance . An intuitive way is data selection , also known as core-set construction method , i.e. , identifying the most representative training samples , which aims to improve the data efficiency of machine learning techniques . ( Agarwal et al. , 2004 ; Chen , 2009 ; Feldman et al. , 2020 ) , mainly focusing on clustering problems . Another dataset compression method is dataset distillation ( Wang et al. , 2018 ; Zhao et al. , 2021 ) , which can learn a small set of informative images from large training data and improve the weakness of data selection methods . However , these studies mainly adopt the existing sample reduction techniques to dataset compression , which may not be intrinsically appropriate for architecture of the image dataset . For example , most dataset compression methods need to adopt the whole image information , although only a small proportion of information ( i.e. , locality information ) will significantly influence the performance during training . Meanwhile , the performance of models trained the offline compressed datasets on downstream tasks would be restricted . In this paper , we introduce a novel matrix product states ( MPS ) technique ( Fannes et al. , 1992 ) from quantum many-body physics for compressing image dataset . The MPS is an algorithm that factorizes a matrix into a sequential product of local tensors ( i.e. , a multi-way array ) . Here , we call the `` locality of pixel dependencies '' in image with short-range correlation and the `` global dependencies '' in image with long-range correlation . An important merit of the MPS decomposition is that it establishes the structural of classical pixel correlation with quantum entanglement entropy ( Srednicki , 1993 ) in the dataset : the larger the entanglement entropy is , the less short-range correlation is , and vice versa . The information that has larger classical correlation is mainly short-range correlation in the image dataset ( Krizhevsky et al. , 2017 ) . The dataset distillation can Such a property motivates us to think about whether such an MPS can be applied to derive a better dataset compression approach . We can compress the dataset by filtering long-range correlation information in task-agnostic scenarios and use the dataset distillation to supplement the information in task-specific scenarios . To this end , we propose a MPS-based Dataset compression approach , called MPSD , to compress the image dataset , which not only enables deep neural networks to obtain similar performance as on the original dataset but also can be used for different models as well as different types of tasks . We have made two import technical contributions for image dataset compression based on MPS . First , we introduce a new task-agnostic dataset compression procedure that efficiently extracting short-range correlation among pixels . We formulate this goal as the problem of minimizing the difference between multiple low-rank tensors with constraints and the original data samples . We present both theoretical discussion and experimental verification for the effectiveness of this dataset compression strategy . Second , we propose a new task-specific module for information supplementation , tailored for machine learning model . Since different downstream tasks have different information for image datasets , the offline dataset compression does not contain task-specific information . We propose a module based on dataset distillation to make the compressed datasets adaptable to different tasks . To our knowledge , it is the first time that MPS is applied to the image dataset compression , which is well suited for model training and dataset storage . We construct experiments to evaluate the effectiveness of the proposed compression approach for CIFAR , FashinMNSIT , and ImageNet , respectively . Extensive experiments have demonstrated the effectiveness of the proposed approach in dataset compression , especially obtained better model performance ( 3.19 % on average ) than similar methods for the same compression rate . In the rest of the paper , we first review the related work in Section 2 . Then we present MPS decomposition and theoretical analysis about quantum entanglement with classical correlation in Section 3 . Section 4 introduce our proposed MPS-based dataset compression approach . We report experimental results in Section 5 and conclude the paper in Section 6 . We will release code and pre-processed data to reproduce our experiments . 2 RELATED WORK . We review the related works in three aspects . Core-set Construction The core-set construction technique of selecting the valid knowledge through an illuminating or a priori approach ( Toneva et al. , 2019 ; Castro et al. , 2018 ; Aljundi et al. , 2019 ; Sener & Savarese , 2018 ) , either by giving illuminating knowledge about the task or by finding representative samples . The core-set construction define representative criterion in the first ( e.g. , compactness ( Rebuffi et al. , 2017 ; Castro et al. , 2018 ) , forgetfulness ( Toneva et al. , 2019 ) , diversity ( Sener & Savarese , 2018 ; Aljundi et al. , 2019 ) ) , then select representative samples from original dataset based on the criterion , finally use the selected small dataset to train the machine learning model for a downstream task . In contrast , our approach does not require the presence of a representative sample and is a more general approach . Knowledge Distillation Knowledge distillation is a technique of transferring knowledge from a collection of models into a single model ( Hinton et al. , 2015 ; Buciluǎ et al. , 2006 ; Ba & Caruana , 2014 ; Romero et al. , 2015 ) . While network distillation aims to distill the knowledge of multiple networks into a single model , dataset distillation models network parameters as a function of synthetic training data and learn their synthetic data by minimizing the training loss on the original training data and the synthetic training data ( Wang et al. , 2018 ) . We use the idea of knowledge distillation to complement the learning of task-relevant information under different tasks . In other words , our goal is to capture the portion of information in the dataset sample that is valid for training deep neural networks , and to perform a `` selection '' of information in the dataset sample . Tensor-based Matrix Representation . Tensor-based method of matrices is a technique that allows representing dataset samples in the tensor form such that quantum entanglement corresponds to classical correlations between different coarse-grained textures ( Latorre , 2005 ) . Another application is the compression of neural networks . Matrix product operators have been used to compress linear layers of deep neural networks ( Gao et al. , 2020 ) . The idea of reshaping weights of fully connected layers into high-dimensional tensors and encoding them in Tensor Train format was introduced by Novikov et al . ( 2015 ) . In contrast , we represent a dataset sample jointly with multiple low-rank tensors , each low-rank tensor describing the difference in information between the previous other tensors and the original graph ( i.e. , residual information ) . Our work is highly built on these studies , while we have a new perspective by designing the dataset compression algorithm which enables extracted short-range correlation in the image . It is the first time that MPS is applied to image dataset compression , and we make contributions for a novel approach to dataset compression . 3 PRELIMINARY . In this paper , scalars are denoted by lowercase letters ( e.g. , a ) , matrices are denoted by boldface capital letters ( e.g. , M ) , and high-order ( order three or higher ) tensors are denoted by boldface Euler script letters ( e.g. , T ) . A 3-order tensor Ti1 , i2 , i3 can be considered as a ( potentially multi-dimensional ) array with 3 indices { i1 , i2 , i3 } . 3.1 MATRIX PRODUCT STATE . Originating from quantum many-body physics , matrix product states ( MPS ) is a standard algorithm to factorize a matrix into a sequential product of multiple local tensors ( i.e. , a multi-way array ) ( Latorre , 2005 ; Perez-Garcia et al. , 2007 ) . This MPS decomposition establishes the structure of classical pixel correlation with quantum entanglement entropy . Formally , given a matrix M ∈ RI×J , its MPS decomposition into a product of n local tensors can be represented as : MPS ( M ) = n∏ k=1 T ( k ) [ dk−1 , jk , dk ] , dk = min ( k∏ m=1 jm , n∏ m=k+1 jm ) , ( 1 ) where the T ( k ) [ dk−1 , jk , dk ] is a 3-order tensor with size dk−1 × jk × dk in which ∏n k=1 jk = I × J and d0 = dn = 1 . We use the concept of bond to connect two adjacent tensors ( Fannes et al. , 1992 ) . The bond dimension dk is defined by : we can see from Equation ( 1 ) that the dk is large in the middle and small on both sides . We present a detailed algorithm for MPS decomposition in Algorithm 1 . It is usually take an odd number of local tensors with MPS . Algorithm 1 MPS decomposition for a matrix . Require : matrix M , the number of local tensors n Ensure : : MPS tensor list { T ( k ) } nk=1 1 : for k = 1→ n− 1 do 2 : M [ I , J ] −→M [ dk−1 × jk , −1 ] 3 : UλV > = SVD ( M ) 4 : U [ dk−1 × jk , dk ] −→ U [ dk−1 , jk , dk ] 5 : T ( k ) : = U 6 : M : = λV > 7 : end for 8 : T ( n ) : = M 9 : Normalization 10 : return { T ( k ) } nk=1 3.2 MPS-BASED LOW-RANK APPROXIMATION .. With the MPS decomposition describe in Equation ( 1 ) , we can exactly decompose a matrix by MPS into the form of a series of products of local tensors and multiply these tensors together to completely reconstruct the original matrix M. We can truncate the k-th bond dimension dk ( see Equation ( 1 ) ) of local tensors to d ′ k for low-rank approximation ( dk > d ′ k ) . Different values for { dk } nk=1 can be set to control the filtering ability of long-range correlation . Definition 1 . ( Local truncation error ) . Let { λj } dkj=1 are the singular values of M [ j1 , . . . , jk , jk+1 , . . . , jn ] . We define the truncation error induced by the k-th bond dimension dk local truncation error k , which can be efficiently computed as k = ∑dk j=dk−d ′ k λj . After defining the local truncation error in Definition 1 , we can derive the upper exact bound of the truncation error of the MPS decomposition by iteration . Theorem 1 . ( Truncation error for MPS-based approximation ) . Let k denoted the local truncation error of k-th bond dimension . The upper exact bound of the truncation error with MPS decomposition can be caclulated by : ||M−MPS ( M ) ||F ≤ √√√√n−1∑ k=1 2k . ( 2 ) The proof can be found in the supplementary materials . Suppose that we have truncated the dimensions of local tensors from { dk } nk=1 to { d ′ k } nk=1 , the compression ratio can be computed by ρ = ∑n k=1 d ′ k−1jkd ′ k∏n k=1 jk . The smaller is the compression ratio , the fewer parameters are kept in MPS representation . | While Large-scale data is beneficial for machine learning, it causes high storage and training consumption. Stressing this problem, this paper proposes to use the tensor decomposition method for compressing datasets. Filtering long-range correlation information in task-agnostic scenarios via MPS structure, this method achieves a good compression ratio while preserving the model performance. | SP:626db54b4dd315f641a7784873c092677534488f |
Image Dataset Compression Based on Matrix Product States | 1 INTRODUCTION . Large-scale datasets consisting of millions of samples are becoming the norm to obtain state-of-the-art machine learning models in several fields including speech enhancement and recognition ( Sun et al. , 2020 ; SainathTN et al. , 2013 ) , computer vision ( Russakovsky et al. , 2015 ) and natural language processing ( Devlin et al. , 2019 ) . At such a scale , the resources needed to store datasets and train neural networks become very large , and training machine learning models on it requires the use of specialized equipment and infrastructure . Therefore , it is the critical problems in machine learning that effectively reduce the size of the dataset as well as maintaining the model performance . An intuitive way is data selection , also known as core-set construction method , i.e. , identifying the most representative training samples , which aims to improve the data efficiency of machine learning techniques . ( Agarwal et al. , 2004 ; Chen , 2009 ; Feldman et al. , 2020 ) , mainly focusing on clustering problems . Another dataset compression method is dataset distillation ( Wang et al. , 2018 ; Zhao et al. , 2021 ) , which can learn a small set of informative images from large training data and improve the weakness of data selection methods . However , these studies mainly adopt the existing sample reduction techniques to dataset compression , which may not be intrinsically appropriate for architecture of the image dataset . For example , most dataset compression methods need to adopt the whole image information , although only a small proportion of information ( i.e. , locality information ) will significantly influence the performance during training . Meanwhile , the performance of models trained the offline compressed datasets on downstream tasks would be restricted . In this paper , we introduce a novel matrix product states ( MPS ) technique ( Fannes et al. , 1992 ) from quantum many-body physics for compressing image dataset . The MPS is an algorithm that factorizes a matrix into a sequential product of local tensors ( i.e. , a multi-way array ) . Here , we call the `` locality of pixel dependencies '' in image with short-range correlation and the `` global dependencies '' in image with long-range correlation . An important merit of the MPS decomposition is that it establishes the structural of classical pixel correlation with quantum entanglement entropy ( Srednicki , 1993 ) in the dataset : the larger the entanglement entropy is , the less short-range correlation is , and vice versa . The information that has larger classical correlation is mainly short-range correlation in the image dataset ( Krizhevsky et al. , 2017 ) . The dataset distillation can Such a property motivates us to think about whether such an MPS can be applied to derive a better dataset compression approach . We can compress the dataset by filtering long-range correlation information in task-agnostic scenarios and use the dataset distillation to supplement the information in task-specific scenarios . To this end , we propose a MPS-based Dataset compression approach , called MPSD , to compress the image dataset , which not only enables deep neural networks to obtain similar performance as on the original dataset but also can be used for different models as well as different types of tasks . We have made two import technical contributions for image dataset compression based on MPS . First , we introduce a new task-agnostic dataset compression procedure that efficiently extracting short-range correlation among pixels . We formulate this goal as the problem of minimizing the difference between multiple low-rank tensors with constraints and the original data samples . We present both theoretical discussion and experimental verification for the effectiveness of this dataset compression strategy . Second , we propose a new task-specific module for information supplementation , tailored for machine learning model . Since different downstream tasks have different information for image datasets , the offline dataset compression does not contain task-specific information . We propose a module based on dataset distillation to make the compressed datasets adaptable to different tasks . To our knowledge , it is the first time that MPS is applied to the image dataset compression , which is well suited for model training and dataset storage . We construct experiments to evaluate the effectiveness of the proposed compression approach for CIFAR , FashinMNSIT , and ImageNet , respectively . Extensive experiments have demonstrated the effectiveness of the proposed approach in dataset compression , especially obtained better model performance ( 3.19 % on average ) than similar methods for the same compression rate . In the rest of the paper , we first review the related work in Section 2 . Then we present MPS decomposition and theoretical analysis about quantum entanglement with classical correlation in Section 3 . Section 4 introduce our proposed MPS-based dataset compression approach . We report experimental results in Section 5 and conclude the paper in Section 6 . We will release code and pre-processed data to reproduce our experiments . 2 RELATED WORK . We review the related works in three aspects . Core-set Construction The core-set construction technique of selecting the valid knowledge through an illuminating or a priori approach ( Toneva et al. , 2019 ; Castro et al. , 2018 ; Aljundi et al. , 2019 ; Sener & Savarese , 2018 ) , either by giving illuminating knowledge about the task or by finding representative samples . The core-set construction define representative criterion in the first ( e.g. , compactness ( Rebuffi et al. , 2017 ; Castro et al. , 2018 ) , forgetfulness ( Toneva et al. , 2019 ) , diversity ( Sener & Savarese , 2018 ; Aljundi et al. , 2019 ) ) , then select representative samples from original dataset based on the criterion , finally use the selected small dataset to train the machine learning model for a downstream task . In contrast , our approach does not require the presence of a representative sample and is a more general approach . Knowledge Distillation Knowledge distillation is a technique of transferring knowledge from a collection of models into a single model ( Hinton et al. , 2015 ; Buciluǎ et al. , 2006 ; Ba & Caruana , 2014 ; Romero et al. , 2015 ) . While network distillation aims to distill the knowledge of multiple networks into a single model , dataset distillation models network parameters as a function of synthetic training data and learn their synthetic data by minimizing the training loss on the original training data and the synthetic training data ( Wang et al. , 2018 ) . We use the idea of knowledge distillation to complement the learning of task-relevant information under different tasks . In other words , our goal is to capture the portion of information in the dataset sample that is valid for training deep neural networks , and to perform a `` selection '' of information in the dataset sample . Tensor-based Matrix Representation . Tensor-based method of matrices is a technique that allows representing dataset samples in the tensor form such that quantum entanglement corresponds to classical correlations between different coarse-grained textures ( Latorre , 2005 ) . Another application is the compression of neural networks . Matrix product operators have been used to compress linear layers of deep neural networks ( Gao et al. , 2020 ) . The idea of reshaping weights of fully connected layers into high-dimensional tensors and encoding them in Tensor Train format was introduced by Novikov et al . ( 2015 ) . In contrast , we represent a dataset sample jointly with multiple low-rank tensors , each low-rank tensor describing the difference in information between the previous other tensors and the original graph ( i.e. , residual information ) . Our work is highly built on these studies , while we have a new perspective by designing the dataset compression algorithm which enables extracted short-range correlation in the image . It is the first time that MPS is applied to image dataset compression , and we make contributions for a novel approach to dataset compression . 3 PRELIMINARY . In this paper , scalars are denoted by lowercase letters ( e.g. , a ) , matrices are denoted by boldface capital letters ( e.g. , M ) , and high-order ( order three or higher ) tensors are denoted by boldface Euler script letters ( e.g. , T ) . A 3-order tensor Ti1 , i2 , i3 can be considered as a ( potentially multi-dimensional ) array with 3 indices { i1 , i2 , i3 } . 3.1 MATRIX PRODUCT STATE . Originating from quantum many-body physics , matrix product states ( MPS ) is a standard algorithm to factorize a matrix into a sequential product of multiple local tensors ( i.e. , a multi-way array ) ( Latorre , 2005 ; Perez-Garcia et al. , 2007 ) . This MPS decomposition establishes the structure of classical pixel correlation with quantum entanglement entropy . Formally , given a matrix M ∈ RI×J , its MPS decomposition into a product of n local tensors can be represented as : MPS ( M ) = n∏ k=1 T ( k ) [ dk−1 , jk , dk ] , dk = min ( k∏ m=1 jm , n∏ m=k+1 jm ) , ( 1 ) where the T ( k ) [ dk−1 , jk , dk ] is a 3-order tensor with size dk−1 × jk × dk in which ∏n k=1 jk = I × J and d0 = dn = 1 . We use the concept of bond to connect two adjacent tensors ( Fannes et al. , 1992 ) . The bond dimension dk is defined by : we can see from Equation ( 1 ) that the dk is large in the middle and small on both sides . We present a detailed algorithm for MPS decomposition in Algorithm 1 . It is usually take an odd number of local tensors with MPS . Algorithm 1 MPS decomposition for a matrix . Require : matrix M , the number of local tensors n Ensure : : MPS tensor list { T ( k ) } nk=1 1 : for k = 1→ n− 1 do 2 : M [ I , J ] −→M [ dk−1 × jk , −1 ] 3 : UλV > = SVD ( M ) 4 : U [ dk−1 × jk , dk ] −→ U [ dk−1 , jk , dk ] 5 : T ( k ) : = U 6 : M : = λV > 7 : end for 8 : T ( n ) : = M 9 : Normalization 10 : return { T ( k ) } nk=1 3.2 MPS-BASED LOW-RANK APPROXIMATION .. With the MPS decomposition describe in Equation ( 1 ) , we can exactly decompose a matrix by MPS into the form of a series of products of local tensors and multiply these tensors together to completely reconstruct the original matrix M. We can truncate the k-th bond dimension dk ( see Equation ( 1 ) ) of local tensors to d ′ k for low-rank approximation ( dk > d ′ k ) . Different values for { dk } nk=1 can be set to control the filtering ability of long-range correlation . Definition 1 . ( Local truncation error ) . Let { λj } dkj=1 are the singular values of M [ j1 , . . . , jk , jk+1 , . . . , jn ] . We define the truncation error induced by the k-th bond dimension dk local truncation error k , which can be efficiently computed as k = ∑dk j=dk−d ′ k λj . After defining the local truncation error in Definition 1 , we can derive the upper exact bound of the truncation error of the MPS decomposition by iteration . Theorem 1 . ( Truncation error for MPS-based approximation ) . Let k denoted the local truncation error of k-th bond dimension . The upper exact bound of the truncation error with MPS decomposition can be caclulated by : ||M−MPS ( M ) ||F ≤ √√√√n−1∑ k=1 2k . ( 2 ) The proof can be found in the supplementary materials . Suppose that we have truncated the dimensions of local tensors from { dk } nk=1 to { d ′ k } nk=1 , the compression ratio can be computed by ρ = ∑n k=1 d ′ k−1jkd ′ k∏n k=1 jk . The smaller is the compression ratio , the fewer parameters are kept in MPS representation . | This work proposes matrix product state (MPS) tensor networks for compression of image data. The authors propose to approximate input image matrices (order-2 tensors) with a tensor train comprising order-2 and order-3 tensors and claim possible task agnostic compression of the datasets. Experiments are reported on CIFAR, FashionMNIST for two different compression levels and the MPS compression is shown to fare better than other (simple) baselines. Several important details are unclear/missing in the manuscript making it difficult to fully understand/review this work. | SP:626db54b4dd315f641a7784873c092677534488f |
Image Dataset Compression Based on Matrix Product States | 1 INTRODUCTION . Large-scale datasets consisting of millions of samples are becoming the norm to obtain state-of-the-art machine learning models in several fields including speech enhancement and recognition ( Sun et al. , 2020 ; SainathTN et al. , 2013 ) , computer vision ( Russakovsky et al. , 2015 ) and natural language processing ( Devlin et al. , 2019 ) . At such a scale , the resources needed to store datasets and train neural networks become very large , and training machine learning models on it requires the use of specialized equipment and infrastructure . Therefore , it is the critical problems in machine learning that effectively reduce the size of the dataset as well as maintaining the model performance . An intuitive way is data selection , also known as core-set construction method , i.e. , identifying the most representative training samples , which aims to improve the data efficiency of machine learning techniques . ( Agarwal et al. , 2004 ; Chen , 2009 ; Feldman et al. , 2020 ) , mainly focusing on clustering problems . Another dataset compression method is dataset distillation ( Wang et al. , 2018 ; Zhao et al. , 2021 ) , which can learn a small set of informative images from large training data and improve the weakness of data selection methods . However , these studies mainly adopt the existing sample reduction techniques to dataset compression , which may not be intrinsically appropriate for architecture of the image dataset . For example , most dataset compression methods need to adopt the whole image information , although only a small proportion of information ( i.e. , locality information ) will significantly influence the performance during training . Meanwhile , the performance of models trained the offline compressed datasets on downstream tasks would be restricted . In this paper , we introduce a novel matrix product states ( MPS ) technique ( Fannes et al. , 1992 ) from quantum many-body physics for compressing image dataset . The MPS is an algorithm that factorizes a matrix into a sequential product of local tensors ( i.e. , a multi-way array ) . Here , we call the `` locality of pixel dependencies '' in image with short-range correlation and the `` global dependencies '' in image with long-range correlation . An important merit of the MPS decomposition is that it establishes the structural of classical pixel correlation with quantum entanglement entropy ( Srednicki , 1993 ) in the dataset : the larger the entanglement entropy is , the less short-range correlation is , and vice versa . The information that has larger classical correlation is mainly short-range correlation in the image dataset ( Krizhevsky et al. , 2017 ) . The dataset distillation can Such a property motivates us to think about whether such an MPS can be applied to derive a better dataset compression approach . We can compress the dataset by filtering long-range correlation information in task-agnostic scenarios and use the dataset distillation to supplement the information in task-specific scenarios . To this end , we propose a MPS-based Dataset compression approach , called MPSD , to compress the image dataset , which not only enables deep neural networks to obtain similar performance as on the original dataset but also can be used for different models as well as different types of tasks . We have made two import technical contributions for image dataset compression based on MPS . First , we introduce a new task-agnostic dataset compression procedure that efficiently extracting short-range correlation among pixels . We formulate this goal as the problem of minimizing the difference between multiple low-rank tensors with constraints and the original data samples . We present both theoretical discussion and experimental verification for the effectiveness of this dataset compression strategy . Second , we propose a new task-specific module for information supplementation , tailored for machine learning model . Since different downstream tasks have different information for image datasets , the offline dataset compression does not contain task-specific information . We propose a module based on dataset distillation to make the compressed datasets adaptable to different tasks . To our knowledge , it is the first time that MPS is applied to the image dataset compression , which is well suited for model training and dataset storage . We construct experiments to evaluate the effectiveness of the proposed compression approach for CIFAR , FashinMNSIT , and ImageNet , respectively . Extensive experiments have demonstrated the effectiveness of the proposed approach in dataset compression , especially obtained better model performance ( 3.19 % on average ) than similar methods for the same compression rate . In the rest of the paper , we first review the related work in Section 2 . Then we present MPS decomposition and theoretical analysis about quantum entanglement with classical correlation in Section 3 . Section 4 introduce our proposed MPS-based dataset compression approach . We report experimental results in Section 5 and conclude the paper in Section 6 . We will release code and pre-processed data to reproduce our experiments . 2 RELATED WORK . We review the related works in three aspects . Core-set Construction The core-set construction technique of selecting the valid knowledge through an illuminating or a priori approach ( Toneva et al. , 2019 ; Castro et al. , 2018 ; Aljundi et al. , 2019 ; Sener & Savarese , 2018 ) , either by giving illuminating knowledge about the task or by finding representative samples . The core-set construction define representative criterion in the first ( e.g. , compactness ( Rebuffi et al. , 2017 ; Castro et al. , 2018 ) , forgetfulness ( Toneva et al. , 2019 ) , diversity ( Sener & Savarese , 2018 ; Aljundi et al. , 2019 ) ) , then select representative samples from original dataset based on the criterion , finally use the selected small dataset to train the machine learning model for a downstream task . In contrast , our approach does not require the presence of a representative sample and is a more general approach . Knowledge Distillation Knowledge distillation is a technique of transferring knowledge from a collection of models into a single model ( Hinton et al. , 2015 ; Buciluǎ et al. , 2006 ; Ba & Caruana , 2014 ; Romero et al. , 2015 ) . While network distillation aims to distill the knowledge of multiple networks into a single model , dataset distillation models network parameters as a function of synthetic training data and learn their synthetic data by minimizing the training loss on the original training data and the synthetic training data ( Wang et al. , 2018 ) . We use the idea of knowledge distillation to complement the learning of task-relevant information under different tasks . In other words , our goal is to capture the portion of information in the dataset sample that is valid for training deep neural networks , and to perform a `` selection '' of information in the dataset sample . Tensor-based Matrix Representation . Tensor-based method of matrices is a technique that allows representing dataset samples in the tensor form such that quantum entanglement corresponds to classical correlations between different coarse-grained textures ( Latorre , 2005 ) . Another application is the compression of neural networks . Matrix product operators have been used to compress linear layers of deep neural networks ( Gao et al. , 2020 ) . The idea of reshaping weights of fully connected layers into high-dimensional tensors and encoding them in Tensor Train format was introduced by Novikov et al . ( 2015 ) . In contrast , we represent a dataset sample jointly with multiple low-rank tensors , each low-rank tensor describing the difference in information between the previous other tensors and the original graph ( i.e. , residual information ) . Our work is highly built on these studies , while we have a new perspective by designing the dataset compression algorithm which enables extracted short-range correlation in the image . It is the first time that MPS is applied to image dataset compression , and we make contributions for a novel approach to dataset compression . 3 PRELIMINARY . In this paper , scalars are denoted by lowercase letters ( e.g. , a ) , matrices are denoted by boldface capital letters ( e.g. , M ) , and high-order ( order three or higher ) tensors are denoted by boldface Euler script letters ( e.g. , T ) . A 3-order tensor Ti1 , i2 , i3 can be considered as a ( potentially multi-dimensional ) array with 3 indices { i1 , i2 , i3 } . 3.1 MATRIX PRODUCT STATE . Originating from quantum many-body physics , matrix product states ( MPS ) is a standard algorithm to factorize a matrix into a sequential product of multiple local tensors ( i.e. , a multi-way array ) ( Latorre , 2005 ; Perez-Garcia et al. , 2007 ) . This MPS decomposition establishes the structure of classical pixel correlation with quantum entanglement entropy . Formally , given a matrix M ∈ RI×J , its MPS decomposition into a product of n local tensors can be represented as : MPS ( M ) = n∏ k=1 T ( k ) [ dk−1 , jk , dk ] , dk = min ( k∏ m=1 jm , n∏ m=k+1 jm ) , ( 1 ) where the T ( k ) [ dk−1 , jk , dk ] is a 3-order tensor with size dk−1 × jk × dk in which ∏n k=1 jk = I × J and d0 = dn = 1 . We use the concept of bond to connect two adjacent tensors ( Fannes et al. , 1992 ) . The bond dimension dk is defined by : we can see from Equation ( 1 ) that the dk is large in the middle and small on both sides . We present a detailed algorithm for MPS decomposition in Algorithm 1 . It is usually take an odd number of local tensors with MPS . Algorithm 1 MPS decomposition for a matrix . Require : matrix M , the number of local tensors n Ensure : : MPS tensor list { T ( k ) } nk=1 1 : for k = 1→ n− 1 do 2 : M [ I , J ] −→M [ dk−1 × jk , −1 ] 3 : UλV > = SVD ( M ) 4 : U [ dk−1 × jk , dk ] −→ U [ dk−1 , jk , dk ] 5 : T ( k ) : = U 6 : M : = λV > 7 : end for 8 : T ( n ) : = M 9 : Normalization 10 : return { T ( k ) } nk=1 3.2 MPS-BASED LOW-RANK APPROXIMATION .. With the MPS decomposition describe in Equation ( 1 ) , we can exactly decompose a matrix by MPS into the form of a series of products of local tensors and multiply these tensors together to completely reconstruct the original matrix M. We can truncate the k-th bond dimension dk ( see Equation ( 1 ) ) of local tensors to d ′ k for low-rank approximation ( dk > d ′ k ) . Different values for { dk } nk=1 can be set to control the filtering ability of long-range correlation . Definition 1 . ( Local truncation error ) . Let { λj } dkj=1 are the singular values of M [ j1 , . . . , jk , jk+1 , . . . , jn ] . We define the truncation error induced by the k-th bond dimension dk local truncation error k , which can be efficiently computed as k = ∑dk j=dk−d ′ k λj . After defining the local truncation error in Definition 1 , we can derive the upper exact bound of the truncation error of the MPS decomposition by iteration . Theorem 1 . ( Truncation error for MPS-based approximation ) . Let k denoted the local truncation error of k-th bond dimension . The upper exact bound of the truncation error with MPS decomposition can be caclulated by : ||M−MPS ( M ) ||F ≤ √√√√n−1∑ k=1 2k . ( 2 ) The proof can be found in the supplementary materials . Suppose that we have truncated the dimensions of local tensors from { dk } nk=1 to { d ′ k } nk=1 , the compression ratio can be computed by ρ = ∑n k=1 d ′ k−1jkd ′ k∏n k=1 jk . The smaller is the compression ratio , the fewer parameters are kept in MPS representation . | This paper presented an image compression technique based on matrix product states (MPS) decomposition. After compressing each image, knowledge distillation is applied to compensate the information loss for some specific task. The authors verify the effectiveness of the proposed method on several datasets and neural networks. | SP:626db54b4dd315f641a7784873c092677534488f |
Locality-Based Mini Batching for Graph Neural Networks | 1 Introduction . Modern neural networks commonly use stochastic mini-batch training to leverage large datasets and accelerate convergence . This strategy becomes highly non-trivial for connected data , since creating mini batches requires selecting a meaningful subset from the dataset , despite its connectedness . Graph neural networks ( GNNs ) typically rely on sampling a set of nodes from the graph to resolve this issue . However , graph sampling requires non-contiguous memory accesses , which significantly slows down training for large datasets . This severely limits their applicability to real-world graphs , which often consist of millions or billions of nodes . The main question behind the connected mini-batching problem is : How do we choose the best nodes for constructing the next mini batch ? To answer this question , we introduce the concept of primary and auxiliary nodes . Primary nodes are those for which we compute a prediction in this batch , typically a set of training nodes . Auxiliary nodes only help with computing the primary nodes ’ outputs . This distinction allows us to provide a meaningful neighborhood for every node ’ s prediction , while ignoring irrelevant parts of the graph . Note that primary nodes in one batch can be auxiliary nodes in another batch . This distinction splits the main question into two parts : 1 . How do we choose the primary nodes for a mini batch ? 2 . How do we choose the auxiliary nodes for a given set of primary nodes ? Having split the problem like this , we see that most previous works actually only focus on the second question and just choose a uniformly random subset of nodes as primary nodes ( Hamilton et al. , 2017 ; Zou et al. , 2019 ) . However , the nodes in a graph are not independent , and a better approach can lead to large improvements in runtime . In this work , we propose one simple answer for both questions : Locality . Choosing a set of locally connected nodes is advantageous both from a computational and a predictive perspective . It allows us to share computation between multiple nodes , keeps memory accesses local , and reduces the mini batch ’ s memory footprint . The predictions of most GNNs already leverage the fact that nearby nodes are more important . Previous works have even shown that incorporating locality can improve GNN accuracy ( Klicpera et al. , 2019b ; Huang et al. , 2021 ) . Batching nearby primary nodes together can create synergies since one primary node can leverage another one ’ s auxiliary nodes . More specifically , we propose to use either graph partitioning or node distances to select mini batches of primary nodes , and local clustering to select their auxiliary nodes . We then use the subgraph induced by these nodes as a mini batch . See Fig . 1 for an overview of this process . Importantly , these mini batches can be computed a priori , and loaded from a cache to ensure efficient memory access . During training , we counteract the effect of correlated mini batches with learning rate and batch scheduling . Overall , our method achieves an up to 20x improvement in time per epoch , with similar final accuracy . This faster time per epoch more than makes up for any slow-down in convergence per step . Its speed advantage grows even further for the common setting of low label ratios , since our method avoids computation on irrelevant parts of the graph . As opposed to most previous works , our method can successfully be used for both training and inference . It accelerates inference by up to 100x compared to previous methods that achieve similar accuracy . In summary , our core contributions are : • Locality-based mini batching ( LBMB ) : A general mini-batching method that works for a variety of GNNs and datasets . It substantially accelerates both training and inference without sacrificing accuracy , especially for small label ratios . • We examine the impact of fixed , correlated mini batches on gradient estimation , and propose training methods to mitigate these effects . • An extensive and fair experimental evaluation of scalable training methods , covering four datasets , two GNNs , and both training and inference . 2 Background . Graph neural networks . We consider a graph G = ( V , E ) with node set V and ( possibly directed ) edge set E . N = |V| denotes the number of nodes , E = |E| the number of edges , and A ∈ RN×N the adjacency matrix . GNNs use one embedding per node hu ∈ RH and edge e ( uv ) ∈ RHe , and update them in each layer via message passing between neighboring nodes . Most GNNs can be expressed via the following equations : h ( l+1 ) u = fnode ( h ( l ) u , Agg v∈Nu [ fmsg ( h ( l ) u , h ( l ) v , e ( l ) ( uv ) ) ] ) , ( 1 ) e ( l+1 ) ( uv ) = fedge ( h ( l+1 ) u , h ( l+1 ) v , e ( l ) ( uv ) ) . ( 2 ) The node and edge update functions fnode and fedge , and the message function fmsg can be implemented using e.g . linear layers , multi-layer perceptrons ( MLPs ) , and skip connections . The node ’ s neighborhood Nu is usually defined directly by the graph G ( Kipf & Welling , 2017 ) , but can be generalized to consider larger or even global neighborhoods ( Klicpera et al. , 2019b ; Alon & Yahav , 2021 ) , or feature similarity ( Deng et al. , 2020 ) . The most common aggregation function Agg is summation , but mean , min , standard deviation , and other alternatives have also been explored ( Corso et al. , 2020 ; Geisler et al. , 2020 ) . Edge embeddings e ( uv ) are not present in many GNNs , but some variants rely on them exclusively ( Chen et al. , 2019 ) . GNNs commonly use node features X ∈ RN×F for the input embeddings h ( 0 ) u , but they can also be augmented with positional encodings ( You et al. , 2019 ; Dwivedi et al. , 2020 ) or node IDs ( Vignac et al. , 2020 ) . See App . A for related work in scalable GNNs . 3 Locality-based mini batching . An efficient GNN mini-batching method needs to consider both computational aspects and convergence per gradient step . Previous works have largely been focused on sampling methods that improve GNN convergence , and treated computational issues mostly as an afterthought . By focusing more on computational aspects like memory access times , we can accelerate training by multiple orders of magnitude , and therefore more than make up for any disadvantage in convergence per step . If we skip details like caching the computational perspective is rather simple : Save as many operations and memory accesses as possible while maintaining a good GNN approximation . When the auxiliary nodes of different primary nodes in a batch are shared , we only have to compute their embeddings once and save computation and memory accesses . We therefore aim to group together primary nodes in a way that maximizes the number of shared auxiliary nodes . In locality-based mini batching ( LBMB ) , we do this in two steps : 1 . Obtain the k most important auxiliary nodes for each primary node . Batch together primary nodes so that the union of their auxiliary nodes is smallest , yielding the primary node partition PI . 2 . Select the most important auxiliary nodes SII for each subset of primary nodes SI ∈ PI . This process yields a single , fixed set of batches . We thus only need to perform it once during preprocessing . We then cache each mini batch in consecutive blocks of memory , thereby circumventing expensive random data accesses . This significantly accelerates training , allows efficient distributed training , and enables even expensive node selection procedures . In contrast , most previous methods select both primary and auxiliary nodes randomly in each epoch ( Ying et al. , 2018 ; Zeng et al. , 2020 ) , which incurs significant overhead . Our experiments show that our more efficient memory accesses clearly outweigh the slightly better gradient estimates gained from re-sampling in each epoch ( see Sec . 5 ) . We will next describe the details of LBMB ’ s two main steps . 3.1 Primary node partitioning . Optimal partitioning . In this step we are interested in finding the partition PI with the highest number of shared auxiliary nodes . Naïvely , we could find PI by comparing the auxiliary node overlaps achieved by every possible partition . This is clearly intractable since the number of partitions increases exponentially with the number of primary nodes . An obvious way of accelerating this is a greedy approach , in which we iteratively put those nodes into a batch that has the largest overlap . Unfortunately , this would still require computing the overlap for every pair of primary nodes . This requires a quadratic runtime O ( N2 ) , which is intractable for large datasets . We must therefore rely on heuristics to obtain a scalable , well-performing primary node partitioning algorithms . Distance-based partitioning . We propose two methods that leverage graph locality as a heuristic for effective node partitioning . The first is based on node distances . In this approach we first compute the pairwise node distances between nodes that are close in the graph . A common node distance measure in undirected graphs are random walks with restart , or personalized PageRank ( PPR ) ( Page et al. , 1998 ) . The PPR matrix is given by Πppr = α ( IN − ( 1− α ) D−1A ) −1 , ( 3 ) with the teleport probability α ∈ ( 0 , 1 ] and the diagonal degree matrix Dij = ∑ k Aikδij . The proximity between nodes u and v is then given by Πppruv . Calculating this inverse is obviously infeasible . However , we can approximate Πppr with a sparse matrix Π̃ppr in time O ( 1εα ) per column , with error εdeg ( u ) ( Andersen et al. , 2006 ) . Next , we greedily construct the partition PI from Π̃ppr . To do so , we start by putting every node u into a separate batch { u } . We then sort all elements in Π̃ppr by magnitude , independent of their row or column . We scan over these values in descending order , considering the value ’ s indices ( u , v ) and merging the batches containing the two nodes . Finally , we randomly merge any small leftover batches . We stay within a memory constraint by only merging batches that stay below a maximum batch size . Note that the resulting partition is unbalanced . This method achieves well-overlapping batches and can efficiently add incrementally incoming primary nodes , e.g . in a streaming setting . Our experiments show that this method achieves a good compromise between well-overlapping batches and good gradients for training ( see Sec . 5 ) . Graph partitioning . For our second method , we note that partitioning primary nodes into overlapping mini batches is closely connected to partitioning graphs . We can thus leverage the extensive amount of research on this topic by using the METIS graph partitioning algorithm ( Karypis & Kumar , 1998 ) to find a partition of primary nodes PI . Note that this approach completely skips step 1 in the above LBMB process . We found that graph partitioning yields roughly a two times higher overlap of auxiliary nodes than distance-based partitioning , thus leading to significantly more efficient batches . However , it also introduces a strong bias in batch selection that we found to be detrimental for training ( see Sec . 5 ) . Note that LBMB with graph partitioning is closely related to Cluster-GCN ( Chiang et al. , 2019 ) . However , in contrast to Cluster-GCN our method ignores irrelevant parts of the graph and can obtain overlapping mini batches . This significantly accelerates training on small training sets and improves the accuracy of primary nodes close to the partition boundary . | This paper studies the training of graph neural networks and proposes a mini batching scheme that circumvents the expensive cost of traditional sampling approaches due to random memory access. The authors construct deterministic mini batches so that they can be laid out in consecutive memory, which speeds up training. The authors empirically show that such a mini batching scheme significantly improves training and inference time, at the cost of precomputation. | SP:f6b58216aeb51c98eed64040e97daa37184a5940 |
Locality-Based Mini Batching for Graph Neural Networks | 1 Introduction . Modern neural networks commonly use stochastic mini-batch training to leverage large datasets and accelerate convergence . This strategy becomes highly non-trivial for connected data , since creating mini batches requires selecting a meaningful subset from the dataset , despite its connectedness . Graph neural networks ( GNNs ) typically rely on sampling a set of nodes from the graph to resolve this issue . However , graph sampling requires non-contiguous memory accesses , which significantly slows down training for large datasets . This severely limits their applicability to real-world graphs , which often consist of millions or billions of nodes . The main question behind the connected mini-batching problem is : How do we choose the best nodes for constructing the next mini batch ? To answer this question , we introduce the concept of primary and auxiliary nodes . Primary nodes are those for which we compute a prediction in this batch , typically a set of training nodes . Auxiliary nodes only help with computing the primary nodes ’ outputs . This distinction allows us to provide a meaningful neighborhood for every node ’ s prediction , while ignoring irrelevant parts of the graph . Note that primary nodes in one batch can be auxiliary nodes in another batch . This distinction splits the main question into two parts : 1 . How do we choose the primary nodes for a mini batch ? 2 . How do we choose the auxiliary nodes for a given set of primary nodes ? Having split the problem like this , we see that most previous works actually only focus on the second question and just choose a uniformly random subset of nodes as primary nodes ( Hamilton et al. , 2017 ; Zou et al. , 2019 ) . However , the nodes in a graph are not independent , and a better approach can lead to large improvements in runtime . In this work , we propose one simple answer for both questions : Locality . Choosing a set of locally connected nodes is advantageous both from a computational and a predictive perspective . It allows us to share computation between multiple nodes , keeps memory accesses local , and reduces the mini batch ’ s memory footprint . The predictions of most GNNs already leverage the fact that nearby nodes are more important . Previous works have even shown that incorporating locality can improve GNN accuracy ( Klicpera et al. , 2019b ; Huang et al. , 2021 ) . Batching nearby primary nodes together can create synergies since one primary node can leverage another one ’ s auxiliary nodes . More specifically , we propose to use either graph partitioning or node distances to select mini batches of primary nodes , and local clustering to select their auxiliary nodes . We then use the subgraph induced by these nodes as a mini batch . See Fig . 1 for an overview of this process . Importantly , these mini batches can be computed a priori , and loaded from a cache to ensure efficient memory access . During training , we counteract the effect of correlated mini batches with learning rate and batch scheduling . Overall , our method achieves an up to 20x improvement in time per epoch , with similar final accuracy . This faster time per epoch more than makes up for any slow-down in convergence per step . Its speed advantage grows even further for the common setting of low label ratios , since our method avoids computation on irrelevant parts of the graph . As opposed to most previous works , our method can successfully be used for both training and inference . It accelerates inference by up to 100x compared to previous methods that achieve similar accuracy . In summary , our core contributions are : • Locality-based mini batching ( LBMB ) : A general mini-batching method that works for a variety of GNNs and datasets . It substantially accelerates both training and inference without sacrificing accuracy , especially for small label ratios . • We examine the impact of fixed , correlated mini batches on gradient estimation , and propose training methods to mitigate these effects . • An extensive and fair experimental evaluation of scalable training methods , covering four datasets , two GNNs , and both training and inference . 2 Background . Graph neural networks . We consider a graph G = ( V , E ) with node set V and ( possibly directed ) edge set E . N = |V| denotes the number of nodes , E = |E| the number of edges , and A ∈ RN×N the adjacency matrix . GNNs use one embedding per node hu ∈ RH and edge e ( uv ) ∈ RHe , and update them in each layer via message passing between neighboring nodes . Most GNNs can be expressed via the following equations : h ( l+1 ) u = fnode ( h ( l ) u , Agg v∈Nu [ fmsg ( h ( l ) u , h ( l ) v , e ( l ) ( uv ) ) ] ) , ( 1 ) e ( l+1 ) ( uv ) = fedge ( h ( l+1 ) u , h ( l+1 ) v , e ( l ) ( uv ) ) . ( 2 ) The node and edge update functions fnode and fedge , and the message function fmsg can be implemented using e.g . linear layers , multi-layer perceptrons ( MLPs ) , and skip connections . The node ’ s neighborhood Nu is usually defined directly by the graph G ( Kipf & Welling , 2017 ) , but can be generalized to consider larger or even global neighborhoods ( Klicpera et al. , 2019b ; Alon & Yahav , 2021 ) , or feature similarity ( Deng et al. , 2020 ) . The most common aggregation function Agg is summation , but mean , min , standard deviation , and other alternatives have also been explored ( Corso et al. , 2020 ; Geisler et al. , 2020 ) . Edge embeddings e ( uv ) are not present in many GNNs , but some variants rely on them exclusively ( Chen et al. , 2019 ) . GNNs commonly use node features X ∈ RN×F for the input embeddings h ( 0 ) u , but they can also be augmented with positional encodings ( You et al. , 2019 ; Dwivedi et al. , 2020 ) or node IDs ( Vignac et al. , 2020 ) . See App . A for related work in scalable GNNs . 3 Locality-based mini batching . An efficient GNN mini-batching method needs to consider both computational aspects and convergence per gradient step . Previous works have largely been focused on sampling methods that improve GNN convergence , and treated computational issues mostly as an afterthought . By focusing more on computational aspects like memory access times , we can accelerate training by multiple orders of magnitude , and therefore more than make up for any disadvantage in convergence per step . If we skip details like caching the computational perspective is rather simple : Save as many operations and memory accesses as possible while maintaining a good GNN approximation . When the auxiliary nodes of different primary nodes in a batch are shared , we only have to compute their embeddings once and save computation and memory accesses . We therefore aim to group together primary nodes in a way that maximizes the number of shared auxiliary nodes . In locality-based mini batching ( LBMB ) , we do this in two steps : 1 . Obtain the k most important auxiliary nodes for each primary node . Batch together primary nodes so that the union of their auxiliary nodes is smallest , yielding the primary node partition PI . 2 . Select the most important auxiliary nodes SII for each subset of primary nodes SI ∈ PI . This process yields a single , fixed set of batches . We thus only need to perform it once during preprocessing . We then cache each mini batch in consecutive blocks of memory , thereby circumventing expensive random data accesses . This significantly accelerates training , allows efficient distributed training , and enables even expensive node selection procedures . In contrast , most previous methods select both primary and auxiliary nodes randomly in each epoch ( Ying et al. , 2018 ; Zeng et al. , 2020 ) , which incurs significant overhead . Our experiments show that our more efficient memory accesses clearly outweigh the slightly better gradient estimates gained from re-sampling in each epoch ( see Sec . 5 ) . We will next describe the details of LBMB ’ s two main steps . 3.1 Primary node partitioning . Optimal partitioning . In this step we are interested in finding the partition PI with the highest number of shared auxiliary nodes . Naïvely , we could find PI by comparing the auxiliary node overlaps achieved by every possible partition . This is clearly intractable since the number of partitions increases exponentially with the number of primary nodes . An obvious way of accelerating this is a greedy approach , in which we iteratively put those nodes into a batch that has the largest overlap . Unfortunately , this would still require computing the overlap for every pair of primary nodes . This requires a quadratic runtime O ( N2 ) , which is intractable for large datasets . We must therefore rely on heuristics to obtain a scalable , well-performing primary node partitioning algorithms . Distance-based partitioning . We propose two methods that leverage graph locality as a heuristic for effective node partitioning . The first is based on node distances . In this approach we first compute the pairwise node distances between nodes that are close in the graph . A common node distance measure in undirected graphs are random walks with restart , or personalized PageRank ( PPR ) ( Page et al. , 1998 ) . The PPR matrix is given by Πppr = α ( IN − ( 1− α ) D−1A ) −1 , ( 3 ) with the teleport probability α ∈ ( 0 , 1 ] and the diagonal degree matrix Dij = ∑ k Aikδij . The proximity between nodes u and v is then given by Πppruv . Calculating this inverse is obviously infeasible . However , we can approximate Πppr with a sparse matrix Π̃ppr in time O ( 1εα ) per column , with error εdeg ( u ) ( Andersen et al. , 2006 ) . Next , we greedily construct the partition PI from Π̃ppr . To do so , we start by putting every node u into a separate batch { u } . We then sort all elements in Π̃ppr by magnitude , independent of their row or column . We scan over these values in descending order , considering the value ’ s indices ( u , v ) and merging the batches containing the two nodes . Finally , we randomly merge any small leftover batches . We stay within a memory constraint by only merging batches that stay below a maximum batch size . Note that the resulting partition is unbalanced . This method achieves well-overlapping batches and can efficiently add incrementally incoming primary nodes , e.g . in a streaming setting . Our experiments show that this method achieves a good compromise between well-overlapping batches and good gradients for training ( see Sec . 5 ) . Graph partitioning . For our second method , we note that partitioning primary nodes into overlapping mini batches is closely connected to partitioning graphs . We can thus leverage the extensive amount of research on this topic by using the METIS graph partitioning algorithm ( Karypis & Kumar , 1998 ) to find a partition of primary nodes PI . Note that this approach completely skips step 1 in the above LBMB process . We found that graph partitioning yields roughly a two times higher overlap of auxiliary nodes than distance-based partitioning , thus leading to significantly more efficient batches . However , it also introduces a strong bias in batch selection that we found to be detrimental for training ( see Sec . 5 ) . Note that LBMB with graph partitioning is closely related to Cluster-GCN ( Chiang et al. , 2019 ) . However , in contrast to Cluster-GCN our method ignores irrelevant parts of the graph and can obtain overlapping mini batches . This significantly accelerates training on small training sets and improves the accuracy of primary nodes close to the partition boundary . | The paper addresses the task of training graph neural networks on large graphs. The authors propose a strategy to extract mini-batches that are locally connected. The technique involves dividing nodes into primary and auxiliary nodes, where the primary nodes are those for which an prediction is formed during the batch (usually training nodes). The auxiliary nodes are used for computation of the predictions. The authors propose two procedures for selecting the primary nodes in a minibatch. One uses distance-based partitioning (a greedy procedure building on personalized page rank as a distance measure). The other applies graph partitioning (METIS). After the primary nodes have been partitioned, auxiliary nodes are selected using local clustering techniques (a form of topic-sensitive PageRank is employed). The authors observe that this construction of mini-batches is also useful in the inference process. The paper proposes methods to mitigate the effect of the introduction of correlation in the gradients that arises due to the proximity-based partitioning. There are also strategies to prevent the optimizer from processing consecutive batches that are very similar. The paper provides experimental results for GAT and GCN for four large graph datasets, with a comparison to four baselines. The results provide evidence that the proposed strategy leads to a significant reduction in training time and also has a major benefit during inference. The authors the impact of training set size and conduct an ablation study to verify that all proposed aspects of the proposed method yield performance improvement. | SP:f6b58216aeb51c98eed64040e97daa37184a5940 |
Locality-Based Mini Batching for Graph Neural Networks | 1 Introduction . Modern neural networks commonly use stochastic mini-batch training to leverage large datasets and accelerate convergence . This strategy becomes highly non-trivial for connected data , since creating mini batches requires selecting a meaningful subset from the dataset , despite its connectedness . Graph neural networks ( GNNs ) typically rely on sampling a set of nodes from the graph to resolve this issue . However , graph sampling requires non-contiguous memory accesses , which significantly slows down training for large datasets . This severely limits their applicability to real-world graphs , which often consist of millions or billions of nodes . The main question behind the connected mini-batching problem is : How do we choose the best nodes for constructing the next mini batch ? To answer this question , we introduce the concept of primary and auxiliary nodes . Primary nodes are those for which we compute a prediction in this batch , typically a set of training nodes . Auxiliary nodes only help with computing the primary nodes ’ outputs . This distinction allows us to provide a meaningful neighborhood for every node ’ s prediction , while ignoring irrelevant parts of the graph . Note that primary nodes in one batch can be auxiliary nodes in another batch . This distinction splits the main question into two parts : 1 . How do we choose the primary nodes for a mini batch ? 2 . How do we choose the auxiliary nodes for a given set of primary nodes ? Having split the problem like this , we see that most previous works actually only focus on the second question and just choose a uniformly random subset of nodes as primary nodes ( Hamilton et al. , 2017 ; Zou et al. , 2019 ) . However , the nodes in a graph are not independent , and a better approach can lead to large improvements in runtime . In this work , we propose one simple answer for both questions : Locality . Choosing a set of locally connected nodes is advantageous both from a computational and a predictive perspective . It allows us to share computation between multiple nodes , keeps memory accesses local , and reduces the mini batch ’ s memory footprint . The predictions of most GNNs already leverage the fact that nearby nodes are more important . Previous works have even shown that incorporating locality can improve GNN accuracy ( Klicpera et al. , 2019b ; Huang et al. , 2021 ) . Batching nearby primary nodes together can create synergies since one primary node can leverage another one ’ s auxiliary nodes . More specifically , we propose to use either graph partitioning or node distances to select mini batches of primary nodes , and local clustering to select their auxiliary nodes . We then use the subgraph induced by these nodes as a mini batch . See Fig . 1 for an overview of this process . Importantly , these mini batches can be computed a priori , and loaded from a cache to ensure efficient memory access . During training , we counteract the effect of correlated mini batches with learning rate and batch scheduling . Overall , our method achieves an up to 20x improvement in time per epoch , with similar final accuracy . This faster time per epoch more than makes up for any slow-down in convergence per step . Its speed advantage grows even further for the common setting of low label ratios , since our method avoids computation on irrelevant parts of the graph . As opposed to most previous works , our method can successfully be used for both training and inference . It accelerates inference by up to 100x compared to previous methods that achieve similar accuracy . In summary , our core contributions are : • Locality-based mini batching ( LBMB ) : A general mini-batching method that works for a variety of GNNs and datasets . It substantially accelerates both training and inference without sacrificing accuracy , especially for small label ratios . • We examine the impact of fixed , correlated mini batches on gradient estimation , and propose training methods to mitigate these effects . • An extensive and fair experimental evaluation of scalable training methods , covering four datasets , two GNNs , and both training and inference . 2 Background . Graph neural networks . We consider a graph G = ( V , E ) with node set V and ( possibly directed ) edge set E . N = |V| denotes the number of nodes , E = |E| the number of edges , and A ∈ RN×N the adjacency matrix . GNNs use one embedding per node hu ∈ RH and edge e ( uv ) ∈ RHe , and update them in each layer via message passing between neighboring nodes . Most GNNs can be expressed via the following equations : h ( l+1 ) u = fnode ( h ( l ) u , Agg v∈Nu [ fmsg ( h ( l ) u , h ( l ) v , e ( l ) ( uv ) ) ] ) , ( 1 ) e ( l+1 ) ( uv ) = fedge ( h ( l+1 ) u , h ( l+1 ) v , e ( l ) ( uv ) ) . ( 2 ) The node and edge update functions fnode and fedge , and the message function fmsg can be implemented using e.g . linear layers , multi-layer perceptrons ( MLPs ) , and skip connections . The node ’ s neighborhood Nu is usually defined directly by the graph G ( Kipf & Welling , 2017 ) , but can be generalized to consider larger or even global neighborhoods ( Klicpera et al. , 2019b ; Alon & Yahav , 2021 ) , or feature similarity ( Deng et al. , 2020 ) . The most common aggregation function Agg is summation , but mean , min , standard deviation , and other alternatives have also been explored ( Corso et al. , 2020 ; Geisler et al. , 2020 ) . Edge embeddings e ( uv ) are not present in many GNNs , but some variants rely on them exclusively ( Chen et al. , 2019 ) . GNNs commonly use node features X ∈ RN×F for the input embeddings h ( 0 ) u , but they can also be augmented with positional encodings ( You et al. , 2019 ; Dwivedi et al. , 2020 ) or node IDs ( Vignac et al. , 2020 ) . See App . A for related work in scalable GNNs . 3 Locality-based mini batching . An efficient GNN mini-batching method needs to consider both computational aspects and convergence per gradient step . Previous works have largely been focused on sampling methods that improve GNN convergence , and treated computational issues mostly as an afterthought . By focusing more on computational aspects like memory access times , we can accelerate training by multiple orders of magnitude , and therefore more than make up for any disadvantage in convergence per step . If we skip details like caching the computational perspective is rather simple : Save as many operations and memory accesses as possible while maintaining a good GNN approximation . When the auxiliary nodes of different primary nodes in a batch are shared , we only have to compute their embeddings once and save computation and memory accesses . We therefore aim to group together primary nodes in a way that maximizes the number of shared auxiliary nodes . In locality-based mini batching ( LBMB ) , we do this in two steps : 1 . Obtain the k most important auxiliary nodes for each primary node . Batch together primary nodes so that the union of their auxiliary nodes is smallest , yielding the primary node partition PI . 2 . Select the most important auxiliary nodes SII for each subset of primary nodes SI ∈ PI . This process yields a single , fixed set of batches . We thus only need to perform it once during preprocessing . We then cache each mini batch in consecutive blocks of memory , thereby circumventing expensive random data accesses . This significantly accelerates training , allows efficient distributed training , and enables even expensive node selection procedures . In contrast , most previous methods select both primary and auxiliary nodes randomly in each epoch ( Ying et al. , 2018 ; Zeng et al. , 2020 ) , which incurs significant overhead . Our experiments show that our more efficient memory accesses clearly outweigh the slightly better gradient estimates gained from re-sampling in each epoch ( see Sec . 5 ) . We will next describe the details of LBMB ’ s two main steps . 3.1 Primary node partitioning . Optimal partitioning . In this step we are interested in finding the partition PI with the highest number of shared auxiliary nodes . Naïvely , we could find PI by comparing the auxiliary node overlaps achieved by every possible partition . This is clearly intractable since the number of partitions increases exponentially with the number of primary nodes . An obvious way of accelerating this is a greedy approach , in which we iteratively put those nodes into a batch that has the largest overlap . Unfortunately , this would still require computing the overlap for every pair of primary nodes . This requires a quadratic runtime O ( N2 ) , which is intractable for large datasets . We must therefore rely on heuristics to obtain a scalable , well-performing primary node partitioning algorithms . Distance-based partitioning . We propose two methods that leverage graph locality as a heuristic for effective node partitioning . The first is based on node distances . In this approach we first compute the pairwise node distances between nodes that are close in the graph . A common node distance measure in undirected graphs are random walks with restart , or personalized PageRank ( PPR ) ( Page et al. , 1998 ) . The PPR matrix is given by Πppr = α ( IN − ( 1− α ) D−1A ) −1 , ( 3 ) with the teleport probability α ∈ ( 0 , 1 ] and the diagonal degree matrix Dij = ∑ k Aikδij . The proximity between nodes u and v is then given by Πppruv . Calculating this inverse is obviously infeasible . However , we can approximate Πppr with a sparse matrix Π̃ppr in time O ( 1εα ) per column , with error εdeg ( u ) ( Andersen et al. , 2006 ) . Next , we greedily construct the partition PI from Π̃ppr . To do so , we start by putting every node u into a separate batch { u } . We then sort all elements in Π̃ppr by magnitude , independent of their row or column . We scan over these values in descending order , considering the value ’ s indices ( u , v ) and merging the batches containing the two nodes . Finally , we randomly merge any small leftover batches . We stay within a memory constraint by only merging batches that stay below a maximum batch size . Note that the resulting partition is unbalanced . This method achieves well-overlapping batches and can efficiently add incrementally incoming primary nodes , e.g . in a streaming setting . Our experiments show that this method achieves a good compromise between well-overlapping batches and good gradients for training ( see Sec . 5 ) . Graph partitioning . For our second method , we note that partitioning primary nodes into overlapping mini batches is closely connected to partitioning graphs . We can thus leverage the extensive amount of research on this topic by using the METIS graph partitioning algorithm ( Karypis & Kumar , 1998 ) to find a partition of primary nodes PI . Note that this approach completely skips step 1 in the above LBMB process . We found that graph partitioning yields roughly a two times higher overlap of auxiliary nodes than distance-based partitioning , thus leading to significantly more efficient batches . However , it also introduces a strong bias in batch selection that we found to be detrimental for training ( see Sec . 5 ) . Note that LBMB with graph partitioning is closely related to Cluster-GCN ( Chiang et al. , 2019 ) . However , in contrast to Cluster-GCN our method ignores irrelevant parts of the graph and can obtain overlapping mini batches . This significantly accelerates training on small training sets and improves the accuracy of primary nodes close to the partition boundary . | This paper proposes locality-based mini batching (LBMB), a method for extracting batches for GNN training. LBMB aims to reduce the computation cost of GNN training by treating primary (output) nodes and auxiliary nodes separately. LBMB can be used for both training and inference, and speeds up both tasks substantially while maintaining comparable accuracy. | SP:f6b58216aeb51c98eed64040e97daa37184a5940 |
FedGEMS: Federated Learning of Larger Server Models via Selective Knowledge Fusion | 1 INTRODUCTION . Nowadays , powerful models with tremendous parameters trained with sufficient computation power are indispensable in Artificial Intelligence ( AI ) , such as AlphaGo ( Silver et al. , 2016 ) , Alphafold ( Senior et al. , 2020 ) and GPT-3 ( Brown et al. , 2020 ) . However , billions of resource-constrained mobile and IoT devices have become the primary data source to empower the intelligence of many applications ( Bonawitz et al. , 2019 ; Brisimi et al. , 2018 ; Li et al. , 2019a ) . Due to privacy , security , regulatory and economic considerations ( Voigt & Von dem Bussche , 2017 ; Li et al. , 2018 ) , it is increasingly difficult and undesirable to pool data together for centralized training . Therefore , federated learning approaches ( McMahan et al. , 2017 ; Smith et al. , 2017 ; Caldas et al. , 2018 ; Kairouz et al. , 2019 ; Yang et al. , 2019 ) allow all the participants to reap the benefits of shared models without sharing private data have become increasingly attractive . In a typical Federated Learning ( FL ) training process using FedAvg ( McMahan et al. , 2017 ) , each client sends its model parameters or gradients to a central server , which aggregates all clients ’ updates and sends the aggregated parameters back to the clients to update their local model . Because FL places computation burden on edge devices , its learnability is largely limited by the edge resources , on which training large models is often impossible . On the other hand , the server only directly aggregates the clients ’ models and its computation power is not fully exploited . In this work , we investigate the paradigm where the server adopts a larger model in FL . Here we use larger server model , or GEM to denote the setting where the size of the server model is larger than that of the clients ( See Table 1 ) . Making FL trainable with GEM is desirable to break through model capacity and enable collaborative knowledge fusion and accumulation at server . One feasible approach to bridge FL with GEM is through knowledge distillation ( KD ) ( Hinton et al. , 2015 ) , where clients and the server transfer knowledge through logits . For example , FedGKT ( He et al. , 2020a ) adopts a server model as a downstream sub-model and transfers knowledge directly from smaller edge models . In FedGKT the large server model essentially learns from one small teacher at a time and doesn ’ t learn consensus knowledge from multiple teachers . In FL , KD has also been applied ( Li & Wang , 2019 ; Lin et al. , 2020 ) to transfer ensemble knowledge of clients through consensus of output logits rather than parameters . These works either assume no model on the server ( Li & Wang , 2019 ) or a prototype server model of the same architecture as the client model ( Lin et al. , 2020 ) . Contributions . In this paper , we first propose a new paradigm to bridge FL with GEM , termed FedGEM , which can learn effectively and efficiently from fused knowledge by resource-constrained clients , and is also able to transfer knowledge back to clients with heterogeneous architectures . To further prevent negative and malicious knowledge transfer , we carefully design a selection and weighting criterion to enhance our knowledge transfer protocol , termed FedGEMS . We demonstrate with extensive experiments on various image classification tasks that our results significantly surpass the previous state-of-the-art baselines in both homogeneous and heterogeneous settings . Furthermore , thanks to our effective and selective protocol , our framework improves the robustness of FL on various malicious attacks and significantly reduces the overall communication . In summary , we propose a new framework to bridge FL with larger server models and simultaneously consolidate several benefits altogether , including superior performance , robustness of the whole system , and lower communication cost . 2 RELATED WORK . Federated Learning with GEM . FL is a collaborating learning framework without sharing private data among the clients . The classical method FedAvg ( McMahan et al. , 2017 ) and its recent variations ( Mohri et al. , 2019 ; Lin et al. , 2018 ; Li et al. , 2019b ) directly transfer the clients ’ parameters or gradients to the server nodes . To tackle the performance bottleneck by training resource-constrained clients in FL , there are two lines of work to bridge FL with GEM . The first line of studies adopts model compression ( Han et al. , 2015 ; He et al. , 2018 ; Yang et al. , 2018 ) , manually designed architectures ( Howard et al. , 2017 ; Zhang et al. , 2018 ; Iandola et al. , 2016 ) or even efficient neural architecture search ( Tan & Le , 2019 ; Wu et al. , 2019 ) to adapt a GEM to on-device learning . Another line is adopting knowledge distillation ( Hinton et al. , 2015 ) to transfer knowledge through output logits rather than parameters between a client model and a GEM ( He et al. , 2020a ) . However , FedGKT ( He et al. , 2020a ) ’ s focus is to transfer knowledge directly from clients to server without considering the consensus knowledge fused from clients . Therefore its performance is limited . Federated Learning with Knowledge Distillation . In fact , ensemble knowledge distillation has been shown to boost collaborative performance in FL . Specifically , FedMD ( Li & Wang , 2019 ) adopts a labeled public dataset and averaged logits to transfer knowledge . FedDF ( Lin et al. , 2020 ) proposes ensemble distillation for model fusion by aggregating both logits and models from clients . In addition , KD is used to enhance robustness in FL . Cronus ( Chang et al. , 2019 ) and DS-FL ( Itahara et al. , 2020 ) utilize a public dataset with soft labels jointly with local private dataset for local training , and combine with Cronus or entropy reduction aggregation , respectively , to defend against poisoning attacks in FL . In this work , we propose to exploit the benefit of both a larger server model and client knowledge fusion . Our work is also motivated by the recent studies in KD ( Qin et al. , 2021 ; You et al. , 2017 ; Li et al. , 2021 ; Yuan et al. , 2021 ; Wang et al. , 2021 ) , which show that student models can have larger capacities by learning from multiple teacher models . 3 METHODOLOGY . 3.1 PRELIMINARIES . We assume that there are K clients in federated learning process . The kth client has its own private labeled dataset Xk : = { ( xki , yki ) } N k i=1 that can be drawn from the same or different distribution , where xki is the ith training sample in the kth client model , y k i is its corresponding ground truth label , and Nk denotes the total number of samples . Each client also trains its own model fkc which can be of the same architecture ( homogeneous ) or different architecture ( heterogeneous ) . There is also a public dataset X0 : = { ( x0i , y0i ) } N 0 i=1 which is accessible to both server and clients . On the server side , we assume that there is a larger server model to be trained , denoted as fs . Ls and Lkc denotes the logit tensors from the server and the kth client model . 3.2 FEDGEMS FRAMEWORK . We illustrate our overall framework in Fig . 1 and summarize our training algorithm in Algorithm 1 . FedGEM . During each communication round , all client models first use private datasets to train several epochs , then transfer the predicted logits on public dataset as knowledge to the server model . The server model aggregates the clients ’ logits and then trains its server model with the guidance of fused knowledge . After training , the server model then transfers its logits back to all client models . Finally , each client model distills knowledge from received logits and continues their training on private datasets . Continuously iterating over multiple rounds , both the server and client models mutually learn knowledge from each other . Through this alternating training processing , we can obtain a large server model with accumulated knowledge and an ensemble of high-performance client models . FedGEMS : In FedGEMS , the server adopts a selection and weighting criterion to select knowledgeable clients for aggregation , which is detailed in the next section 3.3 . To illustrate the features of our framework , we compare it with the related studies of KD-based methods in federated learning in Table 1 on the following aspects : whether they use a labeled , unlabeled or no public dataset , whether client models can have heterogeneous architectures , the aggregation strategy on the server , and whether the server has a larger model . Note FedGEM can be regarded as placing a larger server model on top of the FedMD framework while keeping other settings the same . 3.3 SELECTIVE KNOWLEDGE FUSION IN SERVER MODEL . Since clients ’ knowledge may negatively impact the server model in the heterogeneous or malicious setting and vice versa , we further propose selective strategies on both server and client sides to enforce positive knowledge fusion into the large server model as shown in Fig . 2 . Algorithm 1 Illustration of the Framework of FedGEMS . T is the number of communication rounds ; X0 and Y 0 denotes the images and their corresponding labels in public dataset ; Xk and Y k denotes the private dataset in the kth client model ; fs and fkc are the server with parameter Ws and the kth client model with parameters W kc ; LGlobal indicates the global logits to save correct logits ; Ls and Lkc are the logit tensors from the server and the kth client model . 1 : ServerExecute ( ) : 2 : for each round t = 1 , 2 , ... , T do 3 : // Selective Knowldge Fusion 4 : for idx , x0 , y0 ∈ { X0 , Y 0 } do 5 : if fs ( Ws ; x0 ) == y0 then 6 : Ls ← LS1 ( x0 , y0 ) ▷ in Eq . 1 7 : LGlobal [ idx ] ← Ls [ idx ] 8 : else if idx in LGlobal then 9 : Ls ← LS2 ( x0 , y0 , LGlobal ) ▷ in Eq . 2 10 : else 11 : Lc ← ClientSelect ( idx ) 12 : Ls ← LS3 ( x0 , y0 , Lc ) ▷ in Eq . 3 , 4 , 5 13 : Ws ←Ws − ηk∇Ls 14 : Ls [ idx ] ← fs ( Ws ; x0 ) 15 : // Transfer Knowledge to Client Models 16 : ClientTrain ( Ls ) 17 : ClientTrain ( Ls ) : 18 : for each client kth in parallel do 19 : // Knowledge Distillation on Clients 20 : for x0 , y0 ∈ { X0 , Ls , Y 0 } do 21 : Lc ← LC ( x0 , y0 , Ls ) ▷ in Eq . 6 22 : W kc ←W kc − ηk∇Lc 23 : // Local Training on Clients 24 : for xk , yk ∈ { Xk , Y k } do 25 : Lc ← LCE ( xk , yk ) 26 : W kc ←W kc − ηk∇Lc 27 : ClientSelect ( idx ) : 28 : // Selective Transfer to Server 29 : for each client kth in parallel do 30 : L0c [ idx ] ← fkc ( W kc ; x0 [ idx ] ) 31 : Return Lc to server | This paper aims to enable training of higher accuracy models by training a high-capacity model at the server and lower capacity models at the clients. Knowledge is shared via distillation on a weighted average of logits provided by the clients, rather than by averaging model parameters or model differences. The approach assumes the existence of a labeled public dataset. Experiments illustrate the promise of this approach. | SP:33bba9b39df17fa53e059694d654d17a99847349 |
FedGEMS: Federated Learning of Larger Server Models via Selective Knowledge Fusion | 1 INTRODUCTION . Nowadays , powerful models with tremendous parameters trained with sufficient computation power are indispensable in Artificial Intelligence ( AI ) , such as AlphaGo ( Silver et al. , 2016 ) , Alphafold ( Senior et al. , 2020 ) and GPT-3 ( Brown et al. , 2020 ) . However , billions of resource-constrained mobile and IoT devices have become the primary data source to empower the intelligence of many applications ( Bonawitz et al. , 2019 ; Brisimi et al. , 2018 ; Li et al. , 2019a ) . Due to privacy , security , regulatory and economic considerations ( Voigt & Von dem Bussche , 2017 ; Li et al. , 2018 ) , it is increasingly difficult and undesirable to pool data together for centralized training . Therefore , federated learning approaches ( McMahan et al. , 2017 ; Smith et al. , 2017 ; Caldas et al. , 2018 ; Kairouz et al. , 2019 ; Yang et al. , 2019 ) allow all the participants to reap the benefits of shared models without sharing private data have become increasingly attractive . In a typical Federated Learning ( FL ) training process using FedAvg ( McMahan et al. , 2017 ) , each client sends its model parameters or gradients to a central server , which aggregates all clients ’ updates and sends the aggregated parameters back to the clients to update their local model . Because FL places computation burden on edge devices , its learnability is largely limited by the edge resources , on which training large models is often impossible . On the other hand , the server only directly aggregates the clients ’ models and its computation power is not fully exploited . In this work , we investigate the paradigm where the server adopts a larger model in FL . Here we use larger server model , or GEM to denote the setting where the size of the server model is larger than that of the clients ( See Table 1 ) . Making FL trainable with GEM is desirable to break through model capacity and enable collaborative knowledge fusion and accumulation at server . One feasible approach to bridge FL with GEM is through knowledge distillation ( KD ) ( Hinton et al. , 2015 ) , where clients and the server transfer knowledge through logits . For example , FedGKT ( He et al. , 2020a ) adopts a server model as a downstream sub-model and transfers knowledge directly from smaller edge models . In FedGKT the large server model essentially learns from one small teacher at a time and doesn ’ t learn consensus knowledge from multiple teachers . In FL , KD has also been applied ( Li & Wang , 2019 ; Lin et al. , 2020 ) to transfer ensemble knowledge of clients through consensus of output logits rather than parameters . These works either assume no model on the server ( Li & Wang , 2019 ) or a prototype server model of the same architecture as the client model ( Lin et al. , 2020 ) . Contributions . In this paper , we first propose a new paradigm to bridge FL with GEM , termed FedGEM , which can learn effectively and efficiently from fused knowledge by resource-constrained clients , and is also able to transfer knowledge back to clients with heterogeneous architectures . To further prevent negative and malicious knowledge transfer , we carefully design a selection and weighting criterion to enhance our knowledge transfer protocol , termed FedGEMS . We demonstrate with extensive experiments on various image classification tasks that our results significantly surpass the previous state-of-the-art baselines in both homogeneous and heterogeneous settings . Furthermore , thanks to our effective and selective protocol , our framework improves the robustness of FL on various malicious attacks and significantly reduces the overall communication . In summary , we propose a new framework to bridge FL with larger server models and simultaneously consolidate several benefits altogether , including superior performance , robustness of the whole system , and lower communication cost . 2 RELATED WORK . Federated Learning with GEM . FL is a collaborating learning framework without sharing private data among the clients . The classical method FedAvg ( McMahan et al. , 2017 ) and its recent variations ( Mohri et al. , 2019 ; Lin et al. , 2018 ; Li et al. , 2019b ) directly transfer the clients ’ parameters or gradients to the server nodes . To tackle the performance bottleneck by training resource-constrained clients in FL , there are two lines of work to bridge FL with GEM . The first line of studies adopts model compression ( Han et al. , 2015 ; He et al. , 2018 ; Yang et al. , 2018 ) , manually designed architectures ( Howard et al. , 2017 ; Zhang et al. , 2018 ; Iandola et al. , 2016 ) or even efficient neural architecture search ( Tan & Le , 2019 ; Wu et al. , 2019 ) to adapt a GEM to on-device learning . Another line is adopting knowledge distillation ( Hinton et al. , 2015 ) to transfer knowledge through output logits rather than parameters between a client model and a GEM ( He et al. , 2020a ) . However , FedGKT ( He et al. , 2020a ) ’ s focus is to transfer knowledge directly from clients to server without considering the consensus knowledge fused from clients . Therefore its performance is limited . Federated Learning with Knowledge Distillation . In fact , ensemble knowledge distillation has been shown to boost collaborative performance in FL . Specifically , FedMD ( Li & Wang , 2019 ) adopts a labeled public dataset and averaged logits to transfer knowledge . FedDF ( Lin et al. , 2020 ) proposes ensemble distillation for model fusion by aggregating both logits and models from clients . In addition , KD is used to enhance robustness in FL . Cronus ( Chang et al. , 2019 ) and DS-FL ( Itahara et al. , 2020 ) utilize a public dataset with soft labels jointly with local private dataset for local training , and combine with Cronus or entropy reduction aggregation , respectively , to defend against poisoning attacks in FL . In this work , we propose to exploit the benefit of both a larger server model and client knowledge fusion . Our work is also motivated by the recent studies in KD ( Qin et al. , 2021 ; You et al. , 2017 ; Li et al. , 2021 ; Yuan et al. , 2021 ; Wang et al. , 2021 ) , which show that student models can have larger capacities by learning from multiple teacher models . 3 METHODOLOGY . 3.1 PRELIMINARIES . We assume that there are K clients in federated learning process . The kth client has its own private labeled dataset Xk : = { ( xki , yki ) } N k i=1 that can be drawn from the same or different distribution , where xki is the ith training sample in the kth client model , y k i is its corresponding ground truth label , and Nk denotes the total number of samples . Each client also trains its own model fkc which can be of the same architecture ( homogeneous ) or different architecture ( heterogeneous ) . There is also a public dataset X0 : = { ( x0i , y0i ) } N 0 i=1 which is accessible to both server and clients . On the server side , we assume that there is a larger server model to be trained , denoted as fs . Ls and Lkc denotes the logit tensors from the server and the kth client model . 3.2 FEDGEMS FRAMEWORK . We illustrate our overall framework in Fig . 1 and summarize our training algorithm in Algorithm 1 . FedGEM . During each communication round , all client models first use private datasets to train several epochs , then transfer the predicted logits on public dataset as knowledge to the server model . The server model aggregates the clients ’ logits and then trains its server model with the guidance of fused knowledge . After training , the server model then transfers its logits back to all client models . Finally , each client model distills knowledge from received logits and continues their training on private datasets . Continuously iterating over multiple rounds , both the server and client models mutually learn knowledge from each other . Through this alternating training processing , we can obtain a large server model with accumulated knowledge and an ensemble of high-performance client models . FedGEMS : In FedGEMS , the server adopts a selection and weighting criterion to select knowledgeable clients for aggregation , which is detailed in the next section 3.3 . To illustrate the features of our framework , we compare it with the related studies of KD-based methods in federated learning in Table 1 on the following aspects : whether they use a labeled , unlabeled or no public dataset , whether client models can have heterogeneous architectures , the aggregation strategy on the server , and whether the server has a larger model . Note FedGEM can be regarded as placing a larger server model on top of the FedMD framework while keeping other settings the same . 3.3 SELECTIVE KNOWLEDGE FUSION IN SERVER MODEL . Since clients ’ knowledge may negatively impact the server model in the heterogeneous or malicious setting and vice versa , we further propose selective strategies on both server and client sides to enforce positive knowledge fusion into the large server model as shown in Fig . 2 . Algorithm 1 Illustration of the Framework of FedGEMS . T is the number of communication rounds ; X0 and Y 0 denotes the images and their corresponding labels in public dataset ; Xk and Y k denotes the private dataset in the kth client model ; fs and fkc are the server with parameter Ws and the kth client model with parameters W kc ; LGlobal indicates the global logits to save correct logits ; Ls and Lkc are the logit tensors from the server and the kth client model . 1 : ServerExecute ( ) : 2 : for each round t = 1 , 2 , ... , T do 3 : // Selective Knowldge Fusion 4 : for idx , x0 , y0 ∈ { X0 , Y 0 } do 5 : if fs ( Ws ; x0 ) == y0 then 6 : Ls ← LS1 ( x0 , y0 ) ▷ in Eq . 1 7 : LGlobal [ idx ] ← Ls [ idx ] 8 : else if idx in LGlobal then 9 : Ls ← LS2 ( x0 , y0 , LGlobal ) ▷ in Eq . 2 10 : else 11 : Lc ← ClientSelect ( idx ) 12 : Ls ← LS3 ( x0 , y0 , Lc ) ▷ in Eq . 3 , 4 , 5 13 : Ws ←Ws − ηk∇Ls 14 : Ls [ idx ] ← fs ( Ws ; x0 ) 15 : // Transfer Knowledge to Client Models 16 : ClientTrain ( Ls ) 17 : ClientTrain ( Ls ) : 18 : for each client kth in parallel do 19 : // Knowledge Distillation on Clients 20 : for x0 , y0 ∈ { X0 , Ls , Y 0 } do 21 : Lc ← LC ( x0 , y0 , Ls ) ▷ in Eq . 6 22 : W kc ←W kc − ηk∇Lc 23 : // Local Training on Clients 24 : for xk , yk ∈ { Xk , Y k } do 25 : Lc ← LCE ( xk , yk ) 26 : W kc ←W kc − ηk∇Lc 27 : ClientSelect ( idx ) : 28 : // Selective Transfer to Server 29 : for each client kth in parallel do 30 : L0c [ idx ] ← fkc ( W kc ; x0 [ idx ] ) 31 : Return Lc to server | This work proposed a KD-based FL framework for training a larger server model securely. The proposed framework is a combination of FedGKT-like idea and further apply some KD strategies for selective transfer. Many baselines are compared to demonstrate its efficacy. | SP:33bba9b39df17fa53e059694d654d17a99847349 |
FedGEMS: Federated Learning of Larger Server Models via Selective Knowledge Fusion | 1 INTRODUCTION . Nowadays , powerful models with tremendous parameters trained with sufficient computation power are indispensable in Artificial Intelligence ( AI ) , such as AlphaGo ( Silver et al. , 2016 ) , Alphafold ( Senior et al. , 2020 ) and GPT-3 ( Brown et al. , 2020 ) . However , billions of resource-constrained mobile and IoT devices have become the primary data source to empower the intelligence of many applications ( Bonawitz et al. , 2019 ; Brisimi et al. , 2018 ; Li et al. , 2019a ) . Due to privacy , security , regulatory and economic considerations ( Voigt & Von dem Bussche , 2017 ; Li et al. , 2018 ) , it is increasingly difficult and undesirable to pool data together for centralized training . Therefore , federated learning approaches ( McMahan et al. , 2017 ; Smith et al. , 2017 ; Caldas et al. , 2018 ; Kairouz et al. , 2019 ; Yang et al. , 2019 ) allow all the participants to reap the benefits of shared models without sharing private data have become increasingly attractive . In a typical Federated Learning ( FL ) training process using FedAvg ( McMahan et al. , 2017 ) , each client sends its model parameters or gradients to a central server , which aggregates all clients ’ updates and sends the aggregated parameters back to the clients to update their local model . Because FL places computation burden on edge devices , its learnability is largely limited by the edge resources , on which training large models is often impossible . On the other hand , the server only directly aggregates the clients ’ models and its computation power is not fully exploited . In this work , we investigate the paradigm where the server adopts a larger model in FL . Here we use larger server model , or GEM to denote the setting where the size of the server model is larger than that of the clients ( See Table 1 ) . Making FL trainable with GEM is desirable to break through model capacity and enable collaborative knowledge fusion and accumulation at server . One feasible approach to bridge FL with GEM is through knowledge distillation ( KD ) ( Hinton et al. , 2015 ) , where clients and the server transfer knowledge through logits . For example , FedGKT ( He et al. , 2020a ) adopts a server model as a downstream sub-model and transfers knowledge directly from smaller edge models . In FedGKT the large server model essentially learns from one small teacher at a time and doesn ’ t learn consensus knowledge from multiple teachers . In FL , KD has also been applied ( Li & Wang , 2019 ; Lin et al. , 2020 ) to transfer ensemble knowledge of clients through consensus of output logits rather than parameters . These works either assume no model on the server ( Li & Wang , 2019 ) or a prototype server model of the same architecture as the client model ( Lin et al. , 2020 ) . Contributions . In this paper , we first propose a new paradigm to bridge FL with GEM , termed FedGEM , which can learn effectively and efficiently from fused knowledge by resource-constrained clients , and is also able to transfer knowledge back to clients with heterogeneous architectures . To further prevent negative and malicious knowledge transfer , we carefully design a selection and weighting criterion to enhance our knowledge transfer protocol , termed FedGEMS . We demonstrate with extensive experiments on various image classification tasks that our results significantly surpass the previous state-of-the-art baselines in both homogeneous and heterogeneous settings . Furthermore , thanks to our effective and selective protocol , our framework improves the robustness of FL on various malicious attacks and significantly reduces the overall communication . In summary , we propose a new framework to bridge FL with larger server models and simultaneously consolidate several benefits altogether , including superior performance , robustness of the whole system , and lower communication cost . 2 RELATED WORK . Federated Learning with GEM . FL is a collaborating learning framework without sharing private data among the clients . The classical method FedAvg ( McMahan et al. , 2017 ) and its recent variations ( Mohri et al. , 2019 ; Lin et al. , 2018 ; Li et al. , 2019b ) directly transfer the clients ’ parameters or gradients to the server nodes . To tackle the performance bottleneck by training resource-constrained clients in FL , there are two lines of work to bridge FL with GEM . The first line of studies adopts model compression ( Han et al. , 2015 ; He et al. , 2018 ; Yang et al. , 2018 ) , manually designed architectures ( Howard et al. , 2017 ; Zhang et al. , 2018 ; Iandola et al. , 2016 ) or even efficient neural architecture search ( Tan & Le , 2019 ; Wu et al. , 2019 ) to adapt a GEM to on-device learning . Another line is adopting knowledge distillation ( Hinton et al. , 2015 ) to transfer knowledge through output logits rather than parameters between a client model and a GEM ( He et al. , 2020a ) . However , FedGKT ( He et al. , 2020a ) ’ s focus is to transfer knowledge directly from clients to server without considering the consensus knowledge fused from clients . Therefore its performance is limited . Federated Learning with Knowledge Distillation . In fact , ensemble knowledge distillation has been shown to boost collaborative performance in FL . Specifically , FedMD ( Li & Wang , 2019 ) adopts a labeled public dataset and averaged logits to transfer knowledge . FedDF ( Lin et al. , 2020 ) proposes ensemble distillation for model fusion by aggregating both logits and models from clients . In addition , KD is used to enhance robustness in FL . Cronus ( Chang et al. , 2019 ) and DS-FL ( Itahara et al. , 2020 ) utilize a public dataset with soft labels jointly with local private dataset for local training , and combine with Cronus or entropy reduction aggregation , respectively , to defend against poisoning attacks in FL . In this work , we propose to exploit the benefit of both a larger server model and client knowledge fusion . Our work is also motivated by the recent studies in KD ( Qin et al. , 2021 ; You et al. , 2017 ; Li et al. , 2021 ; Yuan et al. , 2021 ; Wang et al. , 2021 ) , which show that student models can have larger capacities by learning from multiple teacher models . 3 METHODOLOGY . 3.1 PRELIMINARIES . We assume that there are K clients in federated learning process . The kth client has its own private labeled dataset Xk : = { ( xki , yki ) } N k i=1 that can be drawn from the same or different distribution , where xki is the ith training sample in the kth client model , y k i is its corresponding ground truth label , and Nk denotes the total number of samples . Each client also trains its own model fkc which can be of the same architecture ( homogeneous ) or different architecture ( heterogeneous ) . There is also a public dataset X0 : = { ( x0i , y0i ) } N 0 i=1 which is accessible to both server and clients . On the server side , we assume that there is a larger server model to be trained , denoted as fs . Ls and Lkc denotes the logit tensors from the server and the kth client model . 3.2 FEDGEMS FRAMEWORK . We illustrate our overall framework in Fig . 1 and summarize our training algorithm in Algorithm 1 . FedGEM . During each communication round , all client models first use private datasets to train several epochs , then transfer the predicted logits on public dataset as knowledge to the server model . The server model aggregates the clients ’ logits and then trains its server model with the guidance of fused knowledge . After training , the server model then transfers its logits back to all client models . Finally , each client model distills knowledge from received logits and continues their training on private datasets . Continuously iterating over multiple rounds , both the server and client models mutually learn knowledge from each other . Through this alternating training processing , we can obtain a large server model with accumulated knowledge and an ensemble of high-performance client models . FedGEMS : In FedGEMS , the server adopts a selection and weighting criterion to select knowledgeable clients for aggregation , which is detailed in the next section 3.3 . To illustrate the features of our framework , we compare it with the related studies of KD-based methods in federated learning in Table 1 on the following aspects : whether they use a labeled , unlabeled or no public dataset , whether client models can have heterogeneous architectures , the aggregation strategy on the server , and whether the server has a larger model . Note FedGEM can be regarded as placing a larger server model on top of the FedMD framework while keeping other settings the same . 3.3 SELECTIVE KNOWLEDGE FUSION IN SERVER MODEL . Since clients ’ knowledge may negatively impact the server model in the heterogeneous or malicious setting and vice versa , we further propose selective strategies on both server and client sides to enforce positive knowledge fusion into the large server model as shown in Fig . 2 . Algorithm 1 Illustration of the Framework of FedGEMS . T is the number of communication rounds ; X0 and Y 0 denotes the images and their corresponding labels in public dataset ; Xk and Y k denotes the private dataset in the kth client model ; fs and fkc are the server with parameter Ws and the kth client model with parameters W kc ; LGlobal indicates the global logits to save correct logits ; Ls and Lkc are the logit tensors from the server and the kth client model . 1 : ServerExecute ( ) : 2 : for each round t = 1 , 2 , ... , T do 3 : // Selective Knowldge Fusion 4 : for idx , x0 , y0 ∈ { X0 , Y 0 } do 5 : if fs ( Ws ; x0 ) == y0 then 6 : Ls ← LS1 ( x0 , y0 ) ▷ in Eq . 1 7 : LGlobal [ idx ] ← Ls [ idx ] 8 : else if idx in LGlobal then 9 : Ls ← LS2 ( x0 , y0 , LGlobal ) ▷ in Eq . 2 10 : else 11 : Lc ← ClientSelect ( idx ) 12 : Ls ← LS3 ( x0 , y0 , Lc ) ▷ in Eq . 3 , 4 , 5 13 : Ws ←Ws − ηk∇Ls 14 : Ls [ idx ] ← fs ( Ws ; x0 ) 15 : // Transfer Knowledge to Client Models 16 : ClientTrain ( Ls ) 17 : ClientTrain ( Ls ) : 18 : for each client kth in parallel do 19 : // Knowledge Distillation on Clients 20 : for x0 , y0 ∈ { X0 , Ls , Y 0 } do 21 : Lc ← LC ( x0 , y0 , Ls ) ▷ in Eq . 6 22 : W kc ←W kc − ηk∇Lc 23 : // Local Training on Clients 24 : for xk , yk ∈ { Xk , Y k } do 25 : Lc ← LCE ( xk , yk ) 26 : W kc ←W kc − ηk∇Lc 27 : ClientSelect ( idx ) : 28 : // Selective Transfer to Server 29 : for each client kth in parallel do 30 : L0c [ idx ] ← fkc ( W kc ; x0 [ idx ] ) 31 : Return Lc to server | This paper tries to address the big model on the server-side in federated learning (FL) via knowledge distillation. Selective transfer knowledge happens on both server and clients sides. The proposed model maintains a set of global, correct logits so that it can be used as memories for the server's distillation. When the server predicts wrong on the public datasets, it transfers the knowledge from the correct, weighted clients. The proposed model is evaluated on image datasets with many FL baselines. | SP:33bba9b39df17fa53e059694d654d17a99847349 |
Modeling Label Space Interactions in Multi-label Classification using Box Embeddings | 1 INTRODUCTION . Multi-label classification is a machine learning task in which an input is associated with multiple categories . Many real-world multi-label classification datasets in modalities such as text categorization ( Lewis et al. , 2004 ) , image classification ( Lin et al. , 2015 ; Krishna et al. , 2016 ) , entity typing ( Murty et al. , 2018 ; Onoe et al. , 2021 ) , functional genomics ( Barutcuoglu et al. , 2006 ; Clare , 2003 ) , and so on , have a rich inter-dependent label structure that can be expressed using a taxonomy graph or a hierarchy . To be useful in practice , a model should produce predictions that are coherent with respect to the label taxonomy . For example , if a book is classified as drama , it should also be classified as fiction according to the label taxonomy of book genres in the left-hand side of Figure 1 . More formally , we are given a label taxonomy in the form of a directed acyclic graph G = ( L , T ) , where ( a , b ) ∈ T if and only if a is a parent of b in the taxonomy . A model will assign scores sℓ ( x ) for each label ℓ ∈ L. We say the scores are coherent with respect to the taxonomy if , for all edges ( a , b ) ∈ T , sa ( x ) ≥ sb ( x ) , and the model is consistent if this is the case for all inputs x . In the case of the book genre classification example , this implies that sfiction must be greater than or equal to sdrama , regardless of the input . The problem of producing coherent predictions for multi-label classification has garnered a lot of attention in the machine learning literature ( Wehrmann et al. , 2018c ; Giunchiglia & Lukasiewicz , 2020 ; Murty et al. , 2018 ; Cerri et al. , 2014 ) . Most methods that proposed to improve the coherence in predictions require the complete label taxonomy at inference time , and occasionally at training time as well , making these models hard to scale to large label spaces ( Giunchiglia & Lukasiewicz , 2020 ; Wehrmann et al. , 2018c ) . This brings forth a question : Can we utilize representation learning to model the label-label relationships implicitly in the embedding space ? Vilnis et al . ( 2018 ) show that probabilistic box embeddings , which represent concepts as high dimensional hyper-rectangles , can embed DAGs efficiently using the explicit information about the edges . Box embeddings represent edges by box-box containment as shown in Figure 1b . Representing the input and output labels in the same geometric space of boxes allows the multi-label taxonomy to be learned without an explicit taxonomic training signal . Moreover , there exists a large space of possible configurations that represent the same taxonomy , and if the label embeddings in the model gets close to any such configuration , then the model will always produce classifications that are coherent w.r.t the taxonomy , regardless of the input . We show through empirical evidence this is the case , and provide a formal proof for latter . In this work , we propose the multi-label box model ( MBM ) that utilizes the geometry and probabilistic semantics of box embeddings to model label-label interactions in multi-label classification . MBM represents labels as boxes using free parameters and uses a deep neural network to embed the inputs in the same space . We perform coherence analysis of the model using two measures and show that MBM not only achieves state-of-the-art predictive performance but it also significantly improves the coherence of predicted scores w.r.t latent label taxonomy . Our analysis further shows that it is possible to retrieve the latent label-label relationships solely by analysing the learnt label representations inside the MBM , endowing the model with high degree of interpretability . Finally , we also present a way to utilize the interpretability of MBM to inject partial information about label-label relationships into the model thereby improving the coherence even further . 2 RELATED WORK . Multi-label classification tasks that exhibit strong label space structure in the form of explicit label taxonomy are termed hierarchical multi-label classification ( HMLC ) in machine learning literature . Most approaches for such tasks make use of the complete hierarchy at training time . These approaches can be categorized into two buckets ( Silla & Freitas , 2010 ) : ( 1 ) Local approaches that focus on local information for each label or clusters of labels in the hierarchy and classify them independently ( Cerri et al. , 2014 ; Huang et al. , 2019 ) , and ( 2 ) Global approaches that treat the problem as a structured classification task and take global interactions into account ( Belanger & McCallum , 2016 ) . In the most general setting , however , both local and global interactions between labels exist . The recent advances in deep learning ( Wehrmann et al. , 2018a ) propose a specialized neural network architecture called Hierarchical Multi-Label Classification Network ( HMCN-R and HMCN-F ) that takes into account both local and global interactions by creating an ensemble of classifiers that can be trained using end-to-end gradient based training . However , HMCN does not try to enforce coherence strongly , focusing solely on predictive performance . In order to improve prediction coherence , recent works employ special loss functions on top of a neural network classifier to enforce coherence w.r.t the label taxonomy ( Murty et al. , 2018 ; Giunchiglia & Lukasiewicz , 2020 ) . While effective , these approaches still use the label taxonomy explicitly , making them difficult to scale to very large label spaces . Recent advances in representation learning provide various methods to embed large graphs and taxonomies parsimoniously in non-euclidean spaces ( Nickel & Kiela , 2017 ; Vilnis et al. , 2018 ; Vilnis & McCallum , 2015 ; Gu et al. , 2019 ) . The most prominent of these embedding methods include hyperbolic embeddings ( Nickel & Kiela , 2017 ; Ganea et al. , 2018a ; b ) and box embedding ( Vilnis et al. , 2018 ; Li et al. , 2019 ; Dasgupta et al. , 2020a ) . The use of representations other than Euclidean vectors for improving the coherence of multi-label classification has been limited to specific domains like text ( Chatterjee et al. , 2021 ) or specific tasks like entity typing ( Onoe et al. , 2021 ) . Moreover , while both hyperbolic and box embedding can model hierarchical relationships , it has been shown that the box embedding can also model more general graphs like DAGs much more efficiently than hyperbolic embeddings ( Patel et al. , 2020 ) . Hence , we propose a model that uses box embedding to capture general label-label relationships without the explicit use of label taxonomy to improve the coherence of model predictions . 3 OVERVIEW OF BOX EMBEDDINGS . Notations : In the problem of multi-label classification , we are given a set of labels L where L = |L| , and an instance can be labeled with an element s ∈ { 0 , 1 } L , where projection to the ith coordinate πi ( s ) = 1 means that the ith label is true . We call the set of all such labelings S , and the associated probability space ( S , P ( S ) , PS ) . We use I to denote the set of all finite closed intervals [ µ− , µ+ ] in Ω ⊂ R plus the empty set , i.e . I : = { [ µ− , µ+ ] ⊂ Ω |µ+ ≥ µ− } ∪ ∅ . We denote the smallest σ-algebra containing I as σ ( I ) and , given a valid finite measure ν , we consider the measure space ( Ω , σ ( I ) , ν ) . As a high dimensional generalization , Id will denote a d-dimensional Cartesian product of I . Definition 1 ( Box Embedding ( Vilnis et al. , 2018 ) ) . Let B : Id → S be a measurable function such that B−1 ◦ π−1i ( 1 ) = ∏d i [ µ − i , µ + i ] ∈ Id . A box embedding is defined as the function Box : L → Id which maps a label ℓ ∈ L to B−1 ◦ π−1ℓ ( { 1 } ) ∈ Id . The definition of box embeddings induces a push-forward measure Q on S such that for any R ⊆ S , Q ( S ) = ν ◦ B−1 ( R ) . The complete joint probability distribution over the labels can be modeled using Q as defined above ; however , computing B−1 ( R ) requires the use of inclusion-exclusion principle and hence is intractable for a general R. In order to avoid local identifiability issues in training , Dasgupta et al . ( 2020b ) interpret µ−i ( resp . µ+i ) as the location parameters of random variables M − i ( resp . M + i ) that are distributed according to GumbelMax ( resp . GumbelMin ) distributions , leading to a meta-probabilistic generalization of box embedding which they call Gumbel Box Process . Since GumbelMax ( resp . GumbelMin ) is a max ( resp . min ) stable distribution , it enables the computation of the location parameters of the intersection box as given in the following definition . Definition 2 ( Intersection Box ( Dasgupta et al. , 2020b ) ) . Let A = ∏d i=1 [ a − i , a + i ] and B =∏d i=1 [ b − i , b + i ] be two gumbel boxes expressed using their location parameters , then the location parameters of the intersection of these two gumbel boxes are given as A∩̃B = d∏ i=1 [ β lse ( a−i β , b−i β ) , − β lse ( −a + i β , −b + i β ) ] , ( 1 ) where lse ( x , y ) = log ( exp ( x ) + exp ( y ) ) . The expected volume of Gumbel boxes involves the Bessel Function of the Second Kind , however , as shown in Dasgupta et al . ( 2020b ) , this integral can be reasonably approximated using softplus function leading to the following definition for approximate bessel volume . Definition 3 ( Approximate Bessel Volume ( Dasgupta et al. , 2020b ) ) . For a gumbel box B =∏d i=1 [ b − i , b + i ] we define the approximate Bessel volume λ : Id → R+ as λ ( B ) : = d∏ i=1 log ( 1 + exp ( b+i − b − i β − 2γ ) ) . In the next section , we formally demonstrate the suitability of box embeddings for capturing taxonomic label relationships , and for that we first prove a couple of useful facts regarding the Gumbel intersection and Bessel approximate volume . Proposition 1 . Approximate bessel volume is monotonic with respect to set containment . That is for two Gumbel boxes A , B , a−i ≥ b − i and a + i ≤ b + i , ∀i ∈ { 1 , . . . , d } ⇐⇒ λ ( A ) ≤ λ ( B ) . ( 2 ) Proof . Follows from the monotonicity of log ( 1 + exp ( . ) ) . Proposition 2 . For any two Gumbel boxes A , B , λ ( A∩̃B ) ≤ λ ( B ) . Proof . The fact that max ( x , y ) ≤ lse ( x , y ) , and the statement of proposition 1 together imply the desired result . Since λ is neither normalized nor additive , it can not be used as a probability measure on ( Ω , σ ( Id ) ) . However , we can use proposition 1 and 2 to define a conditional probability model as follows . Corollary 1 . For two gumbel boxes A , B , let PBox ( A |B ) = λ ( A∩̃B ) λ ( B ) , then ( i ) For any two gumbel boxes A , B , we have 0 ≤ PBox ( A |B ) ≤ 1 . ( ii ) PBox ( A |C ) ≤ PBox ( B |C ) for any three gumbel boxesA , B , C , with a−i ≥ b − i , a + i ≤ b + i . | The problem tackled in this paper is that of multi-label classification, where class labels form a taxonomy (i.e., a hierarchy), and the goal is to enforce the predictions to comply with the label taxonomy. This is a well-known problem in machine learning and it is important as it imposes a more structured learning space, by implicitly enforcing predictions to be consistent with the label taxonomy. The approach taken in this paper is based on box embeddings, where the idea is to view classes as boxes in the space, and apply a certain probabilistic semantics of box embeddings to eventually model taxonomic relations between classes. | SP:9203325a0f25a556548265a38ebb79b20b09080b |
Modeling Label Space Interactions in Multi-label Classification using Box Embeddings | 1 INTRODUCTION . Multi-label classification is a machine learning task in which an input is associated with multiple categories . Many real-world multi-label classification datasets in modalities such as text categorization ( Lewis et al. , 2004 ) , image classification ( Lin et al. , 2015 ; Krishna et al. , 2016 ) , entity typing ( Murty et al. , 2018 ; Onoe et al. , 2021 ) , functional genomics ( Barutcuoglu et al. , 2006 ; Clare , 2003 ) , and so on , have a rich inter-dependent label structure that can be expressed using a taxonomy graph or a hierarchy . To be useful in practice , a model should produce predictions that are coherent with respect to the label taxonomy . For example , if a book is classified as drama , it should also be classified as fiction according to the label taxonomy of book genres in the left-hand side of Figure 1 . More formally , we are given a label taxonomy in the form of a directed acyclic graph G = ( L , T ) , where ( a , b ) ∈ T if and only if a is a parent of b in the taxonomy . A model will assign scores sℓ ( x ) for each label ℓ ∈ L. We say the scores are coherent with respect to the taxonomy if , for all edges ( a , b ) ∈ T , sa ( x ) ≥ sb ( x ) , and the model is consistent if this is the case for all inputs x . In the case of the book genre classification example , this implies that sfiction must be greater than or equal to sdrama , regardless of the input . The problem of producing coherent predictions for multi-label classification has garnered a lot of attention in the machine learning literature ( Wehrmann et al. , 2018c ; Giunchiglia & Lukasiewicz , 2020 ; Murty et al. , 2018 ; Cerri et al. , 2014 ) . Most methods that proposed to improve the coherence in predictions require the complete label taxonomy at inference time , and occasionally at training time as well , making these models hard to scale to large label spaces ( Giunchiglia & Lukasiewicz , 2020 ; Wehrmann et al. , 2018c ) . This brings forth a question : Can we utilize representation learning to model the label-label relationships implicitly in the embedding space ? Vilnis et al . ( 2018 ) show that probabilistic box embeddings , which represent concepts as high dimensional hyper-rectangles , can embed DAGs efficiently using the explicit information about the edges . Box embeddings represent edges by box-box containment as shown in Figure 1b . Representing the input and output labels in the same geometric space of boxes allows the multi-label taxonomy to be learned without an explicit taxonomic training signal . Moreover , there exists a large space of possible configurations that represent the same taxonomy , and if the label embeddings in the model gets close to any such configuration , then the model will always produce classifications that are coherent w.r.t the taxonomy , regardless of the input . We show through empirical evidence this is the case , and provide a formal proof for latter . In this work , we propose the multi-label box model ( MBM ) that utilizes the geometry and probabilistic semantics of box embeddings to model label-label interactions in multi-label classification . MBM represents labels as boxes using free parameters and uses a deep neural network to embed the inputs in the same space . We perform coherence analysis of the model using two measures and show that MBM not only achieves state-of-the-art predictive performance but it also significantly improves the coherence of predicted scores w.r.t latent label taxonomy . Our analysis further shows that it is possible to retrieve the latent label-label relationships solely by analysing the learnt label representations inside the MBM , endowing the model with high degree of interpretability . Finally , we also present a way to utilize the interpretability of MBM to inject partial information about label-label relationships into the model thereby improving the coherence even further . 2 RELATED WORK . Multi-label classification tasks that exhibit strong label space structure in the form of explicit label taxonomy are termed hierarchical multi-label classification ( HMLC ) in machine learning literature . Most approaches for such tasks make use of the complete hierarchy at training time . These approaches can be categorized into two buckets ( Silla & Freitas , 2010 ) : ( 1 ) Local approaches that focus on local information for each label or clusters of labels in the hierarchy and classify them independently ( Cerri et al. , 2014 ; Huang et al. , 2019 ) , and ( 2 ) Global approaches that treat the problem as a structured classification task and take global interactions into account ( Belanger & McCallum , 2016 ) . In the most general setting , however , both local and global interactions between labels exist . The recent advances in deep learning ( Wehrmann et al. , 2018a ) propose a specialized neural network architecture called Hierarchical Multi-Label Classification Network ( HMCN-R and HMCN-F ) that takes into account both local and global interactions by creating an ensemble of classifiers that can be trained using end-to-end gradient based training . However , HMCN does not try to enforce coherence strongly , focusing solely on predictive performance . In order to improve prediction coherence , recent works employ special loss functions on top of a neural network classifier to enforce coherence w.r.t the label taxonomy ( Murty et al. , 2018 ; Giunchiglia & Lukasiewicz , 2020 ) . While effective , these approaches still use the label taxonomy explicitly , making them difficult to scale to very large label spaces . Recent advances in representation learning provide various methods to embed large graphs and taxonomies parsimoniously in non-euclidean spaces ( Nickel & Kiela , 2017 ; Vilnis et al. , 2018 ; Vilnis & McCallum , 2015 ; Gu et al. , 2019 ) . The most prominent of these embedding methods include hyperbolic embeddings ( Nickel & Kiela , 2017 ; Ganea et al. , 2018a ; b ) and box embedding ( Vilnis et al. , 2018 ; Li et al. , 2019 ; Dasgupta et al. , 2020a ) . The use of representations other than Euclidean vectors for improving the coherence of multi-label classification has been limited to specific domains like text ( Chatterjee et al. , 2021 ) or specific tasks like entity typing ( Onoe et al. , 2021 ) . Moreover , while both hyperbolic and box embedding can model hierarchical relationships , it has been shown that the box embedding can also model more general graphs like DAGs much more efficiently than hyperbolic embeddings ( Patel et al. , 2020 ) . Hence , we propose a model that uses box embedding to capture general label-label relationships without the explicit use of label taxonomy to improve the coherence of model predictions . 3 OVERVIEW OF BOX EMBEDDINGS . Notations : In the problem of multi-label classification , we are given a set of labels L where L = |L| , and an instance can be labeled with an element s ∈ { 0 , 1 } L , where projection to the ith coordinate πi ( s ) = 1 means that the ith label is true . We call the set of all such labelings S , and the associated probability space ( S , P ( S ) , PS ) . We use I to denote the set of all finite closed intervals [ µ− , µ+ ] in Ω ⊂ R plus the empty set , i.e . I : = { [ µ− , µ+ ] ⊂ Ω |µ+ ≥ µ− } ∪ ∅ . We denote the smallest σ-algebra containing I as σ ( I ) and , given a valid finite measure ν , we consider the measure space ( Ω , σ ( I ) , ν ) . As a high dimensional generalization , Id will denote a d-dimensional Cartesian product of I . Definition 1 ( Box Embedding ( Vilnis et al. , 2018 ) ) . Let B : Id → S be a measurable function such that B−1 ◦ π−1i ( 1 ) = ∏d i [ µ − i , µ + i ] ∈ Id . A box embedding is defined as the function Box : L → Id which maps a label ℓ ∈ L to B−1 ◦ π−1ℓ ( { 1 } ) ∈ Id . The definition of box embeddings induces a push-forward measure Q on S such that for any R ⊆ S , Q ( S ) = ν ◦ B−1 ( R ) . The complete joint probability distribution over the labels can be modeled using Q as defined above ; however , computing B−1 ( R ) requires the use of inclusion-exclusion principle and hence is intractable for a general R. In order to avoid local identifiability issues in training , Dasgupta et al . ( 2020b ) interpret µ−i ( resp . µ+i ) as the location parameters of random variables M − i ( resp . M + i ) that are distributed according to GumbelMax ( resp . GumbelMin ) distributions , leading to a meta-probabilistic generalization of box embedding which they call Gumbel Box Process . Since GumbelMax ( resp . GumbelMin ) is a max ( resp . min ) stable distribution , it enables the computation of the location parameters of the intersection box as given in the following definition . Definition 2 ( Intersection Box ( Dasgupta et al. , 2020b ) ) . Let A = ∏d i=1 [ a − i , a + i ] and B =∏d i=1 [ b − i , b + i ] be two gumbel boxes expressed using their location parameters , then the location parameters of the intersection of these two gumbel boxes are given as A∩̃B = d∏ i=1 [ β lse ( a−i β , b−i β ) , − β lse ( −a + i β , −b + i β ) ] , ( 1 ) where lse ( x , y ) = log ( exp ( x ) + exp ( y ) ) . The expected volume of Gumbel boxes involves the Bessel Function of the Second Kind , however , as shown in Dasgupta et al . ( 2020b ) , this integral can be reasonably approximated using softplus function leading to the following definition for approximate bessel volume . Definition 3 ( Approximate Bessel Volume ( Dasgupta et al. , 2020b ) ) . For a gumbel box B =∏d i=1 [ b − i , b + i ] we define the approximate Bessel volume λ : Id → R+ as λ ( B ) : = d∏ i=1 log ( 1 + exp ( b+i − b − i β − 2γ ) ) . In the next section , we formally demonstrate the suitability of box embeddings for capturing taxonomic label relationships , and for that we first prove a couple of useful facts regarding the Gumbel intersection and Bessel approximate volume . Proposition 1 . Approximate bessel volume is monotonic with respect to set containment . That is for two Gumbel boxes A , B , a−i ≥ b − i and a + i ≤ b + i , ∀i ∈ { 1 , . . . , d } ⇐⇒ λ ( A ) ≤ λ ( B ) . ( 2 ) Proof . Follows from the monotonicity of log ( 1 + exp ( . ) ) . Proposition 2 . For any two Gumbel boxes A , B , λ ( A∩̃B ) ≤ λ ( B ) . Proof . The fact that max ( x , y ) ≤ lse ( x , y ) , and the statement of proposition 1 together imply the desired result . Since λ is neither normalized nor additive , it can not be used as a probability measure on ( Ω , σ ( Id ) ) . However , we can use proposition 1 and 2 to define a conditional probability model as follows . Corollary 1 . For two gumbel boxes A , B , let PBox ( A |B ) = λ ( A∩̃B ) λ ( B ) , then ( i ) For any two gumbel boxes A , B , we have 0 ≤ PBox ( A |B ) ≤ 1 . ( ii ) PBox ( A |C ) ≤ PBox ( B |C ) for any three gumbel boxesA , B , C , with a−i ≥ b − i , a + i ≤ b + i . | Most existing multi-label classification methods predict labels without considering natural/latent taxonomic constraints. This work introduces the multi-label box model (MBM), a method for multi-label classification that combines the encoding power of neural networks with the inductive bias and probabilistic semantics of box embeddings (trainable Venn-diagrams based on hyper-rectangles). MBM has some nice properties: they can be trained via gradient descent from data, and box embeddings can be read as calibrated conditional probabilities. Experiments are conducted on seven benchmark datasets with promising results, and results suggest that the label embeddings seem to capture the latent label taxonomy. | SP:9203325a0f25a556548265a38ebb79b20b09080b |
Modeling Label Space Interactions in Multi-label Classification using Box Embeddings | 1 INTRODUCTION . Multi-label classification is a machine learning task in which an input is associated with multiple categories . Many real-world multi-label classification datasets in modalities such as text categorization ( Lewis et al. , 2004 ) , image classification ( Lin et al. , 2015 ; Krishna et al. , 2016 ) , entity typing ( Murty et al. , 2018 ; Onoe et al. , 2021 ) , functional genomics ( Barutcuoglu et al. , 2006 ; Clare , 2003 ) , and so on , have a rich inter-dependent label structure that can be expressed using a taxonomy graph or a hierarchy . To be useful in practice , a model should produce predictions that are coherent with respect to the label taxonomy . For example , if a book is classified as drama , it should also be classified as fiction according to the label taxonomy of book genres in the left-hand side of Figure 1 . More formally , we are given a label taxonomy in the form of a directed acyclic graph G = ( L , T ) , where ( a , b ) ∈ T if and only if a is a parent of b in the taxonomy . A model will assign scores sℓ ( x ) for each label ℓ ∈ L. We say the scores are coherent with respect to the taxonomy if , for all edges ( a , b ) ∈ T , sa ( x ) ≥ sb ( x ) , and the model is consistent if this is the case for all inputs x . In the case of the book genre classification example , this implies that sfiction must be greater than or equal to sdrama , regardless of the input . The problem of producing coherent predictions for multi-label classification has garnered a lot of attention in the machine learning literature ( Wehrmann et al. , 2018c ; Giunchiglia & Lukasiewicz , 2020 ; Murty et al. , 2018 ; Cerri et al. , 2014 ) . Most methods that proposed to improve the coherence in predictions require the complete label taxonomy at inference time , and occasionally at training time as well , making these models hard to scale to large label spaces ( Giunchiglia & Lukasiewicz , 2020 ; Wehrmann et al. , 2018c ) . This brings forth a question : Can we utilize representation learning to model the label-label relationships implicitly in the embedding space ? Vilnis et al . ( 2018 ) show that probabilistic box embeddings , which represent concepts as high dimensional hyper-rectangles , can embed DAGs efficiently using the explicit information about the edges . Box embeddings represent edges by box-box containment as shown in Figure 1b . Representing the input and output labels in the same geometric space of boxes allows the multi-label taxonomy to be learned without an explicit taxonomic training signal . Moreover , there exists a large space of possible configurations that represent the same taxonomy , and if the label embeddings in the model gets close to any such configuration , then the model will always produce classifications that are coherent w.r.t the taxonomy , regardless of the input . We show through empirical evidence this is the case , and provide a formal proof for latter . In this work , we propose the multi-label box model ( MBM ) that utilizes the geometry and probabilistic semantics of box embeddings to model label-label interactions in multi-label classification . MBM represents labels as boxes using free parameters and uses a deep neural network to embed the inputs in the same space . We perform coherence analysis of the model using two measures and show that MBM not only achieves state-of-the-art predictive performance but it also significantly improves the coherence of predicted scores w.r.t latent label taxonomy . Our analysis further shows that it is possible to retrieve the latent label-label relationships solely by analysing the learnt label representations inside the MBM , endowing the model with high degree of interpretability . Finally , we also present a way to utilize the interpretability of MBM to inject partial information about label-label relationships into the model thereby improving the coherence even further . 2 RELATED WORK . Multi-label classification tasks that exhibit strong label space structure in the form of explicit label taxonomy are termed hierarchical multi-label classification ( HMLC ) in machine learning literature . Most approaches for such tasks make use of the complete hierarchy at training time . These approaches can be categorized into two buckets ( Silla & Freitas , 2010 ) : ( 1 ) Local approaches that focus on local information for each label or clusters of labels in the hierarchy and classify them independently ( Cerri et al. , 2014 ; Huang et al. , 2019 ) , and ( 2 ) Global approaches that treat the problem as a structured classification task and take global interactions into account ( Belanger & McCallum , 2016 ) . In the most general setting , however , both local and global interactions between labels exist . The recent advances in deep learning ( Wehrmann et al. , 2018a ) propose a specialized neural network architecture called Hierarchical Multi-Label Classification Network ( HMCN-R and HMCN-F ) that takes into account both local and global interactions by creating an ensemble of classifiers that can be trained using end-to-end gradient based training . However , HMCN does not try to enforce coherence strongly , focusing solely on predictive performance . In order to improve prediction coherence , recent works employ special loss functions on top of a neural network classifier to enforce coherence w.r.t the label taxonomy ( Murty et al. , 2018 ; Giunchiglia & Lukasiewicz , 2020 ) . While effective , these approaches still use the label taxonomy explicitly , making them difficult to scale to very large label spaces . Recent advances in representation learning provide various methods to embed large graphs and taxonomies parsimoniously in non-euclidean spaces ( Nickel & Kiela , 2017 ; Vilnis et al. , 2018 ; Vilnis & McCallum , 2015 ; Gu et al. , 2019 ) . The most prominent of these embedding methods include hyperbolic embeddings ( Nickel & Kiela , 2017 ; Ganea et al. , 2018a ; b ) and box embedding ( Vilnis et al. , 2018 ; Li et al. , 2019 ; Dasgupta et al. , 2020a ) . The use of representations other than Euclidean vectors for improving the coherence of multi-label classification has been limited to specific domains like text ( Chatterjee et al. , 2021 ) or specific tasks like entity typing ( Onoe et al. , 2021 ) . Moreover , while both hyperbolic and box embedding can model hierarchical relationships , it has been shown that the box embedding can also model more general graphs like DAGs much more efficiently than hyperbolic embeddings ( Patel et al. , 2020 ) . Hence , we propose a model that uses box embedding to capture general label-label relationships without the explicit use of label taxonomy to improve the coherence of model predictions . 3 OVERVIEW OF BOX EMBEDDINGS . Notations : In the problem of multi-label classification , we are given a set of labels L where L = |L| , and an instance can be labeled with an element s ∈ { 0 , 1 } L , where projection to the ith coordinate πi ( s ) = 1 means that the ith label is true . We call the set of all such labelings S , and the associated probability space ( S , P ( S ) , PS ) . We use I to denote the set of all finite closed intervals [ µ− , µ+ ] in Ω ⊂ R plus the empty set , i.e . I : = { [ µ− , µ+ ] ⊂ Ω |µ+ ≥ µ− } ∪ ∅ . We denote the smallest σ-algebra containing I as σ ( I ) and , given a valid finite measure ν , we consider the measure space ( Ω , σ ( I ) , ν ) . As a high dimensional generalization , Id will denote a d-dimensional Cartesian product of I . Definition 1 ( Box Embedding ( Vilnis et al. , 2018 ) ) . Let B : Id → S be a measurable function such that B−1 ◦ π−1i ( 1 ) = ∏d i [ µ − i , µ + i ] ∈ Id . A box embedding is defined as the function Box : L → Id which maps a label ℓ ∈ L to B−1 ◦ π−1ℓ ( { 1 } ) ∈ Id . The definition of box embeddings induces a push-forward measure Q on S such that for any R ⊆ S , Q ( S ) = ν ◦ B−1 ( R ) . The complete joint probability distribution over the labels can be modeled using Q as defined above ; however , computing B−1 ( R ) requires the use of inclusion-exclusion principle and hence is intractable for a general R. In order to avoid local identifiability issues in training , Dasgupta et al . ( 2020b ) interpret µ−i ( resp . µ+i ) as the location parameters of random variables M − i ( resp . M + i ) that are distributed according to GumbelMax ( resp . GumbelMin ) distributions , leading to a meta-probabilistic generalization of box embedding which they call Gumbel Box Process . Since GumbelMax ( resp . GumbelMin ) is a max ( resp . min ) stable distribution , it enables the computation of the location parameters of the intersection box as given in the following definition . Definition 2 ( Intersection Box ( Dasgupta et al. , 2020b ) ) . Let A = ∏d i=1 [ a − i , a + i ] and B =∏d i=1 [ b − i , b + i ] be two gumbel boxes expressed using their location parameters , then the location parameters of the intersection of these two gumbel boxes are given as A∩̃B = d∏ i=1 [ β lse ( a−i β , b−i β ) , − β lse ( −a + i β , −b + i β ) ] , ( 1 ) where lse ( x , y ) = log ( exp ( x ) + exp ( y ) ) . The expected volume of Gumbel boxes involves the Bessel Function of the Second Kind , however , as shown in Dasgupta et al . ( 2020b ) , this integral can be reasonably approximated using softplus function leading to the following definition for approximate bessel volume . Definition 3 ( Approximate Bessel Volume ( Dasgupta et al. , 2020b ) ) . For a gumbel box B =∏d i=1 [ b − i , b + i ] we define the approximate Bessel volume λ : Id → R+ as λ ( B ) : = d∏ i=1 log ( 1 + exp ( b+i − b − i β − 2γ ) ) . In the next section , we formally demonstrate the suitability of box embeddings for capturing taxonomic label relationships , and for that we first prove a couple of useful facts regarding the Gumbel intersection and Bessel approximate volume . Proposition 1 . Approximate bessel volume is monotonic with respect to set containment . That is for two Gumbel boxes A , B , a−i ≥ b − i and a + i ≤ b + i , ∀i ∈ { 1 , . . . , d } ⇐⇒ λ ( A ) ≤ λ ( B ) . ( 2 ) Proof . Follows from the monotonicity of log ( 1 + exp ( . ) ) . Proposition 2 . For any two Gumbel boxes A , B , λ ( A∩̃B ) ≤ λ ( B ) . Proof . The fact that max ( x , y ) ≤ lse ( x , y ) , and the statement of proposition 1 together imply the desired result . Since λ is neither normalized nor additive , it can not be used as a probability measure on ( Ω , σ ( Id ) ) . However , we can use proposition 1 and 2 to define a conditional probability model as follows . Corollary 1 . For two gumbel boxes A , B , let PBox ( A |B ) = λ ( A∩̃B ) λ ( B ) , then ( i ) For any two gumbel boxes A , B , we have 0 ≤ PBox ( A |B ) ≤ 1 . ( ii ) PBox ( A |C ) ≤ PBox ( B |C ) for any three gumbel boxesA , B , C , with a−i ≥ b − i , a + i ≤ b + i . | In this work the authors propose a new model for multi-label classification problems. In their model, the authors represent the labels as boxes and they use neural networks to embed the input datapoints in the same space. Thanks to the box representation, the model achieves higher interpretability, and the authors can inject background knowledge (in the form of taxonomies) into the model to improve the coherence of the learnt labels representation with the taxonomy. The model has been tested on 7 publicly available datasets, and evaluated using three different metrics, namely, CMAP, CV and and MAP. | SP:9203325a0f25a556548265a38ebb79b20b09080b |
Retrieval-Augmented Reinforcement Learning | Most deep reinforcement learning ( RL ) algorithms distill experience into parametric behavior policies or value functions via gradient updates . While effective , this approach has several disadvantages : ( 1 ) it is computationally expensive , ( 2 ) it can take many updates to integrate experiences into the parametric model , ( 3 ) experiences that are not fully integrated do not appropriately influence the agent ’ s behavior , and ( 4 ) behavior is limited by the capacity of the model . In this paper we explore an alternative paradigm in which we train a network to map a dataset of past experiences to optimal behavior . Specifically , we augment an RL agent with a retrieval process ( parameterized as a neural network ) that has direct access to a dataset of experiences . This dataset can come from the agent ’ s past experiences , expert demonstrations , or any other relevant source . The retrieval process is trained to retrieve information from the dataset that may be useful in the current context , to help the agent achieve its goal faster and more efficiently . We integrate our method into two different RL agents : an offline DQN agent and an online R2D2 agent . In offline multi-task problems , we show that the retrieval-augmented DQN agent avoids task interference and learns faster than the baseline DQN agent . On Atari , we show that retrieval-augmented R2D2 learns significantly faster than the baseline R2D2 agent and achieves higher scores . We run extensive ablations to measure the contributions of the components of our proposed method . 1 INTRODUCTION . A host is preparing a holiday meal for friends . They remember that the last time they went to the grocery store during the holiday season , all of the fresh produce was sold out . Thinking back to this past experience , they decide to go early ! The hypothetical host is employing case-based reasoning ( e.g. , Kolodner , 1992 ; Leake , 1996 ) . Here , an agent recalls a situation similar to the current one and uses information from the previous experience to solve the current task . This may involve adapting old solutions to meet new demands , or using previous experiences to make sense of new situations . In contrast , a dominant paradigm in modern reinforcement learning ( RL ) is to learn general purpose behaviour rules from the agent ’ s past experience . These rules are typically represented in the weights of a parametric policy or value function network model . Most deep RL algorithms integrate information across trajectories by iteratively updating network parameters using gradients that are computed along individual trajectories ( collected online or stored in an experience replay dataset , Lin , 1992 ) . For example , many off-policy algorithms reuse past experience by “ replaying ” trajectory snippets in order to compute weight updates for a value function represented by a deep network ( Ernst et al. , 2005 ; Riedmiller , 2005 ; Mnih et al. , 2015b ; Heess et al. , 2015 ; Lillicrap et al. , 2015 ) . This paradigm has clear advantages but at least two interrelated limitations : First , after learning , an agent ’ s past experiences no longer plays a direct role in the agent ’ s behavior , even if it is relevant to the current situation . This occurs because detailed information in the agent ’ s past experience is lost due to practical constraints on network capacity . Second , since the information provided by individual trajectories first needs to be distilled into a general purpose parametric rule , an agent may not be able to exploit the specific guidance that a handful of individual past experiences could provide , nor rapidly incorporate novel experience that becomes available—it may take many replays through related traces in the past experiences for this to occur ( Weisz et al. , 2021 ) . In this work , we develop an algorithm that overcomes these limitations by augmenting a standard reinforcement learning agent with a retrieval process ( parameterized via a neural network ) . The purpose of the retrieval process is to help the agent achieve its objective by providing relevant contextual information . To this end , the retrieval process uses a learned attention mechanism to dynamically access a large pool of past trajectories stored in a dataset ( e.g. , a replay buffer ) , with the aim of integrating information across these . The proposed algorithm ( R2A ) , shown in Figure 1 , enables an agent to retrieve information from a dataset of trajectories . The high-level idea is to have two different processes . First , the retrieval process , makes a “ query ” to search for relevant contextual information in the dataset . Second , the agent process performs inference and learning based on the information provided by the retrieval process . These two processes have different internal states but interact to shape the representations and predictions of each other : the agent process provides the relevant context , and the retrieval process uses the context and its own internal state to generate a query and retrieve relevant information , which is in turn used by the agent process to shape the representation of its policy and value function ( see Fig . 1A ) . Our proposed retrieval-augmented RL paradigm could take several forms . Here , we focus on a particular instantiation to assay and validate our hypothesis that learning a retrieval process can help an RL agent achieve its objectives . Summary of experimental results . We want RL algorithms that are able to adapt to the available data source and usefully ingest any dataset . Hence , we test the performance of the proposed method in three different scenarios . First , we evaluate it on Atari games in a single task setting . We build upon R2D2 ( Kapturowski et al. , 2018 ) , a state-of-the-art off-policy RL algorithm . Second , we evaluate it on a multi-task offline RL environment , using DQN ( Mnih et al. , 2013 ) as the RL algorithm , where the data in the queried dataset belongs to the same task . Third , we evaluate it on a multi-task offline RL environment where the data in the dataset comes from multiple tasks . In all these cases , we show that R2A learns faster and achieves higher reward compared to the baseline . 2 RETRIEVAL-AUGMENTED AGENTS . We now present our method for augmenting an RL agent with a retrieval process , thereby reducing the agent ’ s dependence on its model capacity , and enabling fast and flexible use of past experiences . A retrieval-augmented agent ( R2A ) consists of two main components : ( 1 ) the retrieval process , which takes in the current state of the agent , combines this with its own internal state , and retrieves relevant information from an external dataset of experiences ; and ( 2 ) a standard reward-maximizing RL agent , which uses the retrieved information to improve its value or policy estimates . See Figure 1 for an overview . The retrieval process is trained to retrieve information that the agent can use to improve its performance , without explicit knowledge of the agent ’ s policy . Importantly , the retrieval process has its own internal state , which enables it to integrate and combine information across retrievals . In the following , we focus on value-based methods , such as DQN ( Mnih et al. , 2015a ) and R2D2 ( Kapturowski et al. , 2018 ) , but our approach is equally applicable to policy-based methods . 2.1 RETRIEVAL-AUGMENTED AGENT . Formally , the agent receives an input xt at each timestep t. Each input is processed by a neural encoder ( e.g. , a resnet if the input is an image ) to obtain an abstract internal state for the agent st = f enc θ ( xt ) . For clarity , we focus here on the case of a single vector input , however , each input could also include the history of past observations , actions , and rewards , as is the case when f encθ is a recurrent network . These embeddings are used by the agent and retrieval processes . The retrieval process operates on a dataset B = { ( xt , at , rt ) , . . . , ( xt+T , at+T , rt+T ) } of l-step trajectories , for l ≥ 1 . This dataset could come from other agents or experts , as in offline RL or imitation learning , or consist of the growing set of the agent ’ s own experiences . Then , a retrieval-augmented agent ( R2A ) consists of the retrieval process and the agent process , parameterized by θ = { θenc , θretr , θagent } , Retrieval process f retrθ , B : mt−1 , st 7→mt , ut Agent process f agentθ : st , ut 7→ Qθ ( st , ut , a ) Retrieval Process . The retrieval process is parameterized as a neural network and has an internal statemt . The retrieval process takes in the current abstract state of the agent process st and its own previous internal statemt−1 and uses these to retrieve relevant information from the dataset B , which it then summarizes in a vector ut , and also updates its internal statemt . Agent Process . The current state of the agent st and the information from the retrieval process ut is then passed to the action-value function , itself used to select external actions . The above defines a parameterization for a retrieval-augmented agent . For retrieval to be effective , the retrieval process needs to : ( 1 ) be able to efficiently query a large dataset of trajectories , ( 2 ) learn and employ a similarity function to find relevant trajectories , and ( 3 ) encode and summarize the trajectories in a manner that allows efficient discovery of relevant past and future information . Below , we explain how we achieve these desiderata . At a high-level , to reduce computational complexity given a experience dataset of hundreds of thousands of trajectories , R2A operates on samples from the dataset . R2A then encodes and summarizes the trajectories in these samples using auxiliary losses and bi-directional sequence models to enable efficient retrieval of temporal information . Finally , R2A uses attention to select semantically relevant trajectories . 2.2 RETRIEVAL BATCH SAMPLING AND PRE-PROCESSING .. Sampling a retrieval batch from the retrieval dataset . To reduce the computational complexity , R2A uniformly samples a large batch of past experiences from the retrieval dataset , and only uses the sampled batch for retrieving information . We denote the sampled batch as “ retrieval batch ” and the number of trajectories in the retrieval batch as nretrieval . Encoding and forward-backward summarization of the retrieval dataset and corresponding auxiliary losses . Since the agent ’ s internal state extracts information from observations which relate to the task at hand , we choose to re-encode the raw experiences in the ” retrieval batch ” using the agent encoder module ( i.e. , f encθ ) . However , this representation is a function only of past observations ( i.e. , it ’ s a causal representation ) and may not be fully compatible with the needs of the retrieval operation . For that reason , we propose to further encode the retrieved batch of information , by additionally learning a summarization function , applied on the output of the encoder module , and which captures information about the past and the future within a particular trajectory by using a bi-directional model ( e.g. , parameterized as a bi-directional RNN or a Transformer ) . Forward Summarizer f fwdθ : ( s1 , . . . , st ) 7→ ht Backward Summarizer f bwdθ : ( sT , . . . , st ) 7→ bt For each trajectory in the retrieval batch , we represent each time-step within a trajectory by a set of two vectors hi , t and bi , t ( Figure 6 in the appendix ) where hi , t summarizes the past ( i.e. , from Algorithm 1 One timestep of a retrieval-augmented agent ( R2A ) . Input : Current input xt , previous retrieval process statemt−1 = { mt−1 , k| k ∈ { 1 , . . . , nf } } , dataset of l-step trajectories B = { ( xit , hit , bit , ait , rit ) . . . ( xit+l , hit+l , bit+l , ait+l , rit+l ) } for l ≥ 1 and 1 ≤ i ≤ ntraj , where h and b are the outputs of the forward & backward summarizers . Encode the current input at time-step t. st = f enc θ ( xt ) Step 1 : Compute the query . For all 1 ≤ k ≤ nf , compute m̂kt−1 = GRUθ ( st , m k t−1 ) qkt = fquery ( m̂ k t−1 ) Step 2 : Identify the most relevant trajectories . For all 1 ≤ k ≤ nf , 1 ≤ j ≤ l and 1 ≤ i ≤ ntraj , κi , j = ( h i jW e ret ) T ` ki , j = ( qkt κi , j√ de ) αki , j = softmax ( ` ki , j ) . Given scores α , the top-ktraj trajectories ( resp . top-kstates states ) are selected and denoted by T kt ( resp . Skt ) . Step 3 : Retrieve information from the most relevant trajectories and states . αki , j = softmax ( ` ki , j ) , i ∈ T kt , j ∈ Skt . gkt = ∑ i , j α k i , jvi , j where vi , j = bi , jW v ret Step 4 : Regularize the retrieved information by using information bottleneck . zkt ∼ p ( z|gkt ) Step 5 : Update the states of the slots . Slotwise update using retrieved information : m̃kt ← m̂kt−1 + zkt ∀k ∈ { 1 , . . . , nf } Joint slot update through self-attention : ckt = m̂ k t−1W q SA ∀k { 1 , . . . , nf } βk , k′ = softmaxk′ ( ckt κ k′ t√ de ) where κk ′ t = ( m̃ k′ t W e SA ) T ∀ k , k′ ∈ { 1 , . . . , nf } mkt ← m̃kt + ∑ k′ βk , k′vk′ where vk′ = m̃ k tW v SA ∀k ∈ { 1 , . . . , nf } Step 6 : Update the agent state using the retrieved information . dt = stW q ag κk = ( zktW e ag ) T ∀k ∈ { 1 , . . . , nf } γk = softmaxk ( dtκ k √ de ) ut ← ∑ k γkvk where vk = z k tW v ag ∀k ∈ { 1 , . . . , nf } . s̃t ← st + ut t′ = 0 to t′ = t time-steps of the ith trajectory ) while bi , t summarizes the future ( i.e. , from t′ = t to t′ = ` time-steps ) within the ith trajectory . In addition , taking inspiration from ( Jaderberg et al. , 2016 ; Trinh et al. , 2018 ; Ke et al. , 2019 ; Devlin et al. , 2018 ; Mazoure et al. , 2020 ; Banino et al. , 2021 ) , we use auxiliary losses to improve modeling of long term dependencies when training the parameters of our forward and backward summarizers . The goal of these losses is to force the representation ( hi , t , bi , t ) i , t≥0 to capture meaningful information for the unknown downstream task . For our experiments , we use supervised losses where we have access to actions or rewards in the retrieval batch . For ablations we also experiment with self-supervised losses . For supervised auxiliary losses , we use policy , value and reward prediction ( Silver et al. , 2017 ; Schrittwieser et al. , 2019 ) , and for self-supervised losses , we use a BERT-style masking loss ( Devlin et al. , 2018 ) . | This work proposes a retrieval neural network to help value-based RL algorithms (i.e. DQN and R2D2) retrieve information relevant to the current state from a dataset. The dataset may consist of the agent's own past experiences, expert demonstrations, or experiences from separate behavior policies (i.e. consider the offline RL setting). The retrieval network work is a recurrent model. The internal state in the retrieval network is partitioned into slots. Each slot independently retrieves information from the trajectory dataset. The retrieved information is used to update the internal state of the retrieval network and used as an additional input of the value function. Experiment on Atari games verifies that the retrieval network improves the performance of R2D2. Also, this paper presents results on grid environments to verify that the retrieval network can be beneficial in offline RL settings. | SP:284c5f0623506ddcb2d661a4942a28743f2a4661 |
Retrieval-Augmented Reinforcement Learning | Most deep reinforcement learning ( RL ) algorithms distill experience into parametric behavior policies or value functions via gradient updates . While effective , this approach has several disadvantages : ( 1 ) it is computationally expensive , ( 2 ) it can take many updates to integrate experiences into the parametric model , ( 3 ) experiences that are not fully integrated do not appropriately influence the agent ’ s behavior , and ( 4 ) behavior is limited by the capacity of the model . In this paper we explore an alternative paradigm in which we train a network to map a dataset of past experiences to optimal behavior . Specifically , we augment an RL agent with a retrieval process ( parameterized as a neural network ) that has direct access to a dataset of experiences . This dataset can come from the agent ’ s past experiences , expert demonstrations , or any other relevant source . The retrieval process is trained to retrieve information from the dataset that may be useful in the current context , to help the agent achieve its goal faster and more efficiently . We integrate our method into two different RL agents : an offline DQN agent and an online R2D2 agent . In offline multi-task problems , we show that the retrieval-augmented DQN agent avoids task interference and learns faster than the baseline DQN agent . On Atari , we show that retrieval-augmented R2D2 learns significantly faster than the baseline R2D2 agent and achieves higher scores . We run extensive ablations to measure the contributions of the components of our proposed method . 1 INTRODUCTION . A host is preparing a holiday meal for friends . They remember that the last time they went to the grocery store during the holiday season , all of the fresh produce was sold out . Thinking back to this past experience , they decide to go early ! The hypothetical host is employing case-based reasoning ( e.g. , Kolodner , 1992 ; Leake , 1996 ) . Here , an agent recalls a situation similar to the current one and uses information from the previous experience to solve the current task . This may involve adapting old solutions to meet new demands , or using previous experiences to make sense of new situations . In contrast , a dominant paradigm in modern reinforcement learning ( RL ) is to learn general purpose behaviour rules from the agent ’ s past experience . These rules are typically represented in the weights of a parametric policy or value function network model . Most deep RL algorithms integrate information across trajectories by iteratively updating network parameters using gradients that are computed along individual trajectories ( collected online or stored in an experience replay dataset , Lin , 1992 ) . For example , many off-policy algorithms reuse past experience by “ replaying ” trajectory snippets in order to compute weight updates for a value function represented by a deep network ( Ernst et al. , 2005 ; Riedmiller , 2005 ; Mnih et al. , 2015b ; Heess et al. , 2015 ; Lillicrap et al. , 2015 ) . This paradigm has clear advantages but at least two interrelated limitations : First , after learning , an agent ’ s past experiences no longer plays a direct role in the agent ’ s behavior , even if it is relevant to the current situation . This occurs because detailed information in the agent ’ s past experience is lost due to practical constraints on network capacity . Second , since the information provided by individual trajectories first needs to be distilled into a general purpose parametric rule , an agent may not be able to exploit the specific guidance that a handful of individual past experiences could provide , nor rapidly incorporate novel experience that becomes available—it may take many replays through related traces in the past experiences for this to occur ( Weisz et al. , 2021 ) . In this work , we develop an algorithm that overcomes these limitations by augmenting a standard reinforcement learning agent with a retrieval process ( parameterized via a neural network ) . The purpose of the retrieval process is to help the agent achieve its objective by providing relevant contextual information . To this end , the retrieval process uses a learned attention mechanism to dynamically access a large pool of past trajectories stored in a dataset ( e.g. , a replay buffer ) , with the aim of integrating information across these . The proposed algorithm ( R2A ) , shown in Figure 1 , enables an agent to retrieve information from a dataset of trajectories . The high-level idea is to have two different processes . First , the retrieval process , makes a “ query ” to search for relevant contextual information in the dataset . Second , the agent process performs inference and learning based on the information provided by the retrieval process . These two processes have different internal states but interact to shape the representations and predictions of each other : the agent process provides the relevant context , and the retrieval process uses the context and its own internal state to generate a query and retrieve relevant information , which is in turn used by the agent process to shape the representation of its policy and value function ( see Fig . 1A ) . Our proposed retrieval-augmented RL paradigm could take several forms . Here , we focus on a particular instantiation to assay and validate our hypothesis that learning a retrieval process can help an RL agent achieve its objectives . Summary of experimental results . We want RL algorithms that are able to adapt to the available data source and usefully ingest any dataset . Hence , we test the performance of the proposed method in three different scenarios . First , we evaluate it on Atari games in a single task setting . We build upon R2D2 ( Kapturowski et al. , 2018 ) , a state-of-the-art off-policy RL algorithm . Second , we evaluate it on a multi-task offline RL environment , using DQN ( Mnih et al. , 2013 ) as the RL algorithm , where the data in the queried dataset belongs to the same task . Third , we evaluate it on a multi-task offline RL environment where the data in the dataset comes from multiple tasks . In all these cases , we show that R2A learns faster and achieves higher reward compared to the baseline . 2 RETRIEVAL-AUGMENTED AGENTS . We now present our method for augmenting an RL agent with a retrieval process , thereby reducing the agent ’ s dependence on its model capacity , and enabling fast and flexible use of past experiences . A retrieval-augmented agent ( R2A ) consists of two main components : ( 1 ) the retrieval process , which takes in the current state of the agent , combines this with its own internal state , and retrieves relevant information from an external dataset of experiences ; and ( 2 ) a standard reward-maximizing RL agent , which uses the retrieved information to improve its value or policy estimates . See Figure 1 for an overview . The retrieval process is trained to retrieve information that the agent can use to improve its performance , without explicit knowledge of the agent ’ s policy . Importantly , the retrieval process has its own internal state , which enables it to integrate and combine information across retrievals . In the following , we focus on value-based methods , such as DQN ( Mnih et al. , 2015a ) and R2D2 ( Kapturowski et al. , 2018 ) , but our approach is equally applicable to policy-based methods . 2.1 RETRIEVAL-AUGMENTED AGENT . Formally , the agent receives an input xt at each timestep t. Each input is processed by a neural encoder ( e.g. , a resnet if the input is an image ) to obtain an abstract internal state for the agent st = f enc θ ( xt ) . For clarity , we focus here on the case of a single vector input , however , each input could also include the history of past observations , actions , and rewards , as is the case when f encθ is a recurrent network . These embeddings are used by the agent and retrieval processes . The retrieval process operates on a dataset B = { ( xt , at , rt ) , . . . , ( xt+T , at+T , rt+T ) } of l-step trajectories , for l ≥ 1 . This dataset could come from other agents or experts , as in offline RL or imitation learning , or consist of the growing set of the agent ’ s own experiences . Then , a retrieval-augmented agent ( R2A ) consists of the retrieval process and the agent process , parameterized by θ = { θenc , θretr , θagent } , Retrieval process f retrθ , B : mt−1 , st 7→mt , ut Agent process f agentθ : st , ut 7→ Qθ ( st , ut , a ) Retrieval Process . The retrieval process is parameterized as a neural network and has an internal statemt . The retrieval process takes in the current abstract state of the agent process st and its own previous internal statemt−1 and uses these to retrieve relevant information from the dataset B , which it then summarizes in a vector ut , and also updates its internal statemt . Agent Process . The current state of the agent st and the information from the retrieval process ut is then passed to the action-value function , itself used to select external actions . The above defines a parameterization for a retrieval-augmented agent . For retrieval to be effective , the retrieval process needs to : ( 1 ) be able to efficiently query a large dataset of trajectories , ( 2 ) learn and employ a similarity function to find relevant trajectories , and ( 3 ) encode and summarize the trajectories in a manner that allows efficient discovery of relevant past and future information . Below , we explain how we achieve these desiderata . At a high-level , to reduce computational complexity given a experience dataset of hundreds of thousands of trajectories , R2A operates on samples from the dataset . R2A then encodes and summarizes the trajectories in these samples using auxiliary losses and bi-directional sequence models to enable efficient retrieval of temporal information . Finally , R2A uses attention to select semantically relevant trajectories . 2.2 RETRIEVAL BATCH SAMPLING AND PRE-PROCESSING .. Sampling a retrieval batch from the retrieval dataset . To reduce the computational complexity , R2A uniformly samples a large batch of past experiences from the retrieval dataset , and only uses the sampled batch for retrieving information . We denote the sampled batch as “ retrieval batch ” and the number of trajectories in the retrieval batch as nretrieval . Encoding and forward-backward summarization of the retrieval dataset and corresponding auxiliary losses . Since the agent ’ s internal state extracts information from observations which relate to the task at hand , we choose to re-encode the raw experiences in the ” retrieval batch ” using the agent encoder module ( i.e. , f encθ ) . However , this representation is a function only of past observations ( i.e. , it ’ s a causal representation ) and may not be fully compatible with the needs of the retrieval operation . For that reason , we propose to further encode the retrieved batch of information , by additionally learning a summarization function , applied on the output of the encoder module , and which captures information about the past and the future within a particular trajectory by using a bi-directional model ( e.g. , parameterized as a bi-directional RNN or a Transformer ) . Forward Summarizer f fwdθ : ( s1 , . . . , st ) 7→ ht Backward Summarizer f bwdθ : ( sT , . . . , st ) 7→ bt For each trajectory in the retrieval batch , we represent each time-step within a trajectory by a set of two vectors hi , t and bi , t ( Figure 6 in the appendix ) where hi , t summarizes the past ( i.e. , from Algorithm 1 One timestep of a retrieval-augmented agent ( R2A ) . Input : Current input xt , previous retrieval process statemt−1 = { mt−1 , k| k ∈ { 1 , . . . , nf } } , dataset of l-step trajectories B = { ( xit , hit , bit , ait , rit ) . . . ( xit+l , hit+l , bit+l , ait+l , rit+l ) } for l ≥ 1 and 1 ≤ i ≤ ntraj , where h and b are the outputs of the forward & backward summarizers . Encode the current input at time-step t. st = f enc θ ( xt ) Step 1 : Compute the query . For all 1 ≤ k ≤ nf , compute m̂kt−1 = GRUθ ( st , m k t−1 ) qkt = fquery ( m̂ k t−1 ) Step 2 : Identify the most relevant trajectories . For all 1 ≤ k ≤ nf , 1 ≤ j ≤ l and 1 ≤ i ≤ ntraj , κi , j = ( h i jW e ret ) T ` ki , j = ( qkt κi , j√ de ) αki , j = softmax ( ` ki , j ) . Given scores α , the top-ktraj trajectories ( resp . top-kstates states ) are selected and denoted by T kt ( resp . Skt ) . Step 3 : Retrieve information from the most relevant trajectories and states . αki , j = softmax ( ` ki , j ) , i ∈ T kt , j ∈ Skt . gkt = ∑ i , j α k i , jvi , j where vi , j = bi , jW v ret Step 4 : Regularize the retrieved information by using information bottleneck . zkt ∼ p ( z|gkt ) Step 5 : Update the states of the slots . Slotwise update using retrieved information : m̃kt ← m̂kt−1 + zkt ∀k ∈ { 1 , . . . , nf } Joint slot update through self-attention : ckt = m̂ k t−1W q SA ∀k { 1 , . . . , nf } βk , k′ = softmaxk′ ( ckt κ k′ t√ de ) where κk ′ t = ( m̃ k′ t W e SA ) T ∀ k , k′ ∈ { 1 , . . . , nf } mkt ← m̃kt + ∑ k′ βk , k′vk′ where vk′ = m̃ k tW v SA ∀k ∈ { 1 , . . . , nf } Step 6 : Update the agent state using the retrieved information . dt = stW q ag κk = ( zktW e ag ) T ∀k ∈ { 1 , . . . , nf } γk = softmaxk ( dtκ k √ de ) ut ← ∑ k γkvk where vk = z k tW v ag ∀k ∈ { 1 , . . . , nf } . s̃t ← st + ut t′ = 0 to t′ = t time-steps of the ith trajectory ) while bi , t summarizes the future ( i.e. , from t′ = t to t′ = ` time-steps ) within the ith trajectory . In addition , taking inspiration from ( Jaderberg et al. , 2016 ; Trinh et al. , 2018 ; Ke et al. , 2019 ; Devlin et al. , 2018 ; Mazoure et al. , 2020 ; Banino et al. , 2021 ) , we use auxiliary losses to improve modeling of long term dependencies when training the parameters of our forward and backward summarizers . The goal of these losses is to force the representation ( hi , t , bi , t ) i , t≥0 to capture meaningful information for the unknown downstream task . For our experiments , we use supervised losses where we have access to actions or rewards in the retrieval batch . For ablations we also experiment with self-supervised losses . For supervised auxiliary losses , we use policy , value and reward prediction ( Silver et al. , 2017 ; Schrittwieser et al. , 2019 ) , and for self-supervised losses , we use a BERT-style masking loss ( Devlin et al. , 2018 ) . | The paper presents an approach that augments an RL agent with a parameterized retrieval process directly accessing prior experiences. The retrieval process is trained to retrieve from the dataset based on the current context of the agent and thus make a better prediction of the Q-values. The approach is called Retrieval Augmented RL (RARL) and is demonstrated on Atari domains. | SP:284c5f0623506ddcb2d661a4942a28743f2a4661 |
Retrieval-Augmented Reinforcement Learning | Most deep reinforcement learning ( RL ) algorithms distill experience into parametric behavior policies or value functions via gradient updates . While effective , this approach has several disadvantages : ( 1 ) it is computationally expensive , ( 2 ) it can take many updates to integrate experiences into the parametric model , ( 3 ) experiences that are not fully integrated do not appropriately influence the agent ’ s behavior , and ( 4 ) behavior is limited by the capacity of the model . In this paper we explore an alternative paradigm in which we train a network to map a dataset of past experiences to optimal behavior . Specifically , we augment an RL agent with a retrieval process ( parameterized as a neural network ) that has direct access to a dataset of experiences . This dataset can come from the agent ’ s past experiences , expert demonstrations , or any other relevant source . The retrieval process is trained to retrieve information from the dataset that may be useful in the current context , to help the agent achieve its goal faster and more efficiently . We integrate our method into two different RL agents : an offline DQN agent and an online R2D2 agent . In offline multi-task problems , we show that the retrieval-augmented DQN agent avoids task interference and learns faster than the baseline DQN agent . On Atari , we show that retrieval-augmented R2D2 learns significantly faster than the baseline R2D2 agent and achieves higher scores . We run extensive ablations to measure the contributions of the components of our proposed method . 1 INTRODUCTION . A host is preparing a holiday meal for friends . They remember that the last time they went to the grocery store during the holiday season , all of the fresh produce was sold out . Thinking back to this past experience , they decide to go early ! The hypothetical host is employing case-based reasoning ( e.g. , Kolodner , 1992 ; Leake , 1996 ) . Here , an agent recalls a situation similar to the current one and uses information from the previous experience to solve the current task . This may involve adapting old solutions to meet new demands , or using previous experiences to make sense of new situations . In contrast , a dominant paradigm in modern reinforcement learning ( RL ) is to learn general purpose behaviour rules from the agent ’ s past experience . These rules are typically represented in the weights of a parametric policy or value function network model . Most deep RL algorithms integrate information across trajectories by iteratively updating network parameters using gradients that are computed along individual trajectories ( collected online or stored in an experience replay dataset , Lin , 1992 ) . For example , many off-policy algorithms reuse past experience by “ replaying ” trajectory snippets in order to compute weight updates for a value function represented by a deep network ( Ernst et al. , 2005 ; Riedmiller , 2005 ; Mnih et al. , 2015b ; Heess et al. , 2015 ; Lillicrap et al. , 2015 ) . This paradigm has clear advantages but at least two interrelated limitations : First , after learning , an agent ’ s past experiences no longer plays a direct role in the agent ’ s behavior , even if it is relevant to the current situation . This occurs because detailed information in the agent ’ s past experience is lost due to practical constraints on network capacity . Second , since the information provided by individual trajectories first needs to be distilled into a general purpose parametric rule , an agent may not be able to exploit the specific guidance that a handful of individual past experiences could provide , nor rapidly incorporate novel experience that becomes available—it may take many replays through related traces in the past experiences for this to occur ( Weisz et al. , 2021 ) . In this work , we develop an algorithm that overcomes these limitations by augmenting a standard reinforcement learning agent with a retrieval process ( parameterized via a neural network ) . The purpose of the retrieval process is to help the agent achieve its objective by providing relevant contextual information . To this end , the retrieval process uses a learned attention mechanism to dynamically access a large pool of past trajectories stored in a dataset ( e.g. , a replay buffer ) , with the aim of integrating information across these . The proposed algorithm ( R2A ) , shown in Figure 1 , enables an agent to retrieve information from a dataset of trajectories . The high-level idea is to have two different processes . First , the retrieval process , makes a “ query ” to search for relevant contextual information in the dataset . Second , the agent process performs inference and learning based on the information provided by the retrieval process . These two processes have different internal states but interact to shape the representations and predictions of each other : the agent process provides the relevant context , and the retrieval process uses the context and its own internal state to generate a query and retrieve relevant information , which is in turn used by the agent process to shape the representation of its policy and value function ( see Fig . 1A ) . Our proposed retrieval-augmented RL paradigm could take several forms . Here , we focus on a particular instantiation to assay and validate our hypothesis that learning a retrieval process can help an RL agent achieve its objectives . Summary of experimental results . We want RL algorithms that are able to adapt to the available data source and usefully ingest any dataset . Hence , we test the performance of the proposed method in three different scenarios . First , we evaluate it on Atari games in a single task setting . We build upon R2D2 ( Kapturowski et al. , 2018 ) , a state-of-the-art off-policy RL algorithm . Second , we evaluate it on a multi-task offline RL environment , using DQN ( Mnih et al. , 2013 ) as the RL algorithm , where the data in the queried dataset belongs to the same task . Third , we evaluate it on a multi-task offline RL environment where the data in the dataset comes from multiple tasks . In all these cases , we show that R2A learns faster and achieves higher reward compared to the baseline . 2 RETRIEVAL-AUGMENTED AGENTS . We now present our method for augmenting an RL agent with a retrieval process , thereby reducing the agent ’ s dependence on its model capacity , and enabling fast and flexible use of past experiences . A retrieval-augmented agent ( R2A ) consists of two main components : ( 1 ) the retrieval process , which takes in the current state of the agent , combines this with its own internal state , and retrieves relevant information from an external dataset of experiences ; and ( 2 ) a standard reward-maximizing RL agent , which uses the retrieved information to improve its value or policy estimates . See Figure 1 for an overview . The retrieval process is trained to retrieve information that the agent can use to improve its performance , without explicit knowledge of the agent ’ s policy . Importantly , the retrieval process has its own internal state , which enables it to integrate and combine information across retrievals . In the following , we focus on value-based methods , such as DQN ( Mnih et al. , 2015a ) and R2D2 ( Kapturowski et al. , 2018 ) , but our approach is equally applicable to policy-based methods . 2.1 RETRIEVAL-AUGMENTED AGENT . Formally , the agent receives an input xt at each timestep t. Each input is processed by a neural encoder ( e.g. , a resnet if the input is an image ) to obtain an abstract internal state for the agent st = f enc θ ( xt ) . For clarity , we focus here on the case of a single vector input , however , each input could also include the history of past observations , actions , and rewards , as is the case when f encθ is a recurrent network . These embeddings are used by the agent and retrieval processes . The retrieval process operates on a dataset B = { ( xt , at , rt ) , . . . , ( xt+T , at+T , rt+T ) } of l-step trajectories , for l ≥ 1 . This dataset could come from other agents or experts , as in offline RL or imitation learning , or consist of the growing set of the agent ’ s own experiences . Then , a retrieval-augmented agent ( R2A ) consists of the retrieval process and the agent process , parameterized by θ = { θenc , θretr , θagent } , Retrieval process f retrθ , B : mt−1 , st 7→mt , ut Agent process f agentθ : st , ut 7→ Qθ ( st , ut , a ) Retrieval Process . The retrieval process is parameterized as a neural network and has an internal statemt . The retrieval process takes in the current abstract state of the agent process st and its own previous internal statemt−1 and uses these to retrieve relevant information from the dataset B , which it then summarizes in a vector ut , and also updates its internal statemt . Agent Process . The current state of the agent st and the information from the retrieval process ut is then passed to the action-value function , itself used to select external actions . The above defines a parameterization for a retrieval-augmented agent . For retrieval to be effective , the retrieval process needs to : ( 1 ) be able to efficiently query a large dataset of trajectories , ( 2 ) learn and employ a similarity function to find relevant trajectories , and ( 3 ) encode and summarize the trajectories in a manner that allows efficient discovery of relevant past and future information . Below , we explain how we achieve these desiderata . At a high-level , to reduce computational complexity given a experience dataset of hundreds of thousands of trajectories , R2A operates on samples from the dataset . R2A then encodes and summarizes the trajectories in these samples using auxiliary losses and bi-directional sequence models to enable efficient retrieval of temporal information . Finally , R2A uses attention to select semantically relevant trajectories . 2.2 RETRIEVAL BATCH SAMPLING AND PRE-PROCESSING .. Sampling a retrieval batch from the retrieval dataset . To reduce the computational complexity , R2A uniformly samples a large batch of past experiences from the retrieval dataset , and only uses the sampled batch for retrieving information . We denote the sampled batch as “ retrieval batch ” and the number of trajectories in the retrieval batch as nretrieval . Encoding and forward-backward summarization of the retrieval dataset and corresponding auxiliary losses . Since the agent ’ s internal state extracts information from observations which relate to the task at hand , we choose to re-encode the raw experiences in the ” retrieval batch ” using the agent encoder module ( i.e. , f encθ ) . However , this representation is a function only of past observations ( i.e. , it ’ s a causal representation ) and may not be fully compatible with the needs of the retrieval operation . For that reason , we propose to further encode the retrieved batch of information , by additionally learning a summarization function , applied on the output of the encoder module , and which captures information about the past and the future within a particular trajectory by using a bi-directional model ( e.g. , parameterized as a bi-directional RNN or a Transformer ) . Forward Summarizer f fwdθ : ( s1 , . . . , st ) 7→ ht Backward Summarizer f bwdθ : ( sT , . . . , st ) 7→ bt For each trajectory in the retrieval batch , we represent each time-step within a trajectory by a set of two vectors hi , t and bi , t ( Figure 6 in the appendix ) where hi , t summarizes the past ( i.e. , from Algorithm 1 One timestep of a retrieval-augmented agent ( R2A ) . Input : Current input xt , previous retrieval process statemt−1 = { mt−1 , k| k ∈ { 1 , . . . , nf } } , dataset of l-step trajectories B = { ( xit , hit , bit , ait , rit ) . . . ( xit+l , hit+l , bit+l , ait+l , rit+l ) } for l ≥ 1 and 1 ≤ i ≤ ntraj , where h and b are the outputs of the forward & backward summarizers . Encode the current input at time-step t. st = f enc θ ( xt ) Step 1 : Compute the query . For all 1 ≤ k ≤ nf , compute m̂kt−1 = GRUθ ( st , m k t−1 ) qkt = fquery ( m̂ k t−1 ) Step 2 : Identify the most relevant trajectories . For all 1 ≤ k ≤ nf , 1 ≤ j ≤ l and 1 ≤ i ≤ ntraj , κi , j = ( h i jW e ret ) T ` ki , j = ( qkt κi , j√ de ) αki , j = softmax ( ` ki , j ) . Given scores α , the top-ktraj trajectories ( resp . top-kstates states ) are selected and denoted by T kt ( resp . Skt ) . Step 3 : Retrieve information from the most relevant trajectories and states . αki , j = softmax ( ` ki , j ) , i ∈ T kt , j ∈ Skt . gkt = ∑ i , j α k i , jvi , j where vi , j = bi , jW v ret Step 4 : Regularize the retrieved information by using information bottleneck . zkt ∼ p ( z|gkt ) Step 5 : Update the states of the slots . Slotwise update using retrieved information : m̃kt ← m̂kt−1 + zkt ∀k ∈ { 1 , . . . , nf } Joint slot update through self-attention : ckt = m̂ k t−1W q SA ∀k { 1 , . . . , nf } βk , k′ = softmaxk′ ( ckt κ k′ t√ de ) where κk ′ t = ( m̃ k′ t W e SA ) T ∀ k , k′ ∈ { 1 , . . . , nf } mkt ← m̃kt + ∑ k′ βk , k′vk′ where vk′ = m̃ k tW v SA ∀k ∈ { 1 , . . . , nf } Step 6 : Update the agent state using the retrieved information . dt = stW q ag κk = ( zktW e ag ) T ∀k ∈ { 1 , . . . , nf } γk = softmaxk ( dtκ k √ de ) ut ← ∑ k γkvk where vk = z k tW v ag ∀k ∈ { 1 , . . . , nf } . s̃t ← st + ut t′ = 0 to t′ = t time-steps of the ith trajectory ) while bi , t summarizes the future ( i.e. , from t′ = t to t′ = ` time-steps ) within the ith trajectory . In addition , taking inspiration from ( Jaderberg et al. , 2016 ; Trinh et al. , 2018 ; Ke et al. , 2019 ; Devlin et al. , 2018 ; Mazoure et al. , 2020 ; Banino et al. , 2021 ) , we use auxiliary losses to improve modeling of long term dependencies when training the parameters of our forward and backward summarizers . The goal of these losses is to force the representation ( hi , t , bi , t ) i , t≥0 to capture meaningful information for the unknown downstream task . For our experiments , we use supervised losses where we have access to actions or rewards in the retrieval batch . For ablations we also experiment with self-supervised losses . For supervised auxiliary losses , we use policy , value and reward prediction ( Silver et al. , 2017 ; Schrittwieser et al. , 2019 ) , and for self-supervised losses , we use a BERT-style masking loss ( Devlin et al. , 2018 ) . | The paper proposed a state-augmentation strategy based on a fully differentiable model for online and offline reinforcement learning. The authors evaluate the proposal on two algorithms, DQN and R2D2. The augmentation through retrieval approach is decomposed in several steps, namely trajectory, and state retrieval based on the currently perceived state and an internal state, the retriever has been defined with a recurrent neural network type of model. The retrieved information is then aggregated using a so-called summarizing model which is also end-2-end differentiable. The authors claim and show detailed improvement with respect to the state of the art on Atari and multi-task offline RL. In the case of multi-task, the authors show that incorporating multiple tasks into the retrievable dataset is beneficial. | SP:284c5f0623506ddcb2d661a4942a28743f2a4661 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.